/* Сутки за окном. Сначала телефон: одна лента, разделы снизу; от 900 px — плеер слева, графики справа. */
:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --surface-2: #f2f1ed;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --ring: rgba(11, 11, 11, 0.10);
  --accent: #2a78d6;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #008300; --s7: #4a3aa7; --s8: #e34948;
  --band-civil: #f1f0ec; --band-naut: #e8e7e2; --band-astro: #dfded8; --band-night: #d6d5ce;
  --cursor: #0b0b0b;
  --pin: #eb6834;
  --stage: #111110;
  --radius: 10px;
  --fast: 120ms;
  --top-h: 52px;
  --nav-h: 58px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d; --surface: #1a1a19; --surface-2: #222220;
    --ink: #ffffff; --ink-2: #c3c2b7; --muted: #898781;
    --grid: #2c2c2a; --axis: #383835; --ring: rgba(255, 255, 255, 0.10);
    --accent: #3987e5;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
    --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
    --band-civil: #1f1f1e; --band-naut: #151514; --band-astro: #111110; --band-night: #0b0b0b;
    --cursor: #ffffff; --pin: #d95926;
  }
}
:root[data-theme="dark"], .player.full {
  color-scheme: dark;
  --page: #0d0d0d; --surface: #1a1a19; --surface-2: #222220;
  --ink: #ffffff; --ink-2: #c3c2b7; --muted: #898781;
  --grid: #2c2c2a; --axis: #383835; --ring: rgba(255, 255, 255, 0.10);
  --accent: #3987e5;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  --band-civil: #1f1f1e; --band-naut: #151514; --band-astro: #111110; --band-night: #0b0b0b;
  --cursor: #ffffff; --pin: #d95926;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: var(--page);
  color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-bottom: calc(var(--nav-h) + var(--safe-b));
}
body.locked { overflow: hidden; }
button, select, input { font: inherit; color: inherit; }
button {
  background: var(--surface); border: 1px solid var(--ring); border-radius: 8px;
  padding: 6px 12px; cursor: pointer; transition: background var(--fast); -webkit-tap-highlight-color: transparent;
}
button:hover { background: var(--surface-2); }
button:focus-visible, a:focus-visible, select:focus-visible, .scrub:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
select { background: var(--surface); border: 1px solid var(--ring); border-radius: 8px; padding: 6px 8px; }
a { color: var(--accent); }
code { font-size: .92em; }
.hint { color: var(--muted); font-size: 13px; margin: 0 0 6px; }
.fill { fill: currentColor; stroke: none; }

/* ---------- шапка ---------- */
.topbar {
  display: flex; align-items: center; gap: 12px; height: 48px;
  padding: 0 8px 0 16px; background: var(--surface); border-bottom: 1px solid var(--ring);
}
.brand { font-size: 17px; margin: 0; font-weight: 650; letter-spacing: -.01em; }
.brand a { color: inherit; text-decoration: none; }
.topnav { display: none; }
.icon-btn {
  width: 40px; height: 40px; padding: 0; border: none; background: transparent; border-radius: 10px;
  display: grid; place-items: center; font-size: 20px; line-height: 1; flex: none;
}
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }
#theme { margin-left: auto; }

/* ---------- нижняя панель разделов (телефон) ---------- */
.botnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--ring);
}
.botnav a {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); text-decoration: none; font-size: 11px; line-height: 1.1; -webkit-tap-highlight-color: transparent;
}
.botnav a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 2px; }
.botnav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.botnav a.active { color: var(--accent); font-weight: 600; }

/* ---------- раздел «Сутки» ---------- */
.sec { scroll-margin-top: 0; }
/* телефон: первым экраном — кадр, время и полоса суток; пояснение ниже */
.watch { display: grid; grid-template-areas: "player" "lede" "story"; grid-template-columns: minmax(0, 1fr); }
.lede { grid-area: lede; margin: 14px 16px 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.45; }
.lede-wide { display: none; }

.player { grid-area: player; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.player > .timebar, .player > .scrub, .player > .steps, .player > .layers, .player > .exif { padding-left: 16px; padding-right: 16px; }

.viewer {
  position: relative; overflow: hidden; background: var(--stage);
  /* шапка 48 + время 56 + полоса 71 + нижняя панель 58 + зазоры: полоса суток видна без прокрутки */
  height: clamp(300px, calc(100vh - 300px), 170vw); height: clamp(300px, calc(100svh - 262px), 170vw);
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.viewer.zoomed, .player.full .viewer, #gviewer { touch-action: none; }
.viewer.zoomed { cursor: grab; }
.viewer.dragging { cursor: grabbing; }
.stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.stage img, .stage svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.stage img.hidden { visibility: hidden; }
.stage svg { overflow: visible; pointer-events: none; }
.vload {
  position: absolute; left: 50%; bottom: 10px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .25); border-top-color: #fff; opacity: 0; transition: opacity 200ms;
  animation: spin .8s linear infinite; pointer-events: none;
}
.vload.on { opacity: 1; transition-delay: 250ms; }
@keyframes spin { to { transform: rotate(360deg); } }

.vbtns { position: absolute; right: 8px; top: 8px; display: flex; flex-direction: column; gap: 6px; }
.vbtn, .vfit, .vclose {
  background: rgba(20, 20, 20, .62); color: #fff; border: 1px solid rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.vbtn { width: 40px; height: 40px; padding: 0; border-radius: 10px; font-size: 22px; line-height: 1; display: grid; place-items: center; }
.vbtn:hover, .vfit:hover, .vclose:hover { background: rgba(40, 40, 40, .8); }
.vbtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.vfit { position: absolute; left: 8px; top: 8px; border-radius: 999px; padding: 7px 14px; font-size: 13px; }
.vclose { display: none; position: absolute; left: 8px; top: 8px; width: 40px; height: 40px; padding: 0; border-radius: 10px; font-size: 18px; }
.bigplay {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 10px; padding: 14px 22px 14px 18px; border-radius: 999px;
  background: rgba(15, 15, 15, .72); color: #fff; border: 1px solid rgba(255, 255, 255, .22); font-size: 16px; font-weight: 600;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); white-space: nowrap;
}
.bigplay:hover { background: rgba(30, 30, 30, .85); }
.bigplay[hidden] { display: none; }
.vflash {
  position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%;
  background: rgba(0, 0, 0, .55); display: grid; place-items: center; color: #fff; opacity: 0; pointer-events: none;
}
.vflash.show { animation: flash 600ms ease-out; }
@keyframes flash { 0% { opacity: 1; transform: scale(.85); } 100% { opacity: 0; transform: scale(1.15); } }
.vhint {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); max-width: calc(100% - 24px);
  background: rgba(0, 0, 0, .75); color: #fff; font-size: 13px; padding: 6px 12px; border-radius: 8px;
  opacity: 0; transition: opacity 200ms; pointer-events: none; text-align: center;
}
.vhint.show { opacity: 1; }

/* значок «пуск / пауза» */
.tri { display: inline-block; width: 0; height: 0; border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent currentColor; margin-left: 3px; }
.playing .tri { width: 12px; height: 14px; border: 0 solid currentColor; border-left-width: 4px; border-right-width: 4px; margin-left: 0; }

.timebar { display: flex; align-items: center; gap: 12px; }
.play-btn {
  width: 48px; height: 48px; border-radius: 50%; padding: 0; flex: none; display: grid; place-items: center;
  background: var(--ink); color: var(--page); border: none;
}
.play-btn:hover { background: var(--ink-2); }
.clock { min-width: 0; line-height: 1.15; }
.clock b { display: block; font-size: 27px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.clock span { display: block; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.speed { margin-left: auto; flex: none; }
.speed select { padding: 6px 4px; font-size: 13px; }

/* полоса времени: цвет неба в каждом кадре, ручка — выбранный кадр */
.scrub { touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer; outline-offset: 4px; }
.scrub-marks { position: relative; height: 16px; }
.scrub-mark {
  position: absolute; bottom: 1px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%;
  border: 2px solid var(--page); background: var(--c, var(--ink-2)); padding: 0;
}
.scrub-track { position: relative; height: 38px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--ring); }
.scrub-track img { display: block; width: 100%; height: 100%; border-radius: 8px; object-fit: fill; pointer-events: none; }
.scrub-handle { position: absolute; top: -5px; bottom: -5px; left: 0; width: 0; pointer-events: none; }
.scrub-handle::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -2px; width: 4px; border-radius: 2px;
  background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .55), 0 1px 4px rgba(0, 0, 0, .45);
}
.scrub-tip {
  position: absolute; bottom: calc(100% + 22px); left: 0; transform: translateX(-50%);
  background: var(--ink); color: var(--page); font-size: 13px; font-weight: 600; padding: 3px 8px; border-radius: 6px;
  white-space: nowrap; opacity: 0; transition: opacity var(--fast); font-variant-numeric: tabular-nums;
}
.scrub.dragging .scrub-tip { opacity: 1; }
.scrub-hours { position: relative; height: 17px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.scrub-hours span { position: absolute; top: 2px; transform: translateX(-50%); }

.steps, .layers { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.steps::-webkit-scrollbar, .layers::-webkit-scrollbar { display: none; }
.steps button { flex: 1 1 auto; min-height: 38px; padding: 6px 6px; font-size: 13.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 12px;
  border-radius: 999px; font-size: 13.5px; white-space: nowrap;
}
.chip[aria-pressed="false"] { color: var(--muted); background: transparent; }
.chip[aria-pressed="false"] .lk { opacity: .35; }
.chip.more { display: none; }
.layers.open .chip.more { display: inline-flex; }
.chip-more { color: var(--ink-2); border-style: dashed; }
.lk { display: inline-block; width: 14px; height: 10px; border: 2px solid var(--c); border-radius: 3px; flex: none; }
.lk.round { border-radius: 50%; width: 12px; height: 12px; }
.lk.line { height: 0; border-width: 2.5px 0 0; border-radius: 2px; width: 16px; }
.lk.dash { height: 0; border-width: 2px 0 0; border-style: dashed; width: 16px; }
.exif { margin: 0; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* мини-кадр, пока листаются графики (телефон) */
.mini {
  position: fixed; right: 12px; bottom: calc(var(--nav-h) + var(--safe-b) + 12px); z-index: 25;
  width: 86px; aspect-ratio: 2400 / 4240; padding: 0; border-radius: 10px; overflow: hidden;
  border: 2px solid var(--surface); background: var(--stage); box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
  opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity 180ms, transform 180ms;
}
.mini.show { opacity: 1; transform: none; pointer-events: auto; }
.mini img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mini span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 0; background: rgba(0, 0, 0, .62); color: #fff;
  font-size: 12.5px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums;
}

/* полный экран: весь плеер поверх страницы, тёмный */
.player.full {
  position: fixed; inset: 0; z-index: 50; background: #000; color: var(--ink); height: 100%;
  gap: 6px; padding-bottom: calc(8px + var(--safe-b));
}
.player.full .viewer { flex: 1 1 auto; height: auto; min-height: 0; border-radius: 0; }
.player.full .vclose { display: grid; place-items: center; }
.player.full .vfit { left: 56px; }
.player.full #fullBtn, .player.full .exif, .player.full .bigplay { display: none; }
.player.full .scrub-mark { border-color: #000; }

/* ---------- рассказ под плеером ---------- */
.story { grid-area: story; padding: 6px 16px 24px; min-width: 0; }
.sub-title { font-size: 19px; margin: 24px 0 10px; letter-spacing: -.01em; }
.how { display: none; }
.how.show { display: block; margin: 12px 0 0; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); font-size: 13.5px; color: var(--ink-2); }
.how ul { margin: 0; padding-left: 18px; }
.how li { margin: 2px 0; }
.how button { margin-top: 6px; font-size: 13px; padding: 4px 10px; }
.events { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 8px; }
.ev {
  display: flex; align-items: flex-start; gap: 10px; text-align: left; padding: 9px 10px; border-radius: var(--radius); min-height: 52px;
}
.ev i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-top: 6px; }
.ev b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.ev span { display: block; color: var(--ink-2); font-size: 12.5px; line-height: 1.25; }
.ev.on { border-color: var(--ink); }
.next {
  display: block; margin: 28px 0 8px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15.5px;
}
.next span { display: block; font-size: 12px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.next:hover { background: var(--grid); }

/* графики */
.chart { background: var(--surface); border: 1px solid var(--ring); border-radius: var(--radius); margin-bottom: 8px; padding: 7px 8px 2px; }
.ch-head { display: flex; align-items: baseline; gap: 4px 8px; flex-wrap: wrap; min-height: 20px; }
.ch-title { font-weight: 600; font-size: 14px; }
.ch-unit { color: var(--muted); font-size: 12px; }
.ch-read { margin-left: auto; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.ch-read b { color: var(--ink); font-weight: 600; }
.key { display: inline-block; width: 12px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 4px; }
.chart svg { display: block; width: 100%; touch-action: pan-y; }
.chart svg text { fill: var(--muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.grid-line { stroke: var(--grid); stroke-width: 1; }
.base-line { stroke: var(--axis); stroke-width: 1; }
.cursor-line { stroke: var(--cursor); stroke-width: 1; opacity: .8; }
.pin-line { stroke: var(--pin); stroke-width: 1; opacity: .9; }
.series { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.axis-top { position: sticky; top: 0; z-index: 3; background: var(--page); padding: 6px 0 6px; }
.axis-top .chart { margin-bottom: 0; }
.legend-row { display: flex; gap: 4px 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); padding: 2px 2px 0; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; border: 1px solid var(--ring); }
.ev-label { cursor: pointer; }
.ev-label text { fill: var(--ink-2); font-size: 10.5px; }
.ev-label:hover text { fill: var(--ink); }
.csv { margin: 10px 0 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- разделы-страницы ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 30px 16px 24px; }
.sec + .sec { border-top: 1px solid var(--ring); }
.sec-title { font-size: 25px; margin: 0 0 6px; letter-spacing: -.015em; }
.wrap > .lede { margin: 0 0 16px; max-width: 70ch; }
.wrap h2 { font-size: 20px; margin: 30px 0 8px; letter-spacing: -.01em; }
.wrap h2.sec-title { margin-top: 0; font-size: 25px; }
.wrap p, .wrap li { color: var(--ink-2); }
.wrap p { max-width: 75ch; }

/* галерея */
.g-group { margin-top: 22px; }
.g-group h3 { font-size: 16px; margin: 0 0 2px; }
.g-group > p { font-size: 13.5px; margin: 0 0 10px; }
.g-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.card { display: block; padding: 0; overflow: hidden; text-align: left; border-radius: var(--radius); background: var(--surface); }
.card .ph { display: block; aspect-ratio: 3 / 4; background: var(--stage); }
.card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card.wide img { object-fit: contain; }
.card .ct { display: block; padding: 7px 10px 9px; font-size: 13.5px; line-height: 1.3; }
.card:hover { background: var(--surface-2); }

/* просмотр картинки */
.lightbox { position: fixed; inset: 0; z-index: 60; background: var(--page); display: flex; flex-direction: column; }
.lightbox[hidden] { display: none; }
.lb-bar { display: flex; align-items: center; gap: 4px; padding: 4px 6px; border-bottom: 1px solid var(--ring); background: var(--surface); }
.lb-bar h3 { flex: 1 1 auto; min-width: 0; margin: 0 4px; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-count { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; flex: none; }
.lb-bar .icon-btn { font-size: 24px; }
#lbClose { font-size: 18px; }
#gviewer { flex: 1 1 auto; height: auto; min-height: 0; }
.lb-info {
  flex: none; max-height: 36vh; overflow-y: auto; padding: 12px 16px calc(14px + var(--safe-b));
  border-top: 1px solid var(--ring); background: var(--surface);
}
.lb-info p { color: var(--ink-2); margin: 0 0 10px; font-size: 14px; }
.lb-info .dl { display: inline-flex; gap: 6px; align-items: center; font-size: 13.5px; }
.cbar { height: 12px; border-radius: 3px; border: 1px solid var(--ring); }
.cbar-ticks { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin: 2px 0 10px; font-variant-numeric: tabular-nums; }
.locator { position: relative; width: 120px; margin: 4px 0 12px; border-radius: 8px; overflow: hidden; background: var(--stage); }
.locator img { display: block; width: 100%; }
.locator svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.compare { margin: 6px 0 10px; }
.compare input { width: 100%; }

/* солнце и место */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.tile { background: var(--surface); border: 1px solid var(--ring); border-radius: var(--radius); padding: 10px 12px; }
.tile .lab { color: var(--ink-2); font-size: 12.5px; }
.tile .val { font-size: 21px; font-weight: 650; margin: 2px 0; line-height: 1.25; }
.tile .sub { color: var(--muted); font-size: 12.5px; }
.tile.hero { grid-column: 1 / -1; }
.tile.hero .val { font-size: 30px; }
.panel { background: var(--surface); border: 1px solid var(--ring); border-radius: var(--radius); padding: 12px; min-width: 0; }
.panel svg text { fill: var(--muted); font-size: 11px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: none; background: transparent; border-radius: 8px; padding: 6px 12px; color: var(--ink-2); font-size: 13.5px; }
.seg button.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.seg-row { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin: 10px 0 6px; }
.seg-row .legend-row { padding: 0; }
.radar .map-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .radar .map-dark { display: inline; }
  :root:not([data-theme="light"]) .radar .map-light { display: none; }
}
:root[data-theme="dark"] .radar .map-dark { display: inline; }
:root[data-theme="dark"] .radar .map-light { display: none; }
.radar .radar-fov { fill: var(--accent); fill-opacity: .14; stroke: var(--accent); stroke-opacity: .6; }
.radar .radar-ring { fill: none; stroke: var(--ink-2); stroke-opacity: .45; stroke-dasharray: 3 4; }
.panel svg.radar text.radar-label { fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; font-size: 11px; }
.radar line { paint-order: stroke; }
.table-wrap { overflow-x: auto; }
table.t { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 14px; }
table.t th, table.t td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--grid); }
table.t th { color: var(--muted); font-weight: 500; font-size: 12.5px; }
table.t td { color: var(--ink); }
.two { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 12px; }

/* как посчитано */
.steps-list details { border-bottom: 1px solid var(--grid); }
.steps-list summary {
  list-style: none; cursor: pointer; padding: 12px 28px 12px 0; font-weight: 600; position: relative; color: var(--ink);
}
.steps-list summary::-webkit-details-marker { display: none; }
.steps-list summary::after { content: "+"; position: absolute; right: 4px; top: 9px; font-size: 20px; font-weight: 400; color: var(--muted); }
.steps-list details[open] summary::after { content: "−"; }
.steps-list details p { margin: 0 0 14px; }

.foot { border-top: 1px solid var(--ring); }
.foot .wrap { padding-top: 18px; padding-bottom: 28px; font-size: 13px; color: var(--muted); }
.foot p { color: var(--muted); margin: 0 0 4px; }

/* ---------- шире телефона ---------- */
@media (min-width: 600px) {
  .g-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- компьютер ---------- */
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .botnav, .mini { display: none; }
  .topbar { position: sticky; top: 0; z-index: 30; padding: 0 12px 0 20px; height: var(--top-h); }
  .topnav { display: flex; gap: 2px; margin-left: 20px; }
  .topnav a { padding: 6px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 14.5px; }
  .topnav a:hover { background: var(--surface-2); }
  .topnav a.active { background: var(--surface-2); color: var(--ink); font-weight: 600; }
  .sec { scroll-margin-top: var(--top-h); }

  .watch {
    /* ширина колонки плеера — от высоты кадра: всё, кроме кадра, занимает ~300 px */
    --pw: clamp(340px, calc((100vh - var(--top-h) - 300px) * 0.566 + 30px), 44vw);
    grid-template-columns: var(--pw) minmax(0, 1fr); grid-template-areas: "player story";
  }
  .watch > .lede { display: none; }
  .lede-wide { display: block; margin: 18px 0 0; }
  .player {
    position: sticky; top: var(--top-h); align-self: start; height: calc(100vh - var(--top-h));
    padding: 12px 14px 12px 16px; border-right: 1px solid var(--ring);
  }
  .player > .timebar, .player > .scrub, .player > .steps, .player > .layers, .player > .exif { padding-left: 0; padding-right: 0; }
  .viewer { flex: 1 1 auto; height: auto; min-height: 0; border-radius: var(--radius); }
  .layers { flex-wrap: wrap; overflow: visible; }
  .steps { overflow: visible; }
  .steps button { flex: 1 1 0; min-height: 34px; padding: 5px 2px; font-size: 12.5px; }
  .chip { min-height: 32px; padding: 4px 11px; font-size: 13px; }
  .story { padding: 0 20px 40px; }
  .axis-top { top: var(--top-h); }
  .how.show { display: block; }

  .player.full { padding: 10px 16px calc(12px + var(--safe-b)); height: 100%; top: 0; border: none; }
  .player.full .viewer { border-radius: var(--radius); }

  .lightbox { display: grid; grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: auto minmax(0, 1fr); }
  .lightbox[hidden] { display: none; }
  .lb-bar { grid-column: 1 / -1; }
  #gviewer { height: 100%; }
  .lb-info { max-height: none; border-top: none; border-left: 1px solid var(--ring); padding: 16px 18px 24px; }
  .locator { width: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; scroll-behavior: auto !important; }
}
