/* Stream: dark, Netflix-style theme. No external fonts; system font stack only. */
:root {
  --bg: #141414;
  --surface: #1f1f1f;
  --surface-2: #2a2a2a;
  --line: #333;
  --text: #e5e5e5;
  --text-strong: #fff;
  --muted: #a3a3a3;
  --accent: #e50914;
  --accent-hover: #f6121d;
  --ok: #46d369;
  --warn: #f5b041;
  --danger: #e87c03;
  --gutter: 16px;
  --gap: 8px;
  --card-w: clamp(100px, 27vw, 184px);
  --radius: 6px;
  --header-h: 104px;
  color-scheme: dark;
}
@media (min-width: 700px) {
  :root { --gutter: 32px; --header-h: 64px; }
}
@media (min-width: 1100px) {
  :root { --gutter: 4%; --gap: 10px; }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
img { display: block; }
h1, h2, h3 { color: var(--text-strong); line-height: 1.2; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sr-only, .card-caption {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85em; overflow-wrap: anywhere; }

/* ---- header ---- */
#site-header {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(to bottom, rgba(0,0,0,.85), rgba(20,20,20,.92));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  padding: 10px var(--gutter);
}
.logo {
  color: var(--accent); font-weight: 900; font-size: 1.5rem; letter-spacing: 0.04em;
  text-decoration: none; line-height: 1;
}
.main-nav { display: none; gap: 18px; }
.nav-link { color: var(--text); text-decoration: none; font-size: 0.95rem; }
.nav-link:hover { color: var(--muted); }
.nav-link.active { color: var(--text-strong); font-weight: 700; }
.search {
  order: 3; flex: 1 1 100%;
  display: flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,.6); border: 1px solid #555; border-radius: 4px;
  padding: 0 10px; min-width: 0;
}
.search:focus-within { border-color: #fff; }
.search-icon { width: 18px; height: 18px; flex: none; color: var(--muted); }
.search input {
  flex: 1; min-width: 0; height: 38px; border: 0; background: transparent; outline: none;
}
.search input::-webkit-search-cancel-button { filter: invert(1); }
.user-menu { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 0.9rem; min-width: 0; }
.user-name { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 30vw; }
.btn-link { background: none; border: 0; padding: 4px 0; cursor: pointer; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 700px) {
  .header-inner { flex-wrap: nowrap; min-height: var(--header-h); padding-block: 0; }
  .main-nav { display: flex; }
  .search { order: 0; flex: 0 1 300px; margin-left: auto; }
  .user-menu { margin-left: 0; }
  .user-name { max-width: 140px; }
}

/* ---- generic layout ---- */
.page { padding: 24px var(--gutter) 64px; max-width: 1400px; }
.page-gutter { padding-inline: var(--gutter); }
.page-title { font-size: 1.5rem; margin: 0 0 20px; }
.page-title q { color: var(--text-strong); }
.section-title { font-size: 1.15rem; margin: 0 0 12px; }
.empty { color: var(--muted); padding: 32px 0; }

.loading { display: flex; align-items: center; gap: 12px; color: var(--muted); padding: 32px 0; }
.spin {
  width: 22px; height: 22px; flex: none; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.2); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.5s; } }

.error-box {
  margin: 24px 0; padding: 20px; max-width: 560px;
  background: var(--surface); border-left: 4px solid var(--accent); border-radius: var(--radius);
}
.error-box p { margin: 0 0 12px; }
.error-title { font-weight: 700; color: var(--text-strong); }
.error-msg { color: #ff8a8a; overflow-wrap: anywhere; }
.error-box .error-msg { color: var(--text); }

/* ---- buttons, badges ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 8px 22px; border: 0; border-radius: 4px;
  font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, opacity .15s;
}
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: #fff; color: #000; }
.btn-primary:hover:not(:disabled) { background: rgba(255,255,255,.78); }
.btn-secondary { background: rgba(109,109,110,.7); color: #fff; }
.btn-secondary:hover:not(:disabled) { background: rgba(109,109,110,.45); }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px #666; }
.btn-ghost:hover:not(:disabled) { box-shadow: inset 0 0 0 1px #fff; }
.btn-danger { background: transparent; color: #ff6b6b; box-shadow: inset 0 0 0 1px #8a2b2b; }
.btn-danger:hover:not(:disabled) { background: rgba(229,9,20,.15); }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: 0.9rem; }
.btn-block { width: 100%; }
@media (max-width: 480px) { .btn:not(.btn-sm) { padding-inline: 16px; } }
.icon-btn {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--surface-2); color: #fff; font-size: 1.6rem; line-height: 1;
}
.icon-btn:hover { background: #3a3a3a; }

.badge {
  display: inline-block; padding: 2px 7px; border-radius: 3px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; line-height: 1.5; white-space: nowrap;
}
.badge-library { background: var(--ok); color: #04210c; }
.badge-best { background: var(--accent); color: #fff; }
.badge-direct { background: rgba(70,211,105,.15); color: var(--ok); box-shadow: inset 0 0 0 1px rgba(70,211,105,.5); }
.badge-off { background: #5a1d1d; color: #ffb3b3; }
.chip {
  display: inline-block; padding: 1px 7px; border-radius: 3px; font-size: 0.72rem; line-height: 1.6;
  background: var(--surface-2); color: var(--muted); white-space: nowrap; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; vertical-align: middle;
}
.chip-warn { color: var(--warn); background: rgba(245,176,65,.12); white-space: normal; }

/* ---- tabs ---- */
.tabs { display: flex; gap: 8px; padding-top: 12px; padding-bottom: 12px; }
.tab {
  padding: 5px 14px; border-radius: 999px; text-decoration: none; font-size: 0.9rem;
  box-shadow: inset 0 0 0 1px #777; color: var(--text);
}
.tab.active { background: #fff; color: #000; box-shadow: none; font-weight: 700; }
@media (min-width: 700px) { .view-home .tabs { display: none; } }

/* ---- pictures ---- */
.pic { position: relative; overflow: hidden; background: var(--surface); }
.pic img { width: 100%; height: 100%; object-fit: cover; }
.pic-fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 10px; text-align: center; font-weight: 700; font-size: 0.85rem; color: var(--muted);
  background: linear-gradient(135deg, #2b2b2b, #1a1a1a); overflow-wrap: anywhere;
}
.poster { aspect-ratio: 2 / 3; border-radius: var(--radius); }

/* ---- hero ---- */
.hero { position: relative; margin-bottom: 8px; }
.hero-bg { width: 100%; aspect-ratio: 16 / 9; max-height: 82vh; background: var(--bg); }
.hero-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, var(--bg) 0%, rgba(20,20,20,.6) 22%, rgba(20,20,20,0) 50%),
    linear-gradient(to right, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 55%);
}
.hero-body { position: relative; padding: 0 var(--gutter); margin-top: -48px; }
.hero-title { font-size: clamp(1.6rem, 6vw, 3.4rem); margin: 0 0 8px; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 8px; color: var(--text); font-weight: 600; font-size: 0.95rem; }
.hero-overview {
  margin: 0 0 16px; max-width: 640px; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
}
.hero-actions, .title-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 700px) {
  .view-home.has-hero { margin-top: calc(-1 * var(--header-h)); }
  .hero-body {
    position: absolute; left: 0; bottom: 18%; margin: 0;
    width: min(46%, 640px); padding: 0 0 0 var(--gutter); box-sizing: content-box;
  }
  .hero-overview { -webkit-line-clamp: 4; font-size: 1.05rem; }
  .hero { margin-bottom: -6%; }
}

/* ---- rows ---- */
.rows { position: relative; padding-bottom: 48px; }
.row { margin: 0 0 28px; }
.row-title { font-size: 1.1rem; margin: 0 0 8px; padding: 0 var(--gutter); }
.row-wrap { position: relative; }
.row-track {
  display: flex; gap: var(--gap);
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  padding: 4px var(--gutter) 8px;
  scrollbar-width: none;
}
.row-track::-webkit-scrollbar { display: none; }
.row-track > .card { flex: 0 0 var(--card-w); scroll-snap-align: start; }
.row-arrow { display: none; }
@media (hover: hover) and (min-width: 700px) {
  .row-arrow {
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: 4px; bottom: 8px; z-index: 2; width: calc(var(--gutter) - 4px); min-width: 28px;
    border: 0; padding: 0; cursor: pointer; color: #fff; font-size: 2.2rem;
    background: rgba(20,20,20,.6); opacity: 0; transition: opacity .2s;
  }
  .row-prev { left: 0; }
  .row-next { right: 0; }
  .row-wrap:hover .row-arrow, .row-arrow:focus-visible { opacity: 1; }
}

.card { position: relative; display: block; text-decoration: none; border-radius: var(--radius); }
.card .poster { transition: transform .2s, box-shadow .2s; }
.card .badge-library { position: absolute; left: 6px; top: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
@media (hover: hover) {
  .card:hover .poster { transform: scale(1.04); box-shadow: 0 6px 18px rgba(0,0,0,.6); }
}

.grid {
  display: grid; gap: 16px var(--gap);
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
}
@media (min-width: 700px) { .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); } }

/* ---- title page ---- */
.title-hero { position: relative; }
.title-bg { width: 100%; aspect-ratio: 16 / 9; max-height: 70vh; }
.title-body {
  position: relative; padding: 0 var(--gutter); margin-top: -56px;
  display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr);
}
.title-poster { display: none; }
.title-name { font-size: clamp(1.6rem, 6vw, 3rem); margin: 0 0 8px; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
.title-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 6px; font-weight: 600; }
.title-genres { margin: 0 0 16px; color: var(--muted); }
.title-overview { margin: 18px 0 0; max-width: 760px; }
.cast { margin-top: 24px; }
.cast-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cast-list li {
  display: flex; flex-direction: column; padding: 8px 12px; border-radius: var(--radius);
  background: var(--surface); min-width: 0; max-width: 100%;
}
.cast-name { font-weight: 600; font-size: 0.9rem; }
.cast-role { color: var(--muted); font-size: 0.8rem; }
@media (min-width: 900px) {
  .title-body { grid-template-columns: 220px minmax(0, 1fr); margin-top: -180px; align-items: start; }
  .title-poster { display: block; box-shadow: 0 8px 30px rgba(0,0,0,.6); }
  .title-info { padding-top: 60px; }
}

.episodes { margin: 40px 0 64px; }
.episodes-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.episodes-head .section-title { margin: 0; font-size: 1.4rem; }
select {
  background: var(--surface-2); border: 1px solid #555; border-radius: 4px;
  padding: 8px 12px; min-height: 40px; max-width: 100%;
}
.episode-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.episode {
  display: grid; gap: 12px 16px; padding: 16px 0; border-bottom: 1px solid var(--line);
  grid-template-columns: 128px minmax(0, 1fr);
}
.still { aspect-ratio: 16 / 9; border-radius: 4px; }
.still .pic-fallback { font-size: 0.75rem; }
.episode-title { margin: 0 0 4px; font-size: 1rem; }
.episode-num { color: var(--muted); }
.episode-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 6px; color: var(--muted); font-size: 0.85rem; }
.episode-overview { margin: 0 0 10px; color: var(--muted); font-size: 0.9rem; }
.episode-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 559px) {
  .episode-overview, .episode-actions { grid-column: 1 / -1; }
  .episode-body { display: contents; }
  .episode-title, .episode-meta { grid-column: 2; }
  .episode .still { grid-row: 1 / span 2; }
}
@media (min-width: 700px) { .episode { grid-template-columns: 220px minmax(0, 1fr); } }

/* ---- picker dialog ---- */
dialog.picker {
  width: min(980px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  padding: 0; border: 0; border-radius: 8px;
  background: #181818; color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.7);
  overflow: hidden; display: flex; flex-direction: column;
}
dialog.picker:not([open]) { display: none; }
dialog.picker::backdrop { background: rgba(0,0,0,.72); }
.picker-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: 18px 20px 12px; border-bottom: 1px solid var(--line);
}
.picker-head h2 { margin: 0; font-size: 1.25rem; }
.picker-sub { margin: 4px 0 0; color: var(--muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.picker-body { padding: 8px 20px 20px; overflow-y: auto; overscroll-behavior: contain; }
.picker-status { margin: 12px 0; color: var(--muted); }
.picker-status.error-msg { color: #ff8a8a; }
.picker-status-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; }
.picker-hint { color: var(--muted); font-size: 0.9rem; margin: 10px 0; }
.picker-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 4px; }
.ok-msg { color: var(--ok); font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
@media (max-width: 699px) {
  dialog.picker { width: 100vw; max-width: 100vw; height: 100%; max-height: 100%; margin: 0; border-radius: 0; }
  .picker-head { padding: 14px 16px 10px; }
  .picker-body { padding: 4px 16px 24px; }
}

.seg { display: inline-flex; border-radius: 4px; overflow: hidden; box-shadow: inset 0 0 0 1px #555; }
.seg button { border: 0; background: transparent; padding: 8px 14px; min-height: 38px; cursor: pointer; font-size: 0.9rem; }
.seg button.on { background: #fff; color: #000; font-weight: 700; }

.rel-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.rel-table th {
  text-align: left; font-weight: 600; color: var(--muted); font-size: 0.8rem;
  padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.rel-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.rel-table td.c-size, .rel-table td.c-seeds, .rel-table td.c-age { white-space: nowrap; }
.rel-table td.c-indexer { color: var(--muted); }
.rel-name { overflow-wrap: anywhere; word-break: break-word; }
.rel-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rel-tags:empty { display: none; }
.rel-pick {
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer;
  text-align: left; color: var(--text-strong); font-weight: 600;
}
.rel-row { transition: background-color .12s; }
.rel-table:not(.rel-download) .rel-row { cursor: pointer; }
.rel-table:not(.rel-download) .rel-row:hover { background: var(--surface-2); }
.rel-row.best { background: rgba(229,9,20,.10); box-shadow: inset 3px 0 0 var(--accent); }
.rel-row.best .badge-best { margin-bottom: 6px; }
.rel-row.poor { opacity: .6; }
.rel-row.busy { pointer-events: none; opacity: .5; }
.rel-row.starting { opacity: 1; background: var(--surface-2); }
.rel-row.rejected { opacity: .6; }
.rel-download .rel-name { color: var(--text-strong); }
@media (max-width: 699px) {
  .rel-table thead { display: none; }
  .rel-table, .rel-table tbody { display: block; }
  .rel-table tr {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px;
    padding: 12px 10px; border-bottom: 1px solid var(--line);
  }
  .rel-table td { display: block; padding: 0; border: 0; }
  .rel-table td.c-title { flex: 1 1 100%; margin-bottom: 4px; }
  .rel-table td[data-label]::before { content: attr(data-label) " "; color: var(--muted); font-size: 0.78rem; }
  .rel-table td.c-grab { margin-left: auto; }
}

/* ---- auth ---- */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  background: radial-gradient(ellipse at top, #3a0a0d 0%, var(--bg) 60%);
}
.auth-card {
  width: 100%; max-width: 420px; padding: 32px 28px; border-radius: 8px;
  background: rgba(0,0,0,.75);
}
.auth-logo { font-size: 2rem; margin-bottom: 24px; }
.auth-title { font-size: 1.8rem; margin: 0 0 18px; }
.auth-text { color: var(--muted); margin: 0 0 18px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 0.9rem; color: var(--muted); }
.field-hint { font-size: 0.8rem; color: var(--muted); }
.field input, .invite-url {
  height: 48px; padding: 0 14px; border-radius: 4px; border: 1px solid #555;
  background: #333; color: #fff; min-width: 0; width: 100%;
}
.field input:focus, .invite-url:focus { border-color: #fff; outline: none; }
.form-error { color: #ff8a8a; margin: 0; min-height: 1.2em; font-size: 0.9rem; }
.form-error:empty { min-height: 0; }
.auth-form .btn-block { margin-top: 6px; height: 48px; }
@media (max-width: 400px) { .auth-card { padding: 28px 18px; } }

/* ---- admin ---- */
.panel { background: var(--surface); border-radius: 8px; padding: 20px; margin-bottom: 20px; max-width: 820px; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.panel-head .section-title { margin: 0; }
.panel .muted { margin: 8px 0 12px; font-size: 0.9rem; }
.invite-row { display: flex; gap: 8px; margin-top: 8px; }
.invite-url { height: 42px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85rem; flex: 1; }
.user-list { list-style: none; margin: 0; padding: 0; }
.user-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  padding: 12px 0; border-top: 1px solid var(--line);
}
.user-row:first-child { border-top: 0; }
.user-info { display: flex; flex-direction: column; min-width: 0; }
.user-row-name { font-weight: 700; color: var(--text-strong); overflow-wrap: anywhere; }
.user-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: 0.85rem; }
.user-row.disabled .user-row-name { color: var(--muted); }
.user-actions { display: flex; gap: 8px; }
@media (max-width: 480px) { .panel { padding: 16px; } }

/* ---- toast ---- */
#toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translate(-50%, 20px);
  max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 6px;
  background: #e5e5e5; color: #000; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.5);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.error { background: #b20710; color: #fff; }

/* ---- player ---- */
body[data-view="player"] { background: #000; }
body[data-view="player"] #site-header { display: none; }
.player { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: #000; }
.player-top {
  display: flex; align-items: center; gap: 12px;
  padding: max(8px, env(safe-area-inset-top)) var(--gutter) 8px;
}
.player-back { flex: none; font-size: 1.8rem; line-height: 1; }
.player-heading { flex: 1; min-width: 0; }
.player-title { margin: 0; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-sub { margin: 2px 0 0; color: var(--muted); font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-tools { flex: none; display: flex; gap: 8px; }
.player-stage {
  position: relative; flex: 1; display: flex; align-items: center; justify-content: center;
  min-height: 56vw; max-height: calc(100dvh - 120px); background: #000; overflow: hidden;
}
.player-video { display: block; width: 100%; height: 100%; max-height: calc(100dvh - 120px); background: #000; }
.player-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 16px; pointer-events: none; text-align: center;
}
.player-overlay > * { pointer-events: auto; }
.ov-box {
  max-width: min(440px, 100%); padding: 18px 20px; border-radius: 8px;
  background: rgba(20,20,20,.82); display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.ov-box .loading { padding: 0; }
.ov-title { margin: 0; color: var(--text-strong); font-weight: 700; font-size: 1.05rem; }
.ov-msg { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.ov-stats { margin: 0; color: var(--muted); font-size: 0.85rem; }
.ov-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
.ov-progress { width: min(320px, 70vw); display: flex; flex-direction: column; gap: 8px; }
.ov-progress .bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.2); overflow: hidden; }
.ov-progress .bar > span { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.ov-play { font-size: 1.1rem; }
.player-banner {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px);
  padding: 8px 14px; border-radius: 6px; background: #b20710; color: #fff; font-weight: 600; font-size: 0.9rem;
}
.player-below { padding: 8px var(--gutter) max(16px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 6px; }
.player-info { margin: 0; color: var(--muted); font-size: 0.85rem; }
.player-chip { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--text); font-size: 0.9rem; }

/* ---- continue watching ---- */
.continue-card .continue-bar {
  position: absolute; left: 6px; right: 6px; bottom: 6px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,.3); overflow: hidden;
}
.continue-card .continue-bar > span { display: block; height: 100%; background: var(--accent); }
.continue-card .continue-ep {
  position: absolute; left: 6px; top: 6px; padding: 2px 6px; border-radius: 4px;
  background: rgba(0,0,0,.75); color: #fff; font-size: 0.75rem; font-weight: 700;
}

/* ---- cast bar (casting after the player was left) ---- */
.cast-bar {
  position: fixed; left: 50%; bottom: 16px; z-index: 90; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px);
  padding: 8px 8px 8px 14px; border-radius: 8px; background: var(--surface-2); box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.cast-bar-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
