/* NEXT REEL - house lights down by default. */
:root {
  --bg: #0e0d0c;
  --bg-2: #141210;
  --surface: #1a1816;
  --surface-2: #23201d;
  --ink: #f4eee5;
  --ink-soft: #b3a899;
  --ink-faint: #7d7469;
  --line: #2f2b27;
  --accent: #f2b134;
  --accent-ink: #1a1305;
  --accent-soft: rgba(242, 177, 52, 0.14);
  --love: #ff7a59;
  --good: #7fd6a4;
  --good-soft: rgba(127, 214, 164, 0.13);
  --shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.8);
  --radius: 18px;
  --radius-sm: 10px;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f5f0e7; --bg-2: #efe8dc; --surface: #fffcf6; --surface-2: #f3ece0;
    --ink: #1d1a16; --ink-soft: #5f574d; --ink-faint: #8d8477; --line: #e2d8c8;
    --accent: #b8780a; --accent-ink: #fffaf0; --accent-soft: rgba(184, 120, 10, 0.12);
    --love: #d4472a; --good: #1f8a52; --good-soft: rgba(31, 138, 82, 0.1);
    --shadow: 0 16px 34px -24px rgba(60, 40, 10, 0.45);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f5f0e7; --bg-2: #efe8dc; --surface: #fffcf6; --surface-2: #f3ece0;
  --ink: #1d1a16; --ink-soft: #5f574d; --ink-faint: #8d8477; --line: #e2d8c8;
  --accent: #b8780a; --accent-ink: #fffaf0; --accent-soft: rgba(184, 120, 10, 0.12);
  --love: #d4472a; --good: #1f8a52; --good-soft: rgba(31, 138, 82, 0.1);
  --shadow: 0 16px 34px -24px rgba(60, 40, 10, 0.45);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  background-image: radial-gradient(1200px 500px at 50% -200px, var(--accent-soft), transparent 70%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; outline: none; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.1; margin: 0 0 0.4em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.soft { color: var(--ink-soft); }
.small { font-size: 0.82rem; }
.label { display: block; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --------------------------------------------------------------- header */
.site-header { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; gap: 20px; height: 62px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--accent); }
.logo-reel { animation: spin 14s linear infinite; }
.logo-word { font-family: var(--display); font-weight: 900; font-size: 1.35rem; letter-spacing: 0.04em; color: var(--ink); }
.logo-word span { color: var(--accent); margin-left: 2px; }
.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a { text-decoration: none; font-weight: 700; font-size: 0.9rem; color: var(--ink-soft); padding: 8px 12px; border-radius: 999px; }
.main-nav a:hover, .main-nav a.active { color: var(--ink); background: var(--surface-2); }
.theme-toggle { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; width: 38px; height: 38px; cursor: pointer; font-size: 1rem; }
.t-light { display: none; }
:root[data-theme="light"] .t-dark { display: none; }
:root[data-theme="light"] .t-light { display: inline; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .t-dark { display: none; }
  :root:not([data-theme="dark"]) .t-light { display: inline; }
}
@media (prefers-reduced-motion: reduce) { .logo-reel, .reel, .beam, .spinner { animation: none !important; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--body); font-weight: 800; font-size: 0.95rem;
  padding: 12px 20px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink); text-decoration: none; cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn-small { padding: 8px 14px; font-size: 0.82rem; }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.linkish { background: none; border: 0; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; padding: 0; text-decoration: underline; }

/* ------------------------------------------------------------------ home */
.hero { padding: 64px 0 36px; max-width: 760px; }
.eyebrow { font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.75rem; color: var(--accent); margin-bottom: 14px; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 4rem); font-weight: 900; }
.hero h1 em { font-style: italic; font-weight: 500; color: var(--accent); }
.lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 640px; }
.search { display: flex; gap: 10px; margin: 28px 0 12px; flex-wrap: wrap; }
.search-field {
  flex: 1 1 320px; display: flex; align-items: center; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px 0 20px;
  box-shadow: var(--shadow);
}
.search-field:focus-within { border-color: var(--accent); }
.search-prefix { color: var(--ink-faint); font-weight: 600; white-space: nowrap; }
.search-field input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--ink); font: inherit; font-weight: 800; font-size: 1.05rem; padding: 15px 4px; }
.search .btn { padding: 15px 26px; font-size: 1rem; }
.form-error { color: var(--love); font-weight: 700; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 0.9rem; color: var(--ink-faint); }
.quick a { color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); padding: 4px 12px; border-radius: 999px; text-decoration: none; font-weight: 700; }
.quick a:hover { border-color: var(--accent); }
.import { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 18px; }
.import summary { cursor: pointer; font-weight: 700; color: var(--ink-soft); }
.import-body { padding-top: 12px; color: var(--ink-soft); }
.drop { display: block; border: 2px dashed var(--line); border-radius: var(--radius); padding: 26px; text-align: center; cursor: pointer; font-weight: 700; color: var(--ink); }
.drop.over, .drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.how-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 26px 0 70px; }
.how-strip > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.how-strip h3 { font-size: 1.2rem; }
.how-strip p { color: var(--ink-soft); margin: 0; font-size: 0.95rem; }
.num { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-ink); font-weight: 800; margin-bottom: 12px; }
@media (max-width: 760px) { .how-strip { grid-template-columns: 1fr; } .hero { padding-top: 40px; } }

.prose-page { max-width: 720px; padding: 50px 0 70px; }
.prose-page h1 { font-size: clamp(2rem, 5vw, 3rem); }
.prose-page h2 { font-size: 1.35rem; margin-top: 1.6em; color: var(--accent); }
.prose-page p, .prose-page li { color: var(--ink-soft); }
.prose-page li { margin-bottom: 6px; }

/* --------------------------------------------------------------- loading */
.boot { display: flex; justify-content: center; padding: 120px 0; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
.loading { max-width: 560px; margin: 0 auto; padding: 60px 0 80px; text-align: center; }
.loading h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.loading h1 span { color: var(--accent); }
.projector { position: relative; width: 120px; height: 90px; margin: 0 auto 26px; }
.reel { position: absolute; top: 0; width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--accent); background:
  radial-gradient(circle at 50% 50%, var(--accent) 0 5px, transparent 6px),
  radial-gradient(circle at 50% 18%, var(--accent) 0 5px, transparent 6px),
  radial-gradient(circle at 50% 82%, var(--accent) 0 5px, transparent 6px),
  radial-gradient(circle at 18% 50%, var(--accent) 0 5px, transparent 6px),
  radial-gradient(circle at 82% 50%, var(--accent) 0 5px, transparent 6px);
  animation: spin 2.4s linear infinite; }
.r1 { left: 8px; } .r2 { right: 8px; }
.beam { position: absolute; left: 50%; bottom: 0; width: 140px; height: 40px; transform: translateX(-50%); background: linear-gradient(180deg, var(--accent-soft), transparent); clip-path: polygon(45% 0, 55% 0, 100% 100%, 0 100%); animation: flicker 1.6s ease-in-out infinite; }
@keyframes flicker { 50% { opacity: 0.55; } }
.stages { list-style: none; padding: 0; margin: 26px 0; text-align: left; }
.stages li { display: grid; grid-template-columns: 22px 1fr 90px; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink-faint); font-weight: 700; }
.stages li.now { color: var(--ink); }
.stages li.done { color: var(--ink-soft); }
.tick { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); }
.stages li.now .tick { border-color: var(--accent); border-top-color: transparent; animation: spin 0.8s linear infinite; }
.stages li.done .tick { background: var(--good); border-color: var(--good); }
.st-bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.st-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.3s ease; }
.stages li.done .st-bar i { width: 100% !important; background: var(--good); }
.loading-note { color: var(--ink-faint); font-size: 0.88rem; }

.error-panel { max-width: 560px; margin: 0 auto; text-align: center; padding: 80px 0; }
.error-emoji { font-size: 3rem; margin-bottom: 10px; }
.error-panel p { color: var(--ink-soft); }
.error-actions { display: flex; gap: 10px; justify-content: center; margin: 20px 0; flex-wrap: wrap; }
.error-hint { font-size: 0.9rem; }

/* --------------------------------------------------------------- profile */
.profile { display: grid; grid-template-columns: 84px 1fr auto; gap: 22px; align-items: start; padding: 40px 0 26px; }
.avatar { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; background: var(--surface-2); border: 2px solid var(--accent); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 2rem; font-weight: 900; color: var(--accent); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile .eyebrow { margin-bottom: 6px; }
.profile h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); font-weight: 900; overflow-wrap: anywhere; }
.lb-link { font-family: var(--body); font-size: 0.95rem; font-weight: 700; color: var(--ink-faint); text-decoration: none; margin-left: 6px; }
.lb-link:hover { color: var(--accent); }
.profile-stats { display: flex; flex-wrap: wrap; gap: 6px 20px; color: var(--ink-soft); font-size: 0.92rem; }
.profile-stats strong { color: var(--ink); }
.taste p { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.taste .label { margin: 0 6px 0 0; }
.tag { font-size: 0.82rem; font-weight: 700; padding: 4px 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.tag-dir { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.tag-cast { border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
@media (max-width: 720px) {
  .profile { grid-template-columns: 60px 1fr; gap: 14px; }
  .avatar { width: 60px; height: 60px; font-size: 1.5rem; }
  .profile-actions { grid-column: 1 / -1; }
}

/* --------------------------------------------------------------- filters */
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; box-shadow: var(--shadow); }
.filter-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.f span { display: block; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 4px; }
.f select { width: 100%; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 8px 8px; font: inherit; font-size: 0.86rem; font-weight: 700; }
.genre-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.genre-row .label { margin: 0 6px 0 0; }
.gchip { background: transparent; border: 1px solid var(--line); color: var(--ink-soft); font: inherit; font-size: 0.78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.gchip:hover { border-color: var(--ink-faint); color: var(--ink); }
.gchip.off { text-decoration: line-through; background: color-mix(in srgb, var(--love) 14%, transparent); border-color: color-mix(in srgb, var(--love) 50%, var(--line)); color: var(--ink); }
@media (max-width: 980px) { .filter-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ----------------------------------------------------------------- cards */
.results-count { color: var(--ink-soft); }
.cards { display: flex; flex-direction: column; gap: 18px; }
.card {
  display: grid; grid-template-columns: 54px 190px minmax(0, 1fr); gap: 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); transition: opacity 0.2s ease, transform 0.2s ease;
}
.card.leaving { opacity: 0; transform: translateX(30px); }
.rank { font-family: var(--display); font-weight: 900; font-size: 2.6rem; line-height: 1; color: var(--accent); text-align: right; font-variant-numeric: tabular-nums; }
.poster { display: block; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 2 / 3; background: var(--surface-2); align-self: start; box-shadow: 0 12px 26px -14px rgba(0, 0, 0, 0.7); }
.poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.poster:hover img { transform: scale(1.03); }
.no-poster { display: flex; height: 100%; align-items: center; justify-content: center; padding: 14px; text-align: center; font-family: var(--display); font-weight: 700; color: var(--ink-soft); }
.card-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.film-title { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: 4px; overflow-wrap: anywhere; }
.film-title a { text-decoration: none; }
.film-title a:hover { color: var(--accent); }
.year { font-family: var(--body); font-weight: 600; font-size: 1rem; color: var(--ink-faint); }
.orig { margin: 0 0 4px; font-style: italic; color: var(--ink-faint); font-size: 0.9rem; }
.meta { color: var(--ink-soft); font-size: 0.88rem; font-weight: 600; margin-bottom: 10px; }
.dot { margin: 0 7px; color: var(--ink-faint); }
.scores { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.match { font-family: var(--display); font-weight: 900; font-size: 1.6rem; color: var(--accent); line-height: 1; white-space: nowrap; }
.match small { font-family: var(--body); font-size: 0.72rem; font-weight: 800; color: var(--ink-soft); margin-left: 3px; }
.tmdb { font-weight: 800; font-size: 0.86rem; white-space: nowrap; }
.tmdb small { color: var(--ink-faint); font-weight: 600; }
.wl-badge { display: inline-block; font-size: 0.8rem; font-weight: 800; background: var(--accent-soft); color: var(--accent); padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; }
.tagline { font-family: var(--display); font-style: italic; font-weight: 500; color: var(--ink-soft); margin-bottom: 6px; }
.synopsis { color: var(--ink); max-width: 68ch; }
.because { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--accent-soft); margin-bottom: 14px; }
.because .label { margin: 0 4px 0 0; color: var(--accent); }

.fref { display: inline-flex; align-items: baseline; gap: 5px; font-size: 0.84rem; font-weight: 700; text-decoration: none; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.fref:hover { border-color: var(--accent); }
.fref .fy { color: var(--ink-faint); font-weight: 600; font-size: 0.76rem; }
.fref .st { color: var(--good); letter-spacing: -1px; font-size: 0.8rem; }
.fref .heart { color: var(--love); font-size: 0.8rem; }
.fref.muted { opacity: 0.7; }
.fref.muted .st { color: var(--ink-faint); }
.frefs { display: flex; flex-wrap: wrap; gap: 6px; }
.frefs.also { margin-top: 6px; align-items: center; font-size: 0.82rem; }
.more { font-size: 0.8rem; color: var(--ink-faint); align-self: center; }

.people { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.dir + .dir { margin-top: 14px; }
.dir-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.dir-head img, .dir-head .ph, .actor-head img, .actor-head .ph { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--surface-2); flex-shrink: 0; }
.ph { display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: var(--ink-faint); }
.dir-head .label { margin-bottom: 0; }
.dir-name { font-family: var(--display); font-weight: 700; font-size: 1.12rem; text-decoration: none; }
.dir-name:hover { color: var(--accent); }
.dir-line { margin: 0 0 6px; font-size: 0.86rem; }
.dir-line strong { color: var(--good); }
.actors { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.actor { padding: 8px 10px; border-radius: var(--radius-sm); background: var(--good-soft); }
.actor-head { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-bottom: 6px; }
.actor-head img, .actor-head .ph { width: 34px; height: 34px; }
.actor-head strong { display: block; font-size: 0.92rem; }
.actor-head:hover strong { color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 0.8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft); text-decoration: none; }
a.chip:hover { color: var(--ink); border-color: var(--ink-faint); }
.chip.seen { color: var(--ink); border-style: dashed; }
.loading-cast .small { margin: 8px 0 0; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.more-wrap { display: flex; justify-content: center; padding: 26px 0 60px; }
.end-note { text-align: center; }
.empty { text-align: center; padding: 40px 20px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty p { color: var(--ink-soft); }

@media (max-width: 860px) {
  .card { grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 16px; position: relative; }
  .rank { position: absolute; top: 8px; left: 8px; z-index: 1; font-size: 1.1rem; background: var(--accent); color: var(--accent-ink); border-radius: 999px; min-width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; padding: 0 8px; }
  .poster { grid-column: 1; }
  .card-body { grid-column: 2; min-width: 0; }
  .people { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .card { grid-template-columns: 92px minmax(0, 1fr); }
  .card-top { flex-direction: column; gap: 6px; }
  .scores { flex-direction: row; align-items: baseline; gap: 12px; }
  .synopsis, .because, .people, .card-actions, .tagline { grid-column: 1 / -1; }
  .card-body { display: contents; }
  .card-body > .card-top, .card-body > .wl-badge { grid-column: 2; }
  .card-body > :not(.card-top):not(.wl-badge) { grid-column: 1 / -1; }
  .main-nav a[data-nav="how"] { display: none; }
  .search-prefix { font-size: 0.85rem; }
  .search .btn { width: 100%; }
}

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 26px 0 36px; color: var(--ink-soft); font-size: 0.9rem; }
.site-footer a { color: var(--ink); }
.footer-small { font-size: 0.78rem; color: var(--ink-faint); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tmdb-logo { display: inline-flex; }

.partial-warn { margin-top: 10px; padding: 10px 14px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--love) 14%, transparent); border: 1px solid color-mix(in srgb, var(--love) 45%, var(--line)); font-weight: 700; font-size: 0.9rem; }

/* ---------------------------------------------- other ways in (bookmark / export) */
.import summary { line-height: 1.4; }
.alt-ways { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; margin-top: 16px; text-align: left; }
.alt { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.alt h3 { font-size: 1.1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.alt ol { margin: 0 0 10px; padding-left: 20px; color: var(--ink-soft); }
.alt li { margin-bottom: 8px; }
.alt li a:not(.bm) { color: var(--accent); font-weight: 700; }
.pill { font-family: var(--body); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; background: var(--accent-soft); color: var(--accent); padding: 3px 8px; border-radius: 999px; }
.bm { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0; padding: 7px 14px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 800; text-decoration: none; cursor: grab; box-shadow: 0 0 0 4px var(--accent-soft); }
.alt .drop { padding: 20px; margin-top: 8px; }
.error-panel:has(.alt-ways) { max-width: 900px; }
@media (max-width: 760px) { .alt-ways { grid-template-columns: 1fr; } }

/* ------------------------------------------------- people you can click */
button.tag, button.chip, button.dir-name, button.actor-head { font: inherit; cursor: pointer; color: inherit; background: none; border: 0; padding: 0; text-align: left; }
button.tag { font-size: 0.82rem; font-weight: 700; padding: 4px 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
button.tag-dir { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
button.tag-cast { border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
button.tag:hover { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
button.tag::after { content: ' →'; opacity: 0.55; }
button.chip { font-size: 0.8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft); }
button.chip.seen { color: var(--ink); border-style: dashed; }
button.chip:hover { color: var(--ink); border-color: var(--accent); }
button.dir-name { font-family: var(--display); font-weight: 700; font-size: 1.12rem; }
button.dir-name:hover, button.actor-head:hover strong { color: var(--accent); text-decoration: underline; }
button.actor-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; width: 100%; }

body.sheet-open { overflow: hidden; }
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(5, 4, 3, 0.68); display: flex; justify-content: flex-end; animation: fade 0.15s ease; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(40px); opacity: 0.4; } }
.sheet { width: min(760px, 100%); height: 100%; overflow-y: auto; background: var(--bg); border-left: 1px solid var(--line); padding: 26px 28px 40px; animation: slide 0.2s ease; }
.sheet-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 18px; }
.sheet-pic { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: var(--surface-2); border: 2px solid var(--accent); display: flex; align-items: center; justify-content: center; }
.sheet-pic img { width: 100%; height: 100%; object-fit: cover; }
.sheet-pic .ph { font-family: var(--display); font-size: 2rem; font-weight: 900; color: var(--accent); }
.sheet-title { flex: 1; min-width: 0; }
.sheet-title h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 900; margin-bottom: 4px; }
.sheet-sum { margin: 0; }
.sheet-sum strong { color: var(--ink); }
.sheet-close { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 1rem; cursor: pointer; }
.sheet-close:hover { border-color: var(--accent); }
.sheet-body h3 { font-size: 1.2rem; margin: 22px 0 12px; display: flex; align-items: baseline; gap: 10px; }
.sheet-body .spinner { margin: 60px auto; }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); gap: 16px 14px; }
.pf { display: flex; flex-direction: column; gap: 3px; text-decoration: none; min-width: 0; }
.pf-poster { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.pf-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s ease; }
.pf:hover .pf-poster img { transform: scale(1.04); }
.pf:hover .pf-title { color: var(--accent); }
.pf-poster .no-poster { font-size: 0.8rem; }
.pf-match { position: absolute; top: 6px; right: 6px; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 0.72rem; padding: 2px 7px; border-radius: 999px; }
.pf-title { font-weight: 800; font-size: 0.86rem; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pf-meta { font-size: 0.74rem; color: var(--ink-faint); font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pf-line { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 0.8rem; }
.pf-line .st { color: var(--good); letter-spacing: -1px; }
.pf-line .heart { color: var(--love); }
.pf-tag { font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); background: var(--accent-soft); padding: 2px 6px; border-radius: 999px; }
.pf-grid.seen .pf-poster { opacity: 0.85; }
.sheet-links { margin-top: 26px; font-size: 0.88rem; color: var(--ink-faint); }
.sheet-links a { color: var(--ink-soft); font-weight: 700; }
@media (max-width: 560px) {
  .sheet { padding: 18px 16px 30px; }
  .sheet-pic { width: 60px; height: 60px; }
  .pf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; }
}
