/* В News Cycle «ёлочки» нарисованы как “лапки”, а ‹ › — как < >.
   Эти четыре знака берём из системного шрифта, остальной текст остаётся в News Cycle. */
@font-face {
  font-family: 'Guillemets';
  src: local('Arial'), local('ArialMT'), local('Helvetica Neue'), local('Helvetica'), local('Segoe UI'), local('Roboto'), local('Liberation Sans'), local('DejaVu Sans'), local('Noto Sans');
  unicode-range: U+00AB, U+00BB, U+2039, U+203A;
  font-weight: 400 700;
}

:root {
  --bg: #03040a;
  --panel: rgba(10, 14, 26, .78);
  --card: #0a0e18;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #e9edf6;
  --muted: #9aa3b7;
  --dim: #646d82;
  --yellow: #ffe81f;
  --crawl-blue: #4bd5ee;
  --green: #4dff88;
  --red: #ff4d5e;
  --blue: #58b4ff;
  --f-display: 'Russo One', 'Arial Black', Impact, sans-serif;
  --f-text: 'Guillemets', 'News Cycle', 'Arial Narrow', Arial, sans-serif;
  --radius: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-text);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vw 40vh at 85% 8%, rgba(88, 60, 180, .16), transparent 70%),
    radial-gradient(50vw 50vh at 5% 60%, rgba(30, 110, 170, .12), transparent 70%),
    radial-gradient(40vw 30vh at 70% 95%, rgba(170, 40, 60, .08), transparent 70%);
}
#stars { position: fixed; inset: 0; z-index: -2; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 16px; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  min-height: 92svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 16px 36px;
}
.intro {
  margin: 0 0 26px;
  color: var(--crawl-blue);
  font-size: clamp(16px, 2.3vw, 22px);
  opacity: 0;
  animation: fade-in 2.4s .2s ease forwards;
}
.h1 { margin: 0; display: flex; flex-direction: column; align-items: center; font: inherit; }
.logo {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--f-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: .92;
  letter-spacing: .05em;
  font-size: clamp(46px, 11.5vw, 138px);
  color: transparent;
  -webkit-text-stroke: clamp(2px, .35vw, 4px) var(--yellow);
  filter: drop-shadow(0 0 22px rgba(255, 232, 31, .22));
  animation: logo-in 2.6s 1s cubic-bezier(.15, .75, .25, 1) both;
}
.logo span:last-child { letter-spacing: .16em; margin-inline-end: -.16em; }
@supports not (-webkit-text-stroke: 1px black) {
  .logo { color: var(--yellow); }
}
.tagline {
  display: block;
  margin: 22px 0 0;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  animation: fade-in 1.4s 2.6s ease forwards;
}

/* Бегущий текст как во вступлении к фильмам */
.crawl-wrap {
  position: relative;
  width: min(640px, 100%);
  height: 230px;
  margin: 18px auto 0;
  overflow: hidden;
  perspective: 360px;
  perspective-origin: 50% 0%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 45%, #000 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 45%, #000 100%);
}
/* Точка поворота — нижний край окна: весь видимый текст уходит вглубь и сужается */
.crawl {
  position: absolute;
  left: 9%;
  right: 9%;
  top: 100%;
  color: var(--yellow);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.5;
  text-align: justify;
  transform-origin: 50% 0%;
  animation: crawl 42s linear 2.4s infinite both;
}
.crawl p { margin: 0 0 1.1em; }
.crawl .crawl-ep { text-align: center; margin: 0; font-size: 19px; }
.crawl .crawl-title { text-align: center; font-size: 31px; letter-spacing: .06em; }
@keyframes crawl {
  from { transform: rotateX(28deg) translateY(0); }
  to   { transform: rotateX(28deg) translateY(-1150px); }
}
@keyframes fade-in { to { opacity: 1; } }
@keyframes logo-in {
  from { transform: scale(2.4); opacity: 0; }
  30%  { opacity: 1; }
  to   { transform: scale(1); opacity: 1; }
}

/* ---------- Progress ---------- */
.stats {
  width: min(760px, 100%);
  margin-top: 26px;
  padding: 18px 20px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
}
.saber { display: flex; align-items: center; gap: 0; height: 22px; }
.hilt {
  position: relative;
  flex: 0 0 74px;
  height: 18px;
  border-radius: 4px 2px 2px 4px;
  background: linear-gradient(180deg, #eef0f4 0%, #9ba1ad 40%, #4a505c 60%, #aab0bc 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35);
}
.hilt i {
  position: absolute;
  top: 2px;
  bottom: 2px;
  width: 5px;
  background: #1a1d24;
  border-radius: 1px;
}
.hilt i:nth-child(1) { inset-inline-start: 12px; }
.hilt i:nth-child(2) { inset-inline-start: 22px; }
.hilt i:nth-child(3) { inset-inline-start: 32px; }
.hilt::after {
  content: '';
  position: absolute;
  inset-inline-end: -4px;
  top: -3px;
  width: 8px;
  height: 24px;
  border-radius: 2px;
  background: linear-gradient(180deg, #d5d9e0, #5b616d);
}
.blade {
  position: relative;
  flex: 1;
  height: 8px;
  margin-inline-start: 4px;
  border-radius: 0 6px 6px 0;
  background: rgba(255, 255, 255, .06);
}
.blade-fill {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 0;
  border-radius: 0 6px 6px 0;
  background: #f4fff7;
  box-shadow: 0 0 4px #fff, 0 0 10px var(--green), 0 0 22px var(--green), 0 0 36px rgba(77, 255, 136, .5);
  transition: width 1s cubic-bezier(.2, .8, .2, 1);
}
.saber-pct {
  flex: 0 0 auto;
  margin-inline-start: 14px;
  font-family: var(--f-display);
  font-size: 18px;
  color: var(--green);
  min-width: 3.2em;
  text-align: end;
}
.counts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 16px 0 14px;
}
.count { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.count b { font-family: var(--f-display); font-weight: 400; font-size: 26px; line-height: 1.1; }
.count span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.c-w b { color: var(--green); }
.c-x b { color: var(--red); }
.c-s b { color: var(--yellow); }
.btn-next {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(88, 180, 255, .55);
  border-radius: 12px;
  background: rgba(88, 180, 255, .08);
  text-align: start;
  transition: background .2s, box-shadow .2s;
}
.btn-next:hover { background: rgba(88, 180, 255, .16); box-shadow: 0 0 22px rgba(88, 180, 255, .25); }
.btn-next-k {
  flex: 0 0 auto;
  font-family: var(--f-display);
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
}
.btn-next-k::after { content: ' ▶'; }
.btn-next-t {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  font-size: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-next.done { border-color: rgba(255, 232, 31, .5); background: rgba(255, 232, 31, .06); }
.btn-next.done .btn-next-k { color: var(--yellow); }
.btn-next.done .btn-next-k::after { content: ''; }

/* ---------- Section heads ---------- */
.sec-head, .era-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0 0 6px;
}
.sec-title, .era-name {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(22px, 3.2vw, 30px);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--yellow);
}
.sec-sub, .era-span { color: var(--crawl-blue); font-weight: 700; font-size: 15px; }
.era-count {
  margin-inline-start: auto;
  font-family: var(--f-display);
  font-size: 15px;
  color: var(--muted);
}
.era-count b { color: var(--green); font-weight: 400; }

/* ---------- Upcoming ---------- */
.soon { padding-top: 24px; padding-bottom: 36px; }
.soon .sec-head { margin-bottom: 16px; }
.soon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}
.soon-card {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 14px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s, transform .2s;
}
.soon-card:hover { border-color: rgba(255, 232, 31, .4); transform: translateY(-2px); }
.soon-card img {
  width: 84px;
  height: 126px;
  object-fit: cover;
  border-radius: 8px;
  background: #000;
}
.soon-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.soon-when { font-family: var(--f-display); font-size: 18px; color: var(--yellow); line-height: 1.2; }
.soon-left {
  align-self: flex-start;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #000;
  background: var(--yellow);
}
.soon-title { font-weight: 700; font-size: 16px; line-height: 1.25; margin-top: 4px; }
.soon-title button { all: unset; cursor: pointer; }
.soon-title button:hover, .soon-title button:focus-visible { color: var(--yellow); text-decoration: underline; }
.soon-where { font-size: 13px; color: var(--muted); }
.soon-note { font-size: 13px; color: var(--muted); line-height: 1.35; }
.soon-src { margin-top: auto; font-size: 12px; color: var(--dim); }
.soon-src:hover { color: var(--crawl-blue); }

.dev {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 14, 26, .55);
}
.dev summary {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 700;
  color: var(--muted);
}
.dev summary:hover { color: var(--text); }
.dev-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px 22px;
  margin: 0;
  padding: 4px 16px 16px;
  list-style: none;
}
.dev-list li { font-size: 14px; color: var(--muted); padding-inline-start: 14px; position: relative; }
.dev-list li::before { content: ''; position: absolute; inset-inline-start: 0; top: .6em; width: 5px; height: 5px; border-radius: 50%; background: var(--yellow); }
.dev-list b { display: block; color: var(--text); }

/* ---------- Toolbar ---------- */
.toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(3, 4, 10, .86);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
}
.toolbar-in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-top: 10px; padding-bottom: 10px; }
.seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: rgba(255, 255, 255, .03);
}
.seg button {
  border: 0;
  background: none;
  padding: 6px 12px;
  border-radius: 7px;
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--yellow); color: #000; }
.search {
  flex: 1 1 200px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: rgba(255, 255, 255, .03);
}
.search:focus-within { border-color: rgba(255, 232, 31, .6); }
.search svg { width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.search input {
  flex: 1;
  min-width: 0;
  height: 36px;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 15px;
}

/* ---------- Eras & cards ---------- */
.era { padding-top: 44px; scroll-margin-top: 70px; }
.era-head { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.era-text { margin: 8px 0 18px; color: var(--muted); font-size: 15px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
  gap: 18px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0d1221, var(--card));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  scroll-margin-top: 90px;
  transition: transform .25s ease, box-shadow .3s ease, border-color .3s ease, opacity .3s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-2); }
.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #000;
}
.poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease, filter .4s ease;
}
.card:hover .poster img { transform: scale(1.045); }
.num, .type, .flag {
  position: absolute;
  z-index: 2;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .74);
  -webkit-backdrop-filter: blur(3px);
          backdrop-filter: blur(3px);
}
.num {
  top: 8px;
  inset-inline-start: 8px;
  font-family: var(--f-display);
  font-size: 14px;
  color: var(--yellow);
  border: 1px solid rgba(255, 232, 31, .35);
}
.type {
  top: 8px;
  inset-inline-end: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #d4dae6;
}
.flag {
  inset-inline-start: 8px;
  bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.flag-soon { background: var(--yellow); color: #000; }
.flag-opt { color: var(--crawl-blue); border: 1px solid rgba(75, 213, 238, .4); }
.flag-canon { color: #cfd6e4; border: 1px solid var(--line-2); }
.stamp {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  padding: 6px 12px;
  border: 3px solid currentColor;
  border-radius: 8px;
  font-family: var(--f-display);
  font-size: 17px;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  background: rgba(0, 0, 0, .55);
  transform: translate(-50%, -50%) rotate(-12deg) scale(1.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .35s cubic-bezier(.2, 1.6, .4, 1);
}
.next-tag {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 10px;
  padding: 4px 14px 4px 16px;
  border-radius: 999px;
  font-family: var(--f-display);
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #02101f;
  background: var(--blue);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .5), 0 0 22px rgba(88, 180, 255, .85);
  transform: translateX(-50%);
  display: none;
}

.body { display: flex; flex-direction: column; flex: 1; gap: 6px; padding: 12px 14px 14px; }
.title { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.22; }
.orig { font-size: 12.5px; color: var(--dim); line-height: 1.3; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.chip {
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  border: 1px solid var(--line-2);
  color: var(--muted);
}
.chip-when { color: var(--crawl-blue); border-color: rgba(75, 213, 238, .3); }
.note { margin: 2px 0 0; font-size: 14px; color: var(--muted); line-height: 1.45; }
.more-links { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; }
.more-links a { color: var(--crawl-blue); text-decoration: none; border-bottom: 1px dashed rgba(75, 213, 238, .5); }
.more-links a:hover { border-bottom-style: solid; }

.seasons { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 2px; }
.seasons-label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-inline-end: 2px; }
.season {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  background: rgba(255, 255, 255, .03);
  font-family: var(--f-display);
  font-size: 13px;
  color: var(--muted);
  transition: background .15s, color .15s, border-color .15s;
}
.season:hover { border-color: rgba(77, 255, 136, .6); color: var(--text); }
.season[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #03140a; }

.actions { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }
.btn-ico {
  flex: 1 1 0;
  min-width: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: rgba(255, 255, 255, .03);
  color: var(--muted);
  transition: background .15s, color .15s, border-color .15s, box-shadow .2s;
}
.btn-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.btn-w:hover { color: var(--green); border-color: rgba(77, 255, 136, .6); }
.btn-x:hover { color: var(--red); border-color: rgba(255, 77, 94, .6); }
.btn-w[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #03140a; box-shadow: 0 0 14px rgba(77, 255, 136, .45); }
.btn-x[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #1a0306; box-shadow: 0 0 14px rgba(255, 77, 94, .45); }

/* Состояния карточек — цвета световых мечей */
.card.is-w { border-color: rgba(77, 255, 136, .5); box-shadow: 0 0 0 1px rgba(77, 255, 136, .2), 0 0 26px rgba(77, 255, 136, .14); }
.card.is-w .poster img { filter: saturate(.55) brightness(.5); }
.card.is-w .stamp { opacity: 1; color: var(--green); transform: translate(-50%, -50%) rotate(-12deg) scale(1); }
.card.is-x { opacity: .5; }
.card.is-x:hover, .card.is-x:focus-within { opacity: .9; }
.card.is-x .poster img { filter: grayscale(1) brightness(.55); }
.card.is-x .stamp { opacity: 1; color: var(--red); transform: translate(-50%, -50%) rotate(-12deg) scale(1); }
.card.is-part { border-color: rgba(255, 232, 31, .35); }
.card.is-next { border-color: var(--blue); box-shadow: 0 0 0 1px rgba(88, 180, 255, .35), 0 0 34px rgba(88, 180, 255, .3); }
.card.is-next .next-tag { display: block; }
.card.is-next .flag { bottom: 42px; }
.card.flash { animation: flash 1.6s ease; }
@keyframes flash {
  0%, 100% { box-shadow: 0 0 0 1px rgba(88, 180, 255, .35), 0 0 34px rgba(88, 180, 255, .3); }
  30% { box-shadow: 0 0 0 3px var(--blue), 0 0 70px rgba(88, 180, 255, .8); }
}

.extras { padding-bottom: 20px; }

/* Широкий экран: название эпохи — липкая колонка-«таймлайн» слева */
@media (min-width: 1100px) {
  .era {
    display: grid;
    grid-template-columns: 250px 1fr;
    column-gap: 32px;
    align-items: start;
  }
  .era-side {
    position: sticky;
    top: 86px;
    padding-inline-start: 16px;
    border-inline-start: 2px solid rgba(255, 232, 31, .35);
  }
  .era-head { flex-direction: column; align-items: flex-start; gap: 6px; padding-bottom: 0; border-bottom: 0; }
  .era-name { font-size: 25px; line-height: 1.12; }
  .era-count { margin-inline-start: 0; font-size: 18px; }
  .era-text { margin: 10px 0 0; font-size: 14.5px; }
}
.empty { padding: 60px 0; text-align: center; color: var(--muted); font-size: 18px; }
[hidden] { display: none !important; }

/* ---------- Footer ---------- */
.footer { margin-top: 56px; padding: 36px 0 48px; border-top: 1px solid var(--line); background: rgba(3, 4, 10, .7); }
.footer-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.panel { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.panel h3 { margin: 0 0 6px; font-family: var(--f-display); font-weight: 400; font-size: 16px; letter-spacing: .06em; text-transform: uppercase; color: var(--yellow); }
.panel p { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.io button, .file-btn {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 9px;
  background: rgba(255, 255, 255, .05);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.io button:hover, .file-btn:hover { border-color: rgba(255, 232, 31, .6); color: var(--yellow); }
.io { display: flex; flex-wrap: wrap; gap: 8px; }
.file-btn input { display: none; }
.io .danger:hover { border-color: rgba(255, 77, 94, .7); color: var(--red); }
.src { margin: 0 0 10px; padding-inline-start: 18px; font-size: 14px; color: var(--muted); }
.src li { margin-bottom: 4px; }
.src a { color: var(--crawl-blue); text-decoration: none; }
.src a:hover { text-decoration: underline; }
.stamp-date { font-size: 12.5px !important; color: var(--dim) !important; margin: 0 !important; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 50;
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border: 1px solid rgba(255, 232, 31, .5);
  border-radius: 10px;
  background: rgba(3, 4, 10, .95);
  color: var(--text);
  font-weight: 700;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Languages ---------- */
.lang-menu { position: absolute; top: 14px; inset-inline-end: 16px; z-index: 30; }
.lang-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(3, 4, 10, .6);
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  list-style: none;
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu details[open] summary { color: var(--text); border-color: rgba(255, 232, 31, .5); }
.lang-menu svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lang-menu ul {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-end: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 2px;
  max-height: 70vh;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  list-style: none;
  text-align: start;
  background: rgba(6, 8, 16, .97);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55);
}
.lang-menu a { display: block; padding: 6px 10px; border-radius: 7px; color: var(--muted); font-size: 14px; text-decoration: none; white-space: nowrap; }
.lang-menu a:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.lang-menu a[aria-current] { color: var(--yellow); }
.langs { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.langs a { color: var(--crawl-blue); text-decoration: none; }
.langs a:hover { text-decoration: underline; }
.langs a[aria-current] { color: var(--yellow); }
.fan { margin: 22px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--dim); }
.fan b { color: var(--muted); }
.fan.tmdb { margin-top: 6px; }
.fan a { color: var(--crawl-blue); text-decoration: none; }
.fan a:hover { text-decoration: underline; }

/* ---------- 404: звёздная карта архива джедаев, на которой нет планеты ---------- */
.nf {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 16px;
  text-align: center;
}
.nf::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .75;
  background-image:
    radial-gradient(1px 1px at 22px 34px, #fff, transparent),
    radial-gradient(1px 1px at 128px 86px, #cfe8ff, transparent),
    radial-gradient(1.5px 1.5px at 210px 152px, #fff, transparent),
    radial-gradient(1px 1px at 64px 188px, #fff, transparent),
    radial-gradient(1px 1px at 268px 44px, #fff6d8, transparent),
    radial-gradient(1.2px 1.2px at 176px 236px, #fff, transparent);
  background-size: 300px 260px;
}
.nf-logo { text-decoration: none; }
.nf .logo { font-size: clamp(30px, 6.5vw, 64px); animation: none; }
.nf-holo { position: relative; width: min(300px, 74vw); margin: 6px 0 2px; }
/* луч голопроектора */
.nf-holo::before {
  content: '';
  position: absolute;
  inset: 30% 10% 0;
  background: linear-gradient(to top, rgba(75, 213, 238, .22), transparent 80%);
  clip-path: polygon(42% 100%, 58% 100%, 100% 0, 0 0);
  filter: blur(8px);
  pointer-events: none;
}
/* строки развёртки голограммы */
.nf-holo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(3, 4, 10, .38) 0 1px, transparent 1px 3px);
  pointer-events: none;
}
.nf-map {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  color: var(--crawl-blue);
  filter: drop-shadow(0 0 5px rgba(75, 213, 238, .65));
  animation: nf-flicker 6s infinite;
}
.nf-map circle, .nf-map path { fill: none; stroke: currentColor; stroke-width: 1.2; }
.nf-frame { stroke-opacity: .55; stroke-width: 2 !important; }
.nf-cross { stroke-opacity: .16; }
.nf-orbit { stroke-opacity: .38; }
.nf-orbit-lost { stroke-dasharray: 3 7; stroke-opacity: .6; }
.nf-map .nf-star { fill: currentColor; stroke: none; opacity: .7; }
.nf-map .nf-sun { fill: #e8fbff; stroke: none; filter: drop-shadow(0 0 8px #4bd5ee); }
.nf-map .nf-planet { fill: currentColor; stroke: none; }
.nf-spin { animation: nf-spin linear infinite; }
.nf-spin-1 { animation-duration: 14s; }
.nf-spin-2 { animation-duration: 30s; }
.nf-ghost { stroke-dasharray: 2.5 3; }
.nf-pulse { transform-box: fill-box; transform-origin: center; animation: nf-pulse 2.6s ease-out infinite; }
.nf-map .nf-pull circle { fill: currentColor; stroke: none; animation: nf-pull 4s ease-in infinite; }
.nf-404 { fill: currentColor; font-family: var(--f-display); font-size: 24px; text-anchor: middle; letter-spacing: .08em; }
@keyframes nf-spin { to { transform: rotate(360deg); } }
@keyframes nf-pulse { from { transform: scale(1); opacity: .9; } to { transform: scale(3.4); opacity: 0; } }
@keyframes nf-pull { from { transform: translate(var(--x), var(--y)); opacity: 0; } 30% { opacity: 1; } to { transform: translate(0, 0); opacity: 0; } }
@keyframes nf-flicker { 0%, 90%, 93%, 96%, 100% { opacity: 1; } 91.5% { opacity: .55; } 94.5% { opacity: .8; } }
.nf-title { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: clamp(18px, 3.4vw, 26px); letter-spacing: .06em; text-transform: uppercase; }
.nf-quote { max-width: 34em; margin: 4px 0 0; }
.nf-quote blockquote { margin: 0; font-size: clamp(17px, 2.4vw, 20px); color: var(--text); }
.nf-quote figcaption { margin-top: 6px; font-size: 14px; color: var(--muted); }
.nf-erased { max-width: 34em; margin: 4px 0 0; color: var(--crawl-blue); }
.nf-home {
  margin-top: 12px;
  padding: 12px 20px;
  border: 1px solid rgba(88, 180, 255, .55);
  border-radius: 12px;
  background: rgba(88, 180, 255, .08);
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
  transition: background .2s, box-shadow .2s;
}
.nf-home:hover { background: rgba(88, 180, 255, .16); box-shadow: 0 0 22px rgba(88, 180, 255, .25); }

/* ---------- Письменности без глифов в Russo One ---------- */
:root:lang(ja) { --f-display: 'Russo One', 'Noto Sans JP', sans-serif; }
:root:lang(ko) { --f-display: 'Russo One', 'Noto Sans KR', sans-serif; }
:root:lang(zh) { --f-display: 'Russo One', 'Noto Sans TC', sans-serif; }
:root:lang(th) { --f-display: 'Russo One', 'Noto Sans Thai', sans-serif; --f-text: 'Guillemets', 'News Cycle', 'Noto Sans Thai', sans-serif; }
:root:lang(ar) { --f-display: 'Russo One', 'Noto Kufi Arabic', sans-serif; --f-text: 'Guillemets', 'News Cycle', 'Noto Sans Arabic', Tahoma, sans-serif; }
:root:lang(fa) { --f-display: 'Russo One', 'Vazirmatn', sans-serif; --f-text: 'Guillemets', 'News Cycle', 'Vazirmatn', Tahoma, sans-serif; }

/* ---------- Right-to-left (ar, fa) ---------- */
[dir="rtl"] .hilt { border-radius: 2px 4px 4px 2px; }
[dir="rtl"] .blade, [dir="rtl"] .blade-fill { border-radius: 6px 0 0 6px; }
[dir="rtl"] .btn-next-k::after { content: ' ◀'; }
/* Разрядка ломает связное арабское письмо */
:lang(ar) *, :lang(fa) * { letter-spacing: 0 !important; }
:lang(ar) .logo span:last-child, :lang(fa) .logo span:last-child { margin-inline-end: 0; }
/* У арабского письма и тайских диакритик высокие выносные — строкам логотипа нужно больше воздуха */
:lang(ar) .logo, :lang(fa) .logo { line-height: 1.32; }
:lang(th) .logo { line-height: 1.12; }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .hero { min-height: auto; padding-top: 64px; }
  .crawl-wrap { height: 190px; }
  .crawl { font-size: 17px; }
  .crawl .crawl-title { font-size: 23px; }
  .stats { padding: 14px; }
  .count b { font-size: 21px; }
  .count span { font-size: 10.5px; letter-spacing: .06em; }
  .toolbar-in {
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .toolbar-in::-webkit-scrollbar { display: none; }
  .seg { flex: 0 0 auto; }
  .seg button { padding: 6px 9px; font-size: 13px; }
  .search { flex: 0 0 170px; }
  .search input { height: 34px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .body { padding: 10px 10px 12px; }
  .title { font-size: 15px; }
  .note { font-size: 13px; }
  .actions { gap: 6px; }
  .btn-ico { height: 34px; }
  .stamp { font-size: 14px; }
  .soon-grid { grid-template-columns: 1fr; }
  .era-count { margin-inline-start: 0; }
  .lang-menu { top: 10px; inset-inline-end: 10px; }
}
@media (max-width: 380px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .seg button { padding: 6px 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .crawl { animation: none; transform: none; position: static; text-align: start; }
  .crawl-wrap { height: auto; perspective: none; -webkit-mask-image: none; mask-image: none; }
  .intro, .tagline { opacity: 1; }
}
