:root {
  --bg0: #010b14;
  --bg1: #03243a;
  --bg2: #06415e;
  --panel: rgba(5, 32, 50, 0.74);
  --panel-2: rgba(8, 48, 72, 0.6);
  --line: rgba(120, 228, 255, 0.28);
  --line-strong: rgba(120, 228, 255, 0.6);
  --cyan: #4fe3ff;
  --text: #e8fbff;
  --muted: #8fb6c6;
  --ok: #5bf0a2;
  --bad: #ff6b7d;
  --warn: #ffc14d;
  --orange: #ff9a3c;
  --f-ui: 'Nunito', ui-rounded, system-ui, -apple-system, sans-serif;
  --f-hud: 'Exo 2', 'Nunito', system-ui, sans-serif;
  --f-word: 'Andika', 'Nunito', ui-rounded, system-ui, sans-serif;
  --r: 18px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg1) 32%, #021625 68%, var(--bg0) 100%) fixed;
  background-color: var(--bg0);
  color: var(--text);
  font-family: var(--f-ui);
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior-y: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

h1, h2, h3 { font-family: var(--f-hud); margin: 0; letter-spacing: 0.01em; }

p { margin: 0; }

/* ---------- ocean ---------- */

.ocean { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }

.rays {
  position: absolute;
  inset: -10% -30% auto -30%;
  height: 75%;
  background: repeating-linear-gradient(100deg, rgba(140, 225, 255, 0.08) 0 36px, transparent 36px 110px);
  filter: blur(10px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
  animation: sway 12s ease-in-out infinite alternate;
}

.bubbles, .bubbles::after {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 12% 30%, rgba(190, 240, 255, 0.35) 0 2px, transparent 3px),
    radial-gradient(circle at 30% 80%, rgba(190, 240, 255, 0.25) 0 3px, transparent 4px),
    radial-gradient(circle at 55% 15%, rgba(190, 240, 255, 0.3) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 60%, rgba(190, 240, 255, 0.28) 0 4px, transparent 5px),
    radial-gradient(circle at 92% 25%, rgba(190, 240, 255, 0.22) 0 2px, transparent 3px);
  background-size: 320px 640px;
  animation: rise 22s linear infinite;
}
.bubbles::after {
  content: '';
  background-size: 260px 520px;
  background-position: 120px 0;
  opacity: 0.6;
  animation-duration: 15s;
}

@keyframes rise { from { background-position-y: 0; } to { background-position-y: -640px; } }
@keyframes sway { from { transform: translateX(-4%) rotate(-1deg); } to { transform: translateX(4%) rotate(1deg); } }

/* ---------- layout ---------- */

.app {
  max-width: 520px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 12px) 16px calc(env(safe-area-inset-bottom) + 28px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: inset 0 1px 0 rgba(160, 240, 255, 0.12), 0 10px 30px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.hud {
  font-family: var(--f-hud);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}
.hud.warn { color: var(--bad); }

.muted { color: var(--muted); font-size: 13px; }

/* ---------- buttons ---------- */

.btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 800;
  font-size: 16px;
  transition: transform 0.08s ease, opacity 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.38; }
.btn.primary {
  background: linear-gradient(180deg, #6ff3ff 0%, #18a5d6 100%);
  color: #022233;
  box-shadow: 0 0 20px rgba(79, 227, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn.ghost { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-strong); color: var(--text); }
.btn.danger { background: linear-gradient(180deg, #ff8a7a 0%, #e0364c 100%); color: #2a0006; }
.btn.big { width: 100%; padding: 16px; font-size: 18px; border-radius: 16px; }
.btn.small { padding: 8px 14px; font-size: 14px; border-radius: 12px; }

.icon-btn {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 24px;
  line-height: 1;
  display: grid;
  place-items: center;
}

/* ---------- home ---------- */

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand b { display: block; font-family: var(--f-hud); font-weight: 800; letter-spacing: 0.12em; font-size: 15px; }
.brand small { display: block; font-family: var(--f-hud); color: var(--muted); font-size: 11px; letter-spacing: 0.1em; }
.brand-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(79, 227, 255, 0.18), 0 0 14px var(--cyan);
  animation: ping 2.4s ease-out infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(79, 227, 255, 0.5), 0 0 14px var(--cyan); }
  100% { box-shadow: 0 0 0 14px rgba(79, 227, 255, 0), 0 0 14px var(--cyan); }
}

.pda-btn {
  border: 1px solid var(--line-strong);
  background: var(--panel);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: var(--f-hud);
  font-weight: 700;
  letter-spacing: 0.1em;
  font-size: 13px;
}
.pda-btn b { color: var(--cyan); margin-left: 4px; }

.install { display: flex; gap: 12px; align-items: flex-start; padding: 12px 12px 12px 16px; font-size: 14px; line-height: 1.4; border-color: rgba(255, 193, 77, 0.5); }
.install p { flex: 1; }
.install .icon-btn { width: 32px; height: 32px; font-size: 14px; }

.hero { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.hero h1 { font-size: 26px; font-weight: 800; line-height: 1.15; }
.hero-sub { color: var(--muted); font-size: 15px; line-height: 1.4; }
.hero-sub b { color: var(--text); }

.meter { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-top: 8px; }
.meter-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--ok)); box-shadow: 0 0 12px var(--cyan); transition: width 0.6s ease; }
.meter-label { font-size: 14px; color: var(--muted); }
.meter-label b { color: var(--text); font-size: 16px; }

.dive-path { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; position: relative; }
.dive-path::before {
  content: '';
  position: absolute;
  left: 37px;
  top: 24px;
  bottom: 24px;
  border-left: 2px dashed rgba(120, 228, 255, 0.25);
}

.mission {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 60px 44px;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.mission.current {
  border-color: var(--hue);
  box-shadow: 0 0 0 1px var(--hue), 0 0 24px -4px var(--hue);
}
.mission.locked { opacity: 0.5; }
.mission.boss.current { animation: alarm 1.6s ease-in-out infinite; }
@keyframes alarm { 50% { box-shadow: 0 0 0 1px var(--hue), 0 0 34px 0 var(--hue); } }

.m-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: #062a3e;
  border: 2px solid var(--hue);
  z-index: 1;
}
.m-body { min-width: 0; }
.m-title { font-family: var(--f-hud); font-weight: 800; font-size: 16px; line-height: 1.15; overflow-wrap: break-word; }
.m-num { color: var(--hue); margin-right: 6px; }
.m-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.mission.boss .m-sub { color: var(--bad); font-weight: 800; }
.dots { display: flex; gap: 5px; margin-top: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.2); }
.dots i.on { background: var(--hue); border-color: var(--hue); box-shadow: 0 0 6px var(--hue); }
.m-art { width: 60px; }
.lock { font-size: 20px; text-align: center; }
.go {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
}
.go.primary {
  border: 0;
  background: linear-gradient(180deg, #6ff3ff 0%, #18a5d6 100%);
  color: #022233;
  box-shadow: 0 0 18px rgba(79, 227, 255, 0.5);
  animation: ping-go 1.8s ease-out infinite;
}
.go:active { transform: scale(0.94); }
@keyframes ping-go {
  0% { box-shadow: 0 0 0 0 rgba(79, 227, 255, 0.55); }
  100% { box-shadow: 0 0 0 12px rgba(79, 227, 255, 0); }
}

.bee { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; }
.bee h2 { font-size: 22px; margin: 2px 0 4px; }

.parent-btn {
  position: relative;
  overflow: hidden;
  align-self: center;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  -webkit-touch-callout: none;
}
.hold-fill { position: absolute; inset: 0; width: 0; background: rgba(79, 227, 255, 0.25); }
.parent-btn.holding .hold-fill { width: 100%; transition: width 1.5s linear; }

.fanmade { text-align: center; font-size: 11px; color: rgba(143, 182, 198, 0.6); }

/* ---------- creatures ---------- */

.creature { display: block; width: 100%; height: auto; overflow: visible; }
.creature .b { fill: var(--c); fill-opacity: 0.22; stroke: var(--c); stroke-width: 2.4; stroke-linejoin: round; }
.creature .l { fill: none; stroke: var(--c); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.creature .d { fill: var(--c); fill-opacity: 0.55; }
.creature .e { fill: #fff; }
.creature .pupil { fill: #03131f; }
.creature .mouth { fill: #03131f; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; }
.creature .plate { fill: none; stroke: #fff; stroke-opacity: 0.85; stroke-width: 4; stroke-linecap: round; }
.creature .q { fill: var(--cyan); font: 800 44px var(--f-hud); }
.creature:not(.locked):not(.unknown) { filter: drop-shadow(0 0 5px var(--c)); }
.creature.locked .b { fill: #0b2b3c; fill-opacity: 1; stroke: #2b5d77; }
.creature.locked .e, .creature.locked .pupil, .creature.locked .mouth { fill: #2b5d77; stroke: none; }
.creature.locked .l, .creature.locked .d, .creature.locked .plate { display: none; }
.creature.unknown .l { stroke: var(--cyan); }

/* ---------- dive ---------- */

.dive-top { display: flex; align-items: center; gap: 12px; }
.dive-title { flex: 1; min-width: 0; font-family: var(--f-hud); font-weight: 800; font-size: 20px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dive-title small { display: block; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan); font-weight: 700; }
.counter { font-family: var(--f-hud); font-weight: 800; font-size: 16px; color: var(--cyan); }

.scan { display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 12px; }
.scan.boss { border-color: rgba(255, 90, 70, 0.6); }
.scan.boss .hud { color: var(--bad); }
.scan-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.scan-info .hud { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scan-bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.scan-fill { height: 100%; background: linear-gradient(90deg, var(--cyan), var(--hue)); box-shadow: 0 0 10px var(--hue); transition: width 0.8s ease; }
.scan-pct { font-family: var(--f-hud); font-weight: 800; font-size: 13px; color: var(--muted); }

.scan-reveal { position: relative; width: 104px; flex: none; aspect-ratio: 200 / 120; }
.scan-reveal .layer { position: absolute; inset: 0; }
.scan-reveal .top { clip-path: inset(0 calc(100% - var(--p)) 0 0); transition: clip-path 0.8s ease; }
.beam {
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: var(--p, 50%);
  width: 2px;
  background: var(--cyan);
  box-shadow: 0 0 10px 3px var(--cyan);
  animation: flicker 1.1s infinite;
}
@keyframes flicker { 50% { opacity: 0.45; } }

.card { padding: 18px 12px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.emoji { font-size: 50px; line-height: 1; }
.card-note { color: var(--muted); font-size: 15px; line-height: 1.35; min-height: 20px; max-width: 32ch; }
.card-note.good { color: var(--ok); font-weight: 800; font-size: 20px; font-family: var(--f-hud); }

.word { font-family: var(--f-word); font-weight: 700; font-size: 58px; line-height: 1.1; letter-spacing: 0.04em; display: flex; justify-content: center; }
.word.long { font-size: 46px; }
.word.xlong { font-size: 38px; }
.ltr { display: inline-block; transition: transform 0.15s ease, color 0.15s ease, text-shadow 0.15s; }
.ltr.lit { color: var(--warn); transform: translateY(-6px) scale(1.18); text-shadow: 0 0 16px rgba(255, 193, 77, 0.8); }
.parts { font-family: var(--f-word); font-size: 18px; color: var(--muted); }
.parts span { display: inline-block; padding: 2px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--text); }

.boxes { display: flex; justify-content: center; gap: 6px; width: 100%; }
.box {
  flex: 0 1 44px;
  min-width: 0;
  aspect-ratio: 11 / 14;
  border-radius: 10px;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--f-word);
  font-weight: 700;
  font-size: 34px;
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.15s ease, background 0.15s;
}
.boxes.long { gap: 5px; }
.boxes.long .box { font-size: 28px; }
.boxes.xlong { gap: 4px; }
.boxes.xlong .box { font-size: 22px; border-radius: 8px; }
.box.filled { background: rgba(79, 227, 255, 0.1); border-color: var(--line-strong); }
.box.cur { border-color: var(--cyan); box-shadow: 0 0 12px rgba(79, 227, 255, 0.5); animation: blink 1.1s step-end infinite; }
@keyframes blink { 50% { border-color: var(--line); box-shadow: none; } }
.box.extra { border-style: dashed; border-color: var(--bad); }
.box.ok { border-color: var(--ok); background: rgba(91, 240, 162, 0.14); color: var(--ok); }
.box.bad { border-color: var(--bad); background: rgba(255, 107, 125, 0.14); color: var(--bad); }
.box.lit { transform: scale(1.14); background: var(--warn); color: #2b1a00; border-color: var(--warn); }

.tools { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.tool {
  min-width: 72px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 22px;
  line-height: 1;
}
.tool span { font-size: 12px; font-weight: 800; color: var(--muted); }
.tool:active { transform: scale(0.95); background: var(--panel-2); }

.main-actions { display: flex; flex-direction: column; gap: 12px; }

.mic {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 60px;
  border-radius: 30px;
  border: 1px solid rgba(255, 180, 90, 0.7);
  background: linear-gradient(180deg, rgba(255, 154, 60, 0.32), rgba(255, 154, 60, 0.12));
  font-weight: 800;
  font-size: 18px;
}
.mic-icon { font-size: 26px; }
.mic.on {
  border-color: var(--bad);
  background: linear-gradient(180deg, rgba(255, 90, 110, 0.45), rgba(255, 90, 110, 0.18));
  animation: listen 1.2s ease-in-out infinite;
}
@keyframes listen {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 90, 110, 0.5); }
  50% { box-shadow: 0 0 0 10px rgba(255, 90, 110, 0); }
}

.keyboard { display: flex; flex-direction: column; gap: 6px; }
.krow { display: flex; justify-content: center; gap: 6px; }
.key {
  flex: 1 1 0;
  max-width: 50px;
  height: 48px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.07);
  font-family: var(--f-word);
  font-weight: 700;
  font-size: 25px;
  line-height: 1;
}
.key:active { background: var(--cyan); color: #022233; transform: scale(0.94); }
.key.del { font-family: var(--f-ui); font-size: 20px; color: var(--muted); }

/* ---------- PDA ---------- */

.pda-intro { color: var(--muted); font-size: 14px; }
.pda-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pda-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--r);
  padding: 14px 12px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.pda-card:not(.locked):not(.signal) { border-color: color-mix(in srgb, var(--c) 60%, transparent); }
.pda-card.lev { grid-column: span 2; }
.pda-card.lev .pda-art { width: 78%; }
.pda-art { width: 100%; }
.pda-name { font-family: var(--f-hud); font-weight: 800; font-size: 15px; }
.pda-kind { font-size: 12px; color: var(--muted); }
.pda-card.lev .pda-kind { color: var(--bad); font-weight: 800; letter-spacing: 0.08em; }
.pda-card.locked { opacity: 0.6; }
.pda-card.signal { border-style: dashed; opacity: 0.75; }
.pda-card.signal .pda-art { animation: flicker 2.4s infinite; }

/* ---------- overlay ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(0, 8, 14, 0.8);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(env(safe-area-inset-top) + 16px) 16px calc(env(safe-area-inset-bottom) + 16px);
  overflow-y: auto;
}
.overlay[hidden] { display: none; }
.overlay-inner { width: 100%; max-width: 440px; animation: pop 0.35s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes pop { from { transform: scale(0.85); opacity: 0; } }

.reward { padding: 24px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; border-color: color-mix(in srgb, var(--c, var(--cyan)) 60%, transparent); }
.reward h2 { font-size: 26px; font-weight: 800; }
.reward .kind { font-family: var(--f-hud); font-weight: 700; color: var(--c, var(--cyan)); letter-spacing: 0.12em; text-transform: uppercase; font-size: 13px; }
.reward .fact { color: var(--muted); font-size: 16px; line-height: 1.45; }
.reward .fact b { color: var(--text); }
.reward .btn { margin-top: 8px; }
.reward-art { position: relative; width: 82%; margin: 6px 0; animation: materialize 1s ease both; }
.reward-art::after {
  content: '';
  position: absolute;
  inset: -6px;
  background: repeating-linear-gradient(0deg, rgba(79, 227, 255, 0.08) 0 2px, transparent 2px 5px);
  pointer-events: none;
}
.beam.sweep { left: 0; animation: sweep 1s ease-in-out both; }
@keyframes sweep { from { left: 0; opacity: 1; } 90% { opacity: 1; } to { left: 100%; opacity: 0; } }
@keyframes materialize { from { opacity: 0; filter: blur(8px) brightness(2); } }
.reward.leviathan { border-color: rgba(255, 107, 74, 0.8); box-shadow: 0 0 60px -10px rgba(255, 107, 74, 0.6); }
.reward.leviathan .reward-art { width: 100%; }
.reward.leviathan h2 { color: #ffb19f; }
.reward.alert { border-color: rgba(255, 77, 61, 0.8); animation: alarm-red 1.2s ease-in-out infinite; }
.reward.alert h2 { color: #ff9a8a; font-size: 22px; }
@keyframes alarm-red { 50% { box-shadow: 0 0 50px -6px rgba(255, 60, 50, 0.7); } }
.reward-art.pulse { animation: flicker 1s infinite; }
.row-btns { display: flex; gap: 10px; width: 100%; }
.row-btns .btn { flex: 1; }

.choice-btns { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 8px; }
.choice-btns .btn { margin-top: 0; }
.chooser-art { width: 62%; margin: 4px 0; }
.chooser-art .scan-reveal { width: 100%; }

.mode-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  text-align: left;
}
.mode-btn:active { transform: scale(0.98); }
.mode-btn.primary {
  border: 0;
  background: linear-gradient(180deg, #6ff3ff 0%, #18a5d6 100%);
  color: #022233;
  box-shadow: 0 0 20px rgba(79, 227, 255, 0.35);
}
.mode-icon { font-size: 30px; line-height: 1; flex: none; }
.mode-text { display: flex; flex-direction: column; gap: 2px; }
.mode-text b { font-family: var(--f-hud); font-size: 19px; font-weight: 800; }
.mode-text small { font-size: 13px; font-weight: 700; opacity: 0.8; line-height: 1.3; }

body.shake .overlay-inner { animation: shake 0.45s ease-in-out 3; }
@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-8px, 4px); }
  40% { transform: translate(7px, -5px); }
  60% { transform: translate(-6px, -3px); }
  80% { transform: translate(5px, 5px); }
}

/* ---------- parent ---------- */

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; background: var(--line); }
.stat { background: #052033; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.stat b { font-family: var(--f-hud); font-size: 26px; font-weight: 800; }
.stat b small { font-size: 15px; color: var(--muted); }
.stat span { font-size: 13px; color: var(--muted); line-height: 1.3; }

.app section.panel:not(.stats):not(.hero):not(.bee):not(.card):not(.scan) { padding: 16px; }
.app section.panel h3 { font-size: 16px; margin-bottom: 12px; }

.bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; margin-bottom: 8px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.bar-fill { width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--cyan), #1a7fa8); }
.bar span { font-size: 10px; color: var(--muted); }

.hard, .tests { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hard li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.hard b { font-family: var(--f-word); font-size: 20px; }
.hard span, .tests li { font-size: 14px; color: var(--muted); }
.tests b { color: var(--text); }

.words { width: 100%; border-collapse: collapse; font-size: 14px; }
.words th { text-align: left; font-size: 11px; color: var(--muted); font-weight: 700; padding: 0 4px 6px; }
.words td { padding: 6px 4px; border-top: 1px solid rgba(120, 228, 255, 0.1); }
.words td.w { font-family: var(--f-word); font-weight: 700; font-size: 16px; }
.words td.warn { color: var(--bad); font-weight: 800; }
.words tr.grp td { color: var(--cyan); font-family: var(--f-hud); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; padding-top: 14px; border-top: 0; }

.settings { display: flex; flex-direction: column; gap: 14px; }
.settings h3 { margin-bottom: 0 !important; }
.settings .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; line-height: 1.35; }
.settings em { color: var(--warn); font-style: normal; }
.seg { display: flex; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; flex: none; }
.seg button { border: 0; background: transparent; padding: 7px 9px; font-size: 13px; font-weight: 800; color: var(--muted); }
.seg button.on { background: var(--cyan); color: #022233; }
.toggle { flex: none; width: 50px; height: 30px; border-radius: 99px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.08); position: relative; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--muted); transition: transform 0.2s; }
.toggle.on { background: rgba(79, 227, 255, 0.4); }
.toggle.on::after { transform: translateX(20px); background: var(--cyan); }

input.url {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: 600 14px var(--f-ui);
  -webkit-user-select: text;
  user-select: text;
}
.settings a { color: var(--cyan); }

/* ---------- small phones ---------- */

@media (max-width: 360px) {
  .mission { grid-template-columns: 40px minmax(0, 1fr) 44px; }
  .m-art { display: none; }
  .word { font-size: 48px; }
  .key { height: 44px; font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
