/* ============================================================
   Cinematica — UI moderna e minimale, con tema chiaro/scuro
   Display: Space Grotesk · Testo: Manrope · Dati: monospace
   ============================================================ */

@font-face {
  font-family: 'Space Grotesk';
  src: url('/fonts/space-grotesk.woff2') format('woff2');
  font-weight: 400 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope.woff2') format('woff2');
  font-weight: 400 700; font-style: normal; font-display: swap;
}

/* ---------- Token comuni ---------- */
:root {
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Code', 'Consolas', monospace;

  --accent: #6c5ce7;
  --accent-press: #5a4bd6;
  --mint: #12b886;
  --amber: #f0a93b;
  --danger: #e5484d;

  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px;
  --pill: 999px;
  --maxw: 1120px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Tema scuro ---------- */
:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0b0f;
  --bg-grad: radial-gradient(1100px 520px at 82% -8%, rgba(108,92,231,.16), transparent 60%);
  --surface: #131319;
  --surface-2: #17171f;
  --elevated: #1d1d27;
  --border: #262630;
  --border-strong: #34343f;
  --text: #ececf1;
  --text-dim: #9a9aa8;
  --text-faint: #6c6c7a;
  --accent-weak: rgba(108,92,231,.16);
  --mint-weak: rgba(18,184,134,.16);
  --amber-weak: rgba(240,169,59,.16);
  --danger-weak: rgba(229,72,77,.16);
  --shadow: 0 10px 34px rgba(0,0,0,.45);
  --shadow-sm: 0 4px 14px rgba(0,0,0,.35);
  --overlay: rgba(6,6,10,.72);
}

/* ---------- Tema chiaro ---------- */
:root[data-theme="light"] {
  color-scheme: light;
  --amber: #a8690a;   /* ambra più scuro: leggibile su fondo chiaro (WCAG AA) */
  --danger: #cf333a;  /* rosso più scuro per il testo su bianco */
  --bg: #f5f5fa;
  --bg-grad: radial-gradient(1100px 520px at 82% -8%, rgba(108,92,231,.12), transparent 60%);
  --surface: #ffffff;
  --surface-2: #ffffff;
  --elevated: #ffffff;
  --border: #e9e9f1;
  --border-strong: #dcdce6;
  --text: #16161e;
  --text-dim: #5f5f6d;
  --text-faint: #8b8b98;
  --accent-weak: rgba(108,92,231,.10);
  --mint-weak: rgba(18,184,134,.12);
  --amber-weak: rgba(240,169,59,.16);
  --danger-weak: rgba(229,72,77,.10);
  --shadow: 0 12px 34px rgba(24,24,40,.10);
  --shadow-sm: 0 4px 16px rgba(24,24,40,.07);
  --overlay: rgba(20,20,30,.44);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg-grad), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -.005em;
}
.hidden { display: none !important; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.02em; font-weight: 600; }
img { max-width: 100%; display: block; }

/* logo: due frame di pellicola stilizzati */
.logo-mark {
  width: 1.05em; height: 1.05em; border-radius: 5px;
  display: inline-block; vertical-align: -2px;
  background:
    linear-gradient(135deg, var(--accent), #9b8cff);
  position: relative;
}
.logo-mark::after {
  content: ""; position: absolute; inset: 30% 34%;
  border-left: .16em solid #fff; border-top: .1em solid transparent; border-bottom: .1em solid transparent;
  transform: translateX(6%);
}

/* ---------- Bottoni ---------- */
.btn {
  font: inherit; font-weight: 600; cursor: pointer; border: 1px solid transparent;
  border-radius: var(--pill); padding: .6rem 1.15rem; transition: all .16s var(--ease);
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-press); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text-dim); border-color: var(--border-strong); }
.btn-ghost:hover { color: var(--text); border-color: var(--text-faint); background: var(--surface-2); }
.btn-sm { padding: .4rem .8rem; font-size: .85rem; }
.btn-block { width: 100%; padding: .75rem; margin-top: .3rem; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }

.icon-btn {
  width: 38px; height: 38px; border-radius: var(--pill); border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-dim); cursor: pointer; font-size: 1rem;
  display: inline-grid; place-items: center; transition: all .16s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--text-faint); }

.badge { background: var(--accent); color: #fff; border-radius: var(--pill); padding: 0 .45rem; font-size: .72rem; font-weight: 700; }

/* focus visibile ovunque */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- Campi ---------- */
.field { display: flex; flex-direction: column; gap: .35rem; font-size: .82rem; color: var(--text-dim); font-weight: 600; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r); padding: .7rem .8rem; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }

/* ---------- Accesso ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 1.5rem; }
.auth-card {
  width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 2.2rem; box-shadow: var(--shadow); text-align: center;
}
.auth-brand { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; letter-spacing: -.03em; }
.auth-tag { color: var(--text-dim); margin: .3rem 0 1.8rem; font-size: .95rem; }
.auth-form { text-align: left; display: flex; flex-direction: column; gap: 1rem; }
.auth-form h1 { margin: 0 0 .2rem; font-size: 1.4rem; }
.switch { text-align: center; color: var(--text-dim); font-size: .9rem; margin: .2rem 0 0; }
.switch a { color: var(--accent); font-weight: 600; }
.switch a:hover { text-decoration: underline; }
.hint { font-size: .8rem; color: var(--text-faint); margin: -.3rem 0 0; }
.auth-msg { margin-top: 1rem; min-height: 1.2em; font-size: .88rem; color: var(--mint); font-weight: 600; }
.auth-msg.error { color: var(--danger); }

/* ---------- Topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: var(--maxw); margin: 0 auto; padding: .8rem 1.3rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; letter-spacing: -.02em; display: inline-flex; align-items: center; gap: .5rem; }
.topbar-actions { display: flex; align-items: center; gap: .5rem; }
.user-chip { color: var(--text-dim); font-size: .88rem; font-weight: 600; padding: 0 .2rem; max-width: 30vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Container ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 1.6rem 1.3rem 4rem; }

/* ---------- Ricerca ---------- */
.search-block { margin-bottom: 1.6rem; }
.search-bar { display: flex; gap: .6rem; align-items: center; position: relative; }
.search-bar input { padding-left: 2.5rem; height: 48px; border-radius: var(--pill); }
.search-ico { position: absolute; left: 1rem; width: 16px; height: 16px; pointer-events: none; opacity: .6;
  background: currentColor; color: var(--text-faint);
  -webkit-mask: no-repeat center/contain; mask: no-repeat center/contain;
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.5' y2='16.5'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.5' y2='16.5'/></svg>"); }
.search-bar .btn-primary { height: 48px; }
.search-results { display: flex; flex-direction: column; gap: .5rem; margin-top: .7rem; }
.result {
  display: flex; gap: .8rem; align-items: center; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-lg); padding: .55rem .7rem;
}
.result .thumb, .result .thumb-empty { width: 42px; height: 63px; border-radius: 7px; object-fit: cover; flex-shrink: 0; background: var(--surface-2); }
.thumb-empty { display: grid; place-items: center; color: var(--text-faint); font-size: 1.1rem; }
.result-info { flex: 1; min-width: 0; }
.result-title { font-weight: 700; font-size: .95rem; }
.result-meta { font-size: .8rem; color: var(--text-dim); }

/* ---------- Toolbar ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.list-title { margin: 0; font-size: 1.5rem; }
.count { color: var(--text-faint); font-weight: 500; font-size: .95rem; font-family: var(--font-mono); }
.toolbar-right { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

.segmented { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--pill); padding: 3px; gap: 2px; }
.seg { font: inherit; font-size: .85rem; font-weight: 600; color: var(--text-dim); background: transparent; border: none; cursor: pointer; padding: .4rem .8rem; border-radius: var(--pill); transition: all .15s var(--ease); display: inline-flex; align-items: center; gap: .35rem; }
.seg:hover { color: var(--text); }
.seg.is-active { background: var(--elevated); color: var(--text); box-shadow: var(--shadow-sm); }
:root[data-theme="light"] .seg.is-active { background: var(--accent); color: #fff; }
.seg[data-view]::before { content: ""; width: 15px; height: 15px; background: currentColor; -webkit-mask: no-repeat center/contain; mask: no-repeat center/contain; }
.seg[data-view="extended"]::before { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><rect x='3' y='4' width='8' height='16' rx='1.5'/><rect x='13' y='4' width='8' height='16' rx='1.5'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><rect x='3' y='4' width='8' height='16' rx='1.5'/><rect x='13' y='4' width='8' height='16' rx='1.5'/></svg>"); }
.seg[data-view="compact"]::before { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><rect x='3' y='4' width='18' height='3.4' rx='1.4'/><rect x='3' y='10.3' width='18' height='3.4' rx='1.4'/><rect x='3' y='16.6' width='18' height='3.4' rx='1.4'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><rect x='3' y='4' width='18' height='3.4' rx='1.4'/><rect x='3' y='10.3' width='18' height='3.4' rx='1.4'/><rect x='3' y='16.6' width='18' height='3.4' rx='1.4'/></svg>"); }

.select-wrap { position: relative; display: inline-flex; }
.select-wrap select { width: auto; padding: .45rem 2rem .45rem .9rem; border-radius: var(--pill); font-size: .85rem; font-weight: 600; background: var(--surface-2); appearance: none; -webkit-appearance: none; cursor: pointer; }
.select-wrap::after { content: ""; position: absolute; right: .8rem; top: 50%; width: 9px; height: 9px; transform: translateY(-60%) rotate(45deg); border-right: 2px solid var(--text-faint); border-bottom: 2px solid var(--text-faint); pointer-events: none; }

/* ---------- Tag genere / meta ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.gtag { font-size: .72rem; font-weight: 600; padding: .12rem .5rem; border-radius: var(--pill); background: var(--accent-weak); color: color-mix(in srgb, var(--accent) 78%, var(--text)); white-space: nowrap; }
.tag { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .16rem .5rem; border-radius: 6px; background: var(--surface-2); color: var(--text-dim); border: 1px solid var(--border); }
.tag.tv { color: var(--mint); background: var(--mint-weak); border-color: transparent; }
.tag.movie { color: var(--accent); background: var(--accent-weak); border-color: transparent; }
.mono { font-family: var(--font-mono); font-size: .8rem; color: var(--text-dim); }
.avg { display: inline-flex; align-items: center; gap: .25rem; color: var(--amber); font-weight: 700; font-family: var(--font-mono); font-size: .82rem; }

/* ============================================================
   VISTA ESTESA
   ============================================================ */
.titles.view-extended { display: grid; grid-template-columns: repeat(auto-fill, minmax(430px, 1fr)); gap: 1rem; }
.view-extended .card {
  display: flex; gap: 1rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1rem; transition: border-color .16s, transform .16s, box-shadow .16s;
}
.view-extended .card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.card.seen { opacity: .82; }
.poster {
  width: 104px; aspect-ratio: 2/3; border-radius: var(--r); object-fit: cover; flex-shrink: 0;
  background: var(--surface-2); cursor: zoom-in; transition: transform .16s var(--ease);
}
.poster:hover { transform: scale(1.03); }
.poster-empty {
  width: 104px; aspect-ratio: 2/3; border-radius: var(--r); flex-shrink: 0; background: var(--surface-2);
  display: grid; place-items: center; font-size: 1.8rem; color: var(--text-faint);
}
.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.card-top { display: flex; justify-content: space-between; gap: .6rem; align-items: flex-start; }
.card-title { font-size: 1.12rem; margin: 0; line-height: 1.25; }
.card-title .year { color: var(--text-faint); font-weight: 500; font-size: .92rem; font-family: var(--font-body); }
.card-meta { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin: .35rem 0 .5rem; }
.overview { font-size: .9rem; color: var(--text-dim); margin: 0 0 .7rem; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card.expanded .overview { -webkit-line-clamp: unset; }
.card-actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin-top: auto; }

/* Azioni comuni */
.watch-toggle { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; font-size: .85rem; font-weight: 600; user-select: none; padding: .38rem .7rem; border: 1px solid var(--border); border-radius: var(--pill); color: var(--text-dim); transition: all .15s var(--ease); }
.watch-toggle input { width: auto; accent-color: var(--mint); }
.watch-toggle.on { color: var(--mint); border-color: var(--mint); background: var(--mint-weak); }
.rating-wrap { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 600; color: var(--text-dim); border: 1px solid var(--border); border-radius: var(--pill); padding: .28rem .4rem .28rem .7rem; }
.rating-wrap.rated { color: var(--amber); border-color: var(--amber); background: var(--amber-weak); }
.rating-select { width: auto; padding: .2rem 1.4rem .2rem .5rem; border-radius: 8px; font-size: .8rem; font-weight: 700; background: transparent; border-color: transparent; }
.link-btn { background: none; border: 1px solid transparent; color: var(--text-dim); cursor: pointer; font: inherit; font-weight: 600; font-size: .84rem; padding: .38rem .6rem; border-radius: var(--pill); transition: all .15s var(--ease); }
.link-btn:hover { color: var(--text); background: var(--surface-2); }
.link-btn.danger:hover { color: var(--danger); background: var(--danger-weak); }

/* ============================================================
   VISTA COMPATTA
   ============================================================ */
.titles.view-compact { display: flex; flex-direction: column; gap: .4rem; }
.view-compact .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; transition: border-color .16s; }
.view-compact .card:hover { border-color: var(--border-strong); }
.row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem;
  padding: .6rem .8rem; cursor: pointer;
}
.row-chevron { width: 20px; height: 20px; color: var(--text-faint); transition: transform .2s var(--ease); flex-shrink: 0; display: grid; place-items: center; }
.card.expanded .row-chevron { transform: rotate(90deg); color: var(--accent); }
.row-chevron::before { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }
.row-main { min-width: 0; }
.row-title { font-weight: 700; font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: baseline; gap: .5rem; }
.row-title .year { color: var(--text-faint); font-weight: 500; font-size: .85rem; }
.row-sub { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: .15rem; font-size: .78rem; color: var(--text-dim); }
.row-right { display: flex; align-items: center; gap: .7rem; flex-shrink: 0; }
.row-right .seen-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.card.seen .row-right .seen-dot { background: var(--mint); }
.row-seen-label { font-size: .78rem; font-weight: 600; color: var(--text-faint); }
.card.seen .row-seen-label { color: var(--mint); }

.expand { display: none; padding: 0 .8rem .9rem calc(.8rem + 20px + .8rem); gap: 1rem; }
.card.expanded .expand { display: flex; }
.expand .poster, .expand .poster-empty { width: 92px; }
.expand-body { flex: 1; min-width: 0; }
.expand .overview { -webkit-line-clamp: unset; margin-bottom: .7rem; }
.expand .card-actions { margin-top: .2rem; }

@media (max-width: 620px) {
  .expand { padding-left: .8rem; }
  .row-sub .runtime { display: none; }
}

/* ---------- Commenti ---------- */
.comments { margin-top: .9rem; border-top: 1px solid var(--border); padding-top: .8rem; width: 100%; }
.comments-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); margin-bottom: .5rem; }
.comment { display: flex; justify-content: space-between; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--border); }
.comment:last-of-type { border-bottom: none; }
.comment-author { font-weight: 700; font-size: .82rem; color: var(--accent); }
.comment-body { font-size: .9rem; color: var(--text); }
.comment-date { font-size: .72rem; color: var(--text-faint); font-family: var(--font-mono); }
.comment-form { display: flex; gap: .5rem; margin-top: .7rem; }
.comment-form input { border-radius: var(--pill); }

.empty { text-align: center; color: var(--text-dim); padding: 3.5rem 1rem; font-size: .95rem; }

/* ---------- Footer ---------- */
.appfoot { text-align: center; padding: 2.5rem 1rem 1rem; }
.ghost-link { background: none; border: none; color: var(--text-faint); cursor: pointer; font: inherit; font-size: .85rem; font-weight: 600; }
.ghost-link:hover { color: var(--text-dim); }
#version-label { font-family: var(--font-mono); }

/* ---------- Overlay / sheet ---------- */
.overlay { position: fixed; inset: 0; background: var(--overlay); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 50; padding: 1.2rem; animation: fade .18s var(--ease); }
.sheet { width: 100%; max-width: 540px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow); max-height: 86vh; overflow: auto; animation: pop .22s var(--ease); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); }
.sheet-head h2 { margin: 0; font-size: 1.2rem; }
.pending-list { padding: 1rem 1.4rem 1.6rem; display: flex; flex-direction: column; gap: .7rem; }
.pending-item { display: flex; justify-content: space-between; align-items: center; gap: .6rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); padding: .75rem .9rem; }
.pending-info { min-width: 0; }
.pending-info .p-name { font-weight: 700; }
.pending-info .p-email { font-size: .82rem; color: var(--text-dim); }
.pending-actions { display: flex; gap: .4rem; flex-shrink: 0; }
.btn-ok { background: var(--mint); color: #04120c; }
.btn-no { background: transparent; border-color: var(--danger); color: var(--danger); }

/* ---------- Changelog ---------- */
.changelog-body { padding: 1.1rem 1.5rem 1.8rem; }
.cl-ver { margin: 1.2rem 0 .3rem; font-size: 1.05rem; }
.cl-ver:first-child { margin-top: 0; }
.cl-sec { margin: .8rem 0 .3rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); font-family: var(--font-body); }
.cl-list { margin: .2rem 0 .7rem; padding-left: 1.1rem; }
.cl-list li { margin: .25rem 0; font-size: .92rem; color: var(--text-dim); }
.cl-p { font-size: .85rem; color: var(--text-faint); }

/* ---------- Lightbox locandina ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(4,4,8,.9); backdrop-filter: blur(8px); z-index: 60; display: grid; place-items: center; padding: 2rem; animation: fade .2s var(--ease); }
.lightbox-fig { margin: 0; max-height: 92vh; display: flex; flex-direction: column; align-items: center; gap: .8rem; animation: pop .24s var(--ease); }
.lightbox-fig img { max-height: 82vh; width: auto; border-radius: var(--r-lg); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lightbox-fig figcaption { color: #f0f0f4; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; text-align: center; }
.lightbox-close { position: fixed; top: 1.1rem; right: 1.2rem; width: 44px; height: 44px; border-radius: var(--pill); background: rgba(255,255,255,.12); color: #fff; border: none; font-size: 1.2rem; cursor: pointer; }
.lightbox-close:hover { background: rgba(255,255,255,.22); }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 1.6rem; left: 50%; transform: translateX(-50%); background: var(--elevated); border: 1px solid var(--border-strong); color: var(--text); padding: .75rem 1.2rem; border-radius: var(--pill); box-shadow: var(--shadow); z-index: 70; font-size: .9rem; font-weight: 600; animation: pop .2s var(--ease); }
.toast.error { border-color: var(--danger); color: var(--danger); }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.list-enter { animation: listIn .32s var(--ease) both; }
@keyframes listIn { from { opacity: 0; transform: translateY(10px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .poster { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .titles.view-extended { grid-template-columns: 1fr; }
  .toolbar { align-items: flex-start; }
  .toolbar-right { width: 100%; }
  .list-title { font-size: 1.3rem; }
}
@media (max-width: 480px) {
  .user-chip { display: none; }
  .container { padding: 1.2rem 1rem 4rem; }
}
