/* Novelón TV · network shell (pink on plum) + per-series themes. */
:root {
  --bg: #0e0a12; --panel: #18111d; --line: #3a2a44; --text: #f6eef4; --muted: #b6a3b8;
  --pink: #ff4fb0; --pink-ink: #1a0712; --gold: #f2c56b; --radius: 20px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--pink); }
img { max-width: 100%; }
[hidden] { display: none !important; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.serif { font-family: "Playfair Display", Georgia, serif; font-style: italic; font-weight: 600; }

/* header */
.top { border-bottom: 1px solid var(--line); background: var(--bg); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding-top: 12px; padding-bottom: 12px; }
.logo img { display: block; height: 44px; width: auto; }
.top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; font-weight: 600; font-size: 15px; }
.top nav a { color: var(--text); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.top nav a:hover { color: var(--pink); }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang button { border: 0; background: transparent; color: var(--text); font: 600 13px Inter, sans-serif; padding: 0 14px; min-height: 40px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--pink); color: var(--pink-ink); }
.lang button:focus-visible, .btn:focus-visible, .top nav a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

h1, h2 { margin: 0; line-height: 1.1; }
h2 { font: italic 600 clamp(26px, 5vw, 34px)/1.15 "Playfair Display", Georgia, serif; }
.kicker { font: 600 12px Inter, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
section { padding: 28px 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px;
  border: 1px solid transparent; background: var(--pink); color: var(--pink-ink); font: 700 16px Inter, sans-serif; text-decoration: none; cursor: pointer; }
.btn.ghost { background: transparent; border-color: #5a4466; color: var(--text); font-weight: 600; }
.btn.small { min-height: 44px; padding: 0 16px; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 600 12px Inter, sans-serif; padding: 4px 10px; border-radius: 999px; border: 1px solid currentColor; }
.chip.solid { border-color: transparent; }

/* home: now playing */
.now { display: grid; gap: 0; grid-template-columns: 1fr; background: var(--panel); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
@media (min-width: 820px) { .now { grid-template-columns: minmax(280px, 380px) 1fr; } }
.player { position: relative; width: 100%; max-width: 380px; margin: 0 auto; aspect-ratio: 9 / 16; background: #000; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.now-body { padding: 24px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.now-body h1 { font: italic 700 clamp(30px, 5vw, 46px)/1.08 "Playfair Display", Georgia, serif; }
.badge { align-self: flex-start; background: #e3304f; color: #fff6f8; font: 700 12px Inter, sans-serif; letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; border-radius: 6px; }
.next { border-top: 1px solid var(--line); padding-top: 14px; color: var(--muted); font-size: 14px; }
.next b { color: var(--text); }
.count { display: block; color: var(--pink); font-weight: 600; margin-top: 4px; }
.count:empty { display: none; }
.tagline { margin: 22px 0 4px; font: italic 600 clamp(22px, 4.5vw, 30px)/1.25 "Playfair Display", Georgia, serif; text-align: center; }
.sub { margin: 0; text-align: center; color: var(--muted); }

/* series cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; margin-top: 18px; }
.card { border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; }
.card .art { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.card .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card .body p { margin: 0; }
.card .meta { font-size: 14px; }
.card .row { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.card .addr { font-size: 13px; opacity: .8; }
.card.herencia { background: #1d0f14; border: 1px solid #5c2a35; color: #f1e2d8; }
.card.herencia .art { background: #2a1219; }
.card.herencia .art .scene { opacity: .5; }
.card.herencia .art .title { position: absolute; inset: auto; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 74%; height: auto; object-fit: contain; }
.card.herencia .chip { color: var(--gold); border-color: #8a5a3a; }
.card.herencia .chip.solid { background: #e3304f; color: #fff6f8; }
.card.herencia .meta { color: #d9b98e; }
.card.herencia .btn { background: var(--gold); color: #2a1219; }
.card.dumpling { background: #fff4e6; border: 1px solid #f3d6c2; color: #3b2a3f; font-family: Nunito, Inter, sans-serif; }
.card.dumpling .art { background: #ffe1ea; }
.card.dumpling .art img { object-position: center 66%; }
.card.dumpling .art .ttl { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 18px; background: rgb(255 244 230 / .92); font: 400 30px/1 "Bagel Fat One", Nunito, sans-serif; color: #e2557d; }
.card.dumpling .chip { color: #9b3456; border-color: #e2a7b9; }
.card.dumpling .chip.solid { background: #3b2a3f; color: #fff4e6; }
.card.dumpling .meta { color: #8a5d6b; }
.card.dumpling .btn { background: #e2557d; color: #fff8f2; }
.card.next-story { border: 1px dashed var(--line); padding: 26px; justify-content: center; gap: 10px; min-height: 240px; color: var(--muted); }
.card.next-story .serif { color: var(--text); font-size: 26px; }

/* schedule */
.week { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.day { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.day.herencia { border-left-width: 1px; }
.day-show { font-weight: 700; }
.day.herencia .day-show { color: var(--gold); }
.day.dumpling .day-show { color: #ff8fb0; }
.day-what { font-size: 14px; color: #e3d6e1; }
.day-count { font-size: 13px; color: var(--pink); font-weight: 600; }

/* community + platforms */
.community { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 24px; display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.community p { margin: 6px 0 0; color: var(--muted); max-width: 60ch; }
.wa { background: #25d366; color: #06301a; }
.platforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.platforms a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); text-decoration: none; font-weight: 600; }
.platforms a:hover { border-color: var(--pink); }
.platforms a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.platforms svg { width: 22px; height: 22px; fill: currentColor; flex: none; }
.platforms span { display: flex; flex-direction: column; line-height: 1.15; }
.platforms small { color: var(--muted); font-weight: 500; font-size: 12px; }

footer { border-top: 1px solid var(--line); margin-top: 24px; }
footer .wrap { padding-top: 24px; padding-bottom: calc(36px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 13px; }
footer a { color: var(--text); }

/* series pages */
.show-hero { position: relative; overflow: hidden; }
.show-hero .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.show-hero .wrap { position: relative; padding-top: 44px; padding-bottom: 40px; display: grid; gap: 24px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 820px) { .show-hero .wrap { grid-template-columns: minmax(260px, 420px) 1fr; } }
.show-hero .info { display: flex; flex-direction: column; gap: 14px; }
.show-hero .info p { margin: 0; font-size: 18px; max-width: 60ch; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.start { display: flex; align-items: center; gap: 14px; width: 100%; max-width: 520px; padding: 10px; text-align: left; border-radius: 16px; cursor: pointer; font: inherit; color: inherit; min-height: 44px; }
.start img { width: 64px; height: 114px; object-fit: cover; border-radius: 10px; flex: none; background: #000; }
.start .k { display: block; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.start .t { display: block; font-size: 20px; font-weight: 700; }
.start .h { display: block; font-size: 14px; opacity: .8; }
.eps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ep { border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 6px; min-height: 160px; }
.ep-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ep-n { font-size: 28px; line-height: 1; }
.ep-date { font: 600 12px Inter, sans-serif; }
.ep-title { font-weight: 700; font-size: 17px; }
.ep-line { font-size: 14px; }
.ep .btn, .ep-soon { margin-top: auto; align-self: flex-start; }
.ep-soon { font: 600 13px Inter, sans-serif; opacity: .75; }
.castlist { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.member { border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.member img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.member-btn { display: block; padding: 0; border: 0; background: none; cursor: pointer; width: 100%; }
.member-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.member-body { padding: 10px 12px 14px; }
.member-name { font-weight: 700; }
.member-role { font-size: 13px; }
.note { font-size: 14px; opacity: .8; margin: 6px 0 0; }
.box { border-radius: 22px; padding: 24px; display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.box p { margin: 6px 0 0; max-width: 64ch; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }

/* Herencia theme */
body.herencia { background: #140a0d; color: #f6ebe3; }
.herencia .show-hero .bg { opacity: .35; }
.herencia .show-hero .wrap > img { width: 70%; max-width: 420px; height: auto; margin: 0 auto; }
@media (min-width: 820px) { .herencia .show-hero .wrap > img { width: 100%; } }
.herencia .show-hero h1 { font: italic 700 clamp(38px, 7vw, 54px)/1.05 "Playfair Display", Georgia, serif; color: var(--gold); }
.herencia .show-hero .chip { color: var(--gold); border-color: #8a5a3a; }
.herencia .show-hero .chip.solid { background: #e3304f; color: #fff6f8; }
.herencia .btn { background: var(--gold); color: #2a1219; }
.herencia .btn.ghost { background: transparent; border-color: #8a5a3a; color: #f6ebe3; }
.herencia .start { background: #1d0f14; border: 1px solid #5c2a35; }
.herencia .start .k { color: var(--gold); }
.herencia h2 { color: var(--gold); }
.herencia .ep { background: #1d0f14; border: 1px solid #5c2a35; }
.herencia .ep:not(.aired) { background: #170b0f; border-color: #3a2228; }
.herencia .ep-n { font-family: "Playfair Display", Georgia, serif; font-style: italic; font-weight: 700; color: var(--gold); }
.herencia .ep-date { color: #d9b98e; }
.herencia .ep-line { color: #e5cfc3; }
.herencia .member { background: #1d0f14; border: 1px solid #4a2530; }
.herencia .member-role { color: #d9b98e; }
.herencia .box { background: #22101a; border: 1px solid #5c2a35; }
.herencia .wa { background: #25d366; color: #06301a; }

/* Single White Dumpling theme */
body.dumpling { background: #fff4e6; color: #3b2a3f; font-family: Nunito, Inter, system-ui, sans-serif; }
.dumpling a { color: #b8325c; }
.dumpling .top, .dumpling footer { background: var(--bg); color: var(--text); }
.dumpling footer a { color: var(--text); }
.dumpling .show-hero { background: #ffe1ea; }
.dumpling .show-hero .wrap { padding-top: 0; padding-bottom: 0; grid-template-columns: 1fr; }
@media (min-width: 820px) { .dumpling .show-hero .wrap { grid-template-columns: minmax(300px, 420px) 1fr; padding-top: 36px; padding-bottom: 36px; } }
.dumpling .hero-img { width: 100%; height: auto; margin: 16px 0 0; border-radius: 20px; aspect-ratio: 1 / 1; object-fit: cover; object-position: center 100%; display: block; }
@media (min-width: 820px) { .dumpling .hero-img { width: 100%; margin: 0; border-radius: 24px; } }
.dumpling .show-hero .info { padding-bottom: 28px; }
.dumpling .show-hero h1 { font: 400 clamp(42px, 9vw, 64px)/0.98 "Bagel Fat One", Nunito, sans-serif; color: #e2557d; }
.dumpling .lead { font-weight: 800; font-size: 19px; }
.dumpling .chip { color: #9b3456; border-color: #e2a7b9; font-family: Nunito, sans-serif; font-weight: 800; }
.dumpling .chip.solid { background: #3b2a3f; color: #fff4e6; }
.dumpling .btn { background: #e2557d; color: #fff8f2; font-family: Nunito, sans-serif; font-weight: 800; }
.dumpling .notice { background: #3b2a3f; color: #fff4e6; border-radius: 14px; padding: 10px 14px; font-size: 15px; }
.dumpling h2 { font: 400 clamp(26px, 5vw, 32px)/1.1 "Bagel Fat One", Nunito, sans-serif; color: #3b2a3f; }
.dumpling .ep { background: #fff8f0; border: 1px solid #f3d6c2; }
.dumpling .ep:first-child { background: #fff; }
.dumpling .ep-n { font-family: "Bagel Fat One", Nunito, sans-serif; color: #e2557d; }
.dumpling .ep-date, .dumpling .ep-line, .dumpling .member-role, .dumpling .count, .dumpling .note { color: #8a5d6b; }
.dumpling .count { font-weight: 800; }
.dumpling .member { background: #fff; border: 1px solid #f3d6c2; }
.dumpling .box { background: #3b2a3f; color: #fff4e6; }
.dumpling .box h2 { color: #ffd36b; }
.dumpling .platforms a { background: #fff; color: #3b2a3f; border-color: #f3d6c2; }
.dumpling .platforms small { color: #8a5d6b; }
.dumpling .more { background: var(--bg); color: var(--text); }
.dumpling .start { display: none; }

dialog { padding: 0; border: 0; background: transparent; width: min(92vw, 380px); max-height: 92vh; }
dialog::backdrop { background: rgba(5, 3, 8, .88); }
dialog .frame { position: relative; width: 100%; aspect-ratio: 9 / 16; max-height: 84vh; margin: 0 auto; }
dialog iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 12px; }
dialog .close { display: block; margin: 10px auto 0; padding: 10px 22px; min-height: 44px; border-radius: 999px; cursor: pointer; background: #18111d; color: #f6eef4; border: 1px solid #3a2a44; font: 600 15px Inter, system-ui, sans-serif; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* home: newest episode per series (novelon.js renderHome) */
.now-line { margin: 0; color: var(--muted); max-width: 52ch; }
.card-latest { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid currentColor;
  background: transparent; color: inherit; font: inherit; font-size: 14px; text-align: left; cursor: pointer; opacity: .92; }
.card-latest:hover, .card-latest:focus-visible { opacity: 1; background: rgba(127,127,127,.12); }
.card-latest .cl-play { font-size: 12px; }
.card-latest .cl-tag { font: 600 11px Inter, sans-serif; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.card-latest .cl-what { font-weight: 600; flex: 1; min-width: 0; }
.card-latest .cl-when { font-size: 13px; opacity: .75; white-space: nowrap; }
.also { display: flex; flex-direction: column; gap: 8px; }
.also-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.also-btn:hover, .also-btn:focus-visible { border-color: var(--muted); }
.also-tag { font: 600 11px Inter, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.also-what { font-weight: 600; }
