:root {
  --bg: #0f0c0d;
  --surface: #1b1618;
  --surface-2: #262022;
  --line: #352c2f;
  --text: #fbf3ee;
  --muted: #b8aaa6;
  --accent: #ff7a59;            /* warm coral, Adam & Leo */
  --accent-2: #ffb36b;          /* golden */
  --grad: linear-gradient(135deg, #ff6a5c, #ffb36b);
  --radius: 16px;
  --nav-h: 68px;
  font-family: "Poppins", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0 0 .35em; line-height: 1.15; }
p { color: var(--muted); line-height: 1.5; margin: 0 0 1em; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
[hidden] { display: none !important; }
.fine { font-size: .8rem; color: var(--muted); }
.t-center { text-align: center; }
.msg { display: block; min-height: 1.2em; margin-top: 8px; font-size: .85rem; color: var(--accent-2); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 999px; padding: .85em 1.4em; font-weight: 600; transition: transform .1s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }
.btn-fill { background: var(--grad); color: #2a0f06; }
.btn-outline { border: 1.5px solid rgba(255,255,255,.85); color: var(--text); }
.btn-ghost { color: var(--muted); }
.btn-sm { padding: .5em 1em; font-size: .88rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; }
.link-btn { color: var(--text); text-decoration: underline; font-size: .9rem; padding: 0; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; color: var(--text); }
.icon-btn.round { background: var(--surface-2); }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 700; letter-spacing: .04em; padding: .35em .7em; border-radius: 999px; }
.chip-new { background: var(--grad); color: #2a0f06; }
.chip-owned { background: rgba(0,0,0,.6); color: var(--accent-2); border: 1px solid var(--accent-2); }
.chip-promo { border: 1.5px solid #d9f26b; color: #d9f26b; background: rgba(0,0,0,.35); }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: max(10px, env(safe-area-inset-top)) 16px 10px; background: rgba(15,12,13,.96); }
.logo { font-weight: 800; font-size: 1.35rem; letter-spacing: -.01em; }
.logo span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.avatar-btn { width: 36px; height: 36px; border-radius: 999px; background: var(--grad); color: #2a0f06; font-weight: 800; }

/* ---------- Home ---------- */
.home { max-width: 1100px; margin: 0 auto; padding-bottom: calc(var(--nav-h) + 24px); }
.hero { position: relative; margin: 4px 12px 0; aspect-ratio: 16 / 10; max-height: 420px; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.hero-slide { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: 75% center / cover no-repeat; opacity: 0; transition: opacity .6s; display: flex; align-items: flex-end; }
.hero-slide.on { opacity: 1; z-index: 1; }
.hero-slide::before { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(to top, rgba(10,7,8,.95), rgba(10,7,8,.15) 65%); }
.hero-text { position: relative; padding: 18px 18px 30px; max-width: 520px; }
.hero-text h1 { font-size: clamp(1.6rem, 6vw, 2.6rem); font-weight: 800; }
.hero-text p { margin-bottom: .8em; color: #e4d8d3; }
.kicker { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 6px; }
.dots { position: absolute; z-index: 2; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.dots i { width: 18px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.35); }
.dots i.on { background: #fff; width: 26px; }

.section { padding: 22px 12px 0; }
.section h2 { font-size: 1.2rem; font-weight: 700; }
.section h2 span { color: var(--accent); }
.row { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
.row::-webkit-scrollbar { display: none; }
.row .ep-card { flex: 0 0 min(38vw, 180px); scroll-snap-align: start; }

.ep-card { position: relative; display: block; border-radius: 14px; overflow: hidden; background: var(--surface); aspect-ratio: 3 / 4.3; }
.ep-cover { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: center / cover no-repeat; transition: transform .3s; }
.ep-card:hover .ep-cover { transform: scale(1.04); }
.ep-card::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(to top, rgba(0,0,0,.85), transparent 55%); pointer-events: none; }
.ep-card .chip { position: absolute; top: 8px; right: 8px; z-index: 2; }
.ep-title { position: absolute; z-index: 2; left: 10px; right: 10px; bottom: 10px; font-weight: 700; line-height: 1.2; }
.ep-title small { display: block; font-size: .7rem; color: var(--accent-2); letter-spacing: .08em; }
.ep-card.soon { border: 1.5px solid var(--accent); box-shadow: 0 0 18px rgba(255,122,89,.35); }
.ep-card.soon .ep-cover { opacity: .8; }
.ep-card.soon::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 1; background: linear-gradient(to top, rgba(10,7,8,.92) 10%, rgba(10,7,8,0) 60%); }
.soon-body { position: absolute; z-index: 2; top: 0; right: 0; bottom: 0; left: 0; display: grid; place-content: end center; padding-bottom: 14px !important; justify-items: center; gap: 8px; text-align: center; padding: 10px; }
.soon-label { display: inline-flex; gap: 4px; align-items: center; font-size: .7rem; font-weight: 800; letter-spacing: .1em; color: var(--accent-2); }
.soon-label svg { width: 16px; height: 16px; }

.filters { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.search { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; background: var(--surface-2); border-radius: 999px; padding: 0 14px; height: 42px; width: min(46vw, 240px); color: var(--muted); }
.search input { flex: 1; min-width: 0; background: none; border: 0; color: var(--text); font: inherit; outline: none; }
.chips { display: flex; gap: 8px; }
.chip-btn { flex: 0 0 auto; height: 42px; padding: 0 16px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-weight: 600; white-space: nowrap; }
.chip-btn.on { background: transparent; border: 1.5px solid var(--accent); color: var(--text); }
.grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(150px, 45%), 1fr)); }
.empty { text-align: center; padding: 20px; }

/* Bottom nav */
.bottomnav { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: max(10px, env(safe-area-inset-bottom));
  width: min(440px, calc(100% - 24px)); height: var(--nav-h); display: grid; grid-template-columns: repeat(3, 1fr);
  background: rgba(32,26,28,.97); border: 1px solid var(--line); border-radius: 22px; }
.bottomnav a, .bottomnav button { display: grid; place-items: center; align-content: center; gap: 2px; font-size: .72rem; color: var(--muted); }
.bottomnav .on { color: var(--accent); }

/* ---------- Modals ---------- */
.modal { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.75); }
.modal-card { position: relative; width: min(400px, 100%); background: var(--surface); border-radius: 18px; padding: 26px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.modal-card.static { margin: 0 auto; }
.modal-card h2, .modal-card h1 { font-size: 1.5rem; font-weight: 800; }
.modal-x { position: absolute; top: 10px; right: 10px; }
.field { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; height: 48px; margin-bottom: 14px; color: var(--muted); }
.field input { flex: 1; background: none; border: 0; outline: none; color: var(--text); font: inherit; }
.field:focus-within { border-color: var(--accent); }
.divider { display: flex; align-items: center; gap: 10px; margin: 18px 0 8px; color: var(--muted); font-size: .85rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.center { min-height: 100vh; min-height: 100vh; height: 100dvh; display: grid; place-items: center; padding: 20px; }

/* ---------- Player ---------- */
.player { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: #000; overflow: hidden; }
.feed { height: 100%; overflow-y: scroll; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; }
.feed::-webkit-scrollbar { display: none; }
.slide { position: relative; height: 100vh; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always; display: grid; place-items: center; overflow: hidden; }
.slide video { width: 100%; height: 100%; object-fit: cover; background: #000; }
@media (min-aspect-ratio: 3/4) { .slide video { object-fit: contain; } }
.slide video::cue { background: rgba(0,0,0,.65); color: #fff; font-size: 1.05rem; }
.slide .tap { position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: 0; }
.slide.locked .lock-bg { position: absolute; top: -30px; right: -30px; bottom: -30px; left: -30px; background: center / cover no-repeat; opacity: .3; }
.paywall { position: relative; width: min(400px, 88vw); background: rgba(27,22,24,.94); border: 1px solid var(--line); border-radius: 20px; padding: 26px 22px; text-align: center; }
.paywall h2 { font-size: 1.45rem; font-weight: 800; }
.lock-badge { width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 999px; display: grid; place-items: center; background: var(--grad); color: #2a0f06; }

.player .p-top { position: absolute; z-index: 5; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 4px;
  padding: max(10px, env(safe-area-inset-top)) 10px 24px; background: linear-gradient(to bottom, rgba(0,0,0,.55), transparent); }
.p-ep { font-weight: 800; font-size: 1.2rem; }
.p-ep small { font-weight: 500; font-size: .85rem; color: var(--muted); }
.p-actions { margin-left: auto; display: flex; }
.player.on-locked .p-info, .player.on-locked .p-side, .player.on-locked .unmute-pill, .player.on-locked [data-mute] { display: none; }

.big-play { position: absolute; z-index: 4; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 84px; height: 84px; border-radius: 999px;
  display: grid; place-items: center; background: rgba(20,16,17,.75); border: 3px solid var(--accent); color: #fff; }
.big-play svg { width: 38px; height: 38px; margin-left: 4px; }
.unmute-pill { position: absolute; z-index: 4; left: 50%; top: calc(50% + 70px); transform: translateX(-50%); padding: .6em 1.2em; border-radius: 999px; background: rgba(20,16,17,.8); font-weight: 600; }

.p-side { position: absolute; z-index: 5; right: 10px; bottom: 190px; display: grid; gap: 18px; justify-items: center; }
.p-avatar { width: 54px; height: 54px; border-radius: 999px; border: 2px solid #fff; background: center / cover no-repeat #333; }
.side-btn { display: grid; justify-items: center; gap: 2px; font-size: .78rem; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.side-btn svg { width: 30px; height: 30px; }

.p-info { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; padding: 40px 16px max(14px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(0,0,0,.85), transparent); }
.p-info .badges { display: flex; gap: 8px; margin-bottom: 8px; }
.p-info h1 { font-size: 1.5rem; font-weight: 800; margin-right: 70px; }
.desc { color: #ddd0cb; margin: 0 70px 2px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.desc.open { -webkit-line-clamp: unset; }
.progress { height: 4px; background: rgba(255,255,255,.25); border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); }

/* Bottom sheets */
.sheet-backdrop { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 40; background: rgba(0,0,0,.45); }
.sheet { position: absolute; z-index: 41; left: 0; right: 0; bottom: 0; max-height: 75%; overflow-y: auto; background: var(--surface); border-radius: 24px 24px 0 0;
  padding: 10px 18px max(20px, env(safe-area-inset-bottom)); animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
.sheet-handle { width: 44px; height: 4px; border-radius: 4px; background: #4a3f42; margin: 0 auto 12px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-head h3 { font-size: 1.25rem; margin: 0; }
.sheet-head small { color: var(--muted); }
.options { display: grid; gap: 4px; }
.opt { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 12px; font-weight: 600; color: #ddd0cb; }
.opt small { color: var(--muted); font-weight: 600; }
.opt.on { background: var(--surface-2); color: #fff; }
.parts-progress { height: 4px; background: var(--surface-2); border-radius: 4px; margin-bottom: 14px; overflow: hidden; }
.parts-progress i { display: block; height: 100%; background: var(--accent); }
.parts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.part-tile { position: relative; display: grid; justify-items: center; gap: 2px; padding: 14px 4px; border-radius: 14px; background: var(--surface-2); border: 1.5px solid transparent; }
.part-tile b { font-size: 1.3rem; }
.part-tile small { color: var(--muted); }
.part-tile.is-locked small { color: var(--accent-2); }
.part-tile.current { border-color: #fff; }
.tile-lock { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 999px; background: var(--accent); color: #2a0f06; display: grid; place-items: center; }
.tile-lock svg { width: 13px; height: 13px; }

/* Stats */
.stats { max-width: 720px; margin: 0 auto; padding: 32px 20px; display: grid; gap: 20px; }
.stats table { width: 100%; border-collapse: collapse; }
.stats td, .stats th { padding: .5em .3em; border-bottom: 1px solid var(--line); text-align: left; }

@media (min-width: 900px) {
  .hero { margin: 8px 16px 0; }
  .section { padding: 28px 16px 0; }
  .row .ep-card { flex-basis: 190px; }
}
.more-btn { display: block; margin: 0 0 12px; font-weight: 700; }

/* Older phones (iOS < 15, old Android WebViews) don't support aspect-ratio:
   without this the hero and episode cards collapse to zero height and no images load. */
@supports not (aspect-ratio: 1 / 1) {
  .hero::before { content: ""; display: block; padding-top: 62.5%; }
  .ep-card::before { content: ""; display: block; padding-top: 143.3%; }
}

/* ---------- footer + legal pages ---------- */
.site-footer { max-width: 1100px; margin: 8px auto 0; padding: 22px 16px calc(var(--nav-h) + 34px); text-align: center; color: var(--muted); font-size: .8rem; border-top: 1px solid var(--line); }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 8px; }
.site-footer a { color: #d9cdc8; }
.home + .site-footer { margin-top: calc(-1 * var(--nav-h)); }
.legal { max-width: 720px; margin: 0 auto; padding: 18px 18px 30px; line-height: 1.6; color: #e4d8d3; }
.legal h1 { font-size: 1.8rem; margin: 6px 0 2px; color: #fff; }
.legal h2 { font-size: 1.1rem; margin: 26px 0 6px; color: #fff; }
.legal .updated { color: var(--muted); font-size: .85rem; margin-bottom: 18px; }
.legal ul { padding-left: 20px; }
.legal li { margin: 4px 0; }
.legal a { color: var(--accent-2); }
.legal table { width: 100%; border-collapse: collapse; font-size: .85rem; margin: 8px 0; }
.legal th, .legal td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { color: #fff; }
.legal-top + .legal + .site-footer { padding-bottom: 30px; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 6px 18px; margin: 16px 0; }
.fine.agree { font-size: .72rem; margin-top: 6px; }
.fine.agree a { color: inherit; text-decoration: underline; }
