:root {
  --navy: #22577B; --cyan: #00DCF9; --mint: #00EDD0; --red: #D7262E;
  --ink: #1C2833; --muted: #5B6B78; --line: #D5DDE3; --bg: #F3F6F8; --card: #FFFFFF;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
header.bar { display: flex; align-items: center; gap: 16px; padding: 12px 20px; background: var(--navy); color: #fff; }
header.bar img { height: 34px; }
header.bar .spacer { flex: 1; }
header.bar a, header.bar button.link { color: #fff; }
main { max-width: 960px; margin: 0 auto; padding: 24px 16px 64px; }
h1 { font-size: 1.6rem; margin: 0 0 4px; color: var(--navy); }
h2 { font-size: 1.15rem; margin: 28px 0 10px; color: var(--navy); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.muted { color: var(--muted); }
.error { color: var(--red); font-weight: 600; }
.ok { color: #0B7A5F; font-weight: 600; }
button, .btn { font: inherit; font-weight: 600; border: 0; border-radius: 10px; padding: 12px 18px; cursor: pointer;
  background: var(--cyan); color: var(--navy); text-decoration: none; display: inline-block; min-height: 44px; }
button.secondary, .btn.secondary { background: #E6EDF2; color: var(--ink); }
button.danger { background: var(--red); color: #fff; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.link { background: none; padding: 0; min-height: 0; text-decoration: underline; color: var(--navy); }
input, select { font: inherit; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; width: 100%; background: #fff; min-height: 44px; }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
.stages { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.chip { border: 2px solid var(--navy); border-radius: 999px; padding: 4px 12px; font-size: .85rem; font-weight: 700; }
.chip.done { background: var(--mint); border-color: var(--mint); }
.chip.now { background: var(--navy); color: #fff; }
.progress { height: 10px; background: #E6EDF2; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--mint); }
.episodes { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.episodes li a, .episodes li > div { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line); color: inherit; text-decoration: none; }
.episodes .num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: #E6EDF2; flex: none; }
.episodes .watched .num { background: var(--mint); }
.episodes .available .num { background: var(--cyan); }
.episodes .locked, .episodes .coming_soon { opacity: .55; }
.episodes .state { margin-left: auto; font-size: .85rem; color: var(--muted); white-space: nowrap; }
.player { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; display: block; }
.options { display: grid; gap: 10px; margin-top: 14px; }
.options button { text-align: left; background: #fff; border: 2px solid var(--line); color: var(--ink); font-weight: 500; }
.options button.picked { border-color: var(--navy); background: #E8F4FA; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap { overflow-x: auto; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
@media (max-width: 600px) { main { padding: 16px 12px 48px; } h1 { font-size: 1.35rem; } }
