:root {
  color-scheme: dark;
  --bg: #06111c;
  --bg-2: #091b2b;
  --panel: rgba(15, 36, 53, .94);
  --panel-2: rgba(22, 49, 68, .9);
  --line: rgba(174, 222, 232, .16);
  --line-strong: rgba(174, 222, 232, .32);
  --text: #eef8f5;
  --muted: #91a9b3;
  --mint: #74f1c8;
  --cyan: #63d8ff;
  --gold: #ffd478;
  --orange: #ff9a62;
  --danger: #ff6f7d;
  --shadow: 0 20px 55px rgba(0, 0, 0, .32);
  --radius: 20px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 114, 137, .22), transparent 34%),
    radial-gradient(circle at 95% 90%, rgba(62, 79, 154, .18), transparent 34%),
    #02070c;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

button { font: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app-shell {
  width: min(100%, 430px);
  min-height: 100dvh;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, .014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .014) 1px, transparent 1px),
    var(--bg);
  background-size: 24px 24px;
  border-inline: 1px solid rgba(255, 255, 255, .04);
  box-shadow: var(--shadow);
  padding-bottom: calc(88px + var(--safe-bottom));
}

.topbar {
  padding: calc(12px + var(--safe-top)) 16px 10px;
  min-height: calc(64px + var(--safe-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 10;
  background: linear-gradient(180deg, rgba(5, 17, 28, .98), rgba(5, 17, 28, .82));
  backdrop-filter: blur(16px);
}

.brand-lockup { display: flex; align-items: center; gap: 10px; }
.brand-lockup div { display: grid; line-height: 1.05; gap: 5px; }
.brand-lockup strong { font-size: 15px; letter-spacing: .04em; }
.brand-lockup span:not(.brand-mark) { font-size: 10px; color: var(--muted); letter-spacing: .13em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center;
  color: var(--mint); background: rgba(116, 241, 200, .1); border: 1px solid rgba(116, 241, 200, .28);
  box-shadow: inset 0 0 18px rgba(116, 241, 200, .12);
}
.top-actions { display: flex; align-items: center; gap: 8px; }
.cloud-state {
  font-size: 10px; color: var(--muted); border: 1px solid var(--line); padding: 6px 8px;
  border-radius: 99px; max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cloud-state.online { color: var(--mint); border-color: rgba(116, 241, 200, .24); }
.icon-button {
  width: 34px; height: 34px; border-radius: 12px; border: 1px solid var(--line); color: var(--text);
  background: rgba(255, 255, 255, .035); cursor: pointer;
}

.economy-bar {
  min-height: 66px; padding: 9px 9px 10px; display: flex; align-items: center; justify-content: space-between; gap: 6px;
  border-block: 1px solid rgba(255, 255, 255, .03); background: rgba(5, 17, 28, .72); position: relative; z-index: 8;
}
.asset-pill { display: grid; min-width: 92px; line-height: 1; gap: 4px; }
.asset-pill span { font-size: 10px; color: var(--muted); letter-spacing: .12em; }
.asset-pill strong { font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.asset-pill small { font-size: 9px; color: var(--mint); }
.resource-pills { display: flex; align-items: center; justify-content: flex-end; gap: 3px; min-width: 0; }
.resource-pill {
  min-height: 34px; padding: 0 6px; border-radius: 11px; border: 1px solid var(--line); color: var(--text);
  background: rgba(255, 255, 255, .035); display: flex; align-items: center; gap: 4px; cursor: pointer;
}
.resource-pill span { font-size: 12px; color: var(--gold); }
.resource-pill b { font-size: 11px; font-variant-numeric: tabular-nums; }
.resource-pill small { display: none; font-size: 8px; color: var(--muted); }

.screen-stack { position: relative; }
.screen { min-height: calc(100dvh - 218px); padding: 14px 14px 28px; animation: screen-in .22s ease both; }
.screen[hidden] { display: none; }
@keyframes screen-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.station-scene {
  height: 224px; border: 1px solid var(--line); border-radius: 26px; position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 50% 44%, rgba(104, 216, 239, .14), transparent 28%),
    radial-gradient(circle at 76% 18%, rgba(128, 99, 219, .18), transparent 24%),
    linear-gradient(180deg, #0a1a2a, #07111b 80%);
  box-shadow: inset 0 -55px 90px rgba(0, 0, 0, .34);
}
.stars, .stars::before, .stars::after {
  position: absolute; inset: 0; content: ""; pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 255, 255, .9) 0 1px, transparent 1.5px);
  background-size: 43px 37px; opacity: .36;
}
.stars.layer-b { transform: translate(17px, 12px) scale(.8); opacity: .18; }
.stars.layer-a::before { transform: translate(23px, 19px); background-size: 73px 61px; }
.titan-shadow {
  position: absolute; left: 50%; top: 17px; width: 226px; height: 52px; transform: translateX(-50%);
  border: 1px dashed rgba(174, 222, 232, .2); border-radius: 50% 50% 24% 24%; opacity: .55;
  box-shadow: inset 0 0 24px rgba(99, 216, 255, .08);
}
.titan-shadow::before, .titan-shadow::after {
  content: ""; position: absolute; top: 20px; width: 54px; height: 15px; border: 1px solid currentColor; border-color: inherit;
}
.titan-shadow::before { left: -34px; transform: skewY(-12deg); }
.titan-shadow::after { right: -34px; transform: skewY(12deg); }
.titan-shadow span { position: absolute; width: 100%; text-align: center; top: 15px; font-size: 9px; color: var(--muted); letter-spacing: .1em; }
.station-orbit {
  position: absolute; left: 50%; top: 109px; border: 1px solid rgba(99, 216, 255, .24); border-radius: 50%; transform: translate(-50%, -50%) rotate(-12deg);
}
.orbit-a { width: 226px; height: 76px; }
.orbit-b { width: 172px; height: 58px; transform: translate(-50%, -50%) rotate(18deg); border-color: rgba(116, 241, 200, .22); }
.station-core {
  position: absolute; left: 50%; top: 109px; width: 92px; height: 92px; transform: translate(-50%, -50%);
  border-radius: 50%; border: 1px solid rgba(116, 241, 200, .38);
  background: radial-gradient(circle, rgba(116, 241, 200, .2), rgba(10, 34, 46, .8) 56%, rgba(3, 11, 18, .9));
  box-shadow: 0 0 30px rgba(116, 241, 200, .12), inset 0 0 28px rgba(116, 241, 200, .12);
}
.station-core::before, .station-core::after {
  content: ""; position: absolute; inset: 12px; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, .25);
}
.station-core::after { inset: 27px; border-style: solid; background: rgba(99, 216, 255, .16); }
.station-core i { position: absolute; width: 34px; height: 12px; background: #183e4b; border: 1px solid rgba(116, 241, 200, .25); }
.station-core i:nth-child(1) { left: -23px; top: 39px; }
.station-core i:nth-child(2) { right: -23px; top: 39px; }
.station-core i:nth-child(3) { left: 29px; bottom: -11px; transform: rotate(90deg); }
.tiny-tug { position: absolute; left: 69%; top: 106px; width: 20px; height: 13px; border-radius: 60% 30% 30% 60%; background: var(--gold); transform: rotate(-11deg); box-shadow: -11px 2px 10px rgba(255, 212, 120, .45); }
.tiny-tug::after { content: ""; position: absolute; width: 39px; height: 1px; border-top: 1px dashed rgba(116, 241, 200, .65); right: 16px; top: 6px; }
.station-label { position: absolute; left: 14px; right: 14px; bottom: 12px; display: flex; align-items: end; justify-content: space-between; }
.station-label span { font-size: 10px; color: var(--muted); }
.station-label strong { font-size: 13px; letter-spacing: .08em; }

.objective-card, .preserve-card, .coop-card {
  margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(135deg, rgba(23, 54, 72, .95), rgba(12, 31, 46, .96));
  box-shadow: inset 0 1px rgba(255, 255, 255, .025); overflow: hidden;
}
.objective-card { padding: 15px; display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 12px; min-height: 150px; }
.eyebrow { display: block; font-size: 9px; color: var(--mint); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 6px; }
.objective-copy h2, .preserve-card h2, .coop-card h2, .offer-copy h2, .shop-card h2, .league-copy h2 { margin: 0; font-size: 17px; }
.objective-copy p, .preserve-card p, .coop-card p, .offer-copy p, .shop-card p, .league-copy p { margin: 6px 0 10px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.progress-line { height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; margin: 11px 0 6px; }
.progress-line span { display: block; height: 100%; width: 40%; border-radius: inherit; background: linear-gradient(90deg, var(--mint), var(--cyan)); box-shadow: 0 0 10px rgba(99, 216, 255, .35); }
.objective-copy small { font-size: 9px; color: var(--muted); }
.desire-object { display: grid; place-items: center; position: relative; }
.desire-object > span { position: absolute; bottom: 3px; font-size: 8px; color: var(--muted); border: 1px solid var(--line); padding: 3px 6px; border-radius: 99px; }
.magnet-ring { position: absolute; border-radius: 50%; border: 2px solid rgba(99, 216, 255, .38); box-shadow: inset 0 0 18px rgba(99, 216, 255, .11), 0 0 18px rgba(99, 216, 255, .1); }
.ring-outer { width: 78px; height: 78px; border-style: dashed; animation: ring-spin 16s linear infinite; }
.ring-inner { width: 45px; height: 45px; border-color: rgba(116, 241, 200, .55); }
@keyframes ring-spin { to { transform: rotate(360deg); } }

.launch-button {
  width: 100%; min-height: 64px; margin: 12px 0; padding: 8px 12px; border: 0; border-radius: 18px;
  color: #061610; background: linear-gradient(110deg, var(--mint), var(--cyan)); box-shadow: 0 10px 26px rgba(72, 210, 190, .22);
  display: grid; grid-template-columns: 42px 1fr auto; align-items: center; text-align: left; cursor: pointer; transition: transform .14s ease, filter .14s ease;
}
.launch-button:active { transform: scale(.985); }
.launch-button:disabled { filter: grayscale(.55); opacity: .55; cursor: not-allowed; }
.launch-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(4, 20, 24, .12); font-size: 20px; }
.launch-button > span:nth-child(2) { display: grid; gap: 3px; }
.launch-button b { font-size: 16px; }
.launch-button small { font-size: 9px; opacity: .66; }
.launch-cost { font-weight: 900; font-size: 14px; }

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick-card {
  min-height: 62px; border: 1px solid var(--line); border-radius: 16px; color: var(--text); background: rgba(15, 36, 53, .84);
  padding: 10px; display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; text-align: left; cursor: pointer;
}
.quick-card.wide { grid-column: 1 / -1; }
.quick-card > span:nth-child(2) { display: grid; gap: 4px; }
.quick-card b { font-size: 11px; }
.quick-card small { font-size: 9px; color: var(--muted); }
.quick-card strong { font-size: 10px; color: var(--mint); }
.quick-card i { font-style: normal; }
.quick-icon, .robot-avatar { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: rgba(99, 216, 255, .09); border: 1px solid rgba(99, 216, 255, .2); color: var(--cyan); font-weight: 900; font-size: 11px; }
.robot-avatar { color: var(--gold); border-color: rgba(255, 212, 120, .28); background: rgba(255, 212, 120, .08); }
.demo-note { margin-top: 12px; padding: 12px 14px; border-left: 3px solid var(--mint); background: rgba(116, 241, 200, .055); border-radius: 0 14px 14px 0; }
.demo-note strong { font-size: 10px; }
.demo-note p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 5px 2px 14px; }
.section-heading h1 { margin: 0; font-size: 24px; letter-spacing: -.04em; }
.asset-summary, .season-clock { display: grid; justify-items: end; gap: 3px; }
.asset-summary span, .season-clock span { font-size: 9px; color: var(--muted); }
.asset-summary b, .season-clock b { font-size: 14px; color: var(--mint); }
.asset-chart { min-height: 78px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin-bottom: 10px; }
.chart-column { min-width: 0; display: flex; flex-direction: column; justify-content: end; align-items: center; gap: 5px; }
.chart-track { width: 100%; height: 50px; border-radius: 9px; display: flex; align-items: end; overflow: hidden; background: rgba(255, 255, 255, .045); }
.chart-fill { width: 100%; min-height: 8px; border-radius: 8px; background: linear-gradient(180deg, var(--cyan), rgba(116, 241, 200, .48)); transition: height .35s ease; }
.chart-column span { max-width: 100%; font-size: 8px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upgrade-list { display: grid; gap: 8px; }
.upgrade-card {
  display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px;
  border: 1px solid var(--line); border-radius: 16px; background: rgba(15, 36, 53, .86);
}
.upgrade-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: rgba(116, 241, 200, .08); border: 1px solid rgba(116, 241, 200, .18); color: var(--mint); font-size: 16px; }
.upgrade-copy { min-width: 0; display: grid; gap: 3px; }
.upgrade-copy div { display: flex; align-items: baseline; gap: 6px; }
.upgrade-copy b { font-size: 12px; }
.upgrade-copy small { font-size: 9px; color: var(--muted); }
.upgrade-copy p { margin: 0; font-size: 9px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upgrade-copy em { font-style: normal; font-size: 9px; color: var(--mint); }
.upgrade-button { min-width: 68px; min-height: 42px; border-radius: 12px; border: 1px solid rgba(116, 241, 200, .28); background: rgba(116, 241, 200, .1); color: var(--text); display: grid; place-items: center; gap: 1px; cursor: pointer; }
.upgrade-button b { font-size: 10px; }
.upgrade-button span { font-size: 8px; color: var(--muted); }
.upgrade-button:disabled { opacity: .42; cursor: not-allowed; }
.preserve-card { padding: 15px; }
.mini-fleet { height: 44px; margin-top: 10px; display: flex; align-items: center; gap: 9px; }
.mini-fleet i { width: 40px; height: 18px; border-radius: 60% 35% 35% 60%; border: 1px solid var(--line-strong); background: rgba(99, 216, 255, .08); }
.mini-fleet i:nth-child(2) { transform: scale(.82); opacity: .72; }
.mini-fleet i:nth-child(3) { transform: scale(.66); opacity: .48; }
.mini-fleet span { font-size: 9px; color: var(--mint); }

.league-hero { border: 1px solid var(--line); border-radius: 22px; padding: 15px; background: linear-gradient(135deg, rgba(41, 52, 83, .88), rgba(12, 31, 46, .96)); display: grid; grid-template-columns: 1fr 112px; min-height: 156px; overflow: hidden; }
.tier-badge, .demo-badge { display: inline-flex; padding: 5px 8px; border-radius: 99px; border: 1px solid var(--line-strong); color: var(--gold); font-size: 9px; margin-bottom: 9px; }
.text-button { padding: 0; border: 0; color: var(--cyan); background: none; font-size: 9px; cursor: pointer; }
.season-ship { position: relative; min-width: 108px; display: grid; place-items: center; }
.season-ship::before { content: ""; width: 98px; height: 45px; border-radius: 60% 24% 40% 60%; transform: rotate(-8deg); background: linear-gradient(130deg, rgba(99, 216, 255, .4), rgba(255, 212, 120, .25)); border: 1px solid rgba(255, 255, 255, .22); box-shadow: 0 0 28px rgba(99, 216, 255, .16); }
.season-ship i::before, .season-ship i::after { content: ""; position: absolute; width: 51px; height: 9px; border: 1px solid rgba(255, 255, 255, .17); top: 46px; }
.season-ship i::before { right: 3px; transform: rotate(25deg); }
.season-ship i::after { right: 4px; top: 95px; transform: rotate(-20deg); }
.season-ship span { position: absolute; bottom: 5px; font-size: 8px; letter-spacing: .08em; color: var(--gold); }
.rank-zones { display: grid; grid-template-columns: 1fr 3fr 1fr; gap: 5px; margin: 9px 0 6px; }
.rank-zones span { text-align: center; font-size: 8px; border-radius: 7px; padding: 5px 2px; background: rgba(116, 241, 200, .07); color: var(--mint); }
.rank-zones span:nth-child(2) { color: var(--muted); background: rgba(255, 255, 255, .04); }
.rank-zones span:nth-child(3) { color: var(--danger); background: rgba(255, 111, 125, .06); }
.leaderboard { display: grid; gap: 5px; }
.rank-row { min-height: 44px; display: grid; grid-template-columns: 30px 30px 1fr auto; gap: 7px; align-items: center; padding: 6px 8px; border: 1px solid transparent; border-radius: 12px; background: rgba(255, 255, 255, .025); }
.rank-row.me { border-color: rgba(116, 241, 200, .28); background: rgba(116, 241, 200, .065); }
.rank-row .rank { text-align: center; font-weight: 900; font-size: 12px; }
.rank-avatar { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; border: 1px solid var(--line); background: rgba(99, 216, 255, .07); font-size: 9px; }
.rank-copy { min-width: 0; display: grid; gap: 3px; }
.rank-copy b { font-size: 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rank-copy small { color: var(--muted); font-size: 8px; }
.rank-score { display: grid; justify-items: end; gap: 2px; }
.rank-score b { font-size: 10px; font-variant-numeric: tabular-nums; }
.rank-score small { font-size: 8px; color: var(--muted); }
.coop-card { padding: 14px; position: relative; }
.coop-visual { position: absolute; top: 16px; right: 17px; width: 78px; height: 50px; }
.coop-visual i { position: absolute; inset: 8px; border: 1px dashed var(--line-strong); border-radius: 50%; }
.coop-visual i:nth-child(2) { inset: 15px 2px; transform: rotate(32deg); }
.coop-visual i:nth-child(3) { inset: 20px; border-style: solid; background: rgba(116, 241, 200, .09); }
.secondary-button { min-height: 38px; padding: 0 13px; border-radius: 11px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .035); color: var(--text); font-size: 10px; cursor: pointer; }

.shop-hero { border: 1px solid rgba(255, 212, 120, .24); border-radius: 24px; overflow: hidden; background: linear-gradient(140deg, rgba(47, 51, 70, .98), rgba(16, 34, 49, .98)); position: relative; min-height: 300px; display: grid; grid-template-columns: 112px 1fr; }
.offer-ribbon { position: absolute; top: 0; left: 0; right: 0; height: 28px; display: grid; place-items: center; font-size: 9px; letter-spacing: .08em; background: rgba(255, 212, 120, .1); color: var(--gold); border-bottom: 1px solid rgba(255, 212, 120, .14); }
.offer-robot { margin-top: 28px; min-height: 272px; display: grid; place-items: center; position: relative; background: radial-gradient(circle, rgba(255, 212, 120, .13), transparent 60%); }
.offer-robot span { width: 68px; height: 78px; border-radius: 44% 44% 35% 35%; display: grid; place-items: center; font-size: 22px; font-weight: 950; color: var(--gold); border: 2px solid rgba(255, 212, 120, .42); background: rgba(20, 36, 46, .9); box-shadow: inset 0 0 22px rgba(255, 212, 120, .1), 0 0 24px rgba(255, 212, 120, .12); }
.offer-robot i { position: absolute; width: 16px; height: 57px; border: 2px solid rgba(255, 212, 120, .28); border-radius: 99px; top: 132px; }
.offer-robot i:nth-of-type(1) { left: 13px; transform: rotate(14deg); }
.offer-robot i:nth-of-type(2) { right: 13px; transform: rotate(-14deg); }
.offer-copy { padding: 47px 13px 14px 6px; }
.offer-copy ul { margin: 8px 0; padding-left: 16px; color: var(--muted); font-size: 9px; line-height: 1.7; }
.offer-value { display: flex; align-items: end; justify-content: space-between; gap: 8px; margin: 10px 0; }
.offer-value span { font-size: 8px; color: var(--muted); text-decoration: line-through; }
.offer-value b { font-size: 25px; color: var(--gold); }
.purchase-button { width: 100%; min-height: 42px; border: 0; border-radius: 12px; color: #1c1606; font-weight: 850; font-size: 11px; background: linear-gradient(110deg, var(--gold), var(--orange)); cursor: pointer; }
.purchase-button:disabled { filter: grayscale(.5); opacity: .55; cursor: not-allowed; }
.shop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 9px; }
.shop-card { min-height: 190px; padding: 13px; border: 1px solid var(--line); border-radius: 17px; background: rgba(15, 36, 53, .86); display: flex; flex-direction: column; }
.shop-card p { flex: 1; }
.shop-card > div { display: flex; align-items: end; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.shop-card > div b { font-size: 18px; }
.shop-card > div span { max-width: 74px; font-size: 8px; color: var(--muted); text-align: right; }
.shop-card button { min-height: 36px; border-radius: 10px; border: 1px solid var(--line-strong); color: var(--text); background: rgba(99, 216, 255, .08); font-size: 10px; cursor: pointer; }
.shop-card button:disabled { opacity: .38; cursor: not-allowed; }
.shop-card.locked-shop { opacity: .66; }
.commerce-footnote { margin: 11px 4px 0; color: var(--muted); font-size: 8px; line-height: 1.55; }

.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 430px); height: calc(72px + var(--safe-bottom)); padding: 8px 10px var(--safe-bottom);
  display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(5, 16, 26, .95); backdrop-filter: blur(18px); border-top: 1px solid var(--line); z-index: 30;
}
.bottom-nav button { position: relative; border: 0; border-radius: 13px; color: var(--muted); background: none; display: grid; place-items: center; align-content: center; gap: 3px; cursor: pointer; }
.bottom-nav button > span { font-size: 20px; line-height: 1; }
.bottom-nav button b { font-size: 9px; }
.bottom-nav button.active { color: var(--mint); background: rgba(116, 241, 200, .075); }
.nav-dot { position: absolute; top: 1px; right: 22%; min-width: 16px; height: 16px; border-radius: 99px; display: grid; place-items: center; padding: 0 4px; font-style: normal; font-size: 8px; color: #18080b; background: var(--danger); }

.game-overlay { position: fixed; inset: 0; z-index: 80; background: #02070c; }
.game-overlay[hidden] { display: none; }
.game-shell { width: min(100%, 430px); height: 100dvh; margin: 0 auto; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: #06111c; box-shadow: var(--shadow); }
.game-hud-top { min-height: calc(64px + var(--safe-top)); padding: calc(10px + var(--safe-top)) 12px 8px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid var(--line); background: rgba(5, 16, 26, .95); }
.game-hud-top > div { display: grid; gap: 2px; }
.game-hud-top > div:first-child { justify-items: start; }
.game-hud-top small { color: var(--muted); font-size: 8px; letter-spacing: .1em; }
.game-hud-top b { font-size: 15px; font-variant-numeric: tabular-nums; }
.game-hud-top .game-timer { justify-items: center; min-width: 78px; }
.game-timer b { font-size: 21px; }
.game-hud-top button { justify-self: end; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .04); color: var(--text); cursor: pointer; }
.playfield { min-height: 0; position: relative; overflow: hidden; touch-action: none; user-select: none; background: #050f19; }
#gameCanvas { width: 100%; height: 100%; display: block; touch-action: none; }
.combo-badge, .cargo-badge { position: absolute; top: 12px; min-width: 70px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 12px; background: rgba(5, 17, 28, .76); backdrop-filter: blur(5px); display: grid; gap: 2px; pointer-events: none; }
.combo-badge { left: 10px; }
.cargo-badge { right: 10px; justify-items: end; }
.combo-badge small, .cargo-badge small { font-size: 7px; color: var(--muted); letter-spacing: .1em; }
.combo-badge b, .cargo-badge b { font-size: 14px; }
.combo-badge span, .cargo-badge span { font-size: 7px; color: var(--mint); }
.game-prompt { position: absolute; left: 50%; bottom: 72px; transform: translateX(-50%); max-width: 78%; padding: 8px 13px; border-radius: 99px; background: rgba(5, 17, 28, .72); border: 1px solid var(--line); color: var(--text); font-size: 9px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .2s ease; }
.game-prompt.show { opacity: 1; }
.floating-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.float-text { position: absolute; transform: translate(-50%, -50%); font-weight: 900; font-size: 12px; color: var(--mint); animation: float-up .8s ease-out forwards; text-shadow: 0 2px 9px rgba(0, 0, 0, .7); }
@keyframes float-up { to { transform: translate(-50%, -110%); opacity: 0; } }
.game-footer { min-height: calc(54px + var(--safe-bottom)); padding: 9px 11px var(--safe-bottom); display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; border-top: 1px solid var(--line); background: rgba(5, 16, 26, .98); }
.game-footer span { color: var(--muted); font-size: 7px; }
.game-footer span i { color: var(--mint); font-style: normal; }
.game-footer strong { text-align: center; font-size: 9px; }

.modal-layer { position: fixed; inset: 0; z-index: 120; padding: 18px; display: grid; place-items: center; background: rgba(1, 6, 10, .78); backdrop-filter: blur(8px); }
.modal-layer[hidden] { display: none; }
.modal-card { width: min(100%, 390px); max-height: 84dvh; overflow: auto; border: 1px solid var(--line-strong); border-radius: 24px; background: linear-gradient(145deg, #112c3c, #081825); box-shadow: 0 28px 90px rgba(0, 0, 0, .55); padding: 18px; animation: modal-in .18s ease both; }
@keyframes modal-in { from { opacity: 0; transform: scale(.97) translateY(6px); } }
.modal-kicker { font-size: 9px; letter-spacing: .13em; color: var(--mint); margin-bottom: 7px; }
.modal-card h2 { margin: 0; font-size: 21px; }
.modal-card p { margin: 8px 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.modal-card strong { color: var(--text); }
.modal-card ul { margin: 8px 0; padding-left: 18px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.modal-object { min-height: 90px; margin: 12px 0; border: 1px solid var(--line); border-radius: 17px; display: grid; place-items: center; background: radial-gradient(circle, rgba(99, 216, 255, .11), transparent 64%); font-size: 31px; font-weight: 900; letter-spacing: .08em; }
.modal-object small { display: block; font-size: 8px; color: var(--muted); letter-spacing: .05em; }
.modal-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0; }
.modal-stats div { min-height: 58px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; display: grid; place-items: center; align-content: center; text-align: center; }
.modal-stats b { font-size: 15px; }
.modal-stats span { font-size: 8px; color: var(--muted); }
.modal-actions { display: grid; gap: 7px; margin-top: 14px; }
.modal-actions button { width: 100%; min-height: 45px; border-radius: 13px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .04); color: var(--text); font-weight: 780; font-size: 11px; cursor: pointer; }
.modal-actions button.primary { border: 0; color: #061610; background: linear-gradient(110deg, var(--mint), var(--cyan)); }
.modal-actions button.pay { border: 0; color: #221604; background: linear-gradient(110deg, var(--gold), var(--orange)); }
.modal-actions button.danger { color: var(--danger); border-color: rgba(255, 111, 125, .3); }
.modal-actions button:disabled { opacity: .42; cursor: not-allowed; }
.modal-note { margin-top: 9px; text-align: center; font-size: 8px; color: var(--muted); }
.ad-countdown { width: 78px; height: 78px; margin: 15px auto; border-radius: 50%; border: 3px solid rgba(99, 216, 255, .28); display: grid; place-items: center; font-size: 28px; color: var(--cyan); }

.toast { position: fixed; left: 50%; top: calc(84px + var(--safe-top)); z-index: 200; transform: translateX(-50%); max-width: min(84vw, 350px); padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--text); background: rgba(8, 27, 39, .95); box-shadow: var(--shadow); font-size: 10px; text-align: center; }
.toast[hidden] { display: none; }

@media (max-width: 370px) {
  .resource-pill { padding-inline: 6px; }
  .resource-pill span { display: none; }
  .objective-card { grid-template-columns: minmax(0, 1fr) 82px; }
  .shop-hero { grid-template-columns: 95px 1fr; }
  .offer-copy { padding-right: 9px; }
}

@media (min-width: 700px) {
  body { padding-block: 20px; }
  .app-shell { min-height: calc(100dvh - 40px); border-radius: 28px; }
  .bottom-nav { bottom: 20px; border-radius: 0 0 28px 28px; }
  .game-shell { height: calc(100dvh - 30px); margin-top: 15px; border-radius: 24px; overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
