/* Pocket arcade: the rainbow board carries the color; surrounding UI stays quiet. */
body{background:#101521;padding: max(14px,env(safe-area-inset-top)) 18px max(20px,env(safe-area-inset-bottom))}
header{margin:0 0 6px}.brand-icon{width:36px;height:36px}.wordmark .brand-name{font-size:25px}
.settings-trigger{font-size:14px;color:#b9c9df;padding:10px 8px;min-height:44px}
.game-tagline{font-size:14px;line-height:1.5;margin:4px 0 16px;color:#b5c3d9}
.arena{padding:18px 16px 14px;border-radius:26px;background:#1a2539;border-color:#35465e;box-shadow:0 5px 0 #090f1b}
.arena-head .eyebrow{font-size:12px;letter-spacing:1.1px}.pill{border:0;background:transparent;padding:0;font-size:12px}
.stats{margin-top:12px}.score{font-size:56px}.time{font-size:40px;line-height:1.4}.label{font-size:12px;letter-spacing:.6px}
.bank-label{display:flex;justify-content:space-between;color:#96aac6;font-size:11px;letter-spacing:.5px;margin-top:7px}.bank-label span{letter-spacing:0}
.track{height:7px;margin:5px 0 13px}.prompt{font-size:14px;margin-bottom:4px}.prompt #bonus{font-size:12px}
.learn-cue{font-size:13px;line-height:1.4;color:#b7c6dd;margin:4px 0 13px;min-height:36px}
.board{padding:6px 5px 12px;gap:13px 10px;border:0;background:#101a2b;box-shadow:none;border-radius:20px}
.tile{aspect-ratio:1.12;font-size:42px;border-radius:18px}.tile.ready::before{animation-iteration-count:3}
.sequence{display:none}.run-footer{margin-top:14px;font-size:12px;min-height:30px}
.topline{margin:0 0 10px;font-size:13px}.topline .text-button{font-size:14px}
body:not(.has-progress) .topline,body:not(.has-progress) .mission{display:none}
.mission{margin-top:16px;padding:12px;border:0;background:transparent}.mission .label{font-size:11px}.mission #missionDetail{font-size:13px}
.actions{margin-top:14px}.actions .secondary{box-shadow:none;background:transparent;border-color:#35465e;font-size:14px}
.rules{font-size:13px}.install-row,#installAfterRun{display:none}footer>span{display:none}footer{justify-content:center;flex-wrap:wrap}footer .text-button{font-size:13px}
.in-run .topline,.in-run .mission,.in-run .actions,.in-run .rules,.in-run footer{visibility:hidden}
#result{padding:25px 22px;border-radius:27px;background:#1a2539}#result h1{font-size:27px}.result-score{font-size:80px;text-shadow:none;margin:8px 0 14px}.result-stats{gap:20px}.result-stats span{font-size:13px}
#result .primary{min-height:54px;background:#deff8e;border:0;box-shadow:0 3px 0 #88a947;font-size:17px}
#result .secondary{min-height:50px;background:transparent;box-shadow:none}#same{font-size:14px}#closeResult{font-size:13px}#saveStatus{font-size:12px}.result-links{margin-top:10px}
.settings-list{display:grid;gap:12px;margin:15px 0}.settings-list .icon-button{display:flex;justify-content:space-between;width:100%;font-size:16px;min-height:54px;border:1px solid #41516c;background:#202d43;box-shadow:none;padding:12px 16px;color:#f8f8ff}
.setting-state::after{content:'Off';font-size:14px;color:#a6b0c9}[aria-pressed=true] .setting-state::after{content:'On';color:#deff8e}
@media(max-height:740px){body{padding-top:max(8px,env(safe-area-inset-top));padding-left:12px;padding-right:12px}.game-tagline{margin-bottom:8px}.arena{padding:12px}.stats{margin-top:5px}.score{font-size:44px}.time{font-size:34px}.tile{aspect-ratio:1.45;font-size:34px}.learn-cue{min-height:0;margin-bottom:9px}.run-footer{margin-top:10px}.topline{margin-bottom:4px}}
@media(prefers-reduced-motion:reduce){.tile.ready::before{animation:none}}

.next-goal{font-size:14px;line-height:1.5;color:#deff8e;margin:12px 0}button:disabled{cursor:default}#result[open]{max-height:calc(100dvh - 32px);overflow-y:auto}body.ad-visible{pointer-events:none}

/* Results: saturated arcade color with a quiet surface behind readable copy. */
#result{border:2px solid transparent;padding:26px 22px 22px;background:radial-gradient(ellipse at 0 0,#7b35bf55,transparent 48%),radial-gradient(ellipse at 100% 30%,#008fc344,transparent 50%),linear-gradient(#142344,#111b32) padding-box,linear-gradient(135deg,#ff68cb,#ac7bff 28%,#54ddff 52%,#86f7ba 72%,#ffe381) border-box;box-shadow:0 18px 70px #0009,0 0 30px #8275ff22,inset 0 1px 0 #ffffff25}
#result::before{content:'';display:block;width:112px;height:7px;border-radius:10px;margin:0 auto 18px;background:linear-gradient(90deg,#ff5681,#ffaf45,#ffe451,#6ef6a5,#46dfff,#ab85ff,#ff6fd1);box-shadow:0 0 20px #8b96ff66;pointer-events:none}
#result #resultEyebrow{display:inline-block;padding:6px 11px;border-radius:30px;background:#acc6ff12;border:1px solid #abcfff35;color:#a9eaff;font-size:11px;letter-spacing:1.8px}
#result h1{font-size:30px;font-weight:900;margin:13px 0 2px;color:#fff8e4;text-shadow:0 2px 0 #050d25}
#result .result-score{font-size:clamp(64px,19vw,88px);line-height:1.12;letter-spacing:-3px;margin:10px 0 4px;color:#ffe98a;text-shadow:0 3px 0 #ad6638,0 6px 0 #091127,0 0 30px #ffc74833;overflow-wrap:anywhere}
#result #deviceBest{margin:9px 0 19px;color:#c8d9f5;font-size:12px}
#result .result-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:14px}
#result .result-stats>div{min-width:0;border-radius:15px;padding:12px 4px 11px;border:1px solid #6be3ff55;background:linear-gradient(160deg,#224d67,#182b45);box-shadow:inset 0 1px 0 #ffffff18,0 3px 0 #080f22}
#result .result-stats>div:nth-child(2){border-color:#ff91bb55;background:linear-gradient(160deg,#57304e,#2b2341)}
#result .result-stats>div:nth-child(3){border-color:#b899ff55;background:linear-gradient(160deg,#43376c,#23294a)}
#result .result-stats strong{font-size:25px;color:#abf1ff;line-height:1.2}
#result .result-stats>div:nth-child(2) strong{color:#ffb7d0}#result .result-stats>div:nth-child(3) strong{color:#dac2ff}
#result .result-stats span{font-size:11px;color:#d3def1}
#result .next-goal{padding:11px 12px;border-radius:13px;border:1px solid #74f5c633;background:#16384088;color:#b5fadc;font-size:13px;margin:12px 0 17px}
#result .primary{min-height:57px;border:1px solid #fff4b9;border-radius:17px;background:linear-gradient(180deg,#fff2a3,#ffcf4f 55%,#ffb52e);color:#37220b;box-shadow:0 5px 0 #bc6f23,0 8px 20px #0004,inset 0 2px 0 #fff9;font-size:19px;font-weight:900;text-shadow:0 1px 0 #fff7}
#result .primary:active{transform:translateY(3px);box-shadow:0 2px 0 #bc6f23,inset 0 1px 0 #fff6}
#result #share{background:linear-gradient(135deg,#3c3370,#224c69);border-color:#9fbaff70;color:#eef6ff;border-radius:15px;box-shadow:inset 0 1px 0 #ffffff12}
#result .result-links .text-button{color:#bacff0}#result #saveStatus{color:#a9bad5}
#result .unlock{background:linear-gradient(135deg,#564522,#293f3b);border-color:#ffdb7555;color:#fff0b0}
@media(max-height:740px){#result{padding:18px 16px}#result::before{margin-bottom:12px}#result h1{font-size:26px}#result .result-score{font-size:64px}#result #deviceBest{margin-bottom:12px}#result .result-stats>div{padding:9px 3px}}

/* Compact dashboard: color lives at the edges so the board stays dominant. */
.arena-head{padding:0 2px 10px;border-bottom:1px solid #91afff20}
.arena-head .eyebrow{color:#bed5f4;font-size:10px;font-weight:850;letter-spacing:1.6px}
.arena-head .pill{padding:5px 9px;border:1px solid #ba9bff40;border-radius:9px;background:#a080ff10;color:#d5c8ff;font-size:10px;font-weight:800;letter-spacing:.8px}
.stats{gap:10px;align-items:stretch;margin-top:12px}
.stats>div{flex:1;min-width:0;padding:10px 12px 8px;border-radius:15px;border:1px solid #81afff25;background:linear-gradient(145deg,#ffffff06,#07122533);box-shadow:inset 0 1px 0 #ffffff08}
.stats>.clock{border-color:#91f2c529;background:linear-gradient(145deg,#63dfa50b,#07122533)}
.stats .label{font-size:9px;letter-spacing:1.25px;font-weight:800;color:#a9bfd9}
.stats .score{font-size:46px;line-height:1.2;color:#fff1bd;text-shadow:0 2px 0 #091222;letter-spacing:-1.5px;overflow-wrap:anywhere}
.stats .time{font-size:37px;line-height:1.5;color:#acffd5;letter-spacing:-1px}
.stats .time span{font-size:15px;color:#91bba8;margin-left:3px}
.bank-label{font-size:9px;font-weight:750;letter-spacing:1px;color:#87a0c1;margin:12px 2px 5px}.bank-label span{font-weight:500}
.track{height:8px;margin:0 0 12px;border:1px solid #8ab7ff25;background:#081325;box-shadow:inset 0 1px 3px #0006}
.fill{background:linear-gradient(90deg,#43baff,#61e6d1 48%,#b4f698);box-shadow:inset 0 1px 0 #ffffff88}
.prompt{font-size:13px;min-height:28px;margin-bottom:3px}.prompt b{border-color:#aad7ff55;background:#263c57;border-radius:8px;color:#fff3bf}
.prompt #bonus{color:#d6d1ff;font-size:11px;font-weight:800;background:#ab91ff10;border:1px solid #ab91ff25;padding:4px 7px;border-radius:8px}
.learn-cue{font-size:12px;margin:3px 0 11px;min-height:30px;color:#a5b6cc}
.low .stats>.clock{border-color:#ff876344;background:linear-gradient(145deg,#ff715015,#07122533)}
.low .stats .time{color:#ffb098}.low .fill{background:linear-gradient(90deg,#ff6789,#ffb478)}
@media(max-height:740px){.arena-head{padding-bottom:7px}.stats{margin-top:8px}.stats>div{padding:7px 10px 5px}.stats .score{font-size:36px}.stats .time{font-size:30px;line-height:1.4}.bank-label{margin-top:9px}.learn-cue{min-height:0;font-size:11px;margin-bottom:8px}}

/* Board-first phone layout. Keep identical geometry when a run starts. */
body{padding:max(8px,env(safe-area-inset-top)) 16px max(16px,env(safe-area-inset-bottom))}
.arena{padding:0;border:0;border-radius:0;background:none;box-shadow:none;overflow:visible}
.arena::before{display:none}
.arena-head{padding:0 0 8px;border:0;min-height:48px}
.arena-head .wordmark{display:flex;align-items:center;gap:9px;pointer-events:none}
.arena-head .brand-icon{width:40px;height:40px;border-radius:11px}
.arena-head .brand-name{font-size:29px;letter-spacing:-1.3px;color:#fff5dd}
.arena-head .brand-name>span{color:#85e7ff}
.settings-trigger{display:grid;place-items:center;min-width:44px;width:44px;height:44px;padding:0;border:1px solid #9bbfff30;border-radius:14px;background:#25334a;box-shadow:inset 0 1px 0 #ffffff12;color:#c6dbf5}
.settings-trigger svg{pointer-events:none}
.game-tagline,.bank-label,.prompt,.learn-cue,.rules{display:none}
.stats{margin-top:2px;gap:10px}
.stats>div{padding:8px 12px 6px}
.stats .score{font-size:42px}.stats .time{font-size:34px;line-height:1.45}
.track{margin:10px 2px 15px;height:7px}
.board{padding:5px 5px 12px;gap:13px 11px;background:transparent;box-shadow:none;border:0}
.tile{aspect-ratio:1.12;transform:none}
.tile:active{transform:none}
#particles,#particles *{pointer-events:none!important}
.run-footer{margin:12px 3px 0;min-height:26px;gap:6px;font-size:10px}
.run-footer .pill{font-size:10px;color:#c1aaff;white-space:nowrap}
#combo{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.topline{margin:14px 3px 0}.mission{margin-top:6px}
.arena.burst{animation:none}
.arena.burst .board{animation:none}
@keyframes mobile-board-clear{40%{box-shadow:0 0 0 2px #ffe599,0 0 26px #ffc65e55}}
@media(max-height:740px){body{padding-left:12px;padding-right:12px}.arena{padding:0}.arena-head{padding-bottom:4px}.stats{margin-top:0}.stats>div{padding:6px 10px}.stats .score{font-size:34px}.stats .time{font-size:29px}.track{margin:8px 2px 12px}.tile{aspect-ratio:1.32;font-size:36px}.run-footer{margin-top:9px}}

/* Shared rainbow edge light: decorative only, no layout or hit-area changes. */
:root{--rush-edge:linear-gradient(135deg,#ff68cb,#ac7bff 28%,#54ddff 52%,#86f7ba 72%,#ffe381)}
body::after{content:'';position:fixed;inset:0;z-index:5;pointer-events:none;border-radius:18px;padding:2px;background:var(--rush-edge);-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:.65}
body::before{background:radial-gradient(ellipse at 0 12%,#d052ff18,transparent 42%),radial-gradient(ellipse at 100% 55%,#43d9ff14,transparent 42%),radial-gradient(ellipse at 25% 100%,#67edb412,transparent 40%);mask-image:none;box-shadow:inset 7px 0 22px -18px #ef7bff,inset -7px 0 22px -18px #54ddff;pointer-events:none}
dialog:not(#result){border-color:transparent;background:radial-gradient(ellipse at 0 0,#7b35bf55,transparent 48%),radial-gradient(ellipse at 100% 30%,#008fc344,transparent 50%),linear-gradient(#142344,#111b32) padding-box,var(--rush-edge) border-box;box-shadow:0 18px 70px #0009,0 0 30px #8275ff22,inset 0 1px 0 #ffffff25}
.in-run::after{opacity:.4}

/* Illustrated edge artwork with a height-aware board and one safe-area inset. */
html{height:100%;overscroll-behavior:none}
body{min-height:100dvh;background:#081631 url('game-backdrop.png') center/cover fixed no-repeat;padding:max(8px,env(safe-area-inset-top)) 16px max(8px,env(safe-area-inset-bottom));margin:0}
main{width:min(100%,450px);margin:0 auto}body::before{display:none}
.mission{display:none}.topline{margin:8px 3px 0;font-size:11px;min-height:32px}.topline .text-button{font-size:12px;min-height:36px}
.actions{margin-top:6px}.actions .secondary{padding:11px 12px;background:#112746d9;border-color:#72a8da55}
footer{margin:6px 0 0;gap:12px}footer .text-button{font-size:11px;min-height:34px}
#status{font-size:11px;margin:3px 0;line-height:1.3}
.board{grid-template-rows:repeat(3,minmax(0,1fr));height:min(88vw,calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 290px));min-height:186px;max-height:390px}
.tile{aspect-ratio:auto;height:100%;min-height:0}.arena-head{min-height:48px}.stats>div{background:linear-gradient(145deg,#193052e8,#08172acc)}
@media(max-height:700px){.board{height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 270px)}.topline{margin-top:2px}.track{margin-bottom:9px}.run-footer{margin-top:5px}footer{margin-top:2px}}
@media(orientation:landscape) and (max-height:500px){body{overflow:auto}.board{height:220px}main{max-width:380px}}

/* One cohesive arcade wordmark, without an app-icon thumbnail. */
.arena-head .wordmark{gap:0;min-width:0;flex:1}.brand-lockup{display:block;width:min(100%,270px);height:52px;object-fit:contain;object-position:left center;filter:drop-shadow(0 2px 6px #010c2966)}.arena-head{gap:12px}
/* Readable supporting controls against the illustrated background. */
.topline{padding:2px 10px;margin:7px 0 0;border-radius:12px;background:#07152ee8;border:1px solid #9abbe033;color:#edf4ff;font-size:12px;min-height:38px}
.topline .text-button{color:#d8efff;font-size:13px;font-weight:750;min-height:36px}
footer{padding:2px 8px;border-radius:12px;background:#07152ee8;border:1px solid #9abbe033;gap:12px}
footer .text-button{color:#e1edff;font-size:12px;font-weight:650;min-height:36px;display:inline-flex;align-items:center}
#status:not(:empty){padding:5px 9px;border-radius:9px;background:#07152ee8;color:#cdddf3;font-size:12px;line-height:1.35}
.run-footer{color:#dce9fc;text-shadow:0 1px 3px #000}.run-footer .pill{color:#d9caff}#combo{color:#dedcff}
/* Keep edge lighting inside the rounded device viewport. */
body::after{inset:5px;border-radius:46px;padding:2px;opacity:.58}
#info h2{margin:8px 0 12px;font-size:27px}#info .eyebrow{color:#b4dfff;font-size:10px;letter-spacing:1.4px}
.guide-demo{display:flex;align-items:center;justify-content:center;gap:8px;margin:6px 0 20px}.guide-demo i{display:grid;place-items:center;width:40px;height:42px;border-radius:11px;background:#ff8598;color:#11203b;font-size:25px;font-style:normal;font-weight:900;box-shadow:0 3px 0 #080f29}.guide-demo i:nth-child(2){background:#ffd178}.guide-demo i:nth-child(3){background:#ffee8e}.guide-demo i:last-child{background:#ee9adf}
.guide-steps{padding:0;list-style:none;counter-reset:step;display:grid;gap:15px;margin:0 0 20px}.guide-steps li{position:relative;padding-left:36px;counter-increment:step}.guide-steps li::before{content:counter(step);position:absolute;left:0;top:0;display:grid;place-items:center;width:25px;height:25px;border-radius:50%;background:#80dfff20;color:#a0e9ff;font-weight:800}.guide-steps b{display:block;font-size:16px;color:#fff6d8;margin-bottom:4px}.guide-steps span{font-size:14px;color:#c6d5ed;line-height:1.5;display:block}
.guide-score{display:flex;justify-content:space-around;gap:6px;background:#091a31aa;border-radius:13px;padding:13px 7px;margin-bottom:15px;text-align:center}.guide-score span{font-size:10px;color:#c6d5ed}.guide-score b{display:block;color:#adf1d0;font-size:21px;margin-bottom:3px}
#info details{border-top:1px solid #9bbadd30;padding:12px 0}#info summary{font-size:13px;color:#d5e5ff;cursor:pointer}#info details p{font-size:13px;line-height:1.6;margin:10px 0 0}

#info .guide-multiplier{font-size:13px;line-height:1.5;color:#b9f5d6;background:#0c2534;padding:12px;border-radius:12px}

/* Banner occupies the existing two hidden control rows, with no layout shift. */
.in-run .topline{visibility:visible;pointer-events:none}
#runBannerSlot{position:fixed;left:50%;transform:translateX(-50%);width:320px;height:50px;pointer-events:none;background:#07152e;contain:layout paint}
#runBannerSlot[hidden]{display:none}
#runBannerSlot span{display:block;text-align:center;color:#a6b5ca;font:10px/50px system-ui}

/* Clear reward: bright perimeter, quiet center; opacity-only animation. */
.clear-board-aura,.clear-screen-aura{position:fixed;pointer-events:none!important;box-sizing:border-box;z-index:6;opacity:0}
.clear-board-aura{border:3px solid #fff3b0;border-radius:20px;box-shadow:0 0 6px #fff5c6,0 0 19px #ffc651e6,0 0 38px #ffbc405c,inset 0 0 13px #ffd66d80}
.clear-screen-aura{inset:5px;border-radius:46px;border:3px solid #ffe7a5;box-shadow:inset 0 0 13px #ffc95599,0 0 9px #ffe083cc; background:var(--rush-edge);padding:3px;-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude}
@media(prefers-reduced-motion:reduce){.clear-board-aura,.clear-screen-aura{display:none}}
