/* Раздел «История галактики» (/history/ и /history/<эпоха>/). Токены, шапка и подвал — из style.css; подписи 3D-галактики
   (.pl-lab), плоская карта (.pl-map) и холст (.pl-3d) — из planets.css. Стиль — «летопись в свете эпох»: у каждой эпохи
   свой цвет (--c), события нанизаны на светящуюся нить, справа — липкая галактика, которая летит к месту события.
   Без JS: плоская карта, все события, спойлеры в <details>, линии жизни на год по умолчанию. С JS (.js) — фильтры,
   активное событие, курсор линий жизни; 3D — .pl-3d-on на <html> (только с WebGL). С prefers-reduced-motion ничего не едет. */
.hi-page {
  --pl-holo: #4bd5ee;
  --pl-amber: #ffb547;
  --pl-glass: rgba(6, 12, 24, .78);
  --pl-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace;
  --pl-ease: cubic-bezier(.2, .8, .2, 1);
  --hi-glass: rgba(8, 12, 24, .74);
  --hi-line: rgba(255, 255, 255, .1);
  --c: #58b4ff;
}
.hi-page svg { direction: ltr; }
.hi-page:is(:lang(ar), :lang(fa), :lang(th)) { --pl-mono: var(--f-text); }
.hi-page:is(:lang(ar), :lang(fa), :lang(th)) :not(svg *) { letter-spacing: 0 !important; }
/* длинные составные слова (Hyperraumkatastrophe, hyperavaruuskatastrofi): перенос по слогам, где браузер умеет, иначе — где не влезло */
.hi-page :is(h1, h2, h3, h4, .hi-pg b) { -webkit-hyphens: auto; hyphens: auto; overflow-wrap: anywhere; }
.hi-page .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- кнопки ---------- */
.hi-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 99px;
  background: rgba(10, 16, 30, .7);
  color: var(--text);
  font-family: var(--pl-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color .2s, background .2s, color .2s, box-shadow .2s;
}
.hi-btn:hover { border-color: var(--c); color: #fff; }
.hi-btn[aria-pressed="true"] { border-color: var(--c); background: color-mix(in srgb, var(--c) 22%, transparent); color: #fff; box-shadow: 0 0 18px color-mix(in srgb, var(--c) 30%, transparent); }

/* ---------- герой ---------- */
.hi-hero { position: relative; padding: 46px 0 8px; overflow: hidden; }
.hi-hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(40% 60% at 12% 30%, rgba(217, 183, 126, .14), transparent 70%),
    radial-gradient(36% 60% at 42% 10%, rgba(88, 180, 255, .16), transparent 70%),
    radial-gradient(34% 56% at 66% 30%, rgba(255, 77, 94, .13), transparent 70%),
    radial-gradient(34% 56% at 90% 20%, rgba(199, 125, 255, .14), transparent 70%);
}
.hi-era .hi-hero::before { background: radial-gradient(60% 70% at 20% 20%, color-mix(in srgb, var(--c) 26%, transparent), transparent 70%), radial-gradient(40% 60% at 85% 10%, color-mix(in srgb, var(--c) 14%, transparent), transparent 70%); }
.hi-hero-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 40px; align-items: end; }
.hi-hero-txt { min-width: 0; }
.hi-crumbs { margin: 0 0 14px; font-family: var(--pl-mono); font-size: 12.5px; letter-spacing: .06em; color: var(--muted); }
.hi-crumbs a { color: var(--c); text-decoration: none; }
.hi-crumbs a:hover { text-decoration: underline; }
.hi-kicker { margin: 0 0 10px; font-family: var(--pl-mono); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--c); }
.hi-hub .hi-kicker { color: #ffd38a; }
.hi-kicker::before { content: '◈ '; color: #fff; }
.hi-h1 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(38px, 6.6vw, 88px);
  line-height: .98;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 40px color-mix(in srgb, var(--c) 40%, transparent);
}
.hi-hub .hi-h1 { background: linear-gradient(90deg, #f3e3b0, #9fd2ff 35%, #ff9aa6 62%, #e2c1ff); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 0 26px rgba(160, 190, 255, .25)); }
.hi-lead { margin: 16px 0 0; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; color: #d3dae8; }
.hi-stats { display: grid; grid-template-columns: repeat(2, auto); gap: 10px; margin: 0; padding: 0; list-style: none; }
.hi-stats li { min-width: 140px; padding: 12px 16px; border: 1px solid var(--hi-line); border-radius: 12px; background: var(--hi-glass); }
.hi-stats b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 30px; line-height: 1; color: #fff; }
.hi-stats span { display: block; margin-top: 4px; font-family: var(--pl-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ---------- лента эпох ---------- */
.hi-ribbon { position: relative; margin: 26px auto 0; padding: 0 8px; max-width: 1400px; overflow-x: auto; scrollbar-width: thin; }
.hi-rb { display: block; width: 100%; min-width: 880px; height: auto; }
.hi-rb-era { cursor: pointer; }
.hi-rb-seg { opacity: .9; transition: opacity .25s; }
.hi-rb-glow { opacity: .28; filter: url(#hi-rb-blur); transition: opacity .25s; }
.hi-rb-hit { fill: transparent; }
.hi-rb-n { fill: #e3e9f5; font-family: var(--f-display); font-size: 13px; letter-spacing: .03em; text-anchor: middle; text-transform: uppercase; transition: fill .2s; }
.hi-rb-y { fill: var(--muted); font-family: var(--pl-mono); font-size: 11px; text-anchor: middle; }
.hi-rb-era:hover .hi-rb-glow, .hi-rb-era:focus-visible .hi-rb-glow, .hi-rb-cur .hi-rb-glow { opacity: .7; }
.hi-rb-era:hover .hi-rb-n, .hi-rb-cur .hi-rb-n { fill: var(--c); }
.hi-rb-dim { opacity: .38; }
.hi-rb-dim:hover { opacity: .8; }
.hi-rb-tick { stroke: rgba(3, 4, 10, .9); stroke-width: 3; }
.hi-rb-ev circle { fill: #fff; filter: drop-shadow(0 0 4px rgba(255, 255, 255, .9)); }
.hi-rb-k3 circle { fill: rgba(255, 255, 255, .7); filter: none; }
.hi-rb-l { fill: #fff; font-family: var(--f-text); font-size: 12px; font-weight: 700; text-anchor: middle; paint-order: stroke; stroke: #03040a; stroke-width: 3px; stroke-linejoin: round; }
.hi-rb-lead { stroke: rgba(255, 255, 255, .28); stroke-width: 1; }
.hi-rb-cur-mark path { stroke: #fff; stroke-width: 1.5; }
.hi-rb-cur-mark circle { fill: none; stroke: #fff; stroke-width: 2; }

/* ---------- ДБЯ / ПБЯ ---------- */
.hi-bby { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 46%); gap: 24px 40px; align-items: center; margin-top: 34px; padding: 22px 24px; border: 1px solid var(--hi-line); border-radius: var(--radius); background: var(--hi-glass); }
.hi-bby h2 { margin: 0 0 8px; font-family: var(--f-display); font-weight: 400; font-size: 22px; text-transform: uppercase; color: #fff; }
.hi-bby p { margin: 0; font-size: 16.5px; line-height: 1.55; color: #cfd6e4; }
.hi-bby-fig { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 18px 0; }
.hi-bby-fig::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 4px; background: linear-gradient(90deg, transparent, #58b4ff 30%, #ff9a3c 50%, #4fe0b0 70%, transparent); box-shadow: 0 0 18px rgba(255, 154, 60, .5); }
.hi-bby-fig > span { position: relative; display: grid; gap: 4px; justify-items: center; text-align: center; font-family: var(--f-display); font-size: 26px; color: #fff; }
.hi-bby-fig small { font-family: var(--pl-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hi-bby-l, .hi-bby-r { padding: 6px 10px; border-radius: 10px; background: rgba(3, 4, 10, .85); }
.hi-bby-l::before { content: '← '; color: #58b4ff; }
.hi-bby-r::after { content: ' →'; order: -1; color: #4fe0b0; }
.hi-bby-0 b { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: radial-gradient(circle, #fff 0 18%, #ffcf8a 40%, #ff7a2a 70%); box-shadow: 0 0 30px rgba(255, 150, 60, .8); color: #1a0d03; font-weight: 400; }
.hi-bby-0 small { max-width: 11em; }

/* ---------- заголовки разделов ---------- */
.hi-sec-head { margin: 64px auto 18px; }
.hi-sec-head h2 { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: clamp(26px, 3.4vw, 40px); text-transform: uppercase; letter-spacing: .02em; color: #fff; }
.hi-sec-head p { margin: 8px 0 0; font-size: 16.5px; line-height: 1.5; color: var(--muted); }

/* ---------- фильтры ---------- */
.hi-tools { display: none; flex-wrap: wrap; align-items: end; gap: 10px 14px; margin-bottom: 18px; padding: 12px 14px; border: 1px solid var(--hi-line); border-radius: 14px; background: var(--hi-glass); }
.js .hi-tools { display: flex; }
.hi-seg { display: flex; gap: 4px; }
.hi-f { display: grid; gap: 4px; font-family: var(--pl-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hi-f select { min-height: 36px; min-width: 150px; padding: 0 10px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 10px; background: #0a0f1c; color: var(--text); font: 15px var(--f-text); text-transform: none; letter-spacing: 0; }
.hi-chip { border-color: var(--pl-amber); color: #ffd79a; text-transform: none; letter-spacing: .02em; font-family: var(--f-text); font-size: 14px; }
.hi-chip::after { content: '✕'; margin-inline-start: 4px; }
.hi-check { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; font-size: 15px; color: #cfd6e4; cursor: pointer; }
.hi-check input { width: 18px; height: 18px; accent-color: var(--pl-amber); }
.hi-count { margin: 0 0 0 auto; align-self: center; font-family: var(--pl-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hi-nothing { margin-top: 18px; color: var(--muted); }

/* ---------- летопись: поток событий + липкая галактика ---------- */
.hi-chron { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 44%); gap: 28px; align-items: start; }
.hi-stream { position: relative; margin: 0; padding: 0; list-style: none; }
/* нить времени — цвета эпох сверху вниз */
.hi-stream::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-start: 129px;
  width: 2px;
  background: linear-gradient(180deg, #d9b77e, #9d8cff 12%, #f3e3b0 22%, #58b4ff 38%, #ff4d5e 56%, #ff9a3c 70%, #4fe0b0 82%, #c77dff 92%, #ffe81f);
  opacity: .55;
}
.hi-era .hi-stream::before { background: linear-gradient(180deg, transparent, var(--c) 4%, var(--c) 96%, transparent); }

.hi-era-mark { position: relative; margin: 34px 0 18px; padding-inline-start: 150px; }
.hi-era-mark:first-child { margin-top: 0; }
.hi-era-mark a { display: block; padding: 18px 20px; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); border-radius: 16px; background: linear-gradient(100deg, color-mix(in srgb, var(--c) 18%, transparent), rgba(8, 12, 24, .6) 70%); text-decoration: none; transition: border-color .2s, box-shadow .2s; }
.hi-era-mark a:hover { border-color: var(--c); box-shadow: 0 0 30px color-mix(in srgb, var(--c) 22%, transparent); }
.hi-era-mark::before { content: ''; position: absolute; inset-inline-start: 120px; top: 30px; width: 20px; height: 20px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 5px rgba(3, 4, 10, .9), 0 0 24px var(--c); }
.hi-era-k { display: block; font-family: var(--pl-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--c); }
.hi-era-n { margin: 4px 0 2px; font-family: var(--f-display); font-weight: 400; font-size: clamp(22px, 2.6vw, 32px); text-transform: uppercase; color: #fff; }
.hi-era-tag { display: block; font-size: 16px; color: #cfd6e4; }

.hi-ev { position: relative; display: grid; grid-template-columns: 112px 36px minmax(0, 1fr); gap: 0 18px; align-items: start; margin: 0 0 14px; scroll-margin-top: 24px; }
.hi-ev[hidden] { display: none; }
.hi-ev-when { padding-top: 14px; font-family: var(--f-display); font-size: 15px; line-height: 1.15; text-align: end; color: var(--c); text-shadow: 0 0 14px color-mix(in srgb, var(--c) 45%, transparent); }
.hi-k1 .hi-ev-when { font-size: 19px; }
.hi-ev-node { position: relative; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; margin-top: 8px; border: 2px solid var(--c); border-radius: 50%; background: #070a14; color: var(--c); transition: transform .3s var(--pl-ease), box-shadow .3s; }
.hi-kind { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hi-k1 .hi-ev-node { background: var(--c); color: #070a14; box-shadow: 0 0 22px color-mix(in srgb, var(--c) 60%, transparent); }
.hi-ev-card { min-width: 0; padding: 14px 18px 14px; border: 1px solid var(--hi-line); border-radius: 14px; background: var(--hi-glass); transition: border-color .3s, box-shadow .3s, background .3s; }
.hi-k1 .hi-ev-card { border-color: color-mix(in srgb, var(--c) 40%, transparent); background: linear-gradient(110deg, color-mix(in srgb, var(--c) 12%, transparent), var(--hi-glass) 60%); }
.hi-ev.is-on .hi-ev-card { border-color: var(--c); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent), 0 0 34px color-mix(in srgb, var(--c) 18%, transparent); }
.hi-ev.is-on .hi-ev-node { transform: scale(1.15); box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 18%, transparent), 0 0 26px var(--c); }
.hi-ev-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 4px; font-family: var(--pl-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hi-ev-tag { padding: 2px 8px; border-radius: 99px; background: var(--c); color: #070a14; font-weight: 700; }
.hi-ev-tag-f { background: none; border: 1px dashed var(--c); color: var(--c); }
.hi-ev-t { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 20px; line-height: 1.15; text-transform: uppercase; letter-spacing: .02em; color: #fff; }
.hi-k1 .hi-ev-t { font-size: clamp(22px, 2.2vw, 27px); }
.hi-ev-x { margin: 8px 0 0; font-size: 16.5px; line-height: 1.55; color: #d3dae8; }
.hi-era .hi-ev-x { font-size: 17px; }
.hi-ev-links { display: grid; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--hi-line); }
.hi-ev-lk { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; margin: 0; font-size: 14.5px; }
.hi-ev-lkn { margin-inline-end: 4px; font-family: var(--pl-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.hi-ev-lk a, .hi-book { padding: 1px 9px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 99px; color: #dfe6f3; text-decoration: none; transition: border-color .2s, color .2s; }
.hi-ev-lk a:hover { border-color: var(--c); color: #fff; }
.hi-ev-lk-pl a::before { content: '◉ '; color: var(--pl-amber); font-size: 10px; }
.hi-book { font-style: italic; border-style: dashed; color: #cbbfa0; }
.hi-ev-act { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 12px 0 0; }
.hi-to-lives { display: none; min-height: 30px; font-size: 11px; }
.js .hi-to-lives { display: inline-flex; }
.hi-more { font-family: var(--pl-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--c); text-decoration: none; }
.hi-more:hover { text-decoration: underline; }
.hi-ev-fut .hi-ev-card { border-style: dashed; }

/* спойлеры */
.hi-spoiler summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 14px; border: 1px dashed rgba(255, 181, 71, .45); border-radius: 10px; background: repeating-linear-gradient(-45deg, rgba(255, 181, 71, .06) 0 8px, transparent 8px 16px); cursor: pointer; list-style: none; }
.hi-spoiler summary::-webkit-details-marker { display: none; }
.hi-spoiler-t { color: var(--muted); font-size: 15px; }
.hi-spoiler-b { padding: 2px 10px; border-radius: 99px; background: var(--pl-amber); color: #1a1205; font-family: var(--pl-mono); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hi-spoiler-auto { display: none; font-family: var(--pl-mono); font-size: 11.5px; color: var(--green); }
.hi-spoiler[open] summary { margin-bottom: 8px; padding: 4px 10px; border-style: solid; background: none; }
.hi-spoiler[open] .hi-spoiler-b { display: none; }
.hi-spoiler.hi-auto .hi-spoiler-auto { display: inline; }

/* липкая панель */
.hi-stage { position: sticky; top: 12px; height: calc(100vh - 24px); height: calc(100svh - 24px); min-height: 460px; max-height: 860px; }
.hi-stage-in { display: flex; flex-direction: column; height: 100%; border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); border-radius: 18px; background: radial-gradient(closest-side, rgba(70, 60, 150, .2), transparent), #04060d; overflow: hidden; transition: border-color .5s; }
.hi-now { position: relative; z-index: 3; display: grid; gap: 2px; margin: 0; padding: 14px 18px 10px; border-bottom: 1px solid var(--hi-line); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 16%, transparent), transparent); }
.hi-now-era { font-family: var(--pl-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--c); transition: color .5s; }
.hi-now-y { font-family: var(--f-display); font-size: clamp(30px, 3.4vw, 46px); line-height: 1; color: #fff; text-shadow: 0 0 24px color-mix(in srgb, var(--c) 60%, transparent); font-variant-numeric: tabular-nums; }
.hi-now-t { min-height: 1.3em; font-size: 16px; color: #d3dae8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hi-galaxy { position: relative; flex: 1 1 auto; min-height: 0; touch-action: pan-y; }
.hi-galaxy .pl-3d { cursor: grab; }
.hi-flat { position: absolute; inset: 10px; display: flex; justify-content: center; }
.hi-flat .pl-map { width: auto; max-width: 100%; height: 100%; }
.pl-3d-on .hi-flat { visibility: hidden; }
.pl-3d-on .hi-flat-mode .hi-flat { visibility: visible; }
.pl-3d-on .hi-flat-mode .pl-3d, .pl-3d-on .hi-flat-mode .pl-labels { visibility: hidden; }
.hi-flat .pl-pt-hot .pl-pt-halo { fill: rgba(255, 181, 71, .55); }
.hi-flat .pl-pt-hot .pl-pt-dot { fill: var(--pl-amber); filter: drop-shadow(0 0 8px var(--pl-amber)); }
.hi-flat .pl-pt-hot .pl-pt-t { fill: var(--pl-amber); }
.hi-mode { position: absolute; z-index: 3; top: 10px; inset-inline-end: 10px; display: none; gap: 4px; }
.pl-3d-on .hi-mode { display: flex; }
.hi-mode .hi-btn { min-height: 28px; padding: 0 10px; font-size: 10.5px; }
.hi-hint { position: absolute; z-index: 2; inset-inline-start: 12px; bottom: 8px; margin: 0; font-family: var(--pl-mono); font-size: 11px; color: rgba(154, 163, 183, .7); pointer-events: none; }
.hi-where { margin: 0; padding: 8px 18px; min-height: 2.6em; border-top: 1px solid var(--hi-line); font-size: 14.5px; color: #cfd6e4; }
.hi-where b { color: var(--pl-amber); font-weight: 700; }
.hi-mini { position: relative; height: 10px; margin: 0 18px 14px; border-radius: 6px; background: rgba(255, 255, 255, .06); }
.hi-mini i { position: absolute; top: 2px; bottom: 2px; left: var(--a); width: var(--w); background: var(--c); opacity: .75; }
.hi-mini i:first-child { border-radius: 4px 0 0 4px; }
.hi-mini i:last-of-type { border-radius: 0 4px 4px 0; }
.hi-mini-cur { position: absolute; top: -5px; left: var(--x); width: 4px; height: 20px; margin-left: -2px; border-radius: 2px; background: #fff; box-shadow: 0 0 10px #fff; transition: left .6s var(--pl-ease); }

/* ---------- линии жизни ---------- */
.hi-lv { padding: 16px; border: 1px solid var(--hi-line); border-radius: 18px; background: var(--hi-glass); }
.hi-lv-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 14px; }
.hi-play { display: none; }
.js .hi-play { display: inline-flex; }
.hi-play-i { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; }
.hi-play[aria-pressed="true"] .hi-play-i { width: 10px; height: 12px; border: 0; border-inline: 3px solid currentColor; }
.hi-lv-range { flex: 1 1 260px; display: flex; }
.hi-lv-range input { width: 100%; accent-color: var(--pl-amber); }
.hi-lv-now { min-width: 6.5em; font-family: var(--f-display); font-size: 26px; color: #fff; text-shadow: 0 0 18px rgba(255, 181, 71, .5); font-variant-numeric: tabular-nums; }
.hi-lv-chart { position: relative; --cols: minmax(130px, 15%) minmax(0, 1fr) minmax(170px, 22%); }
.hi-lv-axis, .hi-lv-row, .hi-lv-cursor { display: grid; grid-template-columns: var(--cols); gap: 0 14px; align-items: center; }
.hi-lv-axis { height: 44px; }
.hi-lv-axis .hi-lv-track { position: relative; height: 100%; }
.hi-lv-band { position: absolute; top: 0; height: 8px; left: var(--a); width: var(--w); background: var(--c); opacity: .5; }
.hi-lv-band-on { opacity: 1; box-shadow: 0 0 14px var(--c); }
.hi-lv-tick { position: absolute; top: 14px; left: var(--x); transform: translateX(-50%); font-family: var(--pl-mono); font-size: 10.5px; color: var(--dim); white-space: nowrap; }
.hi-lv-tick::before { content: ''; position: absolute; left: 50%; top: -6px; height: 4px; border-left: 1px solid var(--dim); }
.hi-lv-mark { position: absolute; top: 30px; left: var(--x); width: 11px; height: 11px; margin-left: -5.5px; padding: 0; border: 0; background: #fff; transform: rotate(45deg); box-shadow: 0 0 8px rgba(255, 255, 255, .8); cursor: pointer; }
.hi-lv-mark:hover, .hi-lv-mark:focus-visible { background: var(--pl-amber); }
.hi-lv-rows { margin: 0; padding: 0; list-style: none; }
.hi-lv-row { min-height: 30px; border-top: 1px solid rgba(255, 255, 255, .05); }
.hi-lv-name { overflow: hidden; font-size: 14.5px; color: #e3e9f5; white-space: nowrap; text-overflow: ellipsis; }
.hi-lv-track { position: relative; height: 12px; }
.hi-lv-seg { position: absolute; top: 0; bottom: 0; left: var(--a); width: var(--w); border-inline-end: 1px solid rgba(3, 4, 10, .8); }
.hi-lv-seg:first-child { border-radius: 6px 0 0 6px; }
.hi-lv-end { position: absolute; top: 50%; left: var(--x); transform: translate(-30%, -55%); font-size: 13px; line-height: 1; color: #fff; }
.hi-lv-mask { position: absolute; top: -2px; bottom: -2px; left: var(--a); right: 0; border-radius: 0 6px 6px 0; background: repeating-linear-gradient(-45deg, #5a4220 0 4px, #15110a 4px 8px); }
.hi-lv-cut { position: absolute; top: -15px; left: 0; font-family: var(--pl-mono); font-size: 10px; color: var(--muted); white-space: nowrap; }
.hi-lv-cut::before { content: '← '; }
.hi-lv-read { overflow: hidden; font-size: 13.5px; color: #cfd6e4; white-space: nowrap; text-overflow: ellipsis; }
.hi-lv-read b { color: #fff; }
.hi-lv-before .hi-lv-name, .hi-lv-before .hi-lv-read { color: var(--dim); }
.hi-lv-gone .hi-lv-read { color: var(--muted); }
.hi-lv-hid .hi-lv-read { color: #ffd79a; font-family: var(--pl-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.hi-lv-row.is-hot .hi-lv-name { color: var(--pl-amber); }
.hi-lv-cursor { position: absolute; inset: 0; pointer-events: none; }
.hi-lv-cursor .hi-lv-track { height: 100%; }
.hi-lv-cursor b { position: absolute; top: 0; bottom: 0; left: var(--now); width: 2px; margin-left: -1px; background: linear-gradient(180deg, var(--pl-amber), rgba(255, 181, 71, .25)); box-shadow: 0 0 12px rgba(255, 181, 71, .8); }
.hi-lv-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--muted); }
.hi-lv-legend i { display: inline-block; width: 22px; height: 8px; margin-inline-end: 6px; border-radius: 4px; vertical-align: middle; }
.hi-side-light { background: #58b4ff; box-shadow: 0 0 8px rgba(88, 180, 255, .45); }
.hi-side-dark { background: #ff4d5e; box-shadow: 0 0 8px rgba(255, 77, 94, .45); }
.hi-side-rebel { background: #ff9a3c; }
.hi-side-empire { background: #c5ccd8; }
.hi-side-neutral { background: #8c7f63; }
.hi-side-mando { background: #6fd0c3; }
.hi-side-gone { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .35) 0 3px, transparent 3px 6px); }
/* раскрытые спойлеры: маска уходит */
.hi-lv-row.hi-rev .hi-lv-mask { display: none; }

/* ---------- эпохи ---------- */
.hi-era-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.hi-era-card a { display: grid; gap: 6px; height: 100%; padding: 16px 18px; border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); border-top: 4px solid var(--c); border-radius: 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 12%, transparent), var(--hi-glass) 60%); text-decoration: none; transition: transform .25s var(--pl-ease), box-shadow .25s; }
.hi-era-card a:hover { transform: translateY(-3px); box-shadow: 0 10px 34px color-mix(in srgb, var(--c) 20%, transparent); }
.hi-era-cn { font-family: var(--f-display); font-size: 21px; line-height: 1.1; text-transform: uppercase; color: #fff; }
.hi-era-cy { font-family: var(--pl-mono); font-size: 12.5px; color: var(--c); }
.hi-era-cd { font-size: 15.5px; color: #cfd6e4; }
.hi-era-cc { margin-top: auto; font-family: var(--pl-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ---------- FAQ ---------- */
.hi-faq-list { display: grid; gap: 8px; }
.hi-faq-list details { border: 1px solid var(--hi-line); border-radius: 12px; background: var(--hi-glass); }
.hi-faq-list summary { padding: 14px 18px; font-size: 17px; font-weight: 700; color: #fff; cursor: pointer; }
.hi-faq-list p { margin: 0; padding: 0 18px 16px; font-size: 16px; line-height: 1.55; color: #cfd6e4; }

/* ---------- страница эпохи ---------- */
.hi-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 32%); gap: 24px 40px; align-items: start; margin-top: 34px; }
.hi-intro-txt p { margin: 0 0 14px; font-size: 18px; line-height: 1.6; color: #dce2ee; }
.hi-intro-txt p:first-child::first-letter { float: inline-start; margin: 4px 10px 0 0; font-family: var(--f-display); font-size: 58px; line-height: .8; color: var(--c); }
.hi-glance { padding: 16px 18px; border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); border-radius: 16px; background: var(--hi-glass); }
.hi-glance ol { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.hi-glance a { display: grid; grid-template-columns: 7.2em minmax(0, 1fr); gap: 10px; padding: 7px 6px; border-radius: 8px; font-size: 15px; color: #e3e9f5; text-decoration: none; }
.hi-glance a:hover { background: color-mix(in srgb, var(--c) 14%, transparent); }
.hi-glance a span { font-family: var(--pl-mono); font-size: 12px; color: var(--c); }
.hi-posters { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.hi-posters a { display: grid; gap: 6px; text-decoration: none; }
.hi-posters img { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--hi-line); transition: transform .25s var(--pl-ease), box-shadow .25s; }
.hi-posters a:hover img { transform: translateY(-3px); box-shadow: 0 10px 30px color-mix(in srgb, var(--c) 26%, transparent); }
.hi-posters span { font-size: 14.5px; line-height: 1.25; color: #e3e9f5; }
.hi-posters small { font-family: var(--pl-mono); font-size: 11px; color: var(--c); }
.hi-books { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.hi-books li { padding: 6px 14px; border: 1px dashed rgba(203, 191, 160, .5); border-radius: 99px; font-style: italic; color: #e5dcc4; }
.hi-src { margin-top: 50px; }
.hi-src summary { cursor: pointer; list-style: none; }
.hi-src summary::-webkit-details-marker { display: none; }
.hi-src h2 { display: inline; font-family: var(--f-display); font-weight: 400; font-size: 18px; text-transform: uppercase; color: var(--muted); }
.hi-src h2::after { content: ' +'; color: var(--c); }
.hi-src[open] h2::after, .hi-src details[open] h2::after { content: ' −'; }
.hi-src p { color: var(--muted); }
.hi-src ol { columns: 2 340px; column-gap: 30px; padding-inline-start: 20px; font-size: 14px; color: var(--muted); }
.hi-src li { break-inside: avoid; margin-bottom: 4px; }
.hi-src a { color: #b9c3d6; }
.hi-pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; margin-top: 40px; }
.hi-pg { display: grid; gap: 2px; min-width: 0; padding: 14px 18px; border: 1px solid var(--hi-line); border-radius: 14px; background: var(--hi-glass); text-decoration: none; transition: border-color .2s; }
.hi-pg:hover { border-color: var(--c); }
.hi-pg span { font-family: var(--pl-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hi-pg b { font-family: var(--f-display); font-weight: 400; font-size: 18px; text-transform: uppercase; color: #fff; }
.hi-pg-next { text-align: end; }
.hi-pg-hub { text-align: center; --c: var(--pl-amber); }

/* ---------- узкие экраны ---------- */
@media (max-width: 1000px) {
  /* flex, а не сетка: у элемента сетки липкость ограничена его ячейкой, а у flex-элемента — всем контейнером */
  .hi-chron { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
  .hi-stream { min-width: 0; }
  .hi-ev { scroll-margin-top: calc(38svh + 16px); }
  /* галактика — сверху и липнет к краю экрана, события прокручиваются под ней */
  .hi-stage { order: -1; z-index: 6; top: 0; height: 38vh; height: 38svh; min-height: 250px; margin: 0 -16px; }
  .hi-stage-in { border-radius: 0 0 16px 16px; border-width: 0 0 1px; }
  .hi-now { position: absolute; inset: 0 0 auto; padding: 10px 14px 18px; border: 0; background: linear-gradient(180deg, rgba(4, 6, 13, .92), transparent); pointer-events: none; }
  .hi-now-y { font-size: 28px; }
  .hi-now-t { font-size: 14px; }
  .hi-where { display: none; }
  .hi-mini { margin: 0 14px 10px; height: 8px; }
  .hi-hint { display: none; }
  .hi-mode { top: auto; bottom: 26px; }
}
@media (max-width: 760px) {
  .hi-hero { padding-top: 30px; }
  .hi-hero-in { grid-template-columns: minmax(0, 1fr); }
  .hi-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .hi-stats li { min-width: 0; padding: 10px 12px; }
  .hi-stats b { font-size: 24px; }
  .hi-stats span { font-size: 10.5px; letter-spacing: .05em; }
  .hi-bby { grid-template-columns: minmax(0, 1fr); padding: 18px 16px; }
  .hi-stream::before { inset-inline-start: 17px; }
  .hi-era-mark { padding-inline-start: 44px; }
  .hi-era-mark::before { inset-inline-start: 8px; top: 24px; }
  .hi-ev { grid-template-columns: 36px minmax(0, 1fr); gap: 0 10px; }
  .hi-ev-node { grid-row: 1 / span 2; margin-top: 0; }
  .hi-ev-when { grid-column: 2; padding: 6px 0 4px; text-align: start; font-size: 15px; }
  .hi-k1 .hi-ev-when { font-size: 17px; }
  .hi-ev-card { grid-column: 2; padding: 12px 14px; }
  .hi-ev-x { font-size: 16px; }
  .hi-count { margin-inline-start: 0; }
  .hi-intro { grid-template-columns: minmax(0, 1fr); }
  .hi-intro-txt p { font-size: 17px; }
  .hi-lv { padding: 12px 10px; }
  .hi-lv-chart { --cols: minmax(0, 1fr); }
  .hi-lv-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'name read' 'track track'; gap: 2px 10px; padding: 6px 0; }
  .hi-lv-row .hi-lv-name { grid-area: name; }
  .hi-lv-row .hi-lv-read { grid-area: read; max-width: 58vw; text-align: end; font-size: 12.5px; }
  .hi-lv-row .hi-lv-track { grid-area: track; height: 9px; }
  .hi-lv-axis, .hi-lv-cursor { grid-template-columns: minmax(0, 1fr); }
  .hi-lv-axis .hi-lv-name, .hi-lv-axis .hi-lv-read, .hi-lv-cursor .hi-lv-name, .hi-lv-cursor .hi-lv-read { display: none; }
  .hi-lv-tick:nth-child(even of .hi-lv-tick) { display: none; }
  .hi-lv-now { font-size: 22px; }
  .hi-lv-cut { display: none; }
  .hi-pager { grid-template-columns: 1fr 1fr; }
  .hi-pg-hub { grid-column: 1 / -1; grid-row: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .hi-page *, .hi-page *::before, .hi-page *::after { transition: none !important; animation: none !important; }
}
