@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');
.actions{display:flex;justify-content:flex-end;gap:0.75rem;margin-top:1rem}.secondary{background:white;border:0.0625rem solid #e6ddeb;border-radius:0.625rem;padding:0.6875rem 1.125rem;font-size:0.875rem;color:#776281}button:disabled{cursor:default}.actions button:disabled{opacity:.4;box-shadow:none}.tile.linked{border-color:#d6bbe3;background:#f8f1fc;color:#7c5191}.tile.linked::after{border-color:#b982d5;background:#b982d5}
:root{font-family:'DM Sans',sans-serif;color:#382840;background:#f7f2fa;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:focus-visible,a:focus-visible{outline:0.1875rem solid #ea9e21;outline-offset:0.3125rem}main{max-width:63.75rem;margin:auto;padding:1.75rem 2.5rem}header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1.75rem}.brand{display:flex;align-items:center;font:700 1.6875rem 'Outfit',sans-serif;text-decoration:none;color:#382840;letter-spacing:-0.0625rem}.logo{background:#a661c8;color:white;border-radius:0.75rem;padding:0.1875rem 0.625rem;margin-right:0.625rem;font-size:1.875rem}.brand-symbols{color:#a661c8;margin-left:.4em;font-family:Arial,Helvetica,sans-serif;font-weight:600;letter-spacing:normal;white-space:nowrap}.header-note,.eyebrow,.mini-label,.column-labels{font-size:0.75rem;letter-spacing:0.10625rem;font-weight:700}.header-note{color:#85798b}.game{background:white;border-radius:1.75rem;padding:2rem 2.625rem 1.25rem;box-shadow:0 0.75rem 3.75rem #52326209}.heading{display:flex;align-items:center;justify-content:space-between;gap:1.25rem}.eyebrow{color:#9066a5;margin:0 0 0.625rem}h1{font:600 clamp(1.75rem,4.8vw,2.6875rem)/1.07 'Outfit',sans-serif;letter-spacing:-0.09375rem;margin:0 0 1.5625rem}.clock{flex-shrink:0;display:flex;flex-direction:column;justify-content:center;align-items:center;border:0.4375rem solid #f4e9fa;border-top-color:#b173d0;border-radius:50%;width:6.75rem;height:6.75rem;margin-bottom:1.25rem}.clock strong{font:600 2.5rem/1 'Outfit',sans-serif;font-variant-numeric:tabular-nums}.clock span{font-size:0.625rem;letter-spacing:0.0625rem;margin-top:0.3125rem}.clock.urgent{border-color:#ffe0dc;border-top-color:#e65347;color:#c74336}.levelbar{display:flex;justify-content:space-between;align-items:center;gap:0.75rem;font-size:0.875rem}.levelbar>div{display:flex;align-items:center;gap:0.75rem}.level-pill{background:#f7f0fb;color:#9a61b7;font-size:0.75rem;font-weight:800;letter-spacing:.0.5rem;padding:0.5rem 0.625rem;border-radius:0.4375rem}#progress{color:#847989;white-space:nowrap}.instruction{font-size:0.875rem;color:#827788;margin:1.125rem 0}.board-wrap{position:relative}.column-labels{display:flex;justify-content:space-between;color:#a097a4;font-size:0.6875rem;margin-bottom:0.75rem}.board{position:relative;display:flex;justify-content:space-between;padding:0 0 0.5rem;user-select:none}.column{width:42%;display:flex;flex-direction:column;gap:0.75rem;z-index:1}.answers{width:27%}.tile{position:relative;min-height:3.625rem;border:0.125rem solid #efe8f2;background:#fdfafe;border-radius:0.75rem;color:#473352;font:500 clamp(1.0625rem,2.9vw,1.5rem) 'Outfit',sans-serif;touch-action:none;transition:background .15s,border-color .15s}.tile:hover{border-color:#dabde9}.tile::after{content:'';position:absolute;top:calc(50% - 0.3125rem);right:-0.375rem;width:0.625rem;height:0.625rem;border-radius:50%;border:0.125rem solid #d6c5df;background:white}.answers .tile::after{right:auto;left:-0.375rem}.tile.selected{border-color:#ae70cd;background:#f8f1fc}#lines{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;z-index:0}.bottom{display:flex;justify-content:space-between;align-items:center;gap:0.9375rem;padding-top:1rem;font-size:0.8125rem;color:#928997}.text-button{border:0;background:none;color:#786681;font-size:0.8125rem;padding:0.5rem}.overlay{position:absolute;inset:-0.25rem -0.5rem;background:#ffffffdc;backdrop-filter:blur(0.3125rem);z-index:3;display:flex;align-items:center;justify-content:center;border-radius:0.9375rem}.overlay[hidden]{display:none}.overlay-card{text-align:center;max-width:21.875rem;padding:1.5rem}.mini-label{color:#a36ebd;font-size:0.6875rem}h2{font:600 1.875rem/1.1 'Outfit',sans-serif;letter-spacing:-.05rem;margin:0.8125rem 0}.overlay p{font-size:0.9375rem;line-height:1.6;color:#87798e}.primary{background:#a763c9;color:white;border:0;border-radius:0.6875rem;padding:0.875rem 1.375rem;font-weight:600;min-width:11.875rem;box-shadow:0 0.3125rem 0.9375rem #a763c932}.primary span{margin-left:1.5625rem}.primary:hover{background:#9350b4}footer{display:flex;justify-content:space-between;padding:1.375rem 0.3125rem;font-size:0.75rem;color:#94879a}footer span:last-child{letter-spacing:0.0625rem;font-size:0.625rem}@media(max-width:37.5rem){main{padding:1.125rem 0.875rem}.header-note{display:none}header{margin-bottom:1.25rem}.brand{font-size:1.5rem}.game{padding:1.5625rem 1.125rem 0.9375rem;border-radius:1.375rem}.eyebrow{font-size:0.625rem;letter-spacing:0.0625rem}.clock{width:5.125rem;height:5.125rem;border-width:0.3125rem}.clock strong{font-size:1.9375rem}.clock span{font-size:0.5rem}h1{letter-spacing:-0.0625rem}.levelbar>div{gap:0.4375rem}.levelbar strong{font-size:0.75rem}.level-pill{font-size:0.625rem;padding:0.4375rem}.levelbar{font-size:0.75rem}.instruction{font-size:0.75rem;line-height:1.5}.column{width:48%;gap:0.75rem}.answers{width:25%}.tile{min-height:3.5625rem;font-size:1.125rem}.bottom{font-size:0.6875rem;gap:0.3125rem}.text-button{font-size:0.6875rem;white-space:nowrap}footer span:last-child{display:none}.overlay-card{padding:1.25rem}h2{font-size:1.6875rem}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}

.tile{padding:0.5rem 0.625rem;overflow-wrap:normal}.levelbar>div{min-width:0}.levelbar strong{overflow-wrap:anywhere}@media(max-width:23.75rem){main{padding:0.75rem 0.5rem}.game{padding:1.375rem 0.875rem 0.875rem}.levelbar{flex-wrap:wrap}.heading{gap:0.625rem}h1{font-size:1.75rem}.clock{width:4.375rem;height:4.375rem}.column{width:50%}.answers{width:25%}.tile{font-size:1.0625rem;padding:0.5rem 0.375rem}.actions{justify-content:stretch}.actions button{flex:1}.bottom{align-items:flex-start}}

.column .tile{height:4.375rem;line-height:1.25}.answers .tile{height:4.375rem}.tile{font-size:clamp(1rem,2.3vw,1.4375rem)}@media(max-width:37.5rem){.tile{font-size:1.0625rem}.column .tile{height:4.75rem}.answers .tile{height:4.75rem}}

/* Compact play surface; keep the timer visible even when zooming or scrolling. */
@media(max-width:47.5rem),(max-height:40.625rem){
 main{padding:0.5rem max(0.625rem,env(safe-area-inset-right)) max(0.5rem,env(safe-area-inset-bottom)) max(0.625rem,env(safe-area-inset-left));padding-top:max(0.5rem,env(safe-area-inset-top))}
 header{height:2.75rem;margin:0 0 0.375rem;padding-right:5.125rem}.brand{font-size:1.375rem;white-space:nowrap}.logo{font-size:1.5rem;padding:0.125rem 0.5rem;border-radius:0.5625rem}.header-note,footer{display:none}
 .game{padding:0.625rem 0.75rem 0.5rem;border-radius:1rem}.heading{display:contents}.heading>div:first-child{display:none}
 .clock{position:fixed;z-index:10;top:max(0.5rem,env(safe-area-inset-top));right:max(0.75rem,env(safe-area-inset-right));margin:0;width:4.5rem;height:2.75rem;border-radius:0.75rem;border-width:0.1875rem;flex-direction:row;gap:0.25rem;background:white;box-shadow:0 0.125rem 0.5rem #38284012}.clock strong{font-size:1.625rem}.clock span{font-size:0.5625rem;letter-spacing:0;margin:0}
 .levelbar{font-size:0.75rem;flex-wrap:nowrap;gap:0.375rem}.levelbar>div{gap:0.4375rem;flex:1}.levelbar strong{font-size:0.75rem;line-height:1.2}.level-pill{font-size:0.625rem;padding:0.375rem;white-space:nowrap}
 .instruction{font-size:0.75rem;line-height:1.3;margin:0.5rem 0}.column-labels{margin-bottom:0.375rem;font-size:0.625rem}
 .board{padding-bottom:0}.column{width:60%;gap:0.375rem}.answers{width:21%}.column .tile,.answers .tile{height:clamp(3rem,calc((100svh - 15.875rem)/5),4.75rem);min-height:3rem;padding:0.25rem 0.375rem;font-size:1.0625rem;line-height:1.2;border-radius:0.5625rem}
 .actions{margin-top:0.5625rem;gap:0.5rem}.actions button{min-height:2.75rem;flex:1}.secondary{padding:0.625rem 0.75rem;font-size:0.875rem}
 .bottom{padding-top:0.3125rem;gap:0.5rem;align-items:center;font-size:0.6875rem;line-height:1.2}.text-button{font-size:0.6875rem;min-height:2rem;padding:0.3125rem;white-space:nowrap}
 .overlay-card{padding:1rem}.overlay p{margin:0.625rem 0;font-size:0.875rem}.overlay h2{font-size:1.625rem}
}
@media(max-width:22.5rem){.brand{font-size:1.25rem}.column .tile{font-size:1rem}.levelbar strong{font-size:0.6875rem}.levelbar{font-size:0.6875rem}}

/* Countdown effects */
.bomb-icon{display:none!important}.clock.bomb-active .bomb-icon{display:block!important;font-size:1.5625rem;line-height:1;animation:bomb-tick .65s ease-in-out infinite alternate}.clock.bomb-active{border-color:#ffbd67;background:#fff4df}.clock.bomb-active>span:last-child{display:none}.clock.bomb-active{gap:0.0625rem}.round-options{display:flex;align-items:center;justify-content:space-between;gap:0.75rem;margin-top:0.3125rem;color:#807088;font-size:0.75rem}.round-options .text-button{min-height:2rem}.blast{display:none;position:absolute;inset:0;z-index:5;pointer-events:none;align-items:center;justify-content:center;overflow:hidden;border-radius:1rem}.blast.burst{display:flex}.blast strong{font:800 3rem 'Outfit',sans-serif;color:#dc6c16;text-shadow:0 0.125rem white;animation:boom-word .85s ease-out both}.blast-ring{position:absolute;width:4.375rem;height:4.375rem;border:0.75rem solid #ffb234;border-radius:50%;animation:blast-ring .8s ease-out both}.blast i{position:absolute;width:0.5rem;height:1rem;background:#ef9340;border-radius:0.25rem;transform:rotate(var(--angle));animation:blast-spark .8s ease-out both}.blast i:nth-child(even){background:#b475d3}@keyframes bomb-tick{from{transform:rotate(-9deg) scale(.95)}to{transform:rotate(9deg) scale(1.1)}}@keyframes blast-ring{to{transform:scale(7);opacity:0}}@keyframes blast-spark{from{transform:rotate(var(--angle)) translateY(-1.25rem);opacity:1}to{transform:rotate(var(--angle)) translateY(-10.625rem) scale(.4);opacity:0}}@keyframes boom-word{0%{transform:scale(.4);opacity:0}20%{transform:scale(1.08);opacity:1}65%{opacity:1}100%{transform:scale(1.3);opacity:0}}@media(max-width:47.5rem),(max-height:40.625rem){.clock.bomb-active{flex-direction:row;gap:0.25rem}.clock.bomb-active .bomb-icon{font-size:1.375rem}.column .tile,.answers .tile{height:clamp(3rem,calc((100svh - 17.9375rem)/5),4.75rem)}.round-options{margin:0;font-size:0.6875rem}}@media(prefers-reduced-motion:reduce){.bomb-icon,.blast *{animation:none!important}.blast.burst{display:none}}

.attempt-history{margin:0.625rem 0 0.75rem}.attempt-history-heading{display:flex;justify-content:space-between;margin-bottom:0.375rem;color:#958a9b;font-size:0.625rem;font-weight:700;letter-spacing:0.0625rem}.attempt-bar{display:grid;grid-template-columns:repeat(5,1fr);gap:0.3125rem;height:0.5625rem}.attempt-segment{border-radius:0.3125rem;background:#efebf1;border:0.0625rem solid #e5e0e8}.attempt-segment.fast{background:#86bd99;border-color:#78ad8b}.attempt-segment.correct{background:#bce8c8;border-color:#a8daba}.attempt-segment.missed{background:#f8dada;border-color:#efc1c1}.attempt-legend{display:flex;flex-wrap:wrap;gap:0.625rem;margin-top:0.375rem;color:#958a9b;font-size:0.625rem}.attempt-legend span{display:flex;align-items:center;gap:0.25rem}.attempt-legend i{display:inline-block;width:0.5rem;height:0.5rem;border-radius:0.1875rem}.legend-fast{background:#86bd99}.legend-correct{background:#bce8c8}.legend-missed{background:#f8dada}.level-choice-label{display:block;margin:1rem 0 0.375rem;font-size:0.8125rem;font-weight:700;color:#776281}.level-choice{width:100%;border:0.0625rem solid #e6ddeb;border-radius:0.625rem;padding:0.6875rem 0.75rem;background:white;color:#473352;font:500 0.9375rem 'DM Sans',sans-serif}.level-choice-status{margin:0.5rem 0 0.875rem!important;font-size:0.75rem!important}.primary:disabled{opacity:.45;cursor:not-allowed;box-shadow:none}
@media(max-width:37.5rem){.attempt-history{margin:0.5rem 0}.attempt-history-heading{font-size:0.5625rem}.attempt-bar{height:0.5rem;gap:0.25rem}.level-choice-label{margin-top:0.625rem}}
@media(max-width:47.5rem),(max-height:40.625rem){.column .tile,.answers .tile{height:clamp(3rem,calc((100svh - 20.4375rem)/5),4.75rem)}}

.saved-histories{margin-top:1.25rem;border-top:0.0625rem solid #efebf1;padding-top:0.875rem}.saved-histories[hidden]{display:none}.saved-histories h3{font-size:0.875rem;margin:0 0 0.75rem;color:#776281}.history-row{display:grid;grid-template-columns:4.0625rem 1fr;align-items:center;gap:0.75rem;margin:0.75rem 0;font-size:0.8125rem;color:#776281}.history-row .attempt-bar{height:0.75rem}.overlay.celebrating .level-choice-label,.overlay.celebrating .level-choice,.overlay.celebrating .level-choice-status,.overlay.celebrating #start{display:none}.overlay.celebrating h2{color:#287244;font-size:2.375rem}

#backToLevels{margin-right:auto}

#backToLevels{background:#fff2b3;border-color:#e5cf73;color:#66521b}#backToLevels:hover:not(:disabled){background:#ffe996}.game-tabs{display:flex;gap:0.5rem;margin-bottom:1rem;flex-wrap:wrap}.game-tabs button{background:#fff;border:0.0625rem solid #e6ddeb;border-radius:0.75rem;padding:0.75rem 1.125rem;color:#776281;font-weight:600}.game-tabs button[aria-pressed="true"]{background:#a763c9;color:#fff;border-color:#a763c9}.history-detail{min-width:0}.fastest-time{display:block;margin-bottom:0.375rem;font-size:0.75rem;color:#776281}@media(max-width:37.5rem){.game-tabs{gap:0.375rem;margin-bottom:0.625rem}.game-tabs button{flex:1;padding:0.625rem 0.4375rem;font-size:0.75rem}}

#tab-multiplication{background:#eee3f7;border-color:#cbb2df;color:#65417e}#tab-multiplication[aria-pressed="true"]{background:#8056a1;border-color:#8056a1;color:white}#tab-division{background:#eee3f7;border-color:#cbb2df;color:#65417e}#tab-division[aria-pressed="true"]{background:#8056a1;border-color:#8056a1;color:white}.game-tabs button[aria-pressed="true"]{box-shadow:0 0.1875rem 0 #38284025}

.history-row{grid-template-columns:6.875rem 1fr}@media(max-width:37.5rem){.history-row{grid-template-columns:5.625rem 1fr}}

.attempt-segment.very-fast{background:#73aa86;border-color:#659a78}.legend-very-fast{background:#73aa86}.attempt-segment.fast{background:#a0cfaf;border-color:#90bf9f}.legend-fast{background:#a0cfaf}.attempt-segment.correct{background:#d2ebda;border-color:#bedbc7}.legend-correct{background:#d2ebda}
/* Order of Operations: preserve the Calculation Connect play surface. */
.site-logo{display:block;width:21.25rem;max-width:65%;height:auto}header{margin-bottom:1.125rem}.game-title{display:flex;flex-wrap:wrap;align-items:baseline;gap:0.3125rem 0.75rem;margin-bottom:1.0625rem;font:600 1.8125rem/1.15 'Outfit',Arial,sans-serif;letter-spacing:-.05rem;color:#382840}.game-title span:last-child{color:#a661c8;font-size:1.5rem}.rules-strip{display:flex;align-items:center;flex-wrap:wrap;gap:0.5rem 0.75rem;margin:0 0 1.125rem;color:#7f7087;font-size:0.75rem}.rules-strip b{color:#a661c8}.rules-strip i{font-style:normal;color:#b6a7be}.rule-note{margin-left:auto;font-size:0.6875rem}.board-wrap:has(.overlay:not([hidden])){min-height:33.4375rem}.overlay-card{max-width:31.875rem;width:100%;padding:1.125rem 1.5rem}.overlay-card h2{margin:0.5rem 0}.overlay p{font-size:0.8125rem;line-height:1.45;margin:0.5rem 0}.level-choice-label{margin:0.75rem 0 0.375rem}.level-choice-status{min-height:2.25rem;margin-bottom:0.5rem!important;color:#6f5a7a!important}.table-picker{border:0;border-top:0.0625rem solid #eee5f2;padding:0.75rem 0 0;margin:0.5rem 0 1rem}.table-picker legend{float:left;width:100%;font-size:0.8125rem;font-weight:700;color:#776281;margin-bottom:0.5rem}.table-grid{display:grid;grid-template-columns:repeat(11,1fr);gap:0.3125rem;clear:both}.table-chip{position:relative;display:block;cursor:pointer}.table-chip input{position:absolute;inset:0;opacity:0;margin:0;width:100%;height:100%;cursor:pointer}.table-chip span{display:flex;align-items:center;justify-content:center;border:0.0625rem solid #e1d5e7;border-radius:0.5rem;min-height:2.25rem;color:#7f7086;background:white;font-size:0.8125rem;font-weight:700}.table-chip input:checked+span{background:#f6edfb;border-color:#ae70cd;color:#8b50a8;box-shadow:inset 0 -0.125rem #ae70cd}.table-chip input:focus-visible+span{outline:0.1875rem solid #ea9e21;outline-offset:0.125rem}.table-presets{display:flex;justify-content:center;gap:0.75rem;clear:both;margin-bottom:0.5625rem}.table-presets button{border:0;background:none;text-decoration:underline;text-underline-offset:0.1875rem;color:#8c63a0;font-size:0.6875rem;padding:0.25rem 0}.table-picker #tableStatus{margin:0.4375rem 0 0;font-size:0.6875rem;min-height:1rem}.primary:disabled{cursor:not-allowed}.worked-answers{margin-top:1rem;border-top:0.0625rem solid #eee5f2;padding-top:1rem;color:#776281;font-size:0.875rem}.worked-answers[hidden]{display:none}.worked-answers summary{cursor:pointer;font-weight:600}.solution{border-bottom:0.0625rem solid #efebf1;padding:0.75rem 0}.solution strong{color:#473352;font-size:1.0625rem;font-family:'Outfit',Arial,sans-serif}.solution p{margin:0.4375rem 0;font-size:0.8125rem;line-height:1.6}.solution-result{display:block;font-size:0.6875rem;margin-top:0.25rem}.history-row{grid-template-columns:8.75rem 1fr}.column{width:55%}.answers{width:25%}.tile{font-variant-numeric:tabular-nums;white-space:normal}.overlay.celebrating .table-picker{display:none}.overlay.celebrating{backdrop-filter:blur(0.1875rem)}
@media(max-width:47.5rem),(max-height:40.625rem){header{height:auto;min-height:2.8125rem;padding-right:5rem;margin-bottom:0.625rem}.site-logo{width:17.8125rem;max-width:100%}.game-title{font-size:1.4375rem;gap:0.1875rem 0.5625rem;margin-bottom:0.625rem}.game-title span:last-child{font-size:1.25rem}.rules-strip{gap:0.3125rem 0.5rem;font-size:0.625rem;margin-bottom:0.625rem}.rule-note{display:none}.column{width:62%}.answers{width:22%}.column .tile{font-size:clamp(0.875rem,3.2vw,1.125rem);padding:0.25rem 0.5rem}.board-wrap:has(.overlay:not([hidden])){min-height:31.875rem}.overlay{inset:0}.overlay-card{padding:0.9375rem 0.75rem}.overlay-card h2{font-size:1.5625rem}.overlay p{font-size:0.75rem}.table-grid{grid-template-columns:repeat(6,1fr);gap:0.3125rem}.table-chip span{min-height:2.1875rem}.table-picker{padding-top:0.625rem;margin-bottom:0.75rem}.level-choice-status{font-size:0.6875rem!important;min-height:2.625rem}.clock{top:0.625rem}.history-row{grid-template-columns:7.1875rem 1fr}.primary{min-height:2.75rem}.table-presets{gap:0.875rem}.levelbar strong{font-size:0.6875rem}}
@media(max-width:23.75rem){.site-logo{width:14.375rem}.game-title{font-size:1.3125rem}.game-title span:last-child{font-size:1.125rem}.column .tile{font-size:0.8125rem}.game{padding:0.625rem}.rules-strip{font-size:0.5625rem;gap:0.25rem 0.375rem}}

/* Centred title, side column and flat table selectors. */
main{max-width:77.5rem;padding:1.5rem 1.875rem}header{display:grid;grid-template-columns:1fr auto 1fr;gap:1rem;align-items:center;margin-bottom:1.25rem}.site-logo{width:16.25rem;max-width:100%;justify-self:start}.game-title{display:flex;flex-direction:column;align-items:center;text-align:center;gap:0.1875rem;margin:0;font-size:1.8125rem;letter-spacing:-.0.375rem}.game-title span:last-child{font-size:1.5rem}header .clock{position:static;justify-self:end;margin:0;width:6.25rem;height:6.25rem;border-radius:50%;flex-direction:column;background:white}.game-layout{display:grid;grid-template-columns:minmax(0,1fr) 10.75rem;gap:1.25rem;align-items:start}.game{min-width:0;padding:1.75rem 2rem 1.25rem}.heading h1{font-size:2.25rem;margin-bottom:1.375rem}.rules-strip{justify-content:center;margin-bottom:1.25rem}.rule-note{margin-left:0}.table-sidebar{background:#fff;border:0.0625rem solid #ebe4ef;border-radius:1rem;padding:1.125rem 0.9375rem;position:sticky;top:1rem}.table-sidebar h2{font-size:1.375rem;margin:0 0 0.4375rem}.sidebar-intro,.sidebar-help{color:#87798e;font-size:0.6875rem;line-height:1.5;margin:0 0 0.875rem}.sidebar-help{margin:0.75rem 0 0}.table-picker{margin:0;padding:0;border:0;min-width:0}.table-picker legend{float:none;font-size:0.6875rem;width:auto;margin-bottom:0.5625rem}.table-grid{display:flex;flex-direction:column;gap:0}.table-chip{display:flex;align-items:center;gap:0.5rem;min-height:2.1875rem;padding:0.25rem 0;cursor:pointer}.table-chip input{position:static;opacity:1;inset:auto;width:1.0625rem;height:1.0625rem;margin:0;accent-color:#a661c8;flex:0 0 auto}.table-chip span,.table-chip input:checked+span{display:block;border:0;box-shadow:none!important;background:transparent!important;padding:0;min-height:0;color:#63506d;font-size:0.75rem;font-weight:500;border-radius:0}.table-chip input:focus-visible+span{outline:none}.table-chip:has(input:focus-visible){outline:0.125rem solid #ea9e21;outline-offset:0.125rem}.table-presets{display:flex;flex-direction:column;gap:0.125rem;margin:0 0 0.5rem;align-items:flex-start}.table-presets button{font-size:0.625rem;text-align:left;min-height:1.625rem;padding:0.1875rem 0}.table-picker:disabled{opacity:.6}.table-picker #tableStatus{font-size:0.625rem;margin:0.5625rem 0 0;line-height:1.4}.overlay-card{max-width:35.625rem;padding:1.25rem 1.875rem}.level-choice-status{font-size:0.8125rem!important;line-height:1.65!important;margin:0.875rem 0 1.25rem!important;min-height:4.375rem}.board-wrap:has(.overlay:not([hidden])){min-height:26.25rem}.level-guide{margin-top:1.25rem;border-top:0.0625rem solid #efebf1;padding-top:1rem;color:#776281;font-size:0.8125rem}.level-guide summary{cursor:pointer;font-weight:600}.level-guide ol{padding-left:1.4375rem;margin:0.9375rem 0}.level-guide li{padding:0.4375rem 0 0.8125rem 0.3125rem}.level-guide strong{color:#574062;font-size:0.9375rem}.level-guide p{line-height:1.6;margin:0.375rem 0}.level-guide li>span{font-size:0.75rem;color:#8e5aa8}.history-row{grid-template-columns:10rem 1fr}
@media(max-width:56.25rem){main{padding:1rem}.site-logo{width:14.0625rem}.game-title{font-size:1.5625rem}.game-title span:last-child{font-size:1.25rem}header{grid-template-columns:1fr auto 1fr;gap:0.625rem}.game-layout{grid-template-columns:minmax(0,1fr) 9.0625rem;gap:0.75rem}.table-sidebar{padding:1rem 0.75rem}.game{padding:1.25rem}.heading h1{font-size:1.875rem}}
@media(max-width:40.625rem){main{padding:0.75rem 0.5625rem}header{grid-template-columns:minmax(0,1fr) 4.625rem;gap:0.625rem;margin-bottom:0.75rem;padding:0;min-height:0}.site-logo{width:15.3125rem;max-width:100%}.game-title{grid-column:1/-1;grid-row:2;font-size:1.5625rem;margin-top:0.1875rem}.game-title span:last-child{font-size:1.3125rem}header .clock{grid-column:2;grid-row:1;width:4.375rem;height:3rem;border-radius:0.75rem;border-width:0.1875rem;flex-direction:row;gap:0.1875rem}header .clock strong{font-size:1.6875rem}header .clock span:last-child{font-size:0.5rem;letter-spacing:0;margin:0}.game-layout{grid-template-columns:minmax(0,1fr) 6.4375rem;gap:0.5rem}.table-sidebar{padding:0.75rem 0.5rem;border-radius:0.75rem;top:0.5rem}.table-sidebar h2{font-size:1.0625rem}.sidebar-intro,.sidebar-help{font-size:0.625rem}.table-picker legend{font-size:0.625rem}.table-chip{gap:0.3125rem;min-height:2.1875rem}.table-chip input{width:0.9375rem;height:0.9375rem}.table-chip span,.table-chip input:checked+span{font-size:0.625rem}.game{padding:0.8125rem 0.625rem}.heading>div:first-child{display:none}.column-labels{font-size:0.5rem;letter-spacing:.0.4375rem}.column{width:65%;gap:0.5rem}.answers{width:23%}.column .tile,.answers .tile{min-height:4rem;height:auto;font-size:0.8125rem;line-height:1.35;padding:0.375rem 0.3125rem}.answers .tile{font-size:1.0625rem}.levelbar{flex-wrap:wrap;gap:0.375rem}.levelbar>div{flex-wrap:wrap}.levelbar strong{font-size:0.6875rem}.instruction{font-size:0.6875rem;line-height:1.5}.rules-strip{font-size:0.5625rem;gap:0.25rem 0.4375rem;margin-bottom:0.75rem}.rule-note{display:none}.overlay-card{padding:0.75rem 0.4375rem}.overlay-card h2{font-size:1.4375rem}.overlay p{font-size:0.6875rem}.level-choice{font-size:0.75rem;padding:0.625rem 0.375rem}.level-choice-status{font-size:0.6875rem!important;line-height:1.55!important;margin:0.625rem 0 1rem!important;min-height:7.5rem}.board-wrap:has(.overlay:not([hidden])){min-height:30rem}.primary{min-width:0;width:100%;padding:0.75rem 0.5rem;font-size:0.8125rem}.actions{flex-direction:column;gap:0.375rem}.actions button{width:100%;font-size:0.6875rem;min-height:2.5rem;padding:0.5rem}.round-options{flex-wrap:wrap;font-size:0.625rem;gap:0.125rem}.text-button{font-size:0.625rem}.history-row{grid-template-columns:1fr;gap:0.3125rem}.level-guide{font-size:0.6875rem}.level-guide strong{font-size:0.8125rem}.level-guide ol{padding-left:1.0625rem}.level-guide li>span{font-size:0.625rem}.solution strong{font-size:0.875rem}.solution p{font-size:0.6875rem}.bottom{font-size:0.625rem}.sidebar-help{line-height:1.5}}
@media(max-width:23.125rem){.game-layout{grid-template-columns:minmax(0,1fr) 5.5625rem;gap:0.375rem}.table-sidebar{padding:0.625rem 0.375rem}.table-chip span,.table-chip input:checked+span{font-size:0.5625rem}.game-title{font-size:1.4375rem}.game-title span:last-child{font-size:1.1875rem}.column .tile{font-size:0.75rem}.level-choice-status{font-size:0.625rem!important}.board-wrap:has(.overlay:not([hidden])){min-height:31.875rem}}

/* Flat, clearly highlighted starting table choices. */
.table-chip{border-left:0.1875rem solid transparent;padding-left:0.3125rem;border-radius:0.25rem}.table-chip:has(input:checked){background:#f6edfb;border-left-color:#a661c8}.table-chip input:checked+span{color:#864ba3;font-weight:700}#levelChoiceStatus{display:none!important}.board-wrap:has(.overlay:not([hidden])){min-height:21.875rem}.overlay-card{padding:1.25rem 1.5rem}.overlay-card .level-choice{margin-bottom:1.25rem}@media(max-width:40.625rem){.board-wrap:has(.overlay:not([hidden])){min-height:21.875rem}.overlay-card{padding:0.9375rem 0.5rem}.table-chip{padding-left:0.1875rem}.table-sidebar{padding-left:0.375rem;padding-right:0.375rem}.table-chip input{width:0.875rem;height:0.875rem}.table-chip span,.table-chip input:checked+span{font-size:0.625rem}}@media(max-width:23.125rem){.table-chip span,.table-chip input:checked+span{font-size:0.5625rem}}

.hint-row{display:flex;justify-content:flex-end;margin:-0.3125rem 0 0.875rem;position:relative;z-index:12}.bidmas-hint summary{list-style:none;cursor:pointer;display:inline-block;background:#fff;border:0.0625rem solid #dcc8e6;color:#8e5aa8;padding:0.4375rem 0.9375rem;border-radius:0.5rem;font-size:0.8125rem;font-weight:700}.bidmas-hint summary::-webkit-details-marker{display:none}.bidmas-hint summary:focus-visible{outline:0.1875rem solid #ea9e21;outline-offset:0.1875rem}.hint-content{position:absolute;right:0;top:2.625rem;width:min(27.5rem,calc(100vw - 2rem));padding:1.25rem 1.4375rem;border:0.0625rem solid #ece1f2;background:#fff;border-radius:0.875rem;box-shadow:0 0.75rem 2.1875rem #38284026;font-size:0.8125rem;line-height:1.6;color:#776281}.hint-content h2{font-size:1.375rem;margin:0 0 0.75rem}.hint-content ol{padding-left:1.25rem}.hint-content li{margin:0.5rem 0}.hint-content p{margin:0.5rem 0}.hint-content .hint-timer-note{font-size:0.6875rem;color:#928997}.learning-tip{background:#fff8dc;border-left:0.1875rem solid #d3ac35;padding:0.6875rem 0.8125rem;border-radius:0.3125rem;font-size:0.8125rem;line-height:1.6;color:#66521b;margin:0.75rem 0}.learning-tip[hidden]{display:none}.table-presets button{font-size:0.75rem;min-height:2rem}.table-presets{margin-bottom:0.5rem}@media(max-width:40.625rem){.hint-row{margin:0 0 0.625rem}.hint-content{font-size:0.75rem;padding:1rem}.learning-tip{font-size:0.6875rem;padding:0.5625rem}.table-presets button{font-size:0.625rem}.hint-content h2{font-size:1.25rem}}

/* Lilac palette and a game title aligned to the play button. */
:root{color:#30444a;background:#f6f1fa;--accent:#805b9c}body{background:linear-gradient(135deg,#f7f2fb,#f1f6f4);min-width:16rem}header{display:flex;justify-content:space-between;align-items:center;gap:1.25rem;padding:0;height:auto;min-height:0}header .clock{position:static;flex-shrink:0}.site-logo{width:16.25rem;max-width:70%;height:auto}.game{background:#fffefd;border:0.0625rem solid #e1d6eb;box-shadow:0 0.75rem 3rem #58416708}.game-title{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;width:100%;margin:0 0 1.5rem;gap:0.1875rem;font:600 1.875rem/1.15 'Outfit',Arial,sans-serif;letter-spacing:-.05rem;color:#30444a}.game-title span:last-child{font-size:1.5rem;color:#805b9c}.primary{background:#e0cdeb;border:0.0625rem solid #bea4d1;color:#573b6a;box-shadow:none;min-height:2.75rem}.primary:hover{background:#d3b8e3}.secondary{min-height:2.75rem}.level-pill{background:#e9dff3;color:#75518f;border:0.0625rem solid #dac8e8}.tile{border-color:#e0d4eb;background:#faf7fd;color:#493651}.tile:hover{border-color:#bd9cd2}.tile.selected,.tile.linked{border-color:#a582bf;background:#ece1f5;color:#65417d}.tile.linked::after{background:#a282bd;border-color:#a282bd}.tile::after{border-color:#c6b0d8}.table-sidebar{background:#f1eaf8;border-color:#d8c8e4}.table-sidebar h2{color:#5d466c}.table-chip{min-height:2.75rem}.table-chip input{accent-color:#805b9c}.table-chip:has(input:checked){background:#e1d2ee;border-left-color:#9973b5}.table-chip input:checked+span{color:#5c3975}.table-presets button{min-height:2.75rem;color:#75518f}.bidmas-hint summary{min-height:2.75rem;background:#e7daf2;border-color:#bea4d1;color:#634879}.hint-content{background:#fffefd;border-color:#d8c8e4}.clock{border-color:#eadff2;border-top-color:#916cad}.clock.urgent{border-color:#f8dece;border-top-color:#d48a5c}.level-choice{border-color:#cdbbdd;background:#fffefd;font-size:1rem;min-height:2.75rem}.overlay{background:#fffefde6}.overlay-card{max-width:35.625rem}.text-button{min-height:2.75rem;color:#77598d}footer{display:flex!important;justify-content:flex-start;padding:0.5rem 0.25rem 0.75rem;margin-top:0.75rem}.copyright{display:block;text-align:left;font-size:0.6875rem;line-height:1.6;color:#7b6c84}
@media(max-width:56.25rem){.game-title{font-size:1.75rem}.game-title span:last-child{font-size:1.375rem}.site-logo{width:14.375rem}}
@media(max-width:40.625rem){main{padding:0.625rem}.game-layout{grid-template-columns:minmax(0,1fr) 6.25rem;gap:0.5rem}.game{padding:0.875rem 0.625rem}.site-logo{width:15.3125rem;max-width:70%}.game-title{font-size:1.4375rem;margin-bottom:1.125rem}.game-title span:last-child{font-size:1.125rem}header .clock{width:4.5rem;height:3rem;border-radius:0.75rem;flex-direction:row;gap:0.25rem;border-width:0.1875rem}header .clock strong{font-size:1.75rem}header .clock span:last-child{font-size:0.5rem;letter-spacing:0;margin:0}.table-sidebar{padding:0.75rem 0.375rem}.table-sidebar h2{font-size:1.0625rem}.sidebar-intro{font-size:0.6875rem}.table-chip{min-height:2.75rem;gap:0.3125rem;padding-left:0.1875rem}.table-chip input{width:0.9375rem;height:0.9375rem}.table-chip span,.table-chip input:checked+span{font-size:0.6875rem;line-height:1.35}.column{width:61%;gap:0.5rem}.answers{width:24%}.column .tile,.answers .tile{height:4rem;min-height:4rem;padding:0.375rem 0.3125rem;font-size:0.875rem;line-height:1.35}.answers .tile{font-size:1.0625rem}.overlay-card{padding:0.9375rem 0.375rem}.level-choice{font-size:1rem}.primary{font-size:0.875rem}.column-labels{font-size:0.5625rem;letter-spacing:.025rem}.instruction{font-size:0.75rem}.table-presets button{font-size:0.6875rem}.hint-content{max-height:calc(100svh - 6rem);overflow-y:auto;font-size:0.8125rem}footer{display:flex!important}}
@media(max-width:22.5rem){.game-layout{grid-template-columns:minmax(0,1fr) 5.5rem;gap:0.375rem}.game{padding:0.75rem 0.5rem}.table-chip span,.table-chip input:checked+span{font-size:0.625rem}.game-title{font-size:1.3125rem}.game-title span:last-child{font-size:1rem}.column .tile{font-size:0.8125rem}.site-logo{max-width:68%}}
@media(max-width:18rem){.game-layout{grid-template-columns:minmax(0,1fr)}.table-sidebar{position:static}.table-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.game-title{font-size:1.5rem}.game-title span:last-child{font-size:1.125rem}.column .tile{font-size:1rem}}

/* A compact, wrapping row of controls, with help content behind each button. */
.top-controls{position:relative;display:flex;align-items:stretch;flex-wrap:wrap;gap:.5rem;margin:.75rem 0 1.25rem;padding-bottom:1rem;border-bottom:1px solid #ded3e8;z-index:12}.top-controls details{position:static}.top-controls summary,.top-controls>button{display:inline-flex;align-items:center;justify-content:center;list-style:none;min-height:2.75rem;margin:0;padding:.625rem 1rem;border:1px solid #c6aed8;border-radius:.75rem;background:#e8ddf2;color:#5b406e;font:600 .875rem/1.25 'DM Sans',Arial,sans-serif;cursor:pointer}.top-controls summary::-webkit-details-marker{display:none}.top-controls details[open]>summary,.top-controls>button[aria-pressed=true]{background:#dac5e9;border-color:#a786be}.top-controls>button[aria-pressed=false]{background:#f5eff9}.control-panel{position:absolute;left:0;top:calc(100% - .5rem);width:min(36rem,100%);max-height:70svh;overflow:auto;padding:1.25rem 1.5rem;background:#fffefd;border:1px solid #d6c5e3;border-radius:1rem;box-shadow:0 .75rem 2rem #533a631f;font-size:.875rem;line-height:1.6;color:#6e6177}.control-panel h2{font-size:1.5rem;margin:0 0 .75rem}.control-panel ol,.control-panel ul{padding-left:1.375rem;margin:.5rem 0}.control-panel li{margin:.625rem 0}.control-panel p{margin:.75rem 0}.rule-example{display:inline-block;color:#715187;font-weight:600;background:#f2eaf8;border-radius:.25rem;padding:.125rem .375rem;margin:.25rem 0 .125rem .25rem}.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.clock strong:has(+span){font-variant-numeric:tabular-nums}.board-wrap{margin-top:1rem}@media(max-width:40.625rem){.top-controls{gap:.375rem;margin:.5rem 0 1rem;padding-bottom:.75rem}.top-controls summary,.top-controls>button{padding:.5rem .625rem;font-size:.75rem;flex:1 0 auto}.top-controls details{flex:1 0 auto}.top-controls summary{width:100%}.control-panel{font-size:.8125rem;padding:1rem}.control-panel h2{font-size:1.25rem}.rule-example{margin-left:0}.game-title{margin-bottom:1rem}}

/* Header controls align from the right; selected tables have no side stripe. */
header{align-items:flex-start;gap:1rem;flex-wrap:wrap}.site-logo{flex:0 1 16.25rem;max-width:100%}.top-controls{flex:1 1 auto;justify-content:flex-end;align-items:stretch;margin:0;padding:0;border:0;gap:.375rem}.top-controls summary,.top-controls>button{font-size:.8125rem;padding:.625rem .75rem;white-space:nowrap}.top-controls #fullscreen{width:2.75rem;min-width:2.75rem;padding:.5rem}.top-controls #fullscreen svg{display:block;width:1.375rem;height:1.375rem}.control-panel{left:auto;right:0;top:calc(100% + .5rem);width:min(36rem,calc(100vw - 2rem))}.table-chip,.table-chip:has(input:checked){border-left:0!important;padding-left:.375rem}.table-chip:has(input:checked){background:#e1d2ee}.round-heading{position:relative}.round-heading>.clock{float:right;margin:0 0 .75rem 1rem;width:4.5rem;height:3rem;border-radius:.75rem;border-width:3px;flex-direction:row;gap:.25rem}.round-heading>.clock strong{font-size:1.75rem}.round-heading>.clock span:last-child{font-size:.5rem;margin:0;letter-spacing:0}.round-heading>.clock[hidden]{display:none!important}.round-heading .levelbar{min-height:3rem}.round-heading::after{content:'';display:block;clear:both}html:fullscreen{overflow:auto;background:#f7f2fb}html:-webkit-full-screen{overflow:auto;background:#f7f2fb}
@media(min-width:68rem){header{flex-wrap:nowrap}.top-controls{flex-wrap:nowrap}.site-logo{width:14rem;flex-basis:14rem}}
@media(max-width:40.625rem){header{gap:.75rem}.site-logo{width:15rem;max-width:100%}.top-controls{flex-basis:100%;justify-content:flex-end}.top-controls details{flex:0 1 auto}.top-controls>button{flex:0 1 auto}.top-controls summary,.top-controls>button{font-size:.75rem;padding:.5rem .625rem}.control-panel{width:min(36rem,calc(100vw - 1.25rem))}.round-heading>.clock{float:none;margin:0 0 .5rem auto}.round-heading .levelbar{min-height:0}.table-chip{padding-left:.1875rem}}

.selection-help{font-size:.75rem;line-height:1.5;color:#775079;margin:.75rem 0 0}.selection-help[hidden]{display:none!important}

.table-presets button:disabled{opacity:.5;cursor:default;text-decoration:none}

.sidebar-intro{font-size:.875rem!important;line-height:1.55!important;font-weight:600;color:#654875}.sidebar-intro.reminder-flash{animation:table-reminder-flash .6s ease-in-out 3}@keyframes table-reminder-flash{0%,100%{background:transparent;color:#654875}50%{background:#e0c5ee;color:#3e2154;box-shadow:0 0 0 .3rem #e0c5ee;border-radius:.2rem}}@media(prefers-reduced-motion:reduce){.sidebar-intro.reminder-flash{animation:none;background:#e0c5ee;outline:2px solid #9b75b5}}

/* Allow the growing toolbar to wrap at laptop and tablet widths. */
header{display:flex;flex-wrap:wrap;align-items:flex-start;min-width:0}.site-logo{flex:0 1 13rem;width:13rem;min-width:0;max-width:100%;height:auto}.top-controls{flex:1 1 38rem;flex-wrap:wrap;min-width:0;justify-content:flex-end}.top-controls details,.top-controls>button{flex:0 1 auto}.top-controls summary,.top-controls>button{white-space:normal;min-height:2.75rem;text-align:center}.control-panel{max-width:calc(100vw - 2rem);overflow-wrap:anywhere}.game-layout,.game,.table-sidebar,.levelbar>div{min-width:0}.level-choice{max-width:100%}.game-title{overflow-wrap:anywhere}.game-title span{max-width:100%}.table-chip{min-height:2.75rem}.tile{min-width:0}.reset-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.75rem;margin-top:1.25rem}#resetScoresDialog{width:min(30rem,calc(100vw - 2rem));max-height:85svh;overflow:auto;border:1px solid #c9b1da;border-radius:1rem;padding:1.5rem;color:#53415e;background:#fffefd;box-shadow:0 1rem 3rem #49315130}#resetScoresDialog::backdrop{background:#30213c77}#resetScoresDialog h2{font-size:1.5rem;margin:0 0 .875rem}#resetScoresDialog p{line-height:1.6;font-size:.9375rem}#resetScoresDialog button{min-height:2.75rem;border:1px solid #c6aed8;border-radius:.625rem;padding:.625rem 1rem;color:#5b406e;background:#f3edf8;font:600 .875rem 'DM Sans',Arial,sans-serif}#resetScoresDialog #confirmReset{background:#e0cdeb}
@media(max-width:56.25rem){.top-controls{flex-basis:100%}.site-logo{width:15rem;flex-basis:15rem}.top-controls summary,.top-controls>button{font-size:.8125rem}}
@media(max-width:40.625rem){.top-controls{flex-basis:100%;gap:.375rem}.top-controls summary,.top-controls>button{font-size:.75rem;padding:.5rem .625rem}.control-panel{max-width:calc(100vw - 1.25rem)}.reset-actions{flex-direction:column}.reset-actions button{width:100%}}

.game-intro{text-align:center;font-size:.9rem;color:var(--muted,#625a6d);margin:-.5rem 0 1rem}
