/* ==========================================================================
   Bloubneaque — базовый каркас стилей (v0, структурный)
   Палитра/шрифты — временные, финальный визуальный язык (арт-деко,
   тёплая иллюминация, французский вайб) прорабатываем отдельно.
   ========================================================================== */

:root {
  /* --- палитра (placeholder) --- */
  --color-bg: #14110f;
  --color-bg-alt: #1c1815;
  --color-surface: #221d19;
  --color-surface-2: #2a2420;
  --color-border: #3a322b;

  --color-text: #f3ead9;
  --color-text-muted: #b6a993;
  --color-text-faint: #8a7d6c;

  --color-accent: #c9a24a;       /* латунь / лампа */
  --color-accent-soft: #8a6f38;
  --color-velvet: #6e1f2a;       /* тёмно-бордовый бархат занавеса */

  --color-klassika: #c9a24a;
  --color-kontemporare: #8a9b8e;
  --color-tresh: #7a8f4a;
  --color-sekretka: #6e1f2a;

  /* --- типографика (placeholder) --- */
  --font-display: Georgia, 'Times New Roman', ui-serif, serif;
  --font-body: -apple-system, 'Segoe UI', Roboto, system-ui, sans-serif;

  --radius: 4px;
  --content-width: 1800px;

  --yeartabs-h: 62px;
  --subtabs-h: 78px;
  /* total persistent sticky chrome on edition pages (year-tabs + subtab-nav —
     the big header banner itself is NOT sticky, it scrolls away) */
  --chrome-height: calc(var(--yeartabs-h) + var(--subtabs-h) + 16px);
}

* {
  box-sizing: border-box;
}

[id] {
  scroll-margin-top: var(--chrome-height);
}

/* Elements toggled via JS `.hidden = true/false` (modal fields, winner tag)
   also carry their own `display` rule (flex/inline-block) for when they're
   shown — same specificity as the UA's [hidden]{display:none}, and author
   rules win ties, so without this override JS-hidden elements stay visible. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Raised above the fixed .site-header (z-index: 1) so content slides over
   it. Translucent (not opaque) so the fixed image tints through everywhere,
   per design — deliberately NO backdrop-filter here: blurring a huge
   scrolling container triggers a real Chromium rendering bug (stale
   backdrop snapshot while scrolling shows ghosted duplicate content behind
   sticky children). Blur is used instead only on the small, fixed-height
   sticky bars below, where it renders correctly. */
main,
.site-footer {
  position: relative;
  z-index: 2;
  background: rgba(20, 17, 15, 0.82);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
}

p {
  margin: 0 0 1em;
}

.wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- header: fixed background image, rest of the page scrolls over it ---
   The image is pinned to the viewport (position: fixed) and sits behind
   everything (low z-index). A same-shaped .header-spacer in normal flow
   holds its place so page content starts right below it. As the page
   scrolls, main/footer (raised above the header in stacking order) slide
   up and cover it — and the sticky year-tabs / subtab-nav bars, being
   translucent with backdrop-filter, read as frosted glass over the still
   image once they're pinned at the top. */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.site-header.nav-is-open {
  z-index: 10; /* lift above main's sticky bars so the open mobile dropdown isn't covered */
}

.site-header-img {
  display: block;
  width: 100%;
  height: auto;
}

.header-spacer {
  width: 100%;
  aspect-ratio: 1672 / 590; /* matches header-bloubneaque.png so it reserves the exact space */
}

.site-header-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to bottom, rgba(10, 8, 7, 0.85), rgba(10, 8, 7, 0) 80%);
}

.site-header-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  gap: 24px;
  padding-top: 6px;
}

.brand {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

.brand:hover {
  text-decoration: none;
  color: var(--color-accent);
}

.nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--color-text);
  font-size: 14px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: var(--radius);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--color-accent);
  background: rgba(0, 0, 0, 0.35);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-size: 14px;
}

@media (max-width: 760px) {
  .nav-toggle {
    display: block;
  }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    padding-bottom: 12px;
  }
  .site-header-bar-inner {
    flex-wrap: wrap;
  }
  .nav.is-open {
    display: flex;
    background: rgba(10, 8, 7, 0.9);
    border-radius: var(--radius);
  }
  .nav a {
    padding: 10px 12px;
    border-bottom: 1px solid var(--color-border);
  }
}

/* --- footer --- */

.site-footer {
  border-top: 1px solid var(--color-border);
  margin-top: 96px;
  padding: 40px 0;
  color: var(--color-text-faint);
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--color-text-faint);
}

/* --- hero --- */

.hero {
  padding: 96px 0 72px;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
  background:
    radial-gradient(ellipse at 50% -10%, rgba(201, 162, 74, 0.14), transparent 60%);
}

.hero .kicker {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(40px, 7vw, 80px);
  margin-bottom: 0.2em;
}

.hero .lede {
  max-width: 640px;
  margin: 0 auto 32px;
  color: var(--color-text-muted);
  font-size: 18px;
}

.hero .actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- buttons --- */

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid var(--color-accent);
  color: var(--color-text);
}

.btn:hover {
  background: var(--color-accent);
  color: var(--color-bg);
  text-decoration: none;
}

.btn-solid {
  background: var(--color-accent);
  color: var(--color-bg);
}

.btn-solid:hover {
  background: var(--color-accent-soft);
  border-color: var(--color-accent-soft);
  color: var(--color-text);
}

.btn-ghost {
  border-color: var(--color-border);
  color: var(--color-text-muted);
}

.btn-ghost:hover {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text);
}

/* --- sections --- */

section {
  padding: 72px 0;
}

.section-head {
  margin-bottom: 40px;
}

.section-head .kicker {
  display: block;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
}

.section-head p {
  color: var(--color-text-muted);
  max-width: 640px;
}

/* --- next-edition card (index) --- */

.next-card {
  border: 1px solid var(--color-accent-soft);
  border-radius: 8px;
  padding: 40px;
  background: linear-gradient(160deg, var(--color-surface), var(--color-bg-alt));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.next-card .status-badge {
  margin-bottom: 12px;
}

.next-card h3 {
  font-size: 32px;
  margin-bottom: 8px;
}

.next-card p {
  color: var(--color-text-muted);
  margin-bottom: 0;
}

/* --- edition cards grid (history) --- */

.edition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.edition-card {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  padding: 28px 24px;
  transition: border-color 0.15s, transform 0.15s;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100%;
}

.edition-card:hover {
  border-color: var(--color-accent-soft);
  transform: translateY(-2px);
  text-decoration: none;
}

.edition-card .edition-num {
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

.edition-card h3 {
  font-size: 26px;
  color: var(--color-text);
  margin-bottom: 2px;
}

.edition-card .official-title {
  font-size: 13px;
  font-style: italic;
  color: var(--color-accent);
}

.edition-card .meta {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-top: auto;
}

.edition-card .winners {
  font-size: 13px;
  color: var(--color-text-faint);
  line-height: 1.5;
}

.edition-card.is-hiatus,
.edition-card.is-prologue,
.edition-card.is-upcoming {
  background: transparent;
  border-style: dashed;
  color: var(--color-text-faint);
  align-items: center;
  justify-content: center;
  text-align: center;
}

.status-badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

.status-badge.held { border-color: var(--color-accent-soft); color: var(--color-accent); }
.status-badge.upcoming { border-color: var(--color-accent); color: var(--color-accent); background: rgba(201,162,74,0.1); }
.status-badge.prologue,
.status-badge.hiatus { color: var(--color-text-faint); }

/* --- year tabs (edition pages) --- */

.year-tabs {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(28, 24, 21, 0.94);
  backdrop-filter: blur(32px) saturate(140%);
  -webkit-backdrop-filter: blur(32px) saturate(140%);
  border-bottom: 1px solid var(--color-border);
  overflow-x: auto;
}

.year-tabs-inner {
  display: flex;
  gap: 2px;
}

.year-tab {
  flex: 1 0 auto;
  min-width: 64px;
  text-align: center;
  padding: 16px 18px;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--color-text-faint);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.year-tab:hover {
  color: var(--color-text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
}

.year-tab.is-active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.year-tab.is-prologue,
.year-tab.is-upcoming {
  font-style: italic;
  opacity: 0.75;
}

/* --- subtab nav ("big beautiful buttons"), pinned under year-tabs --- */

.subtab-nav {
  position: sticky;
  top: var(--yeartabs-h);
  z-index: 39;
  background: rgba(20, 17, 15, 0.94);
  backdrop-filter: blur(32px) saturate(140%);
  -webkit-backdrop-filter: blur(32px) saturate(140%);
  border-bottom: 1px solid var(--color-border);
  padding: 13px 0;
}

.subtab-nav-inner {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
}

.subtab-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  padding: 13px 22px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 17px;
  white-space: nowrap;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}

.subtab-btn:hover {
  border-color: var(--color-accent-soft);
  transform: translateY(-2px);
  text-decoration: none;
}

.subtab-btn.is-active {
  border-color: var(--color-accent);
  background: var(--color-surface-2);
  color: var(--color-accent);
}

.subtab-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
}

/* --- edition page --- */

.edition-hero {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--color-border);
  scroll-margin-top: var(--chrome-height);
}

.edition-hero .edition-num {
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.edition-hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  margin: 8px 0 4px;
}

.edition-hero .official-title {
  font-style: italic;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.fact-row {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.fact {
  min-width: 160px;
}

.fact dt {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: 4px;
}

.fact dd {
  margin: 0;
  color: var(--color-text);
  font-size: 15px;
}

.edition-note {
  margin-top: 24px;
  padding: 16px 20px;
  background: var(--color-surface);
  border-left: 3px solid var(--color-accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--color-text-muted);
  font-size: 15px;
}

.category-block {
  padding: 40px 0;
  border-bottom: 1px solid var(--color-border);
  scroll-margin-top: var(--chrome-height);
}

.category-block:last-of-type {
  border-bottom: none;
}

.category-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.category-head h2 {
  font-size: 34px;
  margin: 0;
}

.category-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

/* --- horizontal film row --- */

.film-row {
  display: grid;
  grid-template-columns: repeat(var(--n, 4), 1fr);
  gap: 20px;
}

.film-card {
  appearance: none;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.film-card:hover {
  border-color: var(--color-accent-soft);
  transform: translateY(-3px);
}

.film-card.is-winner {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent), 0 12px 28px -12px rgba(201, 162, 74, 0.5);
  transform: scale(1.04);
  z-index: 1;
}

.film-card.is-winner:hover {
  transform: scale(1.04) translateY(-3px);
}

.film-poster {
  aspect-ratio: 3 / 4;
  background: var(--color-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-faint);
  font-size: 12px;
  text-align: center;
  padding: 12px;
}

.film-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.film-meta {
  padding: 14px 16px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.film-title {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.25;
  margin-bottom: 10px;
  color: var(--color-text);
}

.film-winner-tag {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-bg);
  background: var(--color-accent);
  padding: 2px 8px;
  border-radius: 100px;
  margin-bottom: 8px;
  width: fit-content;
}

.vote-bar-wrap {
  margin-top: auto;
  padding-top: 8px;
  display: block;
}

.vote-bar {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--color-surface-2);
  overflow: hidden;
  margin-bottom: 4px;
}

.vote-bar-fill {
  display: block;
  height: 100%;
  background: var(--color-accent-soft);
}

.is-winner .vote-bar-fill {
  background: var(--color-accent);
}

.vote-count {
  display: block;
  font-size: 12px;
  color: var(--color-text-faint);
}

@media (max-width: 900px) {
  .film-row {
    grid-auto-flow: column;
    grid-auto-columns: minmax(140px, 1fr);
    grid-template-columns: none;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
  }
  .film-card {
    scroll-snap-align: start;
  }
}

.tiebreak-note {
  margin-top: 24px;
  padding: 14px 18px;
  background: var(--color-surface);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--color-text-muted);
}

.tiebreak-note strong {
  color: var(--color-text);
}

/* --- placeholder blocks (organizer text, gallery, team) --- */

.placeholder-block {
  border: 1px dashed var(--color-border);
  border-radius: 8px;
  padding: 32px;
  color: var(--color-text-faint);
  font-size: 14px;
  text-align: center;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.gallery-slot {
  aspect-ratio: 4 / 3;
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-faint);
  font-size: 12px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  border: none;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: var(--color-surface);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-play-icon {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}

.gallery-play-icon::before {
  content: "";
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(10, 8, 7, 0.45);
}

/* --- gallery lightbox --- */

.gallery-modal {
  position: relative;
  width: 100%;
  max-width: 1400px;
  max-height: 92vh;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 24px 64px -16px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gallery-modal-media {
  /* Fixed height (not content-driven) so the modal's total size — and the
     filmstrip's position at the bottom of it — never shifts while the next
     photo/video is still loading and has no intrinsic size yet. */
  flex: 0 0 auto;
  height: 78vh;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.gallery-modal-media img,
.gallery-modal-media video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: rgba(20, 17, 15, 0.65);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.gallery-nav:hover {
  border-color: var(--color-accent-soft);
  color: var(--color-accent);
}

.gallery-nav-prev {
  left: 12px;
}

.gallery-nav-next {
  right: 12px;
}

.gallery-filmstrip {
  position: relative;
  flex: 0 0 auto;
  height: 86px;
  overflow: hidden;
  background: #060504;
  border-top: 1px solid var(--color-border);
}

.gallery-filmstrip::before,
.gallery-filmstrip::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 56px;
  z-index: 2;
  pointer-events: none;
}

.gallery-filmstrip::before {
  left: 0;
  background: linear-gradient(to right, #060504, transparent);
}

.gallery-filmstrip::after {
  right: 0;
  background: linear-gradient(to left, #060504, transparent);
}

.filmstrip-track {
  display: flex;
  align-items: center;
  height: 100%;
  transition: transform 0.3s ease;
  will-change: transform;
}

/* black-and-white perforation squares between frames, like real film stock.
   Fixed height matching the thumb's own box (52px + 4px padding top/bottom)
   so it centers on the same line as the frames instead of being stretched
   by a margin that doesn't divide evenly into the checker pattern — that
   left a clipped half-square at the bottom which read as "shifted up". */
.filmstrip-sprocket {
  flex: 0 0 10px;
  height: 60px;
  background-image: repeating-linear-gradient(
    to bottom,
    #efefef 0, #efefef 5px,
    #050505 5px, #050505 10px
  );
  box-shadow: inset 0 0 0 1px #000;
}

.filmstrip-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 68px;
  height: 52px;
  padding: 4px;
  margin: 0 2px;
  border: none;
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  background: linear-gradient(155deg, #3c3c3c, #060606 55%, #1c1c1c);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 2px 5px rgba(0, 0, 0, 0.7);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.filmstrip-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.2) 0%,
    transparent 28%,
    transparent 72%,
    rgba(255, 255, 255, 0.1) 100%
  );
}

.filmstrip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 1px;
  opacity: 0.5;
  transition: opacity 0.15s ease;
}

.filmstrip-thumb.is-active {
  transform: scale(1.14);
  z-index: 1;
  box-shadow:
    0 0 0 1px var(--color-accent),
    0 0 0 3px rgba(201, 162, 74, 0.28),
    0 4px 12px rgba(0, 0, 0, 0.8);
}

.filmstrip-thumb.is-active img {
  opacity: 1;
}

@media (max-width: 640px) {
  .gallery-nav {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .gallery-modal-media {
    height: 62vh;
  }

  .gallery-filmstrip {
    height: 66px;
  }

  .gallery-filmstrip::before,
  .gallery-filmstrip::after {
    width: 32px;
  }

  .filmstrip-thumb {
    width: 48px;
    height: 36px;
  }

  .filmstrip-sprocket {
    flex-basis: 7px;
    height: 44px;
    background-image: repeating-linear-gradient(
      to bottom,
      #efefef 0, #efefef 4px,
      #050505 4px, #050505 8px
    );
  }
}

/* --- team --- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.team-card {
  text-align: center;
}

.team-photo {
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-faint);
  font-size: 12px;
  margin: 0 auto 16px;
  overflow: hidden;
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card h3 {
  font-size: 18px;
  margin-bottom: 2px;
}

.team-card .role {
  font-size: 13px;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.team-card p {
  font-size: 14px;
  color: var(--color-text-muted);
}

/* --- prose --- */

.prose {
  max-width: 720px;
}

.prose h2 {
  margin-top: 1.6em;
}

.prose p {
  color: var(--color-text-muted);
}

/* --- concept page lore text --- */

.lore-lede {
  font-family: var(--font-display);
  font-size: 22px;
  font-style: italic;
  color: var(--color-text) !important;
  margin-top: 12px;
}

.lore p {
  font-size: 17px;
  line-height: 1.75;
}

.lore-poem {
  margin: 40px 0;
  padding: 4px 0 4px 28px;
  border-left: 3px solid var(--color-accent-soft);
}

.lore-poem p {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--color-text) !important;
  white-space: pre-line;
  line-height: 1.65;
  font-size: 18px;
}

.lore-closing {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--color-text) !important;
  text-align: center;
  margin-top: 48px;
}

/* --- timeline (history page) --- */

.timeline-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--color-border);
}

.timeline-item .year {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--color-accent);
}

.timeline-item.is-muted .year,
.timeline-item.is-muted {
  color: var(--color-text-faint);
}

@media (max-width: 560px) {
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* --- film modal --- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 8, 7, 0.8);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 1400px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  display: flex;
  box-shadow: 0 24px 64px -16px rgba(0, 0, 0, 0.6);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.modal-close:hover {
  border-color: var(--color-accent-soft);
  color: var(--color-accent);
}

.modal-poster {
  flex: 0 0 38%;
  min-height: 320px;
  background: var(--color-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-faint);
  font-size: 13px;
  text-align: center;
  border-radius: 12px 0 0 12px;
  overflow: hidden;
}

.modal-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-body {
  flex: 1;
  padding: 48px 48px 40px;
  min-width: 0;
}

.modal-category {
  display: block;
  font-size: 14px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.modal-body h3 {
  font-size: 36px;
  margin-bottom: 4px;
}

.modal-original-title {
  font-style: italic;
  color: var(--color-text-faint);
  font-size: 15px;
  margin-bottom: 10px;
}

.modal-codename {
  font-style: italic;
  color: var(--color-text-muted);
  font-size: 15px;
  margin-bottom: 10px;
}

.modal-tagline {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--color-accent);
  font-size: 16px;
  margin-bottom: 14px;
}

.modal-facts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 18px;
  padding: 14px 16px;
  background: var(--color-surface);
  border-radius: var(--radius);
}

.modal-fact {
  display: flex;
  gap: 8px;
  font-size: 14px;
}

.modal-fact dt {
  flex: 0 0 auto;
  color: var(--color-text-faint);
  min-width: 100px;
}

.modal-fact dd {
  margin: 0;
  color: var(--color-text-muted);
}

.modal-winner-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-bg);
  background: var(--color-accent);
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 12px;
}

.modal-votes {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.modal-summary {
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.modal-trailer {
  aspect-ratio: 16 / 9;
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-faint);
  font-size: 13px;
  overflow: hidden;
}

.modal-trailer iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 640px) {
  .modal {
    flex-direction: column;
    max-height: 92vh;
  }
  .modal-poster {
    flex-basis: auto;
    min-height: 220px;
    border-radius: 12px 12px 0 0;
  }
  .modal-body {
    padding: 24px 20px 28px;
  }
}
