/* ══════════════════════════════════════
   QUIZ DESIGN REFINEMENT
   Editorial mode-select, mobile full-screen sheet
   ══════════════════════════════════════ */

/* Mode select: left-aligned editorial header, clear of the close button */
.quiz-mode-select .quiz-question {
  text-align: left;
  font-size: var(--font-size-xl);
  line-height: 1.25;
  padding-right: 48px;
  margin-bottom: var(--spacing-xs);
}

.quiz-mode-select .quiz-mode-subtitle {
  margin-top: 0;
}

.quiz-close {
  width: 36px;
  height: 36px;
  z-index: 30;
}

/* Mobile: full-screen sheet instead of a floating box */
@media (max-width: 768px) {
  .quiz-backdrop {
    align-items: stretch;
    padding: 0;
  }

  .quiz-modal-content {
    max-width: none;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    min-height: 0;
    margin: 0;
    border: none;
    border-radius: 0;
  }

  .quiz-inner {
    padding: 76px var(--spacing-lg) var(--spacing-2xl);
  }

  .quiz-close {
    position: fixed;
    top: var(--spacing-md);
    right: var(--spacing-md);
  }
}

/* ── Active filter chips: one height, one type size, aligned row ── */
.active-filters-chips {
  gap: 8px;
}

.filter-chip,
.clear-all-chips {
  height: 30px;
  display: inline-flex;
  align-items: center;
  font-size: var(--font-size-xs);
  line-height: 1;
}

.filter-chip {
  padding: 0 12px;
  gap: 6px;
}

.chip-remove {
  font-size: var(--font-size-sm);
  margin-left: 2px;
  opacity: 0.55;
}

.clear-all-chips {
  margin-left: auto;
  padding: 0 2px;
  border-bottom: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Only truly empty slots dim — filled preview names keep the quiet color */
.bracket-match.pending .bracket-slot.empty {
  opacity: 0.55;
}

.bracket-match.pending .bracket-slot {
  border-bottom-color: rgba(255, 255, 255, var(--opacity-ghost));
}

/* ── Quiz menu question: editorial header ── */
.quiz-mode-select .quiz-question {
  font-size: var(--font-size-xl);
  letter-spacing: var(--letter-spacing);
  color: rgba(255, 255, 255, var(--opacity-primary));
}

@media (max-width: 768px) {
  .quiz-mode-select .quiz-question {
    font-size: var(--font-size-lg);
  }
}

/* ══════════════════════════════════════
   GLASS REFINEMENT
   shadcn-grade surfaces: Submit a Film + Your Spread
   ══════════════════════════════════════ */

/* ── Your Spread: glass stage ── */
.tarot-spread-card-img {
  /* radius 0, not 14px: the print stays a square riso edge (token
     --border-radius: 0) AND the dither-parallax quad is a square overlay —
     rounded corners popped square on every hover */
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, var(--opacity-border));
}

.spread-hero .tarot-spread-card-img {
  /* flat: one drop shadow for depth, no inset glass highlight */
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

/* Hero caption: bare text on black, archive voice — no plate, no glass.
   Same margin as the sides: all three captions sit on one grid line. */

.tarot-spread-card-name {
  margin-bottom: var(--spacing-xs);
}

/* Dots become a segmented progress bar — square segments, no pill chrome */
.tarot-spread-dots {
  gap: 6px;
  background: none;
  border: none;
  border-radius: 0;
  padding: 6px 0;
}

.tarot-spread-dot {
  width: 22px;
  height: 2px;
  border-radius: 0;
  background: rgba(255, 255, 255, var(--opacity-muted));
  transition: background 0.3s ease;
}

.tarot-spread-dot.active {
  background: rgba(255, 255, 255, var(--opacity-bright));
}

/* Hint stays a bare tracked label, same voice as the void cue */
.tarot-spread-hint {
  border: none;
  border-radius: 0;
  padding: 0;
  background: none;
}

/* ══════════════════════════════════════
   SWISS AUDIT PASS
   Nav states, FAB discipline
   ══════════════════════════════════════ */

/* FAB yields while the panel is open */
.recommend-fab {
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    background 0.25s ease;
}

body:has(.main-content.filter-open) .recommend-fab,
body:has(.quiz-backdrop) .recommend-fab,
body:has(.movie-modal) .recommend-fab {
  opacity: 0;
  pointer-events: none;
}

/* Nav active state: text weight, not a box */
.nav-button.active {
  background: transparent;
  color: rgba(255, 255, 255, var(--opacity-primary));
}

/* One surface recipe for all floating overlays */
.recommend-fab {
  background: #0e0e0e;
  border: 1px solid rgba(255, 255, 255, var(--opacity-muted));
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

/* Movie modal action row: trailer / Letterboxd / share.
   Top margin stays 0 — flex-column parents don't collapse margins, so a top
   margin here doubles the section gap to 48px while every sibling gap is 24px */
/* Actions ride under the poster as a quiet divided link list (same voice as
   the About-modal links), not a cramped button row. */
.movie-modal-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  margin: 0;
  padding-top: 0;
  border-top: 1px solid rgba(255, 255, 255, var(--opacity-border));
}

.movie-modal-actions .trailer-button {
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between; /* label left, arrow flush right — rows line up */
  gap: var(--spacing-sm);
  width: 100%;
  text-align: left;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, var(--opacity-border));
  border-radius: 0;
  padding: var(--spacing-sm) 0;
}

.movie-modal-actions .action-arrow {
  color: rgba(255, 255, 255, var(--opacity-quiet));
  transition: color var(--transition);
}

.movie-modal-actions .trailer-button:hover .action-arrow {
  color: #ffffff;
}

.movie-modal-actions .trailer-button:last-child {
  border-bottom: none;
}

.share-option-label {
  font-size: var(--font-size-sm);
  letter-spacing: var(--letter-spacing-body);
  text-transform: uppercase;
  color: var(--text-primary);
}

@keyframes shareSlideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes shareFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Desktop: compact centered panel instead of a bottom sheet */
@media (min-width: 769px) {
  @keyframes sharePanelIn {
    from {
      opacity: 0;
      transform: translate(-50%, -47%);
    }
    to {
      opacity: 1;
      transform: translate(-50%, -50%);
    }
  }
}

/* Site footer: subtle about link */
.site-footer {
  display: flex;
  justify-content: center;
  gap: var(--spacing-lg);
  padding: var(--spacing-3xl) 0 0; /* bottom clearance lives on .main-content */
}

.footer-link {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-body);
  text-transform: uppercase;
  color: rgba(255, 255, 255, var(--opacity-quiet));
  transition: color var(--transition);
  padding: var(--spacing-sm) var(--spacing-md);
}

.footer-link:hover {
  color: var(--text-primary);
}

/* About modal */
.about-text {
  margin: var(--spacing-lg) 0;
  font-size: var(--font-size-compact);
  line-height: 1.7;
  color: rgba(255, 255, 255, var(--opacity-secondary));
}

.about-text p + p {
  margin-top: var(--spacing-md);
}

/* Inline prose link (e.g. "a coffee →") — underlined, not the boxed .about-link */
.about-inline-link {
  color: rgba(255, 255, 255, var(--opacity-bright));
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.about-inline-link:hover {
  color: rgba(255, 255, 255, var(--opacity-primary));
}

.about-links {
  display: flex;
  flex-direction: column;
  margin-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, var(--opacity-border));
}

/* Panel-level link lists: the tabs hairline is the top rule (same as the
   accordion rows); the colophon then rides the last link's bottom rule. */
.about-panel > .about-links {
  margin-top: 0;
  border-top: none;
}
.about-panel > .about-links + .about-colophon {
  border-top: none;
  padding-top: 0;
}

.about-link {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: var(--spacing-md) 0; /* same row height as the accordion rows */
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-label);
  text-transform: uppercase;
  color: rgba(255, 255, 255, var(--opacity-tertiary)); /* same resting tier as row labels */
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, var(--opacity-border));
  transition: color 0.2s ease;
}

.about-link:hover {
  color: rgba(255, 255, 255, var(--opacity-primary));
}

.about-link-note {
  text-transform: none;
  letter-spacing: 0;
  color: rgba(255, 255, 255, var(--opacity-quiet));
}

/* (old Read-more button styles removed — .about-readmore is a <details> now, styled above) */

/* Sectioned About: overline label + hairline per section, muted legal fine-print */
.about-section {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, var(--opacity-border));
}

.about-overline {
  margin-bottom: var(--spacing-sm);
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-label);
  text-transform: uppercase;
  color: rgba(255, 255, 255, var(--opacity-tertiary));
}

.about-section .about-text {
  margin: 0;
}

.about-labels {
  list-style: none;
  margin: var(--spacing-sm) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.about-labels li {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, var(--opacity-secondary));
  padding-left: var(--spacing-md);
  position: relative;
}

.about-labels li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 1px;
  background: rgba(255, 255, 255, var(--opacity-subtle));
}

.about-section .about-links {
  margin-top: var(--spacing-md);
  border-top: none;
}

.about-fineprint {
  font-size: var(--font-size-sm); /* one step up — legal text should be readable, not squinted */
  line-height: var(--line-height-relaxed);
  color: rgba(255, 255, 255, var(--opacity-tertiary));
}

.about-fineprint p + p {
  margin-top: var(--spacing-sm);
}

.about-colophon {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, var(--opacity-border));
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-label);
  color: rgba(255, 255, 255, var(--opacity-quiet));
}

/* Tabbed About: nav row + one scrolling panel, consistent size across tabs */
.about-center {
  height: min(
    360px,
    80vh
  ); /* fixed size — tabs never resize the card. tallest tab (Overview) is ~316px, so this hugs it without dead void */
  width: min(
    420px,
    calc(100vw - 48px)
  ); /* fixed width too — short tabs (Legal, Elsewhere) must not shrink the card */
  display: flex;
  flex-direction: column;
}

.about-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid rgba(255, 255, 255, var(--opacity-border));
}

.about-tab {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-label);
  text-transform: uppercase;
  color: rgba(255, 255, 255, var(--opacity-quiet));
  transition: color 0.2s ease;
}

.about-tab:hover {
  color: rgba(255, 255, 255, var(--opacity-secondary));
}
.about-tab.active {
  color: rgba(255, 255, 255, var(--opacity-primary));
}
.about-tab:focus {
  outline: none;
}
.about-tab:focus-visible {
  outline: 1px solid rgba(255, 255, 255, var(--opacity-subtle));
  outline-offset: 3px;
}

.about-panels {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin-top: var(--spacing-md);
  padding-bottom: var(--spacing-md); /* last line breathes above the card border when scrolled */
}

.about-panel {
  display: none;
}
.about-panel.active {
  display: block;
}

.about-panel > .about-section:first-child,
.about-panel > .about-colophon:first-child,
.about-panel > .about-text:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* Collapsible Legal blocks — native <details>, tap the label to open */
.about-collapse {
  border-top: 1px solid rgba(255, 255, 255, var(--opacity-border));
  padding: var(--spacing-md) 0;
}

.about-panel > .about-collapse:first-of-type {
  border-top: none;
  padding-top: 0;
}

.about-collapse > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-label);
  text-transform: uppercase;
  color: rgba(255, 255, 255, var(--opacity-tertiary));
  transition: color 0.2s ease;
}

.about-collapse > summary::-webkit-details-marker {
  display: none;
}

.about-collapse > summary::after {
  content: '+';
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, var(--opacity-quiet));
}

.about-collapse[open] > summary::after {
  content: '−';
}
.about-collapse > summary:hover {
  color: rgba(255, 255, 255, var(--opacity-primary));
}
.about-collapse > summary + * {
  margin-top: var(--spacing-md);
}

/* Every paragraph in an about panel gets rhythm — bare <p> inside collapse/
   section blocks were jamming together (only .about-text p+p was covered). */
.about-panel p + p {
  margin-top: var(--spacing-md);
}

/* No cheap click-box; keep a subtle keyboard ring. Open row reads active. */
.about-collapse > summary {
  outline: none;
}
.about-collapse > summary:focus-visible {
  outline: 1px solid rgba(255, 255, 255, var(--opacity-subtle));
  outline-offset: 3px;
}
.about-collapse[open] > summary {
  color: rgba(255, 255, 255, var(--opacity-primary));
}

/* Links inside a collapse: no stacked rules */
.about-collapse .about-links {
  border-top: none;
  margin-top: var(--spacing-md);
}
.about-collapse .about-link {
  border-bottom: none;
}

/* (mobile About is a centered card too — sizing lives in the mobile block below) */

/* Gallery overlay — no hover available (touch): caption flows under the poster */
@media (hover: none) {
  .gallery-overlay {
    position: static;
    opacity: 1;
    background: none;
    padding: var(--spacing-md) 0 var(--spacing-lg);
  }
}

/* ── List view, phone expanded row: variant A — backdrop still as header ── */
.expanded-hero {
  display: none;
}

@media (max-width: 768px) {
  .expanded-hero {
    display: block;
    position: relative;
    height: 240px;
    overflow: hidden;
  }

  .expanded-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .expanded-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    /* dark band starts higher so 3-4 overlaid text lines stay legible on bright stills */
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.25) 0%,
      rgba(0, 0, 0, 0.1) 30%,
      rgba(0, 0, 0, 0.82) 68%,
      #000 100%
    );
  }

  .expanded-hero-text {
    position: absolute;
    left: var(--spacing-md);
    right: var(--spacing-md);
    bottom: 12px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .expanded-hero-title {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, var(--opacity-primary));
  }

  .expanded-hero-meta {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, var(--opacity-quiet));
  }

  .expanded-hero-tagline {
    font-size: var(--font-size-base); /* vibe tier: one size everywhere — matches body */
    font-style: italic;
    color: rgba(255, 255, 255, var(--opacity-tertiary));
    margin-top: 2px;
  }

  /* Hero replaces the poster-thumb header on phone */
  .expanded-poster {
    display: none;
  }

  /* Open row inverts, reads as the selected ledger line */
  .table-row.expanded {
    background: #f2f2f2;
  }

  .table-row.expanded .table-cell.title {
    color: #000;
  }

  .table-row.expanded .table-cell.year,
  .table-row.expanded .expand-icon {
    color: rgba(0, 0, 0, 0.55);
  }
}

/* Film title is the row hero — step down on small screens */
@media (max-width: 768px) {
  .hybrid-title {
    font-size: var(--font-size-xl);
    margin-bottom: 8px;
  }
}

/* About orbit on phones: smaller tiles, center card gets side margins */
@media (max-width: 768px) {
  .about-orbit img {
    width: 64px;
  }

  .about-center {
    margin: 0 var(--spacing-lg);
  }
}

/* ── Mobile sheet pass: movie + recommend modals go full screen ≤768,
   matching the quiz/filter sheets. 44px touch targets. ── */
@media (max-width: 768px) {
  .movie-modal {
    align-items: stretch;
    justify-content: stretch;
  }

  .movie-modal-content {
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border: none;
  }

  .modal-close-icon,
  .movie-modal-box > .modal-close-icon,
  .quiz-close {
    width: 44px; /* tap target; box selector included so it wins its base rule */
    height: 44px;
  }

  /* Sheet: the box fills the screen and the × pins to its top-right corner,
     boxed on its own black square — same grammar as the full-screen views. */
  .movie-modal-box {
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100dvh;
  }
  .movie-modal-box > .modal-close-icon {
    top: calc(var(--spacing-sm) + env(safe-area-inset-top, 0px));
  }
  .movie-modal-box > .movie-modal-content {
    height: 100%;
  }
}

/* ── Sort control (poster view; list view sorts via column headers) ── */
.sort-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--spacing-md);
  max-width: 560px;
  margin: 0 auto var(--spacing-2xl); /* pause before the grid begins */
  padding: 0 var(--page-gutter);
}

/* Hybrid ledger is wider than the poster wall — sort row tracks its container
   (1400px, matching .hybrid-view) so its right edge aligns with the cards */
.sort-row:has(+ .hybrid-view) {
  max-width: 1400px;
}

/* Poster wall is 1080px; sort row tracks it so its right edge aligns */
.sort-row:has(+ .gallery-view) {
  max-width: 1080px;
}

.sort-row-label {
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, var(--opacity-quiet));
  letter-spacing: var(--letter-spacing-label);
}

.sort-button {
  background: none;
  border: none;
  padding: var(--spacing-xs) 0;
  font-family: var(--font-family);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-nav);
  color: rgba(255, 255, 255, var(--opacity-tertiary));
  cursor: pointer;
  transition: var(--transition);
}

.sort-button:hover,
.sort-button.active {
  color: rgba(255, 255, 255, var(--opacity-primary));
}

.sort-arrow {
  display: inline-block;
  transform: translateY(1px);
}

/* Collapsed sort: only the current choice shows; options surface on
   hover (pointer devices) or tap (.open, toggled inline) */
.sort-current {
  background: none;
  border: none;
  padding: var(--spacing-xs) 0;
  font-family: var(--font-family);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-nav);
  color: rgba(255, 255, 255, var(--opacity-primary));
  cursor: pointer;
  transition: var(--transition);
}

.sort-options {
  display: none;
  gap: var(--spacing-md);
  align-items: center; /* matches the parent row's anchor */
}

.sort-row.open .sort-options {
  display: flex;
}

@media (hover: hover) and (pointer: fine) {
  .sort-row:hover .sort-options {
    display: flex;
  }
}

/* ── Gallery index rail — lateral A-Z (title/director) or decades (year).
   Navigation, not decoration: quiet floor 0.45, primary when active ── */
.index-rail {
  position: fixed;
  right: calc(var(--page-gutter) / 2);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 50;
}

.index-rail-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-label);
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, var(--opacity-quiet));
  padding: 2px 8px;
  text-align: center; /* letters share one vertical center axis */
  transition: color var(--transition);
}

.index-rail-btn:hover,
.index-rail-btn:focus-visible,
.index-rail-btn.active {
  color: rgba(255, 255, 255, var(--opacity-primary));
}

/* jump target clears the fixed header (shared by all rail-enabled views) */
.gallery-item,
.ficha-card,
.hybrid-item {
  scroll-margin-top: calc(var(--header-height) + var(--spacing-xl));
}

@media (max-width: 1024px) {
  /* phone/tablet: contacts-style compact rail hugging the right edge */
  .index-rail {
    right: 2px;
    gap: 0;
  }

  .index-rail-btn {
    font-size: var(--font-size-2xs);
    padding: 1px 6px;
  }

  /* rail gets its own lane — cards clear it instead of running underneath */
  .gallery-view,
  .hybrid-view,
  .ficha-view {
    padding-right: 36px;
  }
}

/* ── FICHA view — note-first record card; Read more expands the rest ── */
.ficha-view {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--page-gutter) var(--spacing-3xl);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl); /* cards sit apart — separate fichas, not a stack */
}

.sort-row:has(+ .ficha-view) {
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
}

.ficha-card {
  border: 1px solid rgba(255, 255, 255, var(--opacity-border));
  background: #000;
  padding: var(--spacing-2xl); /* editorial interior */
}

/* Single column: title/table + poster share the header row, everything
   below (notes, synopsis, accordions) runs the full card width */
.ficha-body {
  display: flex;
  flex-direction: column;
}

/* Header: text + metadata table on the left, poster on the right.
   Poster is taller than the text block, so it drives the row height; the
   text column self-centers against it and the border clears both. */
.ficha-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(260px, 26%, 360px);
  gap: var(--spacing-2xl);
  align-items: center; /* text column self-centers against the taller poster, as documented */
  border-bottom: 1px solid rgba(255, 255, 255, var(--opacity-faint));
  padding-bottom: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.ficha-head-text {
  min-width: 0;
}

/* synopsis lives in the head beside the poster so the tall poster never leaves
   a void next to the short metadata table */
.ficha-head-synopsis {
  margin-top: var(--spacing-xl);
  margin-bottom: 0;
}

.ficha-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-regular);
  letter-spacing: var(--letter-spacing-display-tight);
  line-height: var(--line-height-tight);
  color: rgba(255, 255, 255, var(--opacity-primary));
  cursor: pointer;
  margin-bottom: var(--spacing-sm);
}

.ficha-title:hover {
  color: #fff;
}

.ficha-table {
  border-collapse: collapse;
  width: 100%;
  margin-top: var(--spacing-lg);
  margin-bottom: 0;
}

/* Fact tier unified across views: 13px label / 15px value (article prototype) */
.ficha-table td {
  font-size: var(--font-size-base);
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, var(--opacity-faint));
  color: rgba(255, 255, 255, var(--opacity-secondary));
}

.ficha-table td:first-child {
  text-transform: uppercase;
  font-size: var(--font-size-compact);
  letter-spacing: var(--letter-spacing-label);
  color: rgba(255, 255, 255, var(--opacity-quiet));
  width: 120px;
  padding-right: var(--spacing-md);
}

/* stamp poster: native 2:3, never cropped mid-title */
.ficha-stamp {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, var(--opacity-border));
  display: block;
  flex-shrink: 0;
}

/* horizontal B&W banner: shown only on small screens (poster would be too small) */
.ficha-banner {
  display: none;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, var(--opacity-border));
  margin-bottom: var(--spacing-lg);
}

.ficha-sec {
  margin-bottom: var(--spacing-xl); /* one repeated section interval */
}

.ficha-sec:last-child {
  margin-bottom: 0;
}

.ficha-sec-label {
  font-size: var(--font-size-compact); /* matches fa-sec h3 label tier */
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-label);
  color: rgba(255, 255, 255, var(--opacity-quiet));
  margin-bottom: var(--spacing-sm);
}

.ficha-sec p {
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: rgba(255, 255, 255, var(--opacity-bright));
  letter-spacing: var(--letter-spacing-body);
  max-width: 62ch;
}

/* Closed card stays scannable: synopsis and notes preview at 3 lines;
   READ NOTES un-clamps everything along with the deep record. */
.ficha-card:not(.open) .ficha-sec p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

/* unwritten field: visible slot, clearly not content */

/* the queer note leads the card */
.ficha-sec.featured {
  border: 1px solid rgba(255, 255, 255, var(--opacity-border));
  background: rgba(255, 255, 255, var(--opacity-ghost));
  padding: var(--spacing-md) var(--spacing-lg);
}

.ficha-more {
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, var(--opacity-border));
  color: rgba(255, 255, 255, var(--opacity-tertiary));
  font-family: var(--font-family);
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-nav);
  text-transform: uppercase;
  padding: 0 0 2px;
  cursor: pointer;
  transition: var(--transition);
}

.ficha-more:hover {
  color: rgba(255, 255, 255, var(--opacity-primary));
  border-color: rgba(255, 255, 255, var(--opacity-subtle));
}

/* Deep-cut accordions — one bordered row per section, dashboard-style */
.ficha-expands {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin: var(--spacing-lg) 0;
}

.ficha-expand {
  border: 1px solid rgba(255, 255, 255, var(--opacity-border));
}

.ficha-expand summary {
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-size-sm); /* disclosure-row tier, same as cw-toggle labels */
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-label);
  color: rgba(255, 255, 255, var(--opacity-tertiary));
  cursor: pointer;
  list-style: none;
  transition: color var(--transition);
}

.ficha-expand summary::-webkit-details-marker {
  display: none;
}

.ficha-expand summary::before {
  content: '+';
  display: inline-block;
  width: 14px;
  color: rgba(255, 255, 255, var(--opacity-quiet));
}

.ficha-expand[open] summary::before {
  content: '−';
}

.ficha-expand summary:hover,
.ficha-expand[open] summary {
  color: rgba(255, 255, 255, var(--opacity-primary));
}

.ficha-expand-content {
  padding: 0 var(--spacing-md) var(--spacing-md) calc(var(--spacing-md) + 14px);
}

.ficha-expand-content p {
  font-size: var(--font-size-base); /* reading prose = body tier, same as .ficha-sec p */
  line-height: var(--line-height-relaxed);
  color: rgba(255, 255, 255, var(--opacity-bright));
  letter-spacing: var(--letter-spacing-body);
}

/* "Watch this for" — bulleted source rendered as a dash list. Shared across
   modal, ficha and expanded rows so the four points read as points, not a
   run-on. Same marker as What-to-notice; body reading tier. */
.watch-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  max-width: 62ch;
}
.watch-list li {
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
  color: rgba(255, 255, 255, var(--opacity-secondary));
  letter-spacing: var(--letter-spacing-body);
}

.ficha-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.ficha-chip {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, var(--opacity-tertiary));
  border: 1px solid rgba(255, 255, 255, var(--opacity-border));
  background: rgba(255, 255, 255, var(--opacity-ghost));
  padding: var(--spacing-xs) var(--spacing-md);
  font-family: var(--font-family);
  cursor: pointer;
  transition: var(--transition);
}

.ficha-chip:hover {
  color: rgba(255, 255, 255, var(--opacity-primary));
  border-color: rgba(255, 255, 255, var(--opacity-subtle));
}

.ficha-chip.static {
  cursor: default;
}

/* Read notes: expands every Readings + The record block at once (outline button) */
.ficha-readnotes {
  margin: var(--spacing-lg) 0 var(--spacing-xl); /* the button row gets air below before Related films */
}

/* Grouped deep-cuts: Readings / The record, each under its own micro-label */
.ficha-groups {
  margin: var(--spacing-lg) 0;
}

.ficha-group + .ficha-group {
  margin-top: var(--spacing-xl);
}

.ficha-group .ficha-expands {
  margin: var(--spacing-sm) 0 0;
}

/* Further reading — external sources with a provenance tag */
.ficha-sources {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.ficha-sources a {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, var(--opacity-bright));
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ficha-sources a:hover {
  color: rgba(255, 255, 255, var(--opacity-primary));
}

.ficha-source-status {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-label);
  color: rgba(255, 255, 255, var(--opacity-quiet));
  margin-left: var(--spacing-xs);
}

/* Tablet + phone: a 200px portrait poster reads small and unbalanced — swap to a
   full-width B&W landscape banner stacked above the head text. */
@media (max-width: 1024px) {
  .ficha-body {
    display: block;
    position: relative;
  }
  .ficha-head {
    display: block;
    position: static;
  }
  .ficha-stamp {
    display: none;
  }
  .ficha-banner {
    display: block;
  }
  .ficha-head-text {
    padding-right: 0;
  }
}

@media (max-width: 768px) {
  .ficha-view {
    padding: 0 var(--spacing-md) var(--spacing-3xl);
    gap: var(--spacing-md);
  }
  .ficha-card {
    padding: var(--spacing-md);
  }
  .ficha-title {
    font-size: var(--font-size-lg);
  }
  .ficha-sec.featured {
    padding: var(--spacing-sm) var(--spacing-md);
  }
}

@media (max-width: 768px) {
  .sort-row {
    margin-bottom: var(--spacing-lg);
    padding: 0 var(--spacing-md);
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .sort-button {
    min-height: 44px;
  }

  .movie-modal-actions .trailer-button {
    min-height: 44px;
    font-size: var(--font-size-sm); /* one point up from xs — readable on phone */
  }
}

/* ── Modal declutter: text links instead of boxed buttons, tags as a quiet
   text run instead of a chip wall, poster keeps pace with the text ── */
.movie-modal-actions .trailer-button:hover {
  background: transparent;
  color: #ffffff;
}

/* Actions stack as a divided list on every width (Watch trailer / Letterboxd /
   Share / Download), one per row with a hairline between. */

/* Modal tags use the base boxed-chip .tag style (bordered pills), not an
   inline dotted list — restored per design direction. */

@media (min-width: 769px) {
  .movie-modal-aside {
    position: sticky;
    /* matches the 48px close lane so the poster pins below it, not behind it */
    top: var(--spacing-2xl);
    align-self: start;
  }
}

.quiz-mode-card {
  align-items: center;
}

/* ── About on phone: full-screen sheet (house rule), orbit off, X pinned.
   Show the WHOLE about (no Read-more collapse) top-aligned, so the sheet reads
   as a finished page — not one lonely paragraph centered on black. ── */
@media (max-width: 768px) {
  .about-orbit {
    display: none;
  }
  .about-orbit-modal {
    align-items: center;
    justify-content: center;
  }
  .about-orbit-modal .about-center {
    position: fixed;
    inset: 0;
    width: auto;
    max-width: none;
    height: auto;
    max-height: none;
    margin: 0;
    padding: var(--spacing-2xl) var(--spacing-lg) var(--spacing-3xl);
    border: none;
    overflow-y: auto;
  }
  /* keep the reading column at a comfortable measure and centered, so text
     never runs edge-to-edge on tablet/large phones */
  .about-orbit-modal .about-center > * {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }
  .about-orbit-modal .about-center .recommend-modal-title {
    margin: 0 0 var(--spacing-sm);
    font-size: var(--font-size-xl);
  }
}

/* ── Cookie consent banner (opt-in analytics) ─────────────────────────── */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-lg);
  padding: var(--spacing-md) var(--page-gutter);
  background: var(--bg-color);
  border-top: 1px solid var(--border-color);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner-text {
  margin: 0;
  max-width: 68ch;
  font-size: var(--font-size-sm); /* consent text is peripheral — small print, not body */
  line-height: 1.5;
  color: rgba(255, 255, 255, var(--opacity-secondary));
  letter-spacing: var(--letter-spacing);
}

.cookie-banner-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: inherit;
  letter-spacing: inherit;
  color: rgba(255, 255, 255, var(--opacity-tertiary));
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.cookie-banner-link:hover {
  color: rgba(255, 255, 255, var(--opacity-primary));
}

.cookie-banner-actions {
  display: flex;
  gap: var(--spacing-sm);
  flex-shrink: 0;
}

.cookie-btn {
  cursor: pointer;
  font-family: var(--font-family);
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-nav);
  text-transform: uppercase;
  padding: var(--spacing-sm) var(--spacing-md);
  background: none;
  border: 1px solid rgba(255, 255, 255, var(--opacity-border));
  color: rgba(255, 255, 255, var(--opacity-secondary));
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease;
}

.cookie-btn:hover {
  border-color: rgba(255, 255, 255, var(--opacity-subtle));
  color: rgba(255, 255, 255, var(--opacity-primary));
}

.cookie-btn-accept {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #000;
}

.cookie-btn-accept:hover {
  background: rgba(255, 255, 255, var(--opacity-bright));
  border-color: rgba(255, 255, 255, var(--opacity-bright));
  color: #000;
}

@media (max-width: 768px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
  }
  .cookie-banner-actions {
    width: 100%;
  }
  .cookie-btn {
    flex: 1;
  }
}

/* Wide screens: the duel and the live bracket sit side by side instead of
   stacking into a tall, sparse column. Below 1280px it stays stacked. */
/* Intentional component breakpoint outside the tier ladder: the tournament
   pair only fits side-by-side from 1280px up. */
@media (min-width: 1280px) {
  .tournament-modal .quiz-inner {
    max-width: 1300px;
  }
  .tournament-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: clamp(32px, 4vw, 56px);
  }
  .tournament-main {
    flex: 0 0 420px;
    max-width: 420px;
  }
  .tournament-side {
    flex: 1 1 auto;
    padding-top: 0;
    border-top: none;
  }
  .tournament-side .bracket-overview {
    justify-content: flex-start;
    margin-top: 0;
  }
}

/* ── Audit fixes: consent-banner clearance, touch targets, form privacy note ── */

/* Privacy note at the point of collection (GDPR Art. 13) — quiet meta voice,
   sits between the policy notice and the submit slab. */
.form-privacy-note {
  margin: var(--spacing-md) 0 0;
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-body);
  color: rgba(255, 255, 255, var(--opacity-quiet));
  line-height: var(--line-height-base);
}
.form-privacy-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  letter-spacing: inherit;
  color: rgba(255, 255, 255, var(--opacity-tertiary));
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.form-privacy-link:hover {
  color: rgba(255, 255, 255, var(--opacity-bright));
}

/* While the cookie banner is up on phones, full-screen sheets and the page get
   bottom clearance so it never covers interactive rows. :has() browsers only —
   others keep today's behavior. */
@media (max-width: 768px) {
  body:has(.cookie-banner:not([hidden])) #app,
  body:has(.cookie-banner:not([hidden])) .movie-modal-content,
  body:has(.cookie-banner:not([hidden])) .filter-sidebar,
  body:has(.cookie-banner:not([hidden])) .recommend-modal-content {
    padding-bottom: 168px;
  }
}

/* Touch targets: enlarge hit areas without moving a pixel. Isolated controls
   get an ::after halo; stacked rows trade padding for negative margin. */
@media (pointer: coarse) {
  .info-button,
  .filter-sidebar-header .modal-close-icon,
  .cookie-banner-link,
  .sort-current {
    position: relative;
  }
  .info-button::after,
  .filter-sidebar-header .modal-close-icon::after,
  .cookie-banner-link::after,
  .sort-current::after {
    content: '';
    position: absolute;
    inset: -12px;
  }
  .cw-toggle {
    padding-block: 12px;
    margin-block: -12px;
  }
}
