/* Sala Buia. Le immagini fanno il lavoro: fondo quasi nero caldo, accento preso dalla locandina. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/Archivo-VF.ttf") format("truetype");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  /* Tinta e saturazione dell'accento: di base la luce calda del proiettore, sulle schede quella della locandina. */
  --ah: 36;
  --as: 88%;
  --al: 70%;
  --accent: hsl(var(--ah) var(--as) var(--al));
  --accent-ink: #15100b;
  --bg: #0e0c0b;
  --surface: #181513;
  --surface-2: #231f1b;
  --line: #322c27;
  --text: #f2ece4;
  --muted: #a89e92;
  --ok: #7fd1a0;
  --danger: #ff8f80;
  --shadow: 0 18px 40px -12px rgb(0 0 0 / 0.7), 0 2px 6px rgb(0 0 0 / 0.4);
  --gutter: clamp(16px, 4vw, 48px);
  --bar-h: 60px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --display: "Archivo", "Avenir Next Condensed", "Arial Narrow", sans-serif;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --al: 27%;
    --accent-ink: #fffaf2;
    --bg: #f3ede2;
    --surface: #faf6ee;
    --surface-2: #e8e0d2;
    --line: #d6cbb9;
    --text: #1d1916;
    --muted: #675d52;
    --ok: #1d7a48;
    --danger: #b3301f;
    --shadow: 0 18px 36px -14px rgb(60 40 20 / 0.45), 0 2px 5px rgb(60 40 20 / 0.18);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line) var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  caret-color: var(--accent);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h2 {
  font-family: var(--display); font-stretch: 70%; font-weight: 750; font-size: 1.45rem; line-height: 1.1;
  text-transform: uppercase; letter-spacing: 0.02em; text-wrap: balance;
}
h3 { font-size: 0.8rem; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.num, .code { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.tba { display: inline-block; padding: 1px 7px; margin-right: 8px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-size: 0.72rem; font-weight: 750; letter-spacing: 0.04em; vertical-align: 1px; }
.season-announced .season-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 14px 4px 14px 36px; }
.ep-preview { font-style: italic; color: var(--muted); }
.error { color: var(--danger); }
.ok { color: var(--ok); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 8px; font-weight: 650; }
.skip:focus { top: 12px; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.display {
  font-family: var(--display); font-stretch: 62%; font-weight: 820; text-transform: uppercase;
  font-size: clamp(2.5rem, 6.4vw, 5.25rem); line-height: 0.92; letter-spacing: 0; text-wrap: balance;
  overflow-wrap: anywhere;
}
.display.long { font-size: clamp(1.9rem, 4.2vw, 3.4rem); line-height: 0.96; }

/* --- Barra superiore --- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 20; height: var(--bar-h);
  display: flex; align-items: center; gap: 28px; padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
}
.brand {
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
  font-family: var(--display); font-stretch: 62%; font-weight: 820; font-size: 1.5rem; text-transform: uppercase; letter-spacing: 0.03em;
}
.brand-mark { width: 26px; height: 26px; color: var(--accent); }
.nav { display: flex; gap: 2px; margin-right: auto; }
.nav a, .gear {
  display: flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 8px;
  color: var(--muted); font-weight: 550; font-size: 0.95rem; transition: color 0.15s, background-color 0.15s;
}
.nav a .icon { display: none; }
.nav a:hover, .gear:hover { color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }
.nav a[aria-current], .gear[aria-current] { color: var(--text); }
.nav a[aria-current] span { box-shadow: 0 2px 0 var(--accent); padding-bottom: 3px; }
.gear[aria-current] { color: var(--accent); }

main { padding-top: var(--bar-h); min-height: 100dvh; }
.page { max-width: 1280px; margin: 0 auto; padding: 36px var(--gutter) 96px; }
.page-narrow { max-width: 860px; }
.page-flush { max-width: none; padding: 0; margin-top: calc(var(--bar-h) * -1); }
.page-body { max-width: 1280px; margin: 0 auto; padding: 8px var(--gutter) 96px; }
.page-head { margin-bottom: 28px; display: flex; align-items: baseline; gap: 4px 16px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--display); font-stretch: 62%; font-weight: 820; text-transform: uppercase; font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1; }

.enter { animation: rise 0.42s var(--ease) both; }
.enter .hero-bg { animation: lights 1.1s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes lights { from { opacity: 0; transform: scale(1.05); filter: brightness(0.4); } }

/* --- Bottoni e controlli --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 82%, transparent);
  font-weight: 620; font-stretch: 92%; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.15s var(--ease);
}
.btn:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--text) 30%, var(--line)); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 86%, var(--text)); border-color: transparent; }
.btn.on { border-color: var(--accent); color: var(--accent); }
.btn.on .icon { fill: currentColor; }
.btn.danger { color: var(--danger); }
.btn.small { min-height: 32px; padding: 0 12px; font-size: 0.82rem; border-radius: 8px; }
.btn.round { width: 48px; height: 48px; min-height: 0; padding: 0; border-radius: 50%; border-color: var(--ok); color: var(--ok); background: transparent; flex: none; }
.btn.round:hover { background: var(--ok); color: var(--bg); border-color: var(--ok); }
.btn.icon-btn { width: 44px; padding: 0; flex: none; }
.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); text-underline-offset: 3px; }
.link:hover { text-decoration-color: currentColor; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.select {
  min-height: 44px; padding: 0 34px 0 14px; border-radius: 10px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 82%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a89e92' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px;
  font-weight: 620; font-stretch: 92%; cursor: pointer; appearance: none; -webkit-appearance: none;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; gap: 8px; align-items: center; min-height: 36px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted);
  font-weight: 560; font-size: 0.9rem; cursor: pointer; transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip.on { color: var(--accent-ink); background: var(--text); border-color: var(--text); }
@media (prefers-color-scheme: dark) { .chip.on { color: var(--bg); } }
.chip-n { font-size: 0.78rem; font-variant-numeric: tabular-nums; opacity: 0.7; }
.filters { display: grid; gap: 12px; margin-bottom: 28px; }

.bar { height: 4px; border-radius: 99px; background: color-mix(in srgb, var(--text) 16%, transparent); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width 0.5s var(--ease); }
.rating { display: inline-flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rating .icon { width: 0.95em; height: 0.95em; fill: var(--accent); stroke: var(--accent); }

/* --- Lente di ricerca solo nella pagina Scopri --- */
.search-toggle { display: none; border: 0; background: none; cursor: pointer; }
body[data-section="scopri"] .search-toggle { display: flex; }
body[data-section="scopri"] .nav a[data-route="cerca"] { display: none !important; }
.top-search { display: flex; align-items: center; gap: 10px; flex: 0 1 360px; min-width: 0; padding: 0 12px; height: 40px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--surface) 90%, transparent); color: var(--muted); animation: rise 0.25s var(--ease); }
.top-search[hidden] { display: none; }
.top-search:focus-within { border-color: var(--accent); color: var(--accent); }
.top-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--text); font-size: 0.95rem; }
.topbar.searching .search-toggle { color: var(--accent); }

/* --- Apertura a tutta larghezza --- */
.hero { position: relative; isolation: isolate; display: flex; align-items: flex-end; overflow: hidden; }
.hero-title { min-height: min(78vh, 760px); }
.hero-home { min-height: min(72vh, 680px); }
.hero.no-backdrop { min-height: 0; padding-top: var(--bar-h); }
.hero-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, var(--bg) 0%, color-mix(in srgb, var(--bg) 88%, transparent) 26%, color-mix(in srgb, var(--bg) 35%, transparent) 62%, color-mix(in srgb, var(--bg) 55%, transparent) 100%),
    linear-gradient(to right, color-mix(in srgb, var(--bg) 78%, transparent) 0%, transparent 62%);
}
.hero.no-backdrop .hero-shade { display: none; }
.hero-home .hero-bg { opacity: 0; transition: opacity 1.4s var(--ease); }
.hero-home .hero-bg.on { opacity: 1; }
.hero-stack { display: grid; gap: 22px; min-width: 0; }
.hero-text.swap > * { animation: rise 0.6s var(--ease) both; }
.hero-text.swap > :nth-child(2) { animation-delay: 0.05s; }
.hero-text.swap > :nth-child(3) { animation-delay: 0.1s; }
.hero-text.swap > :nth-child(4) { animation-delay: 0.15s; }
.dots { display: flex; gap: 4px; }
.dot { width: 28px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.dot::before { content: ""; width: 100%; height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--text) 30%, transparent); transition: background-color 0.2s; }
.dot:hover::before { background: color-mix(in srgb, var(--text) 60%, transparent); }
.dot[aria-current]::before { background: var(--accent); }
.hero-inner {
  width: 100%; max-width: 1280px; margin: 0 auto; padding: calc(var(--bar-h) + 40px) var(--gutter) 36px;
  display: flex; gap: clamp(20px, 3vw, 44px); align-items: flex-end;
}
.hero-poster { width: clamp(150px, 17vw, 240px); aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px; box-shadow: var(--shadow); flex: none; background: var(--surface-2); }
.hero-text { display: grid; gap: 14px; min-width: 0; max-width: 780px; justify-items: start; }
.logo-title img { display: block; max-width: min(440px, 100%); max-height: 150px; object-fit: contain; object-position: left bottom; filter: drop-shadow(0 4px 14px rgb(0 0 0 / 0.5)); }
/* I loghi dei titoli sono quasi sempre chiari: si usano sul tema scuro, sul chiaro resta il titolo scritto. */
.logo-title span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (prefers-color-scheme: light) {
  .logo-title img { display: none; }
  .logo-title span { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
}
.original { font-style: italic; margin-top: -8px; }
.facts { font-weight: 520; font-size: 1.02rem; }
.tagline { font-size: 1.15rem; font-style: italic; color: var(--muted); }
.hero-summary { max-width: 58ch; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero .actions { margin-top: 6px; }

/* --- Blocchi della scheda --- */
.block, .rail { margin-top: 56px; }
.block > h2, .block-head, .rail-head { margin-bottom: 16px; }
.block-head, .rail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.block > h2 + .muted, .block-head + .muted { margin: -8px 0 16px; }
.lead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 40px clamp(32px, 6vw, 88px); margin-top: 28px; align-items: start; }
.lead .block { margin-top: 0; }
.synopsis { display: grid; gap: 18px; }
.summary { max-width: 68ch; font-size: 1.08rem; line-height: 1.62; text-wrap: pretty; }
.makers { margin: 0; display: grid; gap: 8px; }
.makers > div { display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; }
.makers dt { color: var(--muted); }
.makers dd { margin: 0; }
.ext { color: var(--muted); }

.watch { display: grid; gap: 18px; }
.watch-group h3 { margin-bottom: 8px; }
.providers { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.provider {
  display: flex; align-items: center; gap: 10px; padding: 5px 14px 5px 5px; border: 1px solid var(--line); border-radius: 12px;
  font-weight: 560; font-size: 0.92rem; transition: border-color 0.15s, background-color 0.15s;
}
a.provider:hover { border-color: var(--accent); background: var(--surface); }
.provider-logo { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; flex: none; background: var(--surface-2); }
.watch + .muted { margin-top: 14px; }

/* --- Righe e griglie di locandine --- */
.rail-track {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter);
  margin-inline: calc(var(--gutter) * -1); padding: 6px var(--gutter) 14px; scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.rail-track > * { flex: none; scroll-snap-align: start; }
.rail-track .card { width: 156px; }
.rail-track .card-person { width: 128px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 28px 18px; }
.card { display: block; min-width: 0; }
.card-art { position: relative; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: var(--surface-2); margin-bottom: 9px; transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.card:hover .card-art, .card:focus-visible .card-art { transform: translateY(-5px); box-shadow: var(--shadow); }
.card-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.no-image { display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-family: var(--display); font-stretch: 62%; font-weight: 800; font-size: 3rem; }
.card-art .bar { position: absolute; inset: auto 8px 8px 8px; background: rgb(0 0 0 / 0.55); }
.card-mark, .card-fav {
  position: absolute; top: 8px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: rgb(14 12 11 / 0.82); color: #f2ece4; font-size: 0.78rem;
}
.card-mark { right: 8px; }
.card-mark.done { background: var(--accent); color: var(--accent-ink); }
.card-fav { left: 8px; color: var(--accent); }
.card-fav .icon { fill: currentColor; }
.card-name { font-weight: 620; font-size: 0.95rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { color: var(--muted); font-size: 0.82rem; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.code { color: var(--muted); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.03em; margin-right: 0.6em; }

.video { width: 280px; display: block; }
.video-art { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--surface-2); margin-bottom: 9px; }
.video-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s var(--ease); }
.video:hover .video-art img { transform: scale(1.04); }
.video-play { position: absolute; inset: 0; margin: auto; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgb(14 12 11 / 0.78); color: #f2ece4; }
.video-play .icon { fill: currentColor; stroke: none; margin-left: 3px; }

.card-wrap { position: relative; min-width: 0; }
.btn.remove { width: 36px; height: 36px; min-height: 0; border-radius: 50%; color: var(--muted); background: transparent; border-color: transparent; }
.btn.remove:hover { color: var(--danger); border-color: var(--danger); background: transparent; }
.card-remove.btn.remove { position: absolute; top: 6px; right: 6px; background: rgb(14 12 11 / 0.82); color: #f2ece4; opacity: 0; transition: opacity 0.15s, color 0.15s, border-color 0.15s; }
.card-wrap:hover .card-remove, .card-remove:focus-visible { opacity: 1; }
@media (hover: none) { .card-remove.btn.remove { opacity: 1; } }
.card-remove.btn.remove:hover { background: rgb(14 12 11 / 0.95); }

/* --- Continua --- */
.resume-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); gap: 4px 40px; }
.resume { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); min-width: 0; }
.resume-art { width: 132px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--surface-2); flex: none; display: block; }
.resume-img { width: 100%; height: 100%; object-fit: cover; display: block; font-size: 1.6rem; }
.resume-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.resume-title { font-weight: 680; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resume-title:hover { color: var(--accent); }
.resume-ep { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.94rem; }
.resume-ep .code { margin-left: 0.2em; }
.resume .bar { margin-top: 4px; }

.ask { width: min(440px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.ask::backdrop { background: rgb(8 6 5 / 0.72); }
.ask[open] { display: grid; gap: 12px; animation: rise 0.25s var(--ease); }
.ask-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.nav-narrow { display: none; }

/* --- Episodi --- */
.progress { display: grid; gap: 6px; min-width: min(280px, 100%); font-size: 0.92rem; color: var(--muted); }
.progress strong { color: var(--text); }
.progress .bar { height: 6px; }
.season { border-top: 1px solid var(--line); }
.season:last-of-type { border-bottom: 1px solid var(--line); }
.season summary { display: flex; align-items: center; gap: 12px; padding: 14px 4px; cursor: pointer; list-style: none; }
.season summary::-webkit-details-marker { display: none; }
.season-arrow { color: var(--muted); transition: transform 0.25s var(--ease); }
.season[open] .season-arrow { transform: rotate(90deg); }
.season-name { font-weight: 680; font-size: 1.05rem; }
.season summary .btn { margin-left: auto; }
.episodes { list-style: none; margin: 0; padding: 0 0 10px; }
.ep { border-radius: 8px; }
.ep:hover, .ep.open { background: var(--surface); }
.ep-line { display: flex; align-items: center; gap: 12px; padding: 0 4px 0 8px; }
.ep-line input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; margin: 0; cursor: pointer; }
.ep-line input:disabled { cursor: default; opacity: 0.4; }
.ep-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 11px 4px; border: 0; background: none; text-align: left; cursor: pointer; }
.ep-open .code { margin: 0; flex: none; }
.ep-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-date { flex: none; }
.ep-time { flex: none; min-width: 4.2em; text-align: right; }
.next-out { margin: -4px 0 16px; }
.next-out .code { margin-right: 0.5em; }
.ep-thumb { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; flex: none; background: var(--surface-2); display: block; }
.ep.seen .ep-thumb { opacity: 0.55; }
.ep.open .ep-thumb { visibility: hidden; }
.ep-arrow { color: var(--muted); width: 1em; height: 1em; transition: transform 0.25s var(--ease); }
.ep.open .ep-arrow { transform: rotate(90deg); }
.ep.seen .ep-name { color: var(--muted); }
.ep.future .ep-name { color: var(--muted); }
.ep-detail { display: flex; gap: 20px; padding: 6px 16px 18px 44px; align-items: flex-start; animation: rise 0.3s var(--ease); }
.ep-still { width: min(300px, 40%); aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; flex: none; background: var(--surface-2); }
.ep-text { display: grid; gap: 10px; min-width: 0; max-width: 62ch; line-height: 1.55; }
.row-end { margin-left: auto; flex: none; }

/* --- Immagini --- */
.shots { display: grid; gap: 12px; }
.shots.backdrops { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.shots.posters { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.shot { padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: var(--surface-2); cursor: zoom-in; display: block; }
.shots.backdrops .shot { aspect-ratio: 16 / 9; }
.shots.posters .shot { aspect-ratio: 2 / 3; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s var(--ease), filter 0.3s; }
.shot:hover img { transform: scale(1.04); filter: brightness(1.12); }

.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(8 6 5 / 0.97); color: #f2ece4; }
.lightbox::backdrop { background: rgb(8 6 5 / 0.9); }
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); animation: rise 0.3s var(--ease); }
.lightbox-bar { display: flex; align-items: center; gap: 12px; padding: 12px var(--gutter); }
.lightbox-bar .muted { margin-right: auto; color: #a89e92; }
.lightbox .btn:not(.primary) { border-color: #3a332d; background: #1a1613; color: #f2ece4; }
.lightbox-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 var(--gutter) 20px; }
.lightbox-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; min-height: 0; }
.nav-prev, .nav-next { position: absolute; top: 50%; translate: 0 -50%; }
.nav-prev { left: 12px; }
.nav-next { right: 12px; }

.danger-zone { margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; gap: 10px; flex-wrap: wrap; }

/* --- Persona --- */
.person { display: grid; grid-template-columns: clamp(160px, 24vw, 300px) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.person-photo { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px; box-shadow: var(--shadow); display: block; }
.person-photo-btn { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 10px; }
.person-text { display: grid; gap: 20px; }

/* --- Cerca --- */
.search { display: flex; align-items: center; gap: 14px; margin-bottom: 32px; border-bottom: 2px solid var(--line); transition: border-color 0.2s; color: var(--muted); }
.search:focus-within { border-color: var(--accent); color: var(--accent); }
.search .icon { width: 1.7rem; height: 1.7rem; }
.search input { flex: 1; min-width: 0; padding: 14px 0; border: 0; background: none; outline: none; color: var(--text); font-size: clamp(1.25rem, 3vw, 1.9rem); font-weight: 520; font-stretch: 88%; }
.search input::placeholder { color: var(--muted); opacity: 1; }
.results { transition: opacity 0.2s; }
.search.search-small { margin-bottom: 24px; max-width: 560px; }
.search.search-small .icon { width: 1.3rem; height: 1.3rem; }
.search.search-small input { font-size: 1.1rem; padding: 10px 0; }
.results.is-stale { opacity: 0.45; }

/* --- In uscita --- */
.day { margin-bottom: 36px; }
.day-title { margin-bottom: 8px; }
.day-title .muted { font-family: "Archivo", sans-serif; font-stretch: 100%; font-weight: 400; text-transform: none; font-size: 0.95rem; letter-spacing: 0; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li + li { border-top: 1px solid var(--line); }
.row-link { display: flex; align-items: center; gap: 16px; padding: 10px 4px; border-radius: 8px; transition: background-color 0.15s; }
.row-link:hover { background: var(--surface); }
.thumb { width: 46px; height: 69px; object-fit: cover; border-radius: 6px; flex: none; font-size: 1.4rem; }
.row-text { min-width: 0; display: grid; gap: 2px; }
.row-title { font-weight: 650; }

/* --- Uscite: calendario --- */
.cal-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 8px; }
.cal-summary .chip { cursor: default; }
.calendar .block { margin-top: 40px; }
.cal-day { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.cal-date { display: grid; justify-items: center; align-content: start; gap: 0; padding: 8px 0; border-radius: 12px; background: var(--surface); line-height: 1.1; }
.cal-dow, .cal-mon { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.cal-num { font-family: var(--display); font-stretch: 62%; font-weight: 820; font-size: 2.2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.cal-day.today .cal-date { background: var(--accent); }
.cal-day.today .cal-date * { color: var(--accent-ink); }
.cal-rel { margin-bottom: 6px; font-weight: 650; color: var(--accent); text-transform: lowercase; }
.cal-rel::first-letter { text-transform: uppercase; }
.cal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cal-entry { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.cal-entry:hover { background: var(--surface); }
.cal-entry.seen { opacity: 0.55; }
.cal-day.past .cal-date { opacity: 0.7; }
#cal-later { scroll-margin-top: calc(var(--bar-h) + 16px); }
.cal-summary { position: sticky; top: var(--bar-h); z-index: 5; padding: 8px 0; background: var(--bg); }
#cal-now { scroll-margin-top: calc(var(--bar-h) + 64px); }
.cal-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; }
.cal-poster { width: 56px; height: 84px; object-fit: cover; border-radius: 8px; flex: none; background: var(--surface-2); font-size: 1.4rem; }
.cal-text { min-width: 0; display: grid; gap: 3px; }
.cal-show { font-weight: 700; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ep { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-ep .code { margin: 0; color: var(--accent); }
.cal-ep .tba { margin: 0; }
.cal-seen { display: flex; align-items: center; gap: 4px; color: var(--ok); flex: none; padding-right: 8px; }
.calendar > .block > .cal-list { margin-top: 12px; }

/* --- Statistiche --- */
.statement { font-family: var(--display); font-stretch: 68%; font-weight: 700; text-transform: uppercase; font-size: clamp(1.9rem, 5vw, 3.3rem); line-height: 1.02; text-wrap: balance; margin-bottom: 36px; }
.statement strong { color: var(--accent); font-weight: 820; }
.stat-list { margin: 0; }
.stat-line { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.stat-line dt { color: var(--muted); }
.stat-line dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 56px; }
.two-col h2 { margin-bottom: 10px; }
.genres { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; padding-top: 12px; }
.genres li { display: grid; grid-template-columns: 8.5em 1fr 2.5em; gap: 12px; align-items: center; }
.genres .num { text-align: right; }

/* --- Profilo --- */
.hero-profile { min-height: min(56vh, 520px); }
.hero-profile .hero-inner { align-items: center; }
.hero-profile .hero-text { flex: 1; max-width: none; gap: 10px; }
.avatar {
  width: clamp(84px, 12vw, 132px); aspect-ratio: 1; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow); border: 3px solid var(--bg);
  font-family: var(--display); font-stretch: 62%; font-weight: 820; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1;
}
.avatar .icon { width: 46%; height: 46%; }
.avatar-btn { padding: 0; cursor: pointer; overflow: hidden; transition: transform 0.25s var(--ease); }
.avatar-btn:hover { transform: scale(1.04); }
.avatar-btn:focus-visible { border-radius: 50%; }
.avatar.has-image { background: var(--surface-2); }
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; display: block; }
.char-group { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.char-group h3 { font-size: 0.95rem; color: var(--text); }
.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 14px 10px; }
.char { padding: 0; border: 0; background: none; cursor: pointer; display: grid; gap: 6px; justify-items: center; text-align: center; font-size: 0.8rem; line-height: 1.2; }
.char img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; object-position: center 18%; background: var(--surface-2); border: 3px solid transparent; transition: border-color 0.15s, transform 0.2s var(--ease); }
.char:hover img { transform: scale(1.06); border-color: var(--muted); }
.char.on img { border-color: var(--accent); }
.glance { margin: 20px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 12px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.glance > div { display: grid; gap: 2px; }
.glance dd { margin: 0; font-family: var(--display); font-stretch: 62%; font-weight: 820; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 0.95; font-variant-numeric: tabular-nums; }
.glance dt { color: var(--muted); font-size: 0.9rem; }
.ask.wide { width: min(880px, calc(100vw - 32px)); max-height: min(86dvh, 760px); overflow-y: auto; }
.wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.wall { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--surface-2); cursor: pointer; display: grid; text-align: left; transition: border-color 0.15s, transform 0.2s var(--ease); }
.wall:hover { transform: translateY(-2px); border-color: var(--muted); }
.wall.on { border-color: var(--accent); }
.wall img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.wall span { padding: 8px 10px; font-size: 0.88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-progress { display: grid; gap: 8px; max-width: 520px; }
.import-report details { margin-top: 8px; }
.import-report summary { cursor: pointer; font-weight: 600; }
.name-input {
  width: 100%; min-width: 0; padding: 0 0 4px; border: 0; border-bottom: 2px solid transparent; background: none; outline: none; color: var(--text);
  font-family: var(--display); font-stretch: 62%; font-weight: 820; text-transform: uppercase; font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1;
  transition: border-color 0.2s;
}
.name-input::placeholder { color: var(--muted); opacity: 0.7; }
.name-input:hover { border-color: var(--line); }
.name-input:focus-visible { border-color: var(--accent); border-radius: 0; }
.clock { display: grid; gap: 14px; }
.clock-lead { font-family: var(--display); font-stretch: 70%; font-weight: 700; text-transform: uppercase; font-size: 1.45rem; letter-spacing: 0.02em; }
.clock-units { margin: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px 4px; border-block: 1px solid var(--line); padding: 20px 0 16px; }
.clock-units > div { display: grid; gap: 2px; justify-items: start; }
.clock-units dd { margin: 0; font-family: var(--display); font-stretch: 62%; font-weight: 820; font-size: clamp(2.4rem, 7.5vw, 5.4rem); line-height: 0.9; color: var(--accent); font-variant-numeric: tabular-nums; }
.clock-units dt { color: var(--muted); font-size: 0.9rem; }
.clock-units .zero dd { color: color-mix(in srgb, var(--text) 26%, transparent); }
.fact-note { font-weight: 400; font-size: 0.85rem; }
.source-what { display: block; font-weight: 400; }
.stat-line dt strong { font-weight: 650; color: var(--text); }
.stat-line dd { text-align: right; }
.profile .two-col { margin-top: 0; align-items: start; }
.profile .clock { margin-top: 56px; }
.profile .two-col .block { min-width: 0; }
.profile-foot { margin-top: 64px; }

.heat { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 8px; margin: 20px 0 32px; font-size: 0.72rem; color: var(--muted); }
.heat-days { display: grid; grid-template-rows: repeat(7, 1fr); gap: 3px; padding-top: 18px; }
.heat-days span { display: flex; align-items: center; height: 100%; }
.heat-grid { display: grid; grid-template-columns: repeat(26, minmax(0, 1fr)); gap: 3px; max-width: 760px; }
.heat-week { display: grid; grid-template-rows: 15px repeat(7, auto); gap: 3px; min-width: 0; }
.heat-month { white-space: nowrap; overflow: visible; }
.heat-cell { display: block; aspect-ratio: 1; border-radius: 3px; background: var(--surface-2); }
.heat-cell.l1 { background: color-mix(in srgb, var(--accent) 30%, var(--surface-2)); }
.heat-cell.l2 { background: color-mix(in srgb, var(--accent) 52%, var(--surface-2)); }
.heat-cell.l3 { background: color-mix(in srgb, var(--accent) 76%, var(--surface-2)); }
.heat-cell.l4 { background: var(--accent); }
.heat-cell.lx { background: none; }
.heat-legend { grid-column: 2; display: flex; align-items: center; gap: 4px; }
.heat-legend .heat-cell { width: 12px; }

.charts { gap: 32px 48px; }
figure { margin: 0; min-width: 0; }
figcaption { color: var(--muted); font-size: 0.9rem; margin-bottom: 4px; }
.cols { list-style: none; margin: 0; padding: 0; display: flex; align-items: stretch; gap: 2px; height: 190px; border-bottom: 1px solid var(--line); }
.cols li { flex: 1; min-width: 0; display: grid; grid-template-rows: 18px minmax(0, 1fr) 20px; justify-items: center; position: relative; }
.col-value { font-size: 0.72rem; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.col-track { width: min(100%, 26px); display: flex; align-items: flex-end; }
.col-bar { width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; transition: height 0.6s var(--ease); }
.cols li:hover .col-bar { background: color-mix(in srgb, var(--accent) 80%, var(--text)); }
.col-label { font-size: 0.72rem; color: var(--muted); white-space: nowrap; align-self: end; translate: 0 22px; }
.cols { margin-bottom: 30px; }
.hbars { list-style: none; margin: 0; padding: 4px 0 0; display: grid; gap: 14px; }
.hbars li { display: grid; grid-template-columns: minmax(0, 9.5em) minmax(0, 1fr) 4em; gap: 12px; align-items: center; }
.hbar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-value { text-align: right; }
.hbars .bar { height: 8px; }
.top-list { list-style: none; margin: 0; padding: 0; }
.top-list li + li { border-top: 1px solid var(--line); }
.top-list .row-text { flex: 1; gap: 8px; }

/* --- Impostazioni --- */
.panel { padding: 28px 0; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.panel:first-of-type { border-top: 0; padding-top: 0; }
.panel p { max-width: 68ch; }
.steps { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; max-width: 68ch; }
.key-form { display: flex; gap: 10px; flex-wrap: wrap; }
.key-form input {
  flex: 1 1 280px; min-width: 0; min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
}
.key-form input::placeholder { color: var(--muted); opacity: 1; }
.key-form input:focus-visible { outline-offset: 0; border-color: var(--accent); }
.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }

/* --- Stati --- */
.empty { padding: 64px 0; display: grid; gap: 12px; justify-items: start; max-width: 56ch; }
.empty h2 { font-size: 1.9rem; }
.empty p { color: var(--muted); margin-bottom: 8px; }
.loading { display: flex; align-items: center; gap: 12px; padding: 64px 0; color: var(--muted); }
.page-flush > .loading, .page-body > .loading { padding: 24px 0; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 40; translate: -50% 16px;
  background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 10px; font-weight: 600; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity 0.25s, translate 0.35s var(--ease); max-width: calc(100vw - 32px);
}
#toast.show { opacity: 1; translate: -50% 0; pointer-events: auto; }
#toast { display: flex; align-items: center; gap: 16px; }
.toast-action { border: 0; background: none; padding: 4px 0; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: inherit; }

/* --- Telefono: navigazione in basso --- */
@media (max-width: 820px) {
  :root { --bar-h: 52px; }
  /* Il blur creerebbe un contenitore per la navigazione fissa in basso: qui la barra è piena. */
  .topbar { position: absolute; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; gap: 4px; }
  .brand { margin-right: auto; }
  .brand { font-size: 1.3rem; }
  .nav {
    position: fixed; inset: auto 0 0 0; z-index: 30; margin: 0; gap: 0; justify-content: space-around;
    background: var(--bg); border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
  }
  .nav a { flex: 1; flex-direction: column; gap: 3px; padding: 7px 2px; font-size: 0.7rem; min-height: 48px; justify-content: center; }
  .nav a .icon { display: block; width: 22px; height: 22px; }
  .nav a[aria-current] { color: var(--accent); }
  .nav a[aria-current] span { box-shadow: none; padding: 0; }
  .gear { padding: 10px; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  #toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .page { padding-top: 20px; padding-bottom: 48px; }
  .page-flush { padding: 0; }
  .page-body { padding-bottom: 48px; }
  .hero-title, .hero-home { min-height: 0; }
  .hero-inner { padding-top: 46vw; padding-bottom: 20px; flex-direction: column; align-items: flex-start; gap: 16px; }
  .hero-bg { height: 78vw; inset: 0 0 auto 0; }
  .hero-shade { background: linear-gradient(to top, var(--bg) 0%, var(--bg) calc(100% - 62vw), color-mix(in srgb, var(--bg) 20%, transparent) calc(100% - 20vw), color-mix(in srgb, var(--bg) 45%, transparent) 100%); }
  .hero-poster { width: 112px; }
  /* Con lo sfondo in vista la locandina è un doppione e coprirebbe i volti. */
  .hero-title:not(.no-backdrop) .hero-poster { display: none; }
  .hero-inner { padding-top: 52vw; }
  .logo-title img { max-width: min(300px, 78%); max-height: 96px; }
  .hero.no-backdrop .hero-inner { padding-top: 24px; }
  .lead { grid-template-columns: minmax(0, 1fr); }
  .block, .rail { margin-top: 44px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 22px 12px; }
  .rail-track { gap: 12px; }
  .rail-track .card { width: 124px; }
  .rail-track .card-person { width: 104px; }
  .video { width: 232px; }
  .shots.backdrops { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .shots.posters { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .makers > div { grid-template-columns: 7.5em 1fr; }
  .person { grid-template-columns: 1fr; }
  .person-photo-btn, .person > .person-photo { width: 150px; }
  .two-col { grid-template-columns: 1fr; gap: 40px; }
  .clock-units { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 4px; }
  .glance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-profile { min-height: 0; }
  .hero-profile .hero-inner { align-items: flex-start; }
  .hero-profile.no-backdrop .hero-inner { padding-top: calc(var(--bar-h) + 12px); }
  .wall-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .heat-days { display: none; }
  .heat { grid-template-columns: minmax(0, 1fr); }
  .heat-legend { grid-column: 1; }
  .ep-date:not(.soon), .season-time { display: none; }
  .cal-day { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; }
  .cal-num { font-size: 1.8rem; }
  .cal-poster { width: 46px; height: 69px; }
  .ep-detail { flex-direction: column; padding: 4px 12px 16px; gap: 12px; }
  .ep-thumb { width: 64px; }
  .ep-still { width: min(100%, 380px); }
  .nav-wide { display: none !important; }
  .nav-narrow { display: flex; }
  .topbar.searching .brand span { display: none; }
  .top-search { flex: 1 1 auto; height: 36px; }
  .topbar .gear:first-of-type { margin-left: auto; }
  .resume-art { width: 104px; }
  .ask-actions .btn { flex: 1 1 100%; }
  .lightbox-bar .btn.primary span { display: none; }
  .lightbox-bar .btn.primary { width: 44px; padding: 0; }
  .lightbox-stage { padding-inline: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

.account-form { display: grid; gap: 10px; max-width: 460px; margin-top: 20px; }
.account-form input { width: 100%; min-width: 0; }
.account-form .actions { margin-top: 10px; flex-wrap: wrap; }
#account .actions { margin-bottom: 16px; }
#account p { overflow-wrap: anywhere; }

/* Confronto guidato degli episodi importati, nello stile delle impostazioni. */
.page-review { max-width: 1180px; margin-inline: auto; }
.review-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-block: 24px 12px; }
.review-heading h2 { margin: 0; }
.review-pending { display: grid; margin-top: 24px; }
.review-item { display: flex; justify-content: space-between; text-align: left; gap: 16px; padding: 20px 0; border: 0; border-bottom: 1px solid var(--line, #34302b); background: transparent; color: inherit; cursor: pointer; }
.review-item:hover, .review-candidate:hover { color: var(--accent, #efc477); }
.review-item span { flex-shrink: 0; }
.review-results { display: grid; gap: 8px; margin-top: 20px; }
.review-candidate { display: flex; align-items: center; gap: 16px; padding: 12px 0; background: transparent; color: inherit; border: 0; border-bottom: 1px solid var(--line, #34302b); text-align: left; cursor: pointer; }
.review-candidate span span { display: block; margin-top: 4px; }
.review-poster { width: 44px; height: 66px; object-fit: cover; flex-shrink: 0; }
.review-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.review-columns > section { min-width: 0; }
.review-field { display: grid; gap: 8px; margin-block: 16px; }
.review-field select, .review-source-row select { width: 100%; min-width: 0; }
.review-source-list, .review-target-list { max-height: 65vh; overflow: auto; padding-right: 8px; }
.review-source-row { display: grid; gap: 8px; padding-block: 18px; border-bottom: 1px solid var(--line, #34302b); }
.review-mapped { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.review-mapped .btn { padding: 6px 10px; font-size: .8rem; }
.review-target-list details { padding-block: 14px; border-bottom: 1px solid var(--line, #34302b); }
.review-target-list summary { cursor: pointer; line-height: 1.5; }
.review-still { width: 100%; max-width: 300px; display: block; margin-top: 12px; }
@media (max-width: 760px) {
  .review-columns { grid-template-columns: 1fr; gap: 24px; }
  .review-source-list, .review-target-list { max-height: 50vh; }
  .review-item { flex-direction: column; gap: 6px; }
  .review-heading { align-items: flex-start; }
}
.import-assist-notice { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.import-assist-notice p { margin: 0; }
.review-name-help { margin-block: 20px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.review-name-help summary { cursor: pointer; }
.page-review .page-head { display: block; }
.page-review .page-head p { max-width: 70ch; margin-top: 12px; }
.page-review select { min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); }
.page-review select option { background: var(--surface); color: var(--text); }
.review-item strong, .review-candidate strong, .review-source-row strong { min-width: 0; overflow-wrap: anywhere; }
/* L'avviso sta nel flusso, sotto la barra, anche sulle pagine con copertina. */
.page-flush.has-import-notice { margin-top: 0; }
.import-assist-notice { position: relative; padding-right: 72px; }
.import-assist-notice .notice-close { position: absolute; right: 16px; top: 12px; width: 44px; height: 44px; }
.picker-tools { position: sticky; top: -1px; z-index: 2; padding: 12px 0; background: var(--surface); }
.picker-tools input { width: 100%; min-height: 44px; }
.collapsible-characters > summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; min-height: 48px; }
.collapsible-characters > summary::-webkit-details-marker { display: none; }
.collapsible-characters > summary strong { flex: 1; overflow-wrap: anywhere; }
.collapsible-characters .group-arrow { flex-shrink: 0; transition: transform .15s; }
.collapsible-characters[open] .group-arrow { transform: rotate(90deg); }
.collapsible-characters .char-grid { padding-top: 16px; }
.title-logo-grid .wall img.series-logo { object-fit: contain; padding: 20px; background: #181513; }
.poster-picker { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.poster-picker .wall img { aspect-ratio: 2 / 3; }

.review-confirm {
  position: sticky;
  top: var(--bar-h);
  z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding-block: 12px;
}
.review-confirm p { margin: 8px 0 0; }
.review-field p { margin: 0; }
@media (max-width: 820px) {
  .review-confirm { top: 0; }
}

.episode-release-group { border-top: 1px solid var(--line); }
.episode-release-group > summary { color: var(--muted); }
.episode-release-group > summary::before { content: '▸'; }
.episode-release-group[open] > summary::before { content: '▾'; }

.episodes > .catalog-gap { padding: 8px 12px; border-block: 1px solid var(--line); }

/* Selettori condivisi: ricerca e opzioni nello stesso pannello. */
.choice { position: relative; min-width: 0; }
.choice-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; min-height: 46px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--text); text-align: left; cursor: pointer;
}
.choice-trigger:hover { border-color: var(--muted); background: var(--surface-2); }
.choice-trigger[aria-expanded="true"] { border-color: var(--accent); }
.choice-trigger:disabled { opacity: .5; cursor: default; }
.choice-caption { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.choice-chevron { width: 16px; height: 16px; transform: rotate(90deg); flex-shrink: 0; color: var(--muted); }
.choice-panel {
  position: fixed; inset: auto; margin: 0; padding: 6px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--text); box-shadow: 0 12px 32px #0004;
  overflow: hidden; max-width: calc(100vw - 24px);
}
.choice-panel:popover-open { display: flex; flex-direction: column; }
.choice-search-wrap { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.choice-search-wrap > .icon { flex-shrink: 0; width: 18px; color: var(--muted); }
.choice-search {
  width: 100%; min-width: 0; min-height: 36px; padding: 4px 0;
  border: 0; border-radius: 0; background: transparent; color: var(--text);
}
.choice-search::placeholder { color: var(--muted); opacity: 1; }
.choice-list { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.choice-option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 44px; padding: 10px 12px; text-align: left;
  background: transparent; color: var(--text); border: 0; border-radius: 6px; cursor: pointer; line-height: 1.45;
}
.choice-option > span { overflow-wrap: anywhere; }
.choice-option .icon { width: 17px; flex-shrink: 0; color: var(--accent); }
.choice-option:hover, .choice-option.active { background: var(--surface-2); }
.choice-option[aria-selected="true"] { font-weight: 650; }
.choice-option:disabled { color: var(--muted); cursor: default; }
.choice-status { margin: 0; padding: 7px 12px 3px; color: var(--muted); font-size: .8rem; }
.choice-status:empty { display: none; }

/* Rimozione diretta dalla coda, distinta dall’apertura della scheda. */
.review-pending-row { display: flex; align-items: center; gap: 20px; border-bottom: 1px solid var(--line, #34302b); }
.review-pending-row .review-item { flex: 1; min-width: 0; border-bottom: 0; }
.review-pending-row > .btn { flex-shrink: 0; }
@media (max-width: 600px) {
  .review-pending-row { flex-wrap: wrap; gap: 0; padding-bottom: 16px; }
  .review-pending-row .review-item { flex-basis: 100%; }
}

.card > .bar { height: 5px; margin: -5px 0 9px; }
.card > .bar-complete > span { background: #79cba9; }
.card > .bar-awaiting > span { background: #b7a2ed; }
.library-tools { display: flex; align-items: end; flex-wrap: wrap; gap: 20px; }
.library-tools > :first-child { flex: 1; min-width: min(100%, 240px); }
.library-order { width: min(100%, 290px); display: grid; gap: 8px; margin-bottom: 24px; }
.library-order > label { color: var(--muted); font-size: .9rem; }
.calendar-jump.btn { position: fixed; z-index: 30; right: max(20px, env(safe-area-inset-right)); bottom: calc(24px + env(safe-area-inset-bottom)); width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px rgb(0 0 0 / .25); font-size: 28px; }
@media (max-width: 700px) { .calendar-jump.btn { bottom: calc(90px + env(safe-area-inset-bottom)); } }

.viewing-controls { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.viewing-editor { display: grid; gap: 20px; margin-top: 20px; }
.viewing-form { display: grid; gap: 12px; }
.viewing-fields { display: flex; flex-wrap: wrap; gap: 16px; }
.viewing-fields label { display: grid; gap: 6px; font-size: .9rem; }
.viewing-fields input { min-height: 44px; min-width: 150px; color-scheme: dark; }

/* Uscite usa la larghezza disponibile e locandine leggibili anche ad alta densità. */
.page.calendar { width: 100%; max-width: none; padding-inline: clamp(20px, 4vw, 72px); }
.calendar .cal-day { grid-template-columns: 100px minmax(0, 1fr); gap: 28px; padding-block: 28px; }
.calendar .cal-date { align-self: start; padding: 18px 8px; }
.calendar .cal-num { font-size: 3.2rem; }
.calendar .cal-dow, .calendar .cal-mon { font-size: .9rem; }
.calendar .cal-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 18px; }
.calendar .cal-entry { padding: 16px; gap: 16px; }
.calendar .cal-link { gap: 22px; }
.calendar .cal-poster { width: 128px; height: 192px; }
.calendar .cal-show { white-space: normal; font-size: 1.25rem; line-height: 1.25; }
.calendar .cal-text { gap: 12px; }
.calendar .cal-ep { white-space: normal; flex-wrap: wrap; line-height: 1.4; }
.calendar .cal-rel { font-size: 1.15rem; margin-bottom: 12px; }
.library-legend { display: flex; flex-wrap: wrap; gap: 20px; }
.library-legend span::before { content: ''; display: inline-block; width: 22px; height: 5px; border-radius: 3px; vertical-align: middle; margin-right: 8px; }
.legend-ongoing::before { background: var(--accent); }
.legend-complete::before { background: #79cba9; }
.legend-awaiting::before { background: #b7a2ed; }
@media (max-width: 700px) {
  .calendar .cal-day { grid-template-columns: 54px minmax(0, 1fr); gap: 12px; }
  .calendar .cal-num { font-size: 2.4rem; }
  .calendar .cal-date { padding: 12px 4px; }
  .calendar .cal-poster { width: 80px; height: 120px; }
  .calendar .cal-entry { padding: 12px; gap: 8px; }
  .calendar .cal-link { gap: 12px; }
  .calendar .cal-show { font-size: 1.05rem; }
  .calendar .cal-text { gap: 8px; }
}

.calendar-jump .icon { width: 26px; height: 26px; }

/* iPhone: spazio per Dynamic Island, bordi in orizzontale e tastiera senza zoom. */
@media (max-width: 820px) {
  :root { --bar-h: calc(52px + env(safe-area-inset-top)); }
  .topbar {
    padding-top: env(safe-area-inset-top);
    padding-left: max(var(--gutter), env(safe-area-inset-left));
    padding-right: max(var(--gutter), env(safe-area-inset-right));
  }
  .nav { padding-left: max(4px, env(safe-area-inset-left)); padding-right: max(4px, env(safe-area-inset-right)); }
  .page, .page-body { padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
  .page-flush { padding-inline: 0; }
  .hero-inner { padding-top: calc(46vw + env(safe-area-inset-top)); }
  .hero-profile.no-backdrop .hero-inner { padding-top: calc(var(--bar-h) + 12px); }
  .btn.small, .gear, .choice-option, .choice-trigger { min-height: 44px; }
  input, select, textarea, .viewing-fields input { font-size: max(1rem, 16px); }
  .lightbox-bar { padding-top: max(12px, env(safe-area-inset-top)); }
  .lightbox-stage { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  .ask { max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow-y: auto; }
  .calendar-jump.btn { bottom: calc(90px + env(safe-area-inset-bottom)); }
  .stat-line { overflow-wrap: anywhere; }
}
@media (max-width: 480px) {
  .library-order { width: 100%; }
  .viewing-fields { display: grid; grid-template-columns: minmax(0, 1fr); }
  .viewing-fields input { min-width: 0; width: 100%; }
  .calendar .cal-link { flex-wrap: wrap; }
  .calendar .cal-text { min-width: 0; flex: 1 1 110px; }
}
@media (max-width: 820px) {
  .account-form input, .viewing-fields input {
    width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px;
    border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  }
  .ep-line input { width: 28px; height: 28px; }
}
@media (max-width: 480px) {
  .ep-open { display: grid; grid-template-columns: 64px minmax(0, 1fr) 16px; column-gap: 10px; row-gap: 4px; }
  .ep-open .ep-thumb { grid-column: 1; grid-row: 1 / 5; }
  .ep-open .code { grid-column: 2; grid-row: 1; }
  .ep-open .ep-name { grid-column: 2; grid-row: 2; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
  .ep-open .ep-time { grid-column: 2; grid-row: 3; text-align: left; font-size: .8rem; }
  .ep-open .ep-date.soon { grid-column: 2; grid-row: 4; }
  .ep-open .ep-arrow { grid-column: 3; grid-row: 1 / 5; }
}


/* Ricerca rapida: pannello nativo sopra la pagina, elenco scorrevole e azione fissa. */
.quick-results {
  position: fixed; inset: auto; margin: 0; padding: 0; display: flex; flex-direction: column;
  color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); z-index: 40; overflow: hidden;
}
.quick-results[popover]:not(:popover-open), .quick-results[hidden] { display: none; }
.quick-status { padding: 12px 16px 8px; color: var(--muted); font-size: .8rem; }
.quick-scroll { list-style: none; margin: 0; padding: 0 6px 6px; min-height: 0; max-height: 340px; overflow-y: scroll; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--muted) var(--surface-2); scrollbar-gutter: stable; }
.quick-result { display: flex; align-items: center; gap: 12px; padding: 8px; min-height: 64px; border-radius: 8px; }
.quick-result img, .quick-placeholder { width: 36px; height: 54px; flex: 0 0 36px; border-radius: 4px; object-fit: cover; background: var(--surface-2); }
.quick-placeholder { display: grid; place-items: center; color: var(--muted); }
.quick-copy { display: grid; min-width: 0; gap: 3px; }
.quick-name { font-size: .94rem; font-weight: 600; overflow-wrap: anywhere; }
.quick-meta { color: var(--muted); font-size: .76rem; }
.quick-all { flex: 0 0 auto; min-height: 48px; padding: 12px 16px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--accent); text-align: left; font-weight: 600; cursor: pointer; }
.quick-all[hidden] { display: none; }
@media (hover: hover) and (pointer: fine) {
  .quick-result:hover, .quick-all:hover { background: var(--surface-2); }
}
.quick-result:focus-visible, .quick-all:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; background: var(--surface-2); }

/* v11: Uscite (chip di riepilogo), Continua (griglia, torna in cima), Profilo (locandine, wrapped, cronologia) */
.cal-summary { gap: 8px; }
.cal-summary .chip.cal-chip { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: .86rem; transition: border-color .15s, background-color .15s; }
.cal-summary .chip.cal-chip:hover { border-color: var(--muted); }
.cal-summary .chip.cal-chip:active { transform: scale(.97); }
.cal-chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.cal-chip-tosee .cal-chip-dot { background: var(--text); }
.cal-chip-tba .cal-chip-dot { display: none; }
.cal-chip-num { font-variant-numeric: tabular-nums; font-weight: 750; }
.cal-chip-tba .cal-chip-num { font-weight: inherit; }
#cal-past { scroll-margin-top: calc(var(--bar-h) + 64px); }
.continue-tools { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.continue-tools .search.search-small { flex: 1; margin-bottom: 0; }
.view-toggle { border: 1px solid var(--line); border-radius: 10px; height: 44px; }
.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 22px 16px; }
.poster-tile { min-width: 0; display: grid; gap: 6px; }
.poster-tile-link { display: block; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.poster-tile-img { width: 100%; height: 100%; object-fit: cover; display: block; font-size: 2rem; }
.poster-tile-img.no-image { display: grid; place-items: center; }
.poster-tile-meta { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; font-size: .86rem; }
.poster-tile .bar { margin-top: 0; }
.poster-row { display: grid; grid-auto-flow: column; grid-auto-columns: 132px; gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.poster-row > .poster-tile { scroll-snap-align: start; }
.wrap-track { display: grid; grid-auto-flow: column; grid-auto-columns: min(320px, 84vw); gap: 16px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.wrap-card { position: relative; overflow: hidden; border-radius: 16px; background: var(--surface-2); color: #fff; min-height: 380px; scroll-snap-align: start; isolation: isolate; }
.wrap-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.wrap-card::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(14 12 11 / .55) 0%, rgb(14 12 11 / .82) 45%, rgb(14 12 11 / .96) 100%); }
.wrap-inner { padding: 20px; display: grid; gap: 12px; }
.wrap-month { margin: 0; font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: rgb(255 255 255 / .8); }
.wrap-hours { margin: 0; font-size: 2.6rem; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; }
.wrap-hours span { font-size: 1rem; font-weight: 500; color: rgb(255 255 255 / .75); }
.wrap-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0; }
.wrap-stats div { display: flex; flex-direction: column; }
.wrap-stats dd { margin: 0; font-size: 1.3rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.wrap-stats dt { font-size: .78rem; color: rgb(255 255 255 / .7); }
.wrap-top { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; font-size: .92rem; }
.wrap-top a { color: #fff; font-weight: 650; }
.wrap-top .muted { color: rgb(255 255 255 / .65); }
.wrap-genres { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.wrap-genre { padding: 3px 10px; border-radius: 999px; background: rgb(255 255 255 / .14); font-size: .78rem; }
.wrap-best { margin: 0; color: rgb(255 255 255 / .7); }
.history { list-style: none; margin: 0; padding: 0; max-width: 760px; }
.history-day { margin: 18px 0 4px; font-size: .82rem; font-weight: 700; text-transform: capitalize; color: var(--muted); }
.history-day:first-child { margin-top: 0; }
.history-thumb { width: 40px; height: 60px; object-fit: cover; border-radius: 5px; flex: none; font-size: 1.2rem; }
.history-row .row-link { gap: 12px; padding: 6px 4px; }
.history-row .row-title { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-row .row-text { min-width: 0; flex: 1; }
.history-row .row-text .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 820px) {
  .poster-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 10px; }
  .poster-tile-meta { font-size: .78rem; }
  .poster-row { grid-auto-columns: 108px; gap: 10px; }
  .wrap-card { min-height: 360px; }
}

/* v12: link «Tutto in…», Wrapped apribili, Cronologia, Frequenza a tutta riga */
.more-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: .88rem; font-weight: 600; transition: border-color .15s, background-color .15s; }
.more-link .icon { width: 16px; height: 16px; color: var(--accent); transition: transform .15s; }
.more-link:hover { border-color: var(--muted); }
.more-link:hover .icon { transform: translateX(2px); }
.continue .block > .actions, .history-page .actions { margin-top: 22px; }
a.wrap-card { display: block; text-decoration: none; transition: transform .2s; }
a.wrap-card:hover { transform: translateY(-2px); }
a.wrap-card:active { transform: scale(.98); }
.wrap-open { display: inline-flex; align-items: center; gap: 4px; color: rgb(255 255 255 / .85); font-weight: 600; }
.wrap-open .icon { width: 15px; height: 15px; }
.wrapped-page .wrapped-hero { max-width: 520px; margin-bottom: 8px; }
.wrapped-page .wrapped-hero .wrap-card { min-height: 0; }
.wrapped-page .wrapped-hero .wrap-open { display: none; }
.wrapped-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.wrapped-steps { display: flex; gap: 8px; }
.wrapped-steps .btn { width: 44px; padding: 0; justify-content: center; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; margin-bottom: 12px; }
.wrapped-nav .back-link { margin-bottom: 0; }
.back-link .icon { width: 16px; height: 16px; }
.back-link:hover { color: var(--text); }
.history-row { border-top: 1px solid var(--line); }
.history-day + .history-row { border-top: 0; }
.history-row .row-link { gap: 14px; padding: 10px 4px; }
.history-thumb { width: 52px; height: 78px; border-radius: 6px; }
.history-ep { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-ep .code { margin-right: 2px; }
.history-day { margin: 22px 0 6px; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.history-preview .history-row:first-child { border-top: 0; }
.heat-grid { max-width: none; grid-template-columns: repeat(52, minmax(0, 1fr)); }
.heat-week > .heat-cell { width: 100%; height: auto; min-width: 0; aspect-ratio: 1; border-radius: 2px; }
.heat-legend { gap: 6px 14px; flex-wrap: wrap; margin-top: 6px; font-size: .78rem; }
.heat-key { display: inline-flex; align-items: center; gap: 6px; }
.heat-legend .heat-cell { width: 12px; height: 12px; }
@media (max-width: 820px) {
  .heat-grid { grid-template-columns: repeat(26, minmax(0, 1fr)); gap: 3px; }
  .heat-week:nth-child(-n+26) { display: none; }
  .more-link { padding: 6px 8px 6px 12px; font-size: .8rem; }
  .history-thumb { width: 46px; height: 69px; }
}
.heat-week { display: flex; flex-direction: column; gap: 3px; } .heat-week > .heat-month { height: 15px; flex: none; }

/* v13: barre a segmenti (filtri Libreria, riepilogo Uscite) che scorrono al loro interno */
.filters { min-width: 0; max-width: 100%; grid-template-columns: minmax(0, 1fr); }
.filters .chips, .cal-chips { display: flex; flex-wrap: nowrap; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); width: fit-content; max-width: 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.filters .chips::-webkit-scrollbar, .cal-chips::-webkit-scrollbar { display: none; }
.filters .chip, .cal-chips .chip.cal-chip { flex: none; min-height: 34px; padding: 0 13px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: .86rem; font-weight: 600; gap: 6px; white-space: nowrap; }
.filters .chip:hover, .cal-chips .chip.cal-chip:hover { color: var(--text); background: color-mix(in srgb, var(--text) 7%, transparent); border: 0; }
.filters .chip.on, .filters .chip.on:hover { background: var(--text); color: var(--bg); }
.filters .chip .chip-n { font-size: .74rem; opacity: .65; }
.cal-chips .chip.cal-chip { color: var(--text); }
.cal-summary { min-width: 0; }
.wrapped-steps .btn.off { opacity: .35; pointer-events: none; }
/* Barra in alto: vetro più trasparente con una tinta del colore del titolo aperto. */
@media (min-width: 821px) { .topbar { background: color-mix(in srgb, color-mix(in srgb, var(--accent) 12%, var(--bg)) 62%, transparent); backdrop-filter: blur(22px) saturate(1.8); -webkit-backdrop-filter: blur(22px) saturate(1.8); } }

/* v14: carosello trascinabile; lo scorrimento verticale della pagina resta libero */
.hero-home { touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.hero-home img { -webkit-user-drag: none; }
.hero-home .hero-summary { user-select: text; -webkit-user-select: text; }
