:root {
  /* tema scuro anche per le parti native (tendine aperte dei menu, barre di scorrimento) */
  color-scheme: dark;
  --bg: #080B10;
  --panel: #0F1521;
  --panel-2: #0A0F18;
  --line: #1B2434;
  --text: #E8EDF5;
  --text-2: #B3BDCC;
  --muted: #8A96A8;
  --brand: #38BDF8;
  --good: #2DD4BF;
  --bad: #FB7185;
  --radius: 14px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* contenitore come Horizon: largo al massimo 1040 px compresi i margini laterali di 16 px */
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--panel); padding: 8px 12px; z-index: 10; }

.site-header { border-bottom: 1px solid var(--line); }
/* Header copiato da Horizon, misurato sui pixel: alto 71 px con la linea, lettere del logo alte
   24 px da 24 a 47 px dall'alto (su telefono 19 px, da 22 a 40). Nel disegno le lettere vanno dal
   9,1% al 62,4% dell'altezza dell'immagine: immagine alta 24 / 0,533 = 45 px, messa a
   24 - 45 * 0,091 = 20 px dall'alto. La pellicola scende sotto le lettere, fino a ~5 px dalla
   linea. Menu e lingue sono centrati sulle lettere (35,5 px), come in Horizon. */
.header-row {
  display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  height: 70px; padding: 0 16px;
}
.logo { display: block; line-height: 0; padding-top: 20px; }
.logo img { display: block; height: 45px; width: auto; }
.logo:hover { text-decoration: none; }
.header-row .nav { margin-top: 23.5px; }  /* 35,5 - 12 (metà riga del menu) */
.header-row .langs { margin-top: 20px; }  /* 35,5 - 15,5 (metà altezza del selettore) */
.nav { display: flex; gap: 20px; flex-wrap: wrap; }
.nav a { color: var(--muted); font-size: 15px; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a[aria-current] { color: var(--text); box-shadow: inset 0 -2px 0 var(--brand); }
.nav { margin-left: auto; }
/* selettore di lingua, in alto a destra */
.langs { display: flex; align-items: center; font-size: 13px; letter-spacing: 1px; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.langs a { padding: 4px 10px; color: var(--muted); }
.langs a + a { border-left: 1px solid var(--line); }
.langs a:hover { color: var(--text); text-decoration: none; }
.langs a[aria-current] { color: var(--text); background: color-mix(in srgb, var(--brand) 16%, var(--panel)); }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 22px; }
.tabs a {
  font-size: 14px; padding: 6px 14px; border-radius: 99px; color: var(--text-2);
  border: 1px solid var(--line); background: var(--panel);
}
.tabs a:hover { border-color: var(--brand); color: var(--text); text-decoration: none; }
.tabs a[aria-current] { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 16%, var(--panel)); color: var(--text); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-head .section-title { margin-bottom: 14px; }
.section-head a { font-size: 14px; }
.crumbs { margin: 0 0 12px; font-size: 14px; }

/* come Horizon: 46 px (anche su telefono) tra la linea dell'header e il bordo visibile del primo
   elemento. Al primo elemento si toglie lo spazio sopra le maiuscole (interlinea e ascendente):
   con text-box dove il browser lo supporta, altrimenti con un margine negativo equivalente. */
main.wrap { padding-top: 47px; padding-bottom: 40px; }
@supports (text-box: trim-start cap alphabetic) {
  /* +1 px: puntini delle "i" e ascendenti salgono di ~2 px sopra le maiuscole, così lo scarto
     tra "Lumenscope" e "Privacy" si divide a metà */
  :is(.page-title, .home-title, .prose > h1, .crumbs):first-child { text-box: trim-start cap alphabetic; margin-top: 1px; }
}
@supports not (text-box: trim-start cap alphabetic) {
  :is(.page-title, .home-title, .prose > h1):first-child { margin-top: -5px; }
  .crumbs:first-child { margin-top: -4px; }
}

/* titoli e sottotitoli come quelli di Horizon: sans 32 px semi-bold, sottotitolo 16/22 px a 12 px
   dal titolo, primo blocco a 16 px (24 su telefono) */
.page-title { font-family: var(--sans); font-size: 32px; font-weight: 600; line-height: 1.2; letter-spacing: -0.3px; margin: 0; }
.lead { color: var(--muted); font-size: 16px; line-height: 22px; margin: 12px 0 16px; }
.section-title { font-family: var(--sans); font-size: 20px; font-weight: 600; letter-spacing: -0.2px; margin: 34px 0 14px; }
.lead + .shelf > .section-title { margin-top: 0; }
.empty { color: var(--muted); }
/* vetrine di Serie TV e Film: una fila per sezione, quelle per genere con il colore della categoria */
.cat-title { display: flex; align-items: center; gap: 10px; }
.cat-title::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--cat); flex: none; }
.shelf-more { margin: 34px 0 8px; text-align: center; }
/* "Sfoglia per genere": titolo con la linea accanto (come le lettere del Catalogo), etichette-link dei
   generi con lo stile dei badge, e le file dei generi con titoli più piccoli (sottosezioni) */
.section-title.divider { display: flex; align-items: center; gap: 14px; margin-top: 44px; }
.section-title.divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.genre-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.genre-nav .badge { font-size: 13px; padding: 4px 13px; transition: background-color .15s; }
.genre-nav .badge:hover, .genre-nav .badge:focus-visible { background: color-mix(in srgb, var(--cat) 34%, transparent); color: var(--text); text-decoration: none; }
.genres .cat-title { scroll-margin-top: 24px; }
.genres .cat-title { font-size: 17px; }

/* pagine di solo testo (Chi siamo, Privacy, Avvisi legali), come quelle di Horizon:
   colonna centrata, nessuna card, H2 con una barra azzurra a sinistra */
.prose { max-width: 850px; margin: 0 auto; padding: 0 0 48px; }
.prose h1 { font-family: var(--sans); font-size: 32px; font-weight: 600; line-height: 1.2; letter-spacing: -0.3px; margin: 0 0 24px; }
.prose section { margin-top: 44px; }
.prose h2 {
  font-family: var(--sans); font-size: 24px; font-weight: 600; line-height: 1.3; letter-spacing: -0.2px;
  margin: 0 0 14px; padding-left: 16px; border-left: 3px solid #38BDF8;
}
.prose p { font-size: 16px; line-height: 1.75; color: var(--text-2); margin: 0 0 14px; }
.prose p.prose-intro { font-size: 20px; line-height: 1.7; color: #D5DCE6; margin: 0; }
.prose a { color: var(--brand); }

/* home: titolo e card hub nello stile della home di Horizon */
.home-title { font-family: var(--sans); font-size: 32px; font-weight: 600; line-height: 1.2; letter-spacing: -0.3px; margin: 0; }
/* sottotitolo su una riga da tablet in su: il carattere si riduce un po' sugli schermi stretti
   (da 16 a 14 px) così la frase intera sta nel contenitore; su telefono va a capo */
.home-lead { margin: 12px 0 0; font-size: clamp(14px, 1.9vw, 16px); line-height: 22px; color: var(--muted); white-space: nowrap; }
.hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 16px 0 8px; }
.hub-card {
  display: grid; grid-template-columns: 40% minmax(0, 1fr); gap: 18px; align-items: stretch;
  padding: 14px; min-height: 200px; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.hub-card:hover, .hub-card:focus-visible {
  text-decoration: none; transform: translateY(-3px); border-color: var(--brand);
  box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--brand) 60%, transparent);
}
.hub-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.hub-body { display: flex; flex-direction: column; gap: 8px; padding: 6px 4px 4px 0; min-width: 0; }
.hub-body h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.2px; }
/* descrizione sempre intera: la card cresce se serve */
.hub-body p { margin: 0; font-size: 14px; line-height: 20px; color: var(--muted); }
.hub-go { margin-top: auto; color: var(--brand); font-size: 14px; font-weight: 500; }

/* pannello illustrato: scuro, angoli arrotondati, bordo sottile */
.hub-visual {
  position: relative; overflow: hidden; min-height: 170px; border-radius: 12px;
  border: 1px solid var(--line); background: radial-gradient(120% 90% at 30% 10%, #13203A 0%, var(--panel-2) 60%);
}
.hub-visual img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Serie TV: tre locandine a ventaglio */
.fan-poster {
  position: absolute; top: 50%; left: 50%; width: 38%; aspect-ratio: 2 / 3; overflow: hidden;
  border-radius: 6px; border: 1px solid #ffffff22; background: #1B2434;
  box-shadow: 0 8px 18px -6px #000c; transform-origin: 50% 100%;
}
.fan-1 { transform: translate(-95%, -50%) rotate(-12deg); }
.fan-3 { transform: translate(-5%, -50%) rotate(12deg); }
.fan-2 { transform: translate(-50%, -54%); z-index: 1; }

/* Film: tre locandine a ventaglio sopra una pellicola */
.filmstrip {
  position: absolute; left: 0; right: 0; bottom: 10%; height: 26px; transform: rotate(-6deg) scale(1.15);
  background:
    repeating-linear-gradient(90deg, #080B10 0 6px, transparent 6px 12px) top / 100% 5px no-repeat,
    repeating-linear-gradient(90deg, #080B10 0 6px, transparent 6px 12px) bottom / 100% 5px no-repeat,
    color-mix(in srgb, var(--brand) 55%, #0A0F18);
  opacity: .8;
}

/* Catalogo: riga A–Z in alto e 2-3 locandine grandi, un po' sovrapposte; senza locandine una
   grafica tipografica "A–Z" nel colore della categoria */
.hub-az { display: flex; flex-direction: column; gap: 12px; padding: 14px 12px 0; container: hubaz / inline-size; }
.az-strip { display: grid; grid-template-columns: repeat(26, 1fr); text-align: center; font-size: 10px; font-weight: 600; color: #3A4659; }
/* tessera stretta (PC, card in due colonne): A–M sopra e N–Z sotto, così le lettere respirano */
@container hubaz (max-width: 320px) { .az-strip { grid-template-columns: repeat(13, 1fr); row-gap: 3px; } }
.az-strip .on { color: var(--brand); }
.az-posters { flex: 1; display: flex; justify-content: center; align-items: flex-end; gap: 10px; min-height: 0; overflow: hidden; }
.az-posters > span {
  height: 100%; width: auto; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 8px 8px 0 0;
  flex: 0 1 auto; min-width: 0; border: 1px solid #ffffff22; border-bottom: 0; background: #1B2434; box-shadow: 0 -6px 18px -6px #000c;
}
.az-posters img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hub-az-type { justify-content: flex-start; padding-bottom: 12px; }
.az-type {
  flex: 1; display: grid; place-items: center; font-family: var(--serif); font-size: 56px; line-height: 1;
  color: var(--text);
  background: radial-gradient(70% 70% at 50% 60%, color-mix(in srgb, var(--cat) 40%, transparent), transparent 70%);
}
.az-type span { color: var(--cat); padding: 0 4px; }

/* Consigli: illustrazione generica, uno schermo e un secchiello di pop corn (non dipende dai titoli) */
.hub-cinema { display: grid; place-items: center; padding: 8px; }
.cinema { display: block; width: 100%; height: 100%; max-height: 100%; }
.cn-play { fill: var(--brand); opacity: .9; }
.cn-screen { stroke: var(--brand); stroke-width: 1.5; }
.cn-stripe-a { fill: var(--brand); }
.cn-stripe-b { fill: #E0F2FE; }
.cn-rim { fill: #E0F2FE; }
.cn-remote { fill: #13233A; stroke: var(--brand); stroke-width: 1.5; }
.cn-remote-power { fill: var(--brand); }
.cn-remote-ring { fill: none; stroke: var(--brand); stroke-width: 1.2; }
.cn-remote-btn { fill: #E0F2FE; opacity: .85; }
.cn-corn circle { fill: #FDE68A; stroke: #F5C451; stroke-width: 1.2; }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tile {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; color: var(--text);
}
.tile:hover { border-color: var(--cat); text-decoration: none; }
.tile-icon {
  flex: none; width: 64px; height: 64px; border-radius: 12px; background: var(--panel-2);
  color: var(--cat); display: flex; align-items: center; justify-content: center; font-size: 28px;
}
.tile strong { display: block; font-weight: 500; font-size: 17px; }
.tile em { display: block; font-style: normal; color: var(--muted); font-size: 14px; margin: 2px 0 8px; }
.tile .go { color: var(--brand); font-size: 14px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
[hidden] { display: none !important; }
.title-card { display: flex; flex-direction: column; min-width: 0; color: var(--text); }
/* contenitore della card: link + segnalibro "Da vedere" sopra la locandina, in alto a sinistra */
.tc { position: relative; display: flex; flex-direction: column; min-width: 0; }
.tc > .title-card { flex: 1 1 auto; }
.wish-btn {
  position: absolute; top: 8px; left: 8px; z-index: 2; display: grid; place-items: center;
  width: 32px; height: 32px; padding: 0; border-radius: 99px; cursor: pointer; color: var(--text);
  background: rgba(8, 11, 16, .72); border: 1px solid #ffffff26;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background-color .15s, color .15s, border-color .15s;
}
.wish-btn:hover { border-color: var(--brand); color: var(--brand); }
.wish-btn:focus-visible, .wish-toggle:focus-visible, .wish-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.wish-icon { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
[aria-pressed=true] > .wish-icon { fill: currentColor; }
.wish-btn[aria-pressed=true] { color: #04202E; background: var(--brand); border-color: var(--brand); }
/* segnalibro nella scheda */
.wish-row { margin: 14px 0 0; }
.wish-row:has(> [hidden]) { display: none; }
.wish-toggle {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; cursor: pointer;
  font: inherit; font-size: 14px; color: var(--text-2); background: var(--panel-2); border: 1px solid var(--line);
  transition: border-color .15s, color .15s, background-color .15s;
}
.wish-toggle:hover { border-color: var(--brand); color: var(--text); }
.wish-toggle[aria-pressed=true] { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 60%, var(--line)); background: color-mix(in srgb, var(--brand) 12%, var(--panel)); }
/* header: icona Da vedere con il numero di titoli */
.wish-link { position: relative; display: grid; place-items: center; width: 31px; height: 31px; margin-top: 20px; border-radius: 99px; color: var(--muted); border: 1px solid var(--line); }
.wish-link:hover { color: var(--text); text-decoration: none; border-color: var(--brand); }
.wish-link[aria-current] { color: var(--brand); border-color: var(--brand); }
.wish-link .wish-icon { width: 16px; height: 16px; }
.search-link .wish-icon { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.search-link { margin-left: 0; }
.wish-count {
  position: absolute; top: -6px; right: -8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; color: #04202E; background: var(--brand);
}
/* Prossime uscite (pagina Serie TV): badge in basso a sinistra sulla locandina (in alto c'è il
   segnalibro), data sotto il titolo */
.release-badge {
  position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); padding: 3px 10px; border-radius: 99px;
  font-size: 11px; font-weight: 600; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: #04202E; background: var(--brand);
}
.release-badge.is-out { color: #E0F2FE; background: rgba(8, 47, 73, .82); border: 1px solid var(--brand); }
.release .title-card-meta { color: var(--text-2); }
.release-date { margin: 2px 0 0; font-size: 13px; line-height: 20px; font-weight: 600; color: var(--brand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.releases-note { margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.releases-note a { color: var(--text-2); }
/* pagina Da vedere */
.wish-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.wish-head .lead { max-width: 640px; }
.wish-total { color: var(--muted); font-weight: 400; font-size: .6em; }
.wish-tools { display: flex; gap: 10px; margin-bottom: 16px; }
.wish-tools .btn { cursor: pointer; font: inherit; font-size: 14px; font-weight: 500; }
.wish-tools .btn:disabled { opacity: .45; cursor: default; background: none; color: var(--brand); }
.wish-import:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.wish-status { min-height: 20px; margin: 0 0 12px; font-size: 14px; color: var(--brand); }
.wish-status:empty { margin: 0; min-height: 0; }
.title-card:hover { text-decoration: none; }
.title-card:hover .poster { border-color: var(--cat); }
/* card titolo: il titolo ha sempre lo spazio di due righe (taglia con "…" solo oltre la seconda),
   così tutte le card sono alte uguali */
.title-card-name {
  margin: 8px 0 0; font-size: 14px; font-weight: 600; line-height: 20px; height: 40px;
  overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
}
.title-card-meta { margin: 0; font-size: 12px; line-height: 18px; height: 18px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.title-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 22px; margin-top: 4px; min-width: 0; }
.title-card-foot .badge { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.title-card-foot .score, .title-card-foot .status-badge { flex: none; margin: 0; }

.poster {
  aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--cat) 14%, var(--panel-2));
  display: flex; align-items: center; justify-content: center;
}
.poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* copertina grafica quando non c'è una locandina libera: sfumatura nel colore della categoria,
   tipo in alto, titolo e anno · regia in basso; in proporzione con la card (cqw = larghezza) */
.poster { container-type: inline-size; }
.poster-cover {
  position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: flex-end;
  gap: 6px; padding: 9cqw 9cqw 10cqw; overflow: hidden;
  background:
    radial-gradient(120% 70% at 85% 0%, color-mix(in srgb, var(--cat) 45%, transparent) 0%, transparent 60%),
    linear-gradient(165deg, color-mix(in srgb, var(--cat) 30%, #0F1521) 0%, #0A0F18 75%);
}
.poster-cover::before {
  content: ""; position: absolute; left: 9cqw; right: 9cqw; top: 22cqw; height: 1px;
  background: color-mix(in srgb, var(--cat) 60%, transparent);
}
.cover-kind {
  position: absolute; left: 9cqw; top: 9cqw; font-size: max(9px, 6.5cqw); letter-spacing: .12em;
  text-transform: uppercase; color: color-mix(in srgb, var(--cat) 75%, white);
}
.cover-title {
  font-family: var(--serif); font-size: max(13px, 12cqw); line-height: 1.15; color: var(--text);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; overflow-wrap: anywhere;
}
.cover-meta { font-size: max(9px, 6.5cqw); line-height: 1.3; color: var(--text-2); }
.awards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.awards span { color: var(--muted); }

.badge {
  display: inline-block; font-size: 11px; line-height: 1.5; padding: 1px 9px; border-radius: 99px;
  background: color-mix(in srgb, var(--cat) 18%, transparent);
  color: color-mix(in srgb, var(--cat) 70%, white);
}
.score { font-size: 12px; margin-left: 8px; color: var(--text-2); white-space: nowrap; }
.score span { color: #FBBF24; }
.score-none { color: var(--muted); }
/* etichetta "In corso" sopra la locandina delle card, in alto a destra */
.card-poster { position: relative; }
.poster-badge {
  position: absolute; top: 8px; right: 8px; padding: 2px 9px; border-radius: 99px;
  font-size: 11px; line-height: 16px; color: #E0F2FE; white-space: nowrap;
  background: rgba(8, 47, 73, .72); border: 1px solid color-mix(in srgb, var(--brand) 60%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.kind-badge {
  display: inline-block; font-size: 11px; line-height: 1.5; padding: 0 7px; margin-right: 5px; border-radius: 99px;
  border: 1px solid var(--line); color: var(--text-2);
}

.filters {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 22px;
}
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.filters select, .filters input {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 14px; min-width: 150px;
}
.filters button {
  background: var(--brand); color: #04202E; border: 0; border-radius: 8px;
  padding: 9px 18px; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
}
.filters button:hover { filter: brightness(1.08); }
/* chip selezionabili del Catalogo: piattaforme (più scelte) e barra A–Z (una lettera) */
.toggle-row { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; padding: 0; border: 0; min-width: 0; }
.toggle-row legend { float: left; width: 100%; padding: 0 0 6px; font-size: 12px; color: var(--muted); }
.toggle-row legend .hint { opacity: .8; }
.toggle-row .note { flex: 1 0 100%; margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.filters .toggle { position: relative; display: inline-flex; flex-direction: row; font-size: 14px; color: var(--text-2); }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; min-width: 0; margin: 0; padding: 0; }
.toggle > span {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 99px; background: var(--panel-2); cursor: pointer;
}
.toggle:hover > span { border-color: var(--brand); color: var(--text); }
.toggle input:checked + span { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 18%, var(--panel)); color: var(--text); }
.toggle input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.toggle input:disabled + span { opacity: .35; cursor: default; border-color: var(--line); }
.toggle-count { font-size: 12px; color: var(--muted); }
.toggle.is-zero > span { opacity: .55; }
.az { gap: 4px; }
.az .toggle > span { min-width: 34px; justify-content: center; padding: 6px 8px; font-size: 13px; }
/* Catalogo: ricerca con suggerimenti, Azzera filtri, elenco per lettera e indice laterale */
.search-field { position: relative; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.filters .search-field input { min-width: 230px; }
.suggestions {
  position: absolute; z-index: 20; top: 100%; left: 0; width: max(100%, 340px); margin: 6px 0 0; padding: 6px;
  list-style: none; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 16px 32px -12px #000c; max-height: 360px; overflow-y: auto;
}
.suggestions li {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto; align-items: center; gap: 10px;
  padding: 6px 8px; border-radius: 8px; font-size: 14px; color: var(--text); cursor: pointer;
}
.suggestions li[aria-selected=true], .suggestions li:hover { background: color-mix(in srgb, var(--brand) 16%, var(--panel)); }
.suggestions .suggestion-none { display: block; color: var(--muted); cursor: default; }
.suggestions .suggestion-none:hover { background: none; }
.suggestion-thumb { width: 30px; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 4px; background: #1B2434; }
.suggestion-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.suggestion-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.suggestion-meta { color: var(--muted); font-size: 12px; }
/* motivo della corrispondenza nella ricerca del Catalogo ("Con Bryan Cranston") */
.suggestion-why { display: block; font-size: 12px; color: var(--brand); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.title-card-meta.is-match { color: var(--brand); }
.suggestions .kind-badge { margin: 0; }
.filters .btn-clear {
  background: transparent; color: var(--brand); border: 1px solid var(--brand);
}
.filters .btn-clear:hover:not(:disabled) { background: var(--brand); color: #04202E; filter: none; }
.filters .btn-clear:disabled { color: var(--muted); border-color: var(--line); cursor: default; }

.az-section { position: relative; }
/* intestazione della lettera: discreta, alta 40 px, con la linea accanto; resta agganciata in
   alto mentre scorri la sua sezione e ha lo sfondo della pagina, così le card passano sotto */
.az-head {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  height: 40px; margin: 24px 0 12px; padding: 0;
  font-family: var(--sans); font-size: 24px; font-weight: 600; line-height: 1; color: #38BDF8;
  background: var(--bg);
}
.az-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.az-section:first-child .az-head { margin-top: 0; }
.az-index {
  position: fixed; z-index: 15; right: 6px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px;
  background: color-mix(in srgb, var(--panel) 85%, transparent); border: 1px solid var(--line); border-radius: 99px;
}
.az-index a { display: block; width: 22px; text-align: center; font-size: 12px; line-height: 20px; color: var(--muted); border-radius: 99px; }
.az-index a:hover { color: var(--text); text-decoration: none; }
.az-index a.is-current { color: #04202E; background: var(--brand); font-weight: 600; }
.az-index a:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
@media (max-width: 1160px) {
  .catalogo-page { padding-right: 26px; }  /* spazio per l'indice laterale */
}

/* Consigli: card delle raccolte e pagina di una raccolta */
.collection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.collection-card {
  display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 14px; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  transition: transform .15s ease, border-color .15s ease;
}
.collection-card:hover, .collection-card:focus-visible { text-decoration: none; transform: translateY(-3px); border-color: var(--brand); }
.collection-posters { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.collection-posters span { aspect-ratio: 2 / 3; overflow: hidden; border-radius: 6px; background: #1B2434; }
.collection-posters img { display: block; width: 100%; height: 100%; object-fit: cover; }
.collection-body { display: flex; flex-direction: column; gap: 6px; }
.collection-body strong { font-size: 18px; font-weight: 600; }
.collection-body em { font-style: normal; font-size: 14px; color: var(--muted); }
.collection-count { margin-top: auto; font-size: 13px; color: var(--brand); }
.collection-intro { max-width: 760px; }
.collection-list { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.collection-list li { display: grid; grid-template-columns: 34px 170px minmax(0, 1fr); gap: 18px; align-items: start; }
.collection-num { font-size: 24px; font-weight: 600; color: var(--brand); text-align: center; line-height: 1.2; }
.collection-note { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.7; }


/* box filtri del Catalogo, compatto: ricerca + Azzera, quattro menu, piattaforme in una fila */
.sr-only, .toggle-row legend.sr-only {
  position: absolute; float: none; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* Catalogo: barra compatta dei filtri. Su PC una riga: ricerca, Serie/Film, Stato, Filtri, Ordina
   per, Azzera, contatore; su telefono ricerca a tutta larghezza e i menu due per riga */
.catalog-bar {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 12px 14px; margin-bottom: 22px;
}
.catalog-bar .cb-search { flex: 1 1 240px; min-width: 0; }
/* tutti i controlli della barra (ricerca, menu, Filtri, selezioni multiple, Azzera filtri) hanno
   lo stesso aspetto: sfondo e bordo delle selezioni multiple, raggio, testo, altezza, hover e focus */
.catalog-bar {
  --control-bg: var(--panel-2); --control-border: var(--line); --control-radius: 8px;
  --control-text: var(--text); --control-height: 38px;
  --control-hover: color-mix(in srgb, var(--brand) 50%, var(--line));
}
.catalog-bar input, .catalog-bar select, .catalog-bar .cb-toggle, .catalog-bar .btn-clear, .catalog-bar .ms-static {
  background-color: var(--control-bg); border: 1px solid var(--control-border); border-radius: var(--control-radius);
  color: var(--control-text); font: inherit; font-size: 14px; font-weight: 400;
}
.catalog-bar input, .catalog-bar select, .catalog-bar .cb-toggle, .catalog-bar .btn-clear { height: var(--control-height); }
.catalog-bar .search-field input { width: 100%; min-width: 0; padding: 0 12px; }
.catalog-bar input::placeholder { color: var(--muted); opacity: 1; }
.catalog-bar select {
  min-width: 0; padding: 0 30px 0 10px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238A96A8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
/* opzioni della tendina aperta: stesso sfondo e testo dei controlli */
.catalog-bar select option { background-color: var(--control-bg); color: var(--control-text); }
.catalog-bar input:hover, .catalog-bar select:hover, .catalog-bar .cb-toggle:hover,
.catalog-bar .btn-clear:hover:not(:disabled), .catalog-bar .ms-static:hover {
  border-color: var(--control-hover); background-color: var(--control-bg); color: var(--control-text); filter: none;
}
.catalog-bar input:focus-visible, .catalog-bar select:focus-visible, .catalog-bar .cb-toggle:focus-visible,
.catalog-bar .btn-clear:focus-visible, .catalog-bar .ms-static:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand);
}
.catalog-bar .btn-clear:disabled { color: var(--muted); border-color: var(--control-border); cursor: default; }
.catalog-bar label.cb-select { display: flex; flex-direction: row; align-items: center; gap: 8px; flex: none; font-size: 14px; }
.cb-sort-label { font-size: 13px; color: var(--muted); white-space: nowrap; }
.catalog-bar .btn-clear { padding: 0 14px; flex: none; }
/* tendine Genere e Piattaforma: pulsante come i menu e pannello con la lista, sotto il pulsante */
.cb-more { position: relative; flex: none; }
.catalog-bar .cb-toggle {
  padding: 0 30px 0 14px; cursor: pointer; text-align: left; white-space: nowrap;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238A96A8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
.cb-toggle[aria-expanded="true"] { border-color: var(--brand); }
.cb-count { color: var(--brand); }
.cb-panel {
  position: absolute; z-index: 25; left: 0; top: calc(100% + 6px); width: 260px; max-width: calc(100vw - 32px);
  padding: 8px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 30px -10px #000d;
}
.cb-panel[hidden] { display: none; }
/* il titolo del gruppo è già sul pulsante: resta solo per i lettori di schermo */
.cb-panel .cf-group-title { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cf-group { min-width: 0; }
.ms-list.ms-static { position: static; width: auto; max-width: none; max-height: 280px; box-shadow: none; border: 0; background: transparent; padding: 0; }
.catalog-bar .ms-option:hover, .catalog-bar .ms-option.is-active { background: color-mix(in srgb, var(--brand) 14%, var(--panel-2)); color: var(--text); }
/* schede del Catalogo: colonne larghe al massimo 200 px (le locandine non si ingrandiscono) e voto
   sovrapposto alla locandina */
.catalogo-page .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); gap: 20px 18px; }
.catalogo-page .catalog-grid .tc { width: 100%; max-width: 200px; }
.catalogo-page .title-card-foot .score { display: none; }
.poster-score { display: none; }
.catalogo-page .poster-score {
  display: inline-flex; align-items: center; gap: 4px; position: absolute; left: 8px; bottom: 8px;
  padding: 3px 8px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--text);
  background: rgba(8, 11, 16, .82); border: 1px solid #ffffff22; backdrop-filter: blur(4px);
}
.catalogo-page .poster-score span[aria-hidden] { color: #FBBF24; }
.catalogo-page .title-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 10px; }
/* menu a scelta multipla (Genere, Piattaforma): pulsante come un menu e lista con le caselle */
.ms { position: relative; }
.filters .ms-button { display: block; min-width: 0; text-align: left; font-weight: 400; }
.filters .ms-button:hover { filter: none; border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); }
.ms-button[aria-expanded="true"] { border-color: var(--brand); }
.ms-value { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ms-list {
  position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; min-width: 100%; width: max-content; max-width: 300px;
  max-height: 320px; overflow-y: auto; margin: 0; padding: 4px; list-style: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 28px -8px #000c;
}
.ms-list:focus { outline: none; }
.ms-list:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.ms-option {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 6px;
  font-size: 14px; color: var(--text-2); cursor: pointer; white-space: nowrap;
}
.ms-option:hover, .ms-option.is-active { background: color-mix(in srgb, var(--brand) 12%, var(--panel)); color: var(--text); }
.ms-list:focus .ms-option.is-active { box-shadow: inset 0 0 0 1px var(--brand); }
.ms-option[aria-selected="true"] { color: var(--text); }
.ms-check {
  flex: none; width: 16px; height: 16px; border: 1px solid var(--muted); border-radius: 4px; display: grid; place-items: center;
}
.ms-option[aria-selected="true"] .ms-check { background: var(--brand); border-color: var(--brand); }
.ms-option[aria-selected="true"] .ms-check::after {
  content: ""; width: 8px; height: 4px; margin-top: -2px; border: solid #04202E; border-width: 0 0 2px 2px; transform: rotate(-45deg);
}
.ms-count { margin-left: auto; padding-left: 8px; font-size: 12px; color: var(--muted); }
.ms-option.is-zero { opacity: .55; }
.cf-note { margin: -4px 0 0; font-size: 11px; color: var(--muted); }

.sample-note {
  background: color-mix(in srgb, #FBBF24 12%, transparent); color: #FBCF5E;
  border: 1px solid color-mix(in srgb, #FBBF24 30%, transparent);
  border-radius: 10px; padding: 8px 14px; font-size: 13px; margin: 0 0 18px;
}

.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 26px; align-items: center;
  background: color-mix(in srgb, var(--cat) 8%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--cat) 25%, var(--line));
  border-radius: var(--radius); padding: 24px; margin-bottom: 16px;
}
/* sfondo: la stessa locandina, molto sfocata e scura, più una sfumatura nel colore della categoria */
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; }
.hero::before {
  inset: -60px; background: var(--poster, none) center / cover no-repeat;
  filter: blur(40px) saturate(1.2) brightness(.55); opacity: .35;
}
.hero::after {
  inset: 0;
  background: linear-gradient(100deg, color-mix(in srgb, var(--bg) 55%, transparent) 0%,
              color-mix(in srgb, var(--cat) 16%, color-mix(in srgb, var(--bg) 70%, transparent)) 100%);
}
.hero .poster { box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.hero-body { min-width: 0; }
.hero-title { font-family: var(--sans); font-size: 32px; font-weight: 600; line-height: 1.2; letter-spacing: -0.3px; margin: 8px 0 4px; }
.meta { color: var(--text-2); font-size: 14px; margin: 0 0 10px; }
.rating { margin: 0; display: flex; align-items: baseline; gap: 6px; }
.rating-num { font-size: 30px; font-weight: 500; }
.rating-of { font-size: 13px; color: var(--text-2); }
.rating-note { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.provisional-note {
  margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; font-size: 13px; color: #BAE6FD;
  background: color-mix(in srgb, var(--brand) 12%, transparent); border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent);
}
/* frase di apertura: sans come il resto del sito, sempre intera (va a capo, nessun troncamento) */
.hook {
  font-family: var(--sans); font-style: italic; font-size: 18px; line-height: 1.45; color: var(--text);
  margin: 12px 0 0; max-width: 62ch;  /* frase di apertura sempre intera */
}
/* scheda di un film che fa parte di una saga: saga, posizione e film prima e dopo, sotto la frase di apertura */
.saga-line { margin: 12px 0 0; font-size: 14px; line-height: 1.6; color: var(--text-2); }
.saga-line a { color: var(--brand); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; }
.chips li {
  font-size: 13px; line-height: 1.4; padding: 4px 11px; border-radius: 99px; color: var(--text);
  background: rgba(8, 11, 16, .55); border: 1px solid color-mix(in srgb, var(--cat) 35%, var(--line));
}
.btn {
  display: inline-block; padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 500;
  border: 1px solid var(--brand); color: var(--brand); background: rgba(8, 11, 16, .4);
  transition: background-color .15s, color .15s;
}
.btn:hover, .btn:focus-visible { background: var(--brand); color: #04202E; text-decoration: none; }
#riassunto, #recensione, #dove-vederlo { scroll-margin-top: 16px; }

/* scheda titolo: barra dei tab a tutta larghezza; sotto, a sinistra il tab scelto e a destra In breve, Cast e
   Dove vederlo (la colonna sparisce col tab Trailer, che resta a tutta larghezza) */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 16px 20px; align-items: start; min-width: 0; }
.detail > .tabbar { grid-column: 1 / -1; }
.detail-main, .detail-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.detail[data-tab="trailer"] { grid-template-columns: minmax(0, 1fr); }
.detail[data-tab="trailer"] .detail-side { display: none; }
@media (max-width: 1000px) {
  .detail { grid-template-columns: minmax(0, 1fr); }
}
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.panel h2 { font-size: 16px; font-weight: 500; margin: 0 0 8px; }
.panel p { color: var(--text-2); margin: 0 0 10px; font-size: 15px; }
.panel .note { color: var(--muted); font-size: 12px; margin: 8px 0 0; }

details { border-top: 1px solid var(--line); padding: 8px 0; }
/* testo di una stagione: paragrafi distanziati, avviso spoiler e riepilogo in evidenza */
.season-text { padding: 6px 0 4px; }
.season-text p { margin: 0 0 12px; line-height: 1.7; }

/* avviso spoiler e lettore audio: stessa larghezza (quella dell'avviso) e stessa altezza */
.spoiler-audio { display: grid; grid-auto-rows: 1fr; row-gap: 8px; width: fit-content; max-width: 100%; margin: 0 0 12px; }
.spoiler-audio .spoiler-note { display: flex; align-items: center; margin: 0; }
@media (max-width: 520px) { .spoiler-audio { width: 100%; } }
/* lettore audio del riassunto di stagione (audio.js); senza JavaScript resta il lettore del browser.
   Una riga sola, anche su telefono: pulsante, barra sottile che si riempie, tempo, velocità. */
.audio-player {
  display: flex; align-items: center; gap: 10px; box-sizing: border-box; min-height: 34px; margin: 0 0 14px; padding: 3px 8px 3px 4px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
}
.spoiler-audio .audio-player { margin: 0; }
.audio-player audio { width: 100%; height: 32px; min-width: 240px; }
.audio-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.audio-btn {
  width: 26px; height: 26px; flex: none; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--brand); color: #06101c; display: grid; place-items: center;
  transition: transform .15s;
}
.audio-btn:hover { transform: scale(1.08); }
.audio-btn::before { content: ""; margin-left: 2px; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent currentColor; border-radius: 1px; }
/* pausa: due barre alte e ravvicinate */
.audio-btn.is-playing::before { margin: 0 4px 0 0; width: 2px; height: 11px; border: 0; border-radius: 1px; background: currentColor; box-shadow: 4px 0 0 currentColor; }
.audio-player.is-idle .audio-label {
  position: static; flex: 1 1 auto; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal;
  font-size: 13px; line-height: 1.3; color: var(--text-2); cursor: pointer;
}
.audio-player.is-idle .audio-range, .audio-player.is-idle .audio-time, .audio-player.is-idle .audio-speed { display: none; }
.audio-time { flex: none; font-size: 12px; line-height: 1; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* barra sottile: la parte già ascoltata è azzurra su fondo scuro (--p la imposta audio.js) */
.audio-range {
  --p: 0%; -webkit-appearance: none; appearance: none; display: block; flex: 1 1 60px; min-width: 40px; width: auto; height: 18px; margin: 0;
  background: transparent; cursor: pointer;
}
.audio-range::-webkit-slider-runnable-track { height: 4px; border-radius: 999px; background: linear-gradient(to right, var(--brand) var(--p), #1A2433 var(--p)); }
.audio-range::-moz-range-track { height: 4px; border-radius: 999px; background: #1A2433; }
.audio-range::-moz-range-progress { height: 4px; border-radius: 999px; background: var(--brand); }
.audio-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 11px; height: 11px; margin-top: -3.5px; border: 0; border-radius: 50%; background: var(--brand); }
.audio-range::-moz-range-thumb { width: 11px; height: 11px; border: 0; border-radius: 50%; background: var(--brand); }
.audio-speed {
  flex: none; min-width: 30px; height: 22px; padding: 0 6px; border: 1px solid var(--line); border-radius: 6px;
  background: none; color: var(--text-2); font: inherit; font-size: 12px; line-height: 1; cursor: pointer;
}
.audio-speed:hover { color: var(--text); border-color: var(--muted); }
.audio-btn:focus-visible, .audio-speed:focus-visible, .audio-range:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.audio-note { margin: 0; font-size: 13px; color: var(--muted); }
.spoiler-note {
  display: inline-block; padding: 4px 10px; border-radius: 8px; font-size: 13px !important;
  color: #FDE68A !important; background: rgba(251, 191, 36, .12); border: 1px solid rgba(251, 191, 36, .35);
}
.recap {
  padding: 10px 12px; border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0;
  background: color-mix(in srgb, var(--brand) 8%, transparent); color: var(--text-2);
}
.recap strong { color: var(--text); font-weight: 600; }
summary { cursor: pointer; font-size: 14px; color: var(--brand); }

.proscons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.pc { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; }
.pc h3 { font-size: 12px; font-weight: 500; margin: 0 0 4px; }
.pc p { font-size: 13px; margin: 0; }

/* tab Riassunto / Recensione della scheda titolo (attivati da tabs.js) */
.tabbar { display: flex; gap: 22px; border-bottom: 1px solid var(--line); scroll-margin-top: 12px; }
.tabbar [role=tab] {
  background: none; border: 0; padding: 10px 2px; min-height: 44px; cursor: pointer;
  font: inherit; font-size: 16px; color: var(--muted);
}
.tabbar [role=tab]:hover { color: var(--text); }
.tabbar [role=tab][aria-selected=true] { color: var(--text); box-shadow: inset 0 -2px 0 var(--brand); }
.tabbar [role=tab]:focus-visible, [role=tabpanel]:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
.tabs-on [data-panel] .panel-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* tab Trailer: riquadro 16:9; il lettore sostituisce il pulsante al clic (trailer.js) */
.trailer-box { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--panel-2); border: 1px solid var(--line); }
.trailer-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.trailer-play {
  position: absolute; inset: 0; width: 100%; border: 0; cursor: pointer; padding: 0;
  background: var(--panel-2) center / cover no-repeat; display: grid; place-items: center;
}
.trailer-play::before { content: ""; position: absolute; inset: 0; background: rgba(6, 10, 16, .55); transition: background .15s; }
.trailer-play:hover::before { background: rgba(6, 10, 16, .35); }
.trailer-play span {
  position: relative; width: 68px; height: 68px; border-radius: 50%; background: var(--brand);
  display: grid; place-items: center;
}
.trailer-play span::after { content: ""; margin-left: 5px; border-style: solid; border-width: 12px 0 12px 20px; border-color: transparent transparent transparent #06101c; }
.trailer-play:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.trailer-note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }

/* box "Dove vederlo": 6 celle (5 paesi + "Altri paesi") sempre su una riga su PC e su due righe da 3 su telefono */
.watch-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.watch-list > li { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.watch-btn {
  display: block; text-align: center; padding: 8px 6px; border-radius: 8px; font-size: 13px; font-weight: 500;
  border: 1px solid var(--line); color: var(--text-2); background: var(--panel-2); cursor: pointer; list-style: none;
  transition: border-color .15s, color .15s;
}
.watch-btn::-webkit-details-marker { display: none; }
.watch-btn:hover, .watch-btn:focus-visible { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.watch-where { font-size: 12px; color: var(--muted); text-align: center; overflow-wrap: anywhere; }
.watch-more { border-top: 0; padding: 0; margin: 0; }
.watch-more summary::after { content: " +"; color: var(--muted); }
.watch-more[open] summary::after { content: " –"; }
.watch-more-cell:has(.watch-more[open]) { grid-column: 1 / -1; }
.watch-others { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px 14px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); font-size: 14px; }
.watch-others a { color: var(--text-2); border-bottom: 1px solid var(--line); text-decoration: none; }
.watch-others a:hover { color: var(--text); border-bottom-color: currentColor; }
.review-block { border-top: 1px solid var(--line); padding: 14px 0 4px; }
.review-block:first-of-type { border-top: 0; padding-top: 4px; }
.review-block h3 { font-size: 13px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.review-block .rows { margin-bottom: 8px; }
.verdict .rating { margin-bottom: 8px; }
.review .proscons { margin: 14px 0 6px; }
.bullets { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 14px; }
.bullets li { margin: 2px 0; }
.bullets li::first-letter { text-transform: uppercase; }
.pc .bullets { font-size: 13px; }
.cast-list {
  list-style: none; margin: 0 0 10px; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px;
}
.cast-list li { background: var(--panel-2); border-radius: 10px; padding: 8px 12px; font-size: 14px; line-height: 1.35; }
.cast-list strong { display: block; font-weight: 500; color: var(--text); }
.cast-list li > span, .cast-text > span { display: block; color: var(--muted); font-size: 13px; }
/* persona del cast: foto libera (o iniziali) a sinistra, nome e personaggio a destra */
.cast-list .cast-person { display: flex; align-items: center; gap: 10px; }
.cast-person .avatar {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-size: 14px; font-weight: 500;
}
.cast-person .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cast-text { min-width: 0; }
.cast-text strong a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.cast-text strong a:hover { border-bottom-color: currentColor; }
.rows dd a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); }
.rows dd a:hover { border-bottom-color: currentColor; }
.title-link { color: var(--brand); text-decoration: none; border-bottom: 1px solid rgba(56, 189, 248, .35); }
.title-link:hover { border-bottom-color: var(--brand); }
.photo-credits { margin: 0 0 14px; }
.photo-credits summary { cursor: pointer; color: var(--text-2); }
.pros h3 { color: var(--good); }
.cons h3 { color: var(--bad); }

.rows { margin: 0; }
.rows > div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.rows > div:last-child { border-bottom: 0; }
.rows dt { color: var(--muted); }
.rows dd { margin: 0; text-align: right; }

/* footer: una riga sobria sotto un filo, fonti a sinistra e link a destra (su telefono una sotto l'altra) */
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 24px;
  margin-top: 40px; border-top: 1px solid var(--line); padding-top: 16px; padding-bottom: 28px;
  color: var(--muted); font-size: 12px; line-height: 18px;
}
.site-footer p { margin: 0; }
/* riga dei podcast (compare solo con gli indirizzi in data/podcast.json): sopra le altre, a tutta larghezza */
.footer-podcast { flex: 1 0 100%; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; color: var(--muted); }
.footer-podcast a { color: var(--text-2); }
.footer-links { color: var(--text-2); }
.footer-links a { color: var(--text-2); }
.site-footer a:hover { color: var(--brand); }

@media (max-width: 1000px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .lead { margin-bottom: 24px; }
  .hub-grid { margin-top: 24px; }
  .az-head { height: 36px; font-size: 20px; margin: 20px 0 10px; }
  .az-index { display: none; }
  .catalogo-page { padding-right: 0; }
  /* Catalogo su telefono: ricerca a tutta larghezza, poi i menu due per riga; il pannello Filtri
     si apre sotto la barra, nel flusso della pagina */
  .catalog-bar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 8px; padding: 10px; }
  .cb-more { display: contents; }
  .catalogo-page .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }  /* il pannello diventa una riga intera della griglia */
  .catalog-bar .cb-search { grid-column: 1 / -1; }
  .cb-select { min-width: 0; }
  .cb-select select, .catalog-bar .cb-toggle { width: 100%; }
  .catalog-bar label.cb-sort { gap: 6px; }
  .cb-sort select { flex: 1; }
  .cb-sort-label { font-size: 12px; }
  .cb-panel { position: static; grid-column: 1 / -1; width: auto; max-width: none; padding: 8px; box-shadow: none; }
  .catalog-bar .btn-clear { grid-column: 1 / -1; width: 100%; padding: 0 10px; }
  .ms-option { white-space: normal; }
  .suggestions { width: 100%; }
  .collection-grid { grid-template-columns: minmax(0, 1fr); }
  .collection-card { grid-template-columns: 110px minmax(0, 1fr); }
  .collection-list li { grid-template-columns: 24px 130px minmax(0, 1fr); gap: 12px; }
  .site-footer { flex-direction: column; gap: 8px; }
  .prose p.prose-intro { font-size: 18px; }
  .prose h2 { font-size: 21px; }
  .prose section { margin-top: 36px; }
  .home-lead { white-space: normal; font-size: 16px; }
  .hub-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  /* su telefono l'illustrazione va sopra il testo, a tutta larghezza */
  .hub-card { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 12px; padding: 12px; }
  .hub-visual { min-height: 0; height: 160px; }
  .hub-visual.hub-az { height: 190px; }  /* riga A–Z e locandine: un po' più alta delle altre */
  .hub-body { padding: 0 4px 4px; }
  .fan-poster { width: 26%; }
  /* telefono: logo come quello di Horizon su telefono (lettere 18,6 px, prima riga ~63 px),
     sotto la riga del menu */
  /* telefono: lettere come Horizon (19 px, da 22 a 40 px dall'alto): immagine alta 19 / 0,533 =
     36 px a 19 px dall'alto; il menu va su una riga sotto, a 12 px dalla linea come il pulsante
     Menu di Horizon */
  .header-row { height: auto; row-gap: 0; column-gap: 8px; padding-bottom: 12px; }
  .logo { padding: 19px 0 10px; }
  .logo img { height: 36px; }
  .header-row .langs { order: 2; margin-left: auto; margin-top: 16px; }  /* 31,5 - 15,5 */
  .header-row .wish-link { order: 2; margin-left: auto; margin-top: 16px; }
  .header-row .search-link { margin-left: auto; }
  .header-row .search-link + .wish-link { margin-left: 0; }
  .header-row .wish-link + .langs { margin-left: 0; }
  .header-row .nav { order: 3; margin: 0; width: 100%; gap: 16px; }
  .tiles { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 20px 16px; gap: 16px; }
  .hero .poster { width: 150px; }
  .hero-poster { width: 150px; }
  .hero .rating, .chips { justify-content: center; }
  .hook { font-size: 17px; margin-left: auto; margin-right: auto; }
  .proscons { grid-template-columns: 1fr; }
  .watch-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cast-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cast-list li { padding: 7px 10px; font-size: 13px; }
}
/* telefoni stretti: icone e lingue un po' più compatte, così lente, Da vedere e lingue restano sulla riga del logo */
@media (max-width: 380px) {
  .header-row .wish-link { width: 28px; height: 28px; margin-top: 17px; }
  .header-row .langs a { padding: 4px 8px; }
  .header-row .langs { margin-top: 17px; }
}

/* fonte dei dati in fondo alla scheda ("Dati: TVmaze") ed elenco dei crediti */
.source-note { margin: 28px 0 0; font-size: 12px; color: var(--muted); }
.sources-list { margin: 0 0 14px; padding-left: 20px; color: var(--text-2); line-height: 1.75; }
.prose ul { color: var(--text-2); line-height: 1.75; padding-left: 20px; }
/* home, card Film: senza locandina libera nello schermo c'è il titolo, come nella copertina grafica */
.screen-title {
  position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 10px;
  font-family: var(--serif); font-size: 14px; line-height: 1.15; color: var(--text);
  background: linear-gradient(165deg, color-mix(in srgb, var(--cat) 35%, #0F1521) 0%, #0A0F18 80%);
}
/* scheda: locandina con la riga di credito sotto (Wikipedia, Commons o indicata a mano) */
.hero-poster { margin: 0; min-width: 0; max-width: 180px; }
.poster-credit { margin: 6px 0 0; font-size: 11px; line-height: 1.35; color: var(--muted); }
.poster-credit a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line); }
/* cast nella colonna laterale (schede senza recensione): una persona per riga */
.cast-side { grid-template-columns: minmax(0, 1fr) !important; }

/* righe di locandine su una sola riga (ultime aggiunte, meglio recensiti, prossime uscite): sei card
   affiancate su PC; se lo spazio non basta (telefono) la riga scorre di lato e l'ultima card resta
   tagliata a metà. Le frecce le aggiunge scorri.js, solo dove c'è un puntatore */
.row-wrap { position: relative; }
.grid.row-scroll {
  grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: max(150px, calc((100% - 5 * 18px) / 6));
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none;
  padding-bottom: 2px;
}
.grid.row-scroll::-webkit-scrollbar { display: none; }
.grid.row-scroll > * { scroll-snap-align: start; }
.row-arrow {
  position: absolute; top: 0; z-index: 3; width: 36px; height: min(100%, 200px); padding: 0 0 4px; cursor: pointer;
  display: grid; place-items: center; font-size: 28px; line-height: 1; color: var(--text);
  background: rgba(8, 11, 16, .78); border: 1px solid #ffffff26; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  transition: border-color .15s, color .15s;
}
.row-arrow:hover { border-color: var(--brand); color: var(--brand); }
.row-arrow-prev { left: 0; border-radius: 0 10px 10px 0; border-left: 0; }
.row-arrow-next { right: 0; border-radius: 10px 0 0 10px; border-right: 0; }
.row-arrow[hidden] { display: none; }
@media (hover: none) { .row-arrow { display: none; } }
