:root {
  --bg: #fff0f6;
  --bg-2: #ffe6f1;
  --surface: #ffffff;
  --surface-2: #ffe0ee;
  --line: rgba(222, 60, 140, .13);
  --line-2: rgba(222, 60, 140, .26);
  --text: #4b1236;
  --soft-text: #7a3a60;
  --muted: #a3638a;
  --faint: #c993b2;
  --accent: #ff4fa3;
  --accent-2: #ff8fc8;
  --accent-ink: #ffffff;
  --accent-soft: rgba(255, 79, 163, .13);
  --glass: 255, 240, 246;
  --red: #ff3b77;
  --green: #4cc38a;
  --radius: 22px;
  --radius-sm: 16px;
  --shadow: 0 10px 28px -14px rgba(214, 51, 132, .45);
  --display: "Fraunces", Georgia, serif;
  --script: "Pacifico", "Fraunces", cursive;
  --body: "Quicksand", system-ui, -apple-system, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --top-h: 64px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 12px); }
body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 100% -10%, rgba(255,143,200,.28), transparent 60%),
    radial-gradient(700px 500px at -10% 40%, rgba(255,182,217,.3), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
svg { flex: none; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -.01em; line-height: 1.1; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: calc(var(--top-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) var(--gutter) 0;
  display: flex; align-items: center; gap: 28px;
  background: linear-gradient(to bottom, rgba(var(--glass),.94), rgba(var(--glass),.78));
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 9px; font: 400 25px/1.2 var(--script); color: var(--accent); }
.brand svg { width: 28px; height: 28px; transition: transform .8s var(--ease); }
.brand:hover svg { transform: scale(1.15) rotate(-8deg); }
.brand small { font: 700 10.5px/1 var(--body); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-left: 6px; position: relative; top: -2px; }
.topnav { display: flex; gap: 4px; }
.topnav a {
  padding: 8px 12px; border-radius: 999px; color: var(--muted);
  font-weight: 600; font-size: 14px; white-space: nowrap; transition: color .2s, background .2s;
}
.topnav a:hover { color: var(--text); }
.topnav a.on { color: var(--text); background: var(--surface-2); }
.search {
  margin-left: auto; position: relative; display: flex; align-items: center;
  width: min(340px, 30vw);
}
.search svg { position: absolute; left: 12px; width: 17px; height: 17px; stroke: var(--muted); fill: none; stroke-width: 2; pointer-events: none; }
.search input {
  width: 100%; height: 40px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); padding: 0 38px 0 38px; font: 500 14px var(--body);
  transition: border-color .2s, background .2s;
}
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; border-color: var(--accent); background: var(--bg-2); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd {
  position: absolute; right: 10px; font: 600 11px var(--body); color: var(--faint);
  border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 6px;
}
.icon-btn {
  width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); display: grid; place-items: center; flex: none;
}
.icon-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.icon-btn:hover { border-color: var(--line-2); }
.search-toggle { display: none; margin-left: auto; }

/* ---------- bottom nav (mobile) ---------- */
.bottomnav { display: none; }

@media (max-width: 1080px) {
  .topnav a { padding: 8px 9px; font-size: 13.5px; }
  .topbar { gap: 18px; }
}
@media (max-width: 899px) {
  .topnav { display: none; }
  .search { display: none; }
  .search-toggle { display: grid; }
  body.searching .search {
    display: flex; position: absolute; left: var(--gutter); right: var(--gutter);
    top: calc(env(safe-area-inset-top) + 12px); width: auto; z-index: 2;
  }
  body.searching .search kbd { display: none; }
  .bottomnav {
    position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
    display: grid; grid-template-columns: repeat(6, 1fr);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: rgba(var(--glass),.92);
    backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border-top: 1px solid var(--line);
  }
  .bottomnav a { display: grid; justify-items: center; gap: 3px; padding: 5px 0; color: var(--faint); font-size: 10.5px; font-weight: 600; }
  .bottomnav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
  .bottomnav a.on { color: var(--accent); }
  #view { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
}

#view { outline: none; min-height: 70vh; padding-bottom: 64px; }
.fade-in { animation: fadeIn .35s var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: min(74vh, 640px); margin-top: calc(-1 * (var(--top-h) + env(safe-area-inset-top)));
  display: flex; align-items: flex-end; overflow: hidden; isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%;
  opacity: 0; transform: scale(1.06); transition: opacity 1.1s ease, transform 8s linear;
}
.hero-bg img.on { opacity: 1; transform: scale(1); }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, var(--bg) 0%, rgba(var(--glass),.88) 24%, rgba(var(--glass),.15) 62%, rgba(var(--glass),.6) 100%),
    linear-gradient(to right, rgba(var(--glass),.95) 0%, rgba(var(--glass),.1) 62%),
    linear-gradient(rgba(255,79,163,.12), rgba(255,79,163,.12));
}
.hero-body { padding: 0 var(--gutter) 44px; max-width: 760px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.hero-kicker::before { content: ""; width: 18px; height: 2px; background: currentColor; }
.hero h1 { font-size: clamp(36px, 6vw, 72px); margin: 12px 0 12px; text-wrap: balance; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-weight: 600; font-size: 14px; }
.hero p.overview { margin-top: 14px; color: var(--soft-text); font-weight: 500; max-width: 60ch; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-dots { position: absolute; right: var(--gutter); bottom: 50px; display: flex; gap: 6px; }
.hero-dots button { width: 22px; height: 4px; border-radius: 4px; border: 0; padding: 0; background: rgba(255,79,163,.25); transition: background .3s, width .3s; }
.hero-dots button.on { background: var(--accent); width: 36px; }

.star { color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line-2);
  background: rgba(255,255,255,.75); font-weight: 700; font-size: 14.5px; white-space: nowrap;
  transition: transform .15s, background .2s, border-color .2s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { background: #fff; border-color: var(--accent-2); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary { background: linear-gradient(135deg, #ff6fb5, #ff3d96); border: 0; box-shadow: 0 10px 24px -10px rgba(255,61,150,.8); }
.btn.primary:hover { background: linear-gradient(135deg, #ff86c1, #ff52a2); }
.btn.primary svg.fill { fill: currentColor; stroke: none; }
.btn.small { height: 36px; padding: 0 14px; font-size: 13px; }
.btn.on { background: var(--accent-soft); border-color: rgba(255,79,163,.5); color: var(--accent); }

/* ---------- sections / rows ---------- */
.section { padding: 0 var(--gutter); margin-top: 38px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-head h2 { font-size: clamp(20px, 2.4vw, 26px); }
.section-head h2 em { font-style: italic; color: var(--accent); }
.section-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.see-all { color: var(--muted); font-weight: 700; font-size: 13px; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.see-all:hover { color: var(--accent); }
.page-head { padding: 34px var(--gutter) 0; }
.page-head h1 { font-size: clamp(32px, 5vw, 54px); }
.page-head h1 em { color: var(--accent); }
.page-head p { color: var(--muted); margin-top: 8px; max-width: 62ch; }

.row-wrap { position: relative; margin: 0 calc(-1 * var(--gutter)); }
.row {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(128px, 15vw, 186px);
  gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter);
  padding: 4px var(--gutter) 10px; scrollbar-width: none; overscroll-behavior-x: contain;
}
.row::-webkit-scrollbar { display: none; }
.row > * { scroll-snap-align: start; }
.row.wide { grid-auto-columns: clamp(240px, 26vw, 330px); }
.row-arrow {
  position: absolute; top: 4px; bottom: 10px; width: var(--gutter); min-width: 40px; border: 0; z-index: 3;
  display: grid; place-items: center; opacity: 0; transition: opacity .2s;
  background: linear-gradient(to right, var(--bg), transparent);
}
.row-arrow.next { right: 0; background: linear-gradient(to left, var(--bg), transparent); }
.row-arrow.prev { left: 0; }
.row-arrow svg { width: 26px; height: 26px; stroke: var(--text); fill: none; stroke-width: 2.4; }
.row-wrap:hover .row-arrow:not([disabled]) { opacity: 1; }
.row-arrow[disabled] { pointer-events: none; }
@media (hover: none) { .row-arrow { display: none; } }

/* poster card */
.card { position: relative; display: block; min-width: 0; }
.poster {
  position: relative; aspect-ratio: 2 / 3; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset;
}
.poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), opacity .4s; }
.poster img.loading { opacity: 0; }
.card:hover .poster img { transform: scale(1.045); }
.poster .noimg {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; text-align: center;
  font: italic 600 15px/1.25 var(--display); color: var(--muted);
  background: radial-gradient(circle at 30% 20%, var(--surface-2), var(--surface));
}
.badge {
  position: absolute; top: 8px; left: 8px; z-index: 1;
  display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 7px; border-radius: 6px;
  background: rgba(255,255,255,.88); color: var(--text); backdrop-filter: blur(6px); font-weight: 700; font-size: 11.5px;
}
.badge.right { left: auto; right: 8px; }
.badge.accent { background: var(--accent); color: var(--accent-ink); }
.badge.live { background: var(--red); color: #fff; }
.card-title { margin-top: 9px; font-weight: 700; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress { height: 4px; background: rgba(255,79,163,.16); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 3px; }

/* landscape card */
.lcard { display: block; min-width: 0; }
.lcard .thumb { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset; }
.lcard .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.lcard:hover .thumb img { transform: scale(1.04); }
.lcard .thumb::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(75,18,54,.6)); }
.lcard .play {
  position: absolute; z-index: 1; left: 12px; bottom: 12px; width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); display: grid; place-items: center;
  transform: scale(.85); opacity: .9; transition: transform .2s, opacity .2s;
}
.lcard:hover .play { transform: none; opacity: 1; }
.lcard .play svg { width: 16px; height: 16px; fill: currentColor; margin-left: 2px; }

/* grid */
.grid {
  display: grid; gap: 22px 14px;
  grid-template-columns: repeat(auto-fill, minmax(clamp(122px, 15vw, 176px), 1fr));
}
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.load-more { display: flex; justify-content: center; padding: 30px 0 8px; }

/* chips */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px var(--gutter) 6px; margin: 0 calc(-1 * var(--gutter)); }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px; transition: all .2s;
}
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip img { width: 20px; height: 20px; border-radius: 5px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 22px 0 18px; }
.toolbar .chips { flex: 1 1 100%; }
select, .input {
  height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  padding: 0 12px; font: 600 13.5px var(--body);
}
select:focus, .input:focus { outline: none; border-color: var(--accent); }
.switch { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); font-weight: 600; font-size: 13.5px; cursor: pointer; user-select: none; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 22px; background: var(--surface-2); border: 1px solid var(--line-2); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .2s var(--ease), background .2s; }
.switch input:checked { background: var(--accent); border-color: var(--accent); }
.switch input:checked::after { transform: translateX(16px); background: var(--accent-ink); }

.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.seg button { border: 0; background: none; height: 32px; padding: 0 14px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--surface-2); color: var(--text); box-shadow: 0 0 0 1px var(--line-2) inset; }

/* ---------- title page ---------- */
.title-hero { position: relative; margin-top: calc(-1 * (var(--top-h) + env(safe-area-inset-top))); padding: calc(var(--top-h) + 60px) var(--gutter) 34px; isolation: isolate; }
.title-hero .bd { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.title-hero .bd img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.title-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, var(--bg) 2%, rgba(var(--glass),.86) 40%, rgba(var(--glass),.6) 100%),
              linear-gradient(to right, rgba(var(--glass),.92), rgba(var(--glass),.25));
}
.title-grid { display: grid; grid-template-columns: clamp(150px, 22vw, 280px) 1fr; gap: clamp(20px, 4vw, 48px); align-items: end; }
.title-grid .poster { box-shadow: 0 30px 60px -22px rgba(214,51,132,.6), 0 0 0 4px #fff; }
.title-info h1 { font-size: clamp(30px, 5vw, 60px); text-wrap: balance; }
.title-info .tagline { font: italic 500 18px/1.35 var(--display); color: var(--accent); margin-top: 10px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.fact { height: 28px; padding: 0 11px; display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; background: rgba(255,255,255,.8); font-weight: 700; font-size: 13px; color: var(--soft-text); box-shadow: 0 0 0 1px var(--line) inset; }
.fact.cert { border: 1px solid var(--line-2); background: none; }
.title-info .overview { margin-top: 16px; color: var(--soft-text); font-weight: 500; max-width: 70ch; font-size: 15.5px; }
.title-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.crew { display: flex; flex-wrap: wrap; gap: 10px 32px; margin-top: 20px; font-size: 13.5px; }
.crew b { display: block; color: var(--text); font-size: 14.5px; }
.crew span { color: var(--muted); }
@media (max-width: 640px) {
  .title-hero { padding-top: calc(var(--top-h) + 30px); }
  .title-grid { grid-template-columns: 1fr; }
  .title-grid > .poster { width: 46%; max-width: 190px; }
}

/* where to watch */
.wtw { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 20px; }
.wtw-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.wtw-head h2 { font-size: 22px; }
.wtw-group { margin-top: 14px; }
.wtw-group h4 { margin: 0 0 9px; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.providers { display: flex; flex-wrap: wrap; gap: 10px; }
.provider { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 13.5px; transition: border-color .2s, transform .15s; }
.provider:hover { border-color: var(--accent); transform: translateY(-1px); }
.provider img { width: 36px; height: 36px; border-radius: 9px; }
.provider .mine { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.wtw-empty { color: var(--muted); }
.attrib { margin-top: 14px; color: var(--faint); font-size: 12px; }
.attrib a { text-decoration: underline; }

/* cast */
.person { display: block; text-align: center; min-width: 0; }
.person .face { aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset; }
.person .face img { width: 100%; height: 100%; object-fit: cover; }
.person .face .noimg { width: 100%; height: 100%; display: grid; place-items: center; font: italic 700 26px var(--display); color: var(--muted); }
.person b { display: block; margin-top: 8px; font-size: 13.5px; line-height: 1.25; }
.person span { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.3; margin-top: 2px; }
.row.people { grid-auto-columns: clamp(96px, 11vw, 132px); }

/* seasons + episodes */
.season-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.season-progress { flex: 1; min-width: 160px; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
.season-progress .progress { flex: 1; margin: 0; height: 5px; }
.episodes { display: grid; gap: 10px; }
.ep {
  display: grid; grid-template-columns: clamp(120px, 18vw, 200px) 1fr auto; gap: 16px; align-items: center;
  padding: 10px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line);
}
.ep.seen { opacity: .62; }
.ep .still { aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: var(--surface); position: relative; }
.ep .still img { width: 100%; height: 100%; object-fit: cover; }
.ep h4 { margin: 0; font-size: 15px; }
.ep h4 small { color: var(--accent); font-weight: 800; margin-right: 6px; }
.ep .meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.ep p { color: var(--soft-text); font-size: 13.5px; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep.upcoming h4 small { color: var(--muted); }
.check {
  width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--line-2); background: none;
  display: grid; place-items: center; transition: all .2s;
}
.check svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: .35; }
.check:hover { border-color: var(--accent); }
.check.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.check.on svg { opacity: 1; }
.check:disabled { opacity: .3; cursor: default; }
@media (max-width: 560px) {
  .ep { grid-template-columns: 104px 1fr auto; gap: 12px; }
  .ep p { display: none; }
}

/* info table */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.info-grid div { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.info-grid dt { color: var(--muted); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
.info-grid dd { margin: 4px 0 0; font-weight: 600; }

/* ---------- live ---------- */
.channels { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.channel {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 22px;
  min-height: 140px; padding: 16px; border-radius: var(--radius); overflow: hidden; text-align: left;
  border: 1px solid var(--line); background: var(--surface); transition: transform .2s var(--ease), border-color .2s;
}
.channel::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 100% 0, var(--c, #444) 0%, transparent 65%); opacity: .45; transition: opacity .3s; }
.channel:hover { transform: translateY(-2px); border-color: var(--line-2); }
.channel:hover::before { opacity: .7; }
.channel > * { position: relative; }
.channel .mono { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--c); color: #fff; font: 800 15px var(--body); letter-spacing: -.02em; box-shadow: 0 6px 20px -6px var(--c); }
.channel b { font-size: 16px; display: block; }
.channel small { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.channel .badge { position: absolute; top: 16px; right: 16px; left: auto; }
.on-air { display: inline-flex; align-items: center; gap: 6px; }
.on-air::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- modal / player ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; }
.modal-scrim { position: absolute; inset: 0; background: rgba(75,18,54,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fadeIn .25s both; }
.modal-box { position: relative; width: min(1100px, 100%); max-height: calc(100dvh - 40px); overflow: auto; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 18px; animation: pop .3s var(--ease) both; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 14px 14px 20px; }
.modal-head h3 { font-size: 20px; }
.modal-kicker { color: var(--accent); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; margin-bottom: 3px; }
.frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.frame iframe, .frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.frame .frame-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--muted); }
.modal-foot { padding: 14px 20px 18px; color: var(--muted); font-size: 13.5px; }
.modal-foot:empty { display: none; }
.modal-foot p { max-height: 7.5em; overflow: auto; }
.modal-foot .src { margin-top: 10px; font-size: 12.5px; color: var(--faint); }
.modal-foot .src a { text-decoration: underline; }
@media (max-width: 640px) { .modal { padding: 0; align-items: end; } .modal-box { border-radius: 18px 18px 0 0; max-height: 92dvh; } }

/* ---------- misc ---------- */
.skel { background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%); background-size: 300% 100%; animation: shimmer 1.4s infinite linear; border-radius: var(--radius-sm); }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.skel.poster-sk { aspect-ratio: 2/3; }
.skel.line { height: 12px; margin-top: 10px; width: 80%; border-radius: 4px; }
.skel.hero-sk { height: min(74vh, 640px); border-radius: 0; margin-top: calc(-1 * (var(--top-h) + env(safe-area-inset-top))); }

.empty, .notice {
  border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--muted);
}
.empty h3, .notice h3 { color: var(--text); font-size: 22px; margin-bottom: 8px; }
.empty .btn, .notice .btn { margin-top: 16px; }
.setup { max-width: 640px; margin: 48px auto; padding: 0 var(--gutter); }
.setup .card-box { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 18px; padding: clamp(22px, 4vw, 36px); }
.setup h1 { font-size: clamp(28px, 4vw, 40px); }
.setup h1 em { color: var(--accent); }
.setup ol { color: var(--soft-text); padding-left: 20px; margin: 18px 0; display: grid; gap: 8px; }
.setup ol a { color: var(--accent); text-decoration: underline; }
.setup form { display: flex; gap: 10px; flex-wrap: wrap; }
.setup .input { flex: 1 1 260px; height: 46px; }
.setup .hint { color: var(--faint); font-size: 12.5px; margin-top: 12px; }
.err { color: var(--red); font-weight: 600; margin-top: 10px; font-size: 13.5px; }

.toast {
  position: fixed; z-index: 90; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-weight: 700; font-size: 14px;
  opacity: 0; pointer-events: none; transition: all .3s var(--ease); white-space: nowrap;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 899px) { .toast { bottom: calc(86px + env(safe-area-inset-bottom)); } }

.prose { color: var(--soft-text); max-width: 75ch; white-space: pre-line; }
.prose.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 700; margin-top: 8px; }
.settings { display: grid; gap: 18px; max-width: 760px; }
.settings .set { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.settings h3 { font-size: 19px; }
.settings p { color: var(--muted); font-size: 13.5px; margin: 4px 0 14px; }
.provider-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.provider-pick .chip { height: 40px; padding-left: 6px; }
.provider-pick .chip img { width: 28px; height: 28px; border-radius: 7px; }
.provider-pick .chip.on { background: var(--accent-soft); color: var(--accent); border-color: rgba(255,79,163,.6); }
.counter { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; }
.counter button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-2); font-size: 18px; font-weight: 700; }
.counter span { min-width: 92px; text-align: center; font-weight: 700; font-size: 14px; }
.countdown { color: var(--accent); font-weight: 700; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
@media (max-width: 980px) { .split { grid-template-columns: minmax(0, 1fr); } }
.split > * { min-width: 0; }
.side-stack { display: grid; gap: 18px; }

/* ---------- girly finishing touches ---------- */
::selection { background: #ffc2e0; color: var(--text); }
.poster, .lcard .thumb, .channel, .wtw, .ep, .info-grid div, .settings .set, .setup .card-box { box-shadow: var(--shadow), 0 0 0 1px var(--line) inset; }
.card:hover .poster { box-shadow: 0 16px 34px -14px rgba(255,61,150,.7), 0 0 0 2px var(--accent-2) inset; }
.poster { transition: box-shadow .3s, transform .3s var(--ease); }
.card:hover .poster { transform: translateY(-3px); }
.section-head h2 em, .page-head h1 em, .hero-kicker { color: var(--accent); }
.section-head h2::after { content: " ♡"; color: var(--accent-2); font-style: normal; font-size: .7em; vertical-align: .15em; }
.page-head h1::after { content: " ✿"; color: var(--accent-2); font-size: .55em; vertical-align: .35em; }
.hero h1, .title-info h1 { color: var(--text); }
.chip.on { background: linear-gradient(135deg, #ff6fb5, #ff3d96); color: #fff; border-color: transparent; box-shadow: 0 6px 16px -8px rgba(255,61,150,.9); }
.topnav a.on { background: var(--accent-soft); color: var(--accent); }
.seg button.on { background: #fff; color: var(--accent); }
.channel { background: #fff; }
.channel::before { opacity: .22; }
.channel:hover::before { opacity: .36; }
.check.on { background: linear-gradient(135deg, #ff6fb5, #ff3d96); border-color: transparent; }
.badge.accent { background: var(--accent); color: #fff; }
.star { color: #ff4fa3; }
.toast { background: linear-gradient(135deg, #ff6fb5, #ff3d96); color: #fff; box-shadow: 0 12px 30px -10px rgba(255,61,150,.8); }
.poster .noimg { background: linear-gradient(160deg, #ffe0ee, #ffd0e6); color: var(--accent); }
.skel { background: linear-gradient(100deg, #ffe6f1 30%, #fff5fa 50%, #ffe6f1 70%); background-size: 300% 100%; }
.modal-box { background: #fff; }
.frame .frame-msg { color: #f7c6de; }
.search input { background: #fff; }
.icon-btn { background: #fff; color: var(--accent); }
.empty, .notice { background: rgba(255,255,255,.6); }
