:root {
  --bg: #121016;
  --bg-2: #1a1720;
  --panel: #1e1b25;
  --line: #2e2a37;
  --text: #f3eee6;
  --muted: #a39cab;
  --accent: #ffb547;
  --like: #4ade98;
  --dis: #ff6363;
  --mid: #ffb547;
  --map-dot: rgba(255, 255, 255, .13);
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, .6);
  --radius: 18px;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f1e9; --bg-2: #efe8dc; --panel: #fffaf2; --line: #e2d9ca; --text: #1d1820; --muted: #6f6675;
    --accent: #d9831a; --like: #1f9d62; --dis: #d63e3e; --mid: #d9831a; --map-dot: rgba(0, 0, 0, .12);
    --shadow: 0 24px 60px -24px rgba(60, 40, 20, .35);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--sans);
  min-height: 100vh;
  background-image: radial-gradient(1200px 500px at 70% -200px, color-mix(in srgb, var(--accent) 10%, transparent), transparent);
  background-repeat: no-repeat;
}
body.no-scroll { overflow: hidden; }
a { color: var(--accent); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
code { font-size: .9em; background: var(--bg-2); padding: 1px 5px; border-radius: 5px; }
kbd { font: 11px var(--sans); opacity: .55; border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; margin-left: 8px; }
@media (hover: none) { kbd { display: none; } }

/* ------------------------------------------------------------ header */
.top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px max(16px, calc((100vw - 1040px) / 2)); background: var(--bg); border-bottom: 1px solid var(--line);
}
.brand { font: 600 20px var(--display); color: var(--text); text-decoration: none; white-space: nowrap; }
.brand em { font-weight: 500; }
.tabs { display: flex; gap: 2px; overflow-x: auto; }
.tabs a {
  color: var(--muted); text-decoration: none; padding: 7px 12px; border-radius: 999px; font-weight: 500; font-size: 14px; white-space: nowrap;
}
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--text); background: var(--bg-2); }
.tabs .gear { font-size: 18px; line-height: 1; padding: 6px 12px 8px; }
.count { color: var(--accent); font-size: 12px; margin-left: 2px; }
@media (max-width: 560px) {
  .top { flex-direction: column; align-items: stretch; gap: 6px; padding: 10px 16px 8px; }
  .brand { font-size: 18px; }
  .tabs a { padding: 6px 10px; font-size: 13px; }
}

main { max-width: 1040px; margin: 0 auto; padding: 28px 16px 120px; }
.loading, .empty { text-align: center; padding: 80px 0; color: var(--muted); }
.empty h2 { font: 600 26px var(--display); color: var(--text); }

/* ------------------------------------------------------------ posters */
.poster {
  position: relative; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; flex: none;
  background: linear-gradient(155deg, hsl(var(--h) 45% 32%), hsl(calc(var(--h) + 50) 50% 16%));
}
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: fade .35s ease; }
.poster-fallback {
  position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 12%; font: 600 1.1em/1.15 var(--display);
  color: rgba(255, 255, 255, .88); overflow: hidden;
}
.poster.has-img .poster-fallback { display: none; }
.poster.big { width: 100%; box-shadow: var(--shadow); font-size: 22px; }
.poster.mid { width: 92px; font-size: 11px; }
.poster.small { width: 56px; border-radius: 8px; font-size: 8px; }
.poster.tiny { width: 26px; border-radius: 4px; font-size: 0; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ------------------------------------------------------------ the card */
.card {
  display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 40px; align-items: center;
  animation: rise .2s ease-out;
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.card.try .eyebrow { color: var(--like); }
.eyebrow { margin: 0 0 4px; font: italic 500 22px var(--display); color: var(--accent); }
.title { margin: 0 0 10px; font: 600 clamp(32px, 5.5vw, 56px)/1.04 var(--display); letter-spacing: -.01em; text-wrap: balance; }
.title .q { color: var(--accent); }
.meta { margin: 0 0 12px; color: var(--muted); }
.card .meta { font-size: 17px; margin-bottom: 30px; }
.meta .dot { opacity: .5; padding: 0 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.chip { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); }
.reason { margin: 0 0 26px; color: var(--muted); font-size: 14px; max-width: 52ch; }
.reason b { color: var(--text); font-weight: 600; }
.tag {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 6px; margin-right: 4px; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent);
}
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; margin: -14px 0 18px; max-width: 520px; }
.facts div { min-width: 0; }
.facts dt { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 1px 0 0; font-weight: 500; }
.score { font-weight: 600; color: hsl(calc((var(--p) - 40) * 2.2) 70% 62%); }
.plot.loading { opacity: .5; }
.card.try .actions { margin-top: 6px; }
.plot { color: var(--muted); max-width: 60ch; margin: 0 0 14px; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.links { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 24px; font-size: 14px; }
.links a { text-decoration: none; }
.links a:hover { text-decoration: underline; }
.links.small { font-size: 12px; gap: 10px; margin: 6px 0 10px; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.actions.wrap { gap: 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 54px; padding: 0 30px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--panel); font-weight: 600; font-size: 17px;
  cursor: pointer; transition: transform .12s, background .15s, border-color .15s;
}
.btn:hover { border-color: color-mix(in srgb, var(--text) 30%, var(--line)); }
.btn:active { transform: scale(.97); }
.btn.yes { background: var(--accent); color: #1b1307; border-color: transparent; }
.btn.yes:hover { background: color-mix(in srgb, var(--accent) 88%, white); }
.ask .btn { min-width: 140px; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn.danger, .link.danger { color: var(--dis); }
.link { background: none; border: 0; padding: 10px 0 0; color: var(--muted); cursor: pointer; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--text); }

@media (max-width: 720px) {
  .card { grid-template-columns: 1fr; gap: 20px; text-align: center; }
  .card-poster { width: min(220px, 52vw, 24vh); margin: 0 auto; }
  .card .chips, .card .actions, .card .links { justify-content: center; }
  .facts { text-align: left; margin-left: auto; margin-right: auto; }
  .reason, .plot { margin-left: auto; margin-right: auto; }
  .card .actions .btn { flex: 1; min-width: 0; }
  .eyebrow { font-size: 19px; }
}

/* ------------------------------------------------------------ sheet / ladder */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(8, 6, 10, .72); animation: fade .2s; }
.sheet-panel {
  position: relative; width: min(620px, 100%); max-height: min(88vh, 900px); display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0; box-shadow: var(--shadow);
  animation: up .28s cubic-bezier(.2, .8, .2, 1);
}
@media (min-width: 720px) { .sheet { align-items: center; } .sheet-panel { border-radius: 22px; border-bottom: 1px solid var(--line); } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

.ladder-head { display: flex; gap: 14px; align-items: flex-start; padding: 18px 18px 14px; border-bottom: 1px solid var(--line); }
.ladder-head h2 { margin: 0 0 4px; font: 600 21px/1.2 var(--display); }
.ladder-head h2 em { color: var(--accent); }
.ladder-head p { margin: 0; font-size: 13px; }
.icon-btn { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; padding: 4px 6px; }
.ladder-scroll { overflow-y: auto; padding: 8px 18px 18px; overscroll-behavior: contain; }
.ladder-foot { padding: 4px 18px 14px; border-top: 1px solid var(--line); }

.ladder, .pladder, .band ol { list-style: none; margin: 0; padding: 0; }
.ladder, .pladder { position: relative; padding-left: 14px; }
.ladder::before, .pladder::before { /* the like-gradient rail */
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 4px; border-radius: 4px;
  background: linear-gradient(var(--like), var(--mid) 50%, var(--dis));
}
.zone-label { font: 600 12px var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 8px 0 6px; }
.zone-label.up { color: var(--like); }
.zone-label.down { color: var(--dis); padding: 6px 0 2px; }
.band {
  margin: 8px 0; padding: 0 8px 6px; border-radius: 12px;
  background: color-mix(in srgb, var(--mid) 9%, transparent); border: 1px dashed color-mix(in srgb, var(--mid) 45%, transparent);
}
.band-label { font: italic 500 15px var(--display); color: var(--mid); padding: 4px 2px 2px; text-align: center; }

.row, .prow {
  position: relative; display: flex; align-items: center; gap: 10px; padding: 6px 8px; min-height: 42px; border-radius: 9px; cursor: pointer;
}
.row:hover, .prow:hover { background: var(--bg-2); }
.row-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.row-year { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.row-genres { color: var(--muted); font-size: 12px; width: 150px; text-align: right; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 560px) { .row-genres { display: none; } }
.rank { width: 22px; color: var(--muted); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }

/* insertion indicator */
.row::before, .row::after { content: ''; position: absolute; left: -6px; right: 0; height: 3px; border-radius: 3px; background: var(--accent); opacity: 0; transition: opacity .1s; pointer-events: none; }
.row::before { top: -2px; }
.row::after { bottom: -2px; }
.row.ins-before::before, .row.ins-after::after { opacity: 1; box-shadow: 0 0 12px var(--accent); }
.row.ins-before, .row.ins-after { background: transparent; }

.slot {
  display: flex; align-items: center; justify-content: center; min-height: 52px; margin: 4px 0; border-radius: 10px; cursor: pointer;
  border: 1.5px dashed var(--line); color: var(--muted); font-weight: 500; transition: all .12s;
}
.slot.ins-in { border-color: var(--accent); color: var(--text); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.chosen { animation: pulse .14s ease; }
@keyframes pulse { 50% { transform: scale(1.02); } }

/* ------------------------------------------------------------ toast */
.toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  display: flex; gap: 16px; align-items: center; max-width: calc(100vw - 32px);
  background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow);
  animation: up .25s ease;
}
.toast .link { padding: 0; color: var(--bg); font-weight: 600; }

/* ------------------------------------------------------------ pages */
.page-head h1 { margin: 0 0 4px; font: 600 34px var(--display); }
.page-head p { margin: 0 0 22px; }
.c-like { color: var(--like); } .c-mid { color: var(--mid); } .c-dis { color: var(--dis); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.panel h2 { margin: 0 0 4px; font: 600 21px var(--display); }
.panel > .muted { margin-top: 0; }
.prose p { color: var(--muted); max-width: 70ch; }
.prose p b { color: var(--text); }
.prose h2:not(:first-child) { margin-top: 22px; }

.add-box { position: relative; margin-bottom: 18px; }
.add-box input {
  width: 100%; padding: 14px 16px; font: inherit; font-size: 16px; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; outline: none;
}
.add-box input:focus { border-color: var(--accent); }
.search-results { list-style: none; margin: 6px 0 0; padding: 0; }
.search-results li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; cursor: pointer; }
.search-results li:hover { background: var(--bg-2); }
.pill { font-size: 12px; font-weight: 600; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); padding: 2px 10px; border-radius: 999px; }

.map-wrap { position: relative; margin-top: 12px; }
#map { display: block; width: 100%; border-radius: 12px; background: var(--bg-2); touch-action: none; }
.map-tip {
  position: absolute; transform: translate(-50%, -140%); pointer-events: none; white-space: nowrap;
  background: var(--text); color: var(--bg); font-size: 12px; padding: 4px 8px; border-radius: 6px;
}
.map-tip .muted { color: inherit; opacity: .6; }

.clusters { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }
.cluster { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--bg-2); }
.cluster-head { display: flex; gap: 10px; align-items: center; }
.cluster h3 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; }
.cnum {
  flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600;
  border: 1.5px dashed hsl(var(--h) 80% 70%); color: hsl(var(--h) 80% 70%);
}
.cluster-films { margin: 0; font-size: 13px; color: var(--muted); flex: 1; }
.cluster .btn { align-self: flex-start; }

.next-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.next-item { display: flex; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.next-body h3 { margin: 0 0 2px; font: 600 19px var(--display); }
.next-body .meta { margin: 0; }
.next-body p { margin: 0; }
.actions.small { gap: 8px; }

/* phones: on "Watch it tonight?" keep the decision buttons in reach while reading */
@media (max-width: 720px) {
  .card.try .plot { -webkit-line-clamp: 4; }
  .card.try .actions {
    position: sticky; bottom: 0; z-index: 2; margin: 0 -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: linear-gradient(transparent, var(--bg) 22%);
  }
}

/* ------------------------------------------------------------ calibration */
.calib-head { max-width: 640px; margin: 0 auto 22px; text-align: center; }
.calib-head h1 { margin: 0 0 8px; font: 600 clamp(26px, 4.5vw, 40px)/1.1 var(--display); text-wrap: balance; }
.calib-head h1 em { color: var(--accent); }
.calib-head p { margin: 0; font-size: 14px; }
.calib-grid {
  list-style: none; margin: 0; padding: 0 0 110px; display: grid; gap: 14px 12px;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
}
@media (max-width: 560px) { .calib-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; } }
.calib-tile {
  position: relative; display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 0; text-align: left;
  background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.poster.grid { width: 100%; border-radius: 10px; font-size: 13px; outline: 3px solid transparent; outline-offset: 2px; transition: outline-color .12s, transform .12s; }
.calib-tile:hover .poster.grid { transform: translateY(-2px); }
.calib-tile.on .poster.grid { outline-color: var(--accent); }
.calib-check {
  position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, .55); color: rgba(255, 255, 255, .55); font-size: 15px; transition: all .12s;
}
.calib-tile.on .calib-check { background: var(--accent); color: #1b1307; transform: scale(1.08); }
.calib-title { font-size: 13px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.calib-year { font-size: 12px; color: var(--muted); margin-top: -3px; }
.calib-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line);
}
.calib-bar .btn { min-height: 48px; font-size: 15px; }
.calib-bar .btn:disabled { opacity: .45; cursor: default; }
@media (max-width: 560px) {
  .calib-bar { flex-wrap: nowrap; gap: 8px; }
  .calib-bar .btn { flex: 1 1 0; padding: 0 10px; font-size: 14px; line-height: 1.2; }
}
.fav-list { list-style: none; margin: 10px 0 0; padding: 0; }

/* ------------------------------------------------------------ tier list */
:root { --t-loved: #4ade98; --t-good: #a6dc6a; --t-mid: #ffb547; --t-bad: #ff8a4c; --t-hated: #ff6363; }
@media (prefers-color-scheme: light) { :root { --t-loved: #1f9d62; --t-good: #6c9e2a; --t-mid: #d9831a; --t-bad: #d9622a; --t-hated: #d63e3e; } }
.c-loved { color: var(--t-loved); } .c-good { color: var(--t-good); } .c-mid { color: var(--t-mid); } .c-bad { color: var(--t-bad); } .c-hated { color: var(--t-hated); }
.tierlist { display: flex; flex-direction: column; gap: 6px; }
.tier {
  --tc: var(--t-mid);
  display: grid; grid-template-columns: 92px 1fr; min-height: 64px; border-radius: 12px; overflow: hidden; cursor: pointer;
  background: color-mix(in srgb, var(--tc) 7%, var(--bg-2)); border: 1px solid color-mix(in srgb, var(--tc) 22%, transparent);
  transition: border-color .1s, background .1s;
}
.tier-loved { --tc: var(--t-loved); } .tier-good { --tc: var(--t-good); } .tier-mid { --tc: var(--t-mid); }
.tier-bad { --tc: var(--t-bad); } .tier-hated { --tc: var(--t-hated); }
.tier-label {
  display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 8px 10px;
  background: color-mix(in srgb, var(--tc) 85%, black); color: #160f08; font-weight: 700; font-size: 14px; line-height: 1.15;
}
.tier-label small { font-weight: 600; opacity: .65; font-size: 11px; }
.tier-films { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; align-content: flex-start; align-items: flex-start; }
.tl-film { position: relative; padding: 0; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.poster.tl { width: 40px; border-radius: 5px; font-size: 0; }
.poster.tlbig { width: 62px; border-radius: 7px; font-size: 8px; }
.tl-cap { width: 62px; font-size: 10.5px; line-height: 1.2; color: var(--muted); text-align: left; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tl-add {
  align-self: center; width: 40px; aspect-ratio: 2 / 3; border-radius: 5px; display: grid; place-items: center;
  border: 1.5px dashed color-mix(in srgb, var(--tc) 55%, transparent); color: var(--tc); font-size: 18px; opacity: .55;
}
.tier.ins-tier { border-color: var(--tc); background: color-mix(in srgb, var(--tc) 16%, var(--bg-2)); }
.tier.ins-tier .tl-add { opacity: 1; border-style: solid; }
.tl-film::before { /* "insert before this film" marker */
  content: ''; position: absolute; left: -4.5px; top: 0; bottom: 0; width: 3px; border-radius: 3px; background: var(--accent);
  box-shadow: 0 0 10px var(--accent); opacity: 0; transition: opacity .08s; pointer-events: none;
}
.tl-film.ins-before::before { opacity: 1; }
.tl-film:hover .poster { filter: brightness(1.1); }
@media (max-width: 560px) { .tier { grid-template-columns: 74px 1fr; } .tier-label { font-size: 13px; padding: 8px; } }
.panel .tier { cursor: default; }

/* calibration grid: exactly 56 tiles -> 7 × 8 wide, 4 × 14 tablet, 2 × 28 phone */
.calib-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
@media (max-width: 900px) { .calib-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .calib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; } }
.calib-stack { /* series badge: number of films */
  position: absolute; top: 6px; left: 6px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px;
  display: inline-flex; align-items: center; background: rgba(0, 0, 0, .7); color: #fff; font-size: 12px; font-weight: 700;
}

.series-tag { margin: -22px 0 26px; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--accent); }
.card.try .series-tag { margin: -26px 0 30px; }

/* ------------------------------------------------------------ movies / anime switch */
.brand-wrap { display: flex; align-items: center; gap: 14px; min-width: 0; }
.media-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); }
.media-switch button {
  border: 0; background: none; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: var(--muted); cursor: pointer;
}
.media-switch button.on { background: var(--accent); color: #1b1307; }
body[data-media="anime"] { --accent: #ff7ab6; }
@media (prefers-color-scheme: light) { body[data-media="anime"] { --accent: #d63f86; } }
@media (max-width: 560px) { .brand-wrap { justify-content: space-between; } }
.link-btn { color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.calib-import { margin-top: 10px; font-size: 14px; }

/* ------------------------------------------------------------ streaming filter */
.filter-bar { display: flex; justify-content: flex-end; margin: -12px 0 14px; }
.filter-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 600;
}
.filter-pill:hover { color: var(--text); }
.filter-pill.on { color: var(--text); border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 12%, var(--panel)); }
.filter-icon { font-size: 9px; color: var(--accent); }
@media (max-width: 720px) { .filter-bar { justify-content: center; margin-top: -10px; } }

.filter-panel .filter-sheet { padding: 14px 18px; overflow-y: auto; }
.region { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.region select, .key-input {
  font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
}
.key-input { width: 100%; font-size: 15px; }
.key-msg { color: var(--dis); min-height: 1.2em; margin: 8px 0 0; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.svc-toggle {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; cursor: pointer; text-align: left;
  background: var(--bg-2); border: 1.5px solid var(--line); color: var(--text); font-size: 13px; font-weight: 600;
}
.svc-toggle img { width: 28px; height: 28px; border-radius: 7px; flex: none; }
.svc-dot { width: 28px; height: 28px; border-radius: 7px; flex: none; background: hsl(var(--h) 55% 45%); }
.svc-toggle.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--bg-2)); }
.filter-foot { display: flex; gap: 10px; align-items: center; padding-top: 12px; }
.filter-foot .link { padding: 0; margin-left: auto; }

.where { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -6px 0 16px; }
.where-label { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.svc { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); font-size: 12px; font-weight: 600; }
.svc:not(:has(img)) { padding-left: 9px; }
.svc img { width: 20px; height: 20px; border-radius: 50%; }
.svc.mine { border-color: var(--accent); }
@media (max-width: 720px) { .where { justify-content: center; } }
