@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/vazirmatn-arabic.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/vazirmatn-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0B0F1A;
  --bar: #0F1524;
  --card: #141B2B;
  --card-2: #1C2438;
  --line: #222C44;
  --line-2: #2A3350;
  --text: #EDEFF5;
  --text-2: #D5DAE5;
  --muted: #A3ADC2;
  --faint: #8A94AA;
  --gold: #F5C14B;
  --gold-ink: #1A1405;
  --gold-soft: #3A2A0C;
  --green: #7EE0A8;
  --green-soft: #1E2A20;
  --red: #FF8A7A;
  --violet: #6F5BE0;
  --violet-soft: #1A1830;
  --violet-line: #3B3470;
  --radius: 16px;
  --tabs-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: "Vazirmatn", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.ltr { direction: ltr; unicode-bidi: isolate; }

#app { padding-bottom: calc(var(--tabs-h) + var(--safe-b) + 16px); min-height: 100vh; }
body.no-tabs #app { padding-bottom: calc(96px + var(--safe-b)); }
.page { animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .page, .sheet, .skeleton { animation: none !important; } }

/* tabs */
.tabs {
  position: fixed; inset: auto 0 0 0; z-index: 20;
  height: calc(var(--tabs-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--bar); border-top: 1px solid #1E2740;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
}
body.no-tabs .tabs { display: none; }
.tabs a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--faint); font-size: 11px; font-weight: 700;
}
.tabs a[aria-current="page"] { color: var(--gold); }

/* blocks */
.pad { padding: 0 16px; }
.head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 8px; }
.head h1 { margin: 0; font-size: 22px; font-weight: 900; line-height: 1.3; }
.head p { margin: 0; color: var(--muted); font-size: 12px; }
.brand { width: 42px; height: 42px; border-radius: 12px; flex: none; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 14px; border: 0; flex: none;
  background: var(--card); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
}
.section { margin-top: 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 16px 10px; }
.section-head h2 { margin: 0; font-size: 17px; font-weight: 800; }
.section-head a, .link { color: var(--gold); font-size: 13px; font-weight: 700; background: none; border: 0; padding: 8px 0; }
.row { display: flex; gap: 12px; overflow-x: auto; padding: 0 16px; scroll-snap-type: x proximity; scrollbar-width: none; }
.row::-webkit-scrollbar { display: none; }
.row > * { scroll-snap-align: start; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; padding: 0 16px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.empty { padding: 32px 24px; text-align: center; color: var(--muted); font-size: 14px; }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* posters */
.poster {
  position: relative; width: 100%; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden;
  background: linear-gradient(160deg, #2A3350, #141B2B);
}
.poster img { width: 100%; height: 100%; object-fit: cover; }
.poster .fallback {
  position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 8px;
  font-size: 12px; font-weight: 800; line-height: 1.3; direction: ltr; text-align: left;
}
.poster .tag {
  position: absolute; top: 6px; right: 6px; padding: 1px 7px; border-radius: 7px;
  background: rgba(11, 15, 26, .82); font-size: 11px; font-weight: 800; color: var(--gold);
}
.poster .tag.off { color: var(--muted); }
.poster .rank {
  position: absolute; bottom: 0; left: 0; padding: 2px 9px; border-top-right-radius: 10px;
  background: rgba(11, 15, 26, .85); font-weight: 900; color: var(--gold);
}
.card { display: block; min-width: 0; }
.row .card { width: 112px; flex: none; }
.card .name { margin-top: 6px; font-size: 13px; font-weight: 700; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; direction: ltr; text-align: right; }
.card .meta { font-size: 11px; color: var(--muted); }

.list-item {
  display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius);
  background: var(--card); margin: 0 16px 8px;
}
.list-item .thumb { width: 46px; flex: none; }
.list-item .thumb .poster { border-radius: 8px; }
.list-item .thumb .fallback { display: none; }
.list-item .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list-item .t { font-size: 14px; font-weight: 800; direction: ltr; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .s { font-size: 12px; color: var(--muted); }
.list-item .n { width: 30px; font-size: 18px; font-weight: 900; color: var(--gold); text-align: center; flex: none; }

/* home hero */
.search-bar {
  margin: 6px 16px 0; height: 50px; border-radius: 16px; background: var(--card); border: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; padding: 0 14px; color: var(--faint); font-size: 14px;
}
.hero {
  display: block; position: relative; margin: 16px 16px 0; height: 230px; border-radius: 22px; overflow: hidden; background: var(--card);
}
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(11,15,26,.96) 8%, rgba(11,15,26,.25) 62%, rgba(11,15,26,.05)); }
.hero .content { position: absolute; inset: auto 18px 16px 18px; z-index: 1; display: flex; flex-direction: column; gap: 6px; }
.hero .label { position: absolute; top: 14px; right: 14px; z-index: 1; padding: 4px 12px; border-radius: 999px; background: rgba(11,15,26,.7); color: var(--gold); font-size: 12px; font-weight: 800; }
.hero h2 { margin: 0; font-size: 22px; font-weight: 900; line-height: 1.2; direction: ltr; text-align: right; }
.hero .m { font-size: 13px; color: var(--text-2); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 14px 16px 0; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 40px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--text-2); font-size: 13px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.chip[aria-pressed="true"], .chip.on { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.chip.wrap { flex: initial; }
.chips.wrap { flex-wrap: wrap; overflow: visible; padding-top: 0; }

.ai-card {
  margin: 24px 16px 0; padding: 16px; border-radius: 20px; background: var(--violet-soft); border: 1px solid var(--violet-line);
  display: flex; align-items: center; gap: 14px;
}
.ai-mark { width: 46px; height: 46px; border-radius: 14px; background: var(--violet); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }

/* buttons */
.btn {
  min-height: 48px; padding: 0 18px; border-radius: 15px; border: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 800; background: var(--card-2); color: var(--text);
}
.btn.primary { background: var(--gold); color: var(--gold-ink); }
.btn.violet { background: var(--violet); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line-2); }
.btn.block { width: 100%; }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 13px; border-radius: 12px; }
.btn[disabled] { opacity: .55; cursor: default; }

/* title page */
.backdrop { position: relative; height: 260px; background: var(--card); overflow: hidden; }
.backdrop img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.05); }
.backdrop.blur img { filter: blur(18px) saturate(1.2); transform: scale(1.2); opacity: .7; }
.backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg) 4%, rgba(11,15,26,.35) 60%, rgba(11,15,26,.15)); }
.title-top { display: flex; gap: 14px; padding: 0 16px; margin-top: -110px; position: relative; z-index: 1; }
.title-top .poster { width: 112px; flex: none; border: 2px solid var(--line-2); }
.title-top .info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; }
.title-top h1 { margin: 0; font-size: 21px; font-weight: 900; line-height: 1.25; direction: ltr; text-align: right; overflow-wrap: anywhere; }
.scores { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 14px 16px 0; }
.score { padding: 10px 6px; border-radius: 14px; background: var(--card); text-align: center; }
.score b { display: block; font-size: 17px; font-weight: 900; }
.score span { font-size: 11px; color: var(--muted); }
.actions { display: flex; justify-content: space-between; gap: 4px; padding: 16px 10px 0; }
.act { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; background: none; border: 0; color: var(--text-2); font-size: 11px; font-weight: 700; min-width: 0; }
.act i { width: 48px; height: 48px; border-radius: 16px; background: var(--card); display: flex; align-items: center; justify-content: center; color: var(--text); font-style: normal; }
.act[aria-pressed="true"] i { background: var(--gold-soft); color: var(--gold); }
.seg-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 0 16px; border-bottom: 1px solid #1E2740; margin-top: 18px; scrollbar-width: none; }
.seg-tabs::-webkit-scrollbar { display: none; }
.seg-tabs button { flex: none; min-height: 44px; padding: 0 12px; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--faint); font-size: 13px; font-weight: 700; }
.seg-tabs button[aria-selected="true"] { color: var(--gold); border-color: var(--gold); }
.panel { padding: 16px 16px 0; }
.plot { font-size: 14px; line-height: 2; color: var(--text-2); margin: 0; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin-top: 14px; font-size: 13px; }
.facts dt { color: var(--faint); }
.facts dd { margin: 0; }
.people { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 8px; }
.person { text-align: center; font-size: 12px; }
.person .face { width: 62px; height: 62px; margin: 0 auto 6px; border-radius: 50%; overflow: hidden; background: var(--card-2); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 20px; }
.person .face img { width: 100%; height: 100%; object-fit: cover; }
.person b { display: block; font-size: 12px; line-height: 1.35; direction: ltr; }
.person span { color: var(--faint); font-size: 11px; direction: ltr; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; background: var(--card); }
.bot-box { margin: 18px 16px 0; padding: 14px; border-radius: var(--radius); border: 1px dashed var(--line-2); }
.bot-box p { margin: 0 0 10px; font-size: 13px; color: var(--text-2); }
.bot-box .chips { padding: 0; flex-wrap: wrap; overflow: visible; }

.dock {
  position: fixed; inset: auto 0 0 0; z-index: 15; padding: 12px 16px calc(14px + var(--safe-b));
  background: var(--bar); border-top: 1px solid #1E2740; display: flex; gap: 10px;
}
.dock .btn.primary { flex: 1; }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .label { font-size: 13px; font-weight: 800; }
select, .input {
  width: 100%; min-height: 46px; border-radius: 12px; background: var(--card); border: 1px solid var(--line);
  padding: 0 12px; color: var(--text);
}
.input-wrap {
  display: flex; align-items: center; gap: 8px; height: 50px; border-radius: 15px; padding: 0 14px;
  background: var(--card); border: 1px solid var(--gold); color: var(--faint);
}
.input-wrap input { flex: 1; min-width: 0; background: none; border: 0; outline: none; /* the ring is on .input-wrap:focus-within */ color: var(--text); font-size: 15px; }
input[type=range] { width: 100%; accent-color: var(--gold); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; font-size: 14px; font-weight: 700; }
.switch { position: relative; width: 48px; height: 28px; flex: none; border: 0; border-radius: 999px; background: var(--line-2); padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--text); transition: transform .18s; }
.switch[aria-checked="true"] { background: #3FB97A; }
.switch[aria-checked="true"]::after { transform: translateX(-20px); }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--card); }
.segmented button { min-height: 42px; border: 0; border-radius: 10px; background: none; color: var(--muted); font-size: 13px; font-weight: 800; line-height: 1.3; padding: 2px 4px; }
.segmented button small { display: block; font-size: 11px; font-weight: 500; color: var(--faint); }
.segmented button[aria-pressed="true"] { background: #26304A; color: var(--text); }
.box { margin: 0 16px; padding: 4px 14px; border-radius: var(--radius); background: var(--card); }
.box > * + * { border-top: 1px solid #1E2740; }

/* files */
.file {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: right;
  border-radius: var(--radius); background: var(--card); border: 1.5px solid var(--card); color: var(--text);
}
.file[aria-checked="true"] { border-color: var(--gold); background: #1C1A12; }
.file .dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #4A5578; flex: none; }
.file[aria-checked="true"] .dot { border: 6px solid var(--gold); }
.file .q { font-size: 16px; font-weight: 900; direction: ltr; }
.file .d { font-size: 12px; color: var(--faint); direction: ltr; text-align: right; overflow-wrap: anywhere; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 7px; background: #26304A; font-size: 11px; font-weight: 700; color: var(--text-2); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.gold { background: var(--gold-soft); color: var(--gold); }
.badge.red { background: #3A1616; color: var(--red); }
.stack { display: flex; flex-direction: column; gap: 10px; }
.episodes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.episodes button { min-height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-weight: 800; }
.episodes button[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }

/* sheet */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(4, 6, 12, .6); display: flex; align-items: flex-end; }
.sheet {
  width: 100%; max-height: 88vh; overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 -8px 24px rgba(0, 0, 0, .5); background: var(--bg); border-radius: 22px 22px 0 0;
  padding: 10px 16px calc(20px + var(--safe-b)); border-top: 1px solid var(--line); animation: up .22s ease-out;
}
@keyframes up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet .grip { width: 40px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 0 auto 12px; }
.sheet h3 { margin: 0 0 12px; font-size: 17px; font-weight: 900; }

/* assistant */
.chat { display: flex; flex-direction: column; gap: 10px; padding: 12px 16px 170px; }
.bubble { max-width: 86%; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.9; overflow-wrap: anywhere; }
.bubble.bot { align-self: flex-start; background: var(--violet-soft); border: 1px solid #2E2A58; border-bottom-left-radius: 6px; }
.bubble.me { align-self: flex-end; background: var(--gold); color: var(--gold-ink); font-weight: 700; border-bottom-right-radius: 6px; }
.bubble p { margin: 0 0 6px; } .bubble p:last-child { margin: 0; }
.bubble ul { margin: 4px 0; padding-right: 18px; }
.chat-titles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.composer { position: fixed; inset: auto 0 calc(var(--tabs-h) + var(--safe-b)) 0; z-index: 14; background: var(--bg); padding: 8px 16px 10px; }
.composer form { display: flex; gap: 8px; }
.composer .input-wrap { flex: 1; border-color: var(--line); }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #B9B3E6; animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .25; } }

/* profile */
.avatar { width: 58px; height: 58px; border-radius: 19px; background: linear-gradient(135deg, var(--gold), #C98A3E); color: var(--gold-ink); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 900; flex: none; }
.stat-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 8px 16px 0; }
.stat-tabs button { min-height: 64px; border-radius: 14px; background: var(--card); border: 1.5px solid var(--card); color: var(--muted); font-size: 11px; font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.4; }
.stat-tabs button b { font-size: 18px; font-weight: 900; color: var(--text); }
.stat-tabs button[aria-selected="true"] { border-color: var(--gold); color: var(--gold); }
.menu-row { display: flex; align-items: center; gap: 12px; min-height: 52px; width: 100%; background: none; border: 0; color: var(--text); font-size: 14px; font-weight: 700; text-align: right; padding: 0; }
.menu-row .v { margin-inline-start: auto; color: var(--faint); font-size: 12px; font-weight: 500; }

/* misc */
.toast {
  position: fixed; z-index: 60; inset: auto 16px calc(var(--tabs-h) + var(--safe-b) + 14px) 16px;
  padding: 12px 16px; border-radius: 14px; background: #26304A; color: var(--text); font-size: 14px; font-weight: 700;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .4); text-align: center;
}
.skeleton { background: linear-gradient(90deg, var(--card) 25%, var(--card-2) 50%, var(--card) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.notice { margin: 12px 16px 0; padding: 12px 14px; border-radius: 14px; background: var(--card); font-size: 13px; color: var(--text-2); line-height: 1.9; }
.notice.warn { background: var(--gold-soft); color: #F8DFA0; }
.center { display: flex; align-items: center; justify-content: center; min-height: 60vh; flex-direction: column; gap: 12px; padding: 24px; text-align: center; }

/* ---- interaction layer: touch, hover, press, focus ---- */
a, button, .chip, .file, .switch, select { touch-action: manipulation; }
h1, h2, h3 { text-wrap: balance; }
.score b, .file .q, .badge, .stat-tabs b, .list-item .n, .poster .rank { font-variant-numeric: tabular-nums; }
.grid .card, .row .card { contain: layout; }
.list-item { content-visibility: auto; contain-intrinsic-size: auto 86px; }
.input-wrap { border-color: var(--line); transition: border-color .15s, box-shadow .15s; }
.input-wrap:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245, 193, 75, .18); }
.btn, .chip, .act i, .icon-btn, .file, .list-item, .card .poster, .hero, .ai-card, .segmented button, .episodes button {
  transition: transform .15s ease-out, background-color .15s, border-color .15s, box-shadow .15s;
}
.btn:active, .chip:active, .icon-btn:active, .act:active i, .segmented button:active, .episodes button:active { transform: scale(.96); }
.file:active, .list-item:active, .ai-card:active, .hero:active { transform: scale(.985); }
.card:active .poster { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { filter: brightness(1.08); }
  .btn.ghost:hover, .chip:hover, .icon-btn:hover, .act:hover i { background-color: var(--card-2); }
  .chip.on:hover, .chip[aria-pressed="true"]:hover { background-color: #FFD06A; }
  .card:hover .poster { transform: translateY(-2px); box-shadow: 0 8px 8px rgba(0, 0, 0, .3); }
  .list-item:hover, .file:hover { background-color: var(--card-2); }
  .hero:hover, .ai-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
  .tabs a:hover, .seg-tabs button:hover { color: var(--text); }
  .section-head a:hover, .link:hover { text-decoration: underline; text-underline-offset: 4px; }
}
.toast, .dock { box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
@media (prefers-reduced-motion: reduce) {
  .btn, .chip, .act i, .icon-btn, .file, .list-item, .card .poster, .hero, .ai-card, .segmented button, .episodes button, .switch::after { transition: none; }
}

/* lists: big pickers instead of thin segmented rows */
.list-controls { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.picker {
  width: 100%; min-height: 60px; padding: 8px 16px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: right;
  touch-action: manipulation; transition: transform .15s ease-out, background-color .15s;
}
.picker.wide { min-height: 64px; border-color: var(--line-2); }
.picker-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.picker-text small { font-size: 12px; color: var(--muted); font-weight: 500; }
.picker-text b { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker.wide .picker-text b { font-size: 17px; color: var(--gold); }
.picker svg { flex: none; color: var(--muted); }
.picker-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.picker-row.single { grid-template-columns: 1fr; }
.picker:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) { .picker:hover { background-color: var(--card-2); } }
.option-head { margin: 14px 4px 6px; font-size: 12px; font-weight: 800; color: var(--muted); }
.option-head:first-child { margin-top: 0; }
.option-row {
  width: 100%; min-height: 56px; padding: 0; background: none; border: 0; color: var(--text);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 15px; font-weight: 700; text-align: right;
  touch-action: manipulation;
}
.option-row[aria-checked="true"] { color: var(--gold); }
.option-row:active { opacity: .7; }
@media (prefers-reduced-motion: reduce) { .picker { transition: none; } }

/* ---- one accent: gold does the pointing, the rest stays quiet ---- */
.badge.gold { background: var(--gold-soft); color: var(--gold); }
.score b { color: var(--text); }
.poster img { opacity: 0; transition: opacity .25s ease-out; }
.poster img.in { opacity: 1; }
.avatar { position: relative; overflow: hidden; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* home banner: swipe between the newest titles */
.carousel { margin: 16px 0 0; position: relative; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 10px; padding: 0 16px; scroll-padding: 0 16px; }
.slides::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: none; width: 100%; height: 220px; border-radius: 22px; overflow: hidden; background: var(--card); scroll-snap-align: center; }
.slide .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide .bg.blur { filter: blur(16px) saturate(1.2); transform: scale(1.2); opacity: .75; }
.slide .shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(11,15,26,.95) 10%, rgba(11,15,26,.3) 65%, rgba(11,15,26,.1)); }
.slide-body { position: absolute; inset: auto 16px 16px 16px; display: flex; align-items: flex-end; gap: 12px; }
.slide .mini { width: 72px; height: 108px; border-radius: 10px; object-fit: cover; box-shadow: 0 8px 24px rgba(0,0,0,.5); flex: none; }
.slide .txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.slide .label { align-self: flex-start; padding: 2px 10px; border-radius: 999px; background: rgba(11,15,26,.7); color: var(--gold); font-size: 11px; font-weight: 800; }
.slide b { font-size: 20px; font-weight: 900; line-height: 1.25; text-align: right; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.slide .m { font-size: 12px; color: var(--text-2); }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.dots i { width: 6px; height: 6px; border-radius: 6px; background: var(--line-2); transition: width .2s, background-color .2s; }
.dots i.on { width: 18px; background: var(--gold); }
.bell { position: relative; }
.dot-badge { position: absolute; top: 10px; left: 11px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px var(--card); }

/* what arrived for the watchlist */
.update-card { flex: none; width: 250px; display: flex; gap: 10px; padding: 10px; border-radius: 16px; background: var(--card); }
.update-card .thumb { width: 54px; flex: none; }
.update-card .thumb .fallback { display: none; }
.update-card .body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.update-card .t { font-size: 13px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.update-card .what, .list-item .what { font-size: 12px; font-weight: 700; color: var(--gold); line-height: 1.6; }
.list-item .what { max-width: 40%; text-align: left; flex: none; }
.update-card .s { font-size: 11px; color: var(--muted); }
.day-head { margin: 18px 16px 8px; font-size: 13px; font-weight: 800; color: var(--muted); }

/* title: what can be had, and the episodes */
.avail { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 16px 0; }
.avail-chip { padding: 4px 12px; border-radius: 999px; background: var(--gold-soft); color: #F8DFA0; font-size: 12px; font-weight: 800; }
.avail-chip.q { background: var(--card); color: var(--text); }
.ep-row { width: calc(100% - 32px); margin: 0 16px 8px; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 0; border-radius: 16px; background: var(--card); color: var(--text); text-align: right; touch-action: manipulation; transition: transform .15s ease-out, background-color .15s; }
.ep-row .num { width: 40px; height: 40px; border-radius: 12px; background: var(--card-2); display: flex; align-items: center; justify-content: center; font-weight: 900; flex: none; font-variant-numeric: tabular-nums; }
.ep-row .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ep-row .t { font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-row .s { font-size: 12px; color: var(--muted); }
.ep-row .get { width: 40px; height: 40px; border-radius: 12px; background: var(--gold); color: var(--gold-ink); display: flex; align-items: center; justify-content: center; flex: none; }
.ep-row.done { opacity: .7; }
.ep-row.done .get { background: var(--card-2); color: var(--text); }
.ep-row:active { transform: scale(.985); }
@media (hover: hover) and (pointer: fine) { .ep-row:hover { background-color: var(--card-2); } }
.btn .two-line { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.btn .two-line small { font-size: 11px; font-weight: 700; opacity: .75; }
.dock .btn.primary { justify-content: space-between; padding: 0 18px; }
.dock .btn.primary:not(:has(.two-line)) { justify-content: center; }

/* search start screen */
.genre-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px; }
.genre-tile { min-height: 64px; border: 0; border-radius: 16px; color: var(--text); font-size: 15px; font-weight: 900; text-align: right; padding: 0 16px; touch-action: manipulation; transition: transform .15s ease-out; }
.genre-tile:active { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) {
  .poster img, .dots i, .ep-row, .genre-tile { transition: none; }
  .poster img { opacity: 1; }
}
