[hidden] { display: none !important; }
:root {
  --bg: #0b0b10;
  --surface: #15151c;
  --surface-2: #1d1d26;
  --surface-3: #282832;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f3f3f6;
  --muted: #a0a0ad;
  --faint: #6c6c79;
  --accent: #3b82f6;
  --good: #22c55e;
  --bad: #ff4d5e;
  --tabs: 68px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; }

#view { padding-bottom: calc(var(--tabs) + var(--safe-bottom) + 16px); min-height: 100vh; }
body.no-tabs #view { padding-bottom: calc(var(--safe-bottom) + 16px); }

/* ---------- bottom tab bar: a floating pill; the chosen tab is a lighter pill with its name ---------- */
#tabs {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--safe-bottom) + 10px); z-index: 20;
  display: flex; align-items: center; gap: 2px; padding: 5px; max-width: calc(100% - 24px);
  background: rgba(22, 22, 27, 0.94); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.10); border-radius: 999px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
#tabs a { flex: none; display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 13px;
  border-radius: 999px; color: var(--faint); font-size: 14px; font-weight: 700; transition: background 0.2s, padding 0.2s; }
#tabs a svg { width: 23px; height: 23px; fill: currentColor; }
#tabs a span { display: none; }
#tabs a.on { color: white; background: rgba(255, 255, 255, 0.14); padding: 0 16px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
#tabs a.on span { display: inline; }
#tabs a[data-tab="more"] { position: relative; margin-left: 13px; }
#tabs a[data-tab="more"]::before { content: ""; position: absolute; left: -8px; top: 11px; width: 1px; height: 22px; background: rgba(255, 255, 255, 0.18); }

/* ---------- common ---------- */
.page { padding: calc(var(--safe-top) + 14px) 16px 0; }
.bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; min-height: 40px; }
.bar h1 { font-size: 26px; margin: 0; flex: 1; letter-spacing: -0.4px; }
h2 { font-size: 18px; margin: 22px 0 10px; letter-spacing: -0.2px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.center { text-align: center; }
.spacer { flex: 1; }
.empty { padding: 40px 12px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 12px 18px; font-weight: 700;
  background: var(--surface-3); color: var(--text);
}
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.btn.primary { background: var(--accent); color: white; }
.btn.white { background: white; color: #0b0b10; }
.btn.small { padding: 8px 12px; border-radius: 10px; font-size: 13px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: 0.5; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--surface-2); flex: none; }
.icon-btn svg { width: 22px; height: 22px; fill: currentColor; }

.field {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); outline: none; font-size: 16px; /* 16px: iOS doesn't zoom in */
}
.field:focus { border-color: var(--accent); }
select.field { appearance: none; -webkit-appearance: none; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 6px; margin: 0 -16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 14px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 600; border: 0; white-space: nowrap; }
.chip.on { background: var(--accent); color: white; }

.spinner { width: 28px; height: 28px; margin: 40px auto; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

#toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(var(--tabs) + var(--safe-bottom) + 12px); z-index: 50;
  padding: 12px 16px; border-radius: 12px; background: var(--surface-3); box-shadow: 0 8px 30px rgba(0,0,0,0.5); font-weight: 600;
}

/* ---------- login and profiles ---------- */
.login { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 24px; max-width: 420px; margin: 0 auto; gap: 14px; }
.login img { width: 84px; height: 84px; margin: 0 auto 6px; border-radius: 20px; }
.login h1 { text-align: center; margin: 0 0 8px; }
.error { color: var(--bad); font-weight: 600; min-height: 20px; text-align: center; }
.who { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 24px; }
.who h1 { text-align: center; font-size: 26px; }
.who-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 22px; max-width: 520px; margin: 20px auto; width: 100%; }
.who-grid button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; }
.avatar { width: 96px; height: 96px; border-radius: 22px; display: grid; place-items: center; font-size: 40px; font-weight: 800; color: white; flex: none; }
.avatar.sm { width: 34px; height: 34px; border-radius: 9px; font-size: 16px; }
.lock { font-size: 12px; color: var(--faint); }

/* ---------- home ---------- */
.hero { position: relative; margin: calc(-14px - var(--safe-top)) -16px 0; height: 62vh; max-height: 560px; min-height: 380px; overflow: hidden; }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(11,11,16,0.55) 0%, rgba(11,11,16,0) 30%, rgba(11,11,16,0.2) 55%, var(--bg) 100%); }
.hero .info { position: absolute; left: 16px; right: 16px; bottom: 18px; z-index: 1; text-align: center; }
.hero h1 { font-size: 30px; margin: 0 0 12px; letter-spacing: -0.5px; text-shadow: 0 2px 16px rgba(0,0,0,0.6); }
.hero .actions { display: flex; gap: 10px; justify-content: center; }
.home-top { position: absolute; top: calc(var(--safe-top) + 10px); left: 16px; right: 16px; z-index: 2; display: flex; gap: 10px; align-items: center; }
.provider-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: rgba(0,0,0,0.45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); font-weight: 700; }
.provider-pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.provider-pick svg { width: 18px; height: 18px; fill: currentColor; flex: none; }

.row { margin-top: 18px; }
.row h2 { margin: 0 0 10px; }
.shelf { display: flex; gap: 10px; overflow-x: auto; padding: 0 16px 4px; margin: 0 -16px; scroll-snap-type: x proximity; scrollbar-width: none; }
.shelf::-webkit-scrollbar { display: none; }
.card { flex: none; width: 116px; scroll-snap-align: start; }
.card .pic { position: relative; width: 116px; height: 172px; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.card.wide { width: 220px; }
.card.wide .pic { width: 220px; height: 124px; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; }
.card .name { margin-top: 6px; font-size: 13px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .sub { font-size: 12px; color: var(--muted); }
.bar-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,0.25); }
.bar-progress i { display: block; height: 100%; background: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px 10px; }
.grid .card, .grid .card .pic { width: 100%; }
.grid .card .pic { height: auto; aspect-ratio: 2 / 3; }
.noimg { width: 100%; height: 100%; display: grid; place-items: center; padding: 8px; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); background: linear-gradient(135deg, var(--surface-2), var(--surface-3)); }

/* ---------- sheet (provider picker, sources, PIN) ---------- */
.sheet-back { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,0.55); display: flex; align-items: flex-end; }
.sheet { width: 100%; max-height: 80vh; overflow-y: auto; background: var(--surface); border-radius: 18px 18px 0 0; padding: 10px 16px calc(var(--safe-bottom) + 16px); }
.sheet .grip { width: 40px; height: 5px; border-radius: 3px; background: var(--surface-3); margin: 0 auto 12px; }
.sheet h3 { margin: 4px 0 10px; font-size: 18px; }
.option { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 12px; border-radius: 12px; border: 0; background: none; text-align: left; font-weight: 600; }
.option.on { background: var(--surface-2); color: var(--accent); }
.option .muted { font-weight: 400; }

/* ---------- title page ---------- */
.title-hero { position: relative; margin: calc(-14px - var(--safe-top)) -16px 0; height: 46vh; min-height: 300px; max-height: 460px; overflow: hidden; }
.title-hero img { width: 100%; height: 100%; object-fit: cover; }
.title-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(11,11,16,0.5), rgba(11,11,16,0) 35%, var(--bg) 100%); }
.back { position: absolute; top: calc(var(--safe-top) + 10px); left: 16px; z-index: 3; background: rgba(0,0,0,0.5) !important; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.title-info { position: relative; margin-top: -70px; z-index: 2; }
.title-info h1 { font-size: 28px; margin: 0 0 8px; letter-spacing: -0.4px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.tag { padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 600; }
.tag.accent { color: var(--accent); }
.plot { color: #d4d4dc; margin: 14px 0; }
.plot.clamped { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.title-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
.title-actions .row2 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.title-actions .row2 .btn { flex-direction: column; gap: 4px; padding: 10px 6px; font-size: 12px; background: var(--surface-2); }
.title-actions .row2 .btn.on { color: var(--accent); }
.ep { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
.ep .thumb { position: relative; width: 132px; flex: none; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.ep .thumb img { width: 100%; height: 100%; object-fit: cover; }
.ep .t { flex: 1; min-width: 0; }
.ep .code { color: var(--accent); font-size: 12px; font-weight: 700; }
.ep .n { font-weight: 600; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep .d { font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep .done { color: var(--good); font-size: 12px; font-weight: 700; }

/* ---------- player ---------- */
.player { position: fixed; inset: 0; z-index: 30; background: black; overflow: hidden; color: white; user-select: none; -webkit-user-select: none; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; background: black; }
.player[data-cue="Small"] video::cue { font-size: 70%; }
.player[data-cue="Large"] video::cue { font-size: 150%; }
.player video::cue { background: rgba(0,0,0,0.6); }
.pl-ui { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; transition: opacity .25s; }
.pl-ui > * { pointer-events: auto; }
.player.idle .pl-ui { opacity: 0; }
.player.idle .pl-ui > * { pointer-events: none; }
.player.idle { cursor: none; }
.pl-top { display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-top) + 10px) 14px 30px; background: linear-gradient(rgba(0,0,0,.75), transparent); }
.pl-top .t { flex: 1; min-width: 0; }
.pl-top .t b { display: block; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-top .t span { display: block; font-size: 12px; color: rgba(255,255,255,.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-center { flex: 1; display: flex; align-items: center; justify-content: center; gap: clamp(24px, 8vw, 80px); pointer-events: none; }
.pl-center .pl-btn { pointer-events: auto; }
.pl-bottom { padding: 40px 14px calc(var(--safe-bottom) + 10px); background: linear-gradient(transparent, rgba(0,0,0,.85)); }
.pl-bar { display: flex; align-items: center; gap: 4px; }
.pl-bar .spacer { flex: 1; }
.pl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 40px; height: 40px; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: white; font-weight: 600; font-size: 14px; flex: none; }
.pl-btn svg { width: 26px; height: 26px; fill: currentColor; }
.pl-btn:hover, .pl-btn:focus-visible { background: rgba(255,255,255,.12); }
.pl-btn.big svg { width: 44px; height: 44px; }
.pl-btn.huge { width: 76px; height: 76px; border-radius: 50%; background: rgba(0,0,0,.45); }
.pl-btn.huge svg { width: 52px; height: 52px; }
.pl-btn.big { width: 64px; height: 64px; border-radius: 50%; }
.pl-time { font-size: 13px; font-variant-numeric: tabular-nums; margin-left: 6px; white-space: nowrap; }
.pl-volume { width: 90px; accent-color: white; }
.pl-seek { position: relative; height: 18px; margin: 0 4px 4px; }
.pl-seek::before, .pl-seek .buf, .pl-seek .done { content: ""; position: absolute; left: 0; top: 7px; height: 4px; border-radius: 2px; pointer-events: none; }
.pl-seek::before { right: 0; background: rgba(255,255,255,.25); }
.pl-seek .buf { width: 0; background: rgba(255,255,255,.45); }
.pl-seek .done { width: 0; background: #e8194f; }
.pl-seek input { position: absolute; inset: 0; width: 100%; height: 18px; margin: 0; opacity: 0; cursor: pointer; }
.pl-seek:hover::before, .pl-seek:hover .buf, .pl-seek:hover .done { top: 6px; height: 6px; }
.pl-status { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; color: rgba(255,255,255,.85); padding: 0 24px; pointer-events: none; z-index: 2; text-shadow: 0 1px 4px black; }
.pl-status .spinner { margin: 0 auto 10px; }
.player:not(.paused) .pl-status:has(.spinner) ~ .pl-ui .pl-center { visibility: hidden; }
.player .sheet-back, .player #toast { z-index: 50; }
body:has(.player) .sheet { max-width: 560px; margin: 0 auto; }
body:has(.player) #toast { bottom: auto; top: calc(var(--safe-top) + 72px); left: 50%; right: auto; transform: translateX(-50%); width: max-content; max-width: min(520px, calc(100% - 32px)); }
@media (max-width: 699px) {
  .pl-btn.txt span { display: none; }
  .pl-volume, #pip { display: none; }
  .pl-btn { min-width: 36px; padding: 0 6px; }
}
@media (hover: none) { .pl-volume { display: none; } }
.next-card { position: absolute; right: 12px; bottom: calc(var(--safe-bottom) + 70px); width: min(320px, calc(100% - 24px)); background: rgba(20,20,26,0.95); border-radius: 14px; padding: 14px; z-index: 3; }
.next-card .label { font-size: 11px; font-weight: 800; color: var(--accent); letter-spacing: 0.5px; }
.next-card .actions { display: flex; gap: 8px; margin-top: 10px; }

/* ---------- live ---------- */
.ch { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ch .logo { width: 56px; height: 42px; border-radius: 8px; background: white; display: grid; place-items: center; overflow: hidden; flex: none; }
.ch .logo img { max-width: 90%; max-height: 90%; object-fit: contain; }
.ch .logo.none { background: var(--surface-3); color: var(--muted); font-weight: 800; font-size: 13px; }
.ch .t { flex: 1; min-width: 0; }
.ch .t b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch .now { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch .star { color: #f5c518; }

/* ---------- more ---------- */
.list { background: var(--surface); border-radius: 14px; overflow: hidden; }
.list > * { display: flex; align-items: center; gap: 12px; padding: 14px; border-bottom: 1px solid var(--line); width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; font-weight: 600; }
.list > *:last-child { border-bottom: 0; }

@media (min-width: 700px) {
  .card { width: 140px; } .card .pic { width: 140px; height: 208px; }
  .page { padding-left: 28px; padding-right: 28px; }
  .shelf, .chips { padding-left: 28px; padding-right: 28px; margin-left: -28px; margin-right: -28px; }
  .hero, .title-hero { margin-left: -28px; margin-right: -28px; }
  .title-actions { grid-template-columns: 280px; }
}

/* ---------- browser-only app extras ---------- */
.addon { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.addon img, .addon .noimg { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; }
.addon .t { flex: 1; min-width: 0; }
.addon .t b { display: block; }
.addon .t span { font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.note { background: var(--surface); border-radius: 12px; padding: 12px 14px; color: var(--muted); font-size: 13px; margin: 10px 0; }
.note b { color: var(--text); }
.option .why { display: block; font-size: 12px; color: var(--faint); font-weight: 500; }
.option:disabled { opacity: 0.45; }

.suggest-box { margin-top: 6px; background: var(--surface-2); border-radius: 14px; padding: 4px; box-shadow: 0 10px 30px rgba(0,0,0,0.45); }
.suggest-box .option { padding: 11px 12px; }

/* =====================================================================
   Netflix-style look (Stream Goat's own name, logo and accent colour)
   ===================================================================== */
:root {
  --bg: #141414; --surface: #1f1f1f; --surface-2: #2a2a2a; --surface-3: #3a3a3a;
  --text: #ffffff; --muted: #b3b3b3; --faint: #808080; --accent: #e8194f;
  --side: 16px; --nav: 56px;
}
body { font-family: "Netflix Sans", "Helvetica Neue", Inter, -apple-system, "Segoe UI", Roboto, sans-serif; }
.page { padding: calc(var(--safe-top) + var(--nav) + 10px) var(--side) 0; }
body.home-page .page { padding-top: 0; }

/* Top bar: transparent over the banner, solid once the page scrolls. */
#topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 25; height: calc(var(--nav) + var(--safe-top));
  padding: var(--safe-top) var(--side) 0; display: flex; align-items: center; gap: 18px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.75) 10%, rgba(0,0,0,0)); transition: background 0.3s;
}
#topnav.solid { background: rgba(20,20,20,0.97); }
#topnav .brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; letter-spacing: -0.3px; color: var(--accent); }
#topnav .brand img { width: 30px; height: 30px; border-radius: 7px; }
#topnav .links { display: none; gap: 2px; padding: 4px; align-items: center; background: rgba(22, 22, 27, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.10); border-radius: 999px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
#topnav .links a { color: #cfcfd4; font-size: 14px; padding: 8px 16px; border-radius: 999px; transition: background 0.2s, color 0.2s; }
#topnav .links a:hover { color: white; background: rgba(255, 255, 255, 0.07); }
#topnav .links a.on { color: white; font-weight: 700; background: rgba(255, 255, 255, 0.14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
#topnav .icon { margin-left: auto; width: 36px; height: 36px; display: grid; place-items: center; }
#topnav .icon svg { width: 24px; height: 24px; fill: white; }
#topnav .account { width: 32px; height: 32px; border-radius: 6px; background: var(--accent); display: grid; place-items: center; font-weight: 800; overflow: hidden; }
#topnav .account img { width: 100%; height: 100%; object-fit: cover; }
body.no-tabs #topnav { display: none; }
#tabs { background: rgba(20,20,20,0.96); }
#tabs a.on { color: white; }

/* Banner */
.hero { margin: 0 calc(-1 * var(--side)); height: 78vh; min-height: 460px; max-height: 760px; }
.hero img.backdrop { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.hero::after { background: linear-gradient(to top, var(--bg) 0%, rgba(20,20,20,0.35) 30%, rgba(20,20,20,0) 55%),
  linear-gradient(to right, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.25) 45%, rgba(0,0,0,0) 70%); }
.hero .info { left: var(--side); right: var(--side); bottom: 12%; text-align: left; max-width: 560px; }
.hero .logo { max-width: min(78%, 420px); max-height: 140px; object-fit: contain; object-position: left bottom; margin-bottom: 14px; }
.hero h1 { font-size: clamp(30px, 5vw, 56px); font-weight: 800; letter-spacing: -1px; margin: 0 0 10px; }
.hero .kicker { font-size: 13px; font-weight: 700; letter-spacing: 3px; color: var(--muted); margin-bottom: 8px; }
.hero .kicker { display: flex; align-items: center; gap: 8px; }
.hero .kicker img { width: 22px; height: 22px; border-radius: 5px; }
.hero .desc { font-size: clamp(14px, 1.4vw, 18px); line-height: 1.45; color: #f0f0f0; text-shadow: 0 1px 8px rgba(0,0,0,0.6);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0 0 18px; }
.hero .actions { justify-content: flex-start; }
.btn { border-radius: 6px; }
.btn.white { background: white; color: black; padding: 11px 26px; font-size: 16px; }
.btn.white:hover { background: rgba(255,255,255,0.78); }
.btn.grey { background: rgba(109,109,110,0.7); color: white; padding: 11px 22px; font-size: 16px; }
.btn.grey:hover { background: rgba(109,109,110,0.45); }
.btn.primary { background: var(--accent); }

/* Rows */
.row { margin-top: 26px; }
.hero + .row, .hero + .rows .row:first-child { margin-top: -6vh; position: relative; z-index: 2; }
.row h2 { font-size: clamp(17px, 1.6vw, 22px); font-weight: 700; margin: 0 0 10px; color: #e5e5e5; }
.shelf { gap: 8px; padding: 6px var(--side) 18px; margin: 0 calc(-1 * var(--side)); scroll-padding-left: var(--side); }
.card .pic { border-radius: 4px; transition: transform 0.25s ease, box-shadow 0.25s ease; }
.card .name { color: #e5e5e5; }
@media (hover: hover) and (pointer: fine) {
  .shelf .card:hover .pic { transform: scale(1.08); box-shadow: 0 12px 30px rgba(0,0,0,0.7); z-index: 3; }
  .card.cw .remove { opacity: 0; }
  .card.cw:hover .remove { opacity: 1; }
}
.shelf-wrap { position: relative; }
.shelf-wrap .arrow { display: none; position: absolute; top: 6px; bottom: 18px; width: var(--side); z-index: 4; border: 0;
  background: rgba(20,20,20,0.6); color: white; font-size: 34px; padding: 0; }
.shelf-wrap .arrow.left { left: calc(-1 * var(--side)); }
.shelf-wrap .arrow.right { right: calc(-1 * var(--side)); }
@media (hover: hover) and (pointer: fine) { .shelf-wrap:hover .arrow { display: block; } }

/* Continue Watching: wide cards with the episode, time left and a remove button */
.card.cw { width: 250px; position: relative; }
.card.cw .pic { width: 250px; height: 141px; }
.card.cw .over { position: absolute; left: 0; right: 0; bottom: 4px; padding: 26px 10px 8px; background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0)); }
.card.cw .over b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.cw .over span { font-size: 12px; color: #d0d0d0; }
.card.cw .playmark { position: absolute; inset: 0; display: grid; place-items: center; }
.card.cw .playmark i { width: 46px; height: 46px; border-radius: 50%; border: 2px solid white; background: rgba(0,0,0,0.45); display: grid; place-items: center; }
.card.cw .playmark svg { width: 24px; height: 24px; fill: white; }
.card.cw .remove { position: absolute; top: 6px; right: 6px; z-index: 5; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.6);
  background: rgba(0,0,0,0.6); color: white; font-size: 16px; line-height: 1; transition: opacity 0.2s; }
.bar-progress { height: 4px; background: rgba(255,255,255,0.3); }
.bar-progress i { background: var(--accent); }

/* Title page */
.title-hero { margin: 0 calc(-1 * var(--side)); height: 70vh; min-height: 360px; max-height: 640px; }
.title-hero::after { background: linear-gradient(to top, var(--bg) 0%, rgba(20,20,20,0.2) 45%, rgba(20,20,20,0) 65%),
  linear-gradient(to right, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 60%); }
.title-info { margin-top: -26vh; max-width: 900px; }
.title-info h1 { font-size: clamp(28px, 4vw, 48px); font-weight: 800; }
.back { top: calc(var(--safe-top) + var(--nav) + 8px); }
.title-actions .btn.white { justify-content: center; }
.ep { border-bottom-color: rgba(255,255,255,0.1); padding: 14px 0; }
.ep .code { color: var(--muted); font-size: 18px; font-weight: 700; }

/* Settings: account, backups */
.panel { background: var(--surface); border-radius: 8px; padding: 14px; margin: 10px 0; }
.panel .row-line { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.panel .row-line:last-child { border-bottom: 0; }
.panel .row-line .t { flex: 1; min-width: 0; }
.panel .row-line .t b { display: block; }
.panel .row-line .t span { font-size: 12px; color: var(--muted); }
.actions-line { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.google-btn { display: inline-flex; align-items: center; gap: 10px; background: white; color: #1f1f1f; border: 0; border-radius: 6px; padding: 10px 16px; font-weight: 700; }
.google-btn svg { width: 20px; height: 20px; }
.banner-note { background: #2b2b2b; border-left: 4px solid var(--accent); padding: 12px 14px; border-radius: 4px; margin: 12px 0; }

@media (min-width: 700px) {
  :root { --side: 4%; --nav: 68px; }
  .page { padding-left: var(--side); padding-right: var(--side); }
  .shelf, .chips { padding-left: var(--side); padding-right: var(--side); margin-left: calc(-1 * var(--side)); margin-right: calc(-1 * var(--side)); }
  .hero, .title-hero { margin-left: calc(-1 * var(--side)); margin-right: calc(-1 * var(--side)); }
  .card { width: 160px; } .card .pic { width: 160px; height: 238px; }
  .card.cw { width: 300px; } .card.cw .pic { width: 300px; height: 169px; }
}
@media (min-width: 1000px) {
  #topnav .links { display: flex; }
  #tabs { display: none; }
  #view { padding-bottom: 40px; }
  #toast { bottom: 24px; left: auto; right: 24px; max-width: 420px; }
  .card { width: 185px; } .card .pic { width: 185px; height: 275px; }
}
.glitch-pre { white-space: pre-wrap; word-break: break-word; font-size: 11px; color: var(--muted); background: rgba(255,255,255,0.05); padding: 10px; border-radius: 8px; max-height: 220px; overflow: auto; }
#g-what { font-family: inherit; font-size: 15px; width: 100%; resize: vertical; }

/* ---------- liquid glass (after liquidglass.js): the floating bars blur and lift the colours behind them,
   with a light rim on the top-left edge and a faint inner wall at the bottom-right, dark enough to read on. ---------- */
#tabs, #topnav .links, .provider-pick, .back {
  background: linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.02) 45%, rgba(255,255,255,0.05)), rgba(18, 16, 26, 0.55) !important;
  backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.35), inset -1px -1px 0 rgba(255,255,255,0.10),
              inset 0 0 12px rgba(255,255,255,0.05), 0 10px 30px rgba(0,0,0,0.40);
}
.empty-logo { display: block; width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 17px; animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: 0.55; } }
