/* =========================================================
   Merchant Ear — тактический тёмный интерфейс
   Токены → база → оболочка → приложение → лендинг → мини-окно
   ========================================================= */

:root {
  /* поверхности */
  --bg: #0b0d0c;
  --bg-grid: rgba(242, 194, 48, 0.035);
  --surface: #111412;
  --surface-2: #171b18;
  --surface-3: #1e231f;
  --surface-hover: #242a25;
  --line: #262c28;
  --line-strong: #39413b;

  /* текст */
  --text: #e9ece8;
  --text-2: #a9b1aa;
  --text-3: #808a82;
  --text-read: #c8cec9;

  /* смысловые */
  --accent: #f2c230;
  --accent-2: #ffd75e;
  --accent-ink: #1a1400;
  --accent-soft: rgba(242, 194, 48, 0.12);
  --accent-line: rgba(242, 194, 48, 0.4);
  --good: #5bc77a;
  --good-soft: rgba(91, 199, 122, 0.14);
  --bad: #f05b4f;
  --bad-soft: rgba(240, 91, 79, 0.14);
  --info: #5aa9ff;

  /* типографика */
  --font-display: "Russo One", "Exo 2", system-ui, sans-serif;
  --font-body: "Exo 2", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  /* форма и движение */
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 32px -12px rgba(0, 0, 0, 0.6);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast: 140ms;
  --t: 220ms;
  --gutter: clamp(16px, 4vw, 40px);
  /* Ширина контента растёт на широких и растянутых экранах, но не уже 1120 и не шире 1440.
     Тексты лендинга отдельно ограничены по ch/px, поэтому читаемость не страдает. */
  --max: clamp(1120px, 92vw, 1440px);

  color-scheme: dark;
}

/* ---------- база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(242, 194, 48, 0.07), transparent 60%),
    linear-gradient(var(--bg-grid) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px) 0 0 / 40px 40px,
    var(--bg);
  color: var(--text);
  font: 400 15px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }
h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0; }
img { max-width: 100%; }
button, select, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }
[hidden] { display: none !important; }

.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#i-play path, .i.fill { fill: currentColor; stroke: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--text-3); font-weight: 400; }
.hint { font-size: 13px; color: var(--text-3); }
.hint b { color: var(--text-2); font-weight: 600; }
.empty { color: var(--text-2); font-size: 14px; }
.card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }

.skip { position: absolute; left: 12px; top: -48px; z-index: 100; padding: 10px 14px; background: var(--accent); color: var(--accent-ink); border-radius: var(--r-sm); font-weight: 700; }
.skip:focus { top: 12px; }

/* ---------- кнопки и поля ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 14px; border-radius: var(--r-sm);
  background: var(--surface-3); border: 1px solid var(--line-strong); color: var(--text);
  font-weight: 600; font-size: 14px; line-height: 1; white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn:hover { background: var(--surface-hover); border-color: #4a544c; color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 0 var(--accent-line), 0 8px 24px -10px rgba(242, 194, 48, 0.6); }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--accent-ink); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger:hover { background: #ff6d61; border-color: #ff6d61; }
.btn.ghost { background: transparent; border-color: var(--line-strong); color: var(--text-2); }
.btn.ghost:hover { color: var(--text); background: var(--surface-2); }
.btn.lg { min-height: 48px; padding: 12px 22px; font-size: 15px; }
.btn.small { min-height: 30px; padding: 5px 10px; font-size: 12.5px; gap: 6px; }
.btn.small .i { width: 14px; height: 14px; }
.btn.wide { width: 100%; }

select {
  appearance: none; min-height: 40px; padding: 8px 34px 8px 12px; border-radius: var(--r-sm);
  background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a9b1aa' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px;
  border: 1px solid var(--line-strong); color: var(--text); cursor: pointer; width: 100%;
  transition: border-color var(--t-fast) var(--ease);
}
select:hover { border-color: #4a544c; }
option { background: var(--surface-2); color: var(--text); }

input[type=range] { width: 100%; height: 24px; accent-color: var(--accent); cursor: pointer; background: transparent; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  min-height: 34px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface-2); color: var(--text); cursor: pointer; font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.chip:hover { border-color: var(--accent-line); background: var(--surface-3); }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip.zero { opacity: 0.35; }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); font-family: var(--font-mono); white-space: nowrap; }
.badge.warn, .badge.q-low { background: var(--bad-soft); color: #ffb0a9; }
.badge.q-good { background: var(--good-soft); color: #a6f0bb; }
.badge.q-mid { background: var(--accent-soft); color: #ffe28d; }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 12px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

/* ---------- навигация ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(11, 13, 12, 0.82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); height: 60px; display: flex; align-items: center; gap: 8px; }
.brand { margin-right: auto; display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand-mark { width: 28px; height: 28px; color: var(--accent); }
.brand-name { font: 400 18px/1 var(--font-display); letter-spacing: 0.02em; }
.brand-name b { color: var(--accent); font-weight: 400; }
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-links a { color: var(--text-2); text-decoration: none; font-weight: 500; font-size: 14px; padding: 8px 12px; border-radius: var(--r-sm); transition: color var(--t-fast), background var(--t-fast); }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }

.nav-lang { font: 600 12.5px/1 var(--font-mono); letter-spacing: 0.04em; }
.nav-guide .i { fill: currentColor; }
.nav-tg .i { fill: currentColor; stroke: none; }

/* видеоинструкция (js/guide.js) */
.map-dialog.guide-dialog { width: min(1040px, calc(100vw - 32px)); padding: 16px; }
.guide-dialog .map-dialog-head { margin-bottom: 12px; }
.guide-dialog video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r-sm); }
/* Английская версия: текст подставляет js/i18n.js, до этого страницу не показываем. */
html[data-i18n-pending] body { visibility: hidden; }

.status {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px; max-width: 46vw;
  font: 500 12.5px/1 var(--font-mono); color: var(--text-2);
  padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.status::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--text-3); }
.status.live { color: var(--good); border-color: rgba(91, 199, 122, 0.45); background: rgba(91, 199, 122, 0.06); }
.status.live::before { background: var(--good); box-shadow: 0 0 0 0 rgba(91, 199, 122, 0.6); animation: ping 1.6s var(--ease) infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 7px rgba(91, 199, 122, 0); } 100% { box-shadow: 0 0 0 0 rgba(91, 199, 122, 0); } }

/* ---------- hero ---------- */
main { max-width: var(--max); margin: 0 auto; padding: 24px var(--gutter) 0; }
.hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; align-items: end; padding: 64px 0 40px; }
.hero-copy { display: flex; flex-direction: column; gap: 20px; }
.hero h1 { font: 400 clamp(34px, 5.2vw, 58px)/1.04 var(--font-display); letter-spacing: -0.01em; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: clamp(16px, 1.6vw, 18px); color: var(--text-2); max-width: 58ch; text-wrap: pretty; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.hero-stats { margin: 0; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.hero-stats > div { padding: 18px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hero-stats > div:nth-child(2n) { border-right: 0; }
.hero-stats > div:nth-child(n+3) { border-bottom: 0; }
.hero-stats dt { font: 600 11px/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }
.hero-stats dd { margin: 8px 0 0; font: 400 30px/1 var(--font-display); color: var(--text); font-variant-numeric: tabular-nums; }
.hero-stats dd small { font: 500 14px var(--font-body); color: var(--text-3); }

/* ---------- консоль приложения ---------- */
.console {
  position: relative; margin-bottom: 32px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line-strong); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.corner { position: absolute; width: 14px; height: 14px; border: 2px solid var(--accent); pointer-events: none; }
.corner.tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: var(--r-lg); }
.corner.tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; border-top-right-radius: var(--r-lg); }
.corner.bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; border-bottom-left-radius: var(--r-lg); }
.corner.br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: var(--r-lg); }

.console-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 12px 12px 8px; border-bottom: 1px solid var(--line); }
.console-title { display: flex; align-items: center; gap: 10px; padding-left: 8px; font: 400 17px/1.2 var(--font-display); }
.console-title .i { color: var(--accent); }
.tabs { display: flex; gap: 2px; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px;
  background: none; border: 0; border-radius: var(--r-sm); color: var(--text-3); font-weight: 600; font-size: 14px; cursor: pointer;
  position: relative; transition: color var(--t-fast), background var(--t-fast);
}
.tab:hover { color: var(--text); background: var(--surface-3); }
.tab[aria-selected="true"] { color: var(--text); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -13px; height: 2px; background: var(--accent); border-radius: 2px; }
.tab[aria-selected="true"] .i { color: var(--accent); }
.tab-count { font: 600 11px/1 var(--font-mono); padding: 3px 6px; border-radius: 999px; background: var(--surface-3); color: var(--text-3); }
.console-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* текущая карта у заголовка: по клику — сменить */
.map-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 4px 10px 4px 8px; margin-left: 4px;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--text-2); font: 600 12.5px/1 var(--font-body); cursor: pointer;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.map-chip[hidden] { display: none; }
.map-chip:hover { color: var(--text); border-color: var(--accent-line); background: var(--surface-3); }
.map-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.map-chip .i { width: 14px; height: 14px; color: var(--text-3); }
.map-chip .map-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-left: 2px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

/* ---------- окно выбора карты ---------- */
.map-dialog { width: min(560px, calc(100vw - 32px)); padding: 20px; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface-2); color: var(--text); box-shadow: var(--shadow); }
.map-dialog::backdrop { background: rgba(5, 6, 6, 0.78); backdrop-filter: blur(6px); }
.map-dialog-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.map-dialog-head h2 { flex: 1; font: 400 20px/1.2 var(--font-display); }
.map-dialog-head .icon-only { padding: 5px 7px; }

/* ---------- телефон: QR-код со ссылкой ---------- */
#phoneBtn.linked { border-color: var(--good); color: var(--good); }
.phone-dialog { width: min(600px, calc(100vw - 32px)); }
.phone-dialog .map-dialog-head { margin-bottom: 6px; }
.report-lead { margin: -6px 0 12px; color: var(--text-2); font-size: 13.5px; }
.report-text {
  display: block; width: 100%; resize: vertical; min-height: 96px; padding: 10px 12px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm); color: var(--text);
  font: 400 14px/1.4 var(--font-body);
}
.report-text:focus { outline: none; border-color: var(--accent-line); }
.report-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.report-state { flex: 1; color: var(--text-3); font-size: 13px; }
.report-state.ok { color: var(--good, #4fd18b); }
.report-state.bad { color: var(--bad, #ef4b4b); }
.mini-report { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.mini-report .mini-debug { margin-left: 0; }
.mini-report span { font-size: 11px; color: var(--text-3); }
.phone-lead { margin: 0 0 18px; color: var(--text-2); }
.phone-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: center; }
.phone-qr-card { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.phone-qr-card figcaption { color: var(--text-3); font-size: 12.5px; }
.phone-qr { position: relative; display: grid; place-items: center; width: 196px; aspect-ratio: 1; padding: 8px; border-radius: var(--r-sm); background: #fff; }
.phone-qr svg { display: block; width: 100%; height: 100%; }
/* пока сервер не вернул ссылку */
.phone-qr-wait { width: 28px; height: 28px; border-radius: 50%; border: 3px solid #e3e3e3; border-top-color: #9a9a9a; animation: spin 0.8s linear infinite; }
.phone-ways { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.phone-ways li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.phone-ways li > span:last-child { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.phone-ways b { color: var(--text); font-weight: 600; }
.phone-ways small { color: var(--text-3); font-size: 12.5px; }
.phone-way-ic { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); }
.phone-way-ic .i { width: 18px; height: 18px; }
.phone-host { font-family: var(--font-mono); color: var(--text-2); }
.phone-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.phone-state { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; color: var(--text-2); }
.phone-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); animation: phone-wait 1.6s ease-in-out infinite; }
.phone-state.on { color: var(--good); }
.phone-state.on::before { background: var(--good); box-shadow: 0 0 8px var(--good); animation: none; }
@keyframes phone-wait { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .phone-state::before, .phone-qr-wait { animation: none; } }
.phone-actions { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.phone-foot[hidden], .phone-confirm[hidden] { display: none; }
/* подтверждение новой ссылки — на месте нижней строки */
.phone-confirm {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding: 12px 14px;
  border: 1px solid rgba(240, 91, 79, 0.45); border-radius: var(--r); background: var(--bad-soft);
}
.phone-confirm-text { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.phone-confirm .phone-actions { flex: none; flex-wrap: nowrap; }
.phone-confirm-text b { color: var(--text); }
.phone-confirm-text span { color: var(--text-2); font-size: 12.5px; }
.phone-qr.fresh { animation: qr-fresh 0.6s var(--ease); }
@keyframes qr-fresh { from { opacity: 0.2; transform: scale(0.97); } }
@media (max-width: 560px) {
  .phone-body { grid-template-columns: 1fr; justify-items: stretch; }
  .phone-qr-card { justify-self: center; }
  .phone-foot, .phone-confirm { flex-direction: column; align-items: stretch; }
  .phone-actions { justify-content: stretch; }
  .phone-actions .btn { flex: 1; }
}
#mapBack .i { transform: rotate(90deg); }
.map-grid, .mode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.map-card, .mode-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; text-align: left; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast); }
.map-card:hover, .mode-card:hover { border-color: var(--accent); background: var(--surface-3); }
.map-card.on, .mode-card.on { border-color: var(--accent); }
.map-card b, .mode-card b { font-size: 15px; }
.map-dots { display: flex; gap: 5px; }
.map-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.mode-card { border-left: 4px solid var(--c); }
.mode-swatch { width: 22px; height: 22px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); }
.mode-card small { color: var(--text-2); font-size: 12.5px; }
.mode-grid { grid-template-columns: 1fr; }
.mode-card { position: relative; overflow: hidden; }
.mode-card > * { position: relative; }
/* Кадр из игры справа, слева — затемнение под текст. */
.map-card.art, .mode-card.art { background: linear-gradient(90deg, rgba(10, 12, 11, 0.92) 0%, rgba(10, 12, 11, 0.55) 45%, rgba(10, 12, 11, 0.1) 100%), var(--art) center / cover no-repeat; }
.mode-card.art { min-height: 96px; justify-content: center; }
.map-card.art { min-height: 72px; }
.map-card.art:hover, .mode-card.art:hover { background: linear-gradient(90deg, rgba(10, 12, 11, 0.85) 0%, rgba(10, 12, 11, 0.4) 45%, rgba(10, 12, 11, 0) 100%), var(--art) center / cover no-repeat; }
.mode-card.art b, .map-card.art b { font-size: 18px; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8); }
/* Окно выбора карты: панорамы 3:1 встык, без рамок и зазоров, кадр виден целиком.
   --pick-w подобрана так, чтобы три ряда влезали в окно браузера по высоте. */
.map-dialog.map-pick {
  --pick-w: min(1280px, calc(100vw - 48px), calc((100dvh - 124px) * 2));
  width: var(--pick-w); max-width: none; max-height: calc(100dvh - 24px); padding: 0; overflow: auto; background: var(--surface);
}
.map-pick[open] { animation: rise 0.3s var(--ease) backwards; }
.map-pick .map-dialog-head { margin: 0; padding: 16px 24px; }
.map-pick .map-dialog-head h2 { font-size: 26px; }
.map-pick .map-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
.map-pick .mode-grid { display: grid; grid-auto-rows: 1fr; gap: 2px; height: calc(var(--pick-w) / 2); }
.map-pick .map-card, .map-pick .mode-card, .map-pick .map-card.art, .map-pick .mode-card.art, .map-pick .map-card.art:hover, .map-pick .mode-card.art:hover { background: #050606; }
.map-pick .map-card, .map-pick .mode-card {
  position: relative; isolation: isolate; overflow: hidden; justify-content: flex-end; min-height: 0; padding: 18px 24px; gap: 8px;
  border: 0; border-radius: 0; animation: fade 0.4s var(--ease) backwards;
}
.map-pick .map-card { aspect-ratio: 3 / 1; }
.map-pick .map-card:last-child:nth-child(odd) { grid-column: 1 / -1; aspect-ratio: 6 / 1; }
.map-pick :is(.map-card, .mode-card):nth-child(2) { animation-delay: 50ms; }
.map-pick :is(.map-card, .mode-card):nth-child(3) { animation-delay: 100ms; }
.map-pick :is(.map-card, .mode-card):nth-child(4) { animation-delay: 150ms; }
.map-pick :is(.map-card, .mode-card):nth-child(5) { animation-delay: 200ms; }
.map-pick :is(.map-card, .mode-card):nth-child(6) { animation-delay: 250ms; }
.map-pick :is(.map-card, .mode-card).art::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--art) center / cover no-repeat; transition: transform 0.6s var(--ease), filter 0.3s var(--ease); }
/* Затемнение только в углу под название, остальной кадр чистый. */
.map-pick :is(.map-card, .mode-card).art::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 130% at 0% 100%, rgba(5, 6, 6, 0.85), transparent 70%); }
/* Рамка выбора и наведения поверх кадра. */
.map-pick :is(.map-card, .mode-card) { box-shadow: inset 0 0 0 0 var(--accent); transition: box-shadow var(--t) var(--ease); }
.map-pick :is(.map-card, .mode-card):hover, .map-pick :is(.map-card, .mode-card):focus-visible, .map-pick :is(.map-card, .mode-card).on { box-shadow: inset 0 0 0 2px var(--accent); }
.map-pick :is(.map-card, .mode-card):focus-visible { outline: none; }
.map-pick :is(.map-card, .mode-card).art:hover::before { transform: scale(1.05); }
.map-pick :is(.map-grid, .mode-grid):hover :is(.map-card, .mode-card):not(:hover)::before { filter: brightness(0.55) saturate(0.8); }
.map-pick .map-card.art b, .map-pick .mode-card.art b, .map-pick .mode-card b { font: 400 28px/1.1 var(--font-display); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9); }
.map-pick .map-dots { gap: 7px; }
.map-pick .map-dots i { width: 12px; height: 12px; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.45); }
.map-pick .mode-card small { font-size: 15px; color: var(--text); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9); }
.map-pick .mode-swatch { width: 16px; height: 16px; }
@media (max-width: 760px) {
  .map-dialog.map-pick { --pick-w: calc(100vw - 24px); }
  .map-pick .map-grid { grid-template-columns: minmax(0, 1fr); }
  .map-pick .mode-grid { height: auto; grid-auto-rows: calc(var(--pick-w) / 3); }
  .map-pick .map-dialog-head { padding: 12px 16px; }
  .map-pick .map-dialog-head h2 { font-size: 20px; }
  .map-pick .map-card, .map-pick .mode-card { padding: 12px 14px; }
  .map-pick .map-card.art b, .map-pick .mode-card.art b, .map-pick .mode-card b { font-size: 22px; }
}

/* осциллограф */
.scope { position: relative; height: 92px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.05)); overflow: hidden; }
.scope canvas { display: block; width: 100%; height: 100%; }
.scope-legend { position: absolute; top: 8px; right: 12px; display: flex; gap: 14px; font: 500 11px/1 var(--font-mono); color: var(--text-3); }
.scope-legend span { display: inline-flex; align-items: center; gap: 6px; }
.scope-legend i { display: inline-block; width: 12px; height: 2px; border-radius: 1px; }
.lg-level { background: var(--good); }
.lg-thr { background: repeating-linear-gradient(90deg, var(--accent) 0 3px, transparent 3px 5px); }
.lg-hit { background: var(--accent); height: 10px !important; width: 2px !important; }
.scope-idle { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font: 600 12px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }

.panel { padding: 20px; display: flex; flex-direction: column; gap: 16px; animation: fade var(--t) var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.panel-head h2, .set-card h2 { font: 400 18px/1.2 var(--font-display); display: flex; align-items: center; gap: 10px; }
.panel-head .hint { margin-top: 6px; }
.set-card h2 .i { color: var(--accent); }

/* ---------- «Сейчас» ---------- */
.now-card { display: flex; flex-direction: column; gap: 16px; }
.now-state { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font: 400 22px/1.2 var(--font-display); }
.now-state small { font: 500 13px var(--font-body); color: var(--text-3); }
.now-state.wait { color: var(--text); }
.now-sound { color: var(--accent); }
.now-label { font: 500 15px var(--font-body); color: var(--text-2); }
.now-state .badge { font-size: 12px; }

.radar { position: relative; width: 14px; height: 14px; flex: none; }
.radar::before, .radar::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--good); }
.radar::after { animation: radar 1.6s var(--ease) infinite; opacity: 0.6; }
@keyframes radar { to { transform: scale(2.6); opacity: 0; } }

/* шаги: сетка → наведи → перетащи → проверка */
.flow { --fc: var(--accent); --fs: var(--accent-soft); display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; border: 1px solid var(--accent-line); border-radius: var(--r); background: linear-gradient(180deg, var(--fs), transparent 160%); }
.flow.warn { --fc: var(--bad); --fs: rgba(240, 91, 79, 0.12); border-color: rgba(240, 91, 79, 0.45); }
.flow.ok { --fc: var(--good); --fs: rgba(91, 199, 122, 0.12); border-color: rgba(91, 199, 122, 0.45); }
.flow-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.flow-steps li { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); color: var(--text-3); font: 600 12.5px/1 var(--font-body); transition: background var(--t) var(--ease), color var(--t) var(--ease); }
.flow-steps li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-steps b { flex: none; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); font: 700 11px/1 var(--font-mono); }
.flow-steps li.done { color: var(--text-2); }
.flow-steps li.done b { background: var(--good); border-color: var(--good); color: #08140c; }
.flow-steps li.on { background: var(--fs); color: var(--text); box-shadow: inset 0 0 0 1px var(--fc); }
.flow-steps li.on b { background: var(--fc); border-color: var(--fc); color: var(--accent-ink); }
.flow-now { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.flow-text { font: 400 22px/1.2 var(--font-display); color: var(--fc); }
.flow-sub { font: 500 14px var(--font-body); color: var(--text-2); }
.flow-spin { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2px solid var(--fs); border-top-color: var(--fc); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.flow-bar { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.flow-bar i { display: block; width: 35%; height: 100%; border-radius: 2px; background: var(--fc); animation: flowbar 1.3s var(--ease) infinite; }
@keyframes flowbar { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
@media (prefers-reduced-motion: reduce) { .flow-spin, .flow-bar i { animation: none; } .flow-bar i { width: 100%; opacity: 0.5; } }
@media (max-width: 520px) { .flow-steps li span { display: none; } .flow-steps li { justify-content: center; } }
.flow + .now-state { margin-top: 14px; }
body.mini .flow + .now-state { margin-top: 8px; }
body.mini .flow-steps li span { display: inline; }
body.mini .flow-steps li { justify-content: flex-start; }
body.mini .flow { padding: 10px; gap: 8px; }
body.mini .flow-steps { gap: 4px; }
body.mini .flow-steps li { padding: 4px 5px; font-size: 10.5px; gap: 4px; }
body.mini .flow-steps b { width: 15px; height: 15px; font-size: 9px; }
body.mini .flow-text { font-size: 18px; }
body.mini .flow-sub { font-size: 12.5px; }

/* пустое состояние — до начала прослушивания */
.idle { display: flex; flex-direction: column; gap: 22px; }
.idle h3 { font: 400 24px/1.2 var(--font-display); }
.idle p { color: var(--text-read); margin-top: 6px; max-width: 60ch; font-size: 15.5px; }
.share-guide { margin: 0; display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 28px; align-items: center; }
/* Раскладка одна и до прослушивания, и во время него: слева шаги и сетка, справа кнопки, график и предметы.
   --max общая для шапки и контента, поэтому край шапки совпадает с консолью. */
body:has(.console) { --max: 1360px; }
.console { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; padding: 32px; margin-bottom: 48px; }
.console-main { grid-column: 1; grid-row: 1; min-width: 0; padding-right: 36px; position: sticky; top: 76px; }
.console-side { grid-column: 2; grid-row: 1; align-self: stretch; min-width: 0; display: flex; flex-direction: column; gap: 16px; padding-left: 36px; border-left: 1px solid var(--line); }
.console-bar { flex-direction: column; align-items: stretch; justify-content: flex-start; flex-wrap: nowrap; gap: 12px; padding: 0; border-bottom: 0; }
.console-title { flex-wrap: wrap; gap: 12px; padding-left: 0; font-size: 18px; }
.console-bar .map-chip { flex: 1 0 100%; justify-content: center; gap: 8px; min-height: 46px; margin-left: 0; padding: 8px 14px; border-radius: var(--r-sm); font-size: 15px; }
.console-bar .map-chip .i { width: 16px; height: 16px; }
.console-actions { flex-direction: column; align-items: stretch; gap: 12px; }
.console-actions .btn { min-height: 46px; gap: 10px; font-size: 15px; }
.console-actions .pip-group > #pip { flex: 1; min-width: 0; }
.console-actions .pip-auto { padding: 0 16px 0 14px; font-size: 14px; }
#listen, #stop { order: -1; }
.console-side .scope { flex: none; height: 84px; border: 1px solid var(--line); border-radius: var(--r); }
.console-side .scope-legend { display: none; }
.console-main > .pip-hint, .console-main > .capture-error { width: auto; margin: 0 0 12px; }
.panel { padding: 0; }
/* До прослушивания: графика и сетки ещё нет, карту спрашивает «Слушать игру», кнопки крупнее. */
.idle-view #scopeBox, .idle-view .grid-card, .idle-view .map-chip { display: none; }
.idle-view .console-bar, .idle-view .console-actions { gap: 16px; }
.idle-view .console-actions .btn { min-height: 54px; font-size: 15.5px; }
.idle-view .console-actions #listen { min-height: 66px; margin-bottom: 12px; font-size: 18px; animation: listen-glow 2.4s ease-in-out infinite; }
.idle-view .btn:disabled { opacity: 0.7; }
@keyframes listen-glow { 50% { box-shadow: 0 0 0 5px var(--accent-soft), 0 8px 28px -8px rgba(242, 194, 48, 0.75); } }
.console { animation: rise 0.45s var(--ease) backwards; }
.console-side .scope { animation: fade var(--t) var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.share-shot { position: relative; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; }
.share-shot img { display: block; width: 100%; height: auto; }
.share-shot .mark { position: absolute; transform: translate(-50%, -50%); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 700 14px/1 var(--font-mono); box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.55); }
.idle-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; counter-reset: s; }
.idle-steps li { counter-increment: s; position: relative; padding: 16px 0 16px 46px; font-size: 15px; line-height: 1.45; color: var(--text-read); }
.idle-steps li + li { border-top: 1px solid var(--line); }
.idle-steps li b { color: var(--text); font-weight: 600; }
.idle-steps li::before { content: counter(s); position: absolute; left: 0; top: 14px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 700 14px/1 var(--font-mono); }

/* ---------- советы под приложением (js/help.js) ---------- */
.help { display: flex; flex-direction: column; gap: 16px; margin-bottom: 56px; }
.help h2 { font: 400 22px/1.2 var(--font-display); }
/* Появляются при прокрутке (js/help.js ставит .in и задержку --d). */
.reveal { opacity: 0; }
.reveal.in { opacity: 1; animation: rise 0.45s var(--ease) var(--d, 0ms) backwards; }
.help-tips { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.help-tips li { display: grid; grid-template-columns: 24px 260px minmax(0, 1fr); gap: 16px; align-items: baseline; padding: 16px 24px; transition: background var(--t) var(--ease); }
.help-tips li + li { border-top: 1px solid var(--line); }
.help-tips li:hover { background: var(--surface-2); }
.help-ic { align-self: center; color: var(--accent); }
.help-ic .i { display: block; width: 20px; height: 20px; }
.help-tips h3 { font-size: 16px; font-weight: 700; line-height: 1.3; }
.help-tips p { color: var(--text-read); font-size: 15px; line-height: 1.5; }
.help b { color: var(--text); font-weight: 600; }
html.phone-gate .help { display: none; }
@media (max-width: 1240px) {
  .share-guide { grid-template-columns: minmax(0, 1fr); }
  .share-shot { justify-self: center; width: 100%; max-width: 520px; }
}
@media (max-width: 1040px) {
  .console { display: flex; flex-direction: column; align-items: stretch; gap: 20px; padding: 20px; }
  .console-side { display: contents; }
  .console-bar { order: 1; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
  .console-side .scope { order: 2; }
  .console-main { order: 3; padding-right: 0; position: static; }
  .console-side .results { order: 4; }
}
@media (max-width: 720px) {
  .help-tips li { grid-template-columns: 24px minmax(0, 1fr); padding: 14px 16px; }
  .help-tips p { grid-column: 2; }
}
.waiting { display: flex; flex-direction: column; gap: 6px; padding: 4px 0; }
.waiting p { color: var(--text-3); font-size: 14px; }

/* опросник */
.quiz {
  border: 1px solid var(--accent-line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 14px;
  background: linear-gradient(180deg, var(--accent-soft), transparent 140%); animation: flash 1.2s var(--ease);
}
@keyframes flash { from { box-shadow: 0 0 0 3px var(--accent-line); } }
.quiz-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.quiz-head b { font: 400 16px var(--font-display); }
.quiz-q { display: flex; flex-direction: column; gap: 8px; font: 600 11.5px/1 var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); }
.quiz-q .chips, .quiz-q .size-row { text-transform: none; letter-spacing: 0; }
.quiz-ocr { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.quiz-ocr .i { flex: none; width: 16px; height: 16px; color: var(--accent); }
.quiz-ocr b { color: var(--text); }
.quiz-ocr .btn { margin-left: auto; }
.quiz-ocr.busy span { animation: ocr-pulse 1.6s ease-in-out infinite; }
@keyframes ocr-pulse { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .quiz-ocr.busy span { animation: none; } }
.quiz .chip small { color: inherit; opacity: 0.7; font-size: 11px; }

#sizes, .size-row { display: flex; flex-wrap: wrap; gap: 8px; }
.size-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px;
  min-width: 64px; min-height: 72px; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text-2);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.size-btn:hover { border-color: var(--accent-line); background: var(--surface-3); }
.size-btn small { font: 600 12px/1 var(--font-mono); }
.size-btn.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.size-btn.zero { opacity: 0.3; }
.size-icon { display: grid; grid-template-columns: repeat(var(--w), 10px); gap: 2px; }
.size-icon i { width: 10px; height: 10px; background: #5d665f; border-radius: 2px; }
.size-btn.on .size-icon i { background: var(--accent); }

/* сводка */
.summary { display: flex; }
.summary .stat { flex: 1; display: flex; align-items: baseline; gap: 12px; padding: 10px 14px; }
.summary .stat > b, .summary .stat > span { margin: 0; min-width: 0; }
.summary .stat > b { font-size: 18px; }
.summary:empty { display: none; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; min-width: 0; }
.stat > span { display: block; font: 600 11px/1.3 var(--font-mono); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; }
.stat > span + b { margin-top: 8px; }
.stat b { display: block; font: 600 22px/1.15 var(--font-mono); font-variant-numeric: tabular-nums; margin-top: 8px; }
.stat b + span { margin-top: 4px; text-transform: none; letter-spacing: 0; font: 500 12.5px/1.3 var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat b.good { color: var(--good); }
.stat b.bad { color: var(--bad); }

.filter-note { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--text-2); padding: 10px 14px; border-radius: var(--r); background: var(--surface); border: 1px dashed var(--line-strong); }

/* ---------- результаты ---------- */
.results { display: flex; flex-direction: column; gap: 10px; }
.results:empty { display: none; }
.category { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); transition: opacity var(--t); }
.category.unlikely { opacity: 0.55; }
.category-head {
  width: 100%; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto 170px; gap: 12px; align-items: center;
  padding: 12px 14px; background: var(--surface-2); border: 0; color: var(--text); cursor: pointer; text-align: left;
  transition: background var(--t-fast);
}
.category-head:hover { background: var(--surface-3); }
.category-arrow { display: grid; place-items: center; color: var(--text-3); transition: transform var(--t) var(--ease); }
.category-arrow .i { width: 18px; height: 18px; }
.category.closed .category-arrow { transform: rotate(-90deg); }
.category-name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.category-name small { display: block; font-size: 11px; font-weight: 400; color: var(--text-3); }
.category-price { padding: 3px 8px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); font: 600 12.5px/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.category-prob { display: flex; flex-direction: column; gap: 5px; }
.category-prob b { text-align: right; font: 600 17px/1 var(--font-mono); font-variant-numeric: tabular-nums; }
.bar { display: block; height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width var(--t) var(--ease); }
.category-prob .bar i { background: linear-gradient(90deg, #3d9a5a, var(--good)); }
.category-body { display: flex; flex-direction: column; }
.category.closed .category-body { display: none; }
.category-head.static { cursor: default; grid-template-columns: 1fr auto; }
.category-head.static:hover { background: var(--surface-2); }

.item {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) 120px 150px; gap: 14px; align-items: center;
  padding: 10px 14px; border-top: 1px solid var(--line); position: relative;
  transition: background var(--t-fast);
}
.item::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--rc, var(--line)); }
.item:hover { background: var(--surface-2); }
.item img { width: 48px; height: 48px; object-fit: contain; border-radius: var(--r-sm); background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--rc) 22%, #151816), #0e100f); border: 1px solid var(--line); }
.item .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .meta { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.item .price { text-align: right; font: 600 14px/1.2 var(--font-mono); font-variant-numeric: tabular-nums; }
.item .price small { display: block; font: 500 11.5px var(--font-body); color: var(--text-3); margin-top: 3px; }
.item .prob { display: flex; flex-direction: column; gap: 5px; }
.item .prob b { font: 600 16px/1 var(--font-mono); text-align: right; font-variant-numeric: tabular-nums; }
.item.unlikely { opacity: 0.5; }

/* ---------- библиотека ---------- */
.selftest:empty { display: none; }
.selftest { font-size: 13.5px; color: var(--text-2); padding: 10px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.sounds { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.sound {
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 12px; cursor: pointer;
  display: flex; flex-direction: column; gap: 8px; transition: border-color var(--t-fast), background var(--t-fast);
}
.sound:hover { border-color: var(--line-strong); background: var(--surface-2); }
.sound.possible { border-color: rgba(242, 194, 48, 0.25); }
.sound.impossible { opacity: 0.45; }
.sound.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.sound-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12.5px; }
.sound-head b { font: 600 14px var(--font-mono); color: var(--accent); }
.sound-name { font-size: 14px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sound-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.sound-score { height: 4px; background: var(--surface-3); border-radius: 2px; overflow: hidden; }
.sound-score i { display: block; height: 100%; background: var(--good); }

/* ---------- настройки ---------- */
.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.set-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.field output { font: 600 13px var(--font-mono); color: var(--accent); padding: 2px 6px; border-radius: 4px; background: var(--accent-soft); margin: 0 2px; }
.row { display: flex; gap: 8px; }
.row > select { flex: 1; min-width: 0; }
.or { display: flex; align-items: center; gap: 10px; color: var(--text-3); font: 600 11px var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- секции лендинга ---------- */
.section { padding: 0 0 96px; }
.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.section-head h2 { font: 400 clamp(26px, 3.4vw, 38px)/1.1 var(--font-display); text-wrap: balance; }

.steps-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.steps-grid li { padding: 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; }
.step-n { font: 400 44px/1 var(--font-display); color: transparent; -webkit-text-stroke: 1px var(--accent-line); }
.steps-grid h3, .feature h3, .callout h3 { font-size: 17px; font-weight: 700; }
.steps-grid p, .feature p, .callout p { color: var(--text-2); font-size: 14.5px; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature { padding: 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); display: flex; flex-direction: column; gap: 10px; transition: border-color var(--t), transform var(--t) var(--ease); }
.feature:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.feature > .i { width: 40px; height: 40px; padding: 9px; border-radius: var(--r); background: var(--accent-soft); color: var(--accent); margin-bottom: 4px; }

.callout { margin-top: 16px; display: flex; gap: 18px; align-items: flex-start; padding: 24px; border-radius: var(--r-lg); border: 1px solid rgba(91, 199, 122, 0.3); background: linear-gradient(90deg, var(--good-soft), transparent 70%); }
.callout > .i { width: 40px; height: 40px; color: var(--good); }
.callout div { display: flex; flex-direction: column; gap: 6px; }

.faq { display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.faq details { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); transition: border-color var(--t); }
.faq details[open] { border-color: var(--line-strong); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; font-weight: 600; font-size: 15.5px; min-height: 52px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { color: var(--text-3); transition: transform var(--t) var(--ease); }
.faq details[open] summary .i { transform: rotate(180deg); color: var(--accent); }
.faq details p { padding: 0 20px 18px; color: var(--text-2); }

.foot { border-top: 1px solid var(--line); background: rgba(0, 0, 0, 0.25); }
.foot-inner { max-width: var(--max); margin: 0 auto; padding: 32px var(--gutter) 40px; display: flex; flex-direction: column; gap: 12px; font-size: 13.5px; color: var(--text-2); }
.foot .muted { font-size: 12.5px; }

/* ---------- адаптив ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 44px; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-links { display: none; }
  .console-actions { width: 100%; }
  .map-field { flex: 1; }
  .map-field select { min-width: 0; max-width: none; }
}
@media (max-width: 720px) {
  .steps-grid, .features, .idle-steps { grid-template-columns: 1fr; }
  .idle, .share-guide { grid-template-columns: 1fr; }
  .item { grid-template-columns: 44px minmax(0, 1fr) 84px; gap: 10px; padding: 10px 12px; }
  .item img { width: 44px; height: 44px; }
  .item .price { display: none; }
  .category-head { grid-template-columns: 18px minmax(0, 1fr) 92px; }
  .category-head > span:nth-child(3) { display: none; }
  .scope-legend { display: none; }
  .tabs { width: 100%; }
  .tab { flex: 1; justify-content: center; padding: 8px; }
  .tab[aria-selected="true"]::after { bottom: -11px; }
  .console-actions .btn { flex: 1; }
  .console-actions #pip span { display: none; }
  .console-actions #pip { flex: none; }
  .console-actions .pip-group { flex: none; }
  .map-field { flex-basis: 100%; }
  .panel { padding: 16px; }
  .status { max-width: 52vw; }
  .nav-guide span, .nav-tg span { display: none; }
  .hero-stats dd { font-size: 24px; }
  .callout { flex-direction: column; }
}
/* Очень узкие экраны: статистика в один столбец, навигация компактнее. */
@media (max-width: 420px) {
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stats > div { border-right: 0; }
  .hero-stats > div:nth-child(3) { border-bottom: 1px solid var(--line); }
  .nav-inner { gap: 6px; padding: 0 14px; }
  .brand-name { font-size: 16px; }
  .status { max-width: 40vw; }
}

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

/* ---------- мини-окно поверх игры ---------- */
/* ---------- сетка торговца ---------- */
.grid-card { display: flex; flex-direction: column; gap: 10px; container-type: inline-size; }
.grid-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grid-head h3 { margin: 0; font: 400 15px/1.2 var(--font-display); }
.grid-note { color: var(--text-3); font-size: 12.5px; flex: 1; }
.mgrid { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); grid-auto-rows: calc((100cqi - 24px) / 9); gap: 3px; }
/* Клетки квадратные, вся сетка влезает в окно по высоте (150px — шапка сайта, заголовок сетки и отступы).
   --rows ставит renderGrid, --grid-h ставит fitMainGrid: высота от места сетки до низа окна.
   Совсем мелкими клетки не делаем: тогда страница прокручивается.
   --gcell зарегистрирована, чтобы 100cqi считались от .panel, а не от самой сетки. */
@property --gcell { syntax: "<length>"; inherits: true; initial-value: 0px; }
.panel:has(> .grid-card) { container-type: inline-size; }
/* 34px: отступы карточки сетки (16 с боков) и её рамка. */
.grid-card { padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); --gcell: max(34px, min(calc((100cqi - 58px) / 9), calc((var(--grid-h, calc(100dvh - 150px)) - (var(--rows, 1) - 1) * 3px) / var(--rows, 1)))); }
.grid-card .mgrid { grid-template-columns: repeat(9, var(--gcell)); grid-auto-rows: var(--gcell); justify-content: center; }
/* Колонка слева может стать узкой: у предметов без колонки цены, шаги в два ряда.
   Контейнер с именем, чтобы правила не задели такие же блоки в мини-окне. */
.now-card, .results { container: side / inline-size; }
@container side (max-width: 480px) {
  .flow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container side (max-width: 640px) {
  .item { grid-template-columns: 44px minmax(0, 1fr) 84px; gap: 10px; padding: 10px 12px; }
  .item img { width: 44px; height: 44px; }
  .item .price { display: none; }
  .category-head { grid-template-columns: 18px minmax(0, 1fr) 92px; }
  .category-head > span:nth-child(3) { display: none; }
}
.g-empty { border: 1px dashed var(--line); border-radius: 4px; }
.g-cargo {
  position: relative; display: block; min-width: 0; min-height: 0; padding: 0; margin: 0;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 5px;
  color: var(--text-2); font: inherit; text-align: left; overflow: hidden; cursor: default;
}
.g-cargo.heard { cursor: pointer; }
.g-cargo.heard:hover { border-color: var(--text-3); }
.g-cargo.now { border-color: var(--accent); border-style: dashed; background-color: var(--accent-soft); }
.g-label {
  position: absolute; left: 4px; right: 4px; top: 3px; font-size: clamp(8px, calc(var(--gcell) * 0.13), 12px); line-height: 1.15;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word;
}
.g-price { position: absolute; left: 4px; bottom: 3px; font: 600 clamp(8px, calc(var(--gcell) * 0.135), 12px)/1 var(--font-mono); color: var(--text); }
.g-size { position: absolute; right: 4px; bottom: 3px; font: 500 clamp(7px, calc(var(--gcell) * 0.12), 11px)/1 var(--font-mono); color: var(--text-3); }
/* Услышанные предметы. Место, столбцы, размер ячеек (--cw, --ch) и каждой иконки (--sw, --sh) ставит heardHtml,
   gap — как ICON_GAP там же. Иконка без подложки, прямо на грузе; редкость — полоской снизу, как в инвентаре игры:
   заливка цветом редкости на тёмном фоне грязнит (золото становится бурым). */
/* ряды с переносом: неполный последний ряд — по центру */
.g-heard { position: absolute; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; pointer-events: none; }
/* снизу 4px (ICON_STRIP в main.js): 2px зазор и полоска редкости, картинка над ней */
.g-ic { position: relative; display: block; overflow: hidden; border-radius: 3px; padding-bottom: 4px; }
.g-ic::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--rc); }
.g-ic img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* шанс (или остаток, если влезла одна иконка) — на тёмной плашке, чтобы не спорил с иконкой */
.g-ic b {
  position: absolute; right: 1px; bottom: 5px; padding: 1px 2px; border-radius: 2px;
  background: rgba(8, 10, 12, 0.72); color: var(--text-2);
  font: 600 clamp(8px, calc(min(var(--sw), var(--sh)) * 0.2), 11px)/1 var(--font-mono);
}
.g-more { display: flex; align-items: center; justify-content: center; color: var(--text-2); font: 600 clamp(9px, calc(min(var(--cw), var(--ch)) * 0.36), 13px)/1 var(--font-mono); }
.g-cargo.heard { background: var(--surface-3); }

/* окно поверх игры: сетка с шагами всегда, дебаг под ней; в широком окне рядом */
.mini-wrap { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.mini-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mini-map { display: flex; flex-direction: column; gap: 6px; container-type: inline-size; }
.mini-map-head { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.mini-legend { display: flex; align-items: center; gap: 4px; padding-right: 2px; text-transform: none; letter-spacing: 0; }
.mini-legend i { width: 8px; height: 8px; border-radius: 2px; margin-left: 6px; background: var(--c); }
/* Клетки квадратные, как в игре. Ширину меряем у прокрутки (без полосы прокрутки), иначе ряды и колонки разъезжаются. */
.mgrid-scroll { overflow-y: auto; scrollbar-width: thin; container-type: inline-size; }
/* --cell ставит fitMiniGrid: вся сетка влезает в окно. Без него — по ширине. */
.mini-map .mgrid { grid-template-columns: repeat(9, var(--cell, minmax(0, 1fr))); grid-auto-rows: var(--cell, calc((100cqi - 16px) / 9)); gap: 2px; justify-content: center; }
.mini-map .g-cargo { border-radius: 3px; }
.mini-map .g-label { font: 600 10px/1.1 var(--font-body); left: 3px; right: 2px; top: 2px; -webkit-line-clamp: 1; white-space: nowrap; color: var(--c, var(--text-2)); }
.mini-map .g-ic { border-radius: 2px; }
.mini-map .g-price { font-size: 9px; left: 3px; bottom: 2px; color: var(--text-3); }
.mini-map .g-cargo.heard .g-price { display: none; }
.mini-map .g-empty { border-radius: 3px; border-color: rgba(255, 255, 255, 0.04); }
.tier2 { --c: #5bc77a; }
.tier3 { --c: #5aa9ff; }
.mini-map .g-cargo.tier2 { border-color: rgba(91, 199, 122, 0.45); }
.mini-map .g-cargo.tier3 { border-color: rgba(90, 169, 255, 0.5); }
.mini-map .g-cargo.now { border-color: var(--accent); }
/* есть шанс на красный предмет */
.g-cargo.red, .mini-map .g-cargo.red { border-color: #ef4b4b; animation: red-blink 1s ease-in-out infinite; }
@keyframes red-blink {
  0%, 100% { background-color: rgba(239, 75, 75, 0.08); box-shadow: 0 0 0 1px rgba(239, 75, 75, 0.4) inset; }
  50% { background-color: rgba(239, 75, 75, 0.38); box-shadow: 0 0 0 2px #ef4b4b inset, 0 0 8px rgba(239, 75, 75, 0.6); }
}
@media (prefers-reduced-motion: reduce) { .g-cargo.red { animation: none; background-color: rgba(239, 75, 75, 0.25); } }
/* Окно поверх игры, пока игра не отдаёт кадров (main.js, miniStill): браузер его почти не перерисовывает. */
body.mini.still *, body.mini.still *::before, body.mini.still *::after { animation: none !important; transition: none !important; }
body.mini.still .g-cargo.red { background-color: rgba(239, 75, 75, 0.3); box-shadow: 0 0 0 2px #ef4b4b inset; }
body.mini.still .flow-bar i { width: 100%; opacity: 0.5; }
.mini-tabs { display: flex; gap: 4px; }
.mini-tabs button {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 30px; padding: 4px 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--text-3);
  font: 600 12px/1 var(--font-body); cursor: pointer;
}
.mini-tabs button .i { width: 14px; height: 14px; }
.mini-tabs button.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.mini-empty { margin: 24px 0; text-align: center; color: var(--text-3); font-size: 12.5px; }
.mini-wrap.only-grid .mini-map { flex: 1 1 auto; }
.mini-map-head .mini-legend { margin-left: auto; }
.mini-debug {
  display: inline-flex; align-items: center; gap: 4px; min-height: 22px; padding: 2px 8px; margin-left: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--text-3);
  font: 600 11px/1 var(--font-body); text-transform: none; letter-spacing: 0; cursor: pointer;
}
.mini-debug .i { width: 12px; height: 12px; }
.mini-debug.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.mini-dbg { font: 500 11px/1.3 var(--font-mono); color: var(--text-3); }
.mini-wrap.only-grid .g-label { font-size: clamp(10px, 2.6cqi, 13px); }
@media (min-width: 620px) {
  .mini-wrap { flex-direction: row; align-items: flex-start; }
  .mini-main { flex: 1 1 0; }
  .mini-map { flex: 0 0 55%; position: sticky; top: 0; }
}

body.mini { padding: 10px; font-size: 13px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); min-height: 0; }
body.mini .now-state { font-size: 16px; gap: 8px; }
body.mini .now-label { font-size: 13px; }
body.mini .idle, body.mini .waiting p { display: none; }
body.mini .mini-cargo { color: var(--text-3); font-size: 12.5px; }
body.mini .mini-cargo b { color: var(--text); font-family: var(--font-mono); }
body.mini .quiz { padding: 10px; gap: 10px; }
body.mini .size-btn { min-width: 52px; min-height: 60px; padding: 6px; }
body.mini .chip { min-height: 30px; padding: 4px 10px; }
body.mini .category-head { padding: 8px 10px; }
body.mini .category-prob b { font-size: 14px; }
.mini-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 48px; gap: 8px; align-items: center; padding: 5px 8px; border-top: 1px solid var(--line); position: relative; }
.mini-item::before { content: ""; position: absolute; left: 0; top: 5px; bottom: 5px; width: 3px; background: var(--rc); border-radius: 0 3px 3px 0; }
.mini-item img { width: 30px; height: 30px; object-fit: contain; background: #0e100f; border-radius: 4px; }
.mini-item span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-item .muted { font-family: var(--font-mono); font-size: 12px; }
.mini-item b { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.mini-pop { position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.55); }
.mini-pop-card {
  /* ширину ставит miniPopHtml под число столбцов */
  width: min(340px, 100%); max-width: 100%; max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); overflow: hidden;
}
.mini-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 6px 8px 10px; font-size: 12.5px; color: var(--text-2); }
/* одна строка: высоту шапки popLayout считает постоянной (POP_HEAD) */
.mini-pop-head span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-pop-x { width: 28px; height: 28px; padding: 0; background: none; border: 0; border-radius: 4px; color: var(--text-3); font: 400 20px/1 var(--font-body); cursor: pointer; }
.mini-pop-x:hover { background: var(--surface-3); color: var(--text); }

/* Общий шанс красного над плитками (есть только когда красное возможно). */
.mini-pop-red {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 10px 8px; padding: 8px 10px;
  background: rgba(239, 75, 75, 0.12); box-shadow: inset 0 0 0 1px rgba(239, 75, 75, 0.35); border-radius: 6px;
  font-size: 12.5px; color: var(--text-2);
}
.mini-pop-red span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #ef4b4b; vertical-align: 0; }
.mini-pop-red b { font: 600 16px/1 var(--font-mono); font-variant-numeric: tabular-nums; color: #ff6b6b; }
/* Плитки вариантов: иконка (--pop-ic, до 64 px) с полоской по низу общей полосы (полоски редкости в ряду на одной линии),
   под ней шанс. Столбцы и размер иконки ставит popLayout, размеры здесь — как POP_* там же; прокрутка только на крайний случай. */
.mini-pop-grid {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  min-height: 0; padding: 2px 10px 10px; overflow-y: auto; scrollbar-width: thin;
}
.mini-pop-tile { width: var(--pop-tile, 100px); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 6px 9px; background: var(--surface-2); border-radius: 6px; }
.mini-pop-ic { display: flex; align-items: flex-end; justify-content: center; height: calc(var(--pop-ic, 64px) + 4px); }
.mini-pop-tile b { font: 600 14px/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text); }
.mini-more { font-size: 11px; color: var(--text-3); padding: 2px 6px; }
.sound-actions .btn { flex: 1 1 auto; }
@media (max-width: 720px) {
  .tab { padding: 8px 6px; font-size: 13.5px; }
  .tab .i, .tab-count { display: none; }
  .status { max-width: 44vw; }
  .hero-cta .btn { flex: 1 1 auto; }
}

/* подсказка: мини-окно не открылось само после выбора окна */
.pip-hint {
  display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 12px 14px;
  background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--r);
  color: var(--text-2); font-size: 13.5px; text-align: left; cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.pip-hint:hover { background: rgba(242, 194, 48, 0.2); }
.pip-hint .i { color: var(--accent); width: 20px; height: 20px; }
.pip-hint b { color: var(--text); margin-right: 6px; }
.capture-error {
  margin-top: 12px; padding: 12px 14px;
  background: var(--bad-soft); border: 1px solid var(--bad); border-radius: var(--r);
  color: var(--text); font-size: 13.5px;
}
/* «Поверх игры» и переключатель «Авто» (открывать окно само) — одна кнопка из двух частей */
.pip-group { display: inline-flex; align-items: stretch; }
.pip-group[hidden] { display: none; }
.pip-group > #pip { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.pip-auto {
  display: inline-flex; align-items: center; gap: 7px; padding: 0 12px 0 10px; margin-left: -1px;
  background: transparent; border: 1px solid var(--line-strong); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--text-3); font: 600 12.5px/1 var(--font-body); cursor: pointer;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.pip-auto:hover { color: var(--text-2); background: var(--surface-2); }
.pip-auto:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* ползунок */
.pip-auto i { position: relative; width: 26px; height: 15px; flex: none; border-radius: 8px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-strong); transition: background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.pip-auto i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--text-3); transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.pip-auto[aria-checked="true"] { color: var(--accent); }
.pip-auto[aria-checked="true"] i { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.pip-auto[aria-checked="true"] i::after { transform: translateX(11px); background: var(--accent); }
@media (prefers-reduced-motion: reduce) { .pip-auto i, .pip-auto i::after { transition: none; } }
.btn.attention { border-color: var(--accent); color: var(--accent); animation: attn 1.6s var(--ease) infinite; }
@keyframes attn { 50% { box-shadow: 0 0 0 4px var(--accent-soft); } }
@media (prefers-reduced-motion: reduce) { .btn.attention { animation: none; } }

/* ---------- телефон без ссылки с QR-кода (js/mobile.js): шапка как обычно, вместо приложения — просьба открыть на ПК ---------- */
.pc-only { display: none; }
html.phone-gate #app { display: none; }
html.phone-gate .pc-only {
  display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 440px; margin: 24px auto; padding: 28px 22px;
  border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface); text-align: center;
}
.pc-only-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); }
.pc-only-ic .i { width: 28px; height: 28px; }
.pc-only h1 { margin: 4px 0 0; font: 400 22px/1.25 var(--font-display); color: var(--text); }
.pc-only p { margin: 0; color: var(--text-2); }
.pc-only .pc-only-note { color: var(--text-3); font-size: 13.5px; }
.pc-only-steps { list-style: none; counter-reset: s; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; width: 100%; text-align: left; }
.pc-only-steps li { counter-increment: s; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); color: var(--text); font-weight: 600; }
/* Firefox на ПК: вместо страницы только табличка (js/browser.js) */
html.browser-gate body { display: grid; place-items: center; align-content: center; min-height: 100dvh; padding: 24px 16px; }
html.browser-gate body > :not(.browser-box) { display: none; }
.browser-box {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(440px, 100%); margin: 0; padding: 32px 28px 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); text-align: center;
}
.browser-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.browser-lang {
  position: absolute; top: 12px; right: 12px; padding: 6px 8px; cursor: pointer;
  background: none; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  color: var(--text-2); font: 600 12px/1 var(--font-mono); letter-spacing: 0.04em;
}
.browser-lang:hover { color: var(--text); border-color: var(--accent); }
.browser-ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--bad-soft); color: var(--bad); }
.browser-ic .i { width: 32px; height: 32px; stroke-width: 1.75; }
.browser-box h1 { margin: 6px 0 0; font: 400 24px/1.25 var(--font-display); color: var(--text); text-wrap: balance; }
.browser-box p { margin: 0 0 12px; color: var(--text-2); font-size: 15px; line-height: 1.5; text-wrap: pretty; }
.pc-only-steps li::before { content: counter(s); display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 700 12px/1 var(--font-body); }

/* Вкладка устарела: просьба обновить страницу (js/main.js, событие stale). */
.stale-note { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 1000; display: flex; gap: 12px; align-items: center;
  padding: 10px 12px 10px 16px; border-radius: 10px; background: var(--surface-3); color: var(--text); border: 1px solid var(--accent-line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45); max-width: calc(100vw - 32px); }
