/* ===== Архів Кібертрона — базові стилі ===== */
:root {
  --bg: #0a0c11;
  --bg-2: #10141c;
  --panel: #151a24;
  --panel-2: #1b2130;
  --line: #2a3243;
  --line-soft: #1f2634;
  --text: #e7ebf3;
  --muted: #94a0b6;
  --accent: #d7ff3a;
  --accent-ink: #141a00;
  --autobot: #ef4f55;
  --decepticon: #9a7bff;
  --other: #38c98a;
  --radius: 14px;
  --maxw: 1180px;
  --font-head: "Unbounded", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(215,255,58,.08), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(154,123,255,.07), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body::before { /* тонка технічна сітка */
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .35;
  pointer-events: none;
  z-index: -1;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.8rem); text-transform: uppercase; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); text-transform: uppercase; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
main { flex: 1; }

.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 16px; top: 16px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; z-index: 100; }

/* ===== Шапка ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,12,17,.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--font-head); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.nav-links { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 10px;
  color: var(--muted); font-family: var(--font-head); font-weight: 600;
  text-transform: uppercase; font-size: .9rem; letter-spacing: .05em;
}
.nav-links a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--accent-ink); background: var(--accent); }
.nav-toggle {
  display: none; background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; width: 42px; height: 42px; cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 760px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 64px;
    flex-direction: column; padding: 12px 16px 16px;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
}

/* ===== Головна: hero ===== */
.hero { padding: 72px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .14em;
  font-size: .8rem; color: var(--accent);
  border: 1px solid rgba(215,255,58,.35); padding: 6px 12px; border-radius: 999px; margin-bottom: 20px;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.hero h1 span { color: var(--accent); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 56ch; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 12px; font-family: var(--font-head); font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; font-size: .92rem;
  border: 1px solid var(--line); color: var(--text); background: var(--panel);
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); background: var(--panel-2); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { background: #e6ff7a; }

.spark { width: 100%; max-width: 420px; margin: 0 auto; aspect-ratio: 1; }
.spark .ring-outer { transform-origin: 50% 50%; animation: spin 40s linear infinite; }
.spark .ring-inner { transform-origin: 50% 50%; animation: spin 26s linear infinite reverse; }
.spark .core { animation: pulse 3.2s ease-in-out infinite; transform-origin: 50% 50%; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: .85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) {
  .spark .ring-outer, .spark .ring-inner, .spark .core { animation: none; }
}

@media (max-width: 860px) {
  .hero { padding: 48px 0 32px; }
  .hero-grid { grid-template-columns: 1fr; }
  .spark { max-width: 280px; order: -1; }
}

/* ===== Секції / картки ===== */
.section { padding: 48px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head p { color: var(--muted); margin: 0; max-width: 60ch; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 8px; }
.stat { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 18px; }
.stat b { display: block; font-family: var(--font-head); font-size: 1.9rem; color: var(--accent); line-height: 1.1; }
.stat span { color: var(--muted); font-size: .9rem; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .feature-grid { grid-template-columns: 1fr; } }
.feature {
  position: relative; display: block; color: var(--text);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  overflow: hidden; transition: border-color .2s ease, transform .2s ease;
}
.feature:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-3px); }
.feature .num { font-family: var(--font-head); color: var(--accent); font-size: .85rem; letter-spacing: .14em; }
.feature p { color: var(--muted); margin: 0; }
.feature::after {
  content: "→"; position: absolute; right: 20px; top: 18px;
  font-size: 1.4rem; color: var(--muted); transition: color .2s ease, transform .2s ease;
}
.feature:hover::after { color: var(--accent); transform: translateX(4px); }

.factions { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .factions { grid-template-columns: 1fr; } }
.faction-card { border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); background: var(--panel); }
.faction-card.autobot { border-top: 4px solid var(--autobot); }
.faction-card.decepticon { border-top: 4px solid var(--decepticon); }
.faction-card h3 { text-transform: uppercase; }
.faction-card.autobot h3 { color: var(--autobot); }
.faction-card.decepticon h3 { color: var(--decepticon); }
.faction-card p { color: var(--muted); margin: 0; }

.callout {
  border: 1px dashed rgba(215,255,58,.45); background: rgba(215,255,58,.06);
  border-radius: var(--radius); padding: 18px 20px; color: var(--text);
}
.callout b { color: var(--accent); }

/* ===== Заголовок внутрішніх сторінок ===== */
.page-head { padding: 56px 0 24px; border-bottom: 1px solid var(--line-soft); margin-bottom: 32px; }
.page-head p { color: var(--muted); max-width: 64ch; margin: 0; }

/* ===== Фільтри ===== */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: .85rem;
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  background: var(--panel); color: var(--muted); border: 1px solid var(--line);
}
.chip:hover { color: var(--text); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip[data-filter="autobot"][aria-pressed="true"] { background: var(--autobot); border-color: var(--autobot); color: #fff; }
.chip[data-filter="decepticon"][aria-pressed="true"] { background: var(--decepticon); border-color: var(--decepticon); color: #fff; }
.chip[data-filter="other"][aria-pressed="true"] { background: var(--other); border-color: var(--other); color: #04170e; }
.search {
  flex: 1 1 240px; max-width: 340px;
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 14px; font: inherit;
}
.search:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ===== Картки персонажів ===== */
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.char-card {
  --fc: var(--muted);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden;
}
.char-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--fc); }
.char-card.autobot { --fc: var(--autobot); }
.char-card.decepticon { --fc: var(--decepticon); }
.char-card.other { --fc: var(--other); }
.char-top { display: flex; gap: 14px; align-items: center; }
.badge-hex {
  width: 54px; height: 60px; flex: none; display: grid; place-items: center;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(160deg, var(--fc), color-mix(in srgb, var(--fc) 35%, #000));
  font-family: var(--font-head); font-weight: 700; color: #fff; font-size: 1.1rem; letter-spacing: .04em;
}
.char-card h3 { margin: 0; }
.char-card .en { color: var(--muted); font-size: .85rem; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: .88rem; margin: 0; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }
.char-card p { color: #c9d1df; font-size: .95rem; margin: 0; }
.tag {
  align-self: flex-start; font-family: var(--font-head); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em;
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--fc); color: var(--fc);
}
.empty { color: var(--muted); padding: 32px 0; text-align: center; }

/* ===== Таймлайн ===== */
.era-switch { margin-bottom: 28px; }
.timeline { position: relative; list-style: none; margin: 0; padding: 0 0 0 28px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--accent), var(--line)); }
.timeline li { position: relative; padding: 0 0 28px; }
.timeline li::before {
  content: ""; position: absolute; left: -28px; top: 6px; width: 16px; height: 16px;
  background: var(--bg); border: 2px solid var(--accent); transform: rotate(45deg);
}
.tl-when { font-family: var(--font-head); color: var(--accent); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .9rem; }
.tl-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-top: 6px; }
.tl-card h3 { margin-bottom: .3em; }
.tl-card p { color: var(--muted); margin: 0; }

/* ===== Фільми / серіали ===== */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.media-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
}
.media-poster {
  aspect-ratio: 16 / 7; position: relative; display: flex; align-items: end; padding: 14px 16px;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.03) 0 12px, transparent 12px 24px),
    linear-gradient(135deg, var(--panel-2), #0d1017);
  border-bottom: 1px solid var(--line);
}
.media-year { font-family: var(--font-head); font-size: 2.2rem; font-weight: 700; color: rgba(231,235,243,.18); position: absolute; right: 14px; top: 6px; }
.media-kind { font-family: var(--font-head); font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); }
.media-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.media-body h3 { margin: 0; }
.media-body .en { color: var(--muted); font-size: .85rem; }
.media-body p { color: #c9d1df; margin: 4px 0 0; font-size: .95rem; }
.media-card.upcoming { border-style: dashed; border-color: rgba(215,255,58,.5); }

/* ===== Підвал ===== */
.site-footer { border-top: 1px solid var(--line-soft); margin-top: 56px; padding: 28px 0; color: var(--muted); font-size: .88rem; }
.footer-grid { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer p { margin: 0; max-width: 70ch; }

/* ===== 404 ===== */
.notfound { text-align: center; padding: 96px 0; }
.notfound .code { font-family: var(--font-head); font-size: clamp(4rem, 14vw, 8rem); color: var(--accent); line-height: 1; }

/* ======================================================================
   Оригінальна «кібертронська» графіка: метал, панелі, заклепки, світло
   ====================================================================== */
:root {
  --metal: linear-gradient(160deg, #2a3142 0%, #171c27 45%, #10141c 55%, #1d2330 100%);
  --hex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 1 L55 17 L55 49 L28 65 L1 49 L1 17 Z M28 65 L28 97 M0 81 L28 65 L56 81' fill='none' stroke='%23ffffff' stroke-opacity='.045' stroke-width='1'/%3E%3C/svg%3E");
}
body::before {
  background-image: var(--hex);
  background-size: 56px 97px;
  opacity: 1;
}
body::after { /* світлова прожилка вздовж верху */
  content: ""; position: fixed; left: 0; right: 0; top: 64px; height: 1px; z-index: 49; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(215,255,58,.7) 20%, rgba(127,243,255,.6) 50%, rgba(215,255,58,.7) 80%, transparent);
  box-shadow: 0 0 12px rgba(215,255,58,.45);
}

/* Металеві панелі з заклепками */
.stat, .feature, .faction-card, .char-card, .media-card, .tl-card {
  background: var(--metal);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), inset 0 -1px 0 rgba(0,0,0,.6), 0 10px 30px -18px rgba(0,0,0,.9);
}
.feature, .faction-card, .stat { position: relative; }
.feature::before, .faction-card::before, .stat::before {
  content: ""; position: absolute; inset: 8px; pointer-events: none;
  background:
    radial-gradient(circle, #59647a 1.6px, transparent 2px) top left / 10px 10px no-repeat,
    radial-gradient(circle, #59647a 1.6px, transparent 2px) top right / 10px 10px no-repeat,
    radial-gradient(circle, #59647a 1.6px, transparent 2px) bottom left / 10px 10px no-repeat,
    radial-gradient(circle, #59647a 1.6px, transparent 2px) bottom right / 10px 10px no-repeat;
}
.feature { clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px)); }

/* Металевий текст у великих заголовках */
.hero h1, .page-head h1 {
  background: linear-gradient(180deg, #ffffff 0%, #c9d1df 48%, #6f7a8e 52%, #e7ebf3 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.6));
}
.hero h1 span {
  background: linear-gradient(180deg, #f4ffb8 0%, #d7ff3a 48%, #8fae12 52%, #e6ff7a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Емблеми */
.emblem { width: 1em; height: 1em; flex: none; }
.tag { display: inline-flex; align-items: center; gap: 6px; }
.tag .emblem { width: 14px; height: 14px; }
.faction-card { display: grid; grid-template-columns: 76px 1fr; gap: 6px 18px; align-items: start; }
.faction-card .faction-emblem { grid-row: span 2; width: 76px; height: 76px; }
.faction-card .faction-emblem .emblem { width: 100%; height: 100%; filter: drop-shadow(0 0 14px currentColor); }
.faction-card.autobot .faction-emblem { color: rgba(239,79,85,.45); }
.faction-card.decepticon .faction-emblem { color: rgba(154,123,255,.45); }
.faction-card h3 { margin: 4px 0 0; }
@media (max-width: 420px) { .faction-card { grid-template-columns: 1fr; } .faction-card .faction-emblem { grid-row: auto; width: 60px; height: 60px; } }

/* Шоломи персонажів */
.head-frame {
  width: 64px; height: 64px; flex: none; display: grid; place-items: center;
  border-radius: 12px; border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--fc) 30%, transparent), transparent 70%), #0b0e15;
}
.head-frame .head { width: 54px; height: 47px; transition: transform .3s ease; }
.char-card:hover .head-frame .head { transform: translateY(-2px) scale(1.06); }
.char-card:hover { border-color: color-mix(in srgb, var(--fc) 60%, var(--line)); }

/* Постери */
.media-poster { padding: 0; aspect-ratio: 16 / 7; overflow: hidden; background: #0b0e15; }
.poster-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; transition: transform .5s ease; }
.media-card:hover .poster-art { transform: scale(1.04); }
.media-kind {
  position: absolute; left: 12px; bottom: 10px; z-index: 1;
  background: rgba(10,12,17,.78); border: 1px solid rgba(215,255,58,.4);
  padding: 3px 9px; border-radius: 999px; backdrop-filter: blur(4px);
}
.trailer {
  margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; font-weight: 700;
  padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line); color: var(--text); background: rgba(255,255,255,.03);
}
.trailer svg { width: 14px; height: 14px; color: var(--autobot); }
.trailer:hover { text-decoration: none; border-color: var(--accent); }
.media-body p { margin-bottom: 10px; }

/* Іскра «трансформується» при наведенні */
.spark { cursor: pointer; }
.spark .ring-outer, .spark .ring-inner, .spark .core, .spark .shard { transition: transform .8s cubic-bezier(.6,-0.3,.3,1.4), opacity .6s ease; }
.spark .shard { transform-origin: 200px 200px; opacity: 0; }
.spark:hover .ring-outer { animation-play-state: paused; transform: scale(.82) rotate(30deg); }
.spark:hover .ring-inner { animation-play-state: paused; transform: scale(1.18) rotate(-30deg); }
.spark:hover .shard { opacity: 1; }
.spark:hover .shard.s1 { transform: translate(-26px,-26px); }
.spark:hover .shard.s2 { transform: translate(26px,-26px); }
.spark:hover .shard.s3 { transform: translate(26px,26px); }
.spark:hover .shard.s4 { transform: translate(-26px,26px); }

/* ======================================================================
   v3: шрифт Russo One, перемикач мов, нові розділи
   ====================================================================== */
h1, h2, h3 { font-weight: 400; letter-spacing: .02em; }
.nav-links a, .btn, .chip, .eyebrow, .tl-when, .media-kind, .tag, .brand { font-weight: 400; }
.nav { flex-wrap: nowrap; }
.brand span { white-space: nowrap; }
.nav-right { display: flex; align-items: center; gap: 8px; order: 3; }
.lang-switch {
  font-family: var(--font-head); font-size: .85rem; letter-spacing: .08em; color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; background: var(--panel);
}
.lang-switch:hover { border-color: var(--accent); text-decoration: none; }
.nav-links { order: 2; }
.nav-links a { padding: 8px 10px; font-size: .82rem; }
@media (max-width: 1560px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; padding: 12px 16px 16px;
    background: var(--bg-2); border-bottom: 1px solid var(--line); display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: .95rem; padding: 10px 14px; }
}
@media (min-width: 1561px) { .nav-right { order: 4; } }

/* Hero з ілюстрацією */
.hero-image { position: relative; overflow: hidden; padding: 120px 0 110px; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: 65% center; }
.hero-bg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10,12,17,.94) 0%, rgba(10,12,17,.75) 42%, rgba(10,12,17,.15) 75%, rgba(10,12,17,.35) 100%),
              linear-gradient(0deg, var(--bg) 0%, transparent 30%); }
.hero-image .container { position: relative; }
.hero-image .hero-grid { grid-template-columns: minmax(0, 640px); }
@media (max-width: 760px) {
  .hero-image { padding: 72px 0 64px; }
  .hero-bg { background-position: 70% center; }
  .hero-bg::after { background: linear-gradient(0deg, var(--bg) 5%, rgba(10,12,17,.8) 55%, rgba(10,12,17,.45) 100%); }
}

/* Фон ангара для «Персонажів» */
body.bg-hangar { background: linear-gradient(180deg, rgba(10,12,17,.55), var(--bg) 70%), url('/img/bg-corridor.webp') center top / 100% auto no-repeat, var(--bg); }
@media (max-width: 760px) { body.bg-hangar { background-size: auto 520px, auto 520px, auto; } }

/* Таймлайн з картинками */
.tl-card.has-img { padding: 0; overflow: hidden; display: grid; grid-template-columns: minmax(0, 46%) 1fr; }
.tl-card.has-img img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; }
.tl-card .tl-text { padding: 16px 18px; align-self: center; }
@media (max-width: 760px) { .tl-card.has-img { grid-template-columns: 1fr; } }
.timeline[hidden], .media-grid[hidden] { display: none; }

/* Трейлери */
button.media-poster { all: unset; box-sizing: border-box; display: block; position: relative; aspect-ratio: 16 / 7; width: 100%; cursor: pointer; overflow: hidden; background: #0b0e15; border-bottom: 1px solid var(--line); }
button.media-poster:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; z-index: 2;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(10,12,17,.72); border: 2px solid var(--accent); color: var(--accent);
  box-shadow: 0 0 24px rgba(215,255,58,.35); transition: transform .2s ease, background .2s ease;
}
.play svg { width: 26px; height: 26px; margin-left: 3px; }
button.media-poster:hover .play { transform: scale(1.1); background: var(--accent); color: var(--accent-ink); }
.media-poster.player { aspect-ratio: 16 / 9; }
.media-poster.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.trailer { font-size: .72rem; }
.note, .muted { color: var(--muted); font-size: .92rem; }
.note { margin-top: 28px; }
.count { color: var(--muted); margin: -8px 0 16px; font-size: .9rem; }
[hidden] { display: none !important; }

/* Енциклопедія */
.enc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.enc-entry { background: var(--metal); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; scroll-margin-top: 90px; }
.enc-entry:target { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 24px -6px rgba(215,255,58,.6); }
.enc-entry h2 { font-size: 1.2rem; text-transform: none; margin: 6px 0 8px; }
.enc-entry h2 a { color: var(--text); }
.enc-entry p { color: #c9d1df; margin: 0; font-size: .95rem; }
.enc-cat { font-family: var(--font-head); font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); }

/* Історії */
.stories { display: grid; gap: 18px; }
.story { background: var(--metal); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; max-width: 820px; }
.story h2 { text-transform: none; font-size: 1.5rem; }
.story-lead { color: var(--accent); font-style: italic; }
.story p { color: #d3d9e4; }
.trend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 16px; }
.trend { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 12px; padding: 16px; }
.trend h3 { font-size: 1rem; color: var(--accent); }
.trend p { color: var(--muted); margin: 0; font-size: .92rem; }

/* Розмальовки */
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 20px; }
.dl-card { background: var(--metal); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.dl-card img { width: 100%; height: auto; background: #fff; aspect-ratio: 210 / 297; object-fit: cover; }
.dl-card > div { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.dl-card h2 { font-size: 1.15rem; text-transform: none; margin: 0; }
.dl-card p { color: var(--muted); margin: 0 0 6px; font-size: .92rem; }
.dl-card .btn { margin-top: auto; align-self: flex-start; }

/* Про сайт */
.narrow { max-width: 860px; }
.faq-list { display: grid; gap: 8px; margin-bottom: 40px; }
.faq { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: #c9d1df; margin: 10px 0 0; }
.policy { border-left: 3px solid var(--accent); padding: 4px 0 4px 18px; margin: 18px 0; }
.policy h3 { text-transform: none; font-size: 1.1rem; }
.policy li, .policy p { color: #c9d1df; }
.policy li { margin-bottom: 6px; }
.sources a { word-break: break-word; }
.page-head h1 { font-size: clamp(1.9rem, 5vw, 3.2rem); }

/* v4: прості embed-плеєри, сюжети фільмів, світліший банер */
.media-poster.player { padding: 0; aspect-ratio: 16 / 9; background: #000; }
.media-card .kind-tag { align-self: flex-start; font-family: var(--font-head); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); border: 1px solid rgba(215,255,58,.4); border-radius: 999px; padding: 2px 9px; }
.media-body .tagline { color: #e7ebf3; font-weight: 500; }
.media-body .event { margin: 2px 0 0; color: #c9d1df; font-size: .92rem; }
.media-body .event b { color: var(--accent); font-weight: 600; }
.media-body .plot { color: #b9c2d2; font-size: .92rem; line-height: 1.6; }
.media-grid[data-media="film"] { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
@media (max-width: 420px) { .media-grid[data-media="film"] { grid-template-columns: 1fr; } }
.hero-bg { background-position: 80% center; }
.hero-bg::after {
  background: linear-gradient(90deg, rgba(10,12,17,.92) 0%, rgba(10,12,17,.7) 38%, rgba(10,12,17,.1) 70%, rgba(10,12,17,0) 100%),
              linear-gradient(0deg, var(--bg) 0%, transparent 28%);
}

/* v5: hero — механічна планета */
.hero-bg { background-position: 72% center; }
@media (max-width: 760px) { .hero-bg { background-position: 60% center; } }
@media (max-width: 760px) {
  .hero-bg::after { background: linear-gradient(0deg, var(--bg) 4%, rgba(10,12,17,.86) 45%, rgba(10,12,17,.7) 100%); }
}

/* v6: Unbounded + неоновий лимонний */
h1 { font-weight: 700; font-size: clamp(1.9rem, 4.6vw, 3.3rem); letter-spacing: 0; }
h2 { font-weight: 700; font-size: clamp(1.25rem, 2.4vw, 1.75rem); letter-spacing: 0; }
h3 { font-weight: 500; font-size: 1.05rem; letter-spacing: 0; }
.page-head h1 { font-size: clamp(1.7rem, 4.2vw, 2.7rem); }
.brand { font-size: .86rem; font-weight: 500; letter-spacing: .02em; }
.nav-links a { font-size: .66rem; letter-spacing: .03em; padding: 7px 9px; font-weight: 500; }
@media (max-width: 1560px) { .nav-links a { font-size: .8rem; padding: 10px 14px; } }
.btn { font-size: .78rem; letter-spacing: .03em; font-weight: 500; }
.chip { font-size: .72rem; letter-spacing: .03em; font-weight: 500; }
.eyebrow, .tl-when, .media-kind, .tag, .kind-tag, .enc-cat, .lang-switch { letter-spacing: .06em; font-weight: 500; }
.stat b { font-weight: 700; }
.enc-entry h2, .story h2, .dl-card h2 { font-size: 1.05rem; }
.btn-primary, .nav-links a[aria-current="page"] { color: #141a00; }
.hero h1 span { filter: drop-shadow(0 0 14px rgba(215,255,58,.25)); }
.nav-links a { white-space: nowrap; }
@media (min-width: 1561px) { .nav-links { gap: 2px; } .nav-links a { font-size: .62rem; padding: 7px 8px; } .brand { font-size: .8rem; } }

/* v7: фон із шестернями для внутрішніх сторінок + статті */
body.bg-gears { background: linear-gradient(180deg, rgba(10,12,17,.72), rgba(10,12,17,.9) 45%, var(--bg) 75%), url('/img/bg-gears.webp') center top / 100% auto no-repeat, var(--bg); }
@media (max-width: 760px) { body.bg-gears { background-size: auto, auto 460px, auto; } }
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.article-card { display: flex; flex-direction: column; background: var(--metal); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); transition: border-color .2s ease, transform .2s ease; }
.article-card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-3px); }
.article-card img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.article-card > div { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.article-card h2 { font-size: 1.05rem; text-transform: none; margin: 0; line-height: 1.3; }
.article-card p { color: var(--muted); margin: 0; font-size: .93rem; }
.read-more { margin-top: auto; color: var(--accent); font-family: var(--font-head); font-size: .72rem; letter-spacing: .04em; }
.article .page-head { border-bottom: 0; margin-bottom: 18px; padding-top: 18px; }
.article .page-head h1 { text-transform: none; font-size: clamp(1.5rem, 3.6vw, 2.3rem); line-height: 1.2; }
.article .enc-cat { display: block; margin-bottom: 12px; text-transform: none; letter-spacing: .02em; font-size: .78rem; }
.article-meta { color: var(--muted); font-size: .85rem; margin-top: 10px !important; }
.crumbs { margin: 28px 0 0; font-size: .9rem; }
.article-cover { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 26px; }
.article-body { font-size: 1.05rem; line-height: 1.75; color: #d6dce7; }
.article-body h2 { text-transform: none; font-size: 1.25rem; margin: 34px 0 10px; color: var(--text); }
.article-body p { margin: 0 0 16px; }
.more { margin-top: 40px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.more h2 { font-size: 1rem; text-transform: none; }
.more ul { margin: 0; padding-left: 18px; }
.more li { margin: 6px 0; }

/* v8: 5 великих пунктів меню + сторінки-хаби з блоками */
.nav-links { gap: 6px; }
.nav-links a { font-size: .8rem; padding: 9px 16px; letter-spacing: .03em; }
@media (min-width: 1561px) { .nav-links a { font-size: .8rem; padding: 9px 16px; } .brand { font-size: .86rem; } }
@media (max-width: 1560px) and (min-width: 1101px) {
  .nav-toggle { display: none; }
  .nav-links { position: static; display: flex; flex-direction: row; padding: 0; background: none; border: 0; }
  .nav-links a { font-size: .76rem; padding: 9px 13px; }
  .nav-right { order: 4; }
}
.hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.hub-card { display: flex; flex-direction: column; background: var(--metal); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); transition: border-color .2s ease, transform .2s ease; }
.hub-card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-4px); }
.hub-card img { width: 100%; height: auto; aspect-ratio: 16 / 8; object-fit: cover; }
.hub-card > div { padding: 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.hub-card h2 { margin: 0; text-transform: none; font-size: clamp(1.2rem, 2.4vw, 1.6rem); }
.hub-card p { color: var(--muted); margin: 0; }

/* v10: анімований космос для внутрішніх сторінок */
body.bg-space {
  background:
    radial-gradient(1200px 700px at 78% -10%, rgba(46, 84, 214, .38), transparent 60%),
    radial-gradient(900px 600px at -5% 35%, rgba(28, 46, 140, .32), transparent 65%),
    radial-gradient(1000px 800px at 60% 110%, rgba(64, 30, 140, .22), transparent 60%),
    linear-gradient(180deg, #0a1438 0%, #060a1e 38%, #03040b 75%, #000 100%);
  background-attachment: fixed;
}
body.bg-space::before { opacity: .35; }
.space-bg { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; }

/* v11: заголовки чисто білі, без градієнтів */
.hero h1, .page-head h1, .hero h1 span, .article .page-head h1 {
  background: none !important; -webkit-background-clip: border-box !important; background-clip: border-box !important;
  color: #ffffff !important; -webkit-text-fill-color: #ffffff !important; filter: none !important;
}

/* v11: сторінки персонажів */
.char-link { color: inherit; text-decoration: none; }
.char-link:hover { color: var(--accent); }
.char-card .read-more { display: inline-block; margin-top: .6rem; color: var(--accent); font-weight: 600; font-size: .9rem; text-decoration: none; }
.char-page .crumbs { margin: 1.2rem 0 .4rem; }
.char-page .crumbs a { color: var(--accent); text-decoration: none; }
.char-hero { display: grid; grid-template-columns: 160px 1fr; gap: 1.6rem; align-items: center; padding: 1.4rem; margin-bottom: 1.6rem;
  background: rgba(10, 14, 24, .72); border: 1px solid rgba(255,255,255,.1); border-radius: 18px; backdrop-filter: blur(6px); }
.char-hero .head-frame.big { width: 160px; height: 160px; }
.char-hero .head-frame.big svg { width: 100%; height: 100%; }
.char-hero .page-head { padding: 0; margin: 0; text-align: left; }
.char-hero .page-head h1 { margin: .5rem 0 .2rem; }
.char-hero .en { opacity: .6; font-size: .95rem; margin-bottom: .6rem; }
.char-sec { background: rgba(10, 14, 24, .72); border: 1px solid rgba(255,255,255,.08); border-radius: 16px; padding: 1.3rem 1.5rem; margin-bottom: 1.2rem; backdrop-filter: blur(6px); }
.char-sec h2 { font-family: var(--font-head); font-size: 1.15rem; margin: 0 0 .8rem; color: #fff; }
.char-sec p { line-height: 1.7; margin: 0 0 .8rem; }
.char-sec .note { font-size: .85rem; opacity: .65; }
.classifier { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1.4rem; margin: 0; }
.classifier div { border-left: 2px solid var(--accent); padding: .2rem 0 .2rem .8rem; }
.classifier dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; opacity: .6; margin-bottom: .15rem; }
.classifier dd { margin: 0; line-height: 1.5; }
.filmo { width: 100%; border-collapse: collapse; margin-bottom: .6rem; }
.filmo th, .filmo td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid rgba(255,255,255,.08); vertical-align: top; }
.filmo th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; opacity: .6; }
.filmo td:first-child { white-space: nowrap; color: var(--accent); font-weight: 600; width: 1%; }
.prequel { border-color: rgba(215,255,58,.35); }
.prequel p:not(.note) { font-style: italic; }
.char-nav { display: flex; justify-content: space-between; gap: 1rem; margin: 1.6rem 0 2.4rem; }
.char-nav a { color: var(--accent); text-decoration: none; font-weight: 600; }
@media (max-width: 640px) {
  .char-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .char-hero .page-head { text-align: center; }
  .classifier { grid-template-columns: 1fr; }
  .filmo td:first-child { white-space: normal; }
}
.char-hero .page-head, .char-hero .page-head p { border: 0 !important; padding-bottom: 0; }

/* v12: головна — сценарій прокрутки */
.js-reveal .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.js-reveal .reveal.in { opacity: 1; transform: none; }
.kicker { display: block; font-family: var(--font-head); color: var(--accent); font-size: .8rem; letter-spacing: .2em; margin-bottom: .3rem; }
.section-head h2 { margin: 0; }
.scroll-cue { position: absolute; left: 50%; bottom: 22px; width: 26px; height: 42px; margin-left: -13px; border: 2px solid rgba(255,255,255,.5); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--accent); animation: cue 1.6s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

.side-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.side-btn { display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; text-align: left; cursor: pointer;
  padding: 16px 18px; border-radius: 16px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.03); color: #fff; font: inherit; transition: .25s; }
.side-btn > span { grid-row: 1 / 3; width: 56px; height: 56px; }
.side-btn > span svg { width: 100%; height: 100%; }
.side-btn b { font-family: var(--font-head); font-size: 1.1rem; }
.side-btn small { color: var(--muted); }
.side-btn:hover { border-color: rgba(255,255,255,.3); }
.side-btn.autobot[aria-selected="true"] { border-color: #ff5a5a; background: linear-gradient(135deg, rgba(255,70,70,.18), rgba(255,255,255,.02)); box-shadow: 0 0 0 1px #ff5a5a inset; }
.side-btn.decepticon[aria-selected="true"] { border-color: #a77bff; background: linear-gradient(135deg, rgba(150,100,255,.2), rgba(255,255,255,.02)); box-shadow: 0 0 0 1px #a77bff inset; }
.side-roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.side-roster.pop .side-bot { animation: pop .45s both; }
.side-roster.pop .side-bot:nth-child(2) { animation-delay: .05s } .side-roster.pop .side-bot:nth-child(3) { animation-delay: .1s }
.side-roster.pop .side-bot:nth-child(4) { animation-delay: .15s } .side-roster.pop .side-bot:nth-child(5) { animation-delay: .2s }
.side-roster.pop .side-bot:nth-child(n+6) { animation-delay: .25s }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
.side-bot { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 10px; border-radius: 14px; background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08); color: #fff; text-decoration: none; transition: .2s; }
.side-bot:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-3px); }
.side-bot .head-frame { width: 84px; height: 84px; }
.side-bot .head-frame svg { width: 100%; height: 100%; }
.side-bot b { font-size: .95rem; } .side-bot span { font-size: .78rem; color: var(--muted); line-height: 1.3; }
.side-more { margin-top: 14px; } .side-more a { color: var(--accent); }

.dossier { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: start; padding: 26px; border-radius: 20px;
  background: radial-gradient(circle at 0 0, rgba(215,255,58,.08), transparent 50%), rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.1); animation: pop .5s both; }
.dossier .head-frame.big { width: 200px; height: 200px; } .dossier .head-frame svg { width: 100%; height: 100%; }
.dossier h3 { font-family: var(--font-head); font-size: clamp(1.6rem, 3vw, 2.3rem); margin: .3rem 0 .8rem; }
.dossier p { margin: 0 0 .6rem; line-height: 1.6; color: #d6dbe6; }
.dossier blockquote { margin: 1rem 0 1.2rem; padding: .9rem 1.1rem; border-left: 3px solid var(--accent); background: rgba(0,0,0,.25); border-radius: 0 12px 12px 0; font-style: italic; line-height: 1.6; }
.dossier blockquote span { display: block; font-style: normal; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: .4rem; }

.era-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 32%); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; scrollbar-color: var(--accent) transparent; }
.era-card { position: relative; scroll-snap-align: start; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 5; color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,.1); }
.era-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.era-card:hover img { transform: scale(1.06); }
.era-card div { position: absolute; inset: auto 0 0 0; padding: 18px; background: linear-gradient(0deg, rgba(5,7,12,.95), transparent); }
.era-card span { color: var(--accent); font-size: .8rem; font-weight: 600; }
.era-card h3 { margin: .3rem 0 0; font-family: var(--font-head); font-size: 1.05rem; }
.era-card:hover { text-decoration: none; }
.era-more { display: grid; place-items: center; background: linear-gradient(135deg, rgba(215,255,58,.15), rgba(255,255,255,.02)); }
.era-more div { position: static; background: none; text-align: center; }

.quiz { max-width: 760px; padding: 26px; border-radius: 20px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.1); }
.quiz-q { border: 0; margin: 0; padding: 0; animation: pop .4s both; }
.quiz-q legend { font-size: 1.15rem; font-weight: 600; margin-bottom: 14px; line-height: 1.4; }
.quiz-q legend span { display: block; color: var(--accent); font-family: var(--font-head); font-size: .8rem; margin-bottom: 6px; }
.quiz-opts { display: grid; gap: 10px; }
.quiz-opt { text-align: left; padding: 13px 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.04); color: #fff; font: inherit; cursor: pointer; transition: .2s; }
.quiz-opt:hover:not(:disabled) { border-color: var(--accent); }
.quiz-opt.right { border-color: #4ade80; background: rgba(74,222,128,.15); }
.quiz-opt.wrong { border-color: #f87171; background: rgba(248,113,113,.15); }
.quiz-why { margin: 12px 0 0; color: var(--muted); }
.quiz-result h3 { font-family: var(--font-head); font-size: 2.6rem; margin: 0; color: var(--accent); }

.mini-wall { display: grid; grid-template-columns: repeat(9, 1fr); gap: 10px; }
.mini-frame { position: relative; aspect-ratio: 2 / 3; padding: 5px; border-radius: 6px; background: linear-gradient(145deg, #3a3f4a, #12151c); box-shadow: 0 10px 24px rgba(0,0,0,.5); overflow: hidden; color: #fff; transition: transform .3s; }
.mini-frame .poster-art { width: 100%; height: 100%; display: block; border-radius: 3px; }
.mini-frame b { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-family: var(--font-head); font-size: .8rem; text-shadow: 0 2px 6px #000; }
.mini-frame:hover { transform: translateY(-6px) rotate(-1deg); }
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-grid.six { grid-template-columns: repeat(3, 1fr); }
.feature.compact { padding: 18px 20px; } .feature.compact h3 { margin: .3rem 0 0; }

@media (max-width: 860px) {
  .side-pick { grid-template-columns: 1fr; }
  .dossier { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 20px; }
  .dossier blockquote { text-align: left; }
  .dossier .head-frame.big { width: 150px; height: 150px; }
  .era-strip { grid-auto-columns: 78%; }
  .mini-wall { grid-template-columns: repeat(9, 110px); overflow-x: auto; padding-bottom: 10px; }
  .article-grid, .feature-grid.six { grid-template-columns: 1fr; }
}

/* v12: музей постерів */
.museum-hall { display: grid; gap: 34px; margin-bottom: 30px; }
.exhibit { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 34px; align-items: center; padding: 30px; border-radius: 22px;
  background: radial-gradient(ellipse at 25% 0, rgba(255,240,200,.08), transparent 60%), rgba(8,10,16,.75); border: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(6px); }
.exhibit:nth-child(even) { grid-template-columns: 1fr minmax(220px, 340px); }
.exhibit:nth-child(even) .exhibit-frame { order: 2; }
.exhibit-frame { position: relative; padding: 14px; border-radius: 6px; background: linear-gradient(145deg, #4a4f5b, #1a1d24 40%, #2c3039); box-shadow: 0 30px 60px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.08); }
.exhibit-canvas { position: relative; aspect-ratio: 2 / 3; overflow: hidden; border: 10px solid #f3f0e8; box-shadow: inset 0 0 20px rgba(0,0,0,.6); }
.exhibit-canvas .poster-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.exhibit-title { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 18px; background: linear-gradient(0deg, rgba(0,0,0,.85), transparent); font-family: var(--font-head); font-size: 1.05rem; line-height: 1.25; text-transform: uppercase; color: #fff; }
.exhibit-title small { display: block; color: var(--accent); font-size: .75rem; letter-spacing: .2em; margin-bottom: 4px; }
.spot { position: absolute; left: 50%; top: -60px; width: 70%; height: 80px; transform: translateX(-50%); background: radial-gradient(ellipse at center, rgba(255,245,210,.25), transparent 70%); pointer-events: none; }
.plaque { padding: 22px 24px; border-radius: 10px; background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); border: 1px solid rgba(255,255,255,.12); }
.plaque-no { font-family: var(--font-head); font-size: .75rem; letter-spacing: .2em; color: var(--accent); text-transform: uppercase; }
.plaque h2 { font-family: var(--font-head); margin: .4rem 0 .1rem; font-size: 1.5rem; }
.plaque .en { opacity: .6; margin-bottom: .6rem; }
.plaque dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: .8rem 0 1rem; font-size: .92rem; }
.plaque dt { color: var(--muted); } .plaque dd { margin: 0; }
.plaque p { line-height: 1.6; color: #d6dbe6; }
.plaque .read-more { color: var(--accent); font-weight: 600; }
.museum-banner { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; margin: 26px 0 8px; padding: 20px 24px; border-radius: 16px; text-decoration: none; color: #fff;
  border: 1px solid rgba(215,255,58,.4); background: linear-gradient(135deg, rgba(215,255,58,.12), rgba(255,255,255,.02)); }
.museum-banner b { font-family: var(--font-head); font-size: 1.2rem; } .museum-banner span { color: var(--muted); }
.museum-banner:hover { text-decoration: none; border-color: var(--accent); }
@media (max-width: 760px) {
  .exhibit, .exhibit:nth-child(even) { grid-template-columns: 1fr; padding: 18px; }
  .exhibit:nth-child(even) .exhibit-frame { order: 0; }
  .exhibit-frame { max-width: 300px; margin: 0 auto; }
}

/* v13: музика */
.music-sub { font-family: var(--font-head); font-size: 1.3rem; margin: 2rem 0 1rem; }
.album-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.album { padding: 20px; border-radius: 18px; background: rgba(8,10,16,.75); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(6px); display: flex; flex-direction: column; }
.album-year { font-family: var(--font-head); color: var(--accent); font-size: .8rem; letter-spacing: .15em; }
.album h3 { margin: .3rem 0 .1rem; font-size: 1.1rem; }
.album .en { color: var(--muted); font-size: .9rem; }
.album p { color: #d6dbe6; line-height: 1.55; margin: .7rem 0 1rem; flex: 1; }
.album .spotify { width: 100%; height: 352px; border: 0; border-radius: 12px; background: #121212; }
.album-links { display: flex; gap: 16px; margin-top: 10px; }
.album-links a { color: var(--accent); font-weight: 600; font-size: .9rem; }
@media (max-width: 860px) { .album-grid { grid-template-columns: 1fr; } .album .spotify { height: 232px; } }

/* v14: фон «Персонажі» — велетень у тіні скелі */
body.bg-hangar {
  background:
    linear-gradient(90deg, rgba(10,12,17,.85) 0%, rgba(10,12,17,.45) 45%, rgba(10,12,17,0) 70%) 0 64px / 100% 44vw no-repeat,
    linear-gradient(180deg, rgba(10,12,17,.15) 0, rgba(10,12,17,.35) 22vw, var(--bg) 42vw) 0 64px / 100% 46vw no-repeat,
    url('/img/bg-robot-canyon.webp') center 64px / 100% auto no-repeat,
    var(--bg);
}
body.bg-hangar .page-head p { color: #d6dbe6; text-shadow: 0 1px 12px rgba(0,0,0,.6); }
@media (max-width: 760px) {
  body.bg-hangar {
    background:
      linear-gradient(180deg, rgba(10,12,17,.45) 0, rgba(10,12,17,.7) 260px, var(--bg) 470px) 0 64px / 100% 480px no-repeat,
      url('/img/bg-robot-canyon.webp') 74% 64px / auto 480px no-repeat,
      var(--bg);
  }
}

/* v14: хлібні крихти */
.breadcrumbs { margin: 22px 0 0; font-size: .85rem; position: relative; z-index: 1; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; }
.breadcrumbs li { display: inline-flex; align-items: center; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin: 0 10px; opacity: .45; }
.breadcrumbs a { color: #cfd5e2; text-decoration: none; border-bottom: 1px solid transparent; }
.breadcrumbs a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.breadcrumbs [aria-current] { color: #fff; font-weight: 600; max-width: 60ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumbs + .page-head, .breadcrumbs + header, .breadcrumbs + article .page-head { padding-top: 18px; }
@media (max-width: 640px) { .breadcrumbs { margin-top: 14px; font-size: .8rem; } .breadcrumbs [aria-current] { max-width: 24ch; } }
.breadcrumbs [aria-current] { display: block; min-width: 0; }

/* v15: астероїди */
.asteroids { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.asteroids img { position: absolute; left: 0; top: 0; will-change: transform; filter: drop-shadow(0 10px 18px rgba(0,0,0,.55)); }
.site-header { z-index: 50; }
main, .site-footer { position: relative; z-index: 1; }
.asteroids.front { z-index: 3; }

/* v15: Всесвіт — горизонт Місяця */
body.bg-space.bg-moon {
  background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.15) 40%, rgba(0,0,0,.35) 100%), url('/img/bg-moon.webp') center bottom / cover no-repeat fixed, #000;
}
body.bg-moon::before { opacity: 0 !important; }
body.bg-moon .hub-card { backdrop-filter: blur(4px); }
@media (max-width: 760px) { body.bg-space.bg-moon { background-attachment: scroll; background-size: auto 100vh; background-position: 55% bottom; } }
body.bg-moon .space-bg { display: none; }
body.bg-moon .site-footer { background: rgba(0,0,0,.72); backdrop-filter: blur(6px); }

/* v15: компактні картки фільмів і сторінка фільму */
.film-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.film-card { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: rgba(12,15,24,.85); border: 1px solid rgba(255,255,255,.1); color: #fff; text-decoration: none; transition: .2s; }
.film-card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-3px); }
.film-poster { aspect-ratio: 16 / 7; overflow: hidden; }
.film-poster .poster-art { width: 100%; height: 100%; display: block; }
.film-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.film-body h3 { margin: .2rem 0 0; font-size: 1.02rem; line-height: 1.3; }
.film-body .en { color: var(--muted); font-size: .82rem; }
.film-body .tagline { color: #cfd5e2; font-size: .88rem; line-height: 1.45; margin: .4rem 0 .5rem; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.film-body .read-more { color: var(--accent); font-weight: 600; font-size: .85rem; }
.scores { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.scores .imdb { background: #f5c518; color: #000; font-weight: 700; font-size: .78rem; padding: 3px 8px; border-radius: 6px; text-decoration: none; }
.scores .ours { border: 1px solid var(--accent); color: var(--accent); font-weight: 600; font-size: .78rem; padding: 2px 8px; border-radius: 6px; }
.scores.big .imdb { font-size: 1.05rem; padding: 6px 12px; } .scores.big .imdb small { font-weight: 500; opacity: .7; margin-left: 2px; }
.scores.big .ours { font-size: .95rem; padding: 6px 12px; } .scores.big .ours b { font-size: 1.15rem; }
.film-page .page-head .en { color: var(--muted); margin-bottom: .5rem; }
.film-player { aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; margin: 0 0 1.2rem; }
.film-player iframe { width: 100%; height: 100%; border: 0; display: block; }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: .8rem; }
.pros-cons h3 { font-size: .95rem; margin: 0 0 .5rem; }
.pros-cons ul { margin: 0; padding-left: 1.1rem; line-height: 1.55; color: #d6dbe6; }
.pros li::marker { content: "+  "; color: #4ade80; font-weight: 700; }
.cons li::marker { content: "–  "; color: #f87171; font-weight: 700; }
.verdict { padding: .8rem 1rem; border-left: 3px solid var(--accent); background: rgba(215,255,58,.06); border-radius: 0 10px 10px 0; }
@media (max-width: 640px) { .pros-cons { grid-template-columns: 1fr; } }
.film-poster { position: relative; }
.film-card:hover .poster-art { transform: scale(1.04); }
.film-grid[hidden] { display: none; }
.film-grid .media-card { min-height: 100%; }
.article-card[hidden] { display: none !important; }
.chips .chip small { opacity: .6; margin-left: 4px; font-weight: 500; }
.more p a { color: var(--accent); }

/* v16: 3D-астероїди зі спрайтів */
.asteroids .rock { position: absolute; left: 0; top: 0; will-change: transform; }
.asteroids .rock i { position: absolute; inset: 0; background-repeat: no-repeat; background-size: 2400% 100%; }
.asteroids .rock i + i { opacity: 0; }

/* v16: головна — саундтреки; статті — картки без зображень */
.home-albums { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.home-album { padding: 16px; border-radius: 16px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.1); }
.home-album-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 10px; }
.home-album-head b { font-size: 1rem; } .home-album-head .en { color: var(--muted); font-size: .85rem; }
.home-album .spotify { width: 100%; height: 352px; border: 0; border-radius: 12px; background: #121212; display: block; }
.music-note { color: var(--muted); font-size: .88rem; margin: 14px 0 6px; max-width: 80ch; }
@media (max-width: 860px) { .home-albums { grid-template-columns: 1fr; } .home-album .spotify { height: 232px; } }
.article-grid.all { grid-auto-flow: dense; }
.article-grid.all .article-card.with-img { grid-column: span 2; }
.article-grid.all .article-card.with-img img { aspect-ratio: 21 / 8; }
.article-card.text-only > div { padding: 20px 20px 18px; border-top: 3px solid var(--accent); }
.article-card.text-only h2 { font-size: 1.08rem; }
@media (max-width: 860px) { .article-grid.all .article-card.with-img { grid-column: auto; } .article-grid.all .article-card.with-img img { aspect-ratio: 16 / 9; } }
.article-grid.all .article-card.with-img { flex-direction: row; }
.article-grid.all .article-card.with-img img { width: 46%; aspect-ratio: auto; height: auto; min-height: 100%; object-fit: cover; flex: 0 0 46%; }
.article-grid.all .article-card.with-img > div { justify-content: center; }
@media (max-width: 860px) { .article-grid.all .article-card.with-img { flex-direction: column; } .article-grid.all .article-card.with-img img { width: 100%; flex: none; aspect-ratio: 16 / 9; min-height: 0; } }

/* v17: товари */
.shop-block { padding: 34px 0 10px; }
main.container .shop-block > .container { padding: 0; }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.product-grid.big { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); margin-bottom: 18px; }
.product { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: rgba(12,15,24,.85); border: 1px solid rgba(255,255,255,.1); color: #fff; text-decoration: none; transition: .2s; }
.product:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-3px); }
.product img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #1a1d24; display: block; }
.product div { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product b { font-size: .88rem; line-height: 1.35; font-weight: 600; flex: 1; }
.product .price { color: var(--accent); font-weight: 700; font-size: .95rem; }
.product .go { color: var(--muted); font-size: .78rem; }
@media (max-width: 860px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
.flyby { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 45; pointer-events: none; }

/* v18: зоряне небо + анімоване градієнтне світіння знизу (усі сторінки, крім головної й «Персонажів») */
body.bg-space {
  background: radial-gradient(1400px 600px at 50% -10%, rgba(40,60,140,.22), transparent 60%), linear-gradient(180deg, #04060f 0%, #03040a 60%, #020308 100%) !important;
  background-attachment: fixed !important;
}
body.bg-space::after {
  content: ""; position: fixed; left: -20%; right: -20%; bottom: -35vh; height: 85vh; z-index: -1; pointer-events: none;
  background:
    radial-gradient(50% 60% at 30% 100%, rgba(60,110,255,.55), transparent 70%),
    radial-gradient(45% 55% at 70% 100%, rgba(150,70,255,.45), transparent 70%),
    radial-gradient(35% 45% at 50% 100%, rgba(215,255,58,.18), transparent 70%);
  filter: blur(30px); opacity: .85;
  animation: glow-drift 18s ease-in-out infinite alternate;
}
@keyframes glow-drift {
  0%   { transform: translateX(-4%) scaleY(.92); opacity: .65; filter: blur(30px) hue-rotate(0deg); }
  50%  { transform: translateX(3%) scaleY(1.06); opacity: .9; filter: blur(34px) hue-rotate(-18deg); }
  100% { transform: translateX(5%) scaleY(.98); opacity: .75; filter: blur(30px) hue-rotate(14deg); }
}
@media (prefers-reduced-motion: reduce) { body.bg-space::after { animation: none; } }
body.bg-space .space-bg { display: block !important; }
/* v18: трейлер у картці фільму, другорядні оцінки */
.film-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.film-trailer { aspect-ratio: 16 / 9; background: #000; }
.film-trailer iframe { width: 100%; height: 100%; border: 0; display: block; }
.film-card h3 a { color: #fff; text-decoration: none; } .film-card h3 a:hover { color: var(--accent); }
.film-card:hover { transform: none; }
.scores .imdb, .scores .ours { background: rgba(255,255,255,.06); color: #b9c0cf; border: 1px solid rgba(255,255,255,.12); font-weight: 600; font-size: .62rem; padding: 2px 6px; border-radius: 5px; letter-spacing: .02em; }
.scores .imdb { color: #d9c27a; border-color: rgba(245,197,24,.25); }
.scores.big .imdb, .scores.big .ours { font-size: .84rem; padding: 4px 10px; }
/* v18: огляди товарів */
.inline-product { max-width: 280px; margin: 6px 0 14px; }
.inline-product .product { flex-direction: row; }
.inline-product .product img { width: 110px; aspect-ratio: 1; flex: 0 0 110px; }
.guides { margin: 6px 0 30px; }
.guides h2, .shop-all { font-family: var(--font-head); font-size: 1.2rem; margin: 0 0 14px; }
.guide-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.guide { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 12px; background: rgba(12,15,24,.85); border: 1px solid rgba(255,255,255,.1); border-left: 3px solid var(--accent); color: #fff; text-decoration: none; }
.guide:hover { text-decoration: none; border-color: var(--accent); }
.guide b { font-size: .95rem; line-height: 1.3; } .guide span { color: var(--muted); font-size: .84rem; line-height: 1.45; }
.inline-product { max-width: 340px; }
.inline-product .product { align-items: center; }
.inline-product .product img { height: 110px; width: 110px; align-self: center; }
.inline-product .product b { display: none; }
.inline-product .product div { justify-content: center; }

/* v19: guide cards with product photo, guides under products */
.guides { margin: 34px 0 30px; }
.guide { padding: 0; border-left: 1px solid rgba(255,255,255,.1); overflow: hidden; gap: 0; transition: .2s; }
.guide:hover { transform: translateY(-3px); }
.guide img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #1a1d24; }
.guide div { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; border-top: 3px solid var(--accent); }
.product img, .guide img { height: auto; }
.inline-product .product img { height: 110px; }

/* v20: shop rubrics & filters */
.shop-filters { position: sticky; top: 64px; z-index: 20; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; margin: 0 0 26px; border-radius: 14px; background: rgba(10,12,18,.92); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.1); }
.sf-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.sf-label { color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; min-width: 72px; }
.shop-filters .chip { padding: 5px 11px; font-size: .78rem; }
.shop-filters .chip small { opacity: .6; margin-left: 3px; }
.sf-select { width: auto; min-width: 170px; padding: 7px 10px; font-size: .85rem; }
.sf-tools .search[type=search] { flex: 1; min-width: 200px; padding: 7px 12px; font-size: .88rem; }
.sf-check { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; color: var(--text); cursor: pointer; }
.sf-check input { accent-color: var(--accent); width: 16px; height: 16px; }
.sf-status { justify-content: space-between; font-size: .84rem; color: var(--muted); }
.sf-reset { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
.sf-reset[hidden] { display: none; }
.shop-cat { margin: 0 0 34px; scroll-margin-top: 260px; }
.shop-cat[hidden], .product[hidden] { display: none; }
.shop-cat-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 14px; }
.shop-cat-head h2 { font-family: var(--font-head); font-size: 1.2rem; margin: 0; }
.shop-cat-head p { margin: 0; color: var(--muted); font-size: .88rem; }
.pbadges { display: flex; flex-wrap: wrap; gap: 4px; }
.pbadge { font-style: normal; font-size: .66rem; padding: 2px 7px; border-radius: 99px; background: rgba(215,255,58,.12); color: var(--accent); }
.sf-empty { padding: 30px 0; color: var(--muted); text-align: center; }
@media (max-width: 760px) {
  .shop-filters { position: static; padding: 12px; }
  .sf-row > .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .sf-row > .chips::-webkit-scrollbar { display: none; }
  .shop-filters .chip { white-space: nowrap; }
  .sf-label { min-width: 0; width: 100%; }
  .sf-select, .sf-tools .search[type=search] { flex: 1 1 100%; }
}
.shop-filters { position: static; }
.shop-cat { scroll-margin-top: 80px; }
@media (max-width: 560px) { .product-grid.big { grid-template-columns: repeat(2, 1fr); gap: 10px; } .product-grid.big .product b { font-size: .8rem; } }

/* v24: photos inside articles */
.article-figure { margin: 18px 0 22px; }
.article-figure img { width: 100%; height: auto; aspect-ratio: 3/2; object-fit: cover; border-radius: 14px; display: block; background: #1a1d24; }
.article-figure figcaption { margin-top: 8px; font-size: .86rem; color: var(--muted); line-height: 1.45; }
.article-figure .credit { display: block; font-size: .74rem; opacity: .75; margin-top: 2px; }
.article-figure .credit a { color: inherit; text-decoration: underline; text-decoration-color: rgba(255,255,255,.25); }

/* v25: series trailers + comics */
.series-card .film-trailer { border-bottom: 1px solid var(--line); }
.series-card .kind-tag { display: inline-block; margin-bottom: 6px; }
.comic-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.comic-intro { grid-column: 1 / -1; margin: 0 0 4px; color: var(--muted); }
.comic-card { position: relative; padding: 18px 18px 16px; border-radius: 16px; background: rgba(12,15,24,.88); border: 1px solid rgba(255,255,255,.1); border-top: 3px solid var(--pc); overflow: hidden; }
.comic-card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--pc) 35%, transparent) 0 2px, transparent 3px) 0 0 / 9px 9px; opacity: .35; pointer-events: none; }
.comic-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.comic-pub { font-family: var(--font-head); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--pc); }
.comic-years { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.comic-card h3 { margin: 0 0 2px; font-size: 1.05rem; }
.comic-card .tagline { margin-top: 10px; }
