/* Eyecade's full-color portal surrounds the separately calibrated playfields. */
:root{--paper:#fff7df;--ink:#152d20;--muted:#596b4d;--line:#cbd3ac;--teal:#285e36;--sage:#edf3ce;--lime:#d4f638;--coral:#ff795e;--display-font:'Arial Rounded MT Bold','Trebuchet MS',Manrope,sans-serif}
body{background:var(--paper)}
.app-shell{max-width:1240px;padding:0 36px 24px}
.topbar{height:102px;border-bottom:3px solid var(--ink);gap:24px}
.brand{gap:11px;font-family:var(--display-font);font-size:39px;font-weight:800;letter-spacing:-2px;line-height:1}
.brand-domain{font-size:19px;letter-spacing:-.7px;color:#487139}
.brand-eyes{display:flex;align-items:center;gap:0;width:53px;flex-shrink:0;transform:rotate(-7deg)}
.brand-eyes i{position:relative;display:block;width:28px;height:36px;border:3px solid var(--ink);border-radius:50%;background:var(--paper)}
.brand-eyes i+i{margin-left:-3px}
.brand-eyes i:after{content:'';position:absolute;right:3px;top:10px;width:11px;height:15px;background:var(--ink);border-radius:50%}
.topbar-actions{gap:10px}
.quiet-button{font-weight:700;font-size:14px;padding:10px 17px;border:2px solid transparent;border-radius:99px;min-height:45px}
.quiet-button:hover{background:#ecf2cf}
.topbar-actions .quiet-button[aria-pressed=true]{background:var(--lime);color:var(--ink);border-color:var(--ink);text-decoration:none;box-shadow:0 2px 0 #29463280}
.icon-button{border-radius:50%;font-weight:700;padding:0;line-height:1}
.help-button{border:2px solid var(--ink);background:var(--paper);font-size:20px;width:40px;height:40px;min-height:40px}
.help-button:hover{background:var(--lime)}
.count{background:var(--ink);color:var(--paper);font-size:10px;width:19px;height:19px}
.profile-icon{display:block;width:18px;height:20px;position:relative;border:2px solid var(--ink);border-radius:50% 50% 38% 38%}
.profile-icon:before,.profile-icon:after{content:'';position:absolute;top:5px;width:3px;height:4px;background:var(--ink);border-radius:50%;left:3px}
.profile-icon:after{left:9px}
button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #246db6;outline-offset:5px}
main.arcade-home{max-width:none;margin-top:34px}
.arcade-home-heading{margin-bottom:24px;align-items:center}
.arcade-kicker{font-size:11px;color:#477238;letter-spacing:2.5px;font-weight:800;margin-bottom:6px}
.arcade-home-heading h1{font-family:var(--display-font);font-size:clamp(50px,6vw,78px);line-height:1.1;letter-spacing:-3px;font-weight:800}
.portal-question{display:inline-block;color:#467c36;transform:rotate(9deg);transform-origin:bottom}
.arcade-palette{border:2px solid var(--ink);border-radius:99px;min-height:44px;padding:10px 14px;background:#fffdf0;box-shadow:0 3px 0 #d8dcb9;font-size:12px;color:var(--ink);font-weight:600}
.arcade-palette:hover{background:#edf3ce}
.palette-dots{gap:2px}
.palette-dots i{width:16px;height:16px;border:1px solid #152d2050}
.portal-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:24px}
.portal-filters{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.portal-filters button{background:transparent;border:2px solid transparent;border-radius:99px;min-height:42px;font-size:13px;font-weight:700;padding:9px 16px}
.portal-filters button[aria-pressed=true]{border-color:var(--ink);background:var(--ink);color:var(--paper)}
.portal-filters button:not([aria-pressed=true]):hover{background:#eaf0ce}
.portal-shuffle{display:flex;align-items:center;gap:9px;padding:10px 17px;min-height:43px;white-space:nowrap;border:2px solid var(--ink);border-radius:12px;background:#ffbba4;font-size:13px;font-weight:700;box-shadow:0 3px 0 var(--ink)}
.portal-shuffle>span{font-size:20px;line-height:1}
.portal-shuffle:hover{background:#ffa485}
.portal-shuffle:active{transform:translateY(3px);box-shadow:none}
.arcade-grid{gap:22px;align-items:start}
.arcade-card{position:relative;display:flex;flex-direction:column;background:var(--paper);border:3px solid var(--ink);border-radius:25px;box-shadow:0 6px 0 var(--ink);transition:transform .18s,box-shadow .18s;isolation:isolate}
.arcade-card:hover{transform:translateY(-3px);box-shadow:0 9px 0 var(--ink)}
.arcade-card:active{transform:translateY(2px);box-shadow:0 4px 0 var(--ink)}
.arcade-card-visual{height:205px;width:100%;background:#e8efd2;position:relative;overflow:hidden;border-bottom:3px solid var(--ink)}
.arcade-card-featured .arcade-card-visual{height:280px}
.portal-card-snake .arcade-card-visual{background:#9cdb49}
.portal-card-blocks .arcade-card-visual{background:#ff9a78}
.portal-card-breaker .arcade-card-visual{background:#2bb5db}
.portal-card-memory .arcade-card-visual{background:#0eb798}
.portal-card-catch .arcade-card-visual{background:#ffe044}
.portal-art{position:absolute;display:block;left:0;top:50%;width:100%;aspect-ratio:1;transform:translateY(-50%);background-image:url('./assets/eyecade-arcade-atlas.png');background-repeat:no-repeat;background-size:300% 200%;pointer-events:none}
.atlas-snake{background-position:0 0}
.atlas-blocks{background-position:50% 0}
.atlas-breaker{background-position:100% 0}
.atlas-memory{background-position:0 100%}
.atlas-catch{background-position:50% 100%}
.arcade-card-copy{width:100%;padding:14px 18px 15px;gap:14px;background:#fffdf0;min-height:72px}
.arcade-card-copy h2,.arcade-card-featured .arcade-card-copy h2{font-family:var(--display-font);font-size:27px;font-weight:800;letter-spacing:-.9px;line-height:1.1;margin:0}
.arcade-card-featured .arcade-card-copy h2{font-size:32px}
.arcade-play{display:grid;place-items:center;flex:none;line-height:1;border:2px solid var(--ink);color:var(--ink);background:var(--lime);border-radius:50%;width:42px;height:42px;font-size:27px;box-shadow:0 2px 0 var(--ink)}
.arcade-card:hover .arcade-play{background:var(--ink);color:var(--lime)}
.arcade-card-record{font-size:12px;font-weight:800;color:var(--ink);background:var(--paper);border:2px solid var(--ink);border-radius:99px;padding:6px 10px;top:12px;right:12px}
.arcade-grid[data-filtered=true] .arcade-card{grid-column:span 2}
.arcade-grid[data-filtered=true] .arcade-card-visual{height:240px}
.arcade-grid[data-filtered=true] .arcade-card-copy h2{font-size:27px}
.portal-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:42px;padding:22px 0 0;border-top:2px solid #d7dcb5;color:var(--muted);font-size:12px}
.portal-footer>span{font-weight:700;letter-spacing:.5px}
.portal-footer>span>span{color:#d76247;margin-left:7px}
.portal-footer button{display:flex;align-items:center;gap:12px;background:transparent;padding:8px 0;min-height:40px;font-size:12px;font-weight:700}
.portal-footer button:hover{text-decoration:underline;text-underline-offset:4px}
body[data-view=calibration] .portal-footer{display:none}
/* The same character carries through setup and dialogs. Stimulus colors stay in app.js. */
body[data-view=calibration] main{padding-bottom:40px}
.page-heading h1{font-family:var(--display-font);font-weight:800;letter-spacing:-1px;font-size:clamp(28px,4vw,38px)}
.workflow{margin-top:29px}
.step{height:6px;background:#d8dfba}
.step.active{background:var(--ink)}
.step.done{background:#8cb35b}
.button{font-family:var(--display-font);font-weight:800;line-height:1.15;border:2px solid var(--ink);border-radius:13px;min-height:48px;gap:10px;transition:background-color .12s ease,box-shadow .12s ease,transform .12s ease}
.button.primary{background:var(--lime);color:var(--ink);box-shadow:inset 0 1px 0 #ffffff80,0 3px 0 #29463290}
.button.primary:hover:not(:disabled){background:#e0ff58}
.button.primary:active:not(:disabled){transform:translateY(2px);box-shadow:inset 0 1px 2px #173c2a12,0 1px 0 #29463290}
.button.secondary{border:1.5px solid #294632a0;background:#fffdf0;box-shadow:inset 0 1px 0 #fff,0 2px 0 #173c2a25}
.button.secondary:active:not(:disabled){transform:translateY(1px);box-shadow:inset 0 1px 2px #173c2a12}
.button.ghost{border-color:transparent}
.glasses-choice,.setting-tile{border:2px solid #9aa984;border-radius:18px;background:#fffdf0}
.glasses-choice:has(input:checked),.setting-tile:has(input:checked){background:#eef7cc;border-color:var(--ink);box-shadow:0 3px 0 var(--ink)}
.glasses-choice strong{font-weight:700}
.choice-glasses i{border-color:var(--ink)}
.choice-glasses:before{border-color:var(--ink)}
.segment{background:#e5edc5;border:1px solid #c4cda4;border-radius:12px}
.segment label:has(input:checked){background:#fffdf0;font-weight:700}
.text-input{border:2px solid #9aa984;border-radius:12px}
.same-answer,.choice-button{border:2px solid #9aa984;border-radius:12px;font-weight:600}
.same-answer:hover,.choice-button:hover{background:#edf4ce;border-color:var(--ink)}
dialog{border:3px solid var(--ink);border-radius:23px;background:var(--paper);box-shadow:7px 8px 0 var(--ink)}
dialog::backdrop{background:#152d207d;backdrop-filter:blur(2px)}
.dialog-top h2{font-family:var(--display-font);font-weight:800}
.game-dialog.arcade-game-dialog{border:3px solid var(--ink);border-radius:25px;background:var(--paper);padding:17px 21px 14px;box-shadow:7px 8px 0 var(--ink)}
.arcade-game-heading h2{font-family:var(--display-font);font-weight:800;font-size:28px}
.arcade-back{border:2px solid var(--ink);border-radius:99px;padding:5px 12px;background:var(--lime);font-weight:700}
.arcade-back span{color:var(--ink);font-weight:700}
.arcade-game-tools .icon-button{border:2px solid var(--ink);background:#fffdf0;width:36px;height:36px;font-size:20px}
.arcade-game-tools{gap:7px}
.arcade-game-tools .icon-button:hover{background:var(--lime)}
.arcade-playfield{border:3px solid var(--ink);border-radius:17px}
.arcade-score{font-family:var(--display-font);font-weight:800}
.arcade-overlay-card{background:var(--paper);border:3px solid var(--ink);border-radius:22px;box-shadow:5px 6px 0 var(--ink)}
.arcade-overlay-card h3{font-family:var(--display-font);font-weight:800}
.arcade-overlay-decoration{color:#56922b}
.arcade-dpad button,.arcade-piece-controls button{background:var(--lime);border:2px solid var(--ink);border-radius:12px;color:var(--ink);font-weight:700;box-shadow:0 3px 0 var(--ink)}
.arcade-dpad button:hover,.arcade-piece-controls button:hover{background:#e2ff61}
.arcade-dpad button:active,.arcade-piece-controls button:active{transform:translateY(3px);box-shadow:none}
.arcade-piece-controls button[aria-pressed=true]{background:var(--ink);color:var(--lime);border-color:var(--ink)}
@media(min-width:1500px){.arcade-card-featured .arcade-card-visual{height:310px}.arcade-card-visual{height:225px}}
@media(max-width:1000px){.app-shell{padding-inline:26px}.brand{font-size:33px}.brand-domain{font-size:16px}.brand-eyes{transform:scale(.9) rotate(-7deg);width:47px}.topbar-actions{gap:5px}.quiet-button{padding:9px 12px}.arcade-grid{gap:18px}.arcade-card-featured .arcade-card-visual{height:250px}.arcade-card-visual{height:180px}.arcade-card-copy{padding:12px;min-height:65px}.arcade-card-copy h2{font-size:23px}.arcade-card-featured .arcade-card-copy h2{font-size:29px}.arcade-play{width:36px;height:36px;font-size:23px}}
@media(max-width:760px){.topbar{height:auto;min-height:96px;flex-wrap:wrap;justify-content:center;gap:15px;padding:20px 0 18px}.topbar-actions{justify-content:center;gap:7px;width:100%}.brand{font-size:37px}.brand-domain{font-size:18px}.quiet-button{padding:8px 16px;font-size:13px}.arcade-grid{gap:18px}.arcade-card,.arcade-card-featured{grid-column:span 3}.arcade-card-featured .arcade-card-visual,.arcade-card-visual{height:220px}.arcade-card-copy h2,.arcade-card-featured .arcade-card-copy h2{font-size:26px}.arcade-grid[data-filtered=true] .arcade-card{grid-column:span 3}.arcade-grid[data-filtered=true] .arcade-card-visual{height:220px}.arcade-home-heading h1{font-size:61px}.arcade-home-heading{margin-bottom:20px}.arcade-palette{font-size:11px;gap:7px}.portal-filters{gap:0}.portal-filters button{padding:8px 11px;font-size:12px}.portal-shuffle{font-size:12px;padding:9px 12px}.portal-toolbar{gap:10px}.arcade-card-copy{padding:12px 15px}.game-dialog.arcade-game-dialog{padding:12px}.arcade-game-heading h2{font-size:23px}.arcade-back{padding:5px 9px}.arcade-game-tools{gap:4px}.arcade-game-tools .icon-button{width:30px;height:32px;font-size:18px}.arcade-controls{padding-bottom:4px}}
@media(max-width:560px){.app-shell{padding-inline:18px}.brand{font-size:38px}.topbar-actions{gap:5px}.quiet-button{padding:8px 14px}.topbar-actions #calibrate-open{font-size:13px}.topbar-actions #profiles-open .nav-label{display:none}.topbar-actions #profiles-open{padding:8px 9px;font-size:13px;gap:5px}.profile-icon{width:19px;height:22px}.count{font-size:10px}.help-button{width:37px;height:37px;min-height:37px}.arcade-home-heading{margin-bottom:21px;align-items:center}main.arcade-home{margin-top:28px}.arcade-home-heading h1{font-size:58px;letter-spacing:-2px}.arcade-kicker{font-size:9px;letter-spacing:1.8px}.arcade-palette{flex-direction:row;align-items:center;min-height:40px;padding:8px 10px;gap:5px}.arcade-palette>span:nth-child(2){display:none}.palette-dots i{width:13px;height:13px}.portal-toolbar{flex-wrap:wrap;gap:14px;margin-bottom:22px}.portal-filters{width:100%;gap:3px;justify-content:space-between}.portal-filters button{padding:8px 12px;font-size:12px}.portal-shuffle{margin-left:auto;min-height:39px}.arcade-grid{gap:22px}.arcade-card,.arcade-card-featured,.arcade-grid[data-filtered=true] .arcade-card{grid-column:span 6}.arcade-card-visual,.arcade-card-featured .arcade-card-visual,.arcade-grid[data-filtered=true] .arcade-card-visual{height:260px}.arcade-card-copy{padding:13px 18px;min-height:70px}.arcade-card-copy h2,.arcade-card-featured .arcade-card-copy h2,.arcade-grid[data-filtered=true] .arcade-card-copy h2{font-size:30px}.arcade-play{width:40px;height:40px;font-size:26px}.portal-footer{margin-top:34px;padding-top:16px;gap:10px;font-size:10px}.portal-footer button{font-size:11px;gap:7px}.game-dialog.arcade-game-dialog{padding:11px;border-radius:20px;width:calc(100% - 14px)}.arcade-game-heading h2{font-size:20px}.arcade-game-tools{gap:3px}.arcade-game-tools .icon-button{width:28px;height:30px;font-size:16px}.arcade-back{min-height:33px;padding:3px 8px}.arcade-playfield{border-width:2px}.arcade-overlay-card{padding:19px 17px}.arcade-overlay-card h3{font-size:20px}.arcade-dpad button,.arcade-piece-controls button{width:40px;height:40px}.glasses-grid{gap:8px}.glasses-choice strong{font-size:11px}.page-heading h1{font-size:29px}}
@media(max-width:360px){.app-shell{padding-inline:15px}.brand{font-size:35px}.brand-domain{font-size:17px}.brand-eyes{width:44px}.quiet-button{padding-inline:11px}.topbar-actions{gap:4px}.arcade-home-heading h1{font-size:52px}.portal-filters button{padding-inline:9px;font-size:11px}.arcade-card-visual,.arcade-card-featured .arcade-card-visual,.arcade-grid[data-filtered=true] .arcade-card-visual{height:235px}.arcade-card-copy h2,.arcade-card-featured .arcade-card-copy h2{font-size:28px}.arcade-palette{gap:4px}.palette-dots i{width:12px;height:12px}.game-dialog.arcade-game-dialog{padding:9px}.arcade-game-heading h2{font-size:18px}}
@media(prefers-reduced-motion:reduce){.arcade-card,.portal-shuffle,.button,.arcade-dpad button,.arcade-piece-controls button{transition:none}.arcade-card:hover,.arcade-card:nth-child(even):hover{transform:none}}
/* Square illustrations keep their faces in view at every card width. */
.arcade-card-visual,.arcade-card-featured .arcade-card-visual{height:auto;aspect-ratio:1.32}
.arcade-card:not(.arcade-card-featured) .arcade-card-visual,.arcade-grid[data-filtered=true] .arcade-card-visual{height:auto;aspect-ratio:1.12}
@media(max-width:760px){.arcade-card-visual,.arcade-card-featured .arcade-card-visual{aspect-ratio:1.12}}
/* Playable cartoon scenes, with themed chrome outside the calibrated canvas. */
.arcade-game-dialog{--game-accent:#d4f638}
.arcade-game-dialog[data-game=snake]{--game-accent:#b5dc61;width:min(740px,calc(100% - 24px))}
.arcade-game-dialog[data-game=blocks]{--game-accent:#ffac8b;width:min(740px,calc(100% - 24px))}
.arcade-game-dialog[data-game=memory]{--game-accent:#8dddc4;width:min(680px,calc(100% - 24px))}
.arcade-game-dialog[data-game=breaker]{--game-accent:#97d9ee;width:min(920px,calc(100% - 24px))}
.arcade-game-dialog[data-game=catch]{--game-accent:#ffe16b;width:min(820px,calc(100% - 24px))}
.arcade-game-heading{padding:0 0 12px;border-bottom:3px solid var(--ink)}
.arcade-game-identity{display:flex;align-items:center;justify-content:center;gap:11px;min-width:0}
.arcade-game-identity h2{line-height:1.05;white-space:nowrap}
.arcade-game-badge{position:relative;overflow:hidden;border:2px solid var(--ink);border-radius:13px;width:46px;height:46px;flex-shrink:0;background:var(--game-accent)}
.arcade-game-badge .portal-art{width:100%;height:100%}
.arcade-hud{padding:10px 1px 9px;margin:0;min-height:62px}
.arcade-score{border:2px solid var(--ink);border-radius:99px;background:var(--game-accent);padding:5px 16px;min-width:78px;justify-content:center;font-size:28px;line-height:1.1}
.arcade-score>span{color:var(--ink);font-size:16px}
.arcade-playfield{box-shadow:0 5px 0 var(--game-accent);border-width:3px;border-radius:20px}
.arcade-canvas{height:min(560px,calc(100dvh - 240px))}
.arcade-overlay-card{background:#fff7df;max-width:330px}
.arcade-overlay-decoration.brand-eyes{display:flex;margin:0 auto 17px;transform:rotate(-7deg)}
.arcade-overlay-card .button.primary{background:var(--game-accent)}
.arcade-controls{padding-top:16px;min-height:62px}
.arcade-dpad button,.arcade-piece-controls button{background:var(--game-accent)}
@media(max-width:700px){.game-dialog.arcade-game-dialog{width:calc(100% - 14px);padding:11px}.arcade-game-heading{padding-bottom:10px;gap:5px}.arcade-game-identity{gap:6px}.arcade-game-identity h2{font-size:20px}.arcade-game-badge{width:34px;height:34px;border-radius:10px}.arcade-game-tools .icon-button{width:28px;height:30px}.arcade-hud{min-height:52px;padding:8px 0}.arcade-score{font-size:24px;padding:4px 12px;min-width:68px}.arcade-canvas{height:min(505px,calc(100dvh - 230px))}.arcade-controls{min-height:55px;padding-top:12px}.arcade-controls>span{font-size:9px}.arcade-game-palette span{font-size:9px}}
@media(max-width:400px){.arcade-game-badge{display:none}.arcade-game-identity h2{font-size:19px}.arcade-game-identity{gap:0}.arcade-game-heading{grid-template-columns:auto minmax(0,1fr) auto}.arcade-game-tools{gap:3px}.arcade-game-palette span{display:none}.arcade-score{font-size:23px}.arcade-game-palette i{width:9px;height:9px}.arcade-controls>span:not(.arcade-record){display:none}}
@media(max-height:650px) and (min-width:701px){.arcade-game-badge{display:none}.arcade-game-heading{padding-bottom:6px}.arcade-hud{min-height:45px;padding:5px 0}.arcade-controls{padding-top:10px;min-height:50px}}
/* One question starts a player profile. */
.age-welcome{position:relative;width:min(460px,100%);margin:clamp(25px,8vh,100px) auto 50px;padding:38px 30px 34px;background:var(--paper);border:3px solid var(--ink);border-radius:32px;box-shadow:7px 8px 0 var(--ink);text-align:center}
.age-mascot.brand-eyes{display:flex;transform:scale(1.5) rotate(-7deg);margin:12px auto 35px}
.age-welcome h1{font-family:var(--display-font);font-size:clamp(34px,7vw,48px);letter-spacing:-1.5px;margin:0 0 26px}
.age-welcome form{display:flex;flex-direction:column;align-items:center}
.age-input-wrap{display:flex;align-items:center;justify-content:center;gap:14px;width:190px;border:3px solid var(--ink);border-radius:20px;background:#fffdf0;padding:10px 18px}
.age-input-wrap:focus-within{outline:3px solid #246db6;outline-offset:5px}
.age-input-wrap input{width:95px;min-width:0;appearance:textfield;-moz-appearance:textfield;background:transparent;border:0;outline:0;font:800 58px var(--display-font);color:var(--ink);text-align:center;padding:0}
.age-input-wrap input:focus-visible{outline:0}.age-input-wrap input::-webkit-inner-spin-button,.age-input-wrap input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.age-input-wrap input::placeholder{color:#b0b99a}.age-input-wrap span{font-size:22px;color:var(--muted)}
.age-error{min-height:24px;margin:10px 0;font-size:13px;color:#a43e2d}
.age-welcome .button{width:220px;max-width:100%;font-size:18px}.age-welcome .micro-button{margin-top:18px}
.age-spark{position:absolute;color:#e99f3a;font-size:32px;pointer-events:none}.spark-left{left:24px;top:50px;transform:rotate(-12deg)}.spark-right{right:22px;top:112px;font-size:23px}
.player-profile .profile-age-label{display:block;margin:0 0 10px;font-weight:700;font-size:14px}
.player-profile #profile-presets{display:inline-flex;align-items:center;gap:8px;margin-top:24px}
.topbar-actions #profiles-open .nav-label{display:inline}
@media(max-width:560px){.topbar-actions #profiles-open{font-size:13px;padding-inline:9px}}
body[data-age-band=older]{--lime:#bce0bd}body[data-age-band=older] .arcade-card:hover{transform:translateY(-3px)}body[data-age-band=older] .portal-question{transform:none}
@media(max-width:560px){.age-welcome{padding:30px 22px;margin-top:25px}.portal-player-tools{gap:6px}.portal-age{font-size:12px;min-height:40px;padding:7px 11px}.age-welcome:not(.player-profile)~*{display:none}}
@media(max-height:600px){.age-welcome{margin:18px auto 30px;padding-top:20px;padding-bottom:22px}.age-mascot.brand-eyes{margin:6px auto 22px;transform:scale(1.1) rotate(-7deg)}.age-welcome h1{margin-bottom:16px;font-size:34px}.age-input-wrap{padding-block:4px}.age-input-wrap input{font-size:43px}}
@media(max-width:560px){.arcade-home-heading{flex-wrap:wrap;gap:14px}.portal-player-tools{margin-left:auto}}
/* One consistent icon family; cards carry just the illustration, name and play. */
.ui-icon{width:20px;height:20px;display:block;flex:none;pointer-events:none}
.button>.ui-icon{width:18px;height:18px;margin:0}
.quiet-button,.icon-button,.arcade-back{transition:background-color .12s ease,box-shadow .12s ease,transform .12s ease}
.quiet-button:active:not(:disabled){transform:translateY(1px)}
.button:disabled,.icon-button:disabled{box-shadow:none}
@media(hover:hover){.button.secondary:hover:not(:disabled){background:#f2f6df}.icon-button:not(:disabled):hover{background:#edf3d6}}
@media(prefers-reduced-motion:reduce){.quiet-button,.icon-button,.arcade-back,.button{transition:none}}
.icon-button,.arcade-back,.button,.portal-age,.arcade-palette,.portal-footer button{display:inline-flex;align-items:center;justify-content:center;gap:9px}
.arcade-play .ui-icon{width:23px;height:23px;margin:0;transform:none}
.arcade-card-copy{justify-content:space-between}.arcade-home-heading{margin-bottom:28px}
.portal-age .ui-icon{width:15px;height:15px}.arcade-palette>.ui-icon{width:17px;height:17px}
.arcade-back .ui-icon{width:19px;height:19px}.arcade-game-tools .ui-icon{width:19px;height:19px}
.arcade-dpad button,.arcade-piece-controls button{display:flex;align-items:center;justify-content:center}
.arcade-dpad .ui-icon{width:23px;height:23px}.arcade-piece-controls .ui-icon{width:21px;height:21px}
.arcade-overlay-card .button{gap:12px}.arcade-overlay-card .button .ui-icon{width:18px;height:18px}
@media(max-width:560px){.portal-age{gap:7px}.arcade-home-heading{margin-bottom:24px}}

/* Read-only personal records: no extra profile questions. */
.player-profile{margin-bottom:26px}
.player-progress{width:min(600px,100%);margin:0 auto 40px;padding:23px;border:2px solid #29463275;border-radius:24px;background:#fffbee;box-shadow:0 3px 0 #173c2a18}
.player-progress>h2{font:800 24px var(--display-font);margin-bottom:20px;letter-spacing:-.6px}
.progress-mode+.progress-mode{margin-top:22px}.progress-mode h3{font-size:12px;font-weight:700;color:var(--muted);margin:0 0 8px}
.progress-game{display:flex;align-items:center;gap:10px;min-height:56px;border-top:1px solid #173c2a15}.progress-game-art{position:relative;display:block;flex:none;width:34px;height:34px;border-radius:10px;overflow:hidden;border:1px solid #173c2a30}.progress-game-art .portal-art{height:100%}.progress-game-name{font:800 16px var(--display-font);letter-spacing:-.3px}.progress-trend{width:80px;height:28px;margin-left:auto;flex:none;stroke:#80a876;fill:none;stroke-width:1;stroke-linejoin:round;stroke-linecap:round}.progress-trend polyline{stroke:#377c49;stroke-width:2}.progress-trend circle{fill:#377c49;stroke:none}.progress-best{min-width:48px;text-align:right;font:800 21px var(--display-font);font-variant-numeric:tabular-nums}
@media(max-width:360px){.player-progress{padding:17px}.progress-game-name{font-size:14px}.progress-trend{width:54px}.progress-game{gap:7px}.progress-best{font-size:19px;min-width:40px}}
/* The returning player's form stays compact, leaving room for achievements. */
.age-welcome.player-profile{display:grid;grid-template-columns:minmax(0,1fr) 140px;column-gap:20px;row-gap:6px;width:min(600px,100%);margin:28px auto 24px;padding:24px;text-align:left}
.player-profile .age-mascot.brand-eyes{grid-column:1;grid-row:1;width:53px;height:36px;margin:0;transform:scale(.8) rotate(-7deg);transform-origin:left center}
.player-profile .age-spark{display:none}.player-profile h1{grid-column:1;grid-row:2;align-self:start;font-size:32px;line-height:1.1;margin:0;letter-spacing:-1px}
.player-profile #age-form{grid-column:2;grid-row:1 / span 3;gap:8px}.player-profile .profile-age-label{font-size:12px;margin:0}.player-profile .age-input-wrap{width:140px;padding:5px 10px;gap:8px;border-width:2px;border-radius:16px}.player-profile .age-input-wrap input{width:72px;font-size:42px}.player-profile .age-input-wrap span{font-size:17px}
.player-profile .age-error{margin:0;min-height:0;font-size:12px}.player-profile .age-error:empty{display:none}.player-profile .button{width:140px;min-width:0;min-height:44px;padding:10px 14px;font-size:15px}.player-profile #profile-presets{grid-column:1;grid-row:3;align-self:end;justify-self:start;margin:0;padding:8px 0;font-size:12px;min-height:44px}
@media(max-width:420px){.age-welcome.player-profile{grid-template-columns:minmax(0,1fr) 116px;padding:20px;column-gap:12px}.player-profile h1{font-size:27px}.player-profile .age-input-wrap,.player-profile .button{width:116px}.player-profile .age-input-wrap input{width:61px;font-size:38px}.player-profile .age-input-wrap span{font-size:15px}.player-profile #profile-presets{font-size:11px}}
/* Profile and daily play: a compact, shared card. */
.age-welcome.player-profile{display:block;width:min(640px,100%);padding:28px;text-align:left}.player-profile .age-mascot.brand-eyes{margin:0 0 12px}.player-profile h1{margin:0 0 24px}.player-profile #age-form{display:grid;grid-template-columns:1fr 1.3fr 1fr;gap:10px 16px;align-items:end}.player-profile .profile-age-label{grid-column:1;grid-row:1}.player-profile .age-input-wrap{grid-column:1;grid-row:2;width:auto;height:52px;padding:8px 10px;border-radius:14px}.player-profile .age-input-wrap input{width:100%;min-width:0;font-size:24px}.player-profile .age-input-wrap span{font-size:13px}.profile-field{display:flex;flex-direction:column;gap:10px;font-weight:700;font-size:12px;grid-row:1 / span 2}.profile-field select,.goal-input-wrap{height:52px;border:2px solid var(--ink);border-radius:14px;background:#fffef5;color:var(--ink);font:800 18px var(--display-font);padding:8px 12px;box-shadow:0 2px 0 #173c2a12}.profile-field select{width:100%}.goal-input-wrap{display:flex;align-items:center;gap:8px}.goal-input-wrap input{width:100%;min-width:0;border:0;background:transparent;color:inherit;font:inherit;outline-offset:3px}.goal-input-wrap>span{font:700 12px var(--body-font,sans-serif)}.player-profile .age-error{grid-column:1 / -1;grid-row:3}.player-profile .button{grid-column:1 / -1;width:100%;margin-top:8px}.player-profile #profile-presets{margin-top:14px}.player-profile~.daily-summary{width:min(640px,100%);margin:0 auto 24px}
.daily-summary{position:relative;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 18px;border:2px solid #23472f;border-radius:23px;background:#fffbea;box-shadow:0 3px 0 #23472f24;min-width:0;color:#173c2a}.daily-goal{display:flex;gap:12px;align-items:center;min-width:0}.daily-goal strong{font-family:var(--display-font);font-size:24px;line-height:1.1;font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap}.daily-goal small,.daily-streak small{display:block;font-size:11px;font-weight:700;opacity:.7;margin-top:3px;white-space:nowrap}.daily-ring{position:relative;width:44px;height:44px;flex:none}.daily-ring>svg{width:44px;height:44px;fill:none;stroke:#dce5c7;stroke-width:4;transform:rotate(-90deg)}.daily-ring .daily-ring-fill{stroke:#73ae51;stroke-linecap:round;transition:stroke-dashoffset .5s ease}.daily-ring>span{position:absolute;inset:0;display:grid;place-items:center}.daily-ring .ui-icon{width:21px;height:21px;color:#43824f}.daily-streak{display:flex;align-items:center;gap:6px;padding-left:16px;border-left:1px solid #23472f24;color:#8c9784}.daily-streak>.ui-icon{width:30px;height:36px}.daily-streak strong{display:block;font:800 25px var(--display-font);line-height:1}.daily-streak.is-lit{color:#d87529}.arcade-home-heading>.daily-summary{min-width:290px;max-width:360px}.arcade-home-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.daily-achievement{position:absolute;left:50%;top:-18px;display:flex;align-items:center;gap:7px;transform:translate(-50%,-100%);padding:10px 16px;border:2px solid #23472f;border-radius:16px;background:#ffdf78;color:#173c2a;font:800 14px var(--display-font);white-space:nowrap;box-shadow:0 3px 0 #23472f24;pointer-events:none;animation:daily-achievement-in 2.6s both;z-index:5}.daily-achievement>.ui-icon{width:24px;height:28px;color:#d87529}.daily-achievement i{position:absolute;left:50%;top:50%;width:6px;height:6px;background:#e5932e;transform:rotate(calc(var(--spark)*60deg)) translateY(-40px);border-radius:2px;animation:daily-spark 1s ease-out both}.just-completed .daily-streak>.ui-icon{animation:daily-flame .8s ease both}
@keyframes daily-flame{0%,100%{transform:scale(1)}35%{transform:scale(1.35) rotate(-9deg)}65%{transform:scale(.95) rotate(5deg)}}@keyframes daily-achievement-in{0%{opacity:0;transform:translate(-50%,-70%) scale(.8)}12%,80%{opacity:1;transform:translate(-50%,-100%) scale(1)}100%{opacity:0;transform:translate(-50%,-110%) scale(.95)}}@keyframes daily-spark{0%{opacity:0;scale:.2}30%{opacity:1}100%{opacity:0;transform:rotate(calc(var(--spark)*60deg)) translateY(-70px);scale:.6}}
@media(max-width:620px){.arcade-home-heading{align-items:stretch;flex-direction:column;gap:16px}.arcade-home-heading>.daily-summary{width:100%;min-width:0;max-width:none}.age-welcome.player-profile{padding:22px}.player-profile #age-form{grid-template-columns:1fr 1.1fr 1fr;gap:10px}.profile-field select{font-size:15px;padding-inline:8px}.goal-input-wrap{padding-inline:9px}.daily-goal strong{font-size:21px}.daily-summary{padding:12px 14px;gap:12px}.daily-streak{padding-left:12px}}
@media(prefers-reduced-motion:reduce){.daily-ring-fill{transition:none}.daily-achievement,.just-completed .daily-streak>.ui-icon,.daily-achievement i{animation:none}.daily-achievement i{display:none}}
.player-profile input[type=number]{appearance:textfield;-moz-appearance:textfield}.player-profile input[type=number]::-webkit-inner-spin-button,.player-profile input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
@media(max-width:420px){.player-profile #age-form{grid-template-columns:1fr 1.3fr;gap:10px 14px}.player-profile .profile-field[for=player-goal]{grid-row:3;grid-column:1 / -1;display:grid;grid-template-columns:1fr 1.3fr;align-items:center;gap:14px}.player-profile .age-error{grid-row:4}.player-profile .button{grid-row:5;margin-top:0}.profile-field select{font-size:16px}.goal-input-wrap{font-size:22px}}
html[lang=en] .portal-card-catch .arcade-card-copy h2{font-size:clamp(17px,2.4vw,25px)}

/* One clear doorway to player and glasses settings. */
.setup-banner{display:grid;grid-template-columns:72px minmax(0,1fr) auto;align-items:center;gap:18px;padding:18px 22px;margin:0 0 28px;border:2px solid var(--ink);border-radius:22px;background:#ffdf72;box-shadow:0 4px 0 #d4af40}
.setup-banner-art{display:block;width:72px;height:72px;border:2px solid var(--ink);border-radius:21px;background:#fff3b9;rotate:-6deg;box-shadow:0 3px 0 #d9b650}.setup-banner-art svg{display:block;width:100%;height:100%}
.setup-banner h2{font:800 clamp(20px,2.3vw,28px)/1.15 var(--display-font);letter-spacing:-.65px;max-width:440px;margin:0;text-wrap:balance}
.setup-banner-actions{display:flex;align-items:center;gap:10px}.setup-banner .button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;min-width:0;padding:11px 16px;border:1.5px solid var(--ink);border-radius:13px;box-shadow:0 3px 0 #a68c36;font-size:14px;font-weight:800}.setup-banner .setup-profile{background:#fff8df;color:var(--ink)}.setup-banner .setup-calibrate{background:var(--ink);color:#fff8df}.setup-banner .button .ui-icon{width:20px;height:20px}.setup-banner .button:hover{filter:brightness(1.05);translate:0 -1px}.setup-banner .button:active{translate:0 2px;box-shadow:0 1px 0 #a68c36}
@media(max-width:850px){.setup-banner{grid-template-columns:64px minmax(0,1fr);gap:14px;padding:18px}.setup-banner-art{width:64px;height:64px}.setup-banner-actions{grid-column:2}.setup-banner h2{max-width:none}.setup-banner .button{flex:1}}
@media(max-width:560px){.setup-banner{grid-template-columns:56px minmax(0,1fr);border-radius:20px;gap:14px;padding:16px;margin-bottom:26px}.setup-banner-art{width:56px;height:56px;border-radius:17px}.setup-banner h2{font-size:23px;letter-spacing:-.5px}.setup-banner-actions{grid-column:1 / -1;gap:10px}.setup-banner .button{padding:10px 12px;font-size:14px}}
@media(prefers-reduced-motion:reduce){.setup-banner .button:hover,.setup-banner .button:active{translate:none}}

.calibration-save-status{text-align:center;color:var(--muted);font-size:13px;line-height:1.5;margin:14px 0 0}.calibration-save-status.error{color:#97512d}.result-status .ui-icon{width:25px;height:25px}
.privacy-note{max-width:420px;text-align:right}.privacy-note summary{display:inline-block;min-height:44px;padding:13px 0;font-size:12px;text-decoration:underline;text-underline-offset:4px}.privacy-note p{font-size:12px;line-height:1.6;margin:8px 0 0;color:var(--muted)}.portal-footer:has(.privacy-note[open]){align-items:flex-start}.privacy-note[open]{text-align:left}
