/* Mission Arcade v0.6.3 – visual only. Game logic & localStorage schema unchanged. */
:root{--ink:#eef8ff;--muted:#adc6df;--outline:#355779;--glass:#142940;--sun:#ffd467;--mint:#61efba;--sky:#67dff4}
html{background:#091728;color:var(--ink)}
body{color:var(--ink);background:
 radial-gradient(ellipse 72% 30% at 10% -3%,rgba(0,177,171,.19),transparent 85%),
 radial-gradient(ellipse 80% 38% at 100% 29%,rgba(35,95,190,.24),transparent 85%),
 linear-gradient(175deg,#071522 0%,#0c1c31 43%,#091522 100%);
 background-attachment:fixed}
main{max-width:670px;padding-left:clamp(14px,4vw,24px);padding-right:clamp(14px,4vw,24px)}
header{padding-top:4px}
.brand{font-size:clamp(16px,4.3vw,21px);letter-spacing:.04em;white-space:nowrap;line-height:1.1}
.cyan{color:#71e8e6}
h1{font-size:clamp(30px,8vw,44px);letter-spacing:-.035em;line-height:1.08;margin-top:24px}
h2{letter-spacing:-.015em}
p,.muted{color:var(--muted)}
.badge{border:1px solid #3e627e;background:#19334d;color:#ffe398;box-shadow:inset 0 1px rgba(255,255,255,.09)}
.panel,.stat,.status,.levelpicker{background:linear-gradient(145deg,#172f49,#102239);border-color:#365474;box-shadow:0 6px 20px rgba(0,0,0,.12)}
.tab,.btn{border-radius:14px;border-color:#3b6083;background:linear-gradient(145deg,#193857,#152a43);box-shadow:inset 0 1px 0 rgba(255,255,255,.08)}
.tab.active,.btn.primary{color:#061e2e;background:linear-gradient(120deg,#86f4c5,#58d8ed);border-color:#bafbe0;text-shadow:none}
.tabs{gap:8px;padding-bottom:7px;margin:20px -2px 18px;scrollbar-width:thin;scrollbar-color:#38647b transparent}
.tab{flex:0 0 auto;min-width:90px;white-space:nowrap;min-height:46px;padding:11px 12px;font-size:13px}
button:focus-visible,select:focus-visible{outline:3px solid #ffce62;outline-offset:2px}
.profile-switch,.profile select{color:#ebfaff;background:#1a3651;border-color:#457494}
.bar{background:#203d52}
.bar>span{background:linear-gradient(90deg,#5eeec6,#ffe17a)}
.eyebrow{font-size:10px;letter-spacing:.15em;color:#8bedd6;font-weight:900}
.games-intro{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:6px 0 19px}
.games-intro h2{font-size:clamp(21px,5.6vw,29px);margin:3px 0 5px}
.games-intro p{font-size:13px;line-height:1.4;margin:0;max-width:32ch}
.games-count{color:#ffdc84;min-width:64px;font-size:29px;font-weight:900;letter-spacing:-.04em;line-height:1;text-align:center;border:1px solid #466277;border-radius:17px;padding:12px 9px;background:linear-gradient(135deg,#1b3c55,#18273e)}
.games-count span{display:block;color:#98bdd4;font-size:9px;letter-spacing:.1em;margin-top:4px}
.grid.games-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.games-grid .game-tile{--accent:#65dcee;position:relative;min-width:0;min-height:216px;padding:13px;border:1px solid #345a77;border-radius:21px;
 display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:6px;overflow:hidden;color:#fff;text-align:left;
 background:radial-gradient(circle at 96% 6%,color-mix(in srgb,var(--accent) 18%,transparent),transparent 65%),linear-gradient(148deg,#1a3650,#102135 85%);
 box-shadow:inset 0 1px 0 rgba(255,255,255,.10),0 9px 20px rgba(0,0,0,.16);
 transition:border-color .15s, transform .15s, box-shadow .15s;touch-action:manipulation}
.game-tile:active{transform:scale(.98)}
@media(hover:hover){.game-tile:hover{border-color:var(--accent);box-shadow:0 12px 27px rgba(0,0,0,.25)}}
.game-tile::before{content:"";height:3px;position:absolute;top:0;left:15px;right:15px;border-radius:0 0 4px 4px;background:var(--accent);opacity:.78}
.game-tile__top{align-self:stretch;display:flex;align-items:center;justify-content:space-between;line-height:1;margin-bottom:3px}
.game-tile__category{color:#a7c3d5;font-weight:850;font-size:10px;letter-spacing:.11em}
.game-tile__launch{display:grid;place-items:center;width:22px;height:22px;border-radius:8px;border:1px solid #45637c;color:#94c3d6;font-size:16px}
.game-tile__image{display:block;flex:0 0 auto;width:74px;height:74px;border-radius:18px;object-fit:contain;box-shadow:0 8px 15px rgba(0,0,0,.21)}
.game-tile__copy{display:flex;flex:1;flex-direction:column;gap:3px;justify-content:flex-end;padding-top:3px;min-width:0}
.game-tile__copy b{color:#f1f8ff;font-size:clamp(15px,4.4vw,18px);line-height:1.1;letter-spacing:-.02em}
.game-tile__copy small{font-size:12px;color:#b1c9dd;line-height:1.28}
.game-tile--ttt{--accent:#66dfea}
.game-tile--connect4{--accent:#f8a06a}
.game-tile--blocks{--accent:#73baf8}
.game-tile--maze{--accent:#7bf4bc}
.game-tile--circuit{--accent:#ffd177}
.game-tile--snake{--accent:#90f4a4}
.game-tile--drop{--accent:#b79af9}
.game-tile--water{--accent:#83e5f8}
.game-tile--gravity{--accent:#aba9ff}
.backrow{gap:10px;margin:7px 0 20px}
.game-heading{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0;font-size:clamp(15px,4.4vw,19px)}
.game-heading img{width:36px;height:36px;flex-shrink:0;border-radius:10px}
.game-heading b{line-height:1.16}
.backrow>.btn{flex-shrink:0}
#home .adventure-banner{border-color:#3d7e8e}
#home .place-card,#home .room-scene{border-color:#396078}
#home .room-scene{background:linear-gradient(160deg,#163651,#0b243d)}
.ttt-cell{background:linear-gradient(145deg,#1b4260,#1b2f4b);border-color:#416680}
.piece.selected,.levelgrid button.current-level{outline-color:#81f3d7;border-color:#76dcbe}
.toast{z-index:40}
@media(max-width:390px){
 .brand{font-size:16px}.top-profile{gap:4px}.top-profile .badge{padding:8px 7px;font-size:12px}.profile-switch{padding:9px 7px;font-size:11px}
 .games-grid .game-tile{padding:11px;min-height:211px}.game-tile__image{width:69px;height:69px}.grid.games-grid{gap:10px}
 .game-tile__copy small{font-size:11px}.game-heading img{width:32px;height:32px}
}
@media(max-width:330px){.grid.games-grid{grid-template-columns:1fr}.games-grid .game-tile{min-height:156px}.games-intro{align-items:flex-start}}
@media(prefers-reduced-motion:reduce){.games-grid .game-tile{transition:none}}
