/* ============================================================
   ZoneRadar UI · v21 — дизайн-система
   Тёмная тема по умолчанию, светлая через [data-theme="light"]
   ============================================================ */

:root {
  /* Нейтрально-тёплый графит: раньше вся «оболочка» была сине-стальной и спорила с оранжевым */
  --bg: #0a0a0b;
  --bg-elev: #17161a;
  --panel: rgba(23, 22, 21, 0.78);
  --panel-solid: #1a1918;
  --line: rgba(190, 180, 166, 0.11);
  --line-strong: rgba(190, 180, 166, 0.22);
  --text: #efece7;
  --muted: #a7a19a;
  --faint: #79736c;

  --accent: #f59e0b;
  --accent-2: #fbbf24;
  --accent-ink: #1a1105;
  --accent-dim: rgba(245, 158, 11, 0.13);
  --accent-glow: rgba(245, 158, 11, 0.35);

  --green: #34d399;
  --green-dim: rgba(52, 211, 153, 0.14);
  --red: #f87171;
  --red-dim: rgba(248, 113, 113, 0.13);
  --warn: #fbbf24;
  --warn-dim: rgba(251, 191, 36, 0.14);
  --blue: #38bdf8;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Ubuntu, "Noto Sans", sans-serif;
  --font-display: "Segoe UI", system-ui, -apple-system, sans-serif;

  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 18px 48px rgba(6, 5, 3, 0.5), 0 2px 8px rgba(6, 5, 3, 0.35);
  --shadow-pop: 0 24px 64px rgba(6, 5, 3, 0.65), 0 4px 14px rgba(6, 5, 3, 0.4);
  --max: 1360px;
  --dock: 0px;

  --ease: cubic-bezier(0.22, 0.68, 0.3, 1);
  --t-fast: 0.16s;
  --t-med: 0.3s;
}

[data-theme="light"] {
  --bg: #f5f2ed;
  --bg-elev: #ffffff;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-solid: #ffffff;
  --line: rgba(48, 38, 28, 0.1);
  --line-strong: rgba(48, 38, 28, 0.19);
  --text: #221f1b;
  --muted: #5f584f;
  --faint: #8d857b;
  --accent: #d97706;
  --accent-2: #f59e0b;
  --accent-ink: #ffffff;
  --accent-dim: rgba(217, 119, 6, 0.1);
  --accent-glow: rgba(217, 119, 6, 0.22);
  --green: #059669;
  --green-dim: rgba(5, 150, 105, 0.1);
  --red: #dc2626;
  --red-dim: rgba(220, 38, 38, 0.08);
  --shadow: 0 14px 38px rgba(60, 48, 34, 0.08), 0 2px 6px rgba(60, 48, 34, 0.05);
  --shadow-pop: 0 22px 52px rgba(60, 48, 34, 0.14), 0 4px 10px rgba(60, 48, 34, 0.07);
}

/* ── База ─────────────────────────────────────────────────── */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; overflow-x: hidden; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 520px at 12% -16%, rgba(245, 158, 11, 0.12), transparent 55%),
    radial-gradient(900px 460px at 102% -4%, rgba(251, 191, 36, 0.05), transparent 52%),
    radial-gradient(760px 540px at 50% 118%, rgba(245, 158, 11, 0.04), transparent 55%),
    var(--bg);
  transition: background 0.4s ease, color 0.3s ease;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  opacity: 0.028;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='90' height='90' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
::selection { background: var(--accent-glow); }

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--faint) 35%, transparent);
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--faint) 60%, transparent); background-clip: padding-box; border: 3px solid transparent; }

:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 75%, transparent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ── Анимации ─────────────────────────────────────────────── */
@keyframes page-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
@keyframes drop-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: none; }
}
@keyframes lot-in {
  from { opacity: 0; transform: translateY(-10px); background: color-mix(in srgb, var(--green) 14%, var(--panel)); }
  to { opacity: 1; transform: none; }
}
@keyframes shine { to { background-position: -200% 0; } }
@keyframes live-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 9px var(--green); }
  50% { opacity: 0.4; box-shadow: 0 0 2px var(--green); }
}
@keyframes hero-glow {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.5; }
  50% { transform: translate3d(4%, 6%, 0) scale(1.08); opacity: 0.8; }
}
@keyframes progress-stripes { to { background-position: 24px 0; } }

/* ── Каркас ───────────────────────────────────────────────── */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; position: relative; z-index: 1; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 76%, transparent);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
}

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; transition: transform var(--t-fast) var(--ease); }
.logo:hover { transform: translateY(-1px); }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px;
  clip-path: polygon(50% 4%, 96% 27%, 96% 73%, 50% 96%, 4% 73%, 4% 27%);
  background: conic-gradient(from 210deg, var(--accent), #b45309, var(--accent-2), var(--accent));
  box-shadow: 0 0 22px var(--accent-glow);
}
.logo-text { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em; font-size: 19px; }
.logo-text span {
  background: linear-gradient(120deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ── Поиск ────────────────────────────────────────────────── */
.search-wrap { position: relative; flex: 1; min-width: 180px; max-width: 520px; }
.search-ico {
  position: absolute; left: 13px; top: 50%; width: 13px; height: 13px;
  transform: translateY(-55%);
  border: 2px solid var(--faint); border-radius: 50%;
  pointer-events: none;
  transition: border-color var(--t-fast);
}
.search-ico::after {
  content: ""; position: absolute; right: -5px; bottom: -4px;
  width: 7px; height: 2px; background: var(--faint); transform: rotate(45deg);
  transition: background var(--t-fast);
}
.search-wrap:focus-within .search-ico { border-color: var(--accent); }
.search-wrap:focus-within .search-ico::after { background: var(--accent); }

.global-search, .field input, .field select, .search, textarea, .region-sel {
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  outline: none;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast);
}
.global-search { padding-left: 36px; padding-right: 46px; border-radius: 999px; }
.global-search:focus, .field input:focus, .field select:focus, textarea:focus, .region-sel:focus {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
  box-shadow: 0 0 0 4px var(--accent-dim);
}
#app textarea {
  width: 100%;
  max-width: 100%;
  max-height: 240px;
  resize: vertical;
}
#app input:not([type="checkbox"]):not([type="radio"]),
#app select,
#app textarea {
  min-height: 40px;
  box-sizing: border-box;
  color: var(--text);
  background-color: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 8px 12px;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
#app select {
  appearance: none;
  padding-right: 34px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--faint) 50%),
    linear-gradient(135deg, var(--faint) 50%, transparent 50%);
  background-position: calc(100% - 16px) 17px, calc(100% - 11px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
#app input:not([type="checkbox"]):not([type="radio"]):hover,
#app select:hover,
#app textarea:hover { border-color: color-mix(in srgb, var(--line-strong) 70%, var(--accent)); }
#app input:not([type="checkbox"]):not([type="radio"]):focus,
#app select:focus,
#app textarea:focus {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
  box-shadow: 0 0 0 3px var(--accent-dim);
}
/* Шапка (уведомления) и #app делят одну оболочку — нативные квадраты ломали тёмную тему. */
.app-shell input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  max-width: 18px;
  max-height: 18px;
  margin: 0;
  flex: 0 0 18px;
  box-sizing: border-box;
  border: 1.5px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  vertical-align: middle;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.app-shell input[type="checkbox"]:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line-strong));
}
.app-shell input[type="checkbox"]:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 70%, var(--line));
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.app-shell input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: none;
}
.app-shell input[type="checkbox"]:checked::after {
  content: "";
  width: 4px;
  height: 8px;
  border: solid var(--accent-ink);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-1px);
}
.notice:has(> input[type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.notify-row input[type="checkbox"] { margin-top: 1px; }
#app input::placeholder, #app textarea::placeholder { color: var(--faint); opacity: 1; }
#app select option { color: var(--text); background: var(--panel-solid); }
.search-hint {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: 11px; color: var(--faint); border: 1px solid var(--line);
  border-radius: 6px; padding: 2px 6px; pointer-events: none;
  background: var(--bg-elev);
}
.search-drop {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px);
  background: var(--panel-solid); border: 1px solid var(--line-strong);
  border-radius: var(--radius); box-shadow: var(--shadow-pop); overflow: hidden; z-index: 50;
  max-height: min(70vh, 440px); overflow-y: auto;
  animation: drop-in 0.18s var(--ease);
}
.search-hit {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer;
  transition: background var(--t-fast);
}
.search-hit:hover, .search-hit.active { background: var(--accent-dim); }
.search-hit .price { margin-left: auto; font-weight: 700; white-space: nowrap; }
.region-sel { width: auto; min-width: 78px; padding: 8px 10px; cursor: pointer; }
.region-wrap { display: inline-flex; align-items: center; }
/* Регион поллера общий для всех, менять его может только админ: остальным это
   статус, а не выбор — неактивная выпадашка выглядела как поломка. */
.region-tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-elev);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: default;
}

/* ── Навигация ────────────────────────────────────────────── */
.nav { display: flex; gap: 2px; flex-wrap: nowrap; align-items: center; }
.nav a, .ghost, .icon-btn, .more-btn {
  color: var(--muted); padding: 8px 12px; border-radius: 10px;
  border: 1px solid transparent; background: transparent; cursor: pointer;
  transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast), transform var(--t-fast) var(--ease);
  position: relative;
}
.nav a:hover, .ghost:hover, .icon-btn:hover, .dock a:hover, .dock-more:hover, .more-btn[aria-expanded="true"] {
  color: var(--text); background: var(--bg-elev); border-color: var(--line);
}
.nav a:active, .ghost:active, .icon-btn:active { transform: scale(0.96); }
.nav a.active, .dock a.active, .more-btn.active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}
.nav a.nav-tariff {
  color: var(--accent-ink);
  font-weight: 800;
  background: linear-gradient(160deg, var(--accent-2), var(--accent) 70%);
  border-color: transparent;
  box-shadow: 0 2px 12px var(--accent-glow);
}
.nav a.nav-tariff:hover, .nav a.nav-tariff.active {
  color: var(--accent-ink);
  background: linear-gradient(160deg, var(--accent-2), var(--accent) 70%);
  border-color: transparent;
  filter: brightness(1.06);
}
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; flex-shrink: 0; padding: 0; }
.icon-btn.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-dim); }
.menu-btn { display: none; }

.more { position: relative; }
.more-drop {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 210px;
  background: var(--panel-solid);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  padding: 6px;
  display: grid;
  z-index: 70;
  animation: drop-in 0.16s var(--ease);
}
.more-drop a { padding: 10px 12px; border-radius: 10px; color: var(--muted); transition: background var(--t-fast), color var(--t-fast), padding-left var(--t-fast) var(--ease); }
.more-drop a:hover { background: var(--bg-elev); color: var(--text); padding-left: 16px; }
/* «Ещё» — единственный вход в остальные разделы, поэтому у кнопки шеврон, а у
   списка заголовок: иначе непонятно, что за ней прячется. */
.more-btn { display: inline-flex; align-items: center; gap: 5px; }
.more-chev { width: 14px; height: 14px; transition: transform var(--t-fast) var(--ease); }
.more-btn[aria-expanded="true"] .more-chev { transform: rotate(180deg); }
.more-title {
  padding: 7px 12px 5px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.menu-sheet {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(3, 5, 9, 0.6);
  backdrop-filter: blur(6px);
  display: grid; place-items: start end;
  padding: 58px 12px 12px;
  animation: page-in 0.2s ease;
}
.menu-panel {
  width: min(320px, calc(100vw - 24px));
  background: var(--panel-solid);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  box-shadow: var(--shadow-pop);
  padding: 8px;
  display: grid;
  animation: drop-in 0.22s var(--ease);
}
.menu-panel a { padding: 12px 14px; border-radius: 11px; color: var(--muted); transition: background var(--t-fast), color var(--t-fast), padding-left var(--t-fast) var(--ease); }
.menu-panel a:hover { background: var(--bg-elev); color: var(--text); padding-left: 18px; }

.live { font-size: 12px; font-weight: 700; letter-spacing: 0.05em; color: var(--green); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.live.ok::before { animation: live-pulse 1.6s ease-in-out infinite; }

#user-box { display: flex; align-items: center; gap: 6px; }

/* ── Кнопки ───────────────────────────────────────────────── */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; box-sizing: border-box; white-space: nowrap;
  background: linear-gradient(160deg, var(--accent-2), var(--accent) 65%);
  color: var(--accent-ink); font-weight: 800; letter-spacing: 0.01em;
  border: none; border-radius: 12px; padding: 10px 16px; cursor: pointer;
  box-shadow: 0 4px 18px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), filter var(--t-fast);
}
.btn::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.35) 50%, transparent 62%);
  transform: translateX(-120%);
  transition: transform 0.55s var(--ease);
  pointer-events: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 26px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn.secondary {
  background: var(--bg-elev); color: var(--text);
  border: 1px solid var(--line-strong); box-shadow: none;
}
.btn.secondary:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow-soft); }
.btn.secondary::after { display: none; }

.pill {
  font-size: 11px; padding: 4px 9px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em;
  background: color-mix(in srgb, var(--bg-elev) 60%, transparent);
}

/* ── Контент ──────────────────────────────────────────────── */
#app { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; padding: 22px 0 calc(64px + var(--dock)); }
/* minmax(0,1fr): без него широкий ребёнок (таблица, оглавление) растягивает страницу
   за пределы экрана — на мобильных это резало текст по правому краю. */
.page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; animation: page-in 0.32s var(--ease); }

.hero, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.hero {
  padding: 22px 24px; display: grid; gap: 8px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent-2) 55%, transparent 85%);
  opacity: 0.85;
}
.hero::after {
  content: ""; position: absolute; top: -110px; right: -70px;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 68%);
  opacity: 0.5; pointer-events: none;
  animation: hero-glow 9s ease-in-out infinite;
}
.hero h1, .brand-title {
  font-family: var(--font-display); font-size: clamp(22px, 3vw, 31px);
  margin: 0; letter-spacing: -0.035em; line-height: 1.12;
}
.live-hero { padding: 16px 20px; }
.live-hero h1 { font-size: clamp(20px, 2.6vw, 26px); }
.not-found-page { min-height: min(620px, 68vh); align-content: center; }
.not-found-hero {
  min-height: 360px;
  grid-template-columns: minmax(180px, 0.75fr) minmax(280px, 1.25fr);
  align-items: center;
  gap: clamp(24px, 6vw, 80px);
  padding: clamp(28px, 6vw, 72px);
}
.not-found-code {
  color: transparent;
  font-family: var(--font-display);
  font-size: clamp(96px, 18vw, 210px);
  font-weight: 900;
  line-height: 0.8;
  letter-spacing: -0.08em;
  -webkit-text-stroke: 1px color-mix(in srgb, var(--accent) 65%, var(--line));
  filter: drop-shadow(0 0 28px var(--accent-glow));
  user-select: none;
}
.not-found-content { position: relative; z-index: 1; display: grid; gap: 14px; max-width: 590px; }
.not-found-content h1 { font-size: clamp(28px, 4vw, 42px); }
.not-found-content p { margin: 0; line-height: 1.65; }
.not-found-content .faint a { color: var(--accent); }
.not-found-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

.muted { color: var(--muted); }
.faint { color: var(--faint); font-size: 12px; }
.section-head { display: flex; align-items: baseline; gap: 10px; }
.section-head h2, .section-head h3 { margin: 0; font-size: 16px; }
.source-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.spacer { flex: 1; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar > input:not([type="checkbox"]):not([type="radio"]) { flex: 1 1 180px; min-width: 140px; max-width: 320px; }
.toolbar > select { flex: 0 1 170px; min-width: 130px; }
.toolbar > .btn, .toolbar > .ghost { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }

.grid { display: grid; gap: 12px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }

.kpi { padding: 16px 18px; transition: transform var(--t-med) var(--ease), border-color var(--t-med); }
.kpi:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.kpi b {
  font-size: 27px; display: block; margin-top: 4px; letter-spacing: -0.03em;
  font-family: var(--font-display);
}

/* ── Фильтры и чипы ───────────────────────────────────────── */
.filters-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: end;
  padding: 12px; position: sticky; top: 64px; z-index: 10;
  backdrop-filter: blur(16px);
}
.filter-dock { display: grid; gap: 8px; }
.filters-bar.filter-dock { align-items: stretch; }
.filter-menus { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-dd { position: relative; }
.filter-btn {
  min-height: 36px; padding: 6px 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg-elev); color: var(--text);
  font-weight: 700; font-size: 13px;
}
.filter-btn.on, .filter-dd.open .filter-btn {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
  color: var(--accent); background: var(--accent-dim);
}
.filter-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 40;
  min-width: 220px; max-width: min(320px, 90vw); padding: 8px;
  display: grid; gap: 4px;
  background: var(--panel-solid); border: 1px solid var(--line-strong);
  border-radius: 12px; box-shadow: var(--shadow-pop);
}
.filter-opt {
  text-align: left; padding: 8px 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text); cursor: pointer;
}
.filter-opt:hover { background: var(--bg-elev); }
.filter-opt.on { color: var(--accent); background: var(--accent-dim); font-weight: 700; }
.filter-active { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--accent-dim); color: var(--accent);
  border-radius: 999px; padding: 5px 10px; cursor: pointer; font-size: 12px; font-weight: 700;
}
.filter-chip:hover { filter: brightness(1.08); }
.filter-clear-all { min-height: 28px; padding: 4px 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--line); background: var(--bg-elev); color: var(--muted);
  border-radius: 999px; padding: 6px 11px; cursor: pointer; font-size: 12px;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast), transform var(--t-fast) var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-1px); }
.chip.on {
  border-color: color-mix(in srgb, var(--accent) 70%, var(--line));
  color: var(--accent); background: var(--accent-dim);
}
.chip.locked { opacity: 0.55; }
.chip .count { color: var(--faint); margin-left: 4px; font-variant-numeric: tabular-nums; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); min-width: 120px; }
.field.locked { opacity: 0.72; }
.settings-card { padding: 18px; display: flex; flex-direction: column; align-items: stretch; gap: 12px; min-width: 0; }
.settings-card h3, .settings-card p { margin: 0; }
.settings-card .field { width: 100%; min-width: 0; }
.settings-card .btn { align-self: flex-start; }
.sub-card { margin: 0; }
.refund-form { display: grid; gap: 10px; max-width: 420px; min-width: 0; }
.refund-form h3 { margin: 0; }
.cab-billing { scroll-margin-top: 84px; display: grid; gap: 8px; }
.cab-billing-label {
  margin: 8px 0 0; font-size: 12px; color: var(--faint);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.cab-fold {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
  overflow: hidden;
}
.cab-fold > summary {
  list-style: none;
  cursor: pointer;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 13px 16px;
  font-weight: 700;
}
.cab-fold > summary::-webkit-details-marker { display: none; }
.cab-fold > summary::after {
  content: "";
  margin-left: auto;
  width: 7px; height: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform var(--t-fast) var(--ease);
}
.cab-fold[open] > summary::after { transform: rotate(-135deg); }
.cab-fold > summary:hover { color: var(--text); }
.cab-fold-hint { font-weight: 500; color: var(--muted); font-size: 13px; }
.cab-fold-body {
  display: grid; gap: 10px;
  padding: 0 16px 16px;
}
#sub-msg:empty { display: none; }
.settings-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-top: 2px; }
.settings-actions .btn { flex: 0 0 auto; }
#tg-box { display: grid; justify-items: start; gap: 6px; min-width: 0; }
#tg-box .faint { line-height: 1.45; overflow-wrap: anywhere; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.page-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab-btn {
  padding: 8px 13px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-elev); color: var(--muted); cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast), transform var(--t-fast) var(--ease);
}
.tab-btn:hover { color: var(--text); transform: translateY(-1px); }
.tab-btn.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); background: var(--accent-dim); }

.cab-hero { gap: 14px; }
.cab-nav {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 6px; margin-top: 4px;
  background: color-mix(in srgb, var(--bg-elev) 72%, transparent);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.cab-nav .tab-btn { font-weight: 700; }
.cab-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.cab-actions .btn, .cab-actions .ghost {
  min-height: 36px; padding: 8px 13px; font-size: 13px;
}
.cab-section { scroll-margin-top: 84px; display: grid; gap: 12px; }
.cab-section[hidden] { display: none; }
.cab-section > h3 { margin: 0; }
.cab-section-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
}
.cab-section-head h3 { margin: 0; flex: 1 1 auto; }
.cab-section-head .oauth-btn { width: auto; min-height: 40px; padding: 8px 14px; }
.cabinet-page { min-height: 650px; }
.cab-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}
.cab-sidebar {
  position: sticky;
  top: 78px;
  max-height: calc(100vh - 96px);
  overflow: auto;
  padding: 14px 10px 10px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
}
.cab-user-card {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 11px;
  padding: 6px 8px 14px;
  border-bottom: 1px solid var(--line);
}
.cab-user-card h2 { margin: 0 0 6px; font-size: 16px; }
.cab-user-card p { margin: 7px 0 0; }
.cab-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  overflow: hidden;
  display: grid; place-items: center;
  color: var(--accent); font-family: var(--font-display); font-size: 20px; font-weight: 800;
  background: radial-gradient(circle at 35% 30%, var(--accent-dim), var(--bg-elev));
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: 0 0 18px var(--accent-glow);
}
.cab-side-nav { display: grid; align-content: start; gap: 3px; }
.cab-side-link {
  width: 100%; min-height: 40px; padding: 8px 10px;
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 7px;
  border: 1px solid transparent; border-radius: 10px;
  color: var(--muted); background: transparent; cursor: pointer; text-align: left;
  font: inherit; font-size: 13px; transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast);
}
.cab-side-link:hover { color: var(--text); background: var(--bg-elev); }
.cab-side-link.on {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 25%, var(--line));
  background: linear-gradient(90deg, var(--accent-dim), transparent);
  box-shadow: inset 2px 0 0 var(--accent);
}
.cab-side-link > span { text-align: center; font-size: 17px; line-height: 1; }
.cab-side-link > i {
  min-width: 20px; padding: 2px 6px; border-radius: 99px;
  color: var(--faint); background: var(--bg-elev); font-size: 10px; font-style: normal; text-align: center;
}
.cab-side-footer { display: grid; gap: 5px; padding-top: 10px; border-top: 1px solid var(--line); }
.cab-side-footer .ghost { justify-content: flex-start; width: 100%; }
.cab-logout { color: var(--red, #e96a6a); }
.cab-main { min-width: 0; }
.cab-welcome {
  min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 4px 2px 10px;
}
.cab-welcome h1, .cab-section-title h1 { margin: 10px 0 5px; font-size: clamp(25px, 3vw, 34px); }
.cab-welcome p, .cab-section-title p { margin: 0; }
.cab-summary .kpi { min-height: 105px; display: grid; align-content: center; gap: 4px; }
.cab-summary .kpi b .plan-badge { font-size: 13px; padding: 7px 10px; }
.cab-text-link {
  width: max-content; max-width: 100%; padding: 0; border: 0; background: none;
  color: var(--accent); font: inherit; font-size: 12px; cursor: pointer; text-decoration: none;
}
.cab-text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.cab-readiness { padding: 18px; display: grid; gap: 14px; }
.cab-readiness h2, .cab-activity h2, .cab-plan-card h2 { margin: 0; font-size: 17px; }
.cab-readiness .cab-section-head p { margin: 4px 0 0; }
.cab-service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cab-service {
  min-width: 0; padding: 12px; display: grid; grid-template-columns: 38px 1fr; gap: 9px; align-items: center;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg-elev);
}
.cab-service .cab-text-link { grid-column: 2; }
.cab-service-mark {
  grid-row: span 2; width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line-strong); color: var(--muted); font-size: 12px; font-weight: 800;
}
.cab-service.connected .cab-service-mark { color: var(--green); border-color: color-mix(in srgb, var(--green) 45%, var(--line)); }
.cab-service b { display: block; font-size: 13px; }
.cab-service p { margin: 2px 0 0; color: var(--faint); font-size: 11px; }
.cab-service.connected p { color: var(--green); }
.cab-quick-card {
  padding: 16px; display: flex; align-items: center; gap: 12px; color: var(--text);
  text-align: left; cursor: pointer; transition: transform var(--t-fast), border-color var(--t-fast);
}
.cab-quick-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.cab-quick-card > span {
  width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 42px;
  border-radius: 50%; color: var(--accent); background: var(--accent-dim); font-size: 20px;
}
.cab-quick-card div { min-width: 0; display: grid; gap: 3px; }
.cab-quick-card b { font-size: 13px; }
.cab-quick-card strong { color: var(--accent); font-size: 18px; }
.cab-quick-card small { color: var(--faint); }
.cab-overview-bottom { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(250px, 0.75fr); gap: 12px; }
.cab-activity, .cab-plan-card { padding: 17px; display: grid; gap: 10px; align-content: start; }
.cab-activity-row {
  display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 9px; align-items: start;
  padding: 9px 0; border-top: 1px solid var(--line);
}
.cab-activity-row > span { color: var(--accent); }
.cab-activity-row b { font-size: 12px; }
.cab-activity-row p { margin: 3px 0 0; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cab-activity-row time { color: var(--faint); font-size: 10px; white-space: nowrap; }
.cab-plan-card h2 .plan-badge { font-size: 14px; padding: 7px 10px; }
.cab-plan-card > p { margin: 0; }
.cab-plan-actions { display: grid; gap: 7px; }
.cab-plan-actions .btn, .cab-plan-actions .ghost { width: 100%; justify-content: center; }
.cab-section-title { padding: 4px 2px 12px; }
.cab-profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.cab-security-card { grid-column: 1 / -1; }
.cab-security-card h4 { margin: 0; font-size: 15px; }
.notes-list { padding: 12px; display: grid; gap: 10px; }
.note-row { display: grid; gap: 2px; }
.note-row + .note-row { padding-top: 10px; border-top: 1px solid var(--line); }

.sort-btn {
  border: 1px solid var(--line); background: var(--bg-elev); color: var(--muted);
  border-radius: 10px; padding: 7px 10px; cursor: pointer; font-size: 12px;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.sort-btn:hover { color: var(--text); border-color: var(--line-strong); }
.sort-btn.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: var(--accent-dim); }

/* ── Каталог ──────────────────────────────────────────────── */
.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 10px;
}
.item-grid > * { animation: card-in 0.3s var(--ease) backwards; }
.item-grid > *:nth-child(2) { animation-delay: 0.02s; }
.item-grid > *:nth-child(3) { animation-delay: 0.04s; }
.item-grid > *:nth-child(4) { animation-delay: 0.06s; }
.item-grid > *:nth-child(5) { animation-delay: 0.08s; }
.item-grid > *:nth-child(6) { animation-delay: 0.1s; }
.item-grid > *:nth-child(7) { animation-delay: 0.12s; }
.item-grid > *:nth-child(8) { animation-delay: 0.14s; }
.item-grid > *:nth-child(n + 9) { animation-delay: 0.16s; }

a.item-tile,
a.hunt-card,
a.hot-card {
  color: inherit;
  text-decoration: none;
}
.item-tile {
  display: flex; flex-direction: column; gap: 8px; padding: 13px; cursor: pointer;
  transition: transform var(--t-med) var(--ease), border-color var(--t-med), box-shadow var(--t-med);
  min-height: 168px; min-width: 0; overflow: hidden;
}
.item-tile:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: var(--shadow), 0 0 0 1px var(--accent-dim);
}
.item-tile .warn-note { width: 100%; text-align: center; white-space: normal; }
.item-tile .icon {
  width: 64px; height: 64px; margin: 0 auto;
  background: radial-gradient(circle at 50% 30%, var(--accent-dim), var(--bg) 72%);
  transition: transform var(--t-med) var(--ease);
}
.item-tile:hover .icon { transform: scale(1.07); }
.item-tile .name { font-weight: 700; font-size: 13px; line-height: 1.25; text-align: center; }
.item-tile .meta { text-align: center; }
.item-tile .quote { text-align: center; font-weight: 800; letter-spacing: -0.03em; }
.item-tile .quote.empty { color: var(--faint); font-weight: 500; font-size: 12px; }

/* ── Карточки лотов ───────────────────────────────────────── */
.lot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lot-card {
  display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center;
  padding: 12px; cursor: pointer; position: relative;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast), box-shadow var(--t-fast);
}
.lot-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.lot-card.band-hot { border-color: color-mix(in srgb, var(--green) 55%, var(--line)); background: color-mix(in srgb, var(--green) 7%, var(--panel)); }
.lot-card.band-ok { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.lot-card.band-low { opacity: 0.92; }
.lot-card.fresh {
  animation: lot-in 0.5s var(--ease);
  border-color: color-mix(in srgb, var(--green) 55%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--green) 28%, transparent);
}
.lot-card .fav-btn {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px;
  border: none; background: var(--bg-elev); border-radius: 8px; cursor: pointer; color: var(--muted);
  transition: color var(--t-fast), transform var(--t-fast) var(--ease), background var(--t-fast);
}
.lot-card .fav-btn:hover { transform: scale(1.12); color: var(--text); }
.lot-card .fav-btn.on { color: var(--accent); background: var(--accent-dim); }
.spark { width: 72px; height: 22px; display: block; margin-top: 6px; }

.icon, .lot-card img, .search-hit img {
  width: 52px; height: 52px; object-fit: contain; border-radius: 12px;
  background: color-mix(in srgb, var(--bg) 88%, var(--accent) 3%);
  border: 1px solid var(--line);
}
.search-hit img { width: 40px; height: 40px; }

.rarity { font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 700; }
.rarity.common { color: #8b949e; } .rarity.uncommon { color: #3fb950; } .rarity.rare { color: #58a6ff; }
.rarity.special { color: #bc8cff; } .rarity.unique { color: #f0883e; } .rarity.exclusive { color: #e3b341; }
.rarity.legendary { color: #ffd700; } .rarity.relic { color: #f85149; }

.price-col { text-align: right; }
.profit.pos { color: var(--green); font-weight: 700; }
.profit.neg { color: var(--red); font-weight: 700; }
.badge { display: inline-flex; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge.pos { background: var(--green-dim); color: var(--green); }
.badge.neg { background: var(--red-dim); color: var(--red); }
.row-stats { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; overflow: visible; max-height: none; }
.stat { font-size: 11px; color: var(--muted); background: var(--bg-elev); border-radius: 6px; padding: 2px 6px; border: 1px solid transparent; }

/* ── Таблицы ──────────────────────────────────────────────── */
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 13px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13px; }
th { color: var(--faint); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
tbody tr { transition: background var(--t-fast); }
tr:hover td { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.item-cell { display: flex; align-items: center; gap: 10px; }
.th-sort { cursor: pointer; user-select: none; white-space: nowrap; transition: color var(--t-fast); }
.th-sort:hover { color: var(--accent); }
.compare-table { table-layout: fixed; }
.compare-table th:first-child, .compare-table td:first-child { width: 34%; text-align: left; }
.compare-table th:nth-child(n + 2), .compare-table td:nth-child(n + 2) { width: 22%; text-align: center; }
.compare-table td { vertical-align: middle; overflow-wrap: anywhere; }

.live-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.live-table th, .live-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 13px; white-space: nowrap; }
.live-table tbody tr:hover { background: var(--accent-dim); }
.live-table .name-cell { white-space: normal; min-width: 180px; }

/* ── Эфир ─────────────────────────────────────────────────── */
.channels {
  display: flex; flex-wrap: wrap; gap: 6px;
  position: sticky; top: 61px; z-index: 12;
  padding: 8px 0 4px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
}
.live-layout { display: grid; grid-template-columns: 168px 1fr; gap: 16px; align-items: start; }
.channels-col { position: sticky; top: 72px; display: grid; gap: 4px; padding: 8px; }
.channels-col .chip { justify-content: space-between; display: flex; width: 100%; border-radius: 10px; }

.live-controls {
  position: sticky; top: 58px; z-index: 18;
  display: grid; gap: 8px;
  padding: 10px 12px; margin: 0 0 12px;
  background: color-mix(in srgb, var(--panel-solid) 86%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(16px);
}
.live-controls .sort-btn, .live-controls .chip { font-variant-numeric: tabular-nums; }

.live-viewport {
  --live-feed-h: 38rem;
  box-sizing: border-box;
  height: var(--live-feed-h);
  min-height: var(--live-feed-h);
  max-height: var(--live-feed-h);
  overflow-x: hidden;
  overflow-y: auto;
  overflow-anchor: none;
  overscroll-behavior: contain;
  contain: layout size;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--panel-solid) 72%, transparent);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--accent) 50%, var(--line)) transparent;
}
.live-viewport.is-scrollable { padding-right: 2px; }
.live-viewport::-webkit-scrollbar { width: 10px; }
.live-viewport::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 8px;
}
.live-viewport::-webkit-scrollbar-track { background: transparent; }
.live-feed { padding: 8px 8px 12px; overflow-anchor: none; }
.live-stream { display: flex; flex-direction: column; gap: 8px; overflow-anchor: none; }

.radar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 10px; padding: 10px; }
.radar-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
  background: var(--bg-elev); overflow: hidden; min-width: 0;
  transition: border-color var(--t-fast), transform var(--t-fast) var(--ease), box-shadow var(--t-fast);
}
.radar-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}
.radar-card.band-hot { border-color: color-mix(in srgb, var(--green) 50%, var(--line)); }
.radar-card.band-ok { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.radar-card.fresh { animation: lot-in 0.45s var(--ease); }
.radar-card.is-new { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }
.radar-card.is-focus,
.hot-card.is-focus,
tr.is-focus {
  box-shadow: 0 0 0 2px var(--accent);
  animation: lot-focus 3.2s var(--ease);
}
@keyframes lot-focus {
  0% { box-shadow: 0 0 0 3px var(--accent); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.radar-head {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) minmax(118px, 38%);
  gap: 10px; align-items: start; min-width: 0; width: 100%;
}
.radar-card.stream-card { width: 100%; }
.radar-card.stream-card .radar-head { grid-template-columns: 48px minmax(0, 1fr) minmax(160px, 34%); }
.radar-main { min-width: 0; overflow: hidden; }
.radar-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; min-width: 0; max-width: 100%; overflow: hidden; }
.radar-right .price, .radar-right .median, .radar-right .delta, .radar-right .faint {
  white-space: normal; text-align: right; overflow-wrap: anywhere; max-width: 100%;
}
.lot-up {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.01em;
}
.probe-tag { color: var(--text); opacity: 0.82; font-weight: 600; }
.probe-tag.unprobed { color: #f0b4a8; }
.probe-tag.probed { color: #86efac; }
.charge-row {
  display: flex; flex-wrap: wrap; gap: 10px 16px;
  margin-top: 4px; font-size: 12px; color: var(--muted);
}
.charge-row b { color: var(--text); font-weight: 700; }
.price-block { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.price-label { font-size: 10px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); }
.stream-card .price { color: #f0b4a8; font-variant-numeric: tabular-nums; }
.stream-card .median { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.stream-card .delta.pos { color: var(--green); }
.mod-chip.range { color: #86efac; background: color-mix(in srgb, var(--green) 10%, var(--panel-solid)); }
.bonus-tag {
  font-size: 11px; font-weight: 700; color: var(--accent);
  background: var(--accent-dim); border-radius: 6px; padding: 2px 7px; white-space: nowrap;
}
.loading-card { padding: 22px 20px; }
.loading-card h2 { margin: 0 0 6px; font-size: 18px; }
.radar-stats { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; width: 100%; }
.radar-icon { width: 48px; min-width: 48px; }
.radar-card .icon { width: 48px; height: 48px; border-radius: 10px; }
.radar-card .name { font-size: 14px; font-weight: 800; line-height: 1.2; }
.radar-card .price { font-size: 16px; font-weight: 800; }
.radar-card .median { font-size: 12px; color: var(--muted); }
.radar-card .delta { font-size: 15px; font-weight: 800; }
.radar-actions { display: flex; gap: 4px; }
.radar-actions button, .buy-btn {
  border: 1px solid var(--line); background: var(--panel-solid); color: var(--text);
  border-radius: 8px; padding: 5px 8px; cursor: pointer; font-size: 11px; font-weight: 700;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast) var(--ease);
}
.radar-actions button:hover, .buy-btn:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.buy-btn { background: color-mix(in srgb, var(--accent) 16%, var(--bg-elev)); color: var(--accent); }

.new-tag {
  display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: 0.05em;
  color: var(--accent-ink); background: linear-gradient(140deg, var(--accent-2), var(--accent));
  border-radius: 5px; padding: 1px 6px;
  vertical-align: middle; margin-left: 4px;
  box-shadow: 0 0 10px var(--accent-glow);
}
.risk-pill {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 6px;
  font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px;
  font-variant-numeric: tabular-nums; vertical-align: middle;
}
.risk-pill.tone-bold { background: var(--green-dim); color: var(--green); }
.risk-pill.tone-mid { background: var(--warn-dim); color: var(--accent); }
.risk-pill.tone-risk { background: var(--red-dim); color: var(--red); }
.warn-note {
  color: var(--red); font-size: 12px; margin-top: 4px; line-height: 1.35;
  display: block; width: 100%; max-width: 100%; min-width: 0;
  white-space: normal; overflow-wrap: anywhere; word-break: normal;
}
.sold-hint { color: var(--muted); font-size: 11px; margin-left: 6px; font-variant-numeric: tabular-nums; }
.mod-chip { font-size: 11px; color: var(--muted); background: var(--panel-solid); border-radius: 6px; padding: 2px 6px; white-space: nowrap; }
.mod-chip.pos { color: var(--green); }
.mod-chip.neg { color: var(--red); }
.qlt-chip { font-size: 11px; color: var(--muted); }
.item-subline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 2px; font-size: 12px; }
.rarity-line { font-size: 11px; letter-spacing: 0.02em; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.tier-chip {
  display: inline-block; font-size: 11px; font-weight: 800;
  color: var(--accent); background: var(--accent-dim);
  border-radius: 999px; padding: 1px 8px; vertical-align: middle;
}

/* ── Топы и карточки ─────────────────────────────────────── */
.hot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hot-grid > * { animation: card-in 0.3s var(--ease) backwards; }
.hot-grid > *:nth-child(2) { animation-delay: 0.05s; }
.hot-grid > *:nth-child(3) { animation-delay: 0.1s; }
.hot-card { padding: 16px; display: grid; gap: 8px; cursor: pointer; position: relative; overflow: hidden; transition: transform var(--t-med) var(--ease), border-color var(--t-med), box-shadow var(--t-med); }
.hot-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--green) 45%, var(--line));
  box-shadow: var(--shadow);
}
.hot-card .place { font-family: var(--font-display); font-size: 13px; color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase; }
.hot-card.place-1 { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.hot-card.place-1::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.quick-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.char-card { padding: 16px; display: grid; gap: 6px; }
.char-card .char-desc { margin: 4px 0 0; font-size: 13px; white-space: pre-wrap; }
.clan-table .clan-row { cursor: pointer; }
.clan-table .clan-row:hover { background: var(--bg-elev); }
.clan-place { font-weight: 800; color: var(--faint); width: 48px; }
.clan-top { display: grid; gap: 4px; text-decoration: none; color: inherit; padding: 16px; }
.clan-medal-1 .clan-place, .clan-top.clan-medal-1 .faint:first-child { color: #d4af37; }
.clan-medal-2 .clan-place, .clan-top.clan-medal-2 .faint:first-child { color: #9aa4b2; }
.clan-medal-3 .clan-place, .clan-top.clan-medal-3 .faint:first-child { color: #b87333; }
.clan-top10 { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 12px 16px; }
.clan-mini { display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none; color: inherit; font-size: 13px; }
.clan-mini:hover { color: var(--accent); }
.effects-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; padding: 14px 16px; }
.effects-box h4 { margin: 0 0 8px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.effect { font-size: 13px; line-height: 1.45; }
.effect.pos { color: var(--green); }
.effect.neg { color: var(--red); }
.trend { font-size: 12px; }
.trend.falling { color: var(--red); }
.trend.rising { color: var(--green); }
.range-wrap { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.range-wrap input { width: 92px; min-height: 36px !important; }
.range-wrap select { min-height: 36px !important; }
.chart-box { padding: 16px; min-height: 0; display: grid; gap: 10px; }

/* ── Тарифы ───────────────────────────────────────────────── */
.price-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: stretch; }
.price-plans > * { animation: card-in 0.35s var(--ease) backwards; }
.price-plans > *:nth-child(2) { animation-delay: 0.07s; }
.price-plans > *:nth-child(3) { animation-delay: 0.14s; }
.plan { padding: 20px; display: grid; gap: 8px; align-content: start; align-items: start; transition: transform var(--t-med) var(--ease), border-color var(--t-med), box-shadow var(--t-med); position: relative; overflow: hidden; }
.plan:hover { transform: translateY(-3px); box-shadow: var(--shadow-pop); }
.plan.featured { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.plan.featured::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent);
}
.plan ul { margin: 6px 0; padding-left: 18px; display: grid; gap: 4px; color: var(--muted); font-size: 13px; }
.plan b, .plan-price {
  font-size: 24px; font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15;
}
.plan-actions { display: grid; gap: 8px; margin-top: 4px; }
.year-deal {
  display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent) 12%, var(--panel-solid));
}
.year-deal-mark {
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent-2, var(--accent));
}
.year-deal strong { font-size: 16px; }
.year-btn {
  background: linear-gradient(90deg, var(--accent), var(--accent-2, var(--accent)));
  color: #061018; border: 0; font-weight: 800;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 30%, transparent);
}
.year-btn:hover { filter: brightness(1.06); }
.year-btn:disabled { opacity: 0.65; filter: none; }
.deal-hl { color: var(--accent-2, var(--accent)); font-weight: 800; }
.deal-line { color: var(--text); }
.deal-row td { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.copy-mail, button.copy-mail {
  display: inline-block; padding: 0; border: 0; background: none; color: var(--accent);
  cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 2px;
  min-height: 0; text-align: left; width: max-content;
}
.footer-col .copy-mail { justify-self: start; }
.copy-mail.copied { color: var(--green, #3fb950); text-decoration: none; }
.recovery-list { display: grid; gap: 6px; margin: 10px 0; }
.recovery-code {
  display: block; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line);
  font-family: ui-monospace, Consolas, monospace; letter-spacing: 0.06em;
}
.recovery-box { margin-top: 14px; display: grid; gap: 8px; }

/* ── Кабинет / Квест ──────────────────────────────────────── */
.login-box { max-width: 420px; margin: 18px auto 24px; padding: 18px; display: grid; gap: 8px; }
.auth-split {
  display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 12px;
}
.auth-split::before, .auth-split::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.oauth-stack, .oauth-links { display: grid; gap: 10px; }
.oauth-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; width: 100%; box-sizing: border-box;
  border-radius: 12px; padding: 10px 16px; cursor: pointer;
  font: inherit; font-weight: 800; letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform var(--t-fast) var(--ease), filter var(--t-fast), box-shadow var(--t-fast);
}
.oauth-btn:hover { transform: translateY(-1px); }
.oauth-btn:active { transform: translateY(0) scale(0.98); }
.oauth-btn .oauth-svg { width: 18px; height: 18px; flex: 0 0 18px; }
.oauth-btn.exbo {
  background: linear-gradient(180deg, #2a2418, #1a1610);
  border-color: #c4a35a;
  color: #f3d58a;
  box-shadow: 0 6px 18px rgba(196, 163, 90, 0.16);
}
.oauth-btn.exbo:hover { filter: brightness(1.08); box-shadow: 0 8px 22px rgba(196, 163, 90, 0.22); }
.oauth-btn.steam, .steam-btn {
  background: linear-gradient(180deg, #2a475e, #171a21);
  border: 1px solid #66c0f4;
  color: #d7e6f0;
  box-shadow: 0 6px 18px rgba(102, 192, 244, 0.12);
}
.oauth-btn.steam:hover, .steam-btn:hover { filter: brightness(1.08); color: #fff; }
.oauth-card {
  display: grid; gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-elev) 70%, transparent);
}
.oauth-card-head { display: flex; align-items: flex-start; gap: 10px; }
.oauth-card-head b { display: block; }
.oauth-mark {
  width: 36px; height: 36px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 36px;
}
.oauth-mark .oauth-svg { width: 18px; height: 18px; }
.oauth-mark.exbo { background: #2a2418; color: #f3d58a; border: 1px solid #c4a35a; }
.oauth-mark.steam { background: #171a21; color: #66c0f4; border: 1px solid #66c0f4; }
.user-ava {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--line);
}
.progress { height: 10px; border-radius: 99px; background: var(--bg-elev); overflow: hidden; border: 1px solid var(--line); }
.progress i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  background-size: 24px 24px;
  border-radius: 99px;
  transition: width 0.6s var(--ease);
  background-image: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.18) 25%, transparent 25%, transparent 50%,
    rgba(255, 255, 255, 0.18) 50%, rgba(255, 255, 255, 0.18) 75%, transparent 75%
  ), linear-gradient(90deg, var(--accent), var(--accent-2));
  animation: progress-stripes 1.4s linear infinite;
}
.quest-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.quest-card { display: grid; gap: 10px; }
.tier-row { display: flex; flex-wrap: wrap; gap: 6px; }
.badge-tier {
  font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast);
}
.badge-tier:hover { transform: translateY(-1px); }
.badge-tier.bronze { color: #b08a72; background: rgba(176, 138, 114, 0.07); }
.badge-tier.silver { color: #aeb9c5; background: rgba(174, 185, 197, 0.07); }
.badge-tier.gold { color: #c9a96e; background: rgba(201, 169, 110, 0.08); border-color: rgba(201, 169, 110, 0.25); }
.badge-tier.platinum { color: #93aeb8; background: rgba(147, 174, 184, 0.08); }
.badge-tier.diamond { color: #8bb9c4; background: rgba(139, 185, 196, 0.08); }
.badge-tier.on { border-color: currentColor; box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 20%, transparent); }
.plan-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 9px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); background: var(--bg-elev);
  font-size: 11px; font-weight: 800; line-height: 1;
  text-decoration: none;
}
a.plan-badge:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.plan-badge i { font-style: normal; font-size: 10px; opacity: 0.9; }
.plan-badge.plan-premium { color: #d6b46f; border-color: rgba(214, 180, 111, 0.28); background: rgba(214, 180, 111, 0.08); }
/* Старший тариф выделяется насыщенностью, а не другим (холодным) цветом. */
.plan-badge.plan-premium-plus {
  color: #ffd9a0;
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.22), rgba(245, 158, 11, 0.08));
}
.referral-shortcut { padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.referral-shortcut p { margin: 4px 0 0; }
.ref-code {
  display: block; margin: 8px 0; padding: 9px 11px;
  background: var(--bg-elev); border: 1px dashed var(--line-strong);
  border-radius: 9px; font-size: 13px; overflow-wrap: anywhere;
}
.clan-card { overflow: visible; }
.clan-save {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}
.clan-save .field { flex: 1 1 200px; min-width: 0; }
.settings-card .clan-save .btn {
  flex: 0 0 auto;
  align-self: end;
  min-height: 40px;
  box-shadow: 0 2px 10px var(--accent-glow);
}

/* ── Разное ───────────────────────────────────────────────── */
.empty { padding: 40px 20px; text-align: center; color: var(--muted); display: grid; gap: 8px; justify-items: center; }
.skeleton {
  height: 88px; border-radius: var(--radius);
  background: linear-gradient(90deg, var(--bg-elev), color-mix(in srgb, var(--text) 5%, var(--bg-elev)), var(--bg-elev));
  background-size: 200% 100%;
  animation: shine 1.15s infinite;
}
.notice {
  font-size: 13px; color: var(--muted);
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 11px 13px;
}
.delay-note a, .lock-hint { color: var(--accent); text-decoration: none; font-size: 12px; font-weight: 700; }
.premium-nudge {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 13px 15px; border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: var(--radius-sm);
  background: linear-gradient(100deg, color-mix(in srgb, var(--accent) 7%, var(--bg-elev)), var(--bg-elev));
}
.premium-nudge > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.premium-nudge b { color: color-mix(in srgb, var(--accent) 72%, var(--text)); font-size: 13px; }
.premium-nudge span { color: var(--muted); font-size: 12px; }
.premium-nudge .btn { min-height: 34px; padding: 7px 12px; flex-shrink: 0; font-size: 12px; }
.ad-slot {
  border: 1px dashed color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: var(--radius-sm); padding: 12px 16px;
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-elev)); color: var(--muted);
}
.ad-inner { font-size: 13px; }
.admin-note { font-size: 12px; color: var(--faint); }
.dossier h3 { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dossier h4 { margin: 16px 0 8px; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; word-break: break-all; }
.admin-sub-editor {
  padding: 18px; display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px; align-items: end;
}
.admin-sub-editor[hidden] { display: none; }
.admin-sub-editor > div:first-child,
.admin-sub-editor .settings-actions { grid-column: 1 / -1; }
.admin-sub-editor h3, .admin-sub-editor p { margin: 0; }
.ticket-card { padding: 12px 14px; display: grid; gap: 8px; }
.ticket-card summary { cursor: pointer; font-weight: 700; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.ticket-card h3 { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.ticket-card textarea { width: 100%; }
.ticket-thread { display: grid; gap: 6px; max-height: 240px; overflow: auto; padding-right: 4px; }
.ticket-archive { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--bg); }
.ticket-archive summary { cursor: pointer; font-weight: 600; color: var(--faint); }
.ticket-msg { padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-elev); white-space: pre-wrap; word-break: break-word; }
.ticket-msg.admin { background: color-mix(in srgb, var(--accent) 14%, var(--bg-elev)); margin-left: 28px; }
.ticket-msg.user { margin-right: 28px; }
.ticket-msg .meta { font-size: 11px; color: var(--faint); margin-bottom: 4px; }
.ticket-open { color: var(--green); font-weight: 700; }
.role-chip {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--line));
  background: color-mix(in srgb, var(--accent) 16%, var(--panel-solid));
  vertical-align: middle;
}
.ticket-closed { color: var(--faint); font-weight: 700; }

/* ── Уведомления ──────────────────────────────────────────── */
.notify-wrap { position: relative; }
.notify-drop { right: 0; min-width: 260px; }
.notify-head { padding: 8px 12px 4px; font-weight: 800; font-size: 13px; }
.notify-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: var(--text); cursor: pointer; border-radius: 8px; transition: background var(--t-fast); }
.notify-row:hover { background: var(--bg-elev); }
.notify-hint { margin: 4px 12px 10px; font-size: 12px; }

.toast-stack {
  position: fixed; right: 16px; bottom: calc(18px + var(--dock));
  z-index: 90; display: grid; gap: 8px; width: min(320px, calc(100vw - 32px));
  pointer-events: none;
}
.toast-stack-top {
  top: calc(72px + env(safe-area-inset-top, 0px));
  bottom: auto;
}
.site-notice-bar {
  padding: 10px 18px;
  background: color-mix(in srgb, var(--warn) 16%, var(--bg-elev));
  border-bottom: 1px solid color-mix(in srgb, var(--warn) 40%, var(--line));
  color: var(--text);
  font-size: 14px;
  text-align: center;
}
.toast-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: default;
  border-color: color-mix(in srgb, var(--warn) 40%, var(--line));
}
.toast-notice span { flex: 1; }
.toast-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
}
.toast {
  pointer-events: auto; cursor: pointer;
  appearance: none; text-align: left; width: 100%;
  background: var(--panel-solid);
  border: 1px solid color-mix(in srgb, var(--green) 40%, var(--line));
  border-radius: 14px; padding: 12px 14px;
  box-shadow: var(--shadow-pop);
  animation: toast-in 0.3s var(--ease);
  transition: transform var(--t-fast) var(--ease);
}
.toast:hover { transform: translateX(-3px); }

/* ── Док (мобильный) ──────────────────────────────────────── */
.dock {
  display: none;
  position: fixed; left: 12px; right: 12px; bottom: 12px;
  z-index: 30;
  /* minmax(0,…) обязателен: иначе иконка с подписью раздувает колонку и док вылезает за экран */
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 8px;
  background: color-mix(in srgb, var(--panel-solid) 90%, transparent);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: var(--shadow-pop);
}
.dock a, .dock-more {
  display: grid; grid-template-rows: auto auto; justify-items: center; align-content: center; gap: 3px;
  min-width: 0; overflow: hidden;
  color: var(--muted); text-align: center; padding: 8px 2px; border-radius: 12px;
  border: 1px solid transparent; background: transparent; cursor: pointer; font: inherit;
  font-size: 11px; font-weight: 600; line-height: 1.1; letter-spacing: 0;
  transition: color var(--t-fast), background var(--t-fast), transform var(--t-fast) var(--ease);
}
.dock a > span, .dock-more > span {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dock a:active, .dock-more:active { transform: scale(0.94); }

/* ── Легенда графика ──────────────────────────────────────── */
.chart-legend {
  display: flex; gap: 16px; flex-wrap: wrap;
  padding: 8px 4px 0; font-size: 12px;
}
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i {
  display: inline-block; width: 14px; height: 3px; border-radius: 2px;
}
.chart-legend-hint { margin-left: auto; color: var(--faint); }
.chart-plot { position: relative; color: var(--text); }
.item-chart-svg { display: block; overflow: visible; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-axis { fill: currentColor; font-size: 11px; opacity: 0.78; }
.chart-peak { fill: #e2b657; font-size: 11px; font-weight: 700; }
.chart-pt.is-on, .chart-pt.is-peak { stroke: #fff; stroke-width: 1.6; }
.chart-hit { cursor: pointer; pointer-events: none; }
.chart-tip {
  position: absolute;
  z-index: 3;
  min-width: 148px;
  max-width: 240px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-solid);
  box-shadow: var(--shadow-pop);
  font-size: 12px;
  line-height: 1.4;
  pointer-events: none;
  display: grid;
  gap: 2px;
}
.chart-tip[hidden] { display: none; }
.chart-tip b { font-size: 14px; font-family: var(--font-display); }
.chart-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chart-forecast-note { margin: 0; }
.item-spec-note { margin: -4px 0 0; }
.item-spec-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.item-spec-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}
.item-spec-chip:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.item-spec-chip.is-on {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
  background: color-mix(in srgb, var(--accent) 18%, var(--panel-solid));
  color: var(--text);
}
.item-spec-n { color: var(--muted); font-weight: 600; }
.item-fold {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.item-fold > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
}
.item-fold > summary::-webkit-details-marker { display: none; }
.item-fold-title { font-weight: 800; }
.item-fold-meta { color: var(--muted); font-size: 13px; }
.item-fold-action {
  margin-left: auto;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 22%, var(--panel-solid));
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent);
}
.item-fold-action::before { content: "Развернуть"; }
.item-fold[open] > summary .item-fold-action::before { content: "Свернуть"; }
.item-fold:not([open]) > summary {
  background: color-mix(in srgb, var(--accent) 6%, var(--panel));
}
.item-fold-body { display: grid; gap: 10px; padding: 0 14px 14px; }
.item-page .live-table tr.is-on { background: color-mix(in srgb, var(--accent) 12%, transparent); }

/* ── Заметка над футером ──────────────────────────────────── */
.site-note {
  width: min(var(--max), calc(100% - 32px));
  margin: 8px auto 0;
  padding: 12px 0 4px;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.5;
  display: grid;
  gap: 4px;
}
.site-note p { margin: 0; }
.site-note .copy-mail,
.site-note-mail {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}
.site-note .copy-mail:hover,
.site-note-mail:hover { color: var(--accent-2); }
.site-note .copy-mail.copied { color: var(--green); text-decoration: none; }
.seo-blurb {
  margin: 22px 0 0;
  max-width: 46rem;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.5;
}
.tracker-page { max-width: 760px; }
.tracker-article,
.tracker-faq { margin-top: 18px; }
.tracker-article h2,
.tracker-faq h2 {
  margin: 22px 0 10px;
  font-size: 18px;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}
.tracker-article h2:first-child { margin-top: 0; }
.tracker-article p,
.tracker-faq p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.65;
}
.tracker-article a { color: var(--accent); font-weight: 600; }
.tracker-faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 10px 14px;
  margin: 0 0 8px;
}
.tracker-faq summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--text);
}
.tracker-faq details[open] summary { margin-bottom: 8px; }

/* ── Футер ────────────────────────────────────────────────── */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 60%, var(--panel-solid));
  padding: 34px 0 calc(18px + var(--dock));
  position: relative;
}
.footer::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-glow) 45%, transparent 90%);
}
.footer-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) repeat(4, minmax(130px, 1fr));
  gap: 28px;
}
.footer-col .tg-tag {
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.footer-brand { display: grid; gap: 10px; align-content: start; }
.footer-brand p { margin: 0; line-height: 1.5; max-width: 340px; }
.footer-col { display: grid; gap: 8px; align-content: start; font-size: 13px; }
.footer-col b {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--faint); margin-bottom: 2px;
}
.footer-col a { color: var(--muted); transition: color var(--t-fast), padding-left var(--t-fast) var(--ease); }
.footer-col a:hover { color: var(--accent); padding-left: 3px; }
.footer-requisite { color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }
.footer-copy {
  width: min(var(--max), calc(100% - 32px));
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--faint); font-size: 12px;
}

/* ── Cookie-баннер ────────────────────────────────────────── */
.cookie-bar {
  position: fixed; left: 16px; right: 16px; bottom: calc(16px + var(--dock));
  z-index: 85;
  margin: 0 auto; max-width: 680px;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--panel-solid);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  animation: toast-in 0.4s var(--ease);
}
.cookie-bar p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.cookie-bar a { color: var(--accent); font-weight: 700; }
.cookie-bar .btn { flex-shrink: 0; padding: 8px 14px; }

/* ── Юридические страницы ─────────────────────────────────── */
.legal-page { max-width: 860px; margin: 0 auto; width: 100%; }
.legal-body { padding: 26px 30px; line-height: 1.65; font-size: 14px; color: var(--text); }
.legal-body h3 {
  margin: 22px 0 8px; font-size: 15px;
  font-family: var(--font-display); letter-spacing: -0.01em;
  color: var(--accent);
}
.legal-body h3:first-child { margin-top: 0; }
.legal-body p { margin: 0 0 10px; color: var(--muted); }
.legal-body ul { margin: 0 0 12px; padding-left: 20px; color: var(--muted); display: grid; gap: 5px; }
.legal-body a { color: var(--accent); font-weight: 600; }
.legal-body a:hover { text-decoration: underline; }
.legal-body .legal-mail { font-size: 18px; font-weight: 800; color: var(--text); }
.service-delivery { margin-top: 16px; padding: 20px 24px; line-height: 1.6; }
.service-delivery h3 { margin: 0 0 10px; color: var(--accent); }
.service-delivery p { margin: 8px 0; color: var(--muted); }
.service-delivery a { color: var(--accent); font-weight: 700; }

/* ── Согласие при регистрации ─────────────────────────────── */
.consent-row {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 12px; color: var(--muted); line-height: 1.45;
  padding: 0;
  background: none; border: 0;
  cursor: pointer;
}
.consent-row input { margin-top: 2px; }
.consent-row a { color: var(--accent); font-weight: 600; }

.hunt-help { padding: 16px 18px; }
.hunt-help ol { margin: 8px 0 0; padding-left: 18px; color: var(--muted); line-height: 1.55; }
.hunt-help li { margin: 6px 0; }
.hunt-list { display: flex; flex-direction: column; gap: 8px; }
.hunt-card {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px;
  align-items: center; padding: 12px 14px; cursor: pointer;
}
.hunt-card.hunt-hit { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.hunt-icon .icon { width: 52px; height: 52px; }
.hunt-main { min-width: 0; }
.hunt-side { text-align: right; display: grid; gap: 4px; justify-items: end; }

/* ── Адаптив ──────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .nav { display: none; }
  .menu-btn { display: grid; }
  .live { font-size: 11px; }
  .dock { display: grid; }
  :root { --dock: 76px; }
  .lot-grid, .cards-3, .price-plans, .cards-2, .hot-grid, .live-layout, .radar-grid { grid-template-columns: 1fr; }
  .live-layout { grid-template-columns: 1fr; }
  .channels-col { position: static; display: flex; flex-wrap: wrap; }
  .channels-col .chip { width: auto; }
  .topbar { flex-wrap: wrap; }
  .search-wrap { order: 5; max-width: none; flex-basis: 100%; }
  .search-hint { display: none; }
  .hunt-card { grid-template-columns: 48px minmax(0, 1fr); }
  .hunt-side { grid-column: 1 / -1; text-align: left; justify-items: start; flex-direction: row; }
  .radar-card { grid-template-columns: 48px 1fr; }
  .radar-card .radar-head { grid-template-columns: 48px minmax(0, 1fr); }
  .radar-card .radar-right { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; justify-content: space-between; }
  .cab-layout { grid-template-columns: 205px minmax(0, 1fr); }
  .cab-summary, .cab-quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cab-service-grid, .cab-overview-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .not-found-page { min-height: auto; }
  .not-found-hero {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 28px 22px;
  }
  .not-found-code { font-size: clamp(88px, 34vw, 140px); }
  .not-found-actions .btn { flex: 1 1 180px; }
  .radar-card .radar-head,
  .radar-card.stream-card .radar-head { grid-template-columns: 48px minmax(0, 1fr); }
  .radar-card .radar-right,
  .radar-card.stream-card .radar-right {
    grid-column: 1 / -1;
    flex-direction: row; flex-wrap: wrap;
    align-items: center; justify-content: space-between;
    min-width: 0;
  }
  .hero { padding: 18px; }
  #app { width: calc(100% - 20px); }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .cookie-bar { flex-direction: column; align-items: stretch; text-align: left; }
  .premium-nudge { align-items: flex-start; flex-direction: column; }
  .premium-nudge .btn { width: 100%; }
  .admin-sub-editor { grid-template-columns: 1fr; }
  .admin-sub-editor > div:first-child, .admin-sub-editor .settings-actions { grid-column: 1; }
  .cab-layout { grid-template-columns: 1fr; gap: 10px; }
  .cab-sidebar {
    top: 60px; z-index: 24; max-height: none; overflow: visible;
    padding: 7px; display: block;
    background: color-mix(in srgb, var(--panel-solid) 94%, transparent);
  }
  .cab-user-card, .cab-side-footer { display: none; }
  .cab-side-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .cab-side-nav::-webkit-scrollbar { display: none; }
  .cab-side-link {
    width: auto; min-width: max-content; min-height: 36px;
    display: flex; padding: 7px 10px;
  }
  .cab-side-link > span { font-size: 14px; }
  .cab-welcome { align-items: flex-start; flex-direction: column; }
  .cab-welcome .btn { width: 100%; }
  .cab-summary, .cab-quick-grid, .cab-profile-grid { grid-template-columns: 1fr; }
  .cab-security-card { grid-column: 1; }
  .cab-activity-row { grid-template-columns: 10px minmax(0, 1fr); }
  .cab-activity-row time { grid-column: 2; }
}

/* ── Доступность ──────────────────────────────────────────── */
@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; }
}

/* ── ZoneRadar UI 2.0 ────────────────────────────────────── */
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --text-xs: 11px;
  --text-sm: 13px;
  --text-md: 15px;
  --text-lg: 18px;
  --text-xl: 24px;
  --text-2xl: clamp(30px, 4vw, 46px);
  --topbar-h: 68px;
  --content-max: 1440px;
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --panel: rgba(22, 21, 19, .88);
  --panel-solid: #171614;
  --bg-elev: rgba(32, 30, 27, .8);
  --line: rgba(198, 186, 168, .14);
  --line-strong: rgba(198, 186, 168, .25);
  --shadow: 0 18px 50px rgba(0, 0, 0, .24);
  --shadow-soft: 0 8px 28px rgba(0, 0, 0, .14);
  --focus: 0 0 0 3px rgba(245, 158, 11, .26);
}

[data-theme="light"] {
  --bg: #f4f1eb;
  --bg-elev: rgba(255, 255, 255, .86);
  --panel: rgba(255, 255, 255, .9);
  --panel-solid: #fff;
  --text: #1f1c18;
  --muted: #5f584f;
  --faint: #8b8378;
  --line: rgba(58, 46, 32, .13);
  --line-strong: rgba(58, 46, 32, .24);
  --blue: #176b8a;
  --green: #167955;
  --red: #c83f49;
  --warn: #986818;
  --shadow: 0 18px 44px rgba(62, 50, 34, .12);
  --shadow-soft: 0 8px 24px rgba(62, 50, 34, .08);
}

html { scroll-padding-top: calc(var(--topbar-h) + 18px); }
body {
  font-size: var(--text-sm);
  letter-spacing: .005em;
  background:
    radial-gradient(circle at 12% -10%, rgba(245, 158, 11, .11), transparent 32rem),
    radial-gradient(circle at 92% 8%, rgba(213, 168, 72, .07), transparent 30rem),
    var(--bg);
}
body::before {
  opacity: .18;
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 8px;
  left: 12px;
  padding: 10px 14px;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: var(--radius-sm);
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform .18s ease;
}
.skip-link:focus { transform: translateY(0); }

#app {
  width: min(calc(100% - 40px), var(--content-max));
  padding-top: 26px;
  padding-bottom: 54px;
}
.page { gap: 18px; }
.page > .hero:first-child { margin-bottom: 2px; }
.panel,
.hero,
.filter-menu,
.notify-drop,
.menu-sheet,
.cookie-bar {
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}
.panel { background: var(--panel); }
.hero {
  position: relative;
  overflow: hidden;
  min-height: 154px;
  padding: clamp(24px, 3.2vw, 42px);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(120deg, rgba(35, 31, 26, .96), rgba(16, 14, 12, .86)),
    var(--panel);
}
[data-theme="light"] .hero {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, .98), rgba(248, 243, 234, .94)),
    var(--panel);
}
.hero::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -100px;
  top: -120px;
  border-radius: 50%;
  border: 1px solid rgba(213, 168, 72, .14);
  box-shadow: 0 0 0 36px rgba(245, 158, 11, .022), 0 0 0 78px rgba(213, 168, 72, .02);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 {
  max-width: 900px;
  margin-bottom: 10px;
  font-size: var(--text-2xl);
  line-height: 1.04;
  letter-spacing: -.035em;
}
.hero .muted {
  max-width: 900px;
  font-size: 14px;
  line-height: 1.65;
}
.source-row { gap: 7px; margin-bottom: 14px; }
.section-head {
  min-height: 38px;
  margin-top: 8px;
  align-items: end;
}
.section-head h2,
.section-head h3 { letter-spacing: -.02em; }

.topbar {
  min-height: var(--topbar-h);
  padding: 10px max(18px, calc((100vw - var(--content-max)) / 2));
  gap: 18px;
  background: color-mix(in srgb, var(--bg) 76%, transparent);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.brand { min-width: max-content; gap: 9px; }
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #0b0c0e;
  background: linear-gradient(145deg, #f2d279, var(--accent));
  box-shadow: 0 7px 22px rgba(213, 168, 72, .2);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-name { display: block; font-size: 17px; line-height: 1.05; letter-spacing: -.025em; }
.brand-sub { display: block; margin-top: 3px; color: var(--faint); font-size: 8px; line-height: 1; letter-spacing: .12em; }
.nav { gap: 2px; }
.nav a {
  min-height: 38px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.nav a:hover {
  color: var(--text);
  background: var(--bg-elev);
  border-color: var(--line);
}
.nav a.on,
.nav a.active {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-color: color-mix(in srgb, var(--accent) 24%, transparent);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}
.top-actions select,
.top-actions button,
.top-actions .ghost,
.menu-btn {
  min-height: 38px;
}
.top-actions button:not(.menu-btn),
.menu-btn {
  min-width: 38px;
  place-items: center;
}
/* Гамбургер — только для узких экранов, где скрыта основная навигация. Общее
   правило на `.top-actions button` показывало его и на десктопе, где рядом уже
   есть «Ещё»: два меню с одним и тем же списком разделов. */
.top-actions button:not(.menu-btn) { display: inline-grid; }
.top-actions svg,
.menu-btn svg { width: 18px; height: 18px; }
.live {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid color-mix(in srgb, var(--green) 28%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--green) 8%, transparent);
}

.btn,
.ghost,
.buy-btn,
.filter-btn,
.tab-btn,
.oauth-btn,
button {
  transition: border-color .16s ease, background .16s ease, color .16s ease,
    transform .16s ease, box-shadow .16s ease;
}
.btn {
  min-height: 42px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  box-shadow: 0 7px 22px rgba(213, 168, 72, .12);
}
.btn:hover:not(:disabled),
.buy-btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn.secondary,
.ghost {
  box-shadow: none;
}
.ghost {
  min-height: 38px;
  border-radius: 10px;
}
.ghost:hover,
.filter-btn:hover {
  border-color: var(--line-strong);
  background: var(--bg-elev);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: var(--focus);
}
button:disabled,
.btn:disabled,
.ghost:disabled { opacity: .42; cursor: not-allowed; transform: none; }

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  min-height: 42px;
  border-radius: 11px;
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--panel-solid) 82%, transparent);
}
input:hover,
select:hover,
textarea:hover { border-color: color-mix(in srgb, var(--accent) 34%, var(--line)); }
.field { gap: 7px; color: var(--muted); font-weight: 650; }
.field input,
.field select,
.field textarea { color: var(--text); font-weight: 500; }
.toolbar { gap: 9px; min-height: 44px; }

.pill,
.chip,
.tier-chip,
.qlt-chip,
.rarity,
.risk-pill,
.plan-badge {
  border-radius: 999px;
}
.pill {
  padding: 5px 9px;
  letter-spacing: .055em;
  border: 1px solid var(--line);
  background: var(--bg-elev);
}
.notice {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  line-height: 1.55;
}
.empty,
.loading-card {
  min-height: 150px;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 30px;
  text-align: center;
  border-style: dashed;
}
.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg-elev);
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 9%, transparent), transparent);
  animation: skeleton-slide 1.4s infinite;
}
@keyframes skeleton-slide { to { transform: translateX(100%); } }

.grid { gap: 14px; }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpi {
  position: relative;
  overflow: hidden;
  min-height: 134px;
  padding: 20px;
  align-content: space-between;
  border-radius: var(--radius);
}
.kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(var(--accent), transparent);
  opacity: .55;
}
.kpi b {
  font-size: clamp(22px, 2.4vw, 32px);
  letter-spacing: -.035em;
}
.table-wrap {
  border-radius: var(--radius);
  overflow: auto;
  scrollbar-color: var(--line-strong) transparent;
}
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 44px;
  padding: 13px 14px;
  color: var(--faint);
  background: color-mix(in srgb, var(--panel-solid) 94%, transparent);
  font-size: 10px;
  letter-spacing: .07em;
  text-transform: uppercase;
}
td { padding: 13px 14px; border-color: var(--line); }
tbody tr { transition: background .14s ease; }
tbody tr:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.profit.pos::before { content: "↑ "; font-size: .8em; }
.profit.neg::before { content: "↓ "; font-size: .8em; }

.filters-bar,
.filter-dock {
  padding: 12px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel-solid) 93%, transparent);
}
.filter-menus { gap: 8px; }
.filter-btn { min-height: 40px; border-radius: 10px; }
.filter-btn.on {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.filter-menu {
  margin-top: 8px;
  padding: 8px;
  border-radius: 13px;
}
.filter-opt { min-height: 38px; border-radius: 8px; }
.filter-chip { border-radius: 999px; }

.dock {
  left: 50%;
  bottom: 10px;
  width: min(calc(100% - 20px), 620px);
  transform: translateX(-50%);
  padding: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: color-mix(in srgb, var(--panel-solid) 91%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}
.dock a, .dock-more {
  min-height: 50px;
  border-radius: 12px;
}
.dock a.on,
.dock a.active {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}
.dock svg { width: 20px; height: 20px; }

.menu-sheet {
  inset: calc(var(--topbar-h) + 8px) 12px auto;
  max-height: calc(100vh - var(--topbar-h) - 24px);
  overflow: auto;
  padding: 12px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--panel-solid) 96%, transparent);
}
.menu-sheet a {
  min-height: 46px;
  border-radius: 11px;
}
.notify-drop {
  top: calc(var(--topbar-h) - 2px);
  border-radius: 16px;
  background: color-mix(in srgb, var(--panel-solid) 96%, transparent);
}

.site-note {
  width: min(calc(100% - 40px), var(--content-max));
  margin: 0 auto 24px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}
.footer {
  border-top-color: var(--line);
  background:
    linear-gradient(to bottom, color-mix(in srgb, var(--panel-solid) 70%, transparent), var(--bg));
}
.footer-inner {
  width: min(calc(100% - 40px), var(--content-max));
  padding: 34px 0 28px;
  gap: 28px;
}
.footer-col { gap: 9px; }
.footer-col h4 { margin: 0; color: var(--text); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
.footer-col a { width: fit-content; color: var(--muted); }
.footer-col a:hover { color: var(--accent); }
.footer-brand { max-width: 360px; }
.cookie-bar {
  width: min(calc(100% - 24px), 720px);
  left: 50%;
  right: auto;
  bottom: calc(var(--dock) + 16px);
  transform: translateX(-50%);
  padding: 14px 16px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--panel-solid) 96%, transparent);
}

/* Market and content pages */
.live-hero { min-height: 170px; }
.live-controls { top: calc(var(--topbar-h) + 8px); }
.live-viewport {
  --live-feed-h: min(680px, calc(100vh - var(--topbar-h) - 88px));
  min-height: 280px;
  border-radius: var(--radius);
}
.live-feed,
.radar-grid { gap: 10px; }
.radar-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border-radius: var(--radius);
  border-color: var(--line);
  background:
    linear-gradient(110deg, color-mix(in srgb, var(--accent) 3%, transparent), transparent 55%),
    var(--panel);
  box-shadow: var(--shadow-soft);
}
.radar-card::before {
  width: 3px;
  opacity: .85;
}
.radar-card:hover,
.item-tile:hover,
.hunt-card:hover,
.clan-top:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.radar-head { gap: 14px; }
.radar-icon .icon {
  width: 62px;
  height: 62px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--bg-elev);
}
.radar-main .name { font-size: 16px; letter-spacing: -.01em; }
.radar-right {
  min-width: 340px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}
.price-block { min-width: 90px; }
.price-label { font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.radar-actions { margin-top: 7px; }
.fav-btn,
.buy-btn { min-height: 36px; border-radius: 10px; }
.buy-btn { padding: 8px 12px; }
.item-grid {
  grid-template-columns: repeat(auto-fill, minmax(218px, 1fr));
  gap: 13px;
}
.item-tile {
  min-height: 244px;
  padding: 18px;
  border-radius: var(--radius);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.item-tile .icon { width: 82px; height: 82px; }
.item-tile .name { margin-top: 14px; font-size: 15px; }
.item-tile .quote { margin-top: auto; font-size: 19px; }
.chart-box {
  min-height: 0;
  padding: 18px;
  border-radius: var(--radius);
  overflow: visible;
}
.item-hero > .icon {
  width: 104px;
  height: 104px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg-elev);
}
.item-page .tabs {
  width: fit-content;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
}
.analytics-page .analytics-breakdown {
  background:
    linear-gradient(100deg, color-mix(in srgb, var(--accent) 6%, transparent), transparent),
    var(--panel);
}
.analytics-page .cards-2 > div {
  padding: 4px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel-solid) 36%, transparent);
}
.referral-page .hunt-block,
.analytics-page .market-block {
  display: grid;
  gap: 6px;
  padding: 12px 0 2px;
  border-top: 1px solid var(--line);
}
.referral-page .hunt-block h3,
.analytics-page .market-block h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -.02em;
}
.referral-page .hunt-block .faint,
.analytics-page .market-block .faint { margin: 0; line-height: 1.45; }
.referral-page .hunt-block .panel,
.analytics-page .market-block .panel { margin: 0; }
.analytics-page .market-block .radar-grid {
  padding: 0;
  gap: 10px;
}
@media (min-width: 1101px) {
  .analytics-page .market-block .radar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .analytics-page .market-block .radar-grid.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.calculator-page .calc-card { margin-inline: auto; }
#c-out {
  min-height: 78px;
  padding: 15px;
  display: grid;
  place-content: center;
  gap: 5px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--muted);
  text-align: center;
  background: var(--bg-elev);
}
#c-out .profit { font-size: 20px; font-weight: 850; }
.hunt-list { gap: 10px; }
.hunt-card {
  padding: 16px 18px;
  border-radius: var(--radius);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.hunt-card.hunt-hit {
  background: linear-gradient(100deg, rgba(213,168,72,.08), var(--panel) 42%);
}
.hunt-side {
  min-width: 170px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}
.clan-top {
  min-height: 172px;
  padding: 20px;
  border-radius: var(--radius);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.clan-top10 { padding: 8px; }
.clan-mini { min-height: 46px; border-radius: 10px; }
.clan-row { cursor: pointer; }

/* Account and product pages */
.login-box {
  width: min(calc(100% - 24px), 440px);
  margin: 16px auto 24px;
  padding: 18px;
  border-radius: var(--radius-lg);
  display: grid;
  gap: 8px;
}
.login-box::before { display: none; }
.login-title { margin: 0; font-size: 16px; }
.login-forgot { margin: -4px 0 0; }
.login-box .field input { min-height: 38px; }
.oauth-btn { min-height: 48px; border-radius: var(--radius-sm); }
.oauth-links,
.recovery-list { gap: 10px; }
.price-plans {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.plan {
  position: relative;
  min-height: 460px;
  padding: 24px;
  border-radius: var(--radius-lg);
}
.plan-kicker {
  min-height: 28px;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}
.plan h3 { margin: 0 0 8px; font-size: 21px; }
.plan.featured {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  background:
    linear-gradient(150deg, rgba(213,168,72,.1), transparent 42%),
    var(--panel);
}
.plan-price { font-size: 25px; letter-spacing: -.035em; }
.plan li { padding-block: 5px; line-height: 1.45; }
.plan li::marker { color: var(--green); }
.year-deal { padding: 12px; border-radius: 12px; }
.plan-actions { margin-top: auto; }
.compare-table th:not(:first-child),
.compare-table td:not(:first-child) { text-align: center; }
.cab-layout { grid-template-columns: 244px minmax(0, 1fr); gap: 18px; }
.cab-sidebar {
  top: calc(var(--topbar-h) + 16px);
  max-height: calc(100vh - var(--topbar-h) - 32px);
  padding: 12px;
  border-radius: 20px;
}
.cab-user-card {
  padding: 10px 8px 17px;
  border-bottom: 1px solid var(--line);
}
.cab-avatar {
  width: 46px;
  height: 46px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(213,168,72,.15);
}
.cab-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cab-side-nav { gap: 4px; margin-top: 10px; }
.cab-side-link {
  min-height: 43px;
  border-radius: 10px;
}
.cab-side-link > span {
  width: 25px;
  height: 25px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--faint);
  background: var(--bg-elev);
}
.cab-side-link.on > span { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); }
.cab-side-link.on {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 22%, transparent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}
.cab-main { min-width: 0; }
.cab-welcome {
  min-height: 150px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 90% 20%, rgba(245,158,11,.07), transparent 18rem),
    var(--panel);
}
.cab-welcome h1 { font-size: clamp(26px, 3vw, 38px); }
.cab-service,
.cab-quick-card,
.settings-card,
.cab-activity,
.cab-plan-card,
.ticket-card {
  border-radius: var(--radius);
}
.cab-quick-card {
  min-height: 128px;
  text-align: left;
}
.cab-quick-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.cab-service.connected { border-color: color-mix(in srgb, var(--green) 38%, var(--line)); }
.cab-profile-grid { gap: 14px; }
.settings-card { padding: 22px; }
.page-tabs {
  gap: 5px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  overflow-x: auto;
}
.tab-btn {
  min-height: 38px;
  border-radius: 9px;
  white-space: nowrap;
}
.tab-btn.on {
  color: var(--accent-ink);
  background: var(--accent);
}
.admin-note {
  max-width: 900px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: var(--bg-elev);
}
.admin-sub-editor,
.dossier { border-radius: var(--radius); }
.refund-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.refund-actions > select { max-width: 320px; }
.refund-list { display: grid; gap: 12px; }
.refund-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  background: var(--panel);
  display: grid;
  gap: 8px;
}
.refund-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: baseline;
  justify-content: space-between;
}
.refund-verdict {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 8px;
  font-weight: 650;
}
.refund-verdict--no_payment { background: var(--red-dim); color: var(--red); }
.refund-verdict--refundable { background: var(--green-dim); color: var(--green); }
.refund-verdict--already_refunded,
.refund-verdict--manual_yookassa { background: var(--warn-dim); color: var(--warn); }
.refund-if { color: var(--text); }
.refund-pay-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.refund-pay-list .no { color: var(--muted); }
.admin-page .cards-3 {
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
}
.admin-page .kpi { min-height: 104px; }
@media (max-width: 520px) {
  /* На телефоне держим сводку в две колонки: цифры важнее ширины подписи. */
  .admin-page .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-page .kpi { min-height: 92px; padding: 10px 12px; }
  .admin-page .kpi > b { font-size: var(--text-lg); }
}
.admin-page .table-wrap { max-height: 70vh; }
.quest-card {
  background:
    linear-gradient(100deg, rgba(213,168,72,.08), transparent 55%),
    var(--panel);
}
.quest-head { align-items: center; }
.progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg-elev);
}
.progress > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.referral-card,
.clan-card { min-height: 250px; }
.ref-code {
  display: block;
  padding: 12px;
  overflow-wrap: anywhere;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--bg-elev);
}
.portfolio-page .panel,
.portfolio-card { border-radius: var(--radius); }

/* Service pages */
.legal-page { max-width: 980px; }
.legal-page .hero { min-height: 130px; }
.legal-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
/* Оглавление прокручивается по горизонтали, но его ссылки раздували колонку:
   без min-width: 0 весь документ уезжал за правый край телефона. */
.legal-layout > * { min-width: 0; }
.legal-layout.solo { grid-template-columns: minmax(0, 1fr); }
.legal-toc {
  position: sticky;
  top: calc(var(--topbar-h) + 16px);
  padding: 16px;
  border-radius: var(--radius);
}
.legal-toc > b {
  display: block;
  margin-bottom: 10px;
  color: var(--faint);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.legal-toc nav { display: grid; gap: 3px; }
.legal-toc a {
  padding: 7px 8px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.legal-toc a:hover { color: var(--accent); background: var(--bg-elev); }
.legal-body {
  padding: clamp(24px, 4vw, 48px);
  border-radius: var(--radius-lg);
  font-size: 14px;
  line-height: 1.75;
}
.legal-body h3 {
  margin-top: 30px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 16px;
}
.not-found-hero {
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 10% 20%, rgba(245,158,11,.08), transparent 25rem),
    linear-gradient(125deg, var(--panel-solid), var(--panel));
}
.not-found-code {
  color: transparent;
  -webkit-text-stroke: 1px color-mix(in srgb, var(--accent) 50%, transparent);
  text-shadow: 0 14px 44px rgba(213,168,72,.09);
}

@media (max-width: 1240px) {
  :root { --content-max: 1160px; }
  .nav a { padding-inline: 8px; font-size: 11px; }
  .brand-sub { display: none; }
  .radar-right { min-width: 300px; }
  .cab-layout { grid-template-columns: 220px minmax(0, 1fr); }
}

@media (max-width: 980px) {
  :root { --topbar-h: 62px; --dock: 82px; }
  .nav { display: none; }
  .menu-btn { display: grid; }
  .dock { display: grid; }
  #app { padding-top: 18px; }
  .hero { min-height: 140px; }
  .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-plans { grid-template-columns: 1fr; }
  .plan { min-height: auto; }
  .plan.featured { order: -1; }
  .radar-right {
    grid-column: 1 / -1;
    min-width: 0;
    padding: 12px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .cab-layout { grid-template-columns: 1fr; }
  .cab-sidebar {
    top: calc(var(--topbar-h) + 6px);
    z-index: 24;
    max-height: none;
    padding: 7px;
  }
  .cab-user-card,
  .cab-side-footer { display: none; }
  .cab-side-nav {
    display: flex;
    gap: 4px;
    margin: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .cab-side-nav::-webkit-scrollbar { display: none; }
  .cab-side-link { width: auto; min-width: max-content; padding-inline: 11px; }
  .cab-service-grid,
  .cab-overview-bottom { grid-template-columns: 1fr; }
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc {
    position: static;
    padding: 10px;
  }
  .legal-toc > b { margin: 2px 6px 7px; }
  .legal-toc nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
  }
  .legal-toc a { flex: 0 0 auto; max-width: 240px; }
}

@media (max-width: 680px) {
  :root { --radius: 15px; --radius-lg: 20px; }
  #app,
  .site-note,
  .footer-inner { width: min(calc(100% - 24px), var(--content-max)); }
  #app { padding-bottom: 34px; }
  .topbar { padding-inline: 12px; gap: 9px; }
  .brand-name { font-size: 15px; }
  .brand-mark { width: 32px; height: 32px; }
  .live { display: none; }
  #region-sel { max-width: 74px; padding-inline: 7px; }
  .top-actions { margin-left: auto; }
  .top-actions .theme-text,
  #user-box .plan-badge,
  #user-box .ghost { display: none; }
  .hero { padding: 22px 18px; min-height: 128px; }
  .hero h1 { font-size: clamp(28px, 9vw, 38px); }
  .page { gap: 14px; }
  /* Счётчики в одну колонку растягивали страницу на несколько экранов. */
  .cards-3 { grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); }
  .cards-2 { grid-template-columns: 1fr; }
  .kpi { min-height: 100px; padding: 15px; }
  .kpi b { font-size: clamp(20px, 6.5vw, 26px); }
  .filter-menus { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .filter-dd { flex: 0 0 auto; }
  .filter-menu {
    position: fixed;
    left: 12px !important;
    right: 12px !important;
    bottom: calc(var(--dock) + 12px);
    top: auto !important;
    max-height: min(440px, 62vh);
    overflow: auto;
  }
  .toolbar { flex-wrap: wrap; }
  .toolbar .spacer { display: none; }
  .toolbar > button,
  .toolbar > .ghost { flex: 1 1 auto; }
  .radar-card { padding: 14px; }
  .radar-icon .icon { width: 50px; height: 50px; }
  .radar-main .name { font-size: 14px; }
  .radar-right { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .radar-right .price-block.gain,
  .radar-actions { grid-column: 1 / -1; }
  .radar-actions { display: grid; grid-template-columns: 42px 1fr; }
  .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .live-viewport { --live-feed-h: min(620px, calc(100vh - var(--topbar-h) - var(--dock) - 72px)); }
  .item-tile { min-height: 215px; padding: 14px; }
  .item-tile .icon { width: 64px; height: 64px; }
  .item-tile .meta { font-size: 10px; }
  .hunt-card { grid-template-columns: 44px minmax(0, 1fr); padding: 14px; }
  .hunt-side {
    grid-column: 1 / -1;
    width: 100%;
    padding: 11px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    text-align: left;
    justify-items: start;
  }
  .item-hero > .icon { width: 74px; height: 74px; border-radius: 17px; }
  .cab-welcome { padding: 20px; align-items: flex-start; flex-direction: column; }
  /* Сводка кабинета — по две карточки в ряд, иначе кабинет растягивается на три экрана. */
  .cab-summary,
  .cab-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cab-summary .kpi { min-height: 92px; padding: 12px; }
  .cab-profile-grid { grid-template-columns: 1fr; }
  .cab-section-title,
  .cab-section-head { align-items: flex-start; flex-direction: column; }
  .login-box { margin: 16px auto; padding: 16px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .cookie-bar { align-items: stretch; }
  .cookie-bar .btn { width: 100%; }
  .dock a, .dock-more { font-size: 10px; padding: 7px 1px; }
  .dock svg { width: 19px; height: 19px; }
  .table-wrap { border-radius: 13px; }
  th, td { padding: 11px 12px; }
}

@media (max-width: 420px) {
  /* Плитки каталога остаются по две в ряд: одна колонка растягивала список на десятки экранов. */
  .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .item-tile { min-height: 190px; padding: 11px 9px; }
  .item-tile .icon { width: 58px; height: 58px; }
  .item-tile .name { margin-top: 9px; font-size: 12.5px; }
  .item-tile .quote { font-size: 15px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .radar-right { grid-template-columns: 1fr; }
  .radar-right .price-block.gain,
  .radar-actions { grid-column: auto; }
}

.strong-label,
.item-title { font-weight: 800; }
.clickable-row { cursor: pointer; }
.chart-dot.sales { background: #e2b657; }
.chart-dot.trend-line { background: #38bdf8; }
.chart-dot.forecast { background: #3ee0a0; }
.search-field { width: min(100%, 420px); }
.price-note { padding: 9px 13px; }
.item-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}
.analytics-breakdown { padding: 18px; }
.calc-card {
  width: min(100%, 520px);
  padding: 22px;
  display: grid;
  gap: 12px;
}
.compact-notice { margin: 7px 0; }
.flush-notice { margin: 0; }
.field-hint { margin: 7px 0 0; }
.alert-row { margin-top: 9px; }
.toolbar-panel { padding: 12px; }
.quest-card,
.referral-card { padding: 20px; }
.referral-card .notice { margin: 14px 0 0; }
.live-tab-cap { margin: 16px 20px; }
.manual-grant-card {
  width: min(100%, 460px);
  padding: 18px;
  display: grid;
  gap: 10px;
}
.manual-grant-fold { width: min(100%, 520px); padding: 12px 16px; }
.manual-grant-fold summary { cursor: pointer; font-weight: 700; }
.manual-grant-fold .manual-grant-card { padding: 12px 0 0; width: 100%; }
.list-toggle { margin: 8px 0 12px; }
.site-notice-admin { display: grid; gap: 10px; }
/* Серверная заготовка живёт до первой отрисовки SPA: список ссылок для краулера
   не должен мигать перед пользователем сырым столбиком. */
.seo-links { margin-top: 18px; }
.seo-links h2 { font-size: 15px; color: var(--muted); }
.seo-links ul { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; }
.seo-links a {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--muted);
  font-size: 12px;
}
.ad-editor-card { padding: 18px; display: grid; gap: 8px; align-content: start; }
.ad-editor-card .ad-preview-label { margin-top: 4px; }
.ad-preview { display: grid; gap: 6px; }
.ad-slot img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.login-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elev);
}
.login-mode {
  min-height: 38px;
  padding: 7px 8px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 750;
}
.login-mode.on {
  color: var(--text);
  background: var(--panel-solid);
  box-shadow: var(--shadow-soft);
}
.portfolio-add {
  display: grid;
  grid-template-columns: minmax(190px, 1.4fr) minmax(120px, .6fr) minmax(160px, .8fr) auto;
  align-items: end;
}
.portfolio-add .btn { margin-bottom: 1px; }

@media (max-width: 680px) {
  .item-hero { grid-template-columns: auto minmax(0, 1fr); }
  .item-hero > .toolbar { grid-column: 1 / -1; }
  .login-switch { grid-template-columns: 1fr 1fr; }
  .portfolio-add { grid-template-columns: 1fr; }
}

/* Cabinet layout guard: keep sections beside the sidebar on desktop. */
.cabinet-page > .cab-layout {
  display: grid;
  grid-template-columns: minmax(220px, 244px) minmax(0, 1fr);
  grid-template-rows: auto;
  align-items: start;
  gap: 18px;
}
.cabinet-page .cab-sidebar {
  grid-column: 1;
  grid-row: 1;
  display: block;
  padding: 12px;
}
.cabinet-page .cab-user-card { display: flex; }
.cabinet-page .cab-side-nav {
  display: grid;
  overflow: visible;
}
.cabinet-page .cab-side-footer { display: grid; }
.cabinet-page .cab-main {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  min-width: 0;
}

@media (max-width: 760px) {
  .cabinet-page > .cab-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 12px;
  }
  .cabinet-page .cab-sidebar {
    grid-column: 1;
    grid-row: 1;
    top: calc(var(--topbar-h) + 6px);
    padding: 7px;
  }
  .cabinet-page .cab-user-card,
  .cabinet-page .cab-side-footer { display: none; }
  .cabinet-page .cab-side-nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .cabinet-page .cab-side-nav::-webkit-scrollbar { display: none; }
  .cabinet-page .cab-side-link {
    width: auto;
    min-width: max-content;
  }
  .cabinet-page .cab-main {
    grid-column: 1;
    grid-row: 2;
  }
}

.item-tile .quote.pending {
  color: var(--muted);
  border-style: dashed;
}
.catalog-scan-note {
  display: flex;
  align-items: center;
  gap: 10px;
}
.catalog-scan-note::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border: 2px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: catalog-scan-spin .8s linear infinite;
}
@keyframes catalog-scan-spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════
   Доводка: светлая тема и плотность вёрстки
   ══════════════════════════════════════════════════════════ */

:root { color-scheme: dark; }

[data-theme="light"] {
  color-scheme: light;
  --accent: #a8500b;
  --accent-2: #c96a09;
  --accent-ink: #fffdf9;
  --accent-dim: rgba(168, 80, 11, .08);
  --accent-glow: rgba(168, 80, 11, .18);
  --green-dim: rgba(22, 121, 85, .1);
  --red-dim: rgba(200, 63, 73, .09);
  --warn: #8a5a08;
  --warn-dim: rgba(138, 90, 8, .1);
  --shadow-pop: 0 24px 60px rgba(62, 50, 34, .16), 0 4px 12px rgba(62, 50, 34, .08);
  --focus: 0 0 0 3px rgba(168, 80, 11, .22);
}
[data-theme="light"] body {
  background:
    radial-gradient(circle at 12% -10%, rgba(201, 106, 9, .06), transparent 32rem),
    radial-gradient(circle at 92% 8%, rgba(201, 106, 9, .05), transparent 30rem),
    var(--bg);
}
[data-theme="light"] body::before { opacity: .05; }
[data-theme="light"] .hero::after { border-color: rgba(168, 80, 11, .12); box-shadow: none; }
[data-theme="light"] .brand-mark { color: #3d2503; background: linear-gradient(145deg, #f6d98f, #d98b16); }

/* Акцентные оттенки из тёмной темы теряются на белом фоне. */
[data-theme="light"] .rarity.common { color: #59636f; }
[data-theme="light"] .rarity.uncommon { color: #157f41; }
[data-theme="light"] .rarity.rare { color: #1a5fb4; }
[data-theme="light"] .rarity.special { color: #7539d4; }
[data-theme="light"] .rarity.unique { color: #b4530a; }
[data-theme="light"] .rarity.exclusive { color: #8a6710; }
[data-theme="light"] .rarity.legendary { color: #86660a; }
[data-theme="light"] .rarity.relic { color: #c0272d; }
[data-theme="light"] .probe-tag.unprobed { color: #b04430; }
[data-theme="light"] .probe-tag.probed { color: #147348; }
[data-theme="light"] .stream-card .price { color: #a8402c; }
[data-theme="light"] .mod-chip.range { color: #10643d; }
[data-theme="light"] .clan-medal-1 .clan-place,
[data-theme="light"] .clan-top.clan-medal-1 .faint:first-child { color: #8d6f16; }
[data-theme="light"] .clan-medal-2 .clan-place,
[data-theme="light"] .clan-top.clan-medal-2 .faint:first-child { color: #6b7482; }
[data-theme="light"] .clan-medal-3 .clan-place,
[data-theme="light"] .clan-top.clan-medal-3 .faint:first-child { color: #9a5a24; }
[data-theme="light"] .badge-tier.bronze { color: #8a5a3f; }
[data-theme="light"] .badge-tier.silver { color: #667382; }
[data-theme="light"] .badge-tier.gold { color: #8a6a25; }
[data-theme="light"] .badge-tier.platinum { color: #4f7480; }
[data-theme="light"] .badge-tier.diamond { color: #1f6b7a; }
[data-theme="light"] .plan-badge.plan-premium { color: #8a6425; }
[data-theme="light"] .plan-badge.plan-premium-plus { color: #7a4506; }
[data-theme="light"] .not-found-code { text-shadow: none; }
[data-theme="light"] .progress > i { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* Плотность: контент был слишком широким, а отступы — крупными. */
:root {
  --content-max: 1280px;
  --text-2xl: clamp(28px, 3.2vw, 40px);
}
#app { padding-top: 20px; padding-bottom: 40px; }
.page { gap: 14px; }
.grid { gap: 12px; }
.hero {
  min-height: 0;
  padding: clamp(20px, 2.4vw, 32px);
}
.hero h1 { max-width: 30ch; margin-bottom: 8px; }
.hero .muted { max-width: 82ch; line-height: 1.6; }
.live-hero { min-height: 0; }
.section-head { margin-top: 4px; }
.notice { padding: 12px 14px; }
.empty,
.loading-card { min-height: 118px; padding: 24px; }
.kpi { min-height: 116px; padding: 18px; }
th, td { padding: 11px 13px; }
.footer-inner { padding: 28px 0 22px; gap: 22px; }
.site-note { margin: 0 auto 18px; padding: 12px 15px; }

.item-tile { min-height: 208px; padding: 16px; }
.item-tile .name { margin-top: 10px; }
.item-tile {
  border-color: color-mix(in srgb, var(--text) 16%, var(--line));
}
.catalog-pager .ghost:disabled {
  opacity: .38;
  pointer-events: none;
}

/* Страница каталога — 30 карточек: 5×6 / 3×10 / 2×15 без одного хвоста. */
.item-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 1181px) {
  .item-grid > :last-child:nth-child(5n + 1) {
    grid-column: 1 / -1;
    max-width: 248px;
    width: 100%;
    justify-self: center;
  }
}
@media (max-width: 1180px) {
  .item-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .item-grid > :last-child:nth-child(4n + 1) {
    grid-column: 1 / -1;
    max-width: 248px;
    width: 100%;
    justify-self: center;
  }
}
@media (max-width: 900px) {
  .item-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .item-grid > :last-child {
    grid-column: auto;
    max-width: none;
    justify-self: stretch;
  }
  .item-grid > :last-child:nth-child(3n + 1) {
    grid-column: 1 / -1;
    max-width: 248px;
    width: 100%;
    justify-self: center;
  }
}
@media (max-width: 680px) {
  .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .item-grid > :last-child {
    grid-column: auto;
    max-width: none;
    justify-self: stretch;
  }
  .item-grid > :last-child:nth-child(2n + 1) {
    grid-column: 1 / -1;
    max-width: 248px;
    width: 100%;
    justify-self: center;
  }
}
.chart-box { min-height: 0; }
.clan-top { min-height: 148px; padding: 18px; }
.referral-card,
.clan-card { min-height: 0; }
.plan { min-height: 0; padding: 22px; }
.login-box { margin: 16px auto; padding: 18px; }
.cab-welcome { min-height: 0; padding: 22px; }
.settings-card { padding: 20px; }
.legal-body { padding: clamp(20px, 2.6vw, 34px); }
.radar-card { padding: 14px; }
/* min(): в узкой колонке (карточки на «Рынке») жёсткие 300px вылезали за край. */
.radar-right { min-width: min(300px, 100%); padding-left: 16px; }

/* Характеристики уходили под низ карточки, оставляя пустоту рядом с названием:
   на широком экране раскладываем карточку в две смысловые колонки. */
@media (min-width: 981px) {
  .radar-card.stream-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) minmax(196px, 26%);
    gap: 8px 14px;
    align-items: start;
  }
  .radar-card.stream-card > .radar-head { display: contents; }
  .radar-card.stream-card .radar-icon { grid-column: 1; grid-row: 1; width: 100%; min-width: 0; }
  .radar-card.stream-card .radar-main { grid-column: 2; grid-row: 1; }
  .radar-card.stream-card .radar-right {
    grid-column: 3;
    grid-row: 1 / 3;
    min-width: 0;
  }
  .radar-card.stream-card > .radar-stats {
    grid-column: 2;
    grid-row: 2;
    align-content: start;
  }
}

/* Пустые статусы рисовали одинокую стрелку из .profit::before. */
.profit:empty,
#l-hint:empty { display: none; }
.pill { justify-self: start; }

.not-found-page { min-height: 0; }
.not-found-hero { min-height: 260px; padding: clamp(24px, 4vw, 48px); gap: clamp(20px, 4vw, 52px); }
.not-found-content > .pill { justify-self: start; }

/* Пустая лента не должна держать высоту пяти карточек. */
.live-viewport.is-empty {
  height: auto;
  min-height: 0;
  max-height: none;
  contain: layout;
}
.live-viewport.is-empty .live-feed { padding: 8px; }
.live-viewport.is-empty .empty { min-height: 96px; }

@media (max-width: 1240px) {
  :root { --content-max: 1120px; }
}

@media (max-width: 980px) {
  #app { padding-top: 16px; }
  .hero { padding: clamp(18px, 3vw, 24px); }
  /* Без основной навигации распорка только ломала шапку на две строки,
     из-за чего sticky-фильтры уезжали под неё. */
  .topbar { flex-wrap: nowrap; gap: 8px; }
  .topbar > .spacer { display: none; }
  .brand { min-width: 0; }
  .top-actions { margin-left: auto; gap: 6px; }
}

@media (max-width: 680px) {
  :root { --topbar-h: 56px; }
  .topbar { padding-inline: 10px; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-name { font-size: 14px; }
  .top-actions select,
  .top-actions button,
  .top-actions .ghost,
  .top-actions .btn,
  .menu-btn { min-height: 36px; }
  .top-actions button,
  .menu-btn { min-width: 36px; }
  .top-actions .btn { padding: 8px 12px; }
  #region-sel { min-width: 0; max-width: 58px; padding-inline: 6px; }
}

@media (max-width: 680px) {
  #app { padding-bottom: 30px; }
  .hero { padding: 20px 16px; }
  .kpi { min-height: 104px; padding: 16px; }
  .item-tile { min-height: 196px; padding: 13px; }
  .plan { padding: 18px; }
  .login-box { margin: 14px auto; padding: 16px; }
  .cab-welcome { padding: 18px; }
  .settings-card { padding: 16px; }
  .radar-card { padding: 13px; }
  th, td { padding: 10px 11px; }
  .footer-inner { padding: 24px 0 18px; gap: 18px; }
}

/* ── Монитор в админке ────────────────────────────────────── */
.kpi-alarm {
  border-color: color-mix(in srgb, var(--red) 45%, var(--line));
  background: color-mix(in srgb, var(--red) 7%, var(--panel));
}
.admin-page a.kpi {
  display: grid;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.admin-page a.kpi:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 2px;
}
.kpi-alarm b { color: var(--red); }
.ops-attention { display: grid; gap: 10px; padding: 18px; }
.ops-attention h3 { margin: 0; }
.ops-attention h4 { margin: 6px 0 0; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.ops-attention p { margin: 0; }

/* ── Адаптив: узкие экраны и планшеты ─────────────────────── */

/* Пять колонок футера не влезали в планшет и обрезались справа. */
@media (max-width: 1000px) {
  .footer-inner { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .footer-brand { grid-column: 1 / -1; max-width: 560px; }
}

/* Таблицы шире экрана прокручиваются внутри своей рамки, а не рвут страницу. */
.table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.live-viewport > * { min-width: 0; }

/* Шапка на телефоне должна оставаться одной строкой: считаем каждый пиксель. */
@media (max-width: 480px) {
  .topbar { padding-inline: 10px; gap: 7px; }
  .top-actions { gap: 4px; }
  .top-actions select,
  .top-actions button,
  .top-actions .ghost,
  .top-actions .btn,
  .icon-btn,
  .menu-btn { min-height: 34px; }
  .top-actions button,
  .icon-btn,
  .menu-btn { width: 34px; min-width: 34px; height: 34px; padding: 0; }
  .top-actions .btn { padding: 7px 11px; font-size: 13px; }
  #region-sel { min-width: 0; max-width: 54px; padding-inline: 5px; font-size: 12px; }
  #user-box { min-width: 0; max-width: 44vw; gap: 4px; }
  #user-box .badge-tier,
  #user-box .btn.secondary { display: none; }
  .brand { gap: 7px; }
}

@media (max-width: 400px) {
  /* Логотип-марка остаётся ссылкой на главную, текст названия убираем. */
  .brand-name,
  .brand-sub { display: none; }
  .brand { gap: 0; }
  #user-box { max-width: 52vw; }
}

@media (min-width: 420px) {
  .login-box .oauth-stack { grid-template-columns: 1fr 1fr; }
}
.oauth-btn { min-height: 40px; }
.catalog-pager {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-elev);
}
.plan-lock {
  color: #ffd9a0;
  border: 1px solid rgba(245, 158, 11, 0.5);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.22), rgba(245, 158, 11, 0.08));
}
.calc-save { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.to-top {
  position: fixed;
  right: 16px;
  bottom: 78px;
  z-index: 40;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-solid);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}
.to-top[hidden] { display: none; }
