/* =========================================================
   Popcorn for Us — cinema theme (dark = theatre, light = matinee)
   ========================================================= */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0708;
  --bg-2: #130c0e;
  --surface: #1a1114;
  --surface-2: #24181c;
  --line: #34232a;
  --line-2: #4c343b;
  --text: #f7efe5;
  --muted: #bba99f;
  --faint: #806e68;
  --accent: #d32a3f;
  --accent-hover: #e43a4f;
  --accent-ink: #fff;
  --gold: #f2c14e;
  --gold-soft: rgba(242, 193, 78, .12);
  --gold-line: rgba(242, 193, 78, .35);
  --curtain-1: #6b0c1b;
  --curtain-2: #2b0409;
  --curtain-ink: #f8e8d4;
  --spot: rgba(255, 214, 150, .10);
  --shadow: 0 12px 32px rgba(0, 0, 0, .5);
  --tip-bg: #f7efe5;
  --tip-ink: #1d1214;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181;
  --warn: #f0b44c;
  --info: #8fbaf0;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4ece0;
  --bg-2: #ede2d2;
  --surface: #fffaf3;
  --surface-2: #f5ebdc;
  --line: #e3d4bf;
  --line-2: #cdb89c;
  --text: #2a181b;
  --muted: #6c5850;
  --faint: #998478;
  --accent: #a8132a;
  --accent-hover: #bd1b33;
  --accent-ink: #fff;
  --gold: #9a6400;
  --gold-soft: rgba(184, 134, 11, .12);
  --gold-line: rgba(154, 100, 0, .35);
  --curtain-1: #9a1227;
  --curtain-2: #5e0814;
  --curtain-ink: #fff3e2;
  --spot: rgba(168, 19, 42, .06);
  --shadow: 0 10px 28px rgba(80, 40, 20, .14);
  --tip-bg: #2a181b;
  --tip-ink: #fff3e2;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4;
  --warn: #9a5b00;
  --info: #1f5fae;
}
:root {
  --radius: 14px;
  --font: 'IBM Plex Sans Thai', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Kanit', 'IBM Plex Sans Thai', system-ui, sans-serif;
  --side-w: 256px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(1100px 520px at 60% -220px, var(--spot), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
body.modal-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: var(--accent); }
:root[data-theme="dark"] a { color: var(--gold); }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, h5 { margin: 0; line-height: 1.25; font-family: var(--display); font-weight: 600; letter-spacing: .01em; }
svg.logo { width: 36px; height: 36px; flex: none; }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.boot { padding: 40vh 16px 0; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.err { color: var(--accent); font-size: 14px; }
:root[data-theme="dark"] .err { color: #ff8a8a; }
.gold { color: var(--gold); }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text);
  border-radius: 10px; padding: 8px 15px; cursor: pointer; font-weight: 500;
  white-space: nowrap; min-height: 40px; text-decoration: none; transition: background .15s, border-color .15s, transform .05s;
}
:root[data-theme="dark"] a.btn { color: var(--text); }
.btn:hover { border-color: var(--gold-line); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #1d1205; font-weight: 600; }
:root[data-theme="light"] .btn.gold { color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--line); }
.btn.outline { background: transparent; }
.btn.danger { color: var(--accent); background: transparent; border-color: transparent; }
:root[data-theme="dark"] .btn.danger { color: #ff8a8a; }
.btn.sm { padding: 4px 11px; min-height: 32px; font-size: 13.5px; border-radius: 8px; }
.btn.lg { padding: 12px 22px; min-height: 48px; font-size: 16px; }
.btn.block { width: 100%; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  display: inline-grid; place-items: center; cursor: pointer; flex: none; color: var(--text);
}
.icon-btn:hover { border-color: var(--gold-line); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13.5px; color: var(--muted); font-weight: 500; }
.field small { color: var(--faint); font-size: 12.5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=url], textarea, select {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; outline: none; min-height: 42px;
}
input:focus, textarea:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
textarea { resize: vertical; min-height: 72px; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 46px; }
.pw-eye {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center;
}
.pw-eye:hover, .pw-eye[aria-pressed="true"] { color: var(--text); background: var(--surface-2); }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: 999px;
  font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
.chip.gold { color: var(--gold); border-color: var(--gold-line); background: var(--gold-soft); font-weight: 600; }
.chip.warn { color: var(--warn); border-color: currentColor; background: transparent; }
.chip.pending { color: var(--info); border-color: currentColor; background: transparent; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg .btn.on, .chips .btn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.toggle { display: inline-flex; padding: 3px; border-radius: 10px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.12); }
.toggle button { border: 0; background: transparent; color: inherit; padding: 5px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; opacity: .75; }
.toggle button.on { background: rgba(255,255,255,.16); opacity: 1; font-weight: 600; }
.toggle svg.i { width: 15px; height: 15px; }

/* ---------- brand (marquee sign) ---------- */
.marquee {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border: 2px solid var(--gold); border-radius: 12px; background: rgba(0, 0, 0, .28);
  box-shadow: 0 0 0 1px rgba(0,0,0,.3), 0 0 22px rgba(242, 193, 78, .22) inset;
}
.marquee::before, .marquee::after {
  content: ''; position: absolute; left: 10px; right: 10px; height: 6px;
  background: radial-gradient(circle, #ffe7a3 0 1.6px, rgba(255, 210, 110, .35) 2.4px, transparent 3px) 0 0 / 12px 6px repeat-x;
}
.marquee::before { top: -4px; }
.marquee::after { bottom: -4px; }
.marquee .logo { width: 38px; height: 38px; flex: none; }
.marquee b { display: block; font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: .06em; text-transform: uppercase; color: #ffe2a0; line-height: 1.1; }
.marquee small { display: block; font-size: 11.5px; color: rgba(255, 236, 210, .7); letter-spacing: .12em; text-transform: uppercase; }

/* ---------- app layout ---------- */
.layout { min-height: 100dvh; }
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 10; display: flex; flex-direction: column; gap: 18px;
  padding: 20px 16px; color: var(--curtain-ink); overflow-y: auto;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.18) 0 2px, transparent 2px 26px, rgba(255,255,255,.04) 26px 28px, transparent 28px 44px),
    linear-gradient(180deg, var(--curtain-1), var(--curtain-2));
  box-shadow: inset -12px 0 24px rgba(0, 0, 0, .35);
}
.side .hh { font-size: 13px; opacity: .8; padding: 0 4px; margin-top: -6px; }
.nav { display: grid; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: transparent; color: inherit;
  padding: 10px 12px; border-radius: 10px; cursor: pointer; font-weight: 500; font-size: 15px; text-align: left; opacity: .86;
}
.nav-item:hover { background: rgba(255, 255, 255, .08); opacity: 1; }
.nav-item.on { background: rgba(255, 232, 190, .16); opacity: 1; box-shadow: inset 3px 0 0 #ffd27a; }
.nav-item .n { margin-left: auto; font-size: 12px; background: rgba(0,0,0,.25); padding: 0 8px; border-radius: 999px; }
.side-actions { display: grid; gap: 8px; }
.side-actions .btn.ghost { color: var(--curtain-ink); }
.side-actions .btn.ghost:hover { background: rgba(255,255,255,.08); border-color: transparent; }
.side-foot { margin-top: auto; display: grid; gap: 10px; }
.side-foot .row { justify-content: space-between; }
.side-foot .icon-btn { background: rgba(0,0,0,.25); border-color: rgba(255,255,255,.14); color: inherit; }
.avatars { display: flex; padding-left: 6px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; color: #fff;
  font-weight: 600; border: 2px solid var(--bg); margin-left: -6px; flex: none;
}
.side .avatar { border-color: var(--curtain-1); }

.main { margin-left: var(--side-w); min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 8; display: flex; gap: 12px; align-items: center; padding: 14px 32px;
  background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.mobile-brand, .top-actions { display: none; }
.search { flex: 1; display: flex; gap: 8px; max-width: 760px; position: relative; }
.search svg.i { position: absolute; left: 12px; top: 12px; color: var(--faint); pointer-events: none; }
.search input { flex: 1; min-width: 0; padding-left: 40px; }
.page { padding: 24px 32px 80px; max-width: 1360px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-size: 30px; font-weight: 700; }
.page-head p { margin: 2px 0 0; color: var(--muted); }

/* ---------- cards / lists ---------- */
.grid-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 14px; }
.card {
  display: grid; grid-template-columns: 92px 1fr; gap: 14px; padding: 12px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; align-items: start; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.card:hover { border-color: var(--gold-line); transform: translateY(-2px); box-shadow: var(--shadow); }
.poster {
  width: 92px; aspect-ratio: 2/3; border-radius: 8px; background: var(--surface-2); object-fit: cover;
  display: grid; place-items: center; color: var(--faint); font-size: 11px; text-align: center; overflow: hidden;
}
.card-body { min-width: 0; display: grid; gap: 5px; }
.card h3 { font-size: 16.5px; font-weight: 600; }
.card h3 .yr { color: var(--faint); font-weight: 400; font-size: 13.5px; margin-left: 6px; font-family: var(--font); }
.meta { color: var(--muted); font-size: 12.5px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.note { font-size: 13px; color: var(--muted); background: var(--bg-2); border-radius: 8px; padding: 5px 9px; overflow-wrap: anywhere; border-left: 3px solid var(--gold-line); }
.card-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.progress { font-size: 13.5px; }
.progress b { color: var(--gold); }
.scores { display: flex; gap: 6px; flex-wrap: wrap; }
.rank { font-family: var(--display); font-weight: 700; color: var(--gold); }
.empty {
  grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 56px 16px; border: 1px dashed var(--line-2); border-radius: var(--radius);
  display: grid; gap: 6px; justify-items: center;
}
.empty b { color: var(--text); font-size: 18px; font-family: var(--display); }
.empty .row { margin-top: 10px; justify-content: center; }

/* ---------- centered screens ---------- */
.center-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 32px 16px; }
.panel { width: 100%; max-width: 460px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: var(--shadow); }
.panel h1 { font-size: 26px; margin-bottom: 4px; }
.panel p { margin: 0 0 16px; }
.panel .divider { text-align: center; color: var(--faint); margin: 18px 0; font-size: 13px; }
.panel ol { padding-left: 20px; margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.screen-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.screen-top .marquee b { font-size: 15px; }
.screen-top .toggle { background: var(--surface-2); border-color: var(--line); }
.screen-top .toggle button.on { background: var(--accent); color: #fff; }
.two-col { display: grid; gap: 16px; width: 100%; max-width: 920px; }
@media (min-width: 760px) { .two-col { grid-template-columns: 1fr 1fr; } }
.two-col > .screen-top { grid-column: 1 / -1; }

/* ---------- modal ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(5, 3, 4, .74); z-index: 30; display: flex;
  align-items: center; justify-content: center; padding: 24px; animation: fade .15s ease;
}
.sheet {
  position: relative; width: 100%; max-width: 600px; max-height: calc(100dvh - 48px); overflow-y: auto; overflow-x: hidden;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; overscroll-behavior: contain; box-shadow: var(--shadow);
}
.sheet.wide { max-width: 1040px; }
.sheet.mid { max-width: 760px; }
.sheet-body { padding: 24px 28px 32px; }
.sheet .close {
  position: sticky; top: 12px; float: right; margin: 12px 12px 0 0; z-index: 3; width: 38px; height: 38px;
  border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 21px; cursor: pointer; line-height: 1; color: var(--text);
}
.loading { color: var(--muted); padding: 48px 0; text-align: center; }
@keyframes fade { from { opacity: 0; } }
.sheet h2 { font-size: 24px; }

/* search */
.search-head { display: grid; gap: 12px; margin-bottom: 4px; }
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 10px; margin-top: 14px; }
.result { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.result .poster { width: 64px; }
.result h3 { font-size: 15.5px; }
.result p { margin: 2px 0 8px; font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- detail ---------- */
.d-hero { position: relative; margin: -24px -28px 0; padding: 24px 28px 8px; min-height: 120px; }
.d-hero .bd { position: absolute; inset: 0; background-size: cover; background-position: center 20%; opacity: .32; }
.d-hero .bd::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent, var(--bg-2)); }
.d-layout { position: relative; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; margin-top: 8px; }
.d-side { display: grid; gap: 14px; align-content: start; }
.d-side .poster { width: 100%; border-radius: 12px; box-shadow: var(--shadow); }
.d-title h2 { font-size: 30px; font-weight: 700; }
.d-title .orig { color: var(--muted); font-size: 14px; }
.section { margin-top: 22px; }
.section > h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin-bottom: 10px; font-family: var(--font); font-weight: 600; }
.overview { margin: 0; }
.ratings { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }
.rating { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; text-decoration: none; color: inherit !important; }
a.rating:hover { border-color: var(--gold-line); }
.rating .src { font-size: 12px; color: var(--muted); }
.rating .val { font-size: 23px; font-weight: 700; line-height: 1.2; font-family: var(--display); }
.rating .sub { font-size: 11.5px; color: var(--faint); }
.money { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.money .rating .val { font-size: 19px; }
.pos { color: var(--s3); }
.neg { color: var(--accent); }
:root[data-theme="dark"] .neg { color: #ff8a8a; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 5px 16px; font-size: 14px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.cast { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.person { width: 88px; flex: none; font-size: 12px; }
.person img, .person .ph { width: 88px; height: 118px; object-fit: cover; border-radius: 10px; background: var(--surface-2); margin-bottom: 5px; }
.person b { display: block; font-weight: 600; font-size: 12.5px; line-height: 1.3; }
.person span { color: var(--muted); line-height: 1.3; display: block; }
.providers { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.providers img { width: 42px; height: 42px; border-radius: 10px; }
.ours { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 12px; }
.ours h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); font-family: var(--font); }
.ours .field { margin: 0; }
.rev-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.rev { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.rev.mine { border-color: var(--gold-line); }
.rev .who { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.rev .who .avatar { margin: 0; border: 0; }
.rev .score { margin-left: auto; font-weight: 700; font-size: 20px; color: var(--gold); font-family: var(--display); }
.rev p { margin: 0; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type=range] { flex: 1; accent-color: var(--accent); }
.range-row output { font-weight: 700; font-size: 22px; color: var(--gold); min-width: 44px; text-align: right; font-family: var(--display); }
.progress-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.progress-row { gap: 6px; }
.progress-row input, .progress-row select { width: auto; }
.progress-row input[type=number] { width: 62px !important; padding: 6px 8px; }
.progress-row select { padding: 6px 8px; }

/* series graph */
.graph-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.heat { border-collapse: separate; border-spacing: 3px; font-size: 12px; margin: 6px; }
.heat th { color: var(--faint); font-weight: 500; padding: 2px 4px; white-space: nowrap; }
.heat td { width: 40px; min-width: 40px; height: 28px; text-align: center; border-radius: 6px; font-weight: 600; font-variant-numeric: tabular-nums; }
.heat td.na { background: var(--bg-2); color: var(--faint); font-weight: 400; }
.heat tr.avg td { outline: 1px solid var(--line-2); outline-offset: -1px; }
.heat td.cur { box-shadow: 0 0 0 2px var(--text) inset; }
.r9 { background: #1d7a45; color: #fff; }
.r8 { background: #3aa864; color: #06140b; }
.r7 { background: #c8b431; color: #1a1603; }
.r6 { background: #e08a2b; color: #1c0f02; }
.r5 { background: #d4513a; color: #fff; }
.r4 { background: #7f2a3a; color: #fff; }
.legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); align-items: center; margin-top: 8px; }
.legend i, .legend-list i, .hbar-label i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; vertical-align: -1px; margin-right: 4px; }
.line-chart { width: 100%; height: auto; display: block; }

/* ---------- dashboard ---------- */
.dash { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tile {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px;
  /* ticket-stub notches */
  -webkit-mask: radial-gradient(circle 9px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 9px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 9px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 9px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
}
.tile-label { font-size: 13px; color: var(--muted); }
.tile-val { font-size: 30px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; font-family: var(--display); }
.tile-sub { font-size: 12px; color: var(--faint); }
.dash-sec > h3 { font-size: 19px; margin-bottom: 12px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.dash-sec > h3 .faint { font-size: 13px; font-weight: 400; font-family: var(--font); }
.dash-empty { margin: 0; font-size: 14px; }
.note-line { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.note-line a { color: var(--text) !important; }
.warn-text { color: var(--warn); }
.cols2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; align-items: start; }
.cols2 > .dash { align-content: start; }
.grid2, .grid3 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
@media (min-width: 1100px) {
  .cols2 { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid3 .span2 { grid-column: span 2; }
}
@media (min-width: 720px) { .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid2 .span2 { grid-column: 1 / -1; } }
@media (min-width: 720px) and (max-width: 1099px) { .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid3 .span2 { grid-column: 1 / -1; } }
.panel-s { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.panel-s h4 { font-size: 15px; margin-bottom: 12px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.panel-s h4 .faint { font-size: 12px; font-weight: 400; font-family: var(--font); }
.panel-s h5 { margin: 14px 0 6px; font-size: 13px; color: var(--muted); font-weight: 600; font-family: var(--font); }

.cta {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 20px 24px; border-radius: var(--radius);
  color: var(--curtain-ink); border: 1px solid var(--gold-line);
  background:
    radial-gradient(500px 160px at 85% 50%, rgba(255, 210, 120, .22), transparent 70%),
    repeating-linear-gradient(90deg, rgba(0,0,0,.16) 0 2px, transparent 2px 22px),
    linear-gradient(120deg, var(--curtain-1), var(--curtain-2));
}
.cta h3 { font-size: 22px; color: #ffe2a0; }
.cta p { margin: 2px 0 0; opacity: .85; }
.cta .btn { margin-left: auto; }

.hscroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.mini { flex: none; width: 260px; display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.mini .poster { width: 64px; }
.mini:hover { border-color: var(--gold-line); }
.mini-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; align-items: flex-start; }
.mini-body b { font-size: 14.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-body small { color: var(--gold); font-size: 12.5px; font-weight: 600; }
.mini-body .btn { margin-top: auto; }
.rows { display: grid; gap: 6px; }
.row-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; color: inherit; }
.row-item.static { cursor: default; }
.row-item:hover:not(.static) { border-color: var(--gold-line); }
.row-item b { display: block; font-weight: 600; font-size: 14.5px; }
.row-item small { display: block; color: var(--muted); font-size: 12.5px; }
.row-item .avatar { margin: 0; border: 0; width: 24px; height: 24px; font-size: 11px; }
.date-pill { flex: none; font-size: 12px; padding: 3px 8px; border-radius: 8px; background: var(--surface-2); color: var(--muted); min-width: 70px; text-align: center; }
.date-pill.soon { background: var(--gold-soft); color: var(--gold); font-weight: 600; }

.hbars { display: grid; gap: 10px; }
.hbar { position: relative; display: grid; grid-template-columns: minmax(70px, 32%) 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; outline: none; }
.hbar.has-tip { cursor: pointer; }
.hbar-label { display: flex; align-items: center; gap: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { height: 10px; background: var(--bg-2); border-radius: 4px; overflow: hidden; }
.hbar-fill { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.hbar-val { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tip {
  display: none; position: absolute; z-index: 4; left: 0; top: calc(100% + 6px); min-width: 190px; max-width: 100%;
  background: var(--tip-bg); color: var(--tip-ink); border-radius: 10px; padding: 8px 12px; font-size: 12.5px;
  grid-template-columns: 1fr auto; gap: 2px 14px; box-shadow: var(--shadow);
}
.tip .faint { opacity: .7; color: inherit; }
.hbar.has-tip:hover .tip, .hbar.has-tip:focus .tip, .hbar.open .tip { display: grid; }
.donut-wrap { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.donut { width: 140px; height: 140px; flex: none; }
.donut circle { transition: opacity .15s; }
.donut:hover circle:not(:hover) { opacity: .5; }
.donut-num { fill: var(--text); font-size: 24px; font-weight: 700; font-family: var(--display); }
.donut-sub { fill: var(--muted); font-size: 11px; }
.legend-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; flex: 1; min-width: 150px; font-size: 13.5px; }
.legend-list li { display: flex; align-items: center; gap: 8px; }
.legend-list b { font-variant-numeric: tabular-nums; }
.legend-list .faint { width: 38px; text-align: right; font-size: 12px; }
.vbars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: end; }
.vbar { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; cursor: default; }
.vbar-stack { width: 100%; max-width: 30px; display: flex; flex-direction: column-reverse; gap: 2px; box-shadow: inset 0 -1px 0 var(--line-2); }
.vbar-stack > span { display: block; width: 100%; flex: none; }
.vbar-stack > span:nth-last-child(2) { border-radius: 4px 4px 0 0; }
.vbar-stack > .vbar-val { font-size: 11.5px; color: var(--muted); height: 14px; text-align: center; font-variant-numeric: tabular-nums; }
.vbar-label { font-size: 11px; color: var(--faint); white-space: nowrap; overflow: hidden; max-width: 100%; }
.vbar:hover .vbar-stack span { filter: brightness(1.12); }
.stackbar { display: flex; gap: 2px; height: 14px; border-radius: 4px; overflow: hidden; margin-bottom: 4px; }
.stackbar span { display: block; }
.pairs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.pairs li { display: flex; gap: 6px; align-items: center; }
.pairs .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { border: 2px solid; border-radius: 999px; padding: 0 7px; font-size: 12px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.top-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: top; }
.top-list li { display: flex; align-items: center; gap: 10px; cursor: pointer; counter-increment: top; }
.top-list li::before { content: counter(top); width: 16px; color: var(--gold); font-size: 15px; text-align: center; font-family: var(--display); font-weight: 700; }
.top-list .poster { width: 34px; font-size: 0; }
.top-list b { display: block; font-size: 14px; font-weight: 600; }
.top-list small { color: var(--muted); font-size: 12px; }
.score-big { font-size: 19px; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; font-family: var(--display); }
.feed { list-style: none; margin: 0; padding: 0; display: grid; }
.feed li { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.feed li[data-act] { cursor: pointer; }
.feed li[data-act]:hover { background: var(--surface); }
.feed li:last-child { border-bottom: 0; }
.feed .avatar { margin: 0; border: 0; width: 26px; height: 26px; font-size: 12px; }
.feed time { color: var(--faint); font-size: 12px; white-space: nowrap; }

/* ---------- random pick ---------- */
.rand-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; margin-top: 16px; }
.filters { display: grid; gap: 16px; align-content: start; }
.filters h5 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin-bottom: 8px; font-family: var(--font); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips .btn { min-height: 32px; padding: 4px 11px; font-size: 13.5px; border-radius: 999px; }
.year-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.year-row input { text-align: center; }
.stage {
  position: relative; min-height: 380px; border-radius: 16px; overflow: hidden; display: grid; place-items: center; padding: 22px;
  background: radial-gradient(420px 260px at 50% 0%, rgba(255, 220, 150, .16), transparent 70%), var(--surface);
  border: 1px solid var(--line);
}
.stage::before, .stage::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 22px;
  background: repeating-linear-gradient(90deg, rgba(0,0,0,.25) 0 2px, transparent 2px 8px), linear-gradient(180deg, var(--curtain-1), var(--curtain-2));
}
.stage::before { left: 0; } .stage::after { right: 0; }
.stage .placeholder { text-align: center; color: var(--muted); display: grid; gap: 10px; justify-items: center; }
.stage .placeholder .dice { font-size: 52px; }
.rolling .dice { animation: roll .5s linear infinite; }
@keyframes roll { to { transform: rotate(360deg); } }
.pick {
  width: 100%; display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; align-items: start; padding: 0 18px;
  animation: reveal .45s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes reveal { from { opacity: 0; transform: scale(.94) translateY(8px); } }
.pick .poster { width: 180px; border-radius: 12px; box-shadow: var(--shadow); }
.pick h3 { font-size: 26px; font-weight: 700; }
.pick p { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.mode-tabs { display: inline-flex; padding: 4px; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.mode-tabs button { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; cursor: pointer; color: var(--muted); font-weight: 500; }
.mode-tabs button.on { background: var(--accent); color: var(--accent-ink); }

/* wrapped */
.w-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.w-stat { background: linear-gradient(135deg, var(--gold-soft), var(--surface)); border: 1px solid var(--gold-line); border-radius: var(--radius); padding: 16px; }
.w-val { font-size: 32px; font-weight: 700; color: var(--gold); line-height: 1.15; font-variant-numeric: tabular-nums; font-family: var(--display); }
.w-label { font-size: 13px; color: var(--muted); }

#toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--tip-bg); color: var(--tip-ink); padding: 10px 18px; border-radius: 12px; font-weight: 500; z-index: 60;
  opacity: 0; pointer-events: none; transition: .2s ease; max-width: calc(100vw - 32px); text-align: center; box-shadow: var(--shadow);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

.bottombar { display: none; }

/* ---------- tablet & phone ---------- */
@media (max-width: 900px) {
  .side { display: none; }
  .main { margin-left: 0; }
  .topbar { padding: 10px 16px; flex-wrap: wrap; gap: 10px; }
  .mobile-brand { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
  .mobile-brand .logo { width: 32px; height: 32px; }
  .mobile-brand b { font-family: var(--display); font-size: 16px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tiles { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .top-actions { display: flex; gap: 6px; }
  .top-actions .icon-btn { width: 38px; height: 38px; font-size: 12.5px; font-weight: 600; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .page { padding: 16px 16px 96px; }
  .page-head h1 { font-size: 24px; }
  .bottombar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); color: var(--curtain-ink);
    background: linear-gradient(180deg, var(--curtain-1), var(--curtain-2)); box-shadow: 0 -6px 20px rgba(0,0,0,.3);
  }
  .bottombar button { border: 0; background: transparent; color: inherit; display: grid; justify-items: center; gap: 2px; font-size: 11px; padding: 6px 0; border-radius: 10px; cursor: pointer; opacity: .75; position: relative; }
  .bottombar button.on { opacity: 1; background: rgba(255, 232, 190, .14); }
  .bottombar svg.i { width: 21px; height: 21px; }
  .bottombar .n { position: absolute; top: 2px; right: calc(50% - 22px); background: #ffd27a; color: #2a0409; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 0 5px; }
  .overlay { padding: 0; align-items: flex-end; }
  .sheet, .sheet.wide, .sheet.mid { max-width: none; max-height: 94dvh; border-radius: 18px 18px 0 0; }
  .sheet-body { padding: 18px 16px 28px; }
  .d-hero { margin: -18px -16px 0; padding: 18px 16px 8px; }
  .d-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .d-side { grid-template-columns: 110px minmax(0, 1fr); align-items: start; }
  .d-side .poster { width: 110px; }
  .d-side .ours { grid-column: 1 / -1; }
  .d-title h2 { font-size: 23px; }
  .rand-layout { grid-template-columns: minmax(0, 1fr); }
  .pick { grid-template-columns: 110px minmax(0, 1fr); padding: 0 14px; gap: 14px; }
  .pick .poster { width: 110px; }
  .pick h3 { font-size: 20px; }
  .stage { min-height: 300px; }
}
@media (max-width: 560px) {
  .card { grid-template-columns: 72px 1fr; }
  .card .poster { width: 72px; }
  .cta .btn { margin-left: 0; width: 100%; }
}

/* ---------- v5: spaces, refs, avatars, api status, clickable tiles ---------- */
.spaces { display: grid; gap: 4px; padding: 8px; border-radius: 12px; background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .08); }
.space {
  display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; color: inherit; cursor: pointer;
  padding: 7px 10px; border-radius: 8px; font-size: 14px; text-align: left; opacity: .8;
}
.space span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.space:hover { background: rgba(255, 255, 255, .08); opacity: 1; }
.space.on { background: #ffd27a; color: #2a0409; opacity: 1; font-weight: 600; }
.space.add { opacity: .6; font-size: 13px; }
.mobile-only { display: none; }
@media (max-width: 900px) {
  .mobile-only { display: block; margin-bottom: 14px; }
  .mobile-only .spaces { display: flex; overflow-x: auto; background: var(--surface); border-color: var(--line); color: var(--text); padding: 4px; }
  .mobile-only .space { width: auto; flex: none; }
  .mobile-only .space.on { background: var(--accent); color: var(--accent-ink); }
}
.chip.ref { color: var(--text); border-color: var(--line-2); gap: 5px; }
.chip.ref svg.i { width: 13px; height: 13px; }
.refs { display: grid; gap: 6px; border-top: 1px dashed var(--line-2); padding-top: 12px; }
.ref-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.ref-row small { display: block; color: var(--muted); font-size: 12px; }
.ref-row .btn.sm { padding: 3px 9px; min-height: 30px; }
.card-actions .icon-only { margin-left: auto; padding: 4px 8px; color: var(--faint); }
.card-actions .icon-only:hover { color: var(--accent); }
:root[data-theme="dark"] .card-actions .icon-only:hover { color: #ff8a8a; }
.avatar.img { overflow: hidden; padding: 0; }
.avatar.img img { width: 100%; height: 100%; object-fit: cover; }
.avatar-xl .avatar { width: 72px; height: 72px; font-size: 28px; margin: 0; border-width: 3px; }
.profile-row { display: flex; align-items: center; gap: 16px; margin-bottom: 6px; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; }
@media (max-width: 900px) { .settings-grid { grid-template-columns: minmax(0, 1fr); } }
.set-sec { margin-bottom: 20px; display: grid; gap: 10px; }
.set-sec h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); font-family: var(--font); }
.api-list { display: grid; gap: 6px; }
.api-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.api-row b { display: block; font-size: 14px; }
.api-row small { display: block; font-size: 12px; color: var(--muted); }
.api-state { text-align: right; max-width: 48%; }
.api-state b { font-size: 13px; }
.api-state.ok b { color: var(--s3); }
.api-state.error b { color: var(--accent); }
:root[data-theme="dark"] .api-state.error b { color: #ff8a8a; }
.api-state.missing b, .api-state.checking b { color: var(--faint); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--faint); }
.dot.ok { background: var(--s3); box-shadow: 0 0 0 3px color-mix(in srgb, var(--s3) 25%, transparent); }
.dot.error { background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.dot.checking { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
button.tile { font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%; transition: border-color .15s, transform .15s; }
button.tile:hover { border-color: var(--gold-line); transform: translateY(-2px); }
button.tile:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.tile-go { position: absolute; right: 16px; top: 12px; color: var(--faint); font-size: 15px; transition: transform .15s, color .15s; }
button.tile:hover .tile-go { color: var(--gold); transform: translateX(3px); }
.feed.all { max-height: 460px; overflow-y: auto; }

/* ---------- v6: Now Showing lightbox ---------- */
.page-wrap { min-width: 0; }
@media (min-width: 1500px) {
  .page-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; padding-right: 28px; align-items: start; }
  .page-wrap .page { padding-right: 0; }
  .rail { position: sticky; top: 86px; padding-top: 24px; max-height: calc(100dvh - 86px); overflow-y: auto; scrollbar-width: thin; padding-bottom: 24px; }
}
.ns {
  border-radius: 16px; overflow: hidden; border: 2px solid var(--gold);
  background: linear-gradient(180deg, #1a0e10, #0e0809);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .4), 0 0 32px rgba(242, 193, 78, .16), var(--shadow);
  color: #f7efe5;
}
.ns .faint { color: #9c8a83; }
.ns-sign {
  position: relative; text-align: center; padding: 16px 14px 12px;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .2) 0 2px, transparent 2px 22px),
    linear-gradient(180deg, var(--curtain-1), var(--curtain-2));
  border-bottom: 2px solid var(--gold);
}
.ns-bulbs { position: absolute; left: 10px; right: 10px; top: 5px; height: 6px;
  background: radial-gradient(circle, #ffe7a3 0 1.6px, rgba(255, 210, 110, .35) 2.4px, transparent 3px) 0 0 / 12px 6px repeat-x;
  animation: bulbs 1.6s steps(2) infinite; }
@keyframes bulbs { 50% { background-position: 6px 0; } }
@media (prefers-reduced-motion: reduce) { .ns-bulbs { animation: none; } .slide { animation: none; } }
.ns-sign b { display: block; font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: .22em; color: #ffe2a0; text-shadow: 0 0 12px rgba(255, 200, 100, .55); margin-top: 4px; }
.ns-sign small { display: block; font-size: 12px; color: rgba(255, 236, 210, .78); margin-top: 2px; }
.ns-body { padding: 12px; display: grid; gap: 10px; }
.ns-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.ns-tabs button, .ns-chips button {
  border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .04); color: #e9dccf; cursor: pointer;
  border-radius: 999px; padding: 4px 11px; font-size: 13px; font-family: inherit;
}
.ns-tabs button.on, .ns-chips button.on { background: #ffd27a; border-color: #ffd27a; color: #2a0409; font-weight: 600; }
.ns-tabs button:disabled, .ns-chips button:disabled { opacity: .35; cursor: not-allowed; }
.ns-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.ns-chips button { font-size: 12.5px; padding: 3px 10px; }
.ns-stage { position: relative; min-height: 200px; }
.ns-empty { display: grid; place-items: center; gap: 8px; text-align: center; color: #bba99f; padding: 48px 12px; font-size: 14px; }
.ns-empty .dice { font-size: 40px; }
.slide { display: grid; gap: 10px; cursor: pointer; animation: reveal .45s cubic-bezier(.2, .9, .3, 1.15); }
.slide-poster { position: relative; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 220, 150, .25); background: #000; }
.slide-poster img { width: 100%; aspect-ratio: 2/3; object-fit: cover; max-height: min(52vh, 470px); }
.slide-poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 240, 200, .10), transparent 30%); pointer-events: none; }
.slide-rank { position: absolute; left: 10px; top: 10px; background: #ffd27a; color: #2a0409; font-family: var(--display); font-weight: 700; padding: 2px 9px; border-radius: 8px; font-size: 15px; }
.slide-date { position: absolute; right: 10px; top: 10px; background: var(--accent); color: #fff; font-weight: 600; padding: 2px 9px; border-radius: 8px; font-size: 12.5px; }
.slide-info { display: grid; gap: 6px; min-width: 0; }
.slide-info h3 { font-size: 19px; color: #fff; }
.slide-info h3 .faint { font-size: 14px; font-weight: 400; font-family: var(--font); }
.slide-info .meta { color: #cdbdb3; }
.slide-info .chip { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); color: #e9dccf; }
.slide-info .chip.gold { color: #ffd27a; border-color: rgba(255, 210, 122, .45); background: rgba(255, 210, 122, .1); }
.why { font-size: 12.5px; color: #ffd27a; }
.slide-ov { margin: 0; font-size: 13px; color: #cdbdb3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ns .btn { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .16); color: #f7efe5; }
.ns .btn.primary { background: #d32a3f; border-color: #d32a3f; color: #fff; }
.ns .btn.ghost { background: transparent; border-color: transparent; }
.ns .btn.outline { background: transparent; border-color: rgba(255, 210, 122, .4); color: #ffd27a; }
.ns-arrow {
  position: absolute; top: 34%; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center; opacity: 0; transition: opacity .2s;
}
.ns-arrow.prev { left: 6px; }
.ns-arrow.next { right: 6px; }
.ns:hover .ns-arrow, .ns-arrow:focus-visible { opacity: 1; }
@media (hover: none) { .ns-arrow { opacity: 1; } }
.ns-dots { display: flex; justify-content: center; gap: 5px; margin-top: 10px; }
.ns-dots button { width: 7px; height: 7px; border-radius: 50%; border: 0; padding: 0; background: rgba(255, 255, 255, .25); cursor: pointer; }
.ns-dots button.on { background: #ffd27a; width: 18px; border-radius: 4px; }
.ns-next-h { font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; color: #9c8a83; font-family: var(--font); margin: 2px 0 0; }
.ns-list { display: grid; gap: 4px; }
.ns-row { display: flex; gap: 10px; align-items: center; text-align: left; width: 100%; border: 0; background: transparent; color: inherit; cursor: pointer; padding: 5px; border-radius: 8px; }
.ns-row:hover { background: rgba(255, 255, 255, .06); }
.ns-row img { width: 34px; height: 51px; object-fit: cover; border-radius: 5px; flex: none; }
.ns-row b { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ns-row small { display: block; font-size: 12px; color: #9c8a83; }
/* horizontal variant on the dashboard (narrower screens) */
.ns.v-wide .slide { grid-template-columns: 190px minmax(0, 1fr); gap: 18px; align-items: start; }
.ns.v-wide .slide-poster img { max-height: none; }
.ns.v-wide .slide-info h3 { font-size: 22px; }
.ns.v-wide .ns-arrow { top: 40%; }
.ns-thumbs { display: flex; gap: 8px; }
.ns-thumbs button { border: 0; padding: 0; background: none; cursor: pointer; border-radius: 6px; overflow: hidden; opacity: .75; }
.ns-thumbs button:hover { opacity: 1; }
.ns-thumbs img { width: 52px; height: 78px; object-fit: cover; }
@media (max-width: 560px) {
  .ns.v-wide .slide { grid-template-columns: 120px minmax(0, 1fr); gap: 12px; }
  .ns.v-wide .slide-info h3 { font-size: 17px; }
  .ns.v-wide .slide-ov { -webkit-line-clamp: 2; }
  .ns.v-wide .ns-arrow { display: none; }
}
/* see-more grid */
.ns-more .ns-tabs button, .ns-more .ns-chips button { border-color: var(--line-2); background: var(--surface); color: var(--text); }
.ns-more .ns-tabs button.on, .ns-more .ns-chips button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ns-more .ns-chips { margin-top: 8px; }
.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; margin-top: 16px; }
.pcard { display: grid; gap: 4px; align-content: start; }
.pcard-img { position: relative; border: 0; padding: 0; background: var(--surface-2); border-radius: 10px; overflow: hidden; cursor: pointer; box-shadow: var(--shadow); }
.pcard-img img { width: 100%; aspect-ratio: 2/3; object-fit: cover; transition: transform .25s; }
.pcard-img:hover img { transform: scale(1.04); }
.pcard-score { position: absolute; left: 6px; bottom: 6px; background: rgba(0, 0, 0, .75); color: #ffd27a; font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 6px; }
.pcard-date { position: absolute; right: 6px; top: 6px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 6px; }
.pcard-match { position: absolute; left: 6px; top: 6px; background: #ffd27a; color: #2a0409; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px; }
.pcard b { font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard small { color: var(--muted); font-size: 12px; }

/* ---------- v7 ---------- */
/* continue-watching carousel: no scrollbar, translucent arrows on hover, autoplay */
.carousel { position: relative; }
.car-track { scrollbar-width: none; scroll-snap-type: x proximity; padding-bottom: 0; }
.car-track::-webkit-scrollbar { display: none; }
.car-track > * { scroll-snap-align: start; }
.car-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .22); background: rgba(10, 6, 8, .38); color: #fff; font-size: 24px; line-height: 1;
  display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .2s, background .2s;
  backdrop-filter: blur(4px);
}
.car-arrow.prev { left: 6px; }
.car-arrow.next { right: 6px; }
.carousel:hover .car-arrow, .car-arrow:focus-visible { opacity: 1; }
.car-arrow:hover { background: rgba(10, 6, 8, .7); }
@media (hover: none) { .car-arrow { opacity: .85; } }

/* activity ticker in the top bar */
.ticker {
  flex: 0 1 460px; min-width: 0; display: flex; align-items: center; gap: 8px; margin-left: auto; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); cursor: pointer;
  font: inherit; font-size: 13px; transition: opacity .25s, transform .25s, border-color .15s;
}
.ticker:hover { border-color: var(--gold-line); }
.ticker .avatar { width: 22px; height: 22px; font-size: 10.5px; margin: 0; border: 0; }
.tick-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.ticker time { color: var(--faint); font-size: 12px; white-space: nowrap; }
.tick-live { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); animation: pulse 1.6s ease-in-out infinite; }
.ticker.out { opacity: 0; transform: translateY(-4px); }
.ticker.in { animation: tickIn .3s ease; }
@keyframes tickIn { from { opacity: 0; transform: translateY(4px); } }
@media (max-width: 900px) { .ticker { order: 4; flex-basis: 100%; margin-left: 0; } }

/* Now Showing: keep the poster inside the box so both arrows stay visible */
.ns-stage { overflow: hidden; }
.slide { grid-template-columns: minmax(0, 1fr); }
.slide-poster img { height: min(40vh, 360px); max-height: none; aspect-ratio: auto; }
.ns.v-rail .ns-arrow { top: calc(min(40vh, 360px) / 2 - 17px); opacity: .0; }
.ns.v-rail:hover .ns-arrow { opacity: 1; }
.ns.v-wide .slide { grid-template-columns: 190px minmax(0, 1fr); }
.ns.v-wide .slide-poster img { height: auto; aspect-ratio: 2/3; }
@media (max-width: 560px) { .ns.v-wide .slide { grid-template-columns: 120px minmax(0, 1fr); } }

/* detail: ratings in the side column, our status at the top of the main column */
.side-ratings h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin-bottom: 8px; font-family: var(--font); font-weight: 600; }
.side-ratings .ratings { grid-template-columns: 1fr 1fr; }
.side-ratings .rating .val { font-size: 20px; }
.d-main .ours { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 901px) {
  .d-main .ours { grid-template-columns: auto minmax(0, 1fr); column-gap: 18px; align-items: start; }
  .d-main .ours > h4 { grid-column: 1 / -1; }
  .d-main .ours > .seg { grid-column: 1; }
  .d-main .ours > .progress-row { grid-column: 2; }
  .d-main .ours > .refs, .d-main .ours > .field, .d-main .ours > .row { grid-column: 1 / -1; }
}
@media (max-width: 900px) { .d-side .side-ratings { grid-column: 1 / -1; } }

/* popcorn score slider on a strip of film */
.rate-box { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px 6px; display: grid; gap: 6px; }
.rate-box.unset { border-style: dashed; border-color: var(--gold-line); }
.rate-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; color: var(--muted); }
.rate-head output { font-family: var(--display); font-weight: 700; font-size: 24px; color: var(--gold); line-height: 1; }
.rate-box.unset .rate-head output { font-family: var(--font); font-size: 12.5px; font-weight: 500; color: var(--gold); }
.pop-range { position: relative; height: 34px; margin: 4px 14px; }
.pop-range .film {
  position: absolute; inset: 2px -14px; border-radius: 4px; background: #17100f;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.pop-range .film::before, .pop-range .film::after {
  content: ""; position: absolute; left: 4px; right: 4px; height: 4px; border-radius: 1px;
  background: repeating-linear-gradient(90deg, rgba(240, 225, 205, .55) 0 6px, transparent 6px 12px);
}
.pop-range .film::before { top: 3px; }
.pop-range .film::after { bottom: 3px; }
.pop-range .fill {
  position: absolute; left: -10px; top: 11px; height: 12px; width: calc(var(--p) + 10px); border-radius: 3px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 12'%3E%3Cg fill='%23fff4d6' stroke='%23e0a930' stroke-width='.8'%3E%3Ccircle cx='4' cy='7' r='3'/%3E%3Ccircle cx='9.5' cy='6.5' r='3.1'/%3E%3Ccircle cx='7' cy='3.6' r='2.5'/%3E%3C/g%3E%3C/svg%3E") left center / 14px 12px repeat-x,
    linear-gradient(90deg, rgba(242, 193, 78, .10), rgba(242, 193, 78, .32));
}
.pop-range .kernel {
  position: absolute; top: 50%; left: var(--p); width: 38px; height: 38px; transform: translate(-50%, -50%);
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .55)); transition: transform .12s; pointer-events: none;
}
.pop-range .kernel svg { width: 100%; height: 100%; }
.pop-range:hover .kernel { transform: translate(-50%, -50%) scale(1.08); }
.pop-range:active .kernel { transform: translate(-50%, -50%) scale(1.15) rotate(-8deg); }
.pop-range input[type=range] {
  position: absolute; inset: -6px -14px; width: calc(100% + 28px); height: calc(100% + 12px); margin: 0; opacity: 0; cursor: grab;
}
.pop-range input[type=range]:active { cursor: grabbing; }
.pop-range:has(input:focus-visible) .film { outline: 2px solid var(--gold); outline-offset: 2px; }
.rate-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); padding: 0 2px; }

/* ---------- v8: Now Showing control bar + fit-to-screen poster ---------- */
.ns-controls { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 10px; }
.ns-controls .ns-dots { margin-top: 0; }
.ns-ctl {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255, 210, 122, .45); background: rgba(255, 255, 255, .06);
  color: #ffe2a0; font-size: 20px; line-height: 1; cursor: pointer; display: grid; place-items: center; flex: none; transition: background .15s;
}
.ns-ctl:hover { background: rgba(255, 210, 122, .18); }
.ns-ctl:focus-visible { outline: 2px solid #ffd27a; outline-offset: 2px; }
.ns.v-rail .slide-poster img { height: var(--poster-h, 380px); }
.ns.v-rail .slide-ov { -webkit-line-clamp: 2; }
.ns-row[hidden], .ns-next-h[hidden] { display: none; }
/* fixed-height info block so every slide is the same height (lets the rail fit the screen exactly) */
.ns.v-rail .slide-info h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 2.5em; }
.ns.v-rail .slide-info .meta { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
.ns.v-rail .why { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 1.5em; }
.ns.v-rail .slide-ov { height: 3em; line-height: 1.5; }
.ns.v-rail .slide-info .row { flex-wrap: nowrap; }
.rail.compact .slide-ov { display: none; }

/* ---------- v9: select mode, bulk bar, share / export / import, link marks ---------- */
.page-head .head-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-left: auto; }
.page-head .head-tools .seg { margin-left: 0 !important; }
.head-tools .btn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.card { position: relative; }
.card.selecting .card-actions { display: none; }
.card.selecting { cursor: pointer; }
.card.selected { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-soft), var(--shadow); }
.sel-box {
  position: absolute; left: 18px; top: 18px; z-index: 2; width: 24px; height: 24px; border-radius: 7px;
  border: 2px solid rgba(255, 255, 255, .85); background: rgba(0, 0, 0, .45); box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}
.card.selected .sel-box, .gcard.selected .sel-box, .lrow.selected .sel-box { background: var(--gold); border-color: var(--gold); }
.card.selected .sel-box::after, .gcard.selected .sel-box::after, .lrow.selected .sel-box::after {
  content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px;
  border: solid #1d1205; border-width: 0 3px 3px 0; transform: rotate(45deg);
}
.bulk-bar {
  position: fixed; left: calc(var(--side-w) + (100vw - var(--side-w)) / 2); transform: translateX(-50%); bottom: 18px; z-index: 25;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; padding: 10px 14px; max-width: calc(100vw - var(--side-w) - 32px);
  background: var(--surface); border: 1px solid var(--gold-line); border-radius: 14px; box-shadow: var(--shadow), 0 0 0 4px var(--gold-soft);
}
.bulk-bar b { font-family: var(--display); margin-right: 4px; white-space: nowrap; }
.bulk-bar select { width: auto; min-height: 32px; padding: 4px 8px; font-size: 13.5px; }
@media (max-width: 900px) {
  .bulk-bar { left: 50%; bottom: calc(72px + env(safe-area-inset-bottom)); max-width: calc(100vw - 16px); }
}
.chip.ref.linked { color: var(--gold); border-color: var(--gold-line); background: var(--gold-soft); }
.btn.link-on { color: var(--gold); border-color: var(--gold-line); background: var(--gold-soft); }
.checks { display: grid; gap: 8px; margin: 12px 0 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; font-size: 14px; }
.check input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.check small { display: block; color: var(--muted); font-size: 12.5px; }
.check svg.i { width: 15px; height: 15px; vertical-align: -2px; }
.share-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; max-height: 300px; overflow-y: auto; }
.share-list li { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 10px; background: var(--surface); }
.share-list li.dim { opacity: .55; }
.share-list .poster { width: 32px; font-size: 0; border-radius: 5px; }
.share-list b { display: block; font-size: 14px; font-weight: 600; }
.share-list small { color: var(--muted); font-size: 12px; }
.export-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 12px; }
.exp-card {
  display: grid; gap: 4px; text-align: left; padding: 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface);
  color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s, transform .15s;
}
.exp-card:hover:not(:disabled) { border-color: var(--gold); transform: translateY(-2px); }
.exp-card b { font-family: var(--display); font-size: 17px; }
.exp-card small { color: var(--muted); font-size: 12.5px; }
.drop {
  display: grid; justify-items: center; gap: 4px; padding: 26px 16px; margin: 14px 0; border: 2px dashed var(--gold-line); border-radius: 14px;
  background: var(--gold-soft); cursor: pointer; text-align: center;
}
.drop input { display: none; }
.drop svg.i { width: 26px; height: 26px; color: var(--gold); }
.drop small { color: var(--muted); }
.imp-summary { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
/* popcorn bucket thumb on the score slider */
.pop-range .kernel { width: 40px; height: 40px; }

/* ---------- v10: watch dates, reactions, import ---------- */
.sched { display: grid; gap: 8px; border-top: 1px dashed var(--line-2); padding-top: 12px; }
.sched h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); font-family: var(--font); }
.sched input[type=datetime-local] { width: auto; min-height: 34px; padding: 4px 8px; }
.sched-cal { gap: 6px; }
.chip.sched { color: var(--info); border-color: currentColor; background: transparent; }
@media (min-width: 901px) { .d-main .ours > .sched { grid-column: 1 / -1; } }

/* reaction prompt after +1 episode */
#react-pop {
  position: fixed; right: 20px; bottom: 76px; z-index: 55; width: min(340px, calc(100vw - 24px)); padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--gold-line); border-radius: 14px; box-shadow: var(--shadow), 0 0 0 4px var(--gold-soft);
  display: none; gap: 8px;
}
#react-pop.show { display: grid; animation: reveal .3s ease; }
@media (max-width: 900px) { #react-pop { right: 12px; bottom: calc(80px + env(safe-area-inset-bottom)); } }
.rp-head { display: flex; justify-content: space-between; align-items: center; }
.rp-head b { font-family: var(--display); font-size: 15px; }
.rp-x { border: 0; background: none; color: var(--muted); font-size: 20px; cursor: pointer; line-height: 1; }
.rp-emojis { display: flex; gap: 4px; flex-wrap: wrap; }
.emoji-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); font-size: 19px; cursor: pointer;
  display: grid; place-items: center; transition: transform .1s, border-color .15s;
}
.emoji-btn:hover { transform: scale(1.12); border-color: var(--gold-line); }
.emoji-btn.on { border-color: var(--gold); background: var(--gold-soft); }
.rp-form { display: flex; gap: 6px; }
.rp-form input { flex: 1; min-height: 34px; padding: 4px 10px; }

/* reactions timeline in the detail view */
#d-notes > h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin-bottom: 10px; font-family: var(--font); font-weight: 600; }
.note-compose { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; }
.note-compose input[type=number] { width: 54px; min-height: 32px; padding: 3px 6px; margin: 0 4px; }
.note-compose input[type=text] { flex: 1; min-width: 160px; min-height: 34px; padding: 4px 10px; }
.note-compose .emoji-btn { width: 32px; height: 32px; font-size: 17px; }
.note-timeline { display: grid; gap: 8px; max-height: 320px; overflow-y: auto; padding-right: 4px; }
.note-ep { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; align-items: start; }
.note-ep-h { font-family: var(--display); font-weight: 600; color: var(--gold); font-size: 14px; padding-top: 3px; }
.note-items { display: flex; flex-wrap: wrap; gap: 6px; }
.note-item { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; max-width: 100%; }
.note-item .avatar { width: 22px; height: 22px; font-size: 10px; margin: 0; border: 0; }
.note-emoji { font-size: 17px; line-height: 1; }
.note-body { overflow-wrap: anywhere; }
.note-del { border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px; }
.note-del:hover { color: var(--accent); }
.heat td.noted { position: relative; }
.heat td.noted::after { content: ""; position: absolute; right: 3px; top: 3px; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .5); }

/* import */
.imp-al { margin: 0 0 10px; gap: 8px; }
.imp-al input { flex: 1; min-width: 160px; width: auto; min-height: 34px; padding: 4px 10px; }
.imp-help { margin: 0 0 12px; font-size: 13.5px; color: var(--muted); }
.imp-help summary { cursor: pointer; color: var(--text); }
.imp-help ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.imp-list li input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.imp-list { max-height: 360px; }
.note-compose select { width: auto; min-height: 32px; padding: 3px 8px; margin: 0 4px; }
.n-pick small { margin-left: 4px; }

/* ---------- v11: themed native controls, in-app dialog, marquee logo ---------- */

/* select: custom chevron */
select {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 30px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23f2c14e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 11px 8px;
}
:root[data-theme="light"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%239a6400' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
select option { background: var(--surface); color: var(--text); }

/* number: hide browser spinners, use themed − / + */
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); overflow: hidden; vertical-align: middle; }
.stepper:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.stepper input[type=number] { border: 0 !important; border-radius: 0; background: transparent; box-shadow: none !important; width: 46px !important; min-height: 32px; padding: 3px 2px !important; text-align: center; margin: 0 !important; }
.year-row .stepper { width: 100%; }
.year-row .stepper input[type=number] { width: 100% !important; flex: 1; }
.step-btn {
  border: 0; background: transparent; color: var(--gold); width: 28px; font-size: 17px; font-weight: 600; cursor: pointer; line-height: 1; padding: 0;
  transition: background .12s;
}
.step-btn:hover { background: var(--gold-soft); }
.step-btn:active { background: var(--gold-line); }

/* checkbox */
input[type=checkbox] {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; flex: none; margin: 2px 0 0; cursor: pointer; position: relative;
  border: 2px solid var(--line-2); border-radius: 5px; background: var(--bg-2); transition: background .12s, border-color .12s;
}
input[type=checkbox]:hover { border-color: var(--gold-line); }
input[type=checkbox]:checked { background: var(--gold); border-color: var(--gold); }
input[type=checkbox]:checked::after {
  content: ""; position: absolute; left: 4px; top: 0; width: 5px; height: 10px; border: solid #1d1205; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
:root[data-theme="light"] input[type=checkbox]:checked::after { border-color: #fff; }
input[type=checkbox]:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* date / time picker icon */
input[type=datetime-local], input[type=date] { color-scheme: inherit; }
input[type=datetime-local]::-webkit-calendar-picker-indicator, input[type=date]::-webkit-calendar-picker-indicator {
  cursor: pointer; opacity: .85; filter: invert(78%) sepia(55%) saturate(560%) hue-rotate(358deg) brightness(98%);
}
:root[data-theme="light"] input[type=datetime-local]::-webkit-calendar-picker-indicator,
:root[data-theme="light"] input[type=date]::-webkit-calendar-picker-indicator { filter: invert(38%) sepia(90%) saturate(700%) hue-rotate(15deg); }

/* file input button (if ever shown) */
input[type=file]::file-selector-button { border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); border-radius: 8px; padding: 5px 12px; margin-right: 10px; cursor: pointer; font: inherit; }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-line); background-clip: padding-box; }

/* in-app confirm / alert */
.dlg-overlay {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px;
  background: rgba(5, 3, 4, .62); backdrop-filter: blur(3px); animation: fade .14s ease;
}
.dlg-overlay.out { opacity: 0; transition: opacity .14s; }
.dlg {
  width: min(420px, 100%); background: var(--surface); border: 1px solid var(--gold-line); border-radius: 18px; padding: 22px 22px 18px;
  box-shadow: var(--shadow), 0 0 0 5px var(--gold-soft); text-align: center; display: grid; gap: 8px; animation: reveal .22s cubic-bezier(.2, .9, .3, 1.2);
}
.dlg.danger { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: var(--shadow), 0 0 0 5px color-mix(in srgb, var(--accent) 14%, transparent); }
.dlg-icon { font-size: 34px; line-height: 1; }
.dlg h3 { font-size: 20px; }
.dlg-msg { color: var(--muted); font-size: 14.5px; overflow-wrap: anywhere; }
.dlg-actions { display: flex; gap: 8px; justify-content: center; margin-top: 8px; flex-wrap: wrap; }
.dlg-actions .btn { min-width: 110px; }
.btn.danger-solid { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.danger-solid:hover { background: var(--accent-hover); }
.dlg-copy { text-align: center; font-size: 13px; }

/* marquee logo with chasing bulbs */
.marquee {
  position: relative; display: grid; justify-items: center; gap: 2px; padding: 18px 20px 13px; border-radius: 14px;
  background: radial-gradient(130% 100% at 50% 0%, #4a0d18, #160709 72%);
  border: 2px solid #c9952b;
  box-shadow: inset 0 0 0 5px #1a080b, inset 0 0 0 6px rgba(242, 193, 78, .35), 0 0 26px rgba(242, 193, 78, .22), 0 6px 18px rgba(0, 0, 0, .35);
}
.marquee::before, .marquee::after { content: none; }
.mq-bulbs { position: absolute; pointer-events: none; --bulb: radial-gradient(circle, #fff8d6 0 1.7px, #ffcf5a 2.3px, rgba(255, 190, 70, .4) 3.3px, transparent 4.2px); }
.mq-bulbs.t, .mq-bulbs.b { left: 12px; right: 12px; height: 8px; background: var(--bulb) 0 0 / 14px 8px repeat-x; }
.mq-bulbs.t { top: 2px; animation: chaseR .9s steps(2) infinite; }
.mq-bulbs.b { bottom: 2px; animation: chaseL .9s steps(2) infinite; }
.mq-bulbs.l, .mq-bulbs.r { top: 12px; bottom: 12px; width: 8px; background: var(--bulb) 0 0 / 8px 14px repeat-y; }
.mq-bulbs.l { left: 2px; animation: chaseU .9s steps(2) infinite; }
.mq-bulbs.r { right: 2px; animation: chaseD .9s steps(2) infinite; }
@keyframes chaseR { to { background-position: 14px 0; } }
@keyframes chaseL { to { background-position: -14px 0; } }
@keyframes chaseD { to { background-position: 0 14px; } }
@keyframes chaseU { to { background-position: 0 -14px; } }
.mq-body { display: flex; align-items: center; gap: 10px; position: relative; }
.mq-body .logo { width: 44px; height: 44px; filter: drop-shadow(0 0 7px rgba(255, 200, 90, .55)); animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-2px) rotate(-3deg); } }
.mq-text { display: grid; }
.marquee .mq-text b {
  font-family: var(--display); font-weight: 700; font-size: 23px; letter-spacing: .12em; line-height: 1; color: #ffe9b0; text-transform: none;
  text-shadow: 0 0 4px rgba(255, 210, 120, .95), 0 0 12px rgba(255, 170, 60, .7), 0 0 24px rgba(255, 120, 30, .35);
}
.mq-text i {
  font-family: 'Pacifico', 'Kanit', cursive; font-style: normal; font-size: 19px; line-height: 1.1; color: #ff7a8a; justify-self: end; margin-top: -1px;
  transform: rotate(-5deg); text-shadow: 0 0 5px rgba(255, 90, 110, .9), 0 0 14px rgba(255, 40, 70, .55);
  animation: neon 6s linear infinite;
}
@keyframes neon { 0%, 18%, 20.5%, 23%, 62%, 64.5%, 100% { opacity: 1; } 19%, 22%, 63% { opacity: .35; } }
.marquee .mq-sub { display: block; font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: rgba(255, 236, 210, .7); margin-top: 3px; }
.screen-top .marquee { padding: 14px 16px 10px; }
.screen-top .marquee .mq-text b { font-size: 18px; }
.screen-top .mq-text i { font-size: 15px; }
.screen-top .mq-body .logo { width: 34px; height: 34px; }
@media (prefers-reduced-motion: reduce) { .mq-bulbs, .mq-body .logo, .mq-text i { animation: none; } }

/* ---------- v12: film-strip dropdown, cinema seat picker, themed scrollbars ---------- */

/* the real <select> stays in the page for value/change, hidden behind the custom button */
select.fsel-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; overflow: hidden; padding: 0 !important; margin: 0 !important; border: 0 !important; }
.fsel-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 34px; padding: 4px 10px 4px 12px; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); color: var(--text); font: inherit; font-size: 14px; text-align: left;
  transition: border-color .15s, box-shadow .15s;
}
.fsel-btn:hover:not(:disabled) { border-color: var(--gold-line); }
.fsel-btn[aria-expanded="true"], .fsel-btn:focus-visible { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); outline: none; }
.fsel-btn:disabled { opacity: .45; cursor: default; }
.fsel-btn span { flex: 1; white-space: nowrap; }
.fsel-ico {
  width: 8px; height: 8px; flex: none; margin: 0 2px -1px 2px; border: solid var(--gold); border-width: 0 2px 2px 0;
  transform: translateY(-2px) rotate(45deg); transition: transform .15s;
}
.fsel-btn[aria-expanded="true"] .fsel-ico { transform: translateY(2px) rotate(-135deg); }
#min-score + .fsel-btn, .year-row .fsel-btn { width: 100%; }

.film-pop {
  position: fixed; z-index: 95; max-height: 300px; overflow-y: auto; padding: 8px 22px; border-radius: 6px;
  background:
    repeating-linear-gradient(180deg, #efe3d1 0 7px, transparent 7px 14px) left 6px top 4px / 8px calc(100% - 8px) no-repeat,
    repeating-linear-gradient(180deg, #efe3d1 0 7px, transparent 7px 14px) right 6px top 4px / 8px calc(100% - 8px) no-repeat,
    linear-gradient(90deg, #0b0607, #160c0e 18%, #160c0e 82%, #0b0607);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 220, 150, .18);
  transform-origin: top center; animation: unroll .18s ease-out;
  scrollbar-width: none;
}
.film-pop::-webkit-scrollbar { display: none; }
@keyframes unroll { from { transform: scaleY(.6); opacity: 0; } }
.frame {
  display: flex; align-items: center; gap: 10px; width: 100%; margin: 5px 0; padding: 8px 12px; text-align: left; cursor: pointer;
  background: linear-gradient(180deg, #2a1b1e, #1c1214); color: #f2e6d8; border: 1px solid #3d2a2e; border-radius: 3px;
  font: inherit; font-size: 14px; white-space: nowrap; transition: background .12s, box-shadow .12s;
}
.frame-no { font-family: var(--display); font-size: 10.5px; color: #9b8378; letter-spacing: .08em; }
.frame:hover:not(:disabled), .frame:focus-visible { outline: none; background: linear-gradient(180deg, #3a262a, #24171a); box-shadow: inset 0 0 0 1px rgba(255, 210, 122, .55), 0 0 12px rgba(255, 190, 80, .18); }
.frame.on { background: linear-gradient(180deg, #ffd98a, #f2b544); color: #2a1205; border-color: #ffd98a; font-weight: 600; }
.frame.on .frame-no { color: #6b4a12; }
.frame.on:hover:not(:disabled), .frame.on:focus-visible { background: linear-gradient(180deg, #ffe7ad, #f7c35c); color: #2a1205; box-shadow: inset 0 0 0 1px #fff3cf, 0 0 14px rgba(255, 200, 90, .45); }
.frame:disabled { opacity: .4; cursor: default; }

/* date trigger: clearly a button that opens a picker */
.date-trigger {
  display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 12px 6px 10px; cursor: pointer; font: inherit; font-size: 14.5px;
  border: 1px dashed var(--gold-line); border-radius: 10px; background: var(--gold-soft); color: var(--text); transition: border-color .15s, background .15s;
}
.date-trigger:hover, .date-trigger[aria-expanded="true"] { border-style: solid; border-color: var(--gold); }
.date-trigger.set { border-style: solid; background: var(--surface-2); }
.dt-ico { font-size: 18px; }
.dt-text { font-weight: 600; }
.date-trigger:not(.set) .dt-text { color: var(--gold); }
.dt-cal { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--gold); color: #2a1205; margin-left: 4px; }
.dt-cal svg.i { width: 16px; height: 16px; }
:root[data-theme="light"] .dt-cal { color: #fff; }

/* cinema seat picker */
.seat-pop {
  position: fixed; z-index: 95; width: 340px; padding: 14px 16px 16px; border-radius: 16px; color: #f2e6d8;
  background:
    radial-gradient(260px 90px at 50% 54px, rgba(190, 220, 255, .16), transparent 70%),
    linear-gradient(180deg, #1d0d11 0%, #120809 60%, #0c0506 100%);
  border: 1px solid rgba(255, 210, 122, .35);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .65), inset 0 0 0 4px #0c0506, inset 0 0 0 5px rgba(255, 210, 122, .18);
  animation: reveal .2s ease;
}
.sp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sp-head b { font-family: var(--display); font-size: 16px; letter-spacing: .04em; color: #ffe2a0; }
.sp-nav { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255, 210, 122, .4); background: transparent; color: #ffe2a0; font-size: 20px; cursor: pointer; line-height: 1; }
.sp-nav:hover:not(:disabled) { background: rgba(255, 210, 122, .15); }
.sp-nav:disabled { opacity: .3; cursor: default; }
.sp-screen { position: relative; height: 22px; margin: 4px 18px 14px; }
.sp-screen::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 14px; border-radius: 50% / 100% 100% 0 0;
  border-top: 4px solid #dfeaff; box-shadow: 0 -6px 16px rgba(200, 225, 255, .45);
}
.sp-screen span { position: absolute; left: 0; right: 0; top: 8px; text-align: center; font-size: 9.5px; letter-spacing: .5em; color: rgba(220, 235, 255, .7); }
.sp-hall { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 6px; }
.sp-rows { display: grid; grid-auto-rows: 34px; grid-template-rows: 18px; gap: 5px; font-size: 10px; color: #8d7a72; align-items: center; text-align: center; }
.sp-week, .sp-seats { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.sp-week { height: 18px; font-size: 11px; color: #9c8a83; text-align: center; margin-bottom: 5px; }
.sp-week span:nth-child(n+6) { color: #ff8a9a; }
.seat {
  position: relative; height: 34px; border: 0; padding: 0 0 4px; cursor: pointer; color: #fff; font: inherit; font-size: 12.5px; font-weight: 600;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, #c21d35, #861022);
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .18);
  transition: transform .1s, background .12s;
}
.seat::before, .seat::after { content: ""; position: absolute; bottom: 0; width: 4px; height: 14px; border-radius: 2px; background: #5d0a17; }
.seat::before { left: -2px; }
.seat::after { right: -2px; }
.seat:hover:not(:disabled) { transform: translateY(-2px); background: linear-gradient(180deg, #e0304a, #9c1428); }
.seat:focus-visible { outline: 2px solid #ffd27a; outline-offset: 2px; }
.seat.today { box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .32), 0 0 0 2px #ffd27a; }
.seat.on { background: linear-gradient(180deg, #ffe08f, #f2b544); color: #2a1205; box-shadow: inset 0 -6px 0 rgba(120, 70, 0, .3), 0 0 14px rgba(255, 200, 90, .7); }
.seat.on::before, .seat.on::after { background: #a86f10; }
.seat:disabled { background: #2b2224; color: #6b5c58; cursor: default; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .3); }
.seat:disabled::before, .seat:disabled::after { background: #1d1517; }
.seat.gap { visibility: hidden; }
.sp-sub { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #9c8a83; margin: 14px 0 6px; }
.sp-times { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.showtime {
  position: relative; height: 30px; border: 1px dashed rgba(255, 210, 122, .45); border-radius: 6px; background: rgba(255, 210, 122, .06);
  color: #ffe2a0; cursor: pointer; font: inherit; font-size: 13px; font-variant-numeric: tabular-nums;
  -webkit-mask: radial-gradient(circle 4px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 4px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 4px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 4px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
}
.showtime:hover { background: rgba(255, 210, 122, .16); }
.showtime.on { background: #ffd27a; color: #2a1205; border-style: solid; font-weight: 700; }
.sp-custom { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; color: #9c8a83; }
.sp-custom > span:first-child { margin-right: auto; }
.sp-tbox { display: inline-flex; align-items: center; border: 1px solid rgba(255, 210, 122, .35); border-radius: 8px; overflow: hidden; }
.sp-tbox button { width: 24px; height: 28px; border: 0; background: transparent; color: #ffd27a; cursor: pointer; font-size: 15px; }
.sp-tbox button:hover { background: rgba(255, 210, 122, .15); }
.sp-tbox b { min-width: 26px; text-align: center; color: #fff; font-variant-numeric: tabular-nums; }
.sp-colon { color: #ffd27a; }
.ticket-btn {
  display: flex; width: 100%; margin-top: 14px; padding: 0; border: 0; cursor: pointer; font: inherit; border-radius: 10px; overflow: hidden;
  background: transparent; filter: drop-shadow(0 6px 14px rgba(211, 42, 63, .35));
  -webkit-mask: radial-gradient(circle 7px at calc(100% - 74px) 0, transparent 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 7px at calc(100% - 74px) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle 7px at calc(100% - 74px) 0, transparent 98%, #000) top / 100% 51% no-repeat, radial-gradient(circle 7px at calc(100% - 74px) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
}
.ticket-btn .tk-main { flex: 1; padding: 12px 14px; background: linear-gradient(90deg, #d32a3f, #b0182c); color: #fff; font-weight: 700; text-align: left; font-size: 14.5px; }
.ticket-btn .tk-stub { width: 74px; display: grid; place-items: center; background: #ffd27a; color: #2a1205; font-family: var(--display); font-weight: 700; font-size: 16px; border-left: 2px dashed rgba(42, 18, 5, .35); }
.ticket-btn:hover:not(:disabled) .tk-main { background: linear-gradient(90deg, #e43a4f, #c01d33); }
.ticket-btn:disabled { cursor: default; filter: none; opacity: .55; }
@media (max-width: 560px) {
  .seat-pop { left: 8px !important; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); top: auto !important; width: auto; max-height: calc(100dvh - 16px); overflow-y: auto; }
}

/* themed scrollbars: a gold strip of film */
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--gold) 70%, transparent) transparent; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  border: 3px solid transparent; background-clip: padding-box; border-radius: 999px;
  background-color: color-mix(in srgb, var(--gold) 55%, transparent);
  background-image: repeating-linear-gradient(180deg, transparent 0 5px, rgba(0, 0, 0, .28) 5px 7px);
}
::-webkit-scrollbar-thumb:hover { background-color: var(--gold); }
::-webkit-scrollbar-thumb:horizontal { background-image: repeating-linear-gradient(90deg, transparent 0 5px, rgba(0, 0, 0, .28) 5px 7px); }
::-webkit-scrollbar-corner { background: transparent; }
.side::-webkit-scrollbar-thumb { background-color: rgba(255, 210, 122, .45); }

/* anime match preview in dialogs */
.dlg-match { display: flex; gap: 12px; align-items: center; text-align: left; margin-top: 12px; padding: 10px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.dlg-match img { width: 46px; height: 66px; object-fit: cover; border-radius: 6px; flex: none; }
.dlg-match b { display: block; color: var(--text); font-size: 15px; }
.dlg-match small { color: var(--muted); font-size: 12.5px; }

/* ---------- v13: calendar, swipe, sharing, reminders, providers ---------- */
@media (max-width: 900px) { .bottombar { grid-template-columns: repeat(6, 1fr); } .bottombar button { font-size: 10.5px; } }

/* calendar */
.cal { display: grid; gap: 12px; }
.cal-bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.cal-month { display: flex; align-items: center; gap: 8px; margin-right: auto; }
.cal-month h2 { font-size: 22px; min-width: 170px; text-align: center; }
.cal-month .sp-nav { border-color: var(--gold-line); color: var(--gold); }
.cal-note { margin: 0; font-size: 13px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-wd { text-align: center; font-size: 12px; color: var(--faint); padding: 2px 0 4px; letter-spacing: .04em; }
.cal-wd.we { color: var(--accent); }
:root[data-theme="dark"] .cal-wd.we { color: #ff8a9a; }
.cal-cell {
  position: relative; min-height: 104px; display: flex; flex-direction: column; gap: 3px; align-items: stretch; text-align: left; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; color: var(--text); font: inherit; overflow: hidden;
  transition: border-color .15s, transform .12s;
}
.cal-cell:hover { border-color: var(--gold-line); transform: translateY(-1px); }
.cal-cell.blank { background: transparent; border-color: transparent; cursor: default; }
.cal-cell.past { opacity: .6; }
.cal-cell.today { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-soft) inset; }
.cal-d { font-family: var(--display); font-weight: 600; font-size: 14px; color: var(--muted); }
.cal-cell.today .cal-d { color: var(--gold); }
.cal-ev { display: flex; align-items: center; gap: 4px; font-size: 11.5px; line-height: 1.3; padding: 2px 5px; border-radius: 5px; white-space: nowrap; overflow: hidden; }
.cal-ev span { overflow: hidden; text-overflow: ellipsis; }
.cal-ev.watch { background: var(--accent); color: #fff; font-weight: 600; }
.cal-ev.ep { background: color-mix(in srgb, var(--s1) 22%, transparent); color: var(--text); }
.cal-ev.film { background: var(--gold-soft); color: var(--text); border: 1px dashed var(--gold-line); }
.cal-more { font-size: 11px; color: var(--faint); padding-left: 4px; }
.cal-agenda { display: none; gap: 10px; }
.ag-day { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: start; }
.ag-date { display: grid; justify-items: center; padding: 6px 0; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; }
.ag-date b { font-family: var(--display); font-size: 20px; line-height: 1.1; }
.ag-date span { font-size: 11px; color: var(--muted); }
.ag-day.today .ag-date { border-color: var(--gold); color: var(--gold); }
.ag-list { display: grid; gap: 6px; }
.cal-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; text-align: left; cursor: pointer; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.cal-row:hover { border-color: var(--gold-line); }
.cal-row.watch { border-left: 4px solid var(--accent); }
.cal-row.ep { border-left: 4px solid var(--s1); }
.cal-row.film { border-left: 4px solid var(--gold); }
.cal-row b { display: block; font-size: 14px; }
.cal-row small { display: block; color: var(--muted); font-size: 12.5px; }
.cr-ico { font-size: 18px; }
.cal-plan { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line-2); display: grid; gap: 6px; }
.cal-plan h4 { font-size: 15px; margin-bottom: 4px; }
.cal-times .showtime { color: var(--text); border-color: var(--gold-line); background: var(--gold-soft); }
.cal-times .showtime.on { background: var(--gold); color: #1d1205; }
:root[data-theme="light"] .cal-times .showtime.on { color: #fff; }
@media (max-width: 760px) {
  .cal-grid { display: none; }
  .cal-agenda { display: grid; }
  .cal-month h2 { min-width: 0; font-size: 19px; }
}

/* swipe together */
.swipe-btn { background: linear-gradient(90deg, #d5487a, #b0204c); border-color: transparent; color: #fff; font-weight: 600; }
.swipe-btn:hover { filter: brightness(1.08); border-color: transparent; }
.cta-btns { margin-left: auto; gap: 8px; }
.cta .btn.cta-alt { background: rgba(255, 255, 255, .1); border-color: rgba(255, 220, 160, .45); color: #ffe7b8; }
@media (max-width: 560px) { .cta-btns { width: 100%; } .cta-btns .btn { flex: 1; } }
.sw-stage { position: relative; display: grid; place-items: center; padding: 4px 0 10px; touch-action: pan-y; }
.sw-card {
  --like: 0; --nope: 0; position: relative; width: min(330px, 100%); border-radius: 18px; overflow: hidden; background: #000; cursor: grab;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 220, 150, .2); transition: transform .25s ease, opacity .25s ease; user-select: none;
}
.sw-card.drag { transition: none; cursor: grabbing; }
.sw-card img, .sw-noimg { width: 100%; aspect-ratio: 2/3; object-fit: cover; display: grid; place-items: center; font-size: 60px; background: var(--surface-2); max-height: 52vh; }
.sw-card.out-like { transform: translateX(140%) rotate(18deg); opacity: 0; }
.sw-card.out-nope { transform: translateX(-140%) rotate(-18deg); opacity: 0; }
.sw-stamp { position: absolute; top: 22px; padding: 4px 14px; border: 4px solid; border-radius: 10px; font-family: var(--display); font-weight: 700; font-size: 28px; letter-spacing: .08em; transform: rotate(-14deg); pointer-events: none; }
.sw-stamp.like { left: 18px; color: #4fe08a; border-color: #4fe08a; opacity: var(--like); }
.sw-stamp.nope { right: 18px; color: #ff6b7d; border-color: #ff6b7d; opacity: var(--nope); transform: rotate(14deg); }
.sw-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 16px 14px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .92) 45%); }
.sw-info h3 { font-size: 21px; }
.sw-info small { color: #e7d9c7; font-size: 12.5px; }
.sw-info .why { margin-top: 4px; }
.sw-info p { margin: 6px 0 0; font-size: 13px; color: #d8cabc; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sw-actions { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 4px; }
.sw-btn { width: 62px; height: 62px; border-radius: 50%; border: 2px solid; background: var(--surface); font-size: 26px; cursor: pointer; display: grid; place-items: center; transition: transform .12s, background .12s; }
.sw-btn:hover:not(:disabled) { transform: scale(1.08); }
.sw-btn.nope { color: #ff6b7d; border-color: #ff6b7d; }
.sw-btn.like { color: #ff4d8d; border-color: #ff4d8d; }
.sw-btn.like:hover { background: rgba(255, 77, 141, .12); }
.sw-btn.undo { width: 44px; height: 44px; font-size: 18px; color: var(--gold); border-color: var(--gold-line); }
.sw-btn:disabled { opacity: .35; cursor: default; transform: none; }
.sw-hint { text-align: center; font-size: 12px; margin: 10px 0 0; }
#swipe { position: relative; }
.match-pop { position: absolute; inset: -24px -28px; z-index: 5; display: grid; place-items: center; background: rgba(10, 4, 8, .82); backdrop-filter: blur(4px); border-radius: 18px; animation: fade .2s; }
.match-card { text-align: center; display: grid; gap: 10px; justify-items: center; padding: 20px; animation: reveal .35s cubic-bezier(.2, .9, .3, 1.3); color: #fff; }
.match-card h2 { font-size: 40px; background: linear-gradient(90deg, #ffd27a, #ff6b9d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.match-card img { width: 150px; border-radius: 12px; box-shadow: 0 0 30px rgba(255, 110, 160, .45); }
.match-burst { font-size: 54px; animation: bob 1.2s ease-in-out infinite; }

/* sharing */
.btn.line { background: #06c755; border-color: #06c755; color: #fff; font-weight: 600; }
.btn.line:hover { background: #05b14c; }
.line-i { width: 16px; height: 16px; }
.share-row { gap: 6px; }

/* reminders bar */
#remind { position: fixed; z-index: 45; top: 74px; left: calc(var(--side-w) + (100vw - var(--side-w)) / 2); transform: translateX(-50%); display: grid; gap: 6px; width: min(520px, calc(100vw - var(--side-w) - 24px)); }
@media (max-width: 900px) { #remind { left: 50%; top: 120px; width: calc(100vw - 20px); } }
.rm-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--gold); box-shadow: var(--shadow), 0 0 0 4px var(--gold-soft); animation: reveal .3s ease; }
.rm-ico { font-size: 20px; }
.rm-text { flex: 1; min-width: 0; text-align: left; border: 0; background: none; color: var(--text); cursor: pointer; font: inherit; padding: 0; }
.rm-text b { display: block; font-size: 14px; }
.rm-text small { color: var(--muted); font-size: 12.5px; }
.rm-x { border: 0; background: none; color: var(--faint); font-size: 20px; cursor: pointer; line-height: 1; }

/* streaming providers: logo + name, clickable */
.providers .prov { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text) !important; text-decoration: none; font-size: 13px; }
.providers a.prov:hover { border-color: var(--gold); }
.providers .prov img { width: 32px; height: 32px; border-radius: 8px; }

/* card actions pinned to the bottom of the card */
.card-body { align-self: stretch; display: flex; flex-direction: column; gap: 5px; }
.card-body > .card-actions { margin-top: auto; padding-top: 4px; }

/* compact "also in another list" marker on cards (full text on hover) */
.ref-mini { display: inline-flex; align-items: center; gap: 3px; color: var(--faint); font-size: 12px; cursor: help; }
.ref-mini svg.i { width: 12px; height: 12px; }
.ref-mini.linked { color: var(--gold); }
.ref-mini:hover { color: var(--text); }


/* dashboard: up next */
.up-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.up-row .poster { width: 34px; flex: none; border-radius: 5px; font-size: 0; }
.up-rank { font-family: var(--display); font-weight: 700; color: var(--gold); min-width: 24px; }
.see-all { margin-top: 8px; justify-self: start; }

/* ---------- v14: account controls top-right, activity in the sidebar, even dashboard boxes ---------- */
@media (min-width: 901px) {
  .top-actions { display: flex; align-items: center; gap: 6px; order: 5; margin-left: auto; }
  .top-actions .mob { display: none; }
  .top-actions .icon-btn { width: 38px; height: 38px; font-size: 12.5px; font-weight: 600; }
  .topbar .ticker { display: none; }
}
@media (max-width: 900px) { .top-actions .desk { display: none; } }
.top-me { display: flex; align-items: center; padding: 3px 6px 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; }
.top-me:hover { border-color: var(--gold-line); }
.top-me .avatar { width: 30px; height: 30px; border-color: var(--surface); }
.side-feed { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .1); }
.sf-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.sf-all { margin-left: auto; border: 0; background: none; color: inherit; opacity: .75; cursor: pointer; font: inherit; font-size: 12px; padding: 0; }
.sf-all:hover { opacity: 1; text-decoration: underline; }
.side-feed ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.side-feed li { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.4; }
.side-feed li[data-act] { cursor: pointer; }
.side-feed li[data-act]:hover .sf-text { text-decoration: underline; }
.side-feed li .avatar { width: 24px; height: 24px; font-size: 10.5px; margin: 0; border: 0; }
.side-feed li > span { min-width: 0; display: grid; }
.sf-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.side-feed time { font-size: 11px; opacity: .6; }
/* boxes in the same row share one height */
.grid2, .grid3 { align-items: stretch; }
.grid2 > .panel-s, .grid3 > .panel-s { display: flex; flex-direction: column; }
@media (max-height: 960px) { .side-feed li:nth-child(3) { display: none; } }
@media (max-height: 820px) { .side-feed li:nth-child(2) { display: none; } }
/* language switch: TH | EN, current one highlighted */
.lang-pill { display: inline-flex; height: 38px; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.lang-pill button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 0 10px; border-radius: 999px; cursor: pointer; }
.lang-pill button:hover:not(.on) { color: var(--text); }
.lang-pill button.on { background: var(--gold); color: #1d1205; cursor: default; }
/* Now Showing: long titles must never widen the box (showed up at 80% zoom when "up next" rows fit) */
.ns, .ns-body, .ns-stage, #ns-next { min-width: 0; }
.ns-body, .ns-list { grid-template-columns: minmax(0, 1fr); }
.ns-row .grow { min-width: 0; }
.ns-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail { overflow-x: hidden; }

/* sign-in / setup header wraps on narrow phones instead of widening the panel */
.screen-top { flex-wrap: wrap; }
.center-wrap > .panel { min-width: 0; }

/* ---------- dashboard: one header style, a tidy grid for "continue watching" ---------- */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sec-head h3 { margin: 0; font-size: 19px; }
.sec-head h3 .faint { font-size: 14px; font-weight: 400; font-family: var(--font); margin-left: 4px; }
.sec-link { border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; padding: 2px 0; white-space: nowrap; }
.sec-link:hover { color: var(--gold); }
.cw-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cw-grid .mini { width: auto; }
@media (max-width: 560px) { .cw-grid { grid-template-columns: minmax(0, 1fr); } }
.up-row .poster { width: 28px; }
.up-row .date-pill { min-width: 42px; text-align: center; }

/* ---------- list tabs: filter, search, page size, pagination ---------- */
.lv-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.lv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lv-chips .n { opacity: .6; font-weight: 400; margin-left: 2px; }
.lv-search { position: relative; flex: 1 1 200px; max-width: 320px; }
.lv-search svg.i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.lv-search input { width: 100%; padding: 7px 10px 7px 34px; font-size: 14px; }
.lv-size { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.lv-size .faint { font-size: 12.5px; padding: 0 6px 0 4px; }
.lv-size button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; padding: 4px 9px; border-radius: 7px; cursor: pointer; }
.lv-size button:hover:not(.on) { color: var(--text); }
.lv-size button.on { background: var(--gold); color: #1d1205; font-weight: 600; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 20px; }
.pager.single { justify-content: flex-end; margin-top: 12px; }
.pager .pg { min-width: 36px; height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.pager .pg:hover:not(:disabled):not(.on) { border-color: var(--gold-line); }
.pager .pg.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; cursor: default; }
.pager .pg:disabled { opacity: .35; cursor: default; }
.pg-gap { color: var(--faint); padding: 0 2px; }
.lv-info { font-size: 13px; margin-left: 8px; }
@media (max-width: 640px) { .lv-size { margin-left: 0; } .lv-search { max-width: none; } }
.lv-chips .btn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.date-pill.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); font-weight: 600; }

/* dashboard pairs: left and right sections share rows so their tops line up */
.dash-pairs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; align-items: start; }
.pair-cell:empty { display: none; }
@media (min-width: 1100px) {
  .dash-pairs { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 28px; }
  .pair-cell:empty { display: block; }
}

/* ---------- large screens: use the width, grow the Now Showing rail a little ---------- */
@media (min-width: 1500px) {
  .page-wrap { grid-template-columns: minmax(0, 1fr) clamp(360px, 20vw, 440px); }
  .page-wrap .page { max-width: none; }
}
@media (min-width: 1900px) { .page { padding-left: 40px; } }

/* detail popup: solid danger button for removing a title */
.btn.danger-solid { background: color-mix(in srgb, var(--accent) 14%, transparent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent); }
.btn.danger-solid:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
:root[data-theme="dark"] .btn.danger-solid { color: #ff8a9a; }
:root[data-theme="dark"] .btn.danger-solid:hover { color: #fff; }

/* ---------- a friend's review card mirrors mine ---------- */
.rev.friend { display: flex; flex-direction: column; gap: 10px; }
.rev.friend .who { margin-bottom: 0; }
.rate-box.ro { pointer-events: none; }
.rate-box.ro .rate-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.rate-box.ro.unset .pop-range { opacity: .4; }
.pop-range.ro .kernel { cursor: default; }
.cmp { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.cmp.same { background: var(--gold-soft); color: var(--gold); }
.cmp.up { background: color-mix(in srgb, #3fbf7f 16%, transparent); color: #3fbf7f; }
.cmp.down { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
:root[data-theme="dark"] .cmp.down { color: #ff8a9a; }
.rev-body { margin: 0; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border-left: 3px solid var(--gold-line); }
.ask-rev { display: grid; gap: 8px; padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: 10px; }
.ask-rev p { margin: 0; font-size: 13px; }

/* ---------- ratings: IMDb leads, RT next, TMDb as a minor reference ---------- */
.rating.lead .val { font-size: 26px; }
.rating.lead .val small { font-size: 13px; color: var(--faint); font-weight: 500; margin-left: 2px; }
.rating.imdb { border-color: #f5c518aa; }
.rating.imdb .src { color: #f5c518; font-weight: 700; }
.rating.rt .src { color: #fa5a3c; font-weight: 700; }
.rating.pm .val { font-size: 15px; }
.rt-ico { margin-right: 4px; }
.rating.minor { opacity: .8; }
.rating.minor .val { font-size: 17px; }
.chip.imdb { background: #f5c518; border-color: #f5c518; color: #1a1400; font-weight: 700; }
/* detail side: breathing room between the link row and the share row */
.d-side-info > .row { row-gap: 6px; }
.d-side-info > .row + .row { margin-top: 10px; }
.ratings .rating.lead, .ratings .rating.rt:not(.pm) { grid-column: 1 / -1; }
.rating.rt:not(.pm) .val { font-size: 22px; }

/* ---------- Discord settings ---------- */
.discord-set > span { display: inline-flex; align-items: center; gap: 6px; }
.discord-set > span svg.i { color: #5865f2; width: 18px; height: 18px; }
.discord-evs { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 4px; }
.discord-evs .check { margin: 0; font-size: 13px; }
.discord-evs .check { padding: 4px 10px; gap: 6px; border-radius: 8px; }
.discord-evs .check input { width: 15px; height: 15px; }
.discord-remind { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: 13.5px; }
.discord-remind select { width: auto; padding: 5px 8px; }

/* ---------- notification bell ---------- */
.top-actions { position: relative; }
.icon-btn.bell { position: relative; }
.icon-btn.bell.has svg.i { color: var(--gold); animation: bellNudge 4s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes bellNudge { 0%, 88%, 100% { transform: rotate(0); } 91% { transform: rotate(14deg); } 94% { transform: rotate(-12deg); } 97% { transform: rotate(6deg); } }
@media (prefers-reduced-motion: reduce) { .icon-btn.bell.has svg.i { animation: none; } }
.bell-n { position: absolute; top: -5px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 19px; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.bell-pop { position: absolute; top: calc(100% + 10px); right: 0; z-index: 60; width: min(380px, calc(100vw - 20px)); max-height: min(70vh, 560px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--gold-line); border-radius: 14px; box-shadow: var(--shadow), 0 18px 40px rgba(0, 0, 0, .45); animation: reveal .18s ease; text-align: left; }
@media (max-width: 900px) { .bell-pop { position: fixed; top: 62px; left: 10px; right: 10px; width: auto; } }
.bp-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.bp-all, .bp-more { border: 0; background: none; color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; padding: 0; }
.bp-all:hover, .bp-more:hover { color: var(--gold); }
.bp-body { overflow-y: auto; padding: 4px 8px 10px; }
.bp-sec h5 { margin: 10px 6px 6px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); font-family: var(--font); display: flex; align-items: center; gap: 6px; }
.bp-n { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 11px; letter-spacing: 0; }
.bp-list { display: grid; gap: 2px; }
.bp-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 10px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.bp-item:hover { background: var(--surface-2); }
.bp-item .poster { width: 30px; flex: none; border-radius: 5px; font-size: 0; }
.bp-item b { display: block; font-size: 14px; font-weight: 600; }
.bp-item small { display: block; font-size: 12px; color: var(--muted); }
.bp-item .avatar { width: 28px; height: 28px; margin: 0; border: 0; font-size: 11px; flex: none; }
.bp-go { font-size: 12.5px; color: var(--accent); font-weight: 600; white-space: nowrap; }
:root[data-theme="dark"] .bp-go { color: #ff8a9a; }
.bp-act { font-size: 13.5px; }
.bp-ico { font-size: 20px; }
.bp-text { border: 0; background: none; color: inherit; font: inherit; text-align: left; padding: 0; cursor: pointer; min-width: 0; }
.bp-x { border: 0; background: none; color: var(--faint); font-size: 20px; cursor: pointer; line-height: 1; }
.bp-empty { margin: 4px 8px; font-size: 13px; color: var(--muted); }
.bp-more { margin: 6px 8px 0; }
.bp-act, .bp-act * { display: inline; font-size: 13.5px; }
.bp-act b { font-weight: 700; }
.bp-item .bp-act b, .bp-item .bp-act span { display: inline; font-size: 13.5px; }
.ratings .rating.rt-link { grid-column: 1 / -1; }
.rating.rt-link .val { font-size: 15px; }

/* ---------- list views: poster grid and compact list ---------- */
.lv-right { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.lv-right .lv-size { margin-left: 0; }
.lv-view button { padding: 4px 7px; display: inline-flex; }
.lv-view svg.i { width: 17px; height: 17px; }
.grid-list.v-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 16px 14px; }
.gcard { position: relative; display: flex; flex-direction: column; gap: 4px; cursor: pointer; min-width: 0; }
.gc-poster { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); transition: transform .15s, border-color .15s, box-shadow .15s; }
.gcard:hover .gc-poster { transform: translateY(-3px); border-color: var(--gold-line); box-shadow: var(--shadow); }
.gc-poster .poster { width: 100%; border-radius: 0; display: block; }
.gc-rank, .gc-score, .gc-prog, .gc-sched { position: absolute; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 7px; backdrop-filter: blur(4px); }
.gc-rank { left: 6px; top: 6px; background: var(--gold); color: #1d1205; }
.gc-score { right: 6px; top: 6px; background: rgba(0, 0, 0, .7); color: var(--gold); }
.gc-prog { left: 6px; bottom: 6px; background: rgba(0, 0, 0, .72); color: #fff; }
.gc-sched { right: 6px; bottom: 6px; background: rgba(0, 0, 0, .72); }
.gc-title { font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; }
.gc-meta { color: var(--muted); font-size: 12px; }
.gc-act .btn { width: 100%; justify-content: center; }
.gcard.selecting .gc-act { display: none; }
.grid-list.v-list { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.lrow { position: relative; display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; min-width: 0; }
.lrow:hover { border-color: var(--gold-line); }
.lrow .poster { width: 32px; flex: none; border-radius: 5px; font-size: 0; }
.lrow .date-pill { min-width: 40px; }
.lr-main { flex: 1; min-width: 0; }
.lr-main b { display: block; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-main small { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-scores { display: flex; gap: 4px; flex: none; }
.lr-actions { display: flex; gap: 6px; flex: none; align-items: center; }
.lrow.selecting .lr-actions { display: none; }
@media (max-width: 640px) { .lr-scores { display: none; } .lr-actions .btn:not(.primary):not(.icon-only) { display: none; } }
.gcard.selected .gc-poster, .lrow.selected { outline: 2px solid var(--accent); outline-offset: 2px; }

.gcard .sel-box { left: 8px; top: 8px; }
.lrow .sel-box { position: static; flex: none; }
@media (max-width: 640px) { .lrow > .chip.pending { display: none; } .lrow { gap: 10px; padding: 8px 10px; } }

/* poster grid: every tile the same height so buttons line up */
.grid-list.v-grid { align-items: stretch; }
.gcard { height: 100%; }
.gc-poster .poster { aspect-ratio: 2 / 3; object-fit: cover; height: auto; }
.gc-title { min-height: calc(14px * 1.3 * 2); }
.gc-meta { min-height: 1.3em; }
.gc-act { margin-top: auto; padding-top: 4px; }

/* keep room for the scrollbar on every page, so switching tabs or filters never shifts the layout sideways */
html { scrollbar-gutter: stable; }

/* Now Showing rail sticks exactly under the top bar, so it sits in the same place on every page */
@media (min-width: 1500px) { .rail { top: var(--topbar-h, 72px); max-height: calc(100dvh - var(--topbar-h, 72px)); } }
