/* Moon Lander - all UI styles. rem based (the root font size is set by game.js from the window size); safe-area insets + 100dvh keep phones tidy.
   Sections: base, top bar + HUD, gauges, touch controls, banner + hint, overlays (menu, map, brief, cards, results, finale), responsive */
:root { --pn: linear-gradient(180deg, #2A2362, #181340); --wa: #9fe8ff; --top: 3.7rem; --sat: 0px; --sar: 0px; --sab: 0px; --sal: 0px; --ok: #7dff9a; --warn: #ffd23f; --bad: #ff5b5b; }
html, body { margin: 0; height: 100%; height: 100dvh; overflow: hidden; background: #0a0820; overscroll-behavior: none; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
body { font-family: var(--font-b); color: var(--paper); }
button { font-family: inherit; touch-action: manipulation; -webkit-tap-highlight-color: transparent; cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
svg.fill, .fill svg { fill: currentColor; stroke: none; }
#app, .ml { position: fixed; inset: 0; width: 100%; height: 100dvh; overflow: hidden; background: #0a0820; }
.cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.btn { gap: .5em; white-space: nowrap; min-height: 2.6em; font-size: 1rem; }
.btn svg { width: 1.2em; height: 1.2em; flex: none; }
.btn--ghost { --bg: rgba(255, 255, 255, .09); --sh: rgba(0, 0, 0, .35); }
.btn--big { font-size: 1.3rem; }
.btn.dis, .btn:disabled { opacity: .45; pointer-events: none; }
kbd { display: inline-block; font: 800 .8em var(--font-b); padding: .05em .45em; border-radius: .4em; background: #fff; color: var(--ink); box-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.shake { animation: mlshake .35s; }
@keyframes mlshake { 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }

/* ---------- top bar ---------- */
.bar { position: absolute; z-index: 50; left: 0; right: 0; top: 0; height: calc(var(--top) + var(--sat)); padding: var(--sat) calc(var(--sar) + .7rem) 0 calc(var(--sal) + .7rem); display: flex; align-items: center; justify-content: space-between; gap: .6rem; pointer-events: none; }
body.playing .bar { background: linear-gradient(180deg, rgba(10, 8, 30, .7), rgba(10, 8, 30, 0)); }
.bar > * { pointer-events: auto; }
.bl, .br { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.bc { position: absolute; left: 50%; top: calc(var(--sat) + .3rem); transform: translateX(-50%); display: none; flex-direction: column; align-items: center; gap: .2rem; pointer-events: none; }
body.playing .bc { display: flex; }
.lvname { font-family: var(--font-d); font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; text-shadow: 0 2px 0 rgba(0, 0, 0, .5); white-space: nowrap; }
.lvname b { font-weight: 400; color: var(--wa); margin-right: .5em; }
.mini { width: 17rem; height: 2.9rem; border-radius: .6rem; background: rgba(15, 11, 44, .55); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .14) inset; }
.home { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; padding: .35rem .9rem .35rem .35rem; border-radius: .9rem; background: rgba(15, 12, 34, .55); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .12) inset; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.home img { width: 2.2rem; height: 2.2rem; } .home b { font-family: var(--font-d); font-size: .95rem; font-weight: 400; } .home b i { font-style: normal; color: var(--lime); }
body.playing .home, body:not([data-view="main"]) .home { display: none; }
#bPause, .hp { display: none; }
body.playing #bPause { display: grid; } body.playing .hp { display: inline-flex; }
.tool { position: relative; width: 2.9rem; height: 2.9rem; border: 0; padding: 0; display: grid; place-items: center; border-radius: .85rem; background: rgba(28, 22, 70, .78); color: #fff; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .14) inset, 0 3px 0 rgba(0, 0, 0, .35); flex: none; transition: transform .12s, background .15s; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tool:hover { background: rgba(60, 50, 130, .95); transform: translateY(-1px); } .tool:active { transform: translateY(2px); }
.tool svg { width: 1.4rem; height: 1.4rem; }
.hp { align-items: center; gap: .45rem; height: 2.6rem; padding: 0 .85rem 0 .6rem; border-radius: .85rem; background: rgba(20, 14, 56, .82); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .12) inset; flex: none; }
.hp .pi svg { width: 1.3rem; height: 1.3rem; display: block; } .hp b { font-family: var(--font-d); font-weight: 400; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.hp.fuel { color: #C6FF3D; min-width: 11rem; } .hp.fuel b { color: #fff; min-width: 2.2ch; text-align: right; }
.fbar { display: block; flex: 1; height: .8rem; border-radius: .5rem; background: rgba(255, 255, 255, .14); overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 0, 0, .3) inset; }
.fbar i { display: block; height: 100%; width: 100%; transform-origin: left; background: linear-gradient(90deg, #7dff9a, #C6FF3D); border-radius: inherit; transition: transform .15s linear; }
.hp.fuel.low { color: var(--warn); animation: mlblink .7s steps(2) infinite; } .hp.fuel.low .fbar i { background: linear-gradient(90deg, #ff9a3c, #ffd23f); }
.hp.fuel.out { color: var(--bad); } .hp.fuel.out .fbar i { background: var(--bad); }
@keyframes mlblink { 50% { box-shadow: 0 0 0 1.5px rgba(255, 210, 63, .9) inset, 0 0 1rem rgba(255, 210, 63, .5); } }
.hp.gems { color: #7ff2ff; } .hp.gems.full { color: #C6FF3D; box-shadow: 0 0 0 1.5px rgba(198, 255, 61, .6) inset; }
.hp.gems.pop { animation: mlpop .35s; } @keyframes mlpop { 40% { transform: scale(1.18); } }

/* ---------- flight gauges ---------- */
.gauges { position: absolute; z-index: 20; left: 50%; bottom: calc(var(--sab) + .7rem); transform: translateX(-50%); display: none; gap: .4rem; pointer-events: none; }
.gauges.show { display: flex; }
.g { position: relative; min-width: 4.9rem; padding: .3rem .6rem .35rem; border-radius: .8rem; background: rgba(18, 12, 50, .8); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .13) inset; text-align: center; line-height: 1; transition: background .12s, box-shadow .12s; }
.g small { display: block; font-size: .58rem; font-weight: 800; letter-spacing: .16em; color: #B8B2E8; margin-bottom: .2rem; }
.g b { font-family: var(--font-d); font-weight: 400; font-size: 1.25rem; font-variant-numeric: tabular-nums; color: #fff; }
.g.ok b { color: var(--ok); } .g.warn { box-shadow: 0 0 0 1.5px rgba(255, 210, 63, .5) inset; } .g.warn b { color: var(--warn); } .g.bad { background: rgba(90, 14, 30, .85); box-shadow: 0 0 0 2px var(--bad) inset, 0 0 1rem rgba(255, 91, 91, .45); } .g.bad b { color: #ff9a9a; }
.g u { display: block; height: .22rem; margin: .22rem .1rem 0; border-radius: .2rem; background: rgba(255, 255, 255, .16); position: relative; overflow: hidden; }
.g u i { position: absolute; left: 42%; width: 16%; top: 0; bottom: 0; border-radius: .2rem; background: #fff; transition: transform .1s; }

/* ---------- touch controls (only on touch devices, only while flying) ---------- */
.tc { display: none; position: absolute; inset: 0; z-index: 25; pointer-events: none; }
body.is-touch .tc.show { display: block; }
.tcpad { position: absolute; left: calc(var(--sal) + 1.1rem); bottom: calc(var(--sab) + 1rem); width: max(180px, 17rem); height: max(86px, 7.6rem); border-radius: 5rem; pointer-events: auto; touch-action: none; display: flex; align-items: center; justify-content: space-between; padding: 0 1.2rem; color: rgba(255, 255, 255, .85);
  background: linear-gradient(180deg, rgba(60, 50, 140, .55), rgba(24, 18, 64, .65)); box-shadow: 0 0 0 2px rgba(255, 255, 255, .2) inset, 0 8px 22px rgba(0, 0, 0, .4); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); overflow: hidden; }
.tcpad::after { content: ""; position: absolute; inset: -1.5rem; }
.tcpad::before { content: ""; position: absolute; left: 50%; top: 14%; bottom: 14%; width: 2px; background: rgba(255, 255, 255, .18); }
.tcpad span { position: relative; z-index: 1; width: 3.2rem; height: 3.2rem; display: grid; place-items: center; border-radius: 50%; } .tcpad svg { width: 2.2rem; height: 2.2rem; stroke-width: 3; }
.tcpad em { position: absolute; left: 0; right: 0; bottom: .35rem; text-align: center; font: 800 .55rem var(--font-b); letter-spacing: .2em; font-style: normal; opacity: .55; }
.tcpad.l span.tl, .tcpad.r span.tr { background: var(--lime); color: var(--ink); box-shadow: 0 0 1.4rem rgba(198, 255, 61, .8); }
.tcthr { position: absolute; right: calc(var(--sar) + 1.2rem); bottom: calc(var(--sab) + .9rem); width: max(108px, 9.4rem); height: max(108px, 9.4rem); border-radius: 50%; pointer-events: auto; touch-action: none; display: grid; place-items: center; align-content: center; color: #fff;
  background: radial-gradient(circle at 35% 30%, #ff9a5c, #e0431a 62%, #8e2208); box-shadow: 0 0 0 3px rgba(255, 255, 255, .3) inset, 0 .5rem 0 #6a1604, 0 .9rem 1.6rem rgba(0, 0, 0, .45); transition: transform .06s, box-shadow .06s; }
.tcthr::after { content: ""; position: absolute; inset: -1.6rem; border-radius: 50%; }
.tcthr svg { width: 3.4rem; height: 3.4rem; } .tcthr em { font: 400 .8rem var(--font-d); font-style: normal; letter-spacing: .08em; margin-top: -.2rem; }
.tcthr.on { transform: translateY(.35rem); box-shadow: 0 0 0 3px rgba(255, 255, 255, .5) inset, 0 .15rem 0 #6a1604, 0 0 2.4rem rgba(255, 140, 60, .9); background: radial-gradient(circle at 35% 30%, #ffd08a, #ff6a2a 62%, #b02a0a); }
body.swap .tcpad { left: auto; right: calc(var(--sar) + 1.1rem); } body.swap .tcthr { right: auto; left: calc(var(--sal) + 1.2rem); }

/* ---------- banner + hint ---------- */
.banner { position: absolute; z-index: 35; left: 50%; top: 30%; transform: translate(-50%, -10px); text-align: center; pointer-events: none; opacity: 0; transition: opacity .3s, transform .35s var(--ease); width: min(92vw, 40rem); }
.banner.show { opacity: 1; transform: translate(-50%, 0); }
.banner b { display: block; font-family: var(--font-d); font-weight: 400; font-size: 2.6rem; line-height: 1; text-transform: uppercase; color: #fff; text-shadow: 0 .18rem 0 rgba(0, 0, 0, .5), 0 0 1.6rem var(--wa); }
.banner small { display: block; margin-top: .5rem; font-weight: 800; font-size: 1.05rem; color: #E6E2FF; text-shadow: 0 2px 0 rgba(0, 0, 0, .6); }
.banner.bad b { color: #ff6a5a; text-shadow: 0 .18rem 0 rgba(0, 0, 0, .55), 0 0 1.6rem #ff3a2a; } .banner.ok b { color: #7dff9a; text-shadow: 0 .18rem 0 rgba(0, 0, 0, .55), 0 0 1.6rem #3aff7a; } .banner.warn b { color: #ffd23f; }
.hint { position: absolute; z-index: 34; left: 50%; top: calc(var(--sat) + 6.4rem); transform: translate(-50%, -8px); max-width: min(34rem, 70vw); padding: .65rem 1.1rem; border-radius: 1rem; background: rgba(20, 14, 58, .92); box-shadow: 0 0 0 2px rgba(198, 255, 61, .55) inset, 0 .8rem 2rem rgba(0, 0, 0, .45); font-weight: 700; font-size: .98rem; line-height: 1.35; text-align: center; color: #F0EDFF; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s var(--ease); }
.hint.show { opacity: 1; transform: translate(-50%, 0); } .hint b { color: var(--lime); }

/* ---------- overlays ---------- */
.ov { position: absolute; inset: 0; z-index: 40; display: none; }
.ov.show { display: block; animation: mlfade .25s ease; }
@keyframes mlfade { from { opacity: 0; } }
.ov--center.show { display: grid; place-items: center; padding: calc(var(--sat) + 1rem) calc(var(--sar) + 1rem) calc(var(--sab) + 1rem) calc(var(--sal) + 1rem); overflow: auto; background: rgba(12, 9, 34, .6); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.ov--res.show { background: rgba(12, 9, 34, .35); }
.card { position: relative; width: min(30rem, 94vw); max-height: calc(100dvh - 2rem); overflow: auto; padding: 1.5rem 1.7rem 1.4rem; border-radius: 1.5rem; background: var(--pn); box-shadow: 0 0 0 2px rgba(255, 255, 255, .15) inset, 0 1.6rem 4rem rgba(0, 0, 0, .55); text-align: center; animation: mlcard .35s var(--ease); }
@keyframes mlcard { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.card h2 { margin: 0 0 .3rem; font-family: var(--font-d); font-weight: 400; font-size: 2rem; text-transform: uppercase; text-shadow: 0 .15rem 0 rgba(0, 0, 0, .4); }
.card .sub { margin: 0 0 1rem; color: #C9C4F0; font-weight: 600; }
.card .acts { display: grid; gap: .7rem; margin-top: 1.1rem; justify-items: stretch; } .acts .btn--big { width: 100%; }
.row3 { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.row3 .btn { padding-left: .6em; padding-right: .6em; font-size: .9rem; }

/* main menu */
.ov--menu.show { background: linear-gradient(90deg, rgba(10, 8, 30, .92) 0%, rgba(10, 8, 30, .7) 34%, rgba(10, 8, 30, .12) 62%, rgba(10, 8, 30, 0) 80%), linear-gradient(0deg, rgba(10, 8, 30, .5), rgba(10, 8, 30, 0) 30%); }
.ml .menu { width: auto; margin: 0; text-align: left; animation: none; position: absolute; inset: 0; display: flex; align-items: center; padding: calc(var(--sat) + 4.2rem) calc(var(--sar) + 3rem) calc(var(--sab) + 1.5rem) calc(var(--sal) + 3.2rem); }
.mn-l { max-width: 36rem; animation: mlcard .5s var(--ease); }
.kick { display: inline-flex; align-items: center; gap: .6em; font-weight: 800; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--wa); } .kick::before { content: ""; width: 2rem; height: 3px; border-radius: 3px; background: currentColor; }
.menu h1, .fin h1 { margin: .3rem 0 .6rem; font-family: var(--font-d); font-weight: 400; text-transform: uppercase; line-height: .88; font-size: 6.4rem; display: grid; justify-items: start; }
.menu h1 b, .fin h1 b { font-weight: 400; display: block; background: linear-gradient(100deg, #fff 0%, #9fe8ff 36%, #C6FF3D 62%, #fff 100%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; animation: mlslide 7s linear infinite; filter: drop-shadow(0 .06em 0 rgba(0, 0, 0, .5)) drop-shadow(0 0 .5em rgba(159, 232, 255, .3)); }
.menu h1 b.b2, .fin h1 b.b2 { margin-left: .35em; animation-delay: -1.5s; }
@keyframes mlslide { to { background-position: -220% 0; } }
.tag { margin: 0 0 1.3rem; font-size: 1.05rem; font-weight: 600; color: #DCD7FF; line-height: 1.5; max-width: 30em; }
.cta { display: flex; flex-wrap: wrap; gap: .8rem; } .cta .btn svg { fill: currentColor; stroke: none; } .cta .btn svg[class=""] { fill: none; stroke: currentColor; } .cta .btn svg:not(.fill) { fill: none; stroke: currentColor; }
.sub { }
.menu .sub { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.3rem; justify-content: inherit; }
.chip { padding: .45em .95em; border-radius: .9rem; background: rgba(255, 255, 255, .08); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .1) inset; line-height: 1.05; text-align: left; }
.chip small { display: block; font-size: .58rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: var(--mute); } .chip b { font-family: var(--font-d); font-weight: 400; font-size: 1.2rem; } .chip b i { font-style: normal; font-size: .7em; color: var(--mute); }
.orient { display: none; margin-top: 1rem; padding: .6rem .9rem; border-radius: .9rem; background: rgba(255, 210, 63, .14); color: #ffe9a0; font-weight: 700; font-size: .85rem; }

/* world map */
.ov--map.show { background: linear-gradient(180deg, rgba(9, 7, 28, .82) 0%, rgba(9, 7, 28, .5) 38%, rgba(9, 7, 28, .72) 100%); }
.map { position: absolute; inset: 0; display: flex; flex-direction: column; gap: .7rem; padding: calc(var(--sat) + .8rem) calc(var(--sar) + 1.5rem) calc(var(--sab) + .8rem) calc(var(--sal) + 1.5rem); overflow: auto; }
.mh { display: flex; align-items: center; gap: 1rem; padding-right: 7rem; } .mh h2 { margin: 0; font-family: var(--font-d); font-weight: 400; font-size: 1.8rem; text-transform: uppercase; flex: 1; text-shadow: 0 .15rem 0 rgba(0, 0, 0, .4); } .mh .chips { margin: 0; }
.worlds { display: grid; grid-template-columns: repeat(5, 1fr); gap: .6rem; }
.wc { --wa: #fff; display: flex; align-items: center; gap: .6rem; padding: .45rem .7rem .45rem .45rem; border-radius: 1rem; border: 0; color: #fff; text-align: left; background: rgba(255, 255, 255, .07); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .1) inset; transition: transform .12s, background .15s; min-width: 0; }
.wc:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .12); } .wc.on { background: linear-gradient(180deg, rgba(255, 255, 255, .17), rgba(255, 255, 255, .07)); box-shadow: 0 0 0 2.5px var(--wa) inset, 0 0 1.4rem color-mix(in srgb, var(--wa) 40%, transparent); }
.wc canvas { width: 3.4rem; height: 3.4rem; flex: none; } .wn { min-width: 0; } .wn b { display: block; font-family: var(--font-d); font-weight: 400; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .wn small { display: flex; align-items: center; gap: .25em; font-weight: 800; font-size: .72rem; color: #CFCBF5; } .wn small svg { width: .95em; height: .95em; color: var(--sun); }
.wc.lock { opacity: .55; } .wc.lock canvas { filter: grayscale(1) brightness(.6); }
.wdesc { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; } .wdesc h3 { margin: 0; font-family: var(--font-d); font-weight: 400; font-size: 1.15rem; color: var(--wa); text-transform: uppercase; } .wdesc h3 i { font-style: normal; color: #B8B2E8; font-size: .8em; margin-left: .4em; } .wdesc p { margin: 0; font-weight: 600; color: #DCD7FF; font-size: .92rem; flex: 1; min-width: 14rem; } .wch { display: flex; gap: .4rem; } .wch span { padding: .2em .7em; border-radius: 99px; background: rgba(255, 255, 255, .1); font-weight: 800; font-size: .72rem; }
.lvls { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: .7rem; align-content: end; padding-bottom: .4rem; }
.lv { position: relative; display: flex; flex-direction: column; gap: .35rem; padding: .55rem .55rem .7rem; border-radius: 1.1rem; border: 0; color: #fff; text-align: left; background: linear-gradient(180deg, #2c2468, #1a1445); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .14) inset, 0 .25rem 0 rgba(0, 0, 0, .35); transition: transform .12s, box-shadow .15s; min-width: 0; }
.lv:hover { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--wa) inset, 0 .35rem 0 rgba(0, 0, 0, .35), 0 0 1.2rem color-mix(in srgb, var(--wa) 35%, transparent); }
.lv.next { box-shadow: 0 0 0 2.5px var(--lime) inset, 0 .25rem 0 rgba(0, 0, 0, .35), 0 0 1.4rem rgba(198, 255, 61, .35); animation: mlnext 1.8s ease-in-out infinite; } @keyframes mlnext { 50% { box-shadow: 0 0 0 2.5px var(--lime) inset, 0 .25rem 0 rgba(0, 0, 0, .35), 0 0 2.2rem rgba(198, 255, 61, .6); } }
.lv.gold { box-shadow: 0 0 0 2px rgba(255, 210, 63, .7) inset, 0 .25rem 0 rgba(0, 0, 0, .35); }
.lv .num { position: absolute; left: .45rem; top: .4rem; z-index: 2; min-width: 1.7rem; height: 1.7rem; padding: 0 .3rem; display: grid; place-items: center; border-radius: .6rem; background: var(--wa); color: var(--ink); font: 400 1rem var(--font-d); box-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.lv canvas { width: 100%; height: auto; flex: none; aspect-ratio: 180 / 84; border-radius: .7rem; background: rgba(5, 4, 20, .45); display: block; }
.ln b { display: block; font-family: var(--font-d); font-weight: 400; font-size: .88rem; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ln small { display: block; font-weight: 700; font-size: .66rem; color: #B8B2E8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: .1rem; }
.stars { display: inline-flex; gap: .15rem; } .stars .st svg { width: 1.2rem; height: 1.2rem; color: rgba(255, 255, 255, .18); display: block; } .stars .st.on svg { color: var(--sun); filter: drop-shadow(0 0 .3rem rgba(255, 210, 63, .7)); }
.lv.lock { opacity: .6; } .lv.lock canvas { filter: grayscale(1) brightness(.55); } .lk { position: absolute; right: .55rem; bottom: .5rem; } .lk svg { width: 1.2rem; height: 1.2rem; color: #B8B2E8; }

/* mission brief */
.ov--brief.show { display: grid; place-items: center; background: rgba(8, 6, 26, .7); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); overflow: auto; padding: calc(var(--sat) + .8rem) calc(var(--sar) + 1rem) calc(var(--sab) + .8rem) calc(var(--sal) + 1rem); }
.bcard { width: min(33rem, 94vw); padding: 1.3rem 1.6rem 1.3rem; border-radius: 1.5rem; background: var(--pn); box-shadow: 0 0 0 2px rgba(255, 255, 255, .15) inset, 0 1.6rem 4rem rgba(0, 0, 0, .55); animation: mlcard .3s var(--ease); max-height: calc(100dvh - 1.6rem); overflow: auto; }
.bk { font-weight: 800; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--wa); } .bcard h2 { margin: .2rem 0 .6rem; font-family: var(--font-d); font-weight: 400; font-size: 2rem; text-transform: uppercase; }
.bprof { width: 100%; height: auto; aspect-ratio: 520 / 110; border-radius: .9rem; background: rgba(5, 4, 20, .5); display: block; }
.goals { list-style: none; margin: .8rem 0 .5rem; padding: 0; display: grid; gap: .35rem; } .goals li { display: flex; align-items: center; gap: .7rem; padding: .45rem .7rem; border-radius: .8rem; background: rgba(255, 255, 255, .07); font-weight: 700; font-size: .92rem; }
.goals li.done { background: rgba(198, 255, 61, .14); box-shadow: 0 0 0 1.5px rgba(198, 255, 61, .45) inset; }
.gs { display: inline-flex; min-width: 3.9rem; } .gs svg { width: 1.1rem; height: 1.1rem; color: var(--sun); } .goals li:not(.done) .gs svg { color: rgba(255, 255, 255, .3); } .goals li.done .gs svg { filter: drop-shadow(0 0 .25rem rgba(255, 210, 63, .8)); }
.bmeta { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .3rem; } .bmeta span { padding: .2em .75em; border-radius: 99px; background: rgba(255, 255, 255, .1); font-weight: 800; font-size: .72rem; }
.bbest { margin-top: .6rem; font-weight: 700; color: #CFCBF5; font-size: .85rem; } .bbest b { color: var(--sun); }
.bact { display: flex; gap: .7rem; margin-top: 1rem; justify-content: space-between; } .bact .btn--big { flex: 1; }

/* settings, how to, hangar */
.set { text-align: left; } .set h2, .how h2, .hang h2 { text-align: center; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid rgba(255, 255, 255, .08); } .rl b { display: block; font-weight: 800; } .rl small { display: block; color: #AFA9DA; font-weight: 600; font-size: .75rem; max-width: 18rem; line-height: 1.25; }
input[type=range] { width: 11rem; accent-color: var(--lime); height: 1.6rem; touch-action: pan-x; }
.sw { width: 3.2rem; height: 1.8rem; border: 0; border-radius: 1rem; background: rgba(255, 255, 255, .18); position: relative; flex: none; transition: background .15s; } .sw i { position: absolute; left: .2rem; top: .2rem; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: #fff; transition: transform .15s var(--ease); box-shadow: 0 2px 4px rgba(0, 0, 0, .4); } .sw.on { background: var(--lime); } .sw.on i { transform: translateX(1.4rem); background: var(--ink); }
.segs { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: flex-end; } .seg { border: 0; padding: .35em .7em; border-radius: .7rem; background: rgba(255, 255, 255, .1); color: #fff; font-weight: 800; font-size: .78rem; } .seg.on { background: var(--lime); color: var(--ink); }
.how { width: min(44rem, 94vw); } .hgrid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; text-align: left; } .hi { padding: .8rem .9rem; border-radius: 1rem; background: rgba(255, 255, 255, .07); } .hi > b { font-family: var(--font-d); font-weight: 400; font-size: 1.05rem; display: block; margin-bottom: .2rem; } .hi p b { color: #fff; font-weight: 800; } .hi p { margin: 0; font-weight: 600; font-size: .85rem; color: #DCD7FF; line-height: 1.4; }
.hico { display: inline-flex; gap: .2rem; width: auto; height: 2rem; align-items: center; color: var(--lime); float: right; } .hico svg { width: 1.7rem; height: 1.7rem; } .hk { margin: .9rem 0 0; font-size: .8rem; color: #B8B2E8; font-weight: 700; }
.hang { width: min(46rem, 94vw); } .skins { display: grid; grid-template-columns: repeat(5, 1fr); gap: .6rem; } .sk { border: 0; padding: .4rem .3rem .6rem; border-radius: 1rem; background: rgba(255, 255, 255, .07); color: #fff; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .1) inset; transition: transform .12s; } .sk:hover { transform: translateY(-2px); } .sk canvas { width: 100%; height: auto; aspect-ratio: 140 / 130; } .sk b { display: block; font-family: var(--font-d); font-weight: 400; font-size: .85rem; } .sk small { display: flex; justify-content: center; align-items: center; gap: .25em; font-weight: 800; font-size: .68rem; color: #B8B2E8; } .sk small svg { width: .95em; height: .95em; }
.sk.on { background: rgba(198, 255, 61, .16); box-shadow: 0 0 0 2.5px var(--lime) inset; } .sk.lock { opacity: .5; } .sk.lock canvas { filter: grayscale(1) brightness(.6); }

/* results */
.res { width: min(31rem, 94vw); } .rk { font-weight: 800; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--wa, #9fe8ff); }
.res.win h2 { color: #fff; text-shadow: 0 .15rem 0 rgba(0, 0, 0, .4), 0 0 1.4rem var(--wa); } .res.lose h2 { color: #ff6a5a; }
.rstars { display: flex; justify-content: center; gap: .6rem; margin: .5rem 0 .6rem; } .rs svg { width: 4.4rem; height: 4.4rem; color: rgba(255, 255, 255, .15); display: block; transform: scale(.6); opacity: .5; } .rs.on svg { color: var(--sun); animation: mlstar .6s var(--d) both var(--ease); filter: drop-shadow(0 0 .6rem rgba(255, 210, 63, .8)); }
.rs:nth-child(2) { margin-top: -.5rem; } @keyframes mlstar { 0% { transform: scale(0) rotate(-90deg); opacity: 0; } 60% { transform: scale(1.3) rotate(10deg); opacity: 1; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
.crit { list-style: none; margin: 0 0 .7rem; padding: 0; display: grid; gap: .35rem; text-align: left; } .crit li { display: flex; align-items: center; gap: .6rem; padding: .4rem .7rem; border-radius: .8rem; background: rgba(255, 255, 255, .06); font-weight: 700; font-size: .86rem; opacity: 0; animation: mlrise .4s var(--d) both var(--ease); }
@keyframes mlrise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }
.crit li.yes { background: rgba(198, 255, 61, .13); } .crit li.no { color: #AFA9DA; } .ci { width: 1.5rem; height: 1.5rem; border-radius: 50%; display: grid; place-items: center; flex: none; } .ci svg { width: .95rem; height: .95rem; stroke-width: 3.4; } .yes .ci { background: var(--lime); color: var(--ink); } .no .ci { background: rgba(255, 255, 255, .14); }
.rstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; } .rstats div { padding: .45rem .3rem; border-radius: .8rem; background: rgba(0, 0, 0, .22); } .rstats small { display: block; font-size: .56rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #AFA9DA; } .rstats b { font-family: var(--font-d); font-weight: 400; font-size: 1.05rem; }
.newb { margin-top: .6rem; padding: .35rem .8rem; border-radius: 99px; background: var(--sun); color: var(--ink); font-family: var(--font-d); font-size: .85rem; display: inline-block; animation: mlpop .6s .9s both; } .newb.skin { background: var(--lime); }
.tip, .why { margin: .7rem 0 0; font-weight: 700; font-size: .88rem; color: #E6E2FF; line-height: 1.4; } .why { font-family: var(--font-d); font-size: 1.15rem; color: #ffb0a6; margin-top: .3rem; font-weight: 400; }

body[data-view="result"] .bc, body[data-view="pause"] .bc, body[data-view="settings"] .bc, body[data-view="howto"] .bc { display: none; }
.rbody { display: block; } .rcol { min-width: 0; }
body.short .res { width: min(47rem, 94vw); padding: .8rem 1.3rem .9rem; } body.short .rbody { display: grid; grid-template-columns: 1.05fr .95fr; gap: 1rem; align-items: center; text-align: left; }
body.short .res h2 { font-size: 1.5rem; margin-bottom: .1rem; } body.short .rstars { margin: 0 0 .4rem; } body.short .rs svg { width: 2.8rem; height: 2.8rem; } body.short .crit { margin: 0; gap: .25rem; } body.short .crit li { padding: .28rem .6rem; font-size: .76rem; }
body.short .res .rstats { margin: 0; } body.short .res .acts { margin-top: .5rem; gap: .45rem; } body.short .res .btn--big { font-size: 1.05rem; min-height: 2.4em; } body.short .res .row3 .btn { min-height: 2.2em; font-size: .8rem; } body.short .newb { margin-top: .4rem; font-size: .75rem; } body.short .res .tip { margin-top: .35rem; font-size: .75rem; }
body.short .rk { font-size: .62rem; }
/* finale */
.ov--fin.show { background: radial-gradient(900px 600px at 50% 40%, rgba(42, 32, 100, .55), rgba(8, 6, 26, .82)); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.fin { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: calc(var(--sat) + 1rem) 1rem calc(var(--sab) + 1rem); } .fin canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.finc { position: relative; z-index: 2; max-width: 40rem; animation: mlcard .7s var(--ease); } .fin h1 { font-size: 5rem; justify-items: center; margin: .3rem 0 .5rem; } .fin h1 b.b2 { margin-left: 0; } .fin .chips { justify-content: center; } .fin .tag { margin-left: auto; margin-right: auto; } .fin .acts { max-width: 22rem; margin: 1rem auto 0; display: grid; }

/* ---------- responsive ---------- */
body.short .menu { padding-top: calc(var(--sat) + 3rem); padding-bottom: calc(var(--sab) + .6rem); }
body.short .menu h1 { font-size: 4rem; margin: .1rem 0 .3rem; } body.short .tag { font-size: .85rem; margin-bottom: .6rem; line-height: 1.35; } body.short .chips { margin-top: .6rem; } body.short .menu .sub { margin-top: .5rem; } body.short .kick { font-size: .65rem; }
body.short .btn--big { font-size: 1.05rem; } body.short .card h2 { font-size: 1.5rem; } body.short .card { padding: 1rem 1.2rem; } body.short .rs svg { width: 3rem; height: 3rem; } body.short .banner { top: 28%; } body.short .banner b { font-size: 2rem; }
body.short { --top: 3.2rem; } body.short .mini { height: 2.2rem; width: 14rem; } body.short .tool { width: 2.6rem; height: 2.6rem; } body.short .hp { height: 2.4rem; } body.short .hp.fuel { min-width: 8.5rem; }
body.short .map { gap: .45rem; padding-top: calc(var(--sat) + .5rem); padding-bottom: calc(var(--sab) + .5rem); } body.short .mh h2 { font-size: 1.3rem; } body.short .wc canvas { width: 2.6rem; height: 2.6rem; } body.short .wc { padding: .3rem .5rem .3rem .3rem; } body.short .wdesc p { display: none; } body.short .lvls { gap: .5rem; } body.short .lv { padding: .4rem; gap: .2rem; } body.short .stars .st svg { width: 1rem; height: 1rem; }
body.short .bcard { padding: .9rem 1.2rem; } body.short .bcard h2 { font-size: 1.5rem; margin-bottom: .3rem; } body.short .bprof { aspect-ratio: 520 / 70; } body.short .goals { margin: .5rem 0 .3rem; gap: .25rem; } body.short .goals li { padding: .3rem .6rem; font-size: .82rem; }
body.short .gauges { bottom: calc(var(--sab) + .5rem); } body.short .g { padding: .2rem .5rem .25rem; min-width: 4.2rem; } body.short .g b { font-size: 1.05rem; } body.short .hint { top: calc(var(--sat) + 5.2rem); font-size: .85rem; padding: .45rem .8rem; }
body.short .set { width: min(34rem, 94vw); padding: .8rem 1.2rem; } body.short .row { padding: .3rem 0; } body.short .rl small { display: none; } body.short input[type=range] { height: 1.3rem; } body.short .sw { height: 1.5rem; width: 2.8rem; } body.short .sw i { width: 1.1rem; height: 1.1rem; } body.short .sw.on i { transform: translateX(1.3rem); }
body.short .how { padding: .8rem 1rem; } body.short .hgrid { gap: .5rem; } body.short .hi { padding: .5rem .7rem; } body.short .hi p { font-size: .76rem; line-height: 1.3; } body.short .hi > b { font-size: .9rem; } body.short .hico svg { width: 1.3rem; height: 1.3rem; } body.short .hk { display: none; }
body[data-view="howto"] .hp, body[data-view="settings"] .hp, body[data-view="howto"] #bPause, body[data-view="settings"] #bPause, body[data-view="brief"] .hp, body[data-view="map"] .hp { display: none; }
@media (max-width: 760px) { .lvls { grid-template-columns: repeat(3, 1fr); } .worlds { grid-template-columns: repeat(5, 1fr); } .wn small { display: none; } .wc { flex-direction: column; text-align: center; padding: .4rem .2rem; gap: .2rem; } .menu h1 { font-size: 4.4rem; } .menu { padding-left: calc(var(--sal) + 1.2rem); } .hgrid { grid-template-columns: 1fr 1fr; } .skins { grid-template-columns: repeat(3, 1fr); } .hp.gems b { font-size: 1rem; } .mini { width: 12rem; } }
@media (max-width: 1100px) and (min-width: 761px) { .lv .ln small { display: none; } }
@media (hover: none) { .lv:hover, .wc:hover, .tool:hover, .sk:hover { transform: none; } }
@media (prefers-reduced-motion: reduce) { .menu h1 b, .fin h1 b { animation: none; } .hp.fuel.low { animation: none; } }
