:root {
  --bg: #eef2f5;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --surface-sub: #f5f7f9;

  --navy: #0e1e21;
  --navy-2: #162e32;
  --ink: #0f191c;
  --ink-2: #3c4c51;
  --muted: #6c7c82;
  --line: rgba(15, 25, 28, 0.08);
  --line-strong: rgba(15, 25, 28, 0.14);

  /* Цвета выборов и мест */
  --gold: #c68816;
  --gold-bright: #e6ab35;
  --gold-soft: rgba(198, 136, 22, 0.13);
  --silver: #3f6d9e;
  --silver-soft: rgba(63, 109, 158, 0.12);
  --bronze: #b36234;
  --bronze-soft: rgba(179, 98, 52, 0.12);
  --other: #cbd5dc;

  --live: #c91d3b;
  --live-soft: rgba(201, 29, 59, 0.11);
  --pine: #117a56;
  --pine-soft: rgba(17, 122, 86, 0.12);

  --font-ui: 'Golos Text', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.25, 0.9, 0.3, 1.06);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

body.sheet-open {
  overflow: hidden;
}

.ic {
  width: 18px;
  height: 18px;
  display: block;
  flex: none;
}

/* ---------- Сдержанный зимний арктический фон ---------- */
.frost-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(90% 45% at 8% 0%, rgba(17, 122, 86, 0.09) 0%, transparent 65%),
    radial-gradient(80% 40% at 96% 4%, rgba(198, 136, 22, 0.11) 0%, transparent 65%),
    linear-gradient(180deg, #f3f6f8 0%, #eaeff3 100%);
}

/* ---------- Верхняя полоса эфира ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px 6px;
  background: linear-gradient(180deg, rgba(238, 242, 245, 0.94) 68%, rgba(238, 242, 245, 0) 100%);
}

.topbar-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px 8px 11px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 22px rgba(14, 30, 33, 0.07), inset 0 1px 0 #ffffff;
}

.tb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.tb-emblem {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  flex: none;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--navy-2), var(--navy));
  color: var(--gold-bright);
  box-shadow: 0 4px 12px rgba(14, 30, 33, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.tb-emblem .ic {
  width: 19px;
  height: 19px;
}

.tb-meta {
  min-width: 0;
}

.tb-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.tb-title {
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
  white-space: nowrap;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--live-soft);
  color: var(--live);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live);
  animation: pulseLive 1.6s ease-in-out infinite;
}

@keyframes pulseLive {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.75); }
}

.tb-time {
  margin-top: 1px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tb-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.tb-btn {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--navy);
  display: grid;
  place-items: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.14s var(--ease), background 0.16s ease;
}

.tb-btn .ic {
  width: 16px;
  height: 16px;
}

.tb-btn:active {
  transform: scale(0.92);
}

.tb-btn.spinning .ic {
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Основной контейнер ---------- */
.container {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  padding: 6px 12px 24px;
}

.view {
  display: none;
  flex-direction: column;
  gap: 12px;
  animation: viewIn 0.2s var(--ease) both;
}

.view.active {
  display: flex;
}

@keyframes viewIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Компактный баннер ЦИК ---------- */
.cec-banner {
  border-radius: 20px;
  padding: 14px 15px;
  background:
    radial-gradient(95% 110% at 100% 0%, rgba(230, 171, 53, 0.20) 0%, transparent 62%),
    radial-gradient(85% 90% at 0% 100%, rgba(17, 122, 86, 0.22) 0%, transparent 64%),
    linear-gradient(148deg, var(--navy-2) 0%, var(--navy) 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 30px rgba(14, 30, 33, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.cec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cec-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.cec-pages-txt {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #f7d688;
}

.cec-progress {
  margin: 8px 0 12px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.cec-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #34d399 0%, #e6ab35 100%);
  transition: width 0.5s var(--ease);
}

.cec-stats {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 4px;
}

.cec-stat {
  text-align: center;
}

.cs-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
}

.cs-num.gold {
  color: #f7d688;
}

.cs-num.muted {
  color: rgba(255, 255, 255, 0.72);
}

.cs-lbl {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.62);
}

.cec-div {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.14);
}

/* ---------- Поиск и категории ---------- */
.controls-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 10px 0 13px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  box-shadow: 0 3px 12px rgba(14, 30, 33, 0.04);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.search-field:focus-within {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(14, 30, 33, 0.08);
}

.sf-ic {
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.search-field input::placeholder {
  color: var(--muted);
}

.sf-clear {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 0;
  background: var(--surface-sub);
  color: var(--ink-2);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.sf-clear .ic {
  width: 14px;
  height: 14px;
}

.cat-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 1px 0 3px;
}

.cat-pills::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink-2);
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s var(--ease);
}

.cat-pill .ic {
  width: 14px;
  height: 14px;
  opacity: 0.78;
}

.cat-pill:active {
  transform: scale(0.96);
}

.cat-pill.active {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
  box-shadow: 0 5px 14px rgba(14, 30, 33, 0.18);
}

.cat-pill.active .ic {
  color: var(--gold-bright);
  opacity: 1;
}

.cat-cnt {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  opacity: 0.65;
}

/* ---------- Мгновенное досье кандидата при поиске ---------- */
.dossier-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.dossier-card {
  border-radius: 18px;
  padding: 13px 14px;
  background: #ffffff;
  border: 1px solid rgba(198, 136, 22, 0.34);
  box-shadow: 0 8px 22px rgba(14, 30, 33, 0.07);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.dc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dc-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--navy);
  overflow-wrap: anywhere;
}

.dc-total {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--navy);
  color: #f7d688;
}

.dc-row {
  padding: 9px 11px;
  border-radius: 12px;
  background: var(--surface-sub);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.dc-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dc-nom {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.dc-rank {
  flex: none;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  color: var(--navy);
}

/* ---------- Карточка номинации на Табло ---------- */
.board-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.nom-card {
  position: relative;
  border-radius: 20px;
  padding: 14px 14px 12px;
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(14, 30, 33, 0.06), 0 1px 2px rgba(14, 30, 33, 0.04);
  display: flex;
  flex-direction: column;
  gap: 11px;
  cursor: pointer;
  transition: transform 0.14s var(--ease), box-shadow 0.18s ease;
}

.nom-card:active {
  transform: scale(0.988);
}

.nom-card.is-tight {
  border-color: rgba(201, 29, 59, 0.28);
  box-shadow: 0 8px 24px rgba(201, 29, 59, 0.08), 0 1px 2px rgba(14, 30, 33, 0.04);
}

.nc-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.nc-title-wrap {
  min-width: 0;
  flex: 1;
}

.nc-title {
  font-size: 15.5px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.nc-sub {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
}

.nc-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(15, 25, 28, 0.25);
}

.nc-verified {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--pine);
  font-weight: 700;
}

.nc-verified .ic {
  width: 12px;
  height: 12px;
}

.nc-right {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.nc-total-num {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}

.nc-total-lbl {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

.tight-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--live-soft);
  color: var(--live);
}

/* Многоцветная шкала распределения голосов (Stacked Election Bar) */
.stack-bar {
  height: 8px;
  border-radius: 99px;
  background: rgba(15, 25, 28, 0.07);
  overflow: hidden;
  display: flex;
  gap: 2px;
}

.sb-seg {
  height: 100%;
  min-width: 4px;
  transition: width 0.45s var(--ease);
}

.sb-seg:first-child { border-radius: 99px 0 0 99px; }
.sb-seg:last-child { border-radius: 0 99px 99px 0; }
.sb-seg:only-child { border-radius: 99px; }

.sb-1 { background: linear-gradient(90deg, var(--gold-bright), var(--gold)); }
.sb-2 { background: var(--silver); }
.sb-3 { background: var(--bronze); }
.sb-other { background: var(--other); }

/* Таблица Топ-3 внутри карточки */
.top3-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.t3-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 12px;
  background: var(--surface-sub);
  border: 1px solid transparent;
}

.t3-row.r1 {
  background: linear-gradient(90deg, rgba(230, 171, 53, 0.14) 0%, rgba(255, 255, 255, 0.7) 100%);
  border-color: rgba(198, 136, 22, 0.24);
}

.t3-rank {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  background: rgba(15, 25, 28, 0.08);
  color: var(--ink-2);
}

.t3-row.r1 .t3-rank { background: var(--gold); color: #ffffff; }
.t3-row.r2 .t3-rank { background: var(--silver); color: #ffffff; }
.t3-row.r3 .t3-rank { background: var(--bronze); color: #ffffff; }

.t3-main {
  min-width: 0;
}

.t3-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.t3-row.r1 .t3-name {
  font-weight: 800;
  color: var(--navy);
}

.t3-gap {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
}

.t3-gap.lead { color: var(--pine); font-weight: 700; }
.t3-gap.tie { color: var(--live); font-weight: 700; }
.t3-gap.chase { color: var(--gold); font-weight: 700; }

.t3-nums {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.t3-v {
  display: block;
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.05;
  color: var(--navy);
}

.t3-p {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

/* Подвал карточки номинации */
.nc-foot {
  padding-top: 8px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}

.nc-foot-action {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--navy);
  font-weight: 700;
}

.nc-foot-action .ic {
  width: 15px;
  height: 15px;
}

/* ---------- Сегментный переключатель (для Гонок и Протокола) ---------- */
.seg-control {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 4px;
  border-radius: 14px;
  background: rgba(14, 30, 33, 0.08);
  border: 1px solid var(--line);
}

.seg-glider {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / 2);
  border-radius: 10px;
  background: var(--navy);
  box-shadow: 0 4px 12px rgba(14, 30, 33, 0.18);
  transform: translateX(calc(var(--idx, 0) * 100%));
  transition: transform 0.24s var(--ease);
  z-index: 1;
}

.seg-btn {
  position: relative;
  z-index: 2;
  border: 0;
  background: transparent;
  padding: 9px 8px;
  border-radius: 10px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  cursor: pointer;
  transition: color 0.18s ease;
}

.seg-btn.active {
  color: #ffffff;
}

.sub-pane {
  display: none;
  flex-direction: column;
  gap: 10px;
}

.sub-pane.active {
  display: flex;
}

/* ---------- Карточки плотных гонок (Дуэли) ---------- */
.duel-card {
  border-radius: 18px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(14, 30, 33, 0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
}

.duel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.duel-nom {
  font-size: 14px;
  font-weight: 800;
  color: var(--navy);
}

.duel-badge {
  flex: none;
  padding: 3px 8px;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  background: var(--live-soft);
  color: var(--live);
}

.duel-badge.top3 {
  background: var(--silver-soft);
  color: var(--silver);
}

.duel-sides {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.duel-side.right {
  text-align: right;
}

.ds-pos {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
}

.ds-name {
  margin-top: 2px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.ds-votes {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
}

.duel-vs {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  padding: 4px 6px;
  border-radius: 8px;
  background: var(--surface-sub);
}

.tug-bar {
  height: 9px;
  border-radius: 99px;
  background: var(--surface-sub);
  overflow: hidden;
  display: flex;
  gap: 2px;
}

.tug-l { background: linear-gradient(90deg, var(--gold-bright), var(--gold)); height: 100%; }
.tug-r { background: var(--silver); height: 100%; }
.tug-r.bronze { background: var(--bronze); }

.duel-foot {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-2);
}

/* ---------- Сводная таблица 25 лидеров ---------- */
.winners-group {
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(14, 30, 33, 0.05);
}

.wg-head {
  padding: 10px 14px;
  background: var(--surface-sub);
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.wg-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.wg-row:last-child {
  border-bottom: 0;
}

.wg-nom {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.wg-leader {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 800;
  color: var(--navy);
}

.wg-right {
  text-align: right;
  font-family: var(--font-mono);
}

.wg-v {
  font-size: 14px;
  font-weight: 800;
  color: var(--navy);
}

.wg-m {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 700;
  color: var(--pine);
}

.wg-m.tie {
  color: var(--live);
}

/* ---------- Протокол ЦИК ---------- */
.card {
  border-radius: 18px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(14, 30, 33, 0.05);
}

.proto-title {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--navy);
}

.proto-sub {
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-2);
}

.proto-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.proto-cell {
  padding: 10px 11px;
  border-radius: 12px;
  background: var(--surface-sub);
  border: 1px solid var(--line);
}

.proto-cell b {
  display: block;
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 800;
  color: var(--navy);
}

.proto-cell span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.proto-list {
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
}

.proto-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}

.proto-item:last-child {
  border-bottom: 0;
}

.proto-item a {
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
}

.proto-meta {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
}

.proto-tag {
  flex: none;
  padding: 3px 8px;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  background: var(--pine-soft);
  color: var(--pine);
}

.proto-tag.rej {
  background: var(--live-soft);
  color: var(--live);
}

/* ---------- Детальная шторка номинации (Bottom Sheet) ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(14, 30, 33, 0.48);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet-backdrop[hidden] {
  display: none !important;
}

.sheet {
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  background: #f5f7f9;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -16px 48px rgba(14, 30, 33, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: sheetUp 0.24s var(--ease) both;
}

@keyframes sheetUp {
  from { transform: translateY(36px); opacity: 0.4; }
  to { transform: none; opacity: 1; }
}

.sheet-grab {
  width: 38px;
  height: 4px;
  border-radius: 99px;
  background: rgba(15, 25, 28, 0.16);
  margin: 9px auto 2px;
  flex: none;
}

.sheet-head {
  padding: 10px 14px 12px 16px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex: none;
}

.sheet-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
}

.sheet-title {
  margin: 3px 0 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.sheet-close {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface-sub);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
}

.sheet-body {
  padding: 14px 14px calc(24px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sheet-overview {
  padding: 13px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sheet-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.leg-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.leg-dot {
  width: 8px;
  height: 8px;
  border-radius: 3px;
}

/* Полная строка кандидата в шторке */
.full-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.fc-row {
  padding: 11px 12px;
  border-radius: 15px;
  background: #ffffff;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 7px;
  cursor: pointer;
}

.fc-row.r1 { border-color: rgba(198, 136, 22, 0.42); background: linear-gradient(155deg, #fffdf7, #ffffff); }
.fc-row.r2 { border-color: rgba(63, 109, 158, 0.30); }
.fc-row.r3 { border-color: rgba(179, 98, 52, 0.28); }
.fc-row.is-zero { opacity: 0.64; }

.fc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fc-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.fc-name {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--navy);
  overflow-wrap: anywhere;
}

.fc-meta {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
}

.fc-right {
  flex: none;
  text-align: right;
  font-family: var(--font-mono);
}

.fc-v {
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  color: var(--navy);
}

.fc-p {
  margin-top: 2px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
}

.fc-track {
  height: 5px;
  border-radius: 99px;
  background: rgba(15, 25, 28, 0.07);
  overflow: hidden;
}

.fc-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--pine);
}

.fc-row.r1 .fc-fill { background: linear-gradient(90deg, var(--gold-bright), var(--gold)); }
.fc-row.r2 .fc-fill { background: var(--silver); }
.fc-row.r3 .fc-fill { background: var(--bronze); }

.delta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.d-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 7px;
  background: var(--surface-sub);
  color: var(--ink-2);
}

.d-tag.lead { background: var(--pine-soft); color: var(--pine); }
.d-tag.tie { background: var(--live-soft); color: var(--live); }
.d-tag.to1 { background: var(--gold-soft); color: #915f08; }
.d-tag.to3 { background: var(--live-soft); color: var(--live); }
.d-tag.safe3 { background: var(--silver-soft); color: var(--silver); }

/* Линия отсечки Топ-3 */
.top3-cutoff {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.top3-cutoff::before,
.top3-cutoff::after {
  content: "";
  flex: 1;
  height: 1px;
  border-top: 1.5px dashed rgba(15, 25, 28, 0.22);
}

.sheet-hint {
  text-align: center;
  font-size: 11.5px;
  color: var(--muted);
  padding-top: 2px;
}

.empty-box {
  padding: 22px 14px;
  border-radius: 18px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
}

/* ---------- Нижняя панель навигации (3 раздела, тёмное стекло) ---------- */
.dock {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
  max-width: 440px;
  margin: 0 auto;
  z-index: 80;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 5px;
  border-radius: 20px;
  background: rgba(14, 30, 33, 0.90);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 34px rgba(14, 30, 33, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.dock-glider {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: calc((100% - 10px) / 3);
  border-radius: 15px;
  background: linear-gradient(180deg, #f3c458 0%, #d49622 100%);
  box-shadow: 0 4px 14px rgba(212, 150, 34, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transform: translateX(calc(var(--idx, 0) * 100%));
  transition: transform 0.26s var(--ease);
  z-index: 1;
  pointer-events: none;
}

.dock-btn {
  position: relative;
  z-index: 2;
  border: 0;
  background: transparent;
  padding: 8px 6px;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: rgba(255, 255, 255, 0.74);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.18s ease, transform 0.12s var(--ease);
}

.dock-btn .ic {
  width: 18px;
  height: 18px;
}

.dock-btn:active {
  transform: scale(0.95);
}

.dock-btn.active {
  color: #161105;
  font-weight: 800;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(86px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 14px);
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  padding: 9px 15px;
  border-radius: 12px;
  background: var(--navy);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 10px 26px rgba(14, 30, 33, 0.30);
  transition: opacity 0.2s ease, transform 0.2s var(--ease);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none !important; }
}
