/* WatchReel. Near-black, white type, the logo's teal. Mobile first. */

:root {
  --bg: #0b0f12;
  --panel: #13191d;
  --panel-2: #1a2226;
  --line: #26302f;
  --ink: #ffffff;
  --ink-2: #b7c3c4;
  --ink-3: #7d8a8c;
  --teal: #3fb8a3;
  --teal-2: #499a89;
  --teal-deep: #074550;
  --danger: #ff6b6b;
  --radius: 12px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; }
body.no-scroll { overflow: hidden; }
h1, h2, h3 { font-family: Poppins, Inter, sans-serif; letter-spacing: -.2px; }
a { color: var(--teal); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.optional { color: var(--ink-3); font-weight: 400; }
.link { color: var(--teal); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.link:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ------------------------------ loading ------------------------------- */
.loading { min-height: 70vh; display: grid; place-items: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--teal); animation: spin .8s linear infinite; display: inline-block; }
.spinner.small { width: 14px; height: 14px; border-width: 2px; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------- buttons ------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); border-radius: 999px; padding: 10px 18px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--teal); border-color: var(--teal); color: #0b0f12; }
.btn-primary:hover { background: #52c8b3; border-color: #52c8b3; }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #0b0f12; }
.btn-danger-ghost { background: transparent; border-color: transparent; color: var(--danger); margin-right: auto; }
.btn-small { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.icon-btn { background: none; border: 0; padding: 6px; border-radius: 8px; color: var(--ink-2); display: grid; place-items: center; }
.icon-btn:hover { color: var(--ink); background: var(--panel-2); }

/* -------------------------------- forms ------------------------------- */
.field { display: grid; gap: 6px; margin: 0 0 14px; border: 0; padding: 0; min-width: 0; }
.label { font-weight: 600; font-size: 14px; padding: 0; }
.hint { color: var(--ink-3); font-size: 13px; }
input[type=text], input[type=email], input[type=password], input[type=search], select {
  width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; color: var(--ink);
}
input:focus, select:focus { outline: 2px solid var(--teal); outline-offset: 0; border-color: transparent; }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 64px; }
.reveal { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--teal); font-size: 13px; font-weight: 600; padding: 6px 8px; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink-2); }
.check input { accent-color: var(--teal); width: 16px; height: 16px; }
.form-error { background: rgba(255, 107, 107, .12); border: 1px solid rgba(255, 107, 107, .4); color: #ffb3b3; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.notice { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--ink-2); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 14px; flex-wrap: wrap; }
.code-input { text-transform: uppercase; letter-spacing: .12em; font-weight: 600; }
.dev-note { background: rgba(243, 201, 105, .1); border: 1px dashed #f3c969; padding: 8px 10px; border-radius: 8px; font-size: 13px; }

/* ------------------------------ auth pages ---------------------------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr; background: radial-gradient(ellipse at top, rgba(63, 184, 163, .16), transparent 55%), var(--bg); }
.auth-art { padding: 40px 20px 10px; text-align: center; }
.auth-mark { width: 96px; height: 96px; filter: drop-shadow(0 10px 30px rgba(63, 184, 163, .35)); }
.auth-name { font: 700 40px/1.1 Poppins, sans-serif; margin: 14px 0 2px; }
.auth-name span { color: var(--teal); font-weight: 500; }
.auth-tag { margin: 0; font: 500 18px Poppins, sans-serif; color: var(--ink-2); }
.auth-points { list-style: none; padding: 0; margin: 22px auto 0; max-width: 420px; text-align: left; display: none; gap: 10px; }
.auth-points li { padding-left: 26px; position: relative; color: var(--ink-2); }
.auth-points li::before { content: ''; position: absolute; left: 4px; top: 7px; width: 10px; height: 10px; border-radius: 3px; background: var(--teal); }
.auth-panel { padding: 16px 16px 30px; display: flex; flex-direction: column; align-items: center; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h2 { margin: 0 0 4px; font-size: 22px; }
.auth-card > .muted, .auth-card form > .muted { margin: 0 0 18px; }
.or-line { text-align: center; color: var(--ink-3); font-size: 13px; margin: 20px 0 12px; display: flex; gap: 10px; align-items: center; }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-choices { display: grid; gap: 8px; }
.auth-switch { text-align: center; font-size: 14px; color: var(--ink-3); margin: 12px 0 0; }
.joining { color: var(--ink-2); margin: 0 0 16px; }
@media (min-width: 900px) {
  .auth { grid-template-columns: 1.1fr 1fr; align-items: center; }
  .auth .site-footer { grid-column: 1 / -1; }
  .auth-art { text-align: left; padding: 60px 40px 60px 8vw; }
  .auth-mark { width: 120px; height: 120px; }
  .auth-name { font-size: 54px; }
  .auth-points { display: grid; margin-left: 0; }
  .auth-panel { padding: 40px 8vw 40px 20px; }
}

/* -------------------------------- header ------------------------------ */
.top { position: sticky; top: 0; z-index: 30; background: rgba(11, 15, 18, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.top-in { max-width: 1280px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand img { width: 36px; height: 36px; }
.brand b { font: 700 20px Poppins, sans-serif; letter-spacing: -.3px; }
.brand b span { font-weight: 500; color: var(--teal); }
.top-search { flex: 1; min-width: 0; display: flex; justify-content: flex-end; }
.top-end { flex: none; }
@media (max-width: 640px) { .brand b { display: none; } }

.avatar-btn { background: none; border: 0; padding: 0; border-radius: 50%; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px; flex: none; }
.avatar-btn .avatar { border: 2px solid var(--teal); }
.hi-btn { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 7px 10px 7px 14px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-weight: 600; font-size: 14px; white-space: nowrap; }
.hi-btn:hover, .hi-btn[aria-expanded=true] { border-color: var(--teal); }
.hi-btn svg { color: var(--ink-3); }
.hi-text { max-width: 9em; overflow: hidden; text-overflow: ellipsis; }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; min-width: 220px; padding: 6px; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); z-index: 40; }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: grid; }
.menu-head span { color: var(--ink-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; background: none; border: 0; }
.menu a:hover, .menu button:hover { background: var(--panel-2); }

/* -------------------------------- search ------------------------------ */
.search { position: relative; width: 100%; max-width: 560px; }
.search-field { position: relative; display: block; }
.search-field svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); opacity: .6; pointer-events: none; }
.search-field input { border-radius: 999px; padding: 10px 16px 10px 40px; }
.results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; max-height: min(70vh, 640px); overflow-y: auto; box-shadow: 0 16px 50px rgba(0, 0, 0, .6); z-index: 40; padding: 6px; }
.results-note { margin: 0; padding: 14px; color: var(--ink-3); }
.result { display: flex; gap: 12px; width: 100%; text-align: left; background: none; border: 0; padding: 8px; border-radius: 10px; align-items: flex-start; }
.result:hover, .result:focus-visible { background: var(--panel-2); }
.result-img { width: 54px; aspect-ratio: 2 / 3; border-radius: 6px; object-fit: cover; flex: none; background: var(--panel-2); }
.result-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.result-text b { font-weight: 600; }
.result-text .muted { font-size: 13px; }
.result-overview { color: var(--ink-2); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.result-add { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; flex: none; align-self: center; color: var(--teal); }
@media (max-width: 640px) {
  .results { position: fixed; left: 8px; right: 8px; top: calc(62px + env(safe-area-inset-top)); max-height: calc(100vh - 80px); }
}

/* -------------------------------- layout ------------------------------ */
.main { max-width: 1280px; margin: 0 auto; padding: 0 16px 60px; min-height: 70vh; }

/* ------------------------------- onboarding --------------------------- */
.onboard { margin-top: 18px; background: linear-gradient(135deg, rgba(63, 184, 163, .16), rgba(7, 69, 80, .25)); border: 1px solid rgba(63, 184, 163, .4); border-radius: 16px; padding: 18px; display: grid; gap: 14px; }
.onboard h2 { margin: 0; font-size: 19px; }
.onboard p { margin: 2px 0 0; }
.onboard-actions { display: flex; gap: 8px; }
.svc-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.svc-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.svc-toggle span { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 8px 12px; cursor: pointer; font-size: 14px; }
.svc-toggle i { width: 12px; height: 12px; border-radius: 3px; }
.svc-toggle input:checked + span { background: var(--ink); color: #0b0f12; border-color: var(--ink); }
.svc-toggle input:focus-visible + span { outline: 2px solid var(--teal); }
.svc-toggle input:disabled + span { cursor: default; opacity: .8; }

/* --------------------------------- tabs ------------------------------- */
/* Tabs wrap rather than scroll: a sideways scroll with no scrollbar can't be
   reached with a mouse. Collapsed to the busiest lists, see home.js. */
.lists { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 0 4px; }
.list-tab { flex: none; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 7px 14px 7px 8px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.list-tab small { color: var(--ink-3); }
.list-tab[aria-pressed=true] { border-color: var(--teal); background: rgba(63, 184, 163, .13); }
.list-tab.new { color: var(--teal); border-style: dashed; padding-left: 12px; }
.lists.one-line .list-tab.new { padding: 7px 10px; }
.lists.one-line { flex-wrap: nowrap; overflow: hidden; }
.list-tab.more { color: var(--ink-2); padding-left: 12px; font-weight: 600; }
.list-tab.more:hover { color: var(--ink); border-color: var(--ink-3); }
.dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.dot-all { background: var(--teal); color: #0b0f12; }

/* -------------------------------- filters ----------------------------- */
.filters { display: flex; gap: 10px 14px; flex-wrap: wrap; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button, .seg label span { border: 0; background: none; padding: 5px 12px; border-radius: 7px; font-size: 13px; color: var(--ink-2); display: inline-block; cursor: pointer; }
.seg button[aria-pressed=true], .seg input:checked + span { background: var(--ink); color: #0b0f12; font-weight: 600; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg-wide { display: flex; }
.seg-wide label { flex: 1; text-align: center; }
.seg-wide label span { width: 100%; padding: 8px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.svc { border: 1px solid var(--line); background: transparent; border-radius: 8px; padding: 5px 10px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.svc i { width: 10px; height: 10px; border-radius: 3px; }
.svc[aria-pressed=true] { background: var(--ink); color: #0b0f12; border-color: var(--ink); }
.filter-end { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.filter-end select { width: auto; padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; user-select: none; }
.switch { width: 38px; height: 22px; border-radius: 999px; background: var(--line); position: relative; display: inline-block; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch[aria-checked=true] { background: var(--teal); }
.switch[aria-checked=true]::after { left: 19px; }
@media (max-width: 700px) { .filter-end { margin-left: 0; width: 100%; justify-content: space-between; } }

/* ---------------------------------- grid ------------------------------ */
.grid-head { display: flex; align-items: baseline; gap: 12px; padding-top: 18px; flex-wrap: wrap; }
.grid-head h1 { margin: 0; font-size: 22px; }
.grid-head .btn { margin-left: auto; align-self: center; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 20px 16px; padding-top: 16px; }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 16px 12px; } }
.card.seen .poster img, .card.seen .poster .poster-none { filter: grayscale(.6) brightness(.45); }
.grid .card { background: none; border: 0; padding: 0; text-align: left; display: block; width: 100%; }
.poster { aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; position: relative; display: block; background: var(--panel-2); box-shadow: 0 6px 18px rgba(0, 0, 0, .35); transition: transform .15s; }
.grid .card:hover .poster { transform: translateY(-3px); }
.poster-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster-none { display: flex; align-items: flex-end; padding: 12px; background: linear-gradient(160deg, #1f3b40, #0e1a1d); font: 700 16px/1.2 Poppins, sans-serif; }
.svc-badge { position: absolute; top: 8px; left: 8px; font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 6px; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.watched-tag { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: var(--teal); color: #0b0f12; font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0, 0, 0, .5); }
.meta { display: grid; padding: 8px 2px 0; gap: 1px; }
.meta b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta > span { color: var(--ink-3); font-size: 12px; }
.card.seen .meta { opacity: .6; }
.minis { display: flex; margin-top: 5px; padding-left: 4px; }
.mini { width: 20px; height: 20px; border-radius: 50%; font-size: 10px; font-weight: 700; display: grid; place-items: center; margin-left: -4px; border: 2px solid var(--bg); }
.mini.done { opacity: .35; }
.empty { grid-column: 1 / -1; text-align: center; padding: 50px 16px; border: 1px dashed var(--line); border-radius: 16px; }
.empty p { margin: 0 0 8px; }
.empty .btn { margin-top: 10px; }

/* -------------------------------- panel ------------------------------- */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 50; opacity: 0; transition: opacity .2s; }
.scrim.open { opacity: 1; }
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--panel); z-index: 60; transform: translateX(100%); transition: transform .22s ease; border-left: 1px solid var(--line); display: flex; }
.panel.open { transform: none; }
.panel-body { overflow-y: auto; width: 100%; padding-bottom: calc(30px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
.backdrop { height: 230px; position: relative; background: linear-gradient(120deg, var(--teal-deep), #0e1a1d) center / cover no-repeat; }
.backdrop::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, var(--panel) 0%, rgba(19, 25, 29, .2) 60%, rgba(19, 25, 29, .35) 100%); }
.backdrop .close { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; background: rgba(0, 0, 0, .6); border: 0; display: grid; place-items: center; color: #fff; }
.p-head { display: flex; gap: 16px; padding: 0 20px; margin-top: -100px; position: relative; z-index: 2; align-items: flex-end; }
.p-head .poster { width: 116px; flex: none; }
.p-head h2 { font: 700 24px/1.15 Poppins, sans-serif; margin: 0 0 8px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; color: var(--ink-2); font-size: 12px; }
.facts span { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; }
.scores { display: flex; gap: 18px; padding: 18px 20px 0; flex-wrap: wrap; }
.score { display: flex; align-items: baseline; gap: 6px; font-size: 13px; color: var(--ink-2); }
.score b { font: 700 19px Poppins, sans-serif; color: var(--ink); }
.sec { padding: 20px 20px 0; }
.sec h3 { font: 600 12px Inter, sans-serif; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 0 0 10px; }
.sec p { margin: 0 0 8px; color: var(--ink-2); }
.tagline { font-style: italic; color: var(--ink) !important; }
.listpick { display: grid; gap: 8px; }
.lp-row { display: flex; gap: 8px; align-items: stretch; }
.lp { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; text-align: left; }
.lp .dot { width: 28px; height: 28px; }
.lp .nm { flex: 1; min-width: 0; }
.lp .nm small { display: block; color: var(--ink-3); font-size: 12px; }
.lp .ck { width: 24px; height: 24px; border-radius: 6px; border: 2px solid var(--ink-3); display: grid; place-items: center; flex: none; }
.lp .ck svg { width: 16px; height: 16px; }
.lp[aria-checked=true] { border-color: var(--teal); }
.lp[aria-checked=true] .ck { background: var(--teal); border-color: var(--teal); color: #0b0f12; }
.seen-btn { flex: none; min-width: 112px; border: 1px solid var(--line); background: var(--panel-2); border-radius: 10px; padding: 0 12px; font-size: 13px; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.seen-btn svg { width: 15px; height: 15px; }
.seen-btn[aria-pressed=true] { background: var(--teal); border-color: var(--teal); color: #0b0f12; font-weight: 600; }
.where { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.where .w { display: flex; align-items: center; gap: 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px 7px 7px; font-size: 14px; }
.where .w img, .where .w i { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 11px; }
.where .w small { display: block; color: var(--ink-3); font-size: 11px; }
.where .w.yours { border-color: var(--teal); }
.where .w.yours small { color: var(--teal); }
.where-more { font-size: 13px; }
.kids-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.kids-row p { margin: 0; font-size: 14px; }
.trailer { width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; border: 1px solid var(--line); background: #000 center / cover; display: grid; place-items: center; position: relative; padding: 0; }
.trailer .play { width: 60px; height: 60px; border-radius: 50%; background: rgba(0, 0, 0, .65); display: grid; place-items: center; border: 2px solid #fff; color: #fff; }
.trailer .play svg { width: 26px; height: 26px; margin-left: 3px; }
iframe.trailer { display: block; }
.cast { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.cast div { flex: none; width: 84px; text-align: center; font-size: 12px; color: var(--ink-2); display: grid; gap: 1px; align-content: start; }
.cast img, .cast i { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; margin: 0 auto 6px; background: var(--panel-2); border: 1px solid var(--line); display: block; }
.cast b { color: var(--ink); font-weight: 600; }
.cast span { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attrib { padding: 22px 20px 0; color: var(--ink-3); font-size: 11px; margin: 0; }
@media (max-width: 600px) { .panel { border-left: 0; } .seen-btn { min-width: 96px; } }

/* -------------------------------- dialogs ----------------------------- */
.dialog { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 16px; padding: 0; width: min(480px, calc(100vw - 20px)); max-height: calc(100vh - 40px); }
.dialog::backdrop { background: rgba(0, 0, 0, .65); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 0; }
.dialog-head h2 { margin: 0; font-size: 19px; }
.dialog-body { padding: 14px 18px 18px; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
@media (max-width: 600px) {
  .dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 18px 18px 0 0; max-height: 92vh; padding-bottom: env(safe-area-inset-bottom); }
}
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { display: block; width: 30px; height: 30px; border-radius: 50%; background: var(--c); border: 3px solid transparent; cursor: pointer; }
.swatch input:checked + span { border-color: var(--ink); box-shadow: 0 0 0 2px var(--panel); }
.swatch input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.people-pick { display: grid; gap: 6px; margin-top: 4px; }
.person-check { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.person-check input { accent-color: var(--teal); width: 18px; height: 18px; }
.limits { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.limits .hint { grid-column: 1 / -1; margin: -4px 0 12px; }
.big-code { font: 700 32px Poppins, sans-serif; letter-spacing: .12em; text-align: center; margin: 10px 0; color: var(--teal); }

/* ------------------------------- household ---------------------------- */
.household { max-width: 760px; }
.block { padding: 22px 0; border-bottom: 1px solid var(--line); }
.block:last-child { border-bottom: 0; }
.block h1 { margin: 0 0 10px; font-size: 26px; }
.block h2 { margin: 0 0 6px; font-size: 19px; }
.block > .muted { margin: 0 0 12px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.block-head h2 { margin: 0; }
.inline-form { display: flex; gap: 8px; max-width: 460px; }
.people { display: grid; gap: 8px; }
.person { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.person-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.person-text .small { overflow-wrap: anywhere; }
.person-actions { display: flex; gap: 6px; flex: none; }
.code { color: var(--teal); letter-spacing: .06em; }

/* -------------------------------- footer ------------------------------ */
.site-footer { max-width: 1280px; margin: 0 auto; padding: 24px 16px calc(28px + env(safe-area-inset-bottom)); color: var(--ink-3); font-size: 12px; border-top: 1px solid var(--line); text-align: center; }
.site-footer p { margin: 4px 0; }
.site-footer a { color: var(--ink-2); }

/* --------------------------------- toast ------------------------------ */
#toast { position: fixed; bottom: calc(20px + env(safe-area-inset-bottom)); left: 50%; transform: translate(-50%, 120px); background: var(--ink); color: #0b0f12; padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; transition: transform .2s; z-index: 100; max-width: calc(100vw - 32px); text-align: center; pointer-events: none; }
#toast.show { transform: translate(-50%, 0); }
#toast.error { background: var(--danger); }

/* ------------------------------ list icons ---------------------------- */
.has-icon { padding: 0; background: color-mix(in srgb, var(--c) 26%, #13191d); box-shadow: inset 0 0 0 2px var(--c); }
.has-icon img { width: 70%; height: 70%; display: block; }
.mini.has-icon img { width: 76%; height: 76%; }
.avatar.big { width: 64px; height: 64px; font-size: 28px; }
.list-preview { display: flex; justify-content: center; margin: 0 0 12px; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
.icon-pick input { position: absolute; opacity: 0; }
.icon-pick span { display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; background: var(--panel-2); border: 2px solid transparent; cursor: pointer; transition: transform .1s; }
.icon-pick span:hover { transform: scale(1.06); }
.icon-pick img { width: 30px; height: 30px; }
.icon-pick input:checked + span { border-color: var(--teal); background: rgba(63, 184, 163, .16); }
.icon-pick input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.icon-letter { font: 700 15px Poppins, sans-serif; color: var(--ink-2); }

/* ------------------------------- top nav ------------------------------ */
.top-nav { display: flex; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 3px; flex: none; }
.nav-link { color: var(--ink-2); text-decoration: none; padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; }
.nav-link:hover { color: var(--ink); }
.nav-link[aria-current=page] { background: var(--ink); color: #0b0f12; }
@media (max-width: 640px) {
  .top-in { flex-wrap: wrap; row-gap: 8px; }
  .top-nav { order: 3; width: 100%; }
  .nav-link { flex: 1; text-align: center; }
  .results { top: calc(108px + env(safe-area-inset-top)); }
}

/* -------------------------------- browse ------------------------------ */
.browse-head { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding: 20px 0 6px; }
.browse-head h1 { margin: 0; font-size: 24px; }
.browse-head .toggle { margin-left: auto; }
.b-row { padding: 14px 0 4px; }
.b-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.b-row-head h2 { margin: 0; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.svc-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.b-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.b-loading { display: flex; gap: 12px; }
.b-ghost { width: 140px; aspect-ratio: 2 / 3; border-radius: 10px; background: linear-gradient(90deg, var(--panel), var(--panel-2), var(--panel)); background-size: 200% 100%; animation: shimmer 1.4s infinite; flex: none; }
@keyframes shimmer { to { background-position: -200% 0; } }
.b-tile { flex: none; width: 140px; background: none; border: 0; padding: 0; text-align: left; scroll-snap-align: start; display: grid; gap: 2px; }
.b-grid .b-tile { width: 100%; }
.b-tile:hover .poster { transform: translateY(-3px); }
.b-name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 6px; }
.b-meta { color: var(--ink-3); font-size: 12px; }
.on-list { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: var(--teal); color: #0b0f12; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.on-list svg { width: 15px; height: 15px; }
.b-one-head { display: flex; align-items: baseline; gap: 16px; padding-top: 10px; }
.b-one-head h2 { margin: 0; }
.b-more { text-align: center; padding: 24px 0; }
@media (max-width: 520px) { .b-tile, .b-ghost { width: 118px; } }

/* -------------------------------- import ------------------------------ */
.import { max-width: 860px; padding-top: 20px; }
.import h1 { margin: 0 0 8px; font-size: 24px; }
.steps { padding-left: 22px; display: grid; gap: 12px; color: var(--ink-2); margin: 18px 0 8px; }
.steps b { color: var(--ink); }
.bm-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.bookmarklet { display: inline-flex; align-items: center; gap: 8px; background: var(--teal); color: #0b0f12; font-weight: 700; padding: 9px 16px; border-radius: 999px; text-decoration: none; cursor: grab; box-shadow: 0 6px 18px rgba(63, 184, 163, .3); }
kbd { background: var(--panel-2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; font: 600 12px Inter, sans-serif; color: var(--ink); }
.imp-services { margin-top: 18px; }
.svc-avatar { font-size: 16px; }
.not-ours { opacity: .65; }
.imp-when { color: var(--teal); }
.imp-progress { height: 6px; background: var(--panel-2); border-radius: 99px; overflow: hidden; max-width: 420px; }
.imp-progress span { display: block; height: 100%; background: var(--teal); transition: width .3s; }
.imp-target { display: flex; align-items: flex-end; gap: 12px; max-width: 420px; }
.imp-target .field { flex: 1; }
.imp-badge { padding-bottom: 16px; }
.imp-sec { padding: 14px 0; border-top: 1px solid var(--line); }
.imp-sec h2 { font-size: 17px; margin: 0 0 8px; }
.imp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.imp-item { display: flex; gap: 10px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px; cursor: pointer; }
.imp-item input { accent-color: var(--teal); width: 18px; height: 18px; flex: none; }
.imp-item:has(input:checked:not(:disabled)) { border-color: var(--teal); }
.imp-item.is-done { opacity: .5; cursor: default; }
.imp-img { width: 40px; aspect-ratio: 2 / 3; border-radius: 4px; object-fit: cover; flex: none; font-size: 0; }
.imp-text { display: grid; min-width: 0; }
.imp-text b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-missing { color: var(--ink-3); font-size: 13px; }
.imp-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 18px 0; flex-wrap: wrap; }
.imp-done { padding: 30px 0; }

/* -------------------------------- account ----------------------------- */
.narrow { max-width: 420px; }
.danger-zone h2 { color: var(--danger); }
.btn-danger-outline { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-danger-outline:hover { background: rgba(255, 107, 107, .1); border-color: var(--danger); }

/* "N titles hidden by your filters" under the queue heading */
.hidden-note { flex-basis: 100%; margin: 4px 0 0; padding: 8px 12px; border-radius: 10px; background: rgba(243, 201, 105, .1); border: 1px solid rgba(243, 201, 105, .35); color: #f3dfa6; font-size: 13px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--teal); font-weight: 600; text-decoration: underline; cursor: pointer; }

/* List order arrows on the Household page */
.order-btns { display: inline-flex; flex-direction: column; }
.order-btns .icon-btn { padding: 1px 6px; }
.order-btns .icon-btn:disabled { opacity: .25; cursor: default; background: none; }

/* Watching (TV shows in progress, per list) */
.watching-tag { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; background: rgba(11, 15, 18, .85); color: var(--teal); border: 1px solid var(--teal); font-size: 12px; font-weight: 700; padding: 3px 9px 3px 7px; border-radius: 999px; }
.watching-tag svg { width: 12px; height: 12px; }
.lp-row .seen-btn { min-width: 96px; }
.watching-btn[aria-pressed=true] { background: rgba(63, 184, 163, .16); border-color: var(--teal); color: var(--teal); font-weight: 600; }
.seen-btn svg { flex: none; }
@media (max-width: 600px) { .lp-row .seen-btn { min-width: 0; padding: 0 9px; font-size: 12px; } .lp .nm small { display: none; } }

/* A household's own "it's on Hallmark+" tags in Where to watch */
.where .w.tagged { border-style: dashed; padding-right: 6px; }
.where .w .untag { background: none; border: 0; color: var(--ink-3); padding: 4px; margin-left: 2px; border-radius: 6px; display: grid; place-items: center; }
.where .w .untag:hover { color: var(--ink); background: var(--panel); }
.where .w .untag svg { width: 14px; height: 14px; }
.tag-add { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 2px 0 10px; font-size: 13px; color: var(--ink-3); }
.tag-add select { width: auto; padding: 6px 10px; font-size: 13px; border-radius: 8px; }

/* Search: nothing matched */
.results-empty { display: grid; gap: 4px; padding: 16px; text-align: center; }
.results-empty b { font: 600 15px Poppins, sans-serif; }
.results-empty span { color: var(--ink-3); font-size: 13px; }

/* Browse: Popular / New switch on each service row */
.b-row-head .seg-small { margin-left: auto; padding: 2px; }
.b-row-head .seg-small button { padding: 3px 10px; font-size: 12px; }
.b-row-head h2 { margin-right: 0; }
@media (max-width: 520px) { .b-row-head { flex-wrap: wrap; } .b-row-head h2 { width: 100%; } .b-row-head .seg-small { margin-left: 0; } .b-row-head .link { margin-left: auto; } }

/* Browse: titles not out yet, at the start of a service's New row */
.soon-banner { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(to top, rgba(11, 15, 18, .95), rgba(11, 15, 18, .75)); color: #f3c969; font-size: 12px; font-weight: 700; text-align: center; padding: 7px 4px 6px; letter-spacing: .02em; border-top: 2px solid #f3c969; }
.b-tile.soon .b-meta { color: #f3c969; }
.b-tile.soon .poster-none { padding-bottom: 42px; }

/* Queue: service chips on one line, collapsed, like the list tabs */
/* Their own full-width line under the type switch and sort, so more fit. */
.filters .chips { order: 3; flex: 1 1 100%; min-width: 0; }
.filters .chips.one-line { flex-wrap: nowrap; overflow: hidden; }
.filters .chips .svc { flex: none; white-space: nowrap; }
.svc.more { color: var(--ink-2); font-weight: 600; }
