:root {
  --bg: #060808;
  --bg-glow: #0d1311;
  --surface: rgba(11, 14, 14, 0.78);
  --surface-raised: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.13);
  --ink: #eef2e8;
  --ink-2: #a4ac9e;
  --ink-3: #6a7267;
  --accent: #b4da45;
  --accent-hi: #cdf05e;
  --accent-ink: #0b0f05;
  --accent-soft: rgba(180, 218, 69, 0.12);
  --accent-line: rgba(180, 218, 69, 0.38);
  --panel-w: 392px;
  --gap: 16px;
  --radius: 14px;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

body { overflow: hidden; }

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.app {
  position: relative;
  height: 100vh;
  height: 100dvh;
}

/* ---------- Сцена с глобусом ---------- */

.stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(48% 62% at calc((100% - var(--panel-w)) / 2) 50%, var(--bg-glow) 0%, rgba(13, 19, 17, 0) 70%),
    radial-gradient(120% 90% at 50% 50%, #080b0a 0%, var(--bg) 70%);
}

.stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#overlay { cursor: grab; touch-action: none; }
#overlay.is-dragging { cursor: grabbing; }
#overlay.is-pointing { cursor: pointer; }

.brand {
  position: absolute;
  top: 22px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  user-select: none;
}

.brand-logo { width: 34px; height: 34px; color: var(--accent); filter: drop-shadow(0 0 10px rgba(180, 218, 69, 0.35)); }
.brand-title { font-weight: 800; font-size: 17px; letter-spacing: 0.02em; }
.brand-sub { color: var(--ink-2); font-size: 12.5px; }

.status {
  position: absolute;
  top: 24px;
  left: calc((100% - var(--panel-w) - 32px) / 2);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 12.5px;
  backdrop-filter: blur(12px);
  transition: opacity 0.5s, transform 0.5s;
  pointer-events: none;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(180, 218, 69, 0.6);
  animation: pulse 1.4s infinite;
}
.status.is-error .status-dot { background: #e0794f; animation: none; }
.status.is-hidden { opacity: 0; transform: translate(-50%, -8px); }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(180, 218, 69, 0.55); }
  100% { box-shadow: 0 0 0 9px rgba(180, 218, 69, 0); }
}

.hint {
  position: absolute;
  top: 66px;
  left: 24px;
  margin: 0;
  color: var(--ink-3);
  font-size: 12px;
  pointer-events: none;
}

/* ---------- Панель управления вращением ---------- */

.controls {
  position: absolute;
  bottom: 22px;
  left: calc((100% - var(--panel-w) - 32px) / 2);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  transition: background 0.2s, color 0.2s;
}
.icon-btn:hover { background: var(--surface-hover); color: var(--ink); }
.icon-btn svg { width: 19px; height: 19px; fill: currentColor; }

.icon-btn.play {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 22px rgba(180, 218, 69, 0.35);
}
.icon-btn.play:hover { background: var(--accent-hi); color: var(--accent-ink); }
.icon-btn.play .i-play { display: none; }
.icon-btn.play.is-paused .i-play { display: block; }
.icon-btn.play.is-paused .i-pause { display: none; }

.icon-btn.is-on { color: var(--accent); background: var(--accent-soft); }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.sm svg { width: 18px; height: 18px; }

.speed { display: flex; align-items: center; gap: 4px; }

.step-btn {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1;
}
.step-btn:hover { background: var(--surface-hover); color: var(--ink); }

.speed output {
  min-width: 46px;
  text-align: right;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink);
  padding-right: 4px;
}

input[type='range'] {
  --fill: 20%;
  -webkit-appearance: none;
  appearance: none;
  width: 116px;
  height: 22px;
  margin: 0 2px;
  background: transparent;
  cursor: pointer;
}
input[type='range']::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(to right, var(--accent) var(--fill), rgba(255, 255, 255, 0.12) var(--fill));
}
input[type='range']::-moz-range-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(to right, var(--accent) var(--fill), rgba(255, 255, 255, 0.12) var(--fill));
}
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--accent);
  box-shadow: 0 0 10px rgba(180, 218, 69, 0.5);
}
input[type='range']::-moz-range-thumb {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--accent);
  box-shadow: 0 0 10px rgba(180, 218, 69, 0.5);
}

.sep { width: 1px; height: 22px; background: var(--line-strong); margin: 0 2px; }

.chip {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.2s;
}
.chip:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.25); }
.chip.is-on { color: var(--ink); border-color: var(--accent-line); background: var(--accent-soft); }

/* ---------- Машина времени ---------- */

.timeline {
  position: absolute;
  bottom: 80px;
  left: calc((100% - var(--panel-w) - 32px) / 2);
  transform: translateX(-50%);
  width: min(680px, calc(100% - var(--panel-w) - 80px));
  padding: 12px 16px 10px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

.tl-tabs {
  display: flex;
  gap: 2px;
  margin: -6px -4px 10px;
  border-bottom: 1px solid var(--line);
}
.tl-tabs button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 700;
  transition: color 0.2s;
}
.tl-tabs button:hover { color: var(--ink-2); }
.tl-tabs button[aria-selected='true'] { color: var(--ink); }
.tl-tabs button[aria-selected='true']::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(180, 218, 69, 0.6);
}
.tl-tab-badge {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
}

.tl-summary { margin-top: 4px; color: var(--ink-3); font-size: 11.5px; }
.tl-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

.tl-order { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; margin-top: 12px; }
.tl-order > span:first-child { color: var(--ink-2); font-size: 12px; font-weight: 600; }
.tl-order-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px dashed var(--line-strong);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  cursor: default;
}
.tl-order-value svg { width: 13px; height: 13px; color: var(--ink-3); }
.tl-note { margin: 6px 0 0; color: var(--ink-3); font-size: 11.5px; }

.tl-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.tl-date { display: flex; flex-direction: column; min-width: 0; flex: 1 1 150px; }

.tl-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 8px;
}
.tl-speed { display: flex; align-items: center; gap: 8px; }
.tl-dur { color: var(--ink-3); font-family: var(--mono); font-size: 11px; white-space: nowrap; }
.tl-speed .tl-modes button { padding: 0 8px; min-width: 32px; }

.tl-modes {
  display: flex;
  flex: none;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.25);
}
.tl-modes button {
  height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
  transition: color 0.2s, background 0.2s;
}
.tl-modes button:hover { color: var(--ink); }
.tl-modes button[aria-pressed='true'] {
  color: var(--ink);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}
.tl-date b { font-size: 15px; font-weight: 800; white-space: nowrap; }
.tl-date small { color: var(--ink-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timeline.is-loading .tl-date b::after {
  content: '';
  display: inline-block;
  width: 7px; height: 7px;
  margin-left: 8px;
  vertical-align: middle;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1s infinite;
}
.tl-buttons { display: flex; align-items: center; gap: 2px; flex: none; }
.tl-buttons .chip { margin-left: 6px; }
.tl-play { color: var(--ink); }
.tl-play .i-play { display: none; }
.tl-play.is-paused .i-play { display: block; }
.tl-play.is-paused .i-pause { display: none; }

.tl-track {
  position: relative;
  height: 26px;
  cursor: pointer;
  touch-action: none;
  border-radius: 6px;
}
.tl-track svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tl-track .tl-base { stroke: rgba(255, 255, 255, 0.1); stroke-width: 1; }
.tl-track .tl-mark { stroke: var(--accent); stroke-width: 1; opacity: 0.25; }
.tl-track .tl-frame { stroke: var(--accent); stroke-width: 1.5; opacity: 0.9; }
.tl-thumb {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2px;
  margin-left: -1px;
  border-radius: 2px;
  background: var(--ink);
  box-shadow: 0 0 10px rgba(180, 218, 69, 0.8);
  pointer-events: none;
}
.tl-thumb::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  width: 14px;
  height: 14px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--accent);
}

.tl-years { position: relative; height: 16px; margin-top: 2px; }
.tl-years span {
  position: absolute;
  transform: translateX(-50%);
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 10px;
}

.tl-sync { margin-top: 4px; color: var(--ink-3); font-size: 11.5px; }
.tl-sync-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tl-sync-row > span:last-child:not(:first-child) { flex: none; }
.tl-sync-row b { color: var(--ink-2); font-weight: 600; }
.tl-num { flex: none; color: var(--ink); font-family: var(--mono); font-size: 11px; }

.tl-progress {
  position: relative;
  height: 4px;
  margin: 6px 0 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.tl-progress i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-radius: 4px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(180, 218, 69, 0.6);
  transition: width 0.6s ease;
}
.tl-progress.is-indeterminate i { width: 30%; animation: indeterminate 1.3s ease-in-out infinite; }
.tl-progress.thin { height: 2px; margin: 4px 0 6px; }
.tl-progress.thin i { box-shadow: none; opacity: 0.85; transition-duration: 0.45s; transition-timing-function: linear; }
.tl-file { margin-top: 2px; }
.tl-file .tl-sync-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
@keyframes indeterminate { from { left: -30%; } to { left: 100%; } }

/* Кольцо прогресса вокруг кнопки с часами, пока качается архив */
.hist-btn { position: relative; }
.icon-btn .hist-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  fill: none;
  display: none;
}
.hist-btn.is-syncing .hist-ring { display: block; }
.hist-ring circle { fill: none; stroke-width: 2; }
.hist-ring .ring-bg { stroke: rgba(255, 255, 255, 0.1); }
.hist-ring .ring-fg {
  stroke: var(--accent);
  stroke-linecap: round;
  filter: drop-shadow(0 0 3px rgba(180, 218, 69, 0.7));
  transition: stroke-dasharray 0.6s ease;
}
.hist-btn.is-listing .hist-ring { animation: ring-spin 1.2s linear infinite; }
.hist-btn.is-listing .ring-fg { stroke-dasharray: 22 78; }
@keyframes ring-spin { from { transform: rotate(-90deg); } to { transform: rotate(270deg); } }

.era {
  position: absolute;
  top: 20px;
  right: calc(var(--panel-w) + 48px);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}
.era b { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.era small { color: var(--accent); font-size: 12px; font-weight: 600; }

.tm-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  font-size: 12px;
}
.tm-banner b { display: block; font-size: 13px; }
.tm-banner span { color: var(--ink-2); }
.tm-banner .chip { flex: none; color: var(--ink); }

/* ---------- Подсказка при наведении ---------- */

.tip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  padding: 8px 11px;
  border-radius: 10px;
  background: rgba(8, 10, 10, 0.92);
  border: 1px solid var(--line-strong);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  font-size: 12.5px;
  white-space: nowrap;
}
.tip b { display: block; font-weight: 700; color: var(--ink); }
.tip span { color: var(--ink-2); font-family: var(--mono); font-size: 11.5px; }

/* ---------- Боковая панель ---------- */

.panel {
  position: absolute;
  top: var(--gap);
  right: var(--gap);
  bottom: var(--gap);
  width: var(--panel-w);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  backdrop-filter: blur(20px) saturate(1.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.card {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface-raised);
  border: 1px solid var(--line);
}

.card-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.card-title span { color: var(--ink-3); font-weight: 500; font-size: 11.5px; }

.sub-title {
  margin: 18px 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.sub-title span { color: var(--ink-3); font-weight: 500; }

/* Поиск и язык */

.panel-top { display: flex; gap: 8px; align-items: stretch; }
.search { position: relative; flex: 1; min-width: 0; }

.lang {
  display: flex;
  flex: none;
  padding: 3px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.35);
}
.lang button {
  min-width: 36px;
  padding: 0 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: color 0.2s, background 0.2s;
}
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed='true'] {
  color: var(--ink);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}

.search input {
  width: 100%;
  height: 44px;
  padding: 0 40px 0 40px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.35);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search input::placeholder { color: var(--ink-3); }
.search input:focus { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }

.search-icon {
  position: absolute;
  left: 13px;
  top: 12px;
  width: 20px;
  height: 20px;
  color: var(--ink-3);
  pointer-events: none;
}

.search kbd {
  position: absolute;
  right: 12px;
  top: 12px;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  border: 1px solid var(--line-strong);
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11px;
}

.search-list {
  position: absolute;
  z-index: 10;
  top: 50px;
  left: 0;
  right: 0;
  max-height: min(380px, 60vh);
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 12px;
  background: #0c0f0f;
  border: 1px solid var(--line-strong);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  scrollbar-width: thin;
}

.search-list li {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.search-list li.is-active, .search-list li:hover { background: var(--surface-hover); }
.search-list li.is-selected .nm { color: var(--accent); }
.search-list .rk { color: var(--ink-3); font-family: var(--mono); font-size: 11px; }
.search-list .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-list .sh { color: var(--ink-2); font-family: var(--mono); font-size: 11.5px; }
.search-list .empty { display: block; color: var(--ink-3); cursor: default; }
.search-list .empty:hover { background: none; }

/* Рейтинги и полосы */

.rank-list, .bar-list, .isp-list { margin: 0; padding: 0; list-style: none; }

.rank-list button {
  width: 100%;
  display: grid;
  grid-template-columns: 22px 1fr 64px;
  grid-template-rows: auto 3px;
  column-gap: 8px;
  row-gap: 5px;
  align-items: center;
  padding: 7px 8px;
  margin: 0 -8px;
  width: calc(100% + 16px);
  border: 0;
  border-radius: 9px;
  background: transparent;
  text-align: left;
}
.rank-list button:hover { background: var(--surface-hover); }
.rank-list .rk { grid-row: 1 / 3; color: var(--ink-3); font-family: var(--mono); font-size: 11px; }
.rank-list .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-list .val { text-align: right; font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.rank-list .bar { grid-column: 2 / 4; }

.bar { position: relative; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.bar i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.6s cubic-bezier(.2, .8, .2, 1);
}

.bar-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 5px;
  margin-bottom: 9px;
  font-size: 12.5px;
}
.bar-list li span { color: var(--ink-2); }
.bar-list li b { font-family: var(--mono); font-weight: 500; font-size: 12px; }
.bar-list li .bar { grid-column: 1 / 3; }

.skeleton {
  height: 26px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255,255,255,0.03), rgba(255,255,255,0.07), rgba(255,255,255,0.03));
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* Ключевые цифры */

.hero { display: flex; flex-direction: column; gap: 2px; }
.hero-value {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.hero-value small { font-size: 20px; font-weight: 700; color: var(--ink-2); margin-left: 4px; }
.hero-label { color: var(--ink-2); font-size: 12.5px; }

.kv {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 14px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--line);
}
.kv > div { background: #0d1010; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.kv span { color: var(--ink-3); font-size: 11.5px; }
.kv b { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kv i { font-style: normal; color: var(--ink-2); font-size: 11.5px; }

/* График */

.chart-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 18px 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
}
.chart-readout { font-family: var(--mono); font-weight: 400; font-size: 11.5px; color: var(--ink); }

.chart { height: 132px; position: relative; }
.chart svg { display: block; overflow: visible; }
.chart .grid line { stroke: rgba(255, 255, 255, 0.06); }
.chart .grid text, .chart .x-axis text { fill: var(--ink-3); font-family: var(--mono); font-size: 10px; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.chart .cursor line { stroke: rgba(255, 255, 255, 0.35); stroke-dasharray: 2 3; }
.chart .cursor circle { fill: var(--accent); stroke: #0d1010; stroke-width: 2; }

/* Карточка страны */

.country { border-color: var(--accent-line); background: linear-gradient(180deg, rgba(180, 218, 69, 0.07), rgba(180, 218, 69, 0.015) 140px); }

.cc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.cc-eyebrow { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 12px; }
.cc-code {
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
}
.cc-name { margin: 4px 0 0; font-size: 24px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; }
.cc-note { margin: 10px 0 0; color: var(--ink-2); font-size: 12.5px; }
.country .icon-btn { width: 32px; height: 32px; flex: none; font-size: 20px; line-height: 1; }

.isp-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  row-gap: 5px;
  column-gap: 10px;
  margin-bottom: 10px;
  font-size: 12.5px;
}
.isp-list .isp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.isp-list b { font-family: var(--mono); font-weight: 500; font-size: 11.5px; color: var(--ink-2); }
.isp-list .bar { grid-column: 1 / 3; }

/* Подвал */

.foot { padding: 4px 6px 2px; color: var(--ink-3); font-size: 11.5px; }
.foot p { margin: 0 0 6px; }
.foot a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.foot a:hover { color: var(--accent); border-color: var(--accent-line); }
.dot-sep { margin: 0 6px; }
.foot-legal { margin-top: 10px !important; padding-top: 10px; border-top: 1px solid var(--line); }

/* ---------- Мобильная раскладка ---------- */

@media (max-width: 959px) {
  :root { --panel-w: 0px; }
  body { overflow: auto; }
  .app { height: auto; }
  .stage { position: relative; height: 72vh; height: 72svh; min-height: 420px; }
  .status, .controls, .timeline { left: 50%; }
  .status { top: 76px; }
  .timeline { width: calc(100% - 24px); bottom: 72px; padding: 10px 12px 8px; }
  .era { top: 70px; right: auto; left: 16px; align-items: flex-start; }
  .era b { font-size: 22px; }
  .hint { display: none; }
  .panel {
    position: relative;
    inset: auto;
    width: auto;
    margin: 0 12px 16px;
    overflow: visible;
    backdrop-filter: none;
    background: #0b0e0e;
  }
}

@media (max-width: 520px) {
  .brand { top: 16px; left: 16px; }
  .controls { bottom: 14px; gap: 4px; padding: 6px; }
  .controls .chip { display: none; }
  .controls .sep { display: none; }
  input[type='range'] { width: 84px; }
  .hero-value { font-size: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .status-dot, .skeleton, .tl-progress i, .hist-ring { animation: none !important; }
}
