@font-face{font-family:Nunito;src:url('./assets/nunito-latin.woff2') format('woff2');font-weight:200 1000;font-display:swap}
:root{--paper:#f4ebd9;--ink:#574335;--muted:#826c57;--sage:#637c5b;--cream:#fff9eb;--touch:48px;--gap:14px;--pad:22px;font-family:Nunito,sans-serif;color:var(--ink);font-synthesis:none;font-feature-settings:'kern' 1;font-size:16px;line-height:1.4}
*{box-sizing:border-box}html,body{height:100%;overflow:hidden}body{margin:0;background:var(--paper);background-image:radial-gradient(#a3896220 .8px,transparent .8px);background-size:8px 8px}button,input{font:inherit;color:inherit}button{min-height:var(--touch);cursor:pointer;border:1px solid #bfaa86;border-radius:12px;background-image:url('./assets/control-frame.svg'),linear-gradient(#fffbee,#f1e2c7);background-size:100% 100%;box-shadow:0 4px #bca380,inset 0 2px #fff9;transition:transform .13s,filter .13s;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:8px 16px;font-weight:800;touch-action:manipulation}button:active{transform:translateY(3px);box-shadow:0 1px #bca380}button:disabled{opacity:.5;cursor:default}button:focus-visible,input:focus-visible,a:focus-visible{outline:3px solid #698261;outline-offset:2px}@media(hover:hover){button:not(:disabled):hover{filter:brightness(1.04);transform:translateY(-1px)}}button.primary{background-image:url('./assets/control-frame.svg'),linear-gradient(#8caa7d,#728e63);color:white;border-color:#526f46;box-shadow:0 4px #48603e,inset 0 2px #ffffff4d}button.selected{background-image:url('./assets/control-frame.svg'),linear-gradient(#e0e7d1,#cbd8b9);border-color:#84956c;box-shadow:0 4px #8c9a71}.icon-button{width:var(--touch);padding:10px;flex-shrink:0}.icon-button svg,button>svg{width:23px;height:23px;flex-shrink:0}
.shell{max-width:1180px;height:100dvh;margin:auto;padding:max(16px,env(safe-area-inset-top)) max(22px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(22px,env(safe-area-inset-left));display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:var(--gap)}header,footer,.row,.header-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}.brand{display:flex;gap:10px;align-items:center;color:inherit;text-decoration:none;font-size:19px;font-weight:900;line-height:1.1}.brand svg{width:44px;height:44px}.brand small{display:block;font-size:10px;letter-spacing:.13em;margin-top:6px}.connection,footer{font-size:13px;color:var(--muted)}footer{border-top:1px solid #d5bfa077;padding-top:8px;height:42px}footer div{display:flex;align-items:center;gap:12px}footer button{font-size:12px;min-height:44px;padding:4px 12px}main{min-height:0;min-width:0;overflow:hidden;display:grid;grid-template-columns:minmax(0,1fr)}h1{font-size:clamp(32px,4.5vw,58px);line-height:1.08;letter-spacing:-.035em;margin:12px 0}h1 em{font-style:normal;color:var(--sage)}h2{font-size:26px;line-height:1.15;margin:0 0 12px}p{margin:8px 0 12px;max-width:55ch}.eyebrow{text-transform:uppercase;letter-spacing:.08em;color:var(--sage);font-size:12px;font-weight:900}.subtle{font-size:13px;color:var(--muted)}.club-card{background:var(--cream);border:2px solid #cbb48f;outline:1px solid #fffc;outline-offset:-7px;border-radius:22px;padding:var(--pad);box-shadow:0 5px #dbc8a9;position:relative;min-height:0;min-width:0}.club-card:before,.club-card:after{content:'';width:5px;height:5px;background:#bda17c;border-radius:50%;position:absolute;top:12px}.club-card:before{left:12px}.club-card:after{right:12px}
.home{height:100%;min-height:0;display:grid;grid-template-columns:.9fr 1.3fr;align-items:center;gap:32px;padding:8px 4px}.welcome{text-align:center;min-height:0}.mascots{width:100%;max-width:390px;max-height:30dvh;aspect-ratio:3/2;object-fit:contain;display:block;margin:auto}.special-modes{display:flex;justify-content:center;gap:10px;margin-top:14px}.special-modes button{font-size:14px;padding:7px 12px}.catalog{height:min(490px,100%);display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;gap:16px;margin-bottom:5px}.categories{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.categories button{padding:6px 2px;font-size:13px}.exercise-list{min-height:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:12px}.exercise{min-height:44px;min-width:0;padding:8px;display:flex;flex-direction:column;gap:8px;font-size:15px}.exercise svg{width:28px;height:28px}.catalog-nav{display:flex;justify-content:space-between;align-items:center;gap:8px;min-width:0}.catalog-nav>div:first-child{min-width:0}.catalog-nav strong{display:block;font-size:15px}.catalog-nav small{display:block;color:var(--muted);font-size:12px;max-width:30ch}.pager{display:flex;align-items:center;gap:7px;flex-shrink:0;font-size:13px}.pager .icon-button{width:44px;min-height:44px;padding:8px}.start-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px}.start-actions button{font-size:15px;padding:8px 10px}
.panel-wrap{min-width:0;width:min(700px,100%);height:100%;max-height:600px;margin:auto;padding:5px;display:flex;align-items:center;justify-content:center;min-height:0}.panel-wrap>.club-card{width:100%;max-height:100%}.panel-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;gap:8px}.panel-top h2{margin:0}.field{display:grid;gap:5px;margin:10px 0;font-size:14px}.field input{min-height:44px;border:2px solid #cfba97;border-radius:10px;background:#fffcf4;padding:8px 12px;width:100%;min-width:0}.tabs{display:flex;gap:10px;margin-bottom:10px}.tabs button{flex:1}.tabs .selected{background-color:#e0e7d1}.error{color:#a25345;font-size:13px;margin:4px 0}.error:empty{display:none}.room-code{font-size:27px;font-weight:900;letter-spacing:.06em;user-select:all}.players{list-style:none;padding:0;margin:12px 0;display:grid;grid-template-columns:1fr 1fr;gap:7px}.players li{min-width:0;display:flex;justify-content:space-between;align-items:center;gap:7px;background:#efe6d3;padding:7px 10px;border-radius:9px;font-size:14px}.players li>span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.player-status{color:var(--sage);font-size:12px;white-space:nowrap}.players .icon-button{width:44px;min-height:44px;padding:8px}.actions{display:flex;gap:10px;align-items:center}.actions button{flex:1}.qr{width:130px;height:130px;flex-shrink:0}.qr svg{width:100%;height:100%}.invite{display:flex;gap:16px;align-items:center}.invite a{overflow-wrap:anywhere;color:var(--sage);font-size:13px}
.arena{width:min(900px,100%);height:100%;margin:auto;display:grid;grid-template-rows:auto 6px minmax(0,1fr);gap:12px;padding:4px 4px 6px}.hud{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px}.hud-score{font-size:26px;font-weight:900;font-variant-numeric:tabular-nums}.hud small{display:block;font-size:12px;font-weight:700;color:var(--muted)}.timer{font-size:24px;font-weight:900;font-variant-numeric:tabular-nums;color:var(--sage)}.timer.urgent{color:#ae5547}.progress{height:6px;border-radius:6px;background:#dac8a9;overflow:hidden}.progress>div{height:100%;background:#8ca27c;transition:width .2s linear}.puzzle{text-align:center;display:grid;grid-template-rows:auto minmax(0,1fr) 24px;gap:10px}.puzzle h2{font-size:22px;margin:3px 0 5px}.puzzle-note{color:var(--muted);font-size:14px;margin:0}.challenge-body{min-height:0;display:grid;grid-template-rows:minmax(0,1fr) auto;gap:12px;align-items:center}.scene{min-height:0;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:10px;height:100%;overflow:hidden}.scene:empty{display:none}.challenge-body:has(.scene:empty){grid-template-rows:minmax(0,1fr)}.response{min-height:0;display:grid;gap:10px;justify-items:center}.answers{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;width:100%;max-width:600px;padding-bottom:4px}.answers.three{grid-template-columns:repeat(3,minmax(0,1fr))}.answer{font-size:28px;min-height:65px;min-width:0;padding:8px;position:relative;line-height:1.1}.answer .object-icon,.answer .arrow-icon,.answer .rotation-icon{width:44px;height:44px}.answer:has(.object-icon){display:flex;gap:4px;flex-direction:column;font-size:13px}.tile-grid{grid-template-columns:repeat(3,1fr);width:max-content;max-width:100%;gap:7px}.tile-grid .answer{width:64px;min-height:58px;padding:5px}.prompt{font-size:clamp(26px,5vw,62px);font-weight:900;line-height:1.15;letter-spacing:.01em;font-variant-numeric:tabular-nums}.feedback{height:24px;font-size:14px;line-height:24px;font-weight:800;color:var(--sage);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.feedback.wrong{color:#a25345}.selection-tray{display:flex;align-items:center;justify-content:center;gap:6px;width:100%}.selection-tray>span{display:grid;place-items:center;width:40px;height:40px;background:#ede3cf;border-radius:8px;font-size:20px;font-weight:800}.selection-tray .object-icon{width:32px;height:32px}.selection-tray .undo{min-height:44px;padding:6px 12px;font-size:13px}.scene:has(.selection-tray){align-content:center}.scene-label{display:flex;align-items:center;justify-content:center;gap:18px;font-size:19px}.scene-label .object-icon,.scene-label .rotation-icon{width:65px;height:65px}.object-icon{width:50px;height:50px;flex-shrink:0}.object-icon.silhouette *{fill:#574335!important;stroke:#574335!important}.object-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:12px;max-width:100%}.object-row>span{display:grid;justify-items:center}.object-row.many{display:grid;grid-template-columns:repeat(6,1fr);gap:10px}.object-row.many .object-icon{width:42px;height:42px}.memory-grid,.step-grid{display:grid;grid-template-columns:repeat(3,44px);gap:4px}.memory-cell{width:44px;height:44px;border:1px solid #ceb795;border-radius:7px;background:#f1e5cf;display:grid;place-items:center}.memory-cell .object-icon{width:36px;height:36px}.step-grid{grid-template-columns:repeat(2,50px);gap:7px}.step-cell{display:grid;place-items:center;width:50px;height:50px;border:2px solid #c6b08c;background:#eee2c9;border-radius:12px;font-size:20px;font-weight:800}.step-cell.lit{background:#91ae78;border-color:#536e45;box-shadow:inset 0 0 0 3px #f7eccc}.preview-note{width:100%;font-size:13px;color:var(--muted)}.cup-stage{width:252px;height:100px;position:relative}.moving-cup{position:absolute;left:0;top:0;width:84px;height:96px;display:grid;place-items:center;transition:transform .65s ease-in-out}.moving-cup>.object-icon{width:65px;height:65px}.cup-acorn{position:absolute;bottom:0;left:30px}.cup-acorn .object-icon{width:25px;height:25px}.arrow-scene{display:grid;width:180px;height:110px;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr)}.arrow-scene .arrow-icon{grid-column:var(--arrow-col);grid-row:var(--arrow-row);width:36px;height:36px}.overlap-scene{max-width:100%;width:260px;height:125px}.basket-row{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;width:100%}.basket{border-bottom:5px solid #bd9b6f;border-radius:8px;background:#f0e4ca;padding:6px;font-size:18px}.basket small{display:block;font-size:12px}.basket>div{display:grid;justify-items:center}.basket .object-icon{width:35px;height:35px}.fraction{display:grid;gap:8px;width:100%}.fraction-bar{height:12px;display:flex;border:1px solid #8d9c72}.fraction-bar i{flex:1;border-right:1px solid #8d9c72}.fraction-bar i.filled{background:#8d9c72}.scale-scene{display:flex;align-items:center;gap:10px;font-size:25px;font-weight:800}.scale-scene>svg{width:90px;height:75px}.scale-pan{display:flex;align-items:center;gap:6px}.maze-grid{display:grid;grid-template-columns:repeat(4,44px);grid-template-rows:repeat(4,44px);gap:0}.maze-cell{min-height:44px;min-width:44px;width:44px;height:44px;padding:2px;border-style:solid;border-radius:0;background:#f6eddb;box-shadow:none}.maze-cell:disabled{opacity:1}.maze-cell.visited{background:#e0e8cc}.maze-cell .object-icon{width:34px;height:34px}.pond{width:28px;height:22px;border-radius:50%;background:#a7c8ca;border:3px solid #87b2b4}.countdown{text-align:center;flex-direction:column}.countdown strong{font-size:90px;display:block;color:var(--sage)}.results{text-align:center}.results .total{font-size:56px;font-weight:900;color:var(--sage);line-height:1.2}.stats{display:flex;justify-content:center;gap:24px;margin:18px 0}.stats b{display:block;font-size:23px}.round-summary{display:grid;gap:4px;font-size:13px;margin:10px 0}.round-summary span{display:flex;justify-content:space-between;gap:12px}.rank{font-weight:900}
#toast{position:fixed;top:12px;left:50%;transform:translateX(-50%);background:#574335;color:#fff9eb;padding:10px 18px;border-radius:12px;z-index:10;pointer-events:none;max-width:90%;box-shadow:0 4px 15px #0002}#toast:empty{display:none}.help-pager{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:18px}.page-card p{font-size:15px;margin:0 0 6px}.page-card h2:focus{outline:none}.panel-wrap>.page-card{max-width:540px}.page-card .actions{margin-top:16px}.page-card .invite{margin:4px 0 10px}.hidden,[hidden]{display:none!important}
@media(max-width:700px){:root{--touch:44px;--gap:10px;--pad:16px}.shell{padding:10px}.connection{display:none}.brand{font-size:16px}.brand svg{width:36px;height:36px}.header-actions{gap:7px}.home{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);gap:10px;padding:0 2px 5px}.welcome{display:grid;grid-template-columns:1fr 110px;align-items:center;gap:4px 10px;text-align:left}.welcome .eyebrow{display:none}.welcome h1{font-size:25px;grid-column:1;grid-row:1;margin:0}.welcome .mascots{height:75px;width:110px;grid-column:2;grid-row:1;object-fit:contain}.special-modes{grid-column:1/3;margin:0;justify-content:stretch;gap:10px}.special-modes button{flex:1;font-size:13px}.catalog{height:100%;gap:10px}.exercise{font-size:13px;gap:4px;padding:5px}.exercise svg{width:23px;height:23px}.exercise-list{gap:9px}.categories{gap:5px}.categories button{font-size:12px}.catalog-nav strong{font-size:13px}.catalog-nav small{display:none}.pager{gap:5px;font-size:12px}.pager .icon-button{width:44px}.start-actions{gap:8px}.start-actions button{font-size:13px;padding:6px}.start-actions svg{width:20px;height:20px}footer{font-size:11px;height:28px;padding-top:4px}.arena{gap:8px}.hud-score{font-size:23px}.hud small{display:inline;margin-left:5px}.puzzle{gap:7px}.puzzle h2{font-size:20px}.puzzle-note{font-size:13px}.answers{gap:8px}.answer{min-height:56px;font-size:24px;padding:5px}.answer .object-icon,.answer .arrow-icon,.answer .rotation-icon{width:35px;height:35px}.tile-grid .answer{width:58px;min-height:52px}.prompt{font-size:31px}.basket-row{gap:5px}.basket{font-size:15px;padding:4px}.scene-label{font-size:16px;gap:10px}.object-row{gap:6px}.object-row .object-icon{width:42px;height:42px}.object-row.many{gap:6px}.object-row.many .object-icon{width:34px;height:34px}.players{gap:6px}.players li{font-size:12px;padding:6px}.player-status{font-size:11px}.room-code{font-size:24px}.invite{gap:10px}.qr{width:110px;height:110px}.results .total{font-size:44px}.stats{gap:16px;margin:10px 0}.stats b{font-size:20px}.feedback{font-size:12px}.scale-scene{font-size:21px;gap:6px}.scale-pan .object-icon{width:35px;height:35px}.scale-scene>svg{width:60px}.countdown strong{font-size:70px}}
@media(max-height:650px) and (orientation:portrait){.welcome h1,.welcome .mascots{display:none}.welcome{display:block}.special-modes{margin:0}.shell{grid-template-rows:auto minmax(0,1fr)}footer{display:none}.catalog{gap:8px}.exercise svg{width:21px;height:21px}}
@media(orientation:landscape) and (max-height:600px){:root{--touch:44px;--gap:7px;--pad:12px}.shell{padding:8px 14px;grid-template-rows:44px minmax(0,1fr)}footer,.connection{display:none}.brand{font-size:15px}.brand svg{width:34px;height:34px}.brand small{font-size:9px}.home{grid-template-columns:180px minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:18px;padding:3px 3px 6px}.welcome{display:flex;flex-direction:column;text-align:center;justify-content:center}.welcome .eyebrow{display:none}.welcome h1{display:block;font-size:25px;margin:0}.welcome .mascots{display:block;width:170px;height:100px;max-height:25dvh}.special-modes{display:grid;width:100%;gap:7px;margin-top:4px}.special-modes button{font-size:13px;min-height:44px}.catalog{height:100%;gap:8px}.categories button{font-size:12px}.exercise-list{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:minmax(0,1fr);gap:7px}.exercise{font-size:12px;gap:4px;padding:4px}.exercise svg{width:23px;height:23px}.catalog-nav small{display:none}.catalog-nav strong{font-size:13px}.pager{gap:5px}.start-actions{gap:8px}.start-actions button{font-size:13px}.arena{gap:6px;padding:0 2px 5px;grid-template-rows:44px 5px minmax(0,1fr)}.hud-score{font-size:22px}.hud small{display:inline;margin-left:5px}.puzzle{gap:5px;grid-template-rows:auto minmax(0,1fr) 20px}.puzzle h2{font-size:18px;margin:0 0 2px}.puzzle-note{font-size:12px}.puzzle .eyebrow{font-size:12px}.challenge-body{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:12px}.challenge-body:has(.scene:empty){grid-template-columns:minmax(0,1fr)}.answers{gap:7px;grid-template-columns:repeat(2,minmax(0,1fr));padding:0}.answers.three{grid-template-columns:repeat(3,minmax(0,1fr))}.answer{font-size:23px;min-height:48px;padding:4px}.answer .object-icon,.answer .arrow-icon,.answer .rotation-icon{width:34px;height:34px}.tile-grid{grid-template-columns:repeat(3,1fr)}.tile-grid .answer{width:48px;min-height:44px;height:44px}.prompt{font-size:30px}.feedback{height:20px;font-size:12px;line-height:20px}.object-row{gap:5px;flex-wrap:wrap}.object-row .object-icon{width:38px;height:38px}.object-row.many{grid-template-columns:repeat(6,1fr);gap:3px}.object-row.many .object-icon{width:27px;height:27px}.basket-row{grid-template-columns:repeat(2,1fr);gap:5px}.basket>div{display:flex;justify-content:center;gap:5px}.basket .object-icon{width:25px;height:25px}.basket{font-size:15px;padding:3px}.scene-label{font-size:15px;gap:9px}.scene-label .rotation-icon{width:52px;height:52px}.selection-tray{gap:4px}.selection-tray>span{width:30px;height:30px;font-size:16px}.selection-tray .undo{padding:5px 8px}.selection-tray .object-icon{width:26px;height:26px}.scene:has(.step-grid),.scene:has(.cup-stage){align-content:center;gap:3px}.step-cell{height:44px;width:44px}.step-grid{grid-template-columns:repeat(2,44px);gap:5px}.cup-stage{height:75px}.moving-cup{height:73px}.moving-cup>.object-icon{height:52px;width:52px}.preview-note{font-size:12px}.overlap-scene{height:100px}.puzzle:has(.board-layout){grid-template-columns:minmax(140px,.8fr) minmax(0,1.2fr);grid-template-rows:minmax(0,1fr) 20px}.puzzle:has(.board-layout) .puzzle-heading{grid-column:1;grid-row:1;align-self:center}.puzzle:has(.board-layout) .challenge-body{grid-column:2;grid-row:1/3;grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) auto;gap:5px}.puzzle:has(.board-layout) .challenge-body:has(.scene:empty){grid-template-rows:1fr}.puzzle:has(.board-layout) .feedback{grid-column:1;grid-row:2}.board-layout .memory-grid{grid-template-columns:repeat(3,40px);gap:3px}.board-layout .memory-cell{width:40px;height:40px}.board-layout .memory-cell .object-icon{width:32px;height:32px}.board-layout .scene-label .object-icon{width:34px;height:34px}.board-layout .scene-label{font-size:14px}.panel-wrap{padding:4px}.panel-top{margin-bottom:7px}.panel-top h2{font-size:22px}.tabs{margin-bottom:7px;gap:8px}.field{margin:6px 0;gap:3px}.field input{padding:6px 10px}.panel-wrap p{margin:5px 0;font-size:12px}.panel-wrap form{display:grid;grid-template-columns:1fr 1fr;gap:5px 12px;align-items:end}.panel-wrap form>.field{grid-row:1}.panel-wrap form>button{grid-column:2;grid-row:2}.panel-wrap form>.error{grid-column:1}.players{margin:8px 0;gap:5px}.players li{padding:4px 8px;font-size:13px;min-height:28px}.player-status{font-size:12px}.results .total{font-size:35px}.stats{margin:6px 0;font-size:13px}.stats b{font-size:18px}.round-summary{display:grid;grid-template-columns:1fr 1fr;gap:3px 18px;font-size:12px;margin:6px 0}.countdown strong{font-size:65px}.countdown h2{font-size:23px}.results h2{font-size:22px;margin-bottom:6px}.page-card h2{font-size:22px}.page-card p{font-size:14px}.help-pager{margin-top:10px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important}}
/* Clubhouse: one selection, one chooser, and two clearly separated play actions. */
.home{grid-template-columns:1fr 1fr;gap:50px}.launch-card{height:min(480px,100%);display:grid;grid-template-rows:minmax(0,1fr) auto;gap:24px;text-align:center}.chosen-game{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-height:0}.chosen-symbol{width:70px;height:70px;border-radius:22px;background:#e6e9d5;display:grid;place-items:center;color:#73885c}.chosen-symbol svg{width:38px;height:38px}.chosen-game h2{margin:0;font-size:29px}.chosen-game p{font-size:15px;color:var(--muted);margin:0;max-width:31ch}.chosen-game #browse{margin-top:8px;font-size:14px;padding-inline:24px}.launch-footer{border-top:1px solid #dfceb1;padding-top:18px}.session-note{font-size:12px;color:var(--muted);margin-bottom:12px}.launch-footer .start-actions{gap:18px}.library{width:100%;height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr);gap:14px;padding:5px}.library>.panel-top{margin:0}.library .panel-top h2{font-size:26px;margin-top:2px}.library-body{display:grid;grid-template-columns:110px minmax(0,1fr);gap:30px;min-height:0}.category-rail{display:flex;flex-direction:column;gap:12px;padding-bottom:4px}.category-rail button{font-size:14px;padding:8px}.library-main{display:grid;grid-template-rows:minmax(0,1fr) 48px;gap:22px;min-height:0;padding-bottom:4px}.library-options{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:26px;min-height:0}.game-card{height:min(320px,100%);min-height:44px;display:flex;flex-direction:column;gap:18px;padding:24px;text-align:center}.game-emblem{width:74px;height:74px;background:#f3e9d2;border:1px solid #d6c19c;border-radius:22px;display:grid;place-items:center;color:#72845d}.game-emblem svg{width:40px;height:40px}.game-card strong{font-size:23px}.game-description{font-size:15px;font-weight:500;max-width:27ch;color:var(--muted)}.library-pager{display:flex;align-items:center;justify-content:center;gap:28px;font-size:14px;color:var(--muted)}.lobby-body{display:grid;grid-template-columns:1fr;gap:8px}.room-info .row{gap:16px}.lobby-note{font-size:12px}
@media(max-width:700px){.home{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);gap:20px}.launch-card{height:100%;gap:14px}.chosen-game{gap:9px}.chosen-symbol{width:52px;height:52px;border-radius:16px}.chosen-symbol svg{width:30px;height:30px}.chosen-game h2{font-size:25px}.chosen-game p{font-size:14px}.chosen-game #browse{margin-top:8px}.launch-footer{padding-top:14px}.launch-footer .start-actions{gap:16px}.library{gap:12px;padding:3px}.library .panel-top h2{font-size:21px}.library .panel-top .eyebrow{font-size:11px}.library-body{grid-template-columns:76px minmax(0,1fr);gap:16px}.category-rail{gap:12px}.category-rail button{font-size:12px;padding:6px}.library-main{gap:14px;grid-template-rows:minmax(0,1fr) 44px}.library-options{grid-template-columns:1fr;grid-template-rows:repeat(2,minmax(0,1fr));gap:18px}.game-card{height:100%;padding:14px;gap:10px}.game-emblem{height:48px;width:48px;border-radius:14px}.game-emblem svg{width:28px;height:28px}.game-card strong{font-size:18px}.game-description{font-size:13px}.library-pager{gap:10px;font-size:12px}.library-pager span{min-width:75px;text-align:center}}
@media(max-height:650px) and (orientation:portrait){.home{grid-template-rows:minmax(0,1fr)}.home .welcome{display:none}.launch-card{max-height:100%}.chosen-game{gap:8px}.library-body{gap:12px}.library-options{gap:14px}.game-card{gap:8px;padding:10px}.game-emblem{width:40px;height:40px}.game-card strong{font-size:16px}.game-description{font-size:12px}.category-rail{gap:9px}}
@media(orientation:landscape) and (max-height:600px){.home{grid-template-columns:190px minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:28px}.home .welcome{display:flex}.launch-card{height:100%;gap:10px}.chosen-game{display:grid;grid-template-columns:52px minmax(0,1fr);grid-template-rows:auto auto auto;gap:4px 14px;text-align:left;justify-items:start;align-content:center}.chosen-game .eyebrow{grid-column:2;grid-row:1;font-size:11px}.chosen-symbol{grid-column:1;grid-row:1/4;width:52px;height:52px;border-radius:16px}.chosen-symbol svg{width:28px;height:28px}.chosen-game h2{grid-column:2;grid-row:2;font-size:23px}.chosen-game p{grid-column:2;grid-row:3;font-size:12px}.chosen-game #browse{grid-column:2;grid-row:4;margin-top:7px;min-height:44px;font-size:13px}.launch-footer{padding-top:8px}.session-note{font-size:11px;margin-bottom:8px}.launch-footer .start-actions{gap:16px}.library{gap:7px;padding:0 2px 5px}.library .panel-top{height:44px}.library .panel-top h2{font-size:22px;margin:0}.library .panel-top .eyebrow{display:none}.library-body{grid-template-columns:84px minmax(0,1fr);gap:24px}.category-rail{gap:6px;padding:0}.category-rail button{min-height:44px;font-size:12px;padding:6px}.library-main{gap:12px;grid-template-rows:minmax(0,1fr) 44px;padding-bottom:0}.library-options{grid-template-columns:1fr 1fr;grid-template-rows:minmax(0,1fr);gap:20px}.game-card{height:100%;padding:12px;gap:10px}.game-emblem{height:40px;width:40px;border-radius:12px}.game-emblem svg{height:24px;width:24px}.game-card strong{font-size:17px}.game-description{font-size:12px}.library-pager{font-size:12px;gap:26px}.lobby-body{grid-template-columns:190px minmax(0,1fr);gap:18px;align-items:center}.room-info .row{flex-direction:column;align-items:flex-start;gap:8px}.lobby .players{grid-template-columns:1fr 1fr;margin:0}.lobby .actions{margin-top:10px}.lobby .lobby-note{margin-top:6px}.lobby .player-status{font-size:11px}.lobby .players li{font-size:12px;padding:5px 7px;gap:4px}.lobby .room-code{font-size:24px}}
.invite{display:grid;grid-template-columns:130px minmax(0,1fr)}.invite>div{min-width:0}
@media(max-width:380px){.invite{grid-template-columns:100px minmax(0,1fr);gap:10px}.invite .qr{width:100px;height:100px}.invite .room-code{font-size:17px;letter-spacing:.03em}.invite a{font-size:12px}}

/* Independent answers need a clear gutter, including compact phone layouts. */
.answers,.tile-grid{gap:12px}
.selection-tray .undo{margin-left:8px}
@media(orientation:landscape) and (max-height:600px){
 .library{gap:0;padding-bottom:0}
 .category-rail{gap:10px}
}

.header-actions{gap:12px}
.response{gap:14px}
@media(max-height:650px) and (orientation:portrait){.category-rail{gap:12px}}

/* Keep the remembered scene in the same three-column arrangement as recall. */
.object-row.change-preview{display:grid;grid-template-columns:repeat(3,64px);gap:12px}
.change-preview>span{height:58px;border:1px solid #ceb795;border-radius:12px;background:#f1e5cf;place-items:center}
@media(max-width:700px){.object-row.change-preview{grid-template-columns:repeat(3,58px)}.change-preview>span{height:52px}}
@media(orientation:landscape) and (max-height:600px){.object-row.change-preview{grid-template-columns:repeat(3,48px)}.change-preview>span{height:44px}}
.icon-button[hidden]{display:none}.update-button{position:relative;color:var(--sage)}.update-button:after{content:'';position:absolute;top:7px;right:7px;width:9px;height:9px;border-radius:50%;background:#e49588;box-shadow:0 0 0 2px var(--paper)}.sound-row{gap:18px;margin:10px 0}.sound-row span{display:flex;align-items:center;gap:10px;font-weight:800}.sound-row svg{width:24px;height:24px;color:var(--sage)}.sound-row button{min-width:84px}
.name-picks{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.name-picks button{min-height:44px;font-size:14px;padding:4px 6px}.name-picks [aria-pressed=true]{background-image:url('./assets/control-frame.svg'),linear-gradient(#e0e7d1,#cbd8b9);border-color:#84956c;box-shadow:0 4px #8c9a71}
@media(orientation:landscape) and (max-height:600px){.panel-wrap form>.name-field{grid-column:1/3;grid-row:1}.panel-wrap form>.field:not(.name-field){grid-row:2}.name-picks{grid-template-columns:repeat(8,minmax(0,1fr));gap:5px}.name-picks button{font-size:12px;padding:2px}}
/* Friends rooms: where you are (steps + one sentence), badges in the roster, the race in the match HUD. */
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.steps{display:flex;gap:5px;margin:0;padding:0;list-style:none;counter-reset:step;flex:1;max-width:360px}
.steps li{flex:1;display:flex;align-items:center;justify-content:center;gap:4px;height:26px;border-radius:13px;font-size:11px;font-weight:900;letter-spacing:.05em;text-transform:uppercase;color:#a8957f;background:#efe6d3;border:1px solid #e0d2b8;counter-increment:step}
.steps li:before{content:counter(step)}
.steps li[data-state=done]{color:var(--sage);background:#e3ead9;border-color:#c6d3b9}
.steps li[data-state=done]:before{content:'✓'}
.steps li[data-state=now]{color:var(--cream);background:var(--sage);border-color:var(--sage)}
.room-status{margin:0 0 10px;padding:8px 12px;border-radius:10px;font-weight:800;font-size:14px;line-height:1.35;background:#efe6d3;border:1px solid #e0d2b8;color:var(--ink);text-align:left}
.room-status[data-tone=go]{background:#e3ead9;border-color:#c6d3b9;color:#4a6143}
.room-status[data-tone=warn]{background:#f6e0da;border-color:#e4bdb2;color:#954a3d}
.room-status[data-tone=done]{background:#f5e6c4;border-color:#dfc591;color:#6e5328}
.countdown .steps{flex:none;width:min(360px,100%);margin-bottom:10px}
.players li.you{background:#e3ead9;box-shadow:inset 0 0 0 1px #c6d3b9}
.player-name{min-width:0;display:flex;align-items:center;gap:5px;overflow:hidden;white-space:nowrap}
.players .rank{flex:none;width:22px;height:22px;display:grid;place-items:center;border-radius:50%;background:#e6d8bd;font-size:12px}
.players li[data-state=playing]:first-child .rank{background:#efc96f}
.host-badge{display:inline-flex;color:#b0873a}.host-badge svg{width:16px;height:16px}
.you-badge{flex:none;padding:1px 7px;border-radius:9px;font-size:11px;font-weight:900;background:var(--sage);color:var(--cream)}
.player-status{display:inline-flex;align-items:center;gap:4px}.player-status svg{width:15px;height:15px}
.players li[data-state=waiting] .player-status{color:var(--muted)}
.players li[data-state=offline] .player-status,.players li[data-state=left] .player-status{color:#ae5547}
.room-results .panel-top{justify-content:center;flex-wrap:wrap}
.race{display:flex;gap:6px;min-width:0;flex:1;justify-content:center;overflow:hidden}
.race-chip{display:inline-flex;align-items:center;gap:5px;min-width:0;max-width:150px;padding:4px 10px;border-radius:14px;background:#efe6d3;font-size:13px;font-weight:800;white-space:nowrap}
.race-chip b{color:var(--muted);font-size:12px}
.race-name{overflow:hidden;text-overflow:ellipsis}
.race-score{font-variant-numeric:tabular-nums}
.race-chip.you{background:var(--sage);color:var(--cream)}.race-chip.you b{color:#dfe8d6}
.results .race{margin:6px 0}
@media(max-width:700px){.race-chip:not(.you):not(:first-child){display:none}.steps li{font-size:10px;letter-spacing:0}}
@media(orientation:landscape) and (max-height:600px){.steps li{height:22px}.room-status{margin-bottom:6px;padding:5px 10px;font-size:13px}.lobby .panel-top h2,.friends-setup .panel-top h2{display:none}.countdown .steps{margin-bottom:4px}}
@media(max-width:700px) and (orientation:portrait){.panel-top{flex-wrap:wrap}.panel-top .steps{order:3;flex-basis:100%;max-width:none}}
@media(max-width:380px) and (orientation:portrait){.panel-top .steps{display:none}.players li.you .you-badge{display:none}.room-status{font-size:13px;padding:6px 10px}}
@media(max-width:380px){.race-chip:not(.you){display:none}.race-chip{padding:3px 8px;font-size:12px}.friends-arena .hud small{display:none}}
@media(orientation:landscape) and (max-height:600px){.friends-setup .room-status{display:none}}
@media(orientation:landscape) and (max-height:600px){.room-results .panel-top{height:auto}.room-results .panel-top .eyebrow{display:none}.room-results .players{margin:4px 0}}
.puzzle-heading .puzzle-note{margin-left:auto;margin-right:auto}
@media(max-width:700px) and (orientation:portrait){.panel-top h2{flex:1 1 0;min-width:0}}
/* Header: logo and name, update when ready, one Menu button. The rest slides out from the right (menu.js). */
.brand{min-width:0}.brand span{min-width:0}
.menu-scrim{position:fixed;inset:0;z-index:40;background:#5743354d}
.menu-drawer{position:fixed;z-index:41;top:0;right:0;bottom:0;width:min(300px,86vw);display:flex;flex-direction:column;gap:8px;padding:max(14px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) 14px;background:radial-gradient(#a389622e .7px,transparent .8px) 0 0/8px 8px,var(--cream);border-left:2px solid #cbb48f;box-shadow:-12px 0 40px #57433533;overflow-y:auto;overscroll-behavior:contain}
.menu-drawer[hidden],.menu-scrim[hidden]{display:none}
.menu-drawer:not([hidden]){animation:menu-in .18s ease-out}
@keyframes menu-in{from{transform:translateX(100%)}}
.menu-head{display:flex;align-items:center;gap:10px;padding-bottom:10px;margin-bottom:4px;border-bottom:1px solid #d5bfa0}
.menu-head b{flex:1;min-width:0;font-size:17px;font-weight:900;line-height:1.2}
.menu-logo{width:36px;height:36px;flex:none}
.menu-item{width:100%;height:48px;min-height:48px;flex:none;justify-content:flex-start;gap:12px;padding:0 14px;text-align:left}
.menu-item[hidden]{display:none}
.menu-item .mi{display:inline-flex;flex:none}
.menu-item .mi svg{width:22px;height:22px;color:var(--sage)}
.menu-item .label{min-width:0}
@media(prefers-reduced-motion:reduce){.menu-drawer{animation:none!important}}
