:root {
  color-scheme: dark;
  --bg: #09090a;
  --panel: #151516;
  --panel-2: #1d1d1f;
  --ink: #f6f4ef;
  --muted: #969499;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #ef5a43;
  --accent-ink: #fff8f5;
  --green: #52c58b;
  --phone: 440px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #050506; color: var(--ink); }
body { min-width: 320px; }
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

#app {
  width: min(100%, var(--phone));
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.75);
  overflow: hidden;
}

.screen { min-height: 100dvh; padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top)) 20px 10px;
}
.wordmark { font: 800 23px/1 Georgia, "Songti SC", serif; letter-spacing: 1px; }
.wordmark i { display: inline-block; width: 8px; height: 8px; margin-left: 5px; background: var(--accent); border-radius: 50%; }
.eyebrow { margin: 0 0 9px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: 2px; }
.section-title { margin: 0; font: 700 28px/1.2 Georgia, "Songti SC", serif; }
.icon-button {
  width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%;
  background: rgba(17, 17, 18, 0.82); display: grid; place-items: center; cursor: pointer;
}

.home-search[hidden] { display: none; }
.home-search { margin: 0 20px 8px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #141415; }
.home-search > label { display: block; margin-bottom: 9px; font-size: 12px; font-weight: 800; }
.search-field { display: flex; align-items: center; gap: 9px; min-height: 45px; padding: 0 13px; border: 1px solid #39393c; border-radius: 10px; background: #0d0d0e; color: var(--muted); }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.search-results { display: grid; gap: 8px; margin-top: 10px; }
.search-empty { margin: 4px 2px 1px; color: var(--muted); font-size: 12px; }
.search-result { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: #202022; text-align: left; cursor: pointer; }
.search-result span { display: grid; gap: 4px; }
.search-result small { color: var(--muted); }
.search-result b { color: var(--accent); font-size: 22px; }
.search-toggle[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }

.home-header { padding: 18px 22px 16px; }
.feature-card { position: relative; min-height: 420px; overflow: hidden; background: radial-gradient(circle at 72% 18%, #3c2924 0, #181719 38%, #0b0b0c 76%); }
.feature-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature-card.cover-missing::before { content: "AI"; position: absolute; top: 44px; right: 22px; color: rgba(255,255,255,.055); font: 900 150px/1 Georgia, serif; letter-spacing: -16px; }
.feature-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(4,4,5,.98) 0%, rgba(4,4,5,.28) 58%, rgba(4,4,5,.02) 100%); }
.feature-copy { position: absolute; z-index: 1; left: 22px; right: 22px; bottom: 26px; }
.feature-title { max-width: 360px; margin: 10px 0 8px; font: 800 36px/1.08 Georgia, "Songti SC", serif; }
.feature-meta { color: #d1ced0; font-size: 14px; }
.mode-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid rgba(255,255,255,.2); border-radius: 99px; font-size: 11px; font-weight: 800; letter-spacing: 1px; background: rgba(7,7,8,.45); }
.mode-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.mode-pill.mock::before { background: #f0bd4c; }
.watch-button { margin-top: 19px; display: inline-flex; align-items: center; gap: 8px; padding: 13px 18px; border: 0; border-radius: 99px; background: var(--ink); color: #111; font-weight: 800; cursor: pointer; }

.section { padding: 30px 20px 4px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.section-heading h2 { margin: 0; font: 700 23px/1.2 Georgia, "Songti SC", serif; }
.section-heading span { color: var(--muted); font-size: 12px; }
.drama-list { display: grid; gap: 14px; }
.drama-row { display: grid; grid-template-columns: 90px 1fr 34px; gap: 14px; align-items: center; padding: 10px; background: #121213; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.drama-row img { width: 90px; height: 118px; object-fit: cover; border-radius: 8px; background: #222; }
.drama-row h3 { margin: 0 0 8px; font-size: 18px; }
.drama-row p { margin: 4px 0; color: var(--muted); font-size: 13px; }
.drama-row .arrow { font-size: 25px; color: #777; }
.player-screen { background: #050506; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
.player-head { position: relative; z-index: 3; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding: calc(9px + env(safe-area-inset-top)) 12px 9px; }
.player-head h1 { margin: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: center; font-size: 16px; }
.video-stage { position: relative; width: 100%; aspect-ratio: 9 / 15.6; max-height: 71dvh; background: #000; overflow: hidden; }
.video-stage video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.video-error { position: absolute; inset: 0; display: grid; place-items: center; padding: 30px; text-align: center; background: #111; color: #d9d6d1; }
.video-error[hidden] { display: none; }
.video-error strong { display: block; margin-bottom: 16px; font-size: 16px; }
.video-error button { min-width: 112px; min-height: 42px; border: 1px solid rgba(255,255,255,.22); border-radius: 99px; background: #f3f0eb; color: #111; font-weight: 800; cursor: pointer; }
.player-info { padding: 18px 18px 4px; }
.player-info h2 { margin: 0; font: 700 24px/1.25 Georgia, "Songti SC", serif; }
.episode-name { margin: 9px 0 4px; color: var(--accent); font-size: 15px; font-weight: 800; }
.episode-controls { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 10px; padding: 16px 18px 0; }
.episode-controls button { min-height: 47px; border: 1px solid var(--line); border-radius: 10px; background: #141415; cursor: pointer; }
.episode-controls .primary { background: var(--ink); color: #111; border-color: var(--ink); font-weight: 800; }
.episode-controls button:disabled { opacity: .35; cursor: default; }

.drawer-scrim { position: fixed; z-index: 20; inset: 0; background: rgba(0,0,0,.65); opacity: 0; pointer-events: none; transition: opacity .18s ease; }
.drawer-scrim.open { opacity: 1; pointer-events: auto; }
.episode-drawer { position: fixed; z-index: 21; left: 50%; bottom: 0; width: min(100%, var(--phone)); max-height: 72dvh; transform: translate(-50%, 105%); background: #19191b; border-radius: 22px 22px 0 0; transition: transform .22s ease; padding-bottom: calc(22px + env(safe-area-inset-bottom)); box-shadow: 0 -24px 60px rgba(0,0,0,.45); }
.episode-drawer.open { transform: translate(-50%, 0); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 21px 20px 14px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 19px; }
.drawer-head button { border: 0; background: transparent; color: #aaa; font-size: 27px; cursor: pointer; }
.season-view[hidden], .season-episodes[hidden] { display: none; }
.season-view > p { margin: 15px 20px 8px; color: var(--muted); font-size: 12px; }
.season-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; max-height: 53dvh; overflow: auto; padding: 10px 20px 8px; }
.season-grid button { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 58px; padding: 0 14px; border: 1px solid var(--line); border-radius: 9px; background: #252527; cursor: pointer; }
.season-grid button.active { border-color: var(--accent); background: rgba(239,90,67,.13); }
.season-grid small, .episode-grid small { color: var(--muted); font-size: 11px; font-weight: 500; }
.season-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px 0; }
.season-toolbar button { border: 0; padding: 8px 0; background: transparent; color: var(--accent); cursor: pointer; }
.episode-ranges { display: flex; gap: 7px; overflow-x: auto; padding: 12px 20px 0; scrollbar-width: none; }
.episode-ranges::-webkit-scrollbar { display: none; }
.episode-ranges button { flex: 0 0 auto; min-height: 34px; padding: 0 11px; border: 1px solid var(--line); border-radius: 99px; background: #242426; color: var(--muted); font-size: 12px; cursor: pointer; }
.episode-ranges button.active { border-color: var(--accent); background: rgba(239,90,67,.13); color: var(--ink); }
.episode-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; max-height: 45dvh; overflow: auto; padding: 14px 20px 8px; }
.episode-grid button { display: grid; gap: 2px; aspect-ratio: 1; place-content: center; border: 1px solid var(--line); border-radius: 9px; background: #252527; font-weight: 750; cursor: pointer; }
.episode-grid button.active { background: var(--accent); border-color: var(--accent); color: white; }
.complete-note { margin: 12px 18px 0; padding: 11px; border-radius: 8px; background: #1b261f; color: #91ddb0; text-align: center; font-size: 13px; }

.admin-screen { background: #0c0c0d; }
.admin-wrap { padding: 18px 20px 40px; }
.admin-title { margin: 12px 0 8px; font: 800 34px/1.15 Georgia, "Songti SC", serif; }
.admin-subtitle { margin: 0 0 26px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.admin-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 18px 0 22px; padding: 4px; border-radius: 11px; background: #171719; }
.admin-tabs button { min-height: 42px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 800; cursor: pointer; }
.admin-tabs button.active { background: #efede8; color: #111; }
[data-admin-panel][hidden], [data-work-detail][hidden], [data-delete-confirm][hidden] { display: none; }
.admin-work-list { display: grid; gap: 12px; }
.admin-merge-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -9px 0 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #151517; }
.admin-merge-toolbar span { color: var(--muted); font-size: 12px; }
.admin-merge-toolbar button { min-height: 38px; padding: 0 15px; border: 0; border-radius: 8px; background: var(--accent); color: white; font-weight: 800; cursor: pointer; }
.admin-merge-toolbar button:disabled { opacity: .4; cursor: default; }
.admin-merge-preview-card { margin: 0 0 14px; padding: 15px; border: 1px solid rgba(239,90,67,.45); border-radius: 12px; background: rgba(239,90,67,.07); }
.admin-merge-preview-card h2 { margin: 0; font: 700 19px/1.4 Georgia, "Songti SC", serif; }
.admin-merge-preview-card > p:not(.candidate-label) { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.admin-merge-seasons { display: grid; gap: 8px; margin: 12px 0; }
.admin-merge-seasons > div { display: grid; gap: 4px; padding: 10px; border-radius: 8px; background: rgba(0,0,0,.24); }
.admin-merge-seasons strong { font-size: 12px; }
.admin-merge-seasons span, .admin-merge-seasons small { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.admin-merge-error { display: block; min-height: 16px; margin-top: 8px; color: #ff8d7c; }
.admin-work-card { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #151517; }
.admin-merge-select { display: flex; align-items: center; gap: 8px; width: max-content; margin: 0 0 11px; color: var(--muted); font-size: 11px; cursor: pointer; }
.admin-merge-select input { accent-color: var(--accent); }
.admin-work-main { display: grid; grid-template-columns: 76px 1fr; gap: 13px; }
.admin-work-cover { display: grid; width: 76px; height: 102px; place-items: center; overflow: hidden; border-radius: 8px; background: #242426; color: #777; font-size: 11px; }
.admin-work-cover img { width: 100%; height: 100%; object-fit: cover; }
.admin-work-copy { min-width: 0; }
.admin-work-copy h2 { margin: 4px 0 8px; font-size: 17px; line-height: 1.35; }
.admin-work-copy p { margin: 4px 0; overflow-wrap: anywhere; color: var(--muted); font-size: 11px; }
.admin-work-type { color: var(--accent); font-size: 10px; font-weight: 850; letter-spacing: .5px; }
.admin-work-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 13px; }
.admin-work-actions button, .admin-delete-confirm button { min-height: 40px; border: 1px solid var(--line); border-radius: 8px; background: #242426; cursor: pointer; }
.admin-work-actions button.danger, .admin-delete-confirm button.danger { border-color: rgba(255,98,78,.42); color: #ff8d7c; }
.admin-follow-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 13px; }
.admin-follow-actions button { min-height: 38px; border: 1px solid var(--line); border-radius: 8px; background: #1e1e20; color: #ddd; cursor: pointer; }
.admin-follow-actions button:disabled { opacity: .45; cursor: default; }
.follow-state { color: #80d39b !important; }
.follow-state.review { color: #ff9e73 !important; }
.admin-work-detail { margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); }
.admin-detail-loading, .admin-detail-error, .admin-empty { padding: 18px; color: var(--muted); text-align: center; font-size: 12px; }
.admin-detail-error { color: #ff8d7c; }
.admin-season-head { display: flex; justify-content: space-between; margin-bottom: 9px; font-size: 12px; }
.admin-season-head span { color: var(--muted); }
.admin-season-list { display: grid; gap: 7px; max-height: 260px; overflow: auto; }
.admin-season-list > div { display: grid; gap: 4px; padding: 9px 10px; border-radius: 7px; background: #202022; font-size: 12px; }
.admin-season-list small { overflow-wrap: anywhere; color: var(--muted); }
.admin-review { display: grid; gap: 8px; margin-top: 12px; padding: 12px; border: 1px solid rgba(255,158,115,.45); border-radius: 9px; background: rgba(255,158,115,.07); }
.admin-review > div:not(.candidate-actions) { display: grid; gap: 3px; padding: 8px; background: rgba(0,0,0,.22); }
.admin-review small { overflow-wrap: anywhere; color: var(--muted); }
.admin-discovery-preview { margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #151517; }
.admin-discovery-preview h2 { margin: 5px 0; font-size: 20px; }
.discovery-season-list { display: grid; gap: 7px; max-height: 420px; margin: 14px 0; overflow: auto; }
.discovery-season-list > div { display: grid; grid-template-columns: 82px 1fr auto; align-items: center; gap: 8px; padding: 9px; border-radius: 7px; background: #202022; font-size: 11px; }
.discovery-season-list > div.complete small { color: #80d39b; }
.discovery-season-list > div.incomplete small { color: #ff8d7c; }
.discovery-work-issue { margin: 12px 0; padding: 12px; border: 1px solid rgba(255,141,124,.55); border-radius: 9px; background: rgba(123,42,31,.22); }
.discovery-work-issue strong { color: #ffb1a5; }
.discovery-work-issue p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.discovery-issues { display: grid; gap: 8px; margin: 12px 0; }
.discovery-issues h3 { margin: 0; color: #ffb1a5; font-size: 14px; }
.discovery-issue { display: grid; gap: 4px; padding: 10px; border: 1px solid rgba(255,141,124,.35); border-radius: 8px; background: rgba(0,0,0,.2); }
.discovery-issue span { color: var(--muted); font-size: 11px; }
.discovery-issue p { margin: 0; overflow-wrap: anywhere; color: var(--muted); font-size: 11px; }
.discovery-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.candidate-compare { display: grid; gap: 10px; margin: 14px 0; padding: 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; background: rgba(255,255,255,.025); }
.candidate-compare-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.candidate-compare-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.candidate-compare-head > span { color: #ffb1a5; font-size: 11px; white-space: nowrap; }
.candidate-compare-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.candidate-compare-card { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #202022; }
.candidate-compare-card.selected { border-color: #80d39b; }
.candidate-compare-cover { width: 88px; aspect-ratio: 3 / 4; display: grid; place-items: center; overflow: hidden; border-radius: 7px; background: #111; color: var(--muted); font-size: 10px; text-align: center; }
.candidate-compare-cover img { width: 100%; height: 100%; object-fit: cover; }
.candidate-compare-copy { min-width: 0; }
.candidate-compare-copy > span { color: #ffb1a5; font-size: 10px; }
.candidate-compare-copy h4 { margin: 5px 0 8px; font-size: 13px; }
.candidate-compare-copy p { margin: 4px 0; overflow-wrap: anywhere; color: var(--muted); font-size: 10px; }
.candidate-compare-copy button { width: 100%; min-height: 38px; margin-top: 9px; border: 1px solid var(--line); border-radius: 7px; background: #2b2b2e; color: var(--text); }
.candidate-episode-samples { display: grid; gap: 3px; margin-top: 8px; padding: 7px; border-radius: 6px; background: rgba(0,0,0,.2); font-size: 9px; overflow-wrap: anywhere; }
.candidate-episode-samples strong { margin-top: 3px; color: var(--muted); }
.candidate-authority-confirm { padding: 11px; border: 1px solid rgba(255,141,124,.45); border-radius: 8px; background: rgba(123,42,31,.2); }
.candidate-authority-confirm p { margin: 6px 0; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.candidate-authority-confirm > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 9px; }
.candidate-authority-confirm button { min-height: 40px; border: 1px solid var(--line); border-radius: 7px; background: #2b2b2e; color: var(--text); }
.admin-delete-confirm { margin-top: 13px; padding: 13px; border: 1px solid rgba(255,98,78,.35); border-radius: 9px; background: rgba(255,98,78,.07); }
.admin-delete-confirm strong { font-size: 13px; }
.admin-delete-confirm p { margin: 8px 0 11px; color: var(--muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.admin-delete-confirm > div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.admin-delete-confirm small { display: block; min-height: 16px; margin-top: 7px; color: #ff8d7c; }
.input-row { display: grid; gap: 10px; }
.input-row input, .input-row textarea { width: 100%; min-height: 52px; padding: 14px 15px; border: 1px solid #343436; border-radius: 10px; outline: 0; background: #171719; color: white; resize: vertical; line-height: 1.55; }
.input-row input:focus, .input-row textarea:focus { border-color: #777; }
.primary-button { min-height: 51px; border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 850; cursor: pointer; }
.primary-button:disabled { opacity: .5; cursor: wait; }
.sample-hint { margin: 10px 2px 0; color: #6f6d71; font-size: 11px; word-break: break-all; }
.status-line { display: flex; align-items: center; gap: 9px; min-height: 44px; margin-top: 13px; padding: 0 4px; color: #bbb7bc; font-size: 13px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #606066; }
.status-line.loading .status-dot { background: var(--accent); box-shadow: 0 0 0 5px rgba(239,90,67,.14); }
.status-line.success .status-dot { background: var(--green); }
.status-line.error { color: #ff8d7c; }
.status-line.error .status-dot { background: #ff624e; }
.parsed-card { margin-top: 17px; border-top: 1px solid var(--line); padding-top: 22px; }
.parsed-hero { display: grid; grid-template-columns: 92px 1fr; gap: 16px; align-items: start; }
.parsed-hero img { width: 92px; height: 126px; object-fit: cover; border-radius: 8px; background: #242426; }
.parsed-hero h2 { margin: 4px 0 10px; font: 700 21px/1.3 Georgia, "Songti SC", serif; }
.parsed-meta { margin: 5px 0; color: var(--muted); font-size: 12px; word-break: break-all; }
.discovery-complete { display: grid; gap: 5px; margin: 20px 0 10px; padding: 13px; border: 1px solid rgba(82,197,139,.3); border-radius: 9px; background: rgba(82,197,139,.08); }
.discovery-complete strong { color: #9ce1b7; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; }
.discovery-complete span { color: var(--muted); font-size: 12px; }
.batch-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.batch-head h2 { margin: 0; font: 700 21px/1.3 Georgia, "Songti SC", serif; }
.batch-head span { color: var(--green); font-size: 12px; }
.batch-note { margin: 12px 0 16px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.batch-results { display: grid; gap: 12px; }
.batch-result { display: grid; grid-template-columns: 72px 1fr; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #151517; }
.batch-result img { width: 72px; height: 98px; object-fit: cover; border-radius: 7px; background: #242426; }
.batch-result h3 { margin: 3px 0 8px; font-size: 15px; line-height: 1.35; }
.batch-result p { margin: 3px 0; color: var(--muted); font-size: 11px; word-break: break-all; }
.batch-index { color: var(--accent); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.batch-error { grid-template-columns: 1fr; border-color: rgba(255,98,78,.35); }
.work-candidate { margin: 17px 0; padding: 17px; border: 1px solid rgba(239,90,67,.45); border-radius: 12px; background: rgba(239,90,67,.07); }
.candidate-label { margin: 0 0 7px; color: var(--accent); font-size: 12px; font-weight: 800; }
.work-candidate h2 { margin: 0; font: 700 20px/1.35 Georgia, "Songti SC", serif; }
.candidate-total { margin: 7px 0 13px; color: #ddd9d4; font-size: 14px; font-weight: 750; }
.candidate-seasons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 14px; padding: 12px; border-radius: 9px; background: rgba(0,0,0,.22); }
.candidate-seasons div { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.candidate-seasons strong { color: var(--ink); }
.candidate-note { margin: 12px 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.candidate-actions { display: grid; grid-template-columns: 1.25fr 1fr; gap: 8px; }
.candidate-actions button { min-height: 45px; border: 1px solid var(--line); border-radius: 9px; background: #242426; cursor: pointer; }
.candidate-actions .primary-button { border: 0; background: var(--accent); }
.candidate-actions button:disabled { opacity: .5; cursor: wait; }
.selection-head { margin-top: 25px; display: flex; align-items: center; justify-content: space-between; }
.selection-head h3 { margin: 0; font-size: 16px; }
.selected-count { color: var(--accent); font-size: 12px; }
.quick-actions { display: flex; gap: 7px; margin: 13px 0; overflow-x: auto; }
.quick-actions button { flex: 0 0 auto; padding: 8px 11px; border: 1px solid var(--line); border-radius: 7px; background: #1b1b1d; font-size: 12px; cursor: pointer; }
.import-episodes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-height: 300px; overflow: auto; padding: 4px 2px 13px; }
.episode-check { position: relative; }
.episode-check input { position: absolute; opacity: 0; }
.episode-check span { display: grid; place-items: center; min-height: 42px; border: 1px solid var(--line); border-radius: 8px; background: #18181a; color: #a5a2a7; font-size: 12px; cursor: pointer; }
.episode-check input:checked + span { border-color: var(--accent); background: rgba(239,90,67,.13); color: white; }
.import-button { width: 100%; margin-top: 9px; }
.import-success { margin-top: 16px; padding: 15px; border: 1px solid rgba(82,197,139,.25); background: rgba(82,197,139,.08); border-radius: 10px; color: #9ce1b7; font-size: 13px; line-height: 1.6; }
.import-success a { text-decoration: underline; font-weight: 750; }
.empty-state, .loading-state { padding: 80px 24px; color: var(--muted); text-align: center; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); width: max-content; max-width: calc(100% - 40px); padding: 11px 15px; border-radius: 8px; background: #efede8; color: #111; font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none; transition: .18s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 700px) {
  body { padding: 24px 0; }
  #app { min-height: calc(100dvh - 48px); border: 1px solid #272729; border-radius: 20px; }
  .screen { min-height: calc(100dvh - 50px); }
  .episode-drawer { bottom: 24px; border-radius: 22px; }
}

@media (max-height: 720px) {
  .video-stage { aspect-ratio: 9 / 12.7; }
  .player-info { padding-top: 12px; }
}
