:root {
  --paper: oklch(0.972 0.014 84);
  --paper-2: oklch(0.948 0.02 84);
  --paper-3: oklch(0.912 0.024 84);
  --card: oklch(0.99 0.007 84);
  --ink: oklch(0.26 0.05 262);
  --ink-2: oklch(0.42 0.04 262);
  --ink-3: oklch(0.57 0.03 262);
  --line: oklch(0.88 0.02 84);

  --ocean: oklch(0.5 0.16 262);
  --ocean-2: oklch(0.42 0.15 263);
  --ocean-3: oklch(0.58 0.14 262);
  --land: oklch(0.965 0.028 90);
  --land-hover: oklch(0.92 0.06 86);
  --land-other: oklch(0.83 0.035 88);
  --land-out: oklch(0.6 0.1 262);
  --border: oklch(0.38 0.1 262);

  --accent: oklch(0.73 0.17 52);
  --accent-ink: oklch(0.52 0.15 45);
  --accent-bg: oklch(0.94 0.045 60);
  --good: oklch(0.78 0.15 158);
  --good-ink: oklch(0.47 0.11 160);
  --good-bg: oklch(0.94 0.05 158);
  --warn: oklch(0.86 0.14 88);
  --warn-ink: oklch(0.52 0.11 75);
  --warn-bg: oklch(0.95 0.06 90);
  --bad: oklch(0.68 0.18 25);
  --bad-ink: oklch(0.52 0.17 25);
  --bad-bg: oklch(0.94 0.04 25);
  --violet: oklch(0.6 0.17 295);
  --violet-ink: oklch(0.47 0.17 295);
  --violet-bg: oklch(0.94 0.04 295);
  --ocean-bg: oklch(0.93 0.04 262);

  --m1: oklch(0.93 0.06 135);
  --m2: oklch(0.88 0.1 145);
  --m3: oklch(0.82 0.13 152);
  --m4: oklch(0.73 0.14 158);
  --m5: oklch(0.62 0.13 165);

  --shadow-sm: 0 1px 2px oklch(0.25 0.06 262 / 0.1), 0 2px 6px -2px oklch(0.25 0.06 262 / 0.12);
  --shadow: 0 1px 2px oklch(0.25 0.06 262 / 0.08), 0 10px 30px -10px oklch(0.25 0.06 262 / 0.28);
  --shadow-lg: 0 2px 4px oklch(0.2 0.06 262 / 0.08), 0 24px 60px -16px oklch(0.2 0.06 262 / 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Unbounded", "Manrope", system-ui, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 500 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.1 0 0 0 0 0.3 0 0 0 1 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
}

h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid oklch(0.5 0.16 262 / 0.55); outline-offset: 2px; border-radius: 10px; }

.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

kbd {
  font: 700 11px/1 var(--font);
  padding: 3px 6px;
  border-radius: 6px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
}

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

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), background-color 0.18s, border-color 0.18s, box-shadow 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn .ic { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: oklch(0.22 0.05 40); box-shadow: inset 0 -2px 0 oklch(0.55 0.15 45 / 0.35); }
.btn-primary:hover { background: oklch(0.76 0.17 55); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--paper-2); border-color: var(--paper-3); }
.btn-danger { background: transparent; border-color: oklch(0.85 0.06 25); color: var(--bad-ink); }
.btn-danger:hover { background: var(--bad-bg); }
.btn-lg { height: 54px; padding: 0 24px; font-size: 16px; border-radius: 14px; }
.btn-lg .ic { width: 20px; height: 20px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-sm .ic { width: 16px; height: 16px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 0;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s var(--ease), background-color 0.18s;
}
.icon-btn:hover { background: var(--paper-2); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn-sm { width: 32px; height: 32px; border-radius: 9px; box-shadow: none; background: transparent; }
.icon-btn-sm .ic { width: 18px; height: 18px; }

.link { color: var(--ocean); font-weight: 700; text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

.input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  font: 600 16px var(--font);
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: var(--ink-3); font-weight: 500; }
.input:focus { outline: none; border-color: var(--ocean); box-shadow: 0 0 0 4px oklch(0.5 0.16 262 / 0.15); }

.bar { position: relative; height: 8px; border-radius: 99px; background: var(--paper-3); overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--good); transition: width 0.9s var(--ease); }
.bar-lg { height: 12px; }

.dots { display: inline-flex; gap: 3px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--paper-3); }
.dots i.on { background: var(--m5); }
.dots-lg i { width: 10px; height: 10px; }

.flag { display: block; border-radius: 4px; box-shadow: 0 0 0 1px oklch(0.25 0.05 262 / 0.12), var(--shadow-sm); object-fit: cover; background: var(--paper-2); }
.flag-sm { width: 32px; height: 24px; border-radius: 3px; }
.flag-md { width: 64px; height: 48px; }
.flag-lg { width: auto; height: 96px; aspect-ratio: 4 / 3; margin: 8px auto 2px; border-radius: 6px; }
.flag-info { width: 72px; height: 54px; }

/* ---------- шапка ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px max(20px, calc((100vw - 1180px) / 2));
  background: oklch(0.972 0.014 84 / 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark svg { width: 34px; height: 34px; display: block; }
.logo-word { font: 700 19px/1 var(--display); letter-spacing: -0.02em; }
.nav { display: flex; gap: 4px; }
.nav-a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink-2);
  transition: background-color 0.15s, color 0.15s;
}
.nav-a .ic { width: 18px; height: 18px; }
.nav-a:hover { background: var(--paper-2); color: var(--ink); }
.nav-a.is-on { background: var(--ink); color: var(--paper); }
.topbar-stats { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  font-weight: 800;
}
.chip-streak { color: var(--ink-3); }
.chip-streak .ic { width: 19px; height: 19px; }
.chip-streak.is-lit { color: var(--accent-ink); }
.chip-streak.is-lit .ic { fill: var(--accent); stroke: var(--accent-ink); }
.chip-level { padding-left: 5px; }
.chip-level-t { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.ring {
  --p: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: conic-gradient(var(--good) calc(var(--p) * 360deg), var(--paper-3) 0);
}
.ring b {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: var(--card);
  font: 700 12px/1 var(--display);
}

/* ---------- страница ---------- */
.page { max-width: 1180px; margin: 0 auto; padding: 0 20px 40px; }
.section { margin-top: 56px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head h2 { font: 700 22px/1.2 var(--display); letter-spacing: -0.015em; }
.section-sub { color: var(--ink-3); font-size: 15px; }
.page-h { font: 700 clamp(28px, 3.4vw, 40px)/1.1 var(--display); letter-spacing: -0.02em; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.empty { color: var(--ink-3); padding: 20px 0; }

/* ---------- главная ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr);
  gap: 48px;
  align-items: center;
  padding-top: 44px;
}
.hero-h {
  margin-top: 14px;
  font: 700 clamp(32px, 4.4vw, 56px)/1.04 var(--display);
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.hero-h em { font-style: normal; color: var(--accent-ink); }
.hero-p { margin-top: 18px; font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 46ch; text-wrap: pretty; }
.goal { margin-top: 26px; max-width: 420px; }
.goal-top { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.goal-top b { color: var(--ink); }
.goal-sub { margin-top: 8px; font-size: 13px; color: var(--ink-3); }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.hero-fig { margin: 0; }
.hero-map {
  position: relative;
  aspect-ratio: 1000 / 500;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.legend { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--ink-2); flex-wrap: wrap; }
.legend-scale { display: inline-flex; align-items: center; gap: 4px; }
.legend-scale i { width: 16px; height: 10px; border-radius: 3px; }
.legend-scale .lg0 { background: var(--land); box-shadow: inset 0 0 0 1px var(--line); }
.legend-scale small { font-size: 12px; font-weight: 600; color: var(--ink-3); margin: 0 4px; }

.regions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  margin: 0 -2px 10px;
  scrollbar-width: none;
}
.regions::-webkit-scrollbar { display: none; }
.region {
  flex: none;
  display: grid;
  grid-template-columns: auto auto;
  gap: 2px 10px;
  align-items: baseline;
  min-width: 128px;
  padding: 10px 14px 12px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--card);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, transform 0.18s var(--ease);
}
.region:hover { border-color: var(--paper-3); background: var(--paper-2); }
.region:active { transform: scale(0.98); }
.region-name { font-weight: 800; font-size: 15px; }
.region-meta { justify-self: end; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.region-bar { grid-column: 1 / -1; height: 4px; margin-top: 6px; border-radius: 4px; background: var(--paper-3); overflow: hidden; }
.region-bar i { display: block; height: 100%; background: var(--good); }
.region.is-on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.region.is-on .region-meta { color: oklch(0.8 0.03 262); }
.region.is-on .region-bar { background: oklch(0.38 0.06 262); }

.tone-accent { --tone: var(--accent); --tone-ink: var(--accent-ink); --tone-bg: var(--accent-bg); }
.tone-ocean { --tone: var(--ocean); --tone-ink: var(--ocean); --tone-bg: var(--ocean-bg); }
.tone-bad { --tone: var(--bad); --tone-ink: var(--bad-ink); --tone-bg: var(--bad-bg); }
.tone-warn { --tone: var(--warn); --tone-ink: var(--warn-ink); --tone-bg: var(--warn-bg); }
.tone-violet { --tone: var(--violet); --tone-ink: var(--violet-ink); --tone-bg: var(--violet-bg); }
.tone-good { --tone: var(--good); --tone-ink: var(--good-ink); --tone-bg: var(--good-bg); }

.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mode {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto 24px;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1.5px solid var(--line);
  background: var(--card);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.mode:hover { border-color: var(--tone); transform: translateY(-2px); box-shadow: var(--shadow); }
.mode:active { transform: translateY(0) scale(0.99); }
.mode-ic { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 15px; background: var(--tone-bg); color: var(--tone-ink); }
.mode-ic .ic { width: 26px; height: 26px; }
.mode-body { display: grid; gap: 2px; }
.mode-t { font: 700 18px/1.2 var(--display); letter-spacing: -0.01em; }
.mode-d { font-size: 14px; color: var(--ink-3); line-height: 1.4; }
.mode-meta { font-size: 13px; font-weight: 800; color: var(--tone-ink); background: var(--tone-bg); padding: 4px 9px; border-radius: 8px; white-space: nowrap; }
.mode-go { color: var(--ink-3); transition: transform 0.25s var(--ease), color 0.2s; }
.mode:hover .mode-go { color: var(--tone-ink); transform: translateX(3px); }
.mode-wide { grid-column: 1 / -1; padding: 22px 24px; background: var(--ink); border-color: var(--ink); color: var(--paper); }
.mode-wide .mode-ic { width: 64px; height: 64px; background: var(--accent); color: oklch(0.22 0.05 40); }
.mode-wide .mode-ic .ic { width: 30px; height: 30px; }
.mode-wide .mode-t { font-size: 24px; }
.mode-wide .mode-d { color: oklch(0.82 0.03 262); font-size: 15px; }
.mode-wide .mode-meta { background: oklch(0.36 0.06 262); color: var(--accent); }
.mode-wide .mode-go { color: var(--accent); }
.mode-wide { grid-template-columns: 64px minmax(0, 1fr) auto 24px; }
.mode-wide:hover { border-color: var(--accent); }
.mode-span { grid-column: 1 / -1; background: var(--good-bg); border-color: oklch(0.86 0.07 158); }
.mode-span .mode-ic { background: var(--good); color: oklch(0.25 0.06 160); }

.hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hist-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 10px 16px 10px 10px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
}
.hist-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--tone-bg); color: var(--tone-ink); }
.hist-main { display: grid; }
.hist-main b { font-weight: 800; }
.hist-main small { color: var(--ink-3); font-size: 13px; }
.hist-score { font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hist-xp { font-weight: 800; color: var(--good-ink); font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }

.foot { margin-top: 72px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- карта ---------- */
.wm { position: relative; overflow: hidden; background: var(--ocean-2); touch-action: none; user-select: none; -webkit-user-select: none; --inv: 1; }
.wm-svg { display: block; cursor: grab; }
.wm-svg:active { cursor: grabbing; }
.wm-static .wm-svg { cursor: default; }
.wm-sphere { fill: var(--ocean); }
.wm-grat { fill: none; stroke: var(--ocean-3); stroke-width: calc(0.7px * var(--inv)); opacity: 0.5; }
.wm-c {
  fill: var(--fill, var(--land));
  stroke: var(--border);
  stroke-width: calc(0.6px * var(--inv));
  stroke-linejoin: round;
  transition: fill 0.25s ease-out;
}
.wm-c.is-other { fill: var(--land-other); pointer-events: none; }
.wm-c.is-play { cursor: pointer; }
.wm-static .wm-c { cursor: default; }
.wm-c.is-out { fill: var(--land-out); stroke: oklch(0.5 0.12 262); pointer-events: none; }
.play .wm-c.is-play:not(.res-first):not(.res-retry):not(.res-fail):not(.is-target):not(.is-out):hover { fill: var(--land-hover); }
.wm-c.res-first { fill: var(--good); }
.wm-c.res-retry { fill: var(--warn); }
.wm-c.res-fail { fill: var(--bad); }
.wm-c.is-target { fill: var(--accent); }
.wm-c.is-bad { fill: var(--bad); transition: none; }
.wm-hover { fill: none; stroke: var(--ink); stroke-width: calc(1.8px * var(--inv)); stroke-linejoin: round; opacity: 0; pointer-events: none; transition: opacity 0.12s; }
.wm-hover.on { opacity: 1; }
.wm-pulse { fill: none; stroke: var(--accent); stroke-linejoin: round; opacity: 0; pointer-events: none; }
.wm-pulse.on { opacity: 1; animation: pulse 1.5s var(--ease) infinite; }
@keyframes pulse {
  0% { stroke-width: calc(1px * var(--inv)); stroke-opacity: 1; }
  100% { stroke-width: calc(22px * var(--inv)); stroke-opacity: 0; }
}
.wm-m { cursor: pointer; }
.wm-static .wm-m { cursor: default; }
.wm-m-hit { fill: transparent; }
.wm-m-dot { fill: var(--fill, var(--land)); stroke: var(--border); stroke-width: calc(1.3px * var(--inv)); transition: fill 0.25s; }
.wm-m:hover .wm-m-dot { fill: var(--land-hover); }
.wm-m.res-first .wm-m-dot { fill: var(--good); }
.wm-m.res-retry .wm-m-dot { fill: var(--warn); }
.wm-m.res-fail .wm-m-dot, .wm-m.is-bad .wm-m-dot { fill: var(--bad); }
.wm-m.is-target .wm-m-dot { fill: var(--accent); }
.wm-m.is-out { display: none; }

.wm-labels { position: absolute; inset: 0; pointer-events: none; }
.wm-label {
  position: absolute;
  transform: translate(-50%, calc(-100% - 10px)) scale(0.85);
  opacity: 0;
  padding: 5px 11px;
  border-radius: 99px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: var(--shadow);
  transition: opacity 0.2s, transform 0.3s var(--ease);
}
.wm-label::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 10px;
  height: 10px;
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 2px;
  z-index: -1;
}
.wm-label.on { opacity: 1; transform: translate(-50%, calc(-100% - 10px)) scale(1); }
.wm-label-good { background: var(--good-ink); }
.wm-label-bad { background: var(--bad-ink); }
.wm-tip {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  padding: 5px 10px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.12s;
  box-shadow: var(--shadow);
}
.wm-tip.on { opacity: 1; }

/* ---------- игра ---------- */
body[data-view="play"], body[data-view="conquest"] { overflow: hidden; }
.play { position: fixed; inset: 0; background: var(--ocean-2); overflow: hidden; }
.play-map { position: absolute; inset: 0; }

.hud {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  z-index: 5;
}
.hud > * { pointer-events: auto; }
.hud-mid {
  flex: 1;
  min-width: 0;
  max-width: 560px;
  margin: 0 auto;
  padding: 8px 14px 10px;
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.hud-title { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; line-height: 1.3; white-space: nowrap; overflow: hidden; }
.hud-title b { font-weight: 800; }
.hud-title span { color: var(--ink-3); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.hud-progress { margin-top: 7px; }
.segs { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; }
.seg-i { height: 6px; border-radius: 3px; background: var(--paper-3); transition: background-color 0.3s; }
.seg-i.is-cur { background: var(--ink-3); }
.seg-i.is-rep { opacity: 0.75; }
.seg-i.r-first { background: var(--good); }
.seg-i.r-retry { background: var(--warn); }
.seg-i.r-fail { background: var(--bad); }
.timebar { height: 6px; border-radius: 3px; background: var(--paper-3); overflow: hidden; }
.timebar i { display: block; height: 100%; background: var(--violet); transition: width 0.2s linear; }
.timebar.is-low i { background: var(--bad); }
.hud-count { display: block; margin-top: 4px; font-size: 12px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hud-right { display: flex; gap: 8px; align-items: center; }
.hud-xp, .hud-combo {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.hud-xp b { font: 700 16px/1 var(--display); color: var(--ink); }
.hud-combo { display: none; color: var(--accent-ink); }
.hud-combo.on { display: inline-flex; animation: pop 0.35s var(--ease); }
.hud-combo .ic { width: 18px; height: 18px; fill: var(--accent); stroke: var(--accent-ink); }
.hud-combo b { font: 700 16px/1 var(--display); }
.hud-combo.hot { background: var(--accent); color: oklch(0.22 0.05 40); }
.hud-combo.hot .ic { fill: var(--warn); stroke: oklch(0.3 0.08 40); }
@keyframes pop { 0% { transform: scale(0.7); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
.xp-pop {
  position: absolute;
  right: 6px;
  top: 100%;
  font: 700 18px/1 var(--display);
  color: var(--good);
  text-shadow: 0 1px 0 var(--ink);
  pointer-events: none;
  animation: xpup 1.1s var(--ease) forwards;
}
@keyframes xpup { 0% { opacity: 0; transform: translateY(14px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-6px); } }

.prompt {
  position: absolute;
  top: calc(max(12px, env(safe-area-inset-top)) + 66px);
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 24px));
  padding: 14px 20px 16px;
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
  text-align: center;
  z-index: 4;
  animation: drop 0.4s var(--ease);
}
@keyframes drop { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.p-kicker { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.p-name { margin-top: 4px; font: 700 clamp(24px, 4vw, 34px)/1.12 var(--display); letter-spacing: -0.02em; text-wrap: balance; }
.p-muted { font-size: clamp(17px, 2.6vw, 20px); color: var(--accent-ink); }
.p-line { margin-top: 8px; font-size: 15px; font-weight: 700; color: var(--bad-ink); }
.p-line.is-hint { color: var(--accent-ink); }
.sub-name .p-line { color: var(--bad-ink); }
.p-actions { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.prompt.st-done { padding: 12px 12px 12px 14px; text-align: left; }
.card-answer { display: flex; align-items: center; gap: 14px; }
.ca-text { flex: 1; min-width: 0; }
.ca-name { font: 700 22px/1.15 var(--display); letter-spacing: -0.015em; }
.ca-sub { margin-top: 2px; font-size: 13px; color: var(--ink-3); font-weight: 600; }
.verdict { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.verdict .ic { width: 15px; height: 15px; stroke-width: 2.6; }
.v-first { color: var(--good-ink); }
.v-retry { color: var(--warn-ink); }
.v-fail { color: var(--bad-ink); }
.verdict-xp { margin-left: 4px; padding: 2px 7px; border-radius: 6px; background: var(--good-bg); color: var(--good-ink); }
.btn-next { flex: none; }

.answer {
  position: absolute;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 24px));
  padding: 12px;
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
  z-index: 4;
}
.answer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 4px 10px; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.is-bad-t { color: var(--bad-ink); }
.answer-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; }
.type-row { position: relative; display: flex; gap: 8px; }
.type-row .btn { height: 48px; }
.sugg {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 18px);
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}
.sugg-i { padding: 10px 12px; border-radius: 9px; font-weight: 700; cursor: pointer; }
.sugg-i.is-on, .sugg-i:hover { background: var(--paper-2); }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--paper-2); }
.seg button { height: 28px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; font-size: 13px; font-weight: 700; color: var(--ink-3); cursor: pointer; }
.seg button.is-on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  text-align: left;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, transform 0.15s var(--ease);
}
.choice:hover:not(:disabled) { border-color: var(--ocean); background: var(--card); }
.choice:active:not(:disabled) { transform: scale(0.98); }
.choice:disabled { cursor: default; }
.choice.is-good { background: var(--good); border-color: var(--good); color: oklch(0.22 0.05 160); }
.choice.is-bad { background: var(--bad); border-color: var(--bad); color: var(--card); }
.choice.is-good kbd, .choice.is-bad kbd { background: oklch(1 0 0 / 0.35); border-color: transparent; color: inherit; }
.shake { animation: shake 0.4s var(--ease); }
@keyframes shake {
  0%, 100% { transform: translateX(-50%); }
  20% { transform: translateX(calc(-50% - 8px)); }
  40% { transform: translateX(calc(-50% + 7px)); }
  60% { transform: translateX(calc(-50% - 4px)); }
  80% { transform: translateX(calc(-50% + 2px)); }
}

.map-ctrl { position: absolute; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 6px; z-index: 3; }
.mode-name .map-ctrl { bottom: auto; top: 50%; transform: translateY(-50%); }

.result {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: start center;
  padding: max(20px, env(safe-area-inset-top)) 16px 20px;
  overflow-y: auto;
  background: oklch(0.2 0.07 262 / 0.5);
  opacity: 0;
  transition: opacity 0.35s ease-out;
}
.result.on { opacity: 1; }
.result-card {
  width: min(640px, 100%);
  margin: auto 0;
  padding: 28px;
  border-radius: 26px;
  background: var(--paper);
  box-shadow: var(--shadow-lg);
  transform: translateY(16px);
  transition: transform 0.5s var(--ease);
}
.result.on .result-card { transform: none; }
.result-h { margin-top: 8px; font: 700 clamp(28px, 5vw, 40px)/1.05 var(--display); letter-spacing: -0.025em; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; gap: 8px; margin-top: 22px; }
.stat { padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.stat b { display: block; font: 700 24px/1.1 var(--display); letter-spacing: -0.02em; }
.stat span { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.lv { margin-top: 18px; }
.lv-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; font-size: 14px; }
.lv-top b { font-weight: 800; }
.lv-top span { color: var(--ink-2); font-weight: 600; }
.lv-top small { margin-left: auto; color: var(--ink-3); font-weight: 700; font-variant-numeric: tabular-nums; }
.lv .bar i { background: var(--accent); transition-duration: 1.4s; }
.res-list { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.res-i { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto 22px; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.res-name { display: grid; min-width: 0; line-height: 1.25; }
.res-name b { font-size: 14px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-name small { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-mark .ic { width: 18px; height: 18px; stroke-width: 2.6; }
.res-i.r-first .res-mark { color: var(--good-ink); }
.res-i.r-retry .res-mark { color: var(--warn-ink); }
.res-i.r-fail .res-mark { color: var(--bad-ink); }
.result-cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }

/* ---------- покорение ---------- */
.cq-bar { margin-top: 7px; height: 6px; border-radius: 3px; background: var(--paper-3); overflow: hidden; }
.cq-bar i { display: block; height: 100%; width: 0; background: var(--good); transition: width 0.6s var(--ease); }
.cq-nums { gap: 6px; }
.cq-num { display: grid; justify-items: center; min-width: 58px; padding: 6px 10px; border-radius: 12px; background: var(--card); box-shadow: var(--shadow-sm); line-height: 1.1; }
.cq-num b, .cq-num span { font: 700 16px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.cq-num small { font-size: 11px; font-weight: 700; color: var(--ink-3); }
.cq-side {
  position: absolute;
  top: calc(max(12px, env(safe-area-inset-top)) + 74px);
  left: 12px;
  width: 248px;
  padding: 16px;
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  z-index: 3;
}
.cq-side h2 { font: 700 15px/1 var(--display); margin-bottom: 12px; }
.cq-regions { display: grid; gap: 4px; }
.cq-reg { display: grid; gap: 5px; padding: 7px 8px; margin: 0 -8px; border: 0; border-radius: 10px; background: transparent; text-align: left; cursor: pointer; }
.cq-reg:hover { background: var(--paper-2); }
.cq-reg-t { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; }
.cq-reg-t small { color: var(--ink-3); font-weight: 700; font-variant-numeric: tabular-nums; }
.cq-reg .bar { height: 5px; }
.cq-reg.is-done .cq-reg-t { color: var(--good-ink); }
.cq-side-actions { display: grid; gap: 8px; margin-top: 14px; }
.cq-tip { font-size: 12px; color: var(--ink-3); text-align: center; }
.cq-hints { display: flex; align-items: center; gap: 10px; padding: 0 4px 10px; }
.cq-hint { font-weight: 700; color: var(--accent-ink); }
.conquest .map-ctrl { right: 12px; }

/* ---------- атлас ---------- */
.page-atlas { padding-top: 32px; }
.atlas-head { align-items: flex-end; }
.atlas-head .section-sub { max-width: 60ch; margin-top: 8px; }
.atlas-search { position: relative; width: min(340px, 100%); }
.atlas-search .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.atlas-search .input { padding-left: 42px; background: var(--card); }
.atlas-stage { position: relative; height: min(66vh, 640px); min-height: 360px; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-lg); }
.atlas-map { position: absolute; inset: 0; }
.atlas-stage .map-ctrl { bottom: 14px; right: 14px; }
.atlas-info {
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: 290px;
  padding: 18px;
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
  animation: rise 0.35s var(--ease);
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.info-x { position: absolute; right: 10px; top: 10px; }
.info-name { margin-top: 12px; font: 700 22px/1.15 var(--display); letter-spacing: -0.015em; padding-right: 20px; }
.info-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 12px 0 0; font-size: 14px; }
.info-dl dt { color: var(--ink-3); font-weight: 600; }
.info-dl dd { margin: 0; font-weight: 700; }
.info-know { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 700; }
.info-know small { color: var(--ink-3); font-weight: 600; }
.tabs { display: flex; gap: 4px; margin: 28px 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; height: 38px; padding: 0 14px; border-radius: 10px; border: 0; background: transparent; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.tab:hover { background: var(--paper-2); }
.tab.is-on { background: var(--ink); color: var(--paper); }
.atlas-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; }
.atlas-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; border: 1px solid transparent; background: transparent; text-align: left; cursor: pointer; transition: background-color 0.15s, border-color 0.15s; }
.atlas-row:hover { background: var(--card); border-color: var(--line); }
.atlas-row.is-on { background: var(--card); border-color: var(--accent); }
.atlas-row-t { display: grid; min-width: 0; line-height: 1.25; }
.atlas-row-t b { font-weight: 800; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atlas-row-t small { color: var(--ink-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- профиль ---------- */
.prof-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; align-items: center; padding-top: 40px; }
.prof-level { display: flex; gap: 22px; align-items: center; }
.big-level {
  flex: none;
  display: grid;
  place-items: center;
  align-content: center;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 0 0 6px var(--accent-bg), var(--shadow);
}
.big-level span { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: oklch(0.8 0.03 262); }
.big-level b { font: 700 44px/1 var(--display); color: var(--accent); }
.prof-level-t { flex: 1; display: grid; gap: 10px; }
.prof-level-t .bar i { background: var(--accent); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fact { padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.fact b { display: block; font: 700 26px/1.1 var(--display); letter-spacing: -0.02em; }
.fact span { font-size: 13px; color: var(--ink-3); font-weight: 600; line-height: 1.3; }
.reg-table { display: grid; gap: 10px; }
.reg-row { display: grid; grid-template-columns: 190px minmax(0, 1fr) 70px; align-items: center; gap: 16px; font-size: 15px; }
.reg-row span { text-align: right; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bar-stack .b-seen { background: var(--m2); }
.bar-stack .b-learn { background: var(--m5); }
.key { display: inline-block; width: 12px; height: 8px; border-radius: 3px; vertical-align: middle; }
.k-learn { background: var(--m5); }
.k-seen { background: var(--m2); margin-left: 10px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.ach { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; border: 1px dashed var(--paper-3); color: var(--ink-3); }
.ach-ic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--paper-2); font: 700 20px/1 var(--display); }
.ach-t { display: grid; line-height: 1.3; }
.ach-t b { font-weight: 800; font-size: 14px; }
.ach-t small { font-size: 12px; }
.ach.is-got { border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.ach.is-got .ach-ic { background: var(--accent-bg); font-size: 24px; }
.ach.is-got small { color: var(--ink-3); }
.hard { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.hard-i { display: grid; grid-template-columns: 32px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); text-decoration: none; }
.hard-i img { grid-row: 1 / 3; }
.hard-i b { font-weight: 800; font-size: 14px; }
.hard-i small { color: var(--bad-ink); font-size: 12px; font-weight: 700; }
.hard-i:hover { border-color: var(--accent); }
.settings { display: grid; gap: 2px; max-width: 720px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.setting b { display: block; font-weight: 800; }
.setting small { color: var(--ink-3); font-size: 13px; }
.switch { position: relative; flex: none; width: 50px; height: 30px; border-radius: 99px; border: 0; background: var(--paper-3); cursor: pointer; transition: background-color 0.2s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow-sm); transition: transform 0.25s var(--ease); }
.switch.is-on { background: var(--good-ink); }
.switch.is-on i { transform: translateX(20px); }
.select { height: 40px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); font-weight: 700; cursor: pointer; }
.data-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- уведомления ---------- */
#toasts { position: fixed; left: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; gap: 8px; pointer-events: none; max-width: min(380px, calc(100vw - 32px)); }
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 12px 12px;
  border-radius: 16px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.4s var(--ease);
}
.toast.on { opacity: 1; transform: none; }
.toast-body { display: grid; line-height: 1.35; }
.toast-body b { font-weight: 800; }
.toast-body span { color: oklch(0.85 0.03 262); }
.toast-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: oklch(0.34 0.06 262); font-size: 22px; flex: none; }
.toast-good { background: var(--good-ink); }
.toast-bad { background: var(--bad-ink); }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 70; }

.fatal { max-width: 480px; margin: 20vh auto; padding: 0 20px; text-align: center; display: grid; gap: 14px; justify-items: center; }
.fatal h1 { font: 700 28px/1.1 var(--display); }
.boot { position: fixed; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-weight: 700; }

/* ---------- адаптив ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 28px; }
  .prof-top { grid-template-columns: 1fr; }
  .cq-side { width: 220px; }
}

@media (max-width: 760px) {
  .topbar { gap: 10px; padding: 10px 14px; }
  .logo-word { display: none; }
  .nav { gap: 2px; }
  .nav-a { padding: 0 10px; }
  .chip-level-t { display: none; }
  .page { padding: 0 16px 32px; }
  .section { margin-top: 40px; }
  .modes { grid-template-columns: 1fr; }
  .mode { grid-template-columns: 46px minmax(0, 1fr) 20px; gap: 12px; padding: 14px; }
  .mode-ic { width: 46px; height: 46px; border-radius: 13px; }
  .mode-meta { display: none; }
  .mode-wide { grid-template-columns: 52px minmax(0, 1fr) 20px; padding: 18px 16px; }
  .mode-wide .mode-ic { width: 52px; height: 52px; }
  .mode-wide .mode-t { font-size: 20px; }
  .hist-row { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .hist-xp { display: none; }
  .hist-ic { width: 36px; height: 36px; }
  .hero-cta .btn { flex: 1; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reg-row { grid-template-columns: 1fr 64px; gap: 6px 12px; }
  .reg-row .bar { grid-column: 1 / -1; grid-row: 2; }
  .res-list { grid-template-columns: 1fr; }
  .stats { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
  .result-card { padding: 22px 18px; }
  .hud { left: 8px; right: 8px; gap: 6px; }
  .hud-xp { padding: 0 9px; }
  .hud-title span { display: none; }
  .prompt { top: calc(max(8px, env(safe-area-inset-top)) + 62px); padding: 12px 14px 14px; }
  .flag-lg { height: 72px; }
  .card-answer { gap: 10px; }
  .card-answer .flag-md { width: 48px; height: 36px; }
  .ca-name { font-size: 18px; }
  .btn-next { padding: 0 12px; }
  .answer { width: calc(100% - 16px); bottom: max(8px, env(safe-area-inset-bottom)); }
  .map-ctrl { right: 8px; top: 50%; bottom: auto; transform: translateY(-50%); }
  .map-ctrl .icon-btn { width: 38px; height: 38px; }
  .cq-side { left: 8px; right: 8px; top: auto; bottom: max(8px, env(safe-area-inset-bottom)); width: auto; padding: 8px; }
  .cq-side h2, .cq-regions, .cq-tip { display: none; }
  .cq-side-actions { margin: 0; grid-auto-flow: column; grid-template-columns: minmax(0, 1fr) auto; }
  .cq-side-actions .btn { min-width: 0; }
  .cq-num { min-width: 46px; padding: 5px 7px; }
  .conquest .hud-title span { display: none; }
  .conquest .cq-ask:not([hidden]) ~ .cq-side { display: none; }
  .atlas-stage { height: 56vh; border-radius: 20px; }
  .atlas-info { left: 8px; right: 8px; bottom: 8px; width: auto; padding: 14px; }
  .atlas-info .flag-info { width: 48px; height: 36px; }
  .atlas-info .info-name { margin-top: 8px; font-size: 18px; }
  .atlas-stage .map-ctrl { top: 14px; bottom: auto; transform: none; }
  .page-atlas .atlas-stage + .tabs { margin-top: 20px; }
  #toasts { top: max(10px, env(safe-area-inset-top)); bottom: auto; left: 10px; right: 10px; max-width: none; }
  .toast { transform: translateY(-10px); }
}

@media (max-width: 600px) {
  .nav-a span { display: none; }
  .nav-a { width: 42px; padding: 0; justify-content: center; }
}

@media (max-width: 420px) {
  .choices { grid-template-columns: 1fr; }
  .choice { min-height: 44px; }
  .cq-nums .cq-num:nth-child(3) { display: none; }
}

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