/* Vector Zero: page, HUD and menus. The radar itself is drawn on the canvas. */

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #03070d;
  --ink: #e6f2fb;
  --ink-2: #a3b8ca;
  --ink-3: #66798c;
  --cyan: #5fe1ff;
  --cyan-2: #39c6ff;
  --amber: #ffb23e;
  --blue: #4fc8ff;
  --pink: #ff5fd2;
  --green: #8cff5a;
  --red: #ff3b4e;
  --glass: rgba(7, 14, 25, 0.66);
  --glass-2: rgba(10, 20, 34, 0.82);
  --line: rgba(140, 220, 255, 0.15);
  --line-2: rgba(140, 220, 255, 0.28);
  --ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, 'Roboto Mono', monospace;
  --st: env(safe-area-inset-top, 0px);
  --sr: env(safe-area-inset-right, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  --sl: env(safe-area-inset-left, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

#app {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  top: var(--pixelrain-bar, 0px);
  overflow: hidden;
  background: var(--bg);
}

#view {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.label {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.kicker {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cyan);
}
.kicker.alert { color: var(--red); }

/* ── Buttons ─────────────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: rgba(140, 220, 255, 0.08);
  box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.18s, box-shadow 0.18s, transform 0.12s, color 0.18s;
}
.btn:hover { background: rgba(140, 220, 255, 0.16); box-shadow: inset 0 0 0 1px rgba(140, 220, 255, 0.5); }
.btn:active { transform: scale(0.97); }
.btn:focus-visible, .link:focus-visible, .hbtn:focus-visible, .sector:focus-visible, .seg button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}
.btn-primary {
  background: linear-gradient(180deg, #8beeff 0%, #3cc8ff 100%);
  color: #021019;
  font-weight: 750;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 10px 34px rgba(57, 198, 255, 0.32), 0 0 0 1px rgba(57, 198, 255, 0.4);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #a6f3ff 0%, #5ad3ff 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), 0 12px 40px rgba(57, 198, 255, 0.45), 0 0 0 1px rgba(57, 198, 255, 0.6);
}
.btn-quiet { background: transparent; box-shadow: none; color: var(--ink-2); }
.btn-quiet:hover { background: rgba(255, 255, 255, 0.05); box-shadow: none; color: var(--ink); }
.btn-small { min-height: 34px; padding: 0 14px; font-size: 13px; }

.link {
  background: none;
  border: 0;
  padding: 8px 2px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 550;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.link:hover { color: var(--ink); border-bottom-color: var(--line-2); }
.link.icon { display: inline-flex; align-items: center; padding: 6px; border-radius: 10px; border: 0; }
.link.icon:hover { background: rgba(255, 255, 255, 0.06); }

/* ── Title screen ────────────────────────────────────────────────────────────────── */

.screen { position: absolute; inset: 0; z-index: 20; }

.title {
  display: flex;
  align-items: center;
  padding: calc(28px + var(--st)) calc(32px + var(--sr)) calc(28px + var(--sb)) calc(56px + var(--sl));
  background:
    linear-gradient(90deg, rgba(3, 7, 13, 0.94) 0%, rgba(3, 7, 13, 0.78) 34%, rgba(3, 7, 13, 0.18) 64%, rgba(3, 7, 13, 0) 80%);
  overflow-y: auto;
  animation: fadeIn 0.6s ease both;
}
.title-col { width: min(540px, 100%); }

.logo { margin: 0 0 16px; line-height: 0; }
.logo svg {
  width: min(470px, 100%);
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 0 14px rgba(95, 225, 255, 0.35)) drop-shadow(0 0 2px rgba(95, 225, 255, 0.6));
}
.logo .scope { transform-origin: 552px 28px; animation: spin 3.2s linear infinite; }
.logo .blip { animation: blip 3.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blip { 0%, 30% { opacity: 0.25; } 36% { opacity: 1; } 80%, 100% { opacity: 0.25; } }

.tagline {
  margin: 0 0 26px;
  max-width: 27em;
  text-wrap: balance;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.5;
}

.start-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
.start-row .btn-primary { min-height: 54px; padding: 0 30px; font-size: 17px; }
.start-meta { color: var(--ink-3); font-size: 13px; line-height: 1.45; }
.start-meta b { color: var(--ink); font-weight: 650; }

.sectors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}
.sector {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 132px;
  padding: 14px 14px 12px;
  border: 0;
  border-radius: 16px;
  background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--line);
  text-align: left;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow 0.18s, background 0.18s, transform 0.15s;
}
.sector:hover { box-shadow: inset 0 0 0 1px var(--line-2); background: var(--glass-2); }
.sector.sel {
  box-shadow: inset 0 0 0 1.5px var(--cyan), 0 0 0 4px rgba(95, 225, 255, 0.1), 0 10px 30px rgba(0, 0, 0, 0.35);
  background: var(--glass-2);
}
.sector .code { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.08em; }
.sector .name { font-size: 15px; font-weight: 700; line-height: 1.2; }
.sector .pips { display: flex; gap: 4px; }
.sector .pips i { width: 14px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); }
.sector .pips i.on { background: var(--amber); }
.sector .best { margin-top: auto; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sector .best b { color: var(--ink); }
.sector .medal-row { display: flex; gap: 4px; }
.medal-dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.18); }
.medal-dot.m1.on { background: #d08a4c; box-shadow: 0 0 8px rgba(208, 138, 76, 0.6); }
.medal-dot.m2.on { background: #cfd8e3; box-shadow: 0 0 8px rgba(207, 216, 227, 0.6); }
.medal-dot.m3.on { background: #ffd34d; box-shadow: 0 0 8px rgba(255, 211, 77, 0.7); }
.sector.locked { cursor: not-allowed; }
.sector.locked .name, .sector.locked .code, .sector.locked .pips { opacity: 0.45; }
.sector .lock { margin-top: auto; font-size: 11.5px; line-height: 1.35; color: var(--ink-3); }
.sector .lock svg { vertical-align: -2px; margin-right: 4px; }

.title-links { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.sound-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(95, 225, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(95, 225, 255, 0.28);
  color: var(--cyan);
  font-size: 12.5px;
  font-weight: 600;
  animation: hintPulse 2.4s ease-in-out infinite;
}
.sound-hint::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
@keyframes hintPulse { 50% { opacity: 0.6; } }
.career { margin: 18px 0 0; color: var(--ink-3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.career b { color: var(--ink-2); font-weight: 650; }

/* ── HUD ─────────────────────────────────────────────────────────────────────────── */

.hud { position: absolute; inset: 0; z-index: 10; pointer-events: none; animation: fadeIn 0.5s ease both; }
.hud button { pointer-events: auto; }

.hud-score {
  position: absolute;
  top: calc(14px + var(--st));
  left: calc(16px + var(--sl));
  padding: 10px 16px 11px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(7, 14, 25, 0.72), rgba(7, 14, 25, 0.5));
  box-shadow: inset 0 0 0 1px var(--line);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  min-width: 168px;
}
.score-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.hud .best { font-size: 10.5px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.score {
  font-size: 30px;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(95, 225, 255, 0.35);
}
.score.bump { animation: bump 0.35s ease; }
@keyframes bump { 30% { transform: scale(1.08); color: #fff; } }
.streak { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.mult {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(95, 225, 255, 0.14);
  color: var(--cyan);
  font-size: 12.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.mult.hot { background: linear-gradient(180deg, #8beeff, #3cc8ff); color: #021019; box-shadow: 0 0 16px rgba(57, 198, 255, 0.5); }
.mult.flash { animation: multFlash 0.6s ease; }
@keyframes multFlash { 0% { transform: scale(1.5); } 100% { transform: scale(1); } }
.streak.lost .mult { animation: lost 0.5s ease; }
@keyframes lost { 0%, 100% { transform: none; } 20% { transform: translateX(-4px); background: rgba(255, 59, 78, 0.5); color: #fff; } 40% { transform: translateX(4px); } 60% { transform: translateX(-2px); } }
.streak .bar { position: relative; flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); overflow: hidden; min-width: 60px; }
.streak .bar i { position: absolute; inset: 0 auto 0 0; width: 0%; background: linear-gradient(90deg, #3cc8ff, #b9f4ff); border-radius: 2px; transition: width 0.35s ease; }
.streak-text { font-size: 10.5px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }

.hud-right {
  position: absolute;
  top: calc(14px + var(--st));
  right: calc(16px + var(--sr));
  display: flex;
  align-items: center;
  gap: 8px;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 6px 14px;
  margin-right: 4px;
  border-radius: 14px;
  background: rgba(7, 14, 25, 0.55);
  box-shadow: inset 0 0 0 1px var(--line);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.stat b { font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.15; }
.hbtn {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: rgba(7, 14, 25, 0.62);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: color 0.15s, box-shadow 0.15s, background 0.15s;
}
.hbtn:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.hbtn[aria-pressed='true'] { color: #021019; background: linear-gradient(180deg, #8beeff, #3cc8ff); box-shadow: 0 0 18px rgba(57, 198, 255, 0.45); }

.banners {
  position: absolute;
  top: calc(16px + var(--st));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(520px, calc(100% - 420px));
}
.banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(7, 14, 25, 0.78);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 8px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  animation: bannerIn 0.35s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.banner.out { animation: bannerOut 0.35s ease both; }
.banner .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px currentColor; flex: none; }
.banner.red { box-shadow: inset 0 0 0 1px rgba(255, 59, 78, 0.6), 0 0 26px rgba(255, 59, 78, 0.25); }
.banner.red .dot { background: var(--red); color: var(--red); animation: pulse 0.6s ease infinite alternate; }
.banner.amber .dot { background: var(--amber); color: var(--amber); }
.banner.green .dot { background: var(--green); color: var(--green); }
.banner.big { font-size: 15px; padding: 11px 20px; }
.banner b { color: #fff; }
@keyframes bannerIn { from { opacity: 0; transform: translateY(-12px) scale(0.92); } }
@keyframes bannerOut { to { opacity: 0; transform: translateY(-8px) scale(0.96); } }
@keyframes pulse { to { opacity: 0.35; } }

.hint {
  position: absolute;
  left: 50%;
  bottom: calc(26px + var(--sb));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: min(560px, calc(100% - 32px));
  padding: 14px 20px 14px 14px;
  border-radius: 18px;
  background: rgba(7, 14, 25, 0.84);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 14px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: hintIn 0.45s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}
.hint.out { animation: hintOut 0.3s ease both; }
.hint-icon { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(95, 225, 255, 0.12); }
.hint-text { font-size: 14.5px; line-height: 1.45; color: var(--ink); }
.hint-text b { color: #fff; }
.hint-text .c-amber { color: var(--amber); font-weight: 700; }
.hint-text .c-blue { color: var(--blue); font-weight: 700; }
.hint-text .c-pink { color: var(--pink); font-weight: 700; }
.hint-text .c-green { color: var(--green); font-weight: 700; }
.hint-text .c-red { color: #ff6b78; font-weight: 700; }
@keyframes hintIn { from { opacity: 0; transform: translate(-50%, 16px) scale(0.96); } }
@keyframes hintOut { to { opacity: 0; transform: translate(-50%, 10px); } }

.radio {
  position: absolute;
  left: calc(16px + var(--sl));
  bottom: calc(14px + var(--sb));
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 440px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.35;
  color: var(--ink-2);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
.radio .line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity 0.6s; animation: lineIn 0.3s ease both; }
.radio .line b { font-weight: 700; }
.radio .line.atc b { color: var(--cyan); }
.radio .line.alert { color: #ff8a94; }
@keyframes lineIn { from { opacity: 0; transform: translateX(-6px); } }

.sector-info {
  position: absolute;
  right: calc(16px + var(--sr));
  bottom: calc(14px + var(--sb));
  display: flex;
  gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
#wind { color: var(--amber); }
#clock { color: var(--ink-2); font-variant-numeric: tabular-nums; }
#tod { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
#tod svg { flex: none; }

/* ── Panels ──────────────────────────────────────────────────────────────────────── */

.modal {
  display: grid;
  place-items: center;
  padding: calc(16px + var(--st)) calc(16px + var(--sr)) calc(16px + var(--sb)) calc(16px + var(--sl));
  background: radial-gradient(ellipse at center, rgba(3, 7, 13, 0.55) 0%, rgba(3, 7, 13, 0.82) 100%);
  overflow-y: auto;
  animation: fadeIn 0.25s ease both;
  z-index: 30;
}
.panel {
  width: min(460px, 100%);
  padding: 28px 28px 24px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(12, 22, 38, 0.92), rgba(7, 14, 25, 0.94));
  box-shadow: inset 0 0 0 1px var(--line-2), 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: panelIn 0.4s cubic-bezier(0.2, 1.2, 0.4, 1) both;
}
.panel.wide { width: min(820px, 100%); }
.panel h2 { margin: 0 0 18px; font-size: 26px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.15; }
@keyframes panelIn { from { opacity: 0; transform: translateY(18px) scale(0.97); } }
@keyframes fadeIn { from { opacity: 0; } }
.panel-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.panel-actions .btn { flex: 1 1 auto; }

.over h2 { color: #fff; }
.over-detail { margin: -8px 0 18px; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.over-score { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.over-score b { font-size: 46px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; text-shadow: 0 0 26px rgba(95, 225, 255, 0.35); }
.badge {
  padding: 5px 11px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe58a, #ffbf3a);
  color: #241600;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 0 24px rgba(255, 191, 58, 0.5);
  animation: badgeIn 0.6s cubic-bezier(0.2, 1.6, 0.4, 1) both 0.4s;
}
@keyframes badgeIn { from { opacity: 0; transform: scale(0.4) rotate(-8deg); } }
.over-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.over-stats div { padding: 10px 10px 9px; border-radius: 12px; background: rgba(140, 220, 255, 0.06); box-shadow: inset 0 0 0 1px var(--line); }
.over-stats b { display: block; font-size: 19px; font-weight: 750; font-variant-numeric: tabular-nums; }
.over-stats span { display: block; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-top: 2px; }
.medals { display: flex; gap: 8px; margin-bottom: 6px; }
.medal {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.medal i { width: 16px; height: 16px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.15); }
.medal.on { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.medal.m1.on i { background: radial-gradient(circle at 35% 35%, #f3b27a, #b06a30); box-shadow: 0 0 10px rgba(208, 138, 76, 0.6); }
.medal.m2.on i { background: radial-gradient(circle at 35% 35%, #ffffff, #9aa8b8); box-shadow: 0 0 10px rgba(207, 216, 227, 0.6); }
.medal.m3.on i { background: radial-gradient(circle at 35% 35%, #fff2a8, #e0a400); box-shadow: 0 0 12px rgba(255, 211, 77, 0.75); }
.medal.new { animation: medalNew 0.7s cubic-bezier(0.2, 1.6, 0.4, 1) both 0.6s; }
@keyframes medalNew { from { transform: scale(0.6); opacity: 0; } }
.over-goal { margin: 12px 0 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.45; }
.over-goal b { color: var(--cyan); }
.over-goal.unlock { color: var(--green); font-weight: 650; }

.how-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.how { padding: 14px 16px 16px; border-radius: 16px; background: rgba(140, 220, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line); }
.how svg { display: block; width: 100%; height: auto; aspect-ratio: 320 / 76; margin-bottom: 10px; border-radius: 10px; background: rgba(3, 7, 13, 0.6); }
.how h3 { margin: 0 0 6px; font-size: 15px; font-weight: 700; }
.how p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.keys { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px; color: var(--ink-3); font-size: 13px; }
kbd { display: inline-block; min-width: 22px; padding: 2px 6px; margin-right: 4px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.12); font-family: var(--mono); font-size: 12px; color: var(--ink); text-align: center; }

.toggles { display: grid; gap: 8px; }
.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding: 0 14px 0 16px;
  border: 0;
  border-radius: 14px;
  background: rgba(140, 220, 255, 0.05);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14.5px;
  font-weight: 550;
  text-align: left;
}
.toggle .sw { position: relative; width: 42px; height: 24px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); transition: background 0.2s; flex: none; }
.toggle .sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); }
.toggle[aria-checked='true'] .sw { background: var(--cyan-2); }
.toggle[aria-checked='true'] .sw::after { transform: translateX(18px); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 0 2px; font-size: 14.5px; font-weight: 550; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line); }
.seg button { border: 0; background: none; padding: 7px 12px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.seg button[aria-checked='true'] { background: rgba(95, 225, 255, 0.18); color: var(--ink); }
.fine { margin: 16px 0 0; color: var(--ink-3); font-size: 12.5px; }

.loading { position: absolute; inset: 0; display: grid; place-items: center; z-index: 40; background: var(--bg); transition: opacity 0.4s; }
.loading.done { opacity: 0; pointer-events: none; }
.load-fail { margin: 0; padding: 0 24px; color: var(--ink-2); font-size: 15px; text-align: center; line-height: 1.6; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(95, 225, 255, 0.15); border-top-color: var(--cyan); animation: spin 0.9s linear infinite; }

.noscript { position: fixed; inset: 40% 0 auto; text-align: center; color: var(--ink-2); font-family: var(--ui); }

/* ── Smaller screens ─────────────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .banners { width: min(440px, calc(100% - 380px)); }
  .radio { max-width: 340px; }
}

@media (max-width: 860px) {
  .title {
    align-items: flex-start;
    padding: calc(22px + var(--st)) calc(18px + var(--sr)) calc(22px + var(--sb)) calc(18px + var(--sl));
    background: linear-gradient(180deg, rgba(3, 7, 13, 0.9) 0%, rgba(3, 7, 13, 0.72) 55%, rgba(3, 7, 13, 0.3) 100%);
  }
  .title-col { width: 100%; max-width: 560px; margin: 0 auto; }
  .tagline { font-size: 15.5px; margin-bottom: 20px; }
  .banners { top: calc(86px + var(--st)); width: calc(100% - 32px); }
  .radio, .sector-info { display: none; }
  .hud-score { min-width: 0; padding: 8px 13px 9px; }
  .score { font-size: 25px; }
  .stat { padding: 5px 11px; }
  .stat b { font-size: 17px; }
}

@media (max-width: 560px) {
  .sectors { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 74%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin-right: -18px; padding-right: 18px; scrollbar-width: none; }
  .sectors::-webkit-scrollbar { display: none; }
  .sector { scroll-snap-align: start; min-height: 118px; }
  .start-row { gap: 12px; }
  .start-row .btn-primary { width: 100%; }
  .hud-score {
    top: calc(8px + var(--st));
    left: calc(10px + var(--sl));
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 14px;
    border-radius: 14px;
  }
  .hud-score .score-head, .streak-text { display: none; }
  .score { font-size: 22px; line-height: 1.2; }
  .streak { margin-top: 0; gap: 7px; }
  .hud-right { top: calc(8px + var(--st)); right: calc(10px + var(--sr)); gap: 6px; }
  .hbtn { width: 42px; height: 42px; border-radius: 12px; }
  .stat { display: none; }
  .streak .bar { min-width: 34px; width: 34px; flex: none; }
  .banners { top: calc(66px + var(--st)); }
  .banner { font-size: 12.5px; padding: 8px 13px; white-space: normal; text-align: left; border-radius: 16px; }
  .hint { bottom: calc(14px + var(--sb)); padding: 12px 14px 12px 12px; }
  .hint-text { font-size: 13.5px; }
  .panel { padding: 22px 18px 18px; border-radius: 20px; }
  .panel h2 { font-size: 22px; }
  .over-score b { font-size: 38px; }
  .over-stats { grid-template-columns: repeat(2, 1fr); }
  .how-grid { grid-template-columns: 1fr; }
  .medal { font-size: 11px; padding: 8px; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .title { align-items: flex-start; }
  .logo svg { width: min(360px, 100%); }
  .tagline { margin-bottom: 14px; font-size: 14.5px; }
  .start-row { margin-bottom: 14px; }
  .sector { min-height: 104px; }
  .radio, .sector-info { display: none; }
}

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