/* ==========================================================================
   SPLIVMAX STREAMING — hoja de estilos principal (tema oscuro)
   Los colores de marca --accent / --accent-2 se definen desde el panel.
   ========================================================================== */

:root {
  --accent: #6d5dfc;
  --accent-2: #00d1ff;
  --bg: #070a12;
  --bg-2: #0c1020;
  --surface: #121730;
  --surface-2: #181e3b;
  --surface-3: #212850;
  --line: #262d52;
  --line-soft: rgba(255, 255, 255, .07);
  --text: #eef0fb;
  --text-2: #b3b9d6;
  --muted: #8189ad;
  --ok: #22c993;
  --warn: #f5b041;
  --bad: #ff5778;
  --info: #4fb8ff;
  --premium: #ffcf6b;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
  --header-h: 68px;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --gradient: linear-gradient(135deg, var(--accent), var(--accent-2));
  color-scheme: dark;
}

/* --------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
@supports (overflow: clip) { html, body { overflow-x: clip; } }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }
p a, .prose a, dd a, .hint a, .muted a, label a { color: var(--accent-2); }
p a:hover, .prose a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code, pre { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .88em; }
code { background: var(--surface-2); padding: .1em .4em; border-radius: 5px; word-break: break-all; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
[hidden] { display: none !important; }
::selection { background: color-mix(in srgb, var(--accent) 60%, transparent); }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 4px; }

.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; display: inline-block; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; }
.container { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: 860px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.text-warn { color: var(--warn); }
.hint { color: var(--muted); font-size: .84rem; margin: .35em 0 0; }
.hide-sm { }
.copyable { cursor: copy; }
.code-block { white-space: pre-wrap; background: var(--bg-2); padding: 10px; border-radius: var(--radius-sm); max-width: 520px; max-height: 260px; overflow: auto; margin: 6px 0 0; }
main { min-height: 60vh; outline: none; }

/* --------------------------------------------------------------- botones */
.btn {
  --btn-bg: var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .7em 1.25em; border-radius: 999px; border: 1px solid transparent;
  background: var(--btn-bg); color: #fff; font-weight: 600; line-height: 1.1; white-space: nowrap;
  transition: transform .15s var(--ease), background .2s, box-shadow .2s, border-color .2s, opacity .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--primary { background: var(--gradient); box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn--primary:hover { box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 55%, transparent); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.btn--glass { background: rgba(255, 255, 255, .14); backdrop-filter: blur(10px); border-color: rgba(255, 255, 255, .18); }
.btn--glass:hover { background: rgba(255, 255, 255, .22); }
.btn--glass.is-on { border-color: var(--accent-2); }
.btn--danger { background: color-mix(in srgb, var(--bad) 85%, #000); }
.btn--danger:hover { background: var(--bad); }
.btn--sm { padding: .5em .95em; font-size: .88rem; }
.btn--xs { padding: .35em .7em; font-size: .78rem; }
.btn--lg { padding: .9em 1.6em; font-size: 1.02rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-busy::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .8s linear infinite; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line-soft); background: rgba(255, 255, 255, .06); color: var(--text);
  transition: background .2s, transform .15s var(--ease), border-color .2s, color .2s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .14); transform: scale(1.06); }
.icon-btn--lg { width: 50px; height: 50px; }
.icon-btn--solid { background: #fff; color: #0b0f1d; border-color: #fff; }
.icon-btn--solid:hover { background: var(--accent-2); border-color: var(--accent-2); }
.icon-btn.is-on { border-color: var(--accent-2); color: var(--accent-2); }

/* --------------------------------------------------------------- chips, badges, estados */
.chip { display: inline-flex; align-items: center; gap: .35em; padding: .25em .75em; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid var(--line-soft); font-size: .8rem; color: var(--text-2); }
a.chip:hover { border-color: var(--accent); color: #fff; }
.chip--accent { background: color-mix(in srgb, var(--accent) 22%, transparent); color: #fff; border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.chip--ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.chip--warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 1em; }
.badge { display: inline-block; padding: .18em .55em; border-radius: 6px; font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.badge--premium { background: linear-gradient(135deg, #ffd98a, #ffb347); color: #2a1a00; }
.rating { display: inline-block; border: 1px solid rgba(255, 255, 255, .35); border-radius: 4px; padding: 0 .4em; font-size: .78em; font-weight: 700; line-height: 1.5; }
.status { display: inline-block; padding: .2em .65em; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.status--published, .status--active, .status--verified, .status--done, .status--accepted, .status--closed { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.status--pending, .status--scheduled, .status--queued, .status--reviewing, .status--running, .status--open, .status--warning { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.status--failed, .status--rejected, .status--suspended, .status--expired, .status--canceled, .status--security { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }
.status--draft, .status--archived, .status--inactive, .status--info, .status--refunded { background: var(--surface-3); color: var(--text-2); }

/* --------------------------------------------------------------- alertas y toasts */
.flash-wrap { position: fixed; top: calc(var(--header-h) + 10px); left: 50%; transform: translateX(-50%); z-index: 60; width: min(560px, calc(100% - 24px)); display: grid; gap: 8px; }
.admin .flash-wrap, .bare .flash-wrap { position: static; transform: none; width: auto; margin-bottom: 16px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius); border: 1px solid; background: var(--surface); box-shadow: var(--shadow); margin: 0 0 12px; }
.alert .icon { margin-top: .1em; }
.alert--success { border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: color-mix(in srgb, var(--ok) 12%, var(--surface)); }
.alert--error { border-color: color-mix(in srgb, var(--bad) 45%, transparent); background: color-mix(in srgb, var(--bad) 12%, var(--surface)); }
.alert--warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 10%, var(--surface)); }
.alert--info { border-color: color-mix(in srgb, var(--info) 40%, transparent); background: color-mix(in srgb, var(--info) 10%, var(--surface)); }
a.alert:hover { filter: brightness(1.15); }
.toast-stack { position: fixed; right: 16px; bottom: 16px; z-index: 300; display: grid; gap: 8px; width: min(380px, calc(100% - 32px)); }
.toast { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: toast-in .35s var(--ease); }
.toast--success { border-left: 4px solid var(--ok); }
.toast--error { border-left: 4px solid var(--bad); }
.toast--info { border-left: 4px solid var(--info); }
.toast.is-leaving { animation: toast-out .3s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(30px); } }

/* --------------------------------------------------------------- cabecera */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h); transition: background .3s, box-shadow .3s, backdrop-filter .3s; background: linear-gradient(180deg, rgba(4, 6, 12, .85), rgba(4, 6, 12, 0)); }
.site-header.is-scrolled { background: rgba(7, 10, 18, .88); backdrop-filter: blur(14px) saturate(1.3); box-shadow: 0 1px 0 var(--line-soft); }
.site-header__inner { height: 100%; max-width: 1600px; margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .04em; flex: none; }
.brand__mark { width: 34px; height: 34px; }
.brand__logo { height: 34px; width: auto; }
.brand__name { font-size: 1.12rem; }
.brand__suffix { color: var(--muted); font-weight: 600; font-size: .7em; letter-spacing: .25em; }
.nav-toggle { display: none; }
.main-nav { display: flex; gap: 4px; }
.main-nav__link { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 999px; color: var(--text-2); font-weight: 500; font-size: .93rem; transition: color .2s, background .2s; }
.main-nav__link .icon { display: none; }
.main-nav__link:hover { color: #fff; }
.main-nav__link.is-active { color: #fff; background: rgba(255, 255, 255, .08); }
.main-nav__link--plans { color: var(--premium); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.search { position: relative; display: flex; align-items: center; }
.search__toggle { display: none; }
.search__input { width: 240px; padding: 9px 14px 9px 38px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238189ad' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m15.5 15.5 5 5'/%3E%3C/svg%3E") 12px center / 17px no-repeat; transition: width .3s var(--ease), border-color .2s, background-color .2s; }
.search__input:focus { width: 320px; border-color: var(--accent); background-color: rgba(255, 255, 255, .1); outline: none; }
.search-results { position: absolute; top: calc(100% + 8px); right: 0; width: min(420px, 92vw); max-height: 70vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; z-index: 70; }
.search-result { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: var(--radius-sm); }
.search-result:hover, .search-result.is-active { background: var(--surface-2); }
.search-result img { width: 44px; height: 66px; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.search-result__meta { font-size: .8rem; color: var(--muted); }
.search-results__all { display: block; text-align: center; padding: 10px; color: var(--accent-2); font-weight: 600; }
.search-results__empty { padding: 16px; color: var(--muted); text-align: center; }

.dropdown { position: relative; }
.dropdown__menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; z-index: 70; animation: pop .18s var(--ease); }
.dropdown__menu--wide { width: min(380px, 92vw); }
.dropdown__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; flex-wrap: wrap; }
.dropdown__head a { color: var(--accent-2); font-size: .85rem; }
.dropdown__head small { color: var(--muted); width: 100%; }
.dropdown__name { font-weight: 700; }
.dropdown__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: var(--radius-sm); border: 0; background: none; text-align: left; color: var(--text-2); }
.dropdown__item:hover { background: var(--surface-2); color: #fff; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.notif-btn { position: relative; }
.notif-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; }
.notif-list { max-height: 360px; overflow: auto; }
.notif-item { display: block; padding: 10px 12px; border-radius: var(--radius-sm); }
.notif-item:hover { background: var(--surface-2); }
.notif-item.is-unread { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.notif-item strong { display: block; font-size: .92rem; }
.notif-item p { margin: 2px 0; color: var(--text-2); font-size: .85rem; }
.notif-item small { color: var(--muted); }
.notif-empty { padding: 18px; text-align: center; color: var(--muted); }
.avatar-btn { border: 2px solid transparent; border-radius: 50%; padding: 0; background: none; transition: border-color .2s; }
.avatar-btn:hover, .avatar-btn[aria-expanded="true"] { border-color: var(--accent-2); }
.avatar-btn img { width: 36px; height: 36px; border-radius: 50%; }

/* --------------------------------------------------------------- hero */
.hero { position: relative; min-height: min(88vh, 820px); display: flex; align-items: flex-end; padding: calc(var(--header-h) + 40px) var(--gutter) clamp(60px, 9vh, 110px); overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; animation: hero-zoom 22s ease-out both; }
.hero__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7, 10, 18, .95) 0%, rgba(7, 10, 18, .7) 38%, rgba(7, 10, 18, .1) 75%), linear-gradient(0deg, var(--bg) 0%, rgba(7, 10, 18, 0) 40%); }
.hero__content { max-width: 640px; }
.hero__kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-2); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; margin-bottom: .8em; }
.hero__title { font-size: clamp(2.2rem, 5.4vw, 4.4rem); font-weight: 900; letter-spacing: -.02em; margin-bottom: .25em; text-shadow: 0 4px 30px rgba(0, 0, 0, .5); }
.hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--text-2); margin-bottom: 1em; }
.hero__synopsis { font-size: clamp(.98rem, 1.3vw, 1.12rem); color: var(--text-2); max-width: 58ch; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 1.4em; }
.hero__logo { width: 72px; height: 72px; margin-bottom: 18px; filter: drop-shadow(0 10px 30px color-mix(in srgb, var(--accent) 60%, transparent)); }
.hero--welcome { min-height: min(78vh, 700px); }
@keyframes hero-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }

/* --------------------------------------------------------------- filas y carruseles */
.page-rows { position: relative; z-index: 2; margin-top: -40px; padding-bottom: 40px; display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(26px, 3.5vw, 44px); }
.row, .carousel { min-width: 0; }
.page-rows > .empty-state, .page-rows > .ad-slot { margin-left: var(--gutter); margin-right: var(--gutter); }
.row__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 var(--gutter); margin-bottom: 12px; }
.row__title { font-size: clamp(1.1rem, 1.7vw, 1.4rem); margin: 0; }
.row__more { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .9rem; font-weight: 600; }
.row__more:hover { color: var(--accent-2); }
.carousel { position: relative; }
.carousel__track { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(140px, 15vw, 210px); gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); padding: 6px var(--gutter) 18px; scrollbar-width: none; }
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > * { scroll-snap-align: start; }
.carousel__btn { position: absolute; top: 6px; bottom: 18px; z-index: 5; width: calc(var(--gutter) - 6px); min-width: 36px; display: grid; place-items: center; border: 0; color: #fff; opacity: 0; transition: opacity .25s; }
.carousel__btn .icon { width: 30px; height: 30px; }
.carousel__btn--prev { left: 0; background: linear-gradient(90deg, rgba(7, 10, 18, .9), transparent); }
.carousel__btn--next { right: 0; background: linear-gradient(270deg, rgba(7, 10, 18, .9), transparent); }
.carousel:hover .carousel__btn:not([disabled]) { opacity: 1; }
.carousel__btn[disabled] { pointer-events: none; }

/* --------------------------------------------------------------- tarjetas */
.card { position: relative; border-radius: var(--radius); background: var(--surface); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s; isolation: isolate; }
.card__link { display: block; }
.card__media { position: relative; aspect-ratio: 2 / 3; background: var(--surface-2); overflow: hidden; }
.card__img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), opacity .4s; }
.card__img.is-loading { opacity: 0; }
.card__media .badge { position: absolute; top: 8px; left: 8px; }
.card__media .progress { position: absolute; left: 8px; right: 8px; bottom: 8px; }
.card__body { padding: 10px 12px 12px; }
.card__title { font-size: .95rem; margin: 0 0 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: .78rem; color: var(--muted); margin: 0; }
.card__episode { font-size: .78rem; color: var(--accent-2); margin: 4px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__desc { display: none; }
.card__actions { position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 2 / 3; display: flex; gap: 8px; align-items: flex-end; justify-content: center; padding: 12px; background: linear-gradient(0deg, rgba(5, 7, 14, .92) 0%, rgba(5, 7, 14, .2) 45%, transparent 70%); opacity: 0; transition: opacity .25s; pointer-events: none; }
.card__actions > * { pointer-events: auto; }
.card:hover, .card:focus-within { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0, 0, 0, .55), 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); z-index: 3; }
.card:hover .card__img { transform: scale(1.05); }
.card:hover .card__actions, .card:focus-within .card__actions { opacity: 1; }
@media (hover: none) { .card__actions { opacity: 1; background: linear-gradient(0deg, rgba(5, 7, 14, .85), transparent 40%); } .card__actions .icon-btn { width: 32px; height: 32px; } }
.progress { display: block; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--gradient); border-radius: inherit; }
.progress--inline { width: 160px; display: inline-block; vertical-align: middle; }

/* --------------------------------------------------------------- skeletons */
.skeleton { background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--radius-sm); }
.skeleton--poster { aspect-ratio: 2 / 3; border-radius: var(--radius) var(--radius) 0 0; }
.skeleton--line { height: 12px; margin: 10px 12px; width: 70%; }
.card--skeleton { pointer-events: none; }
@keyframes shimmer { to { background-position: -150% 0; } }

/* --------------------------------------------------------------- promo */
.promo { position: relative; display: grid; align-items: center; min-height: 220px; margin: 0 var(--gutter); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); }
.promo__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; transition: transform .6s var(--ease); }
.promo:hover .promo__art { transform: scale(1.03); }
.promo__text { padding: clamp(22px, 4vw, 48px); max-width: 600px; }
.promo__text h2 { font-size: clamp(1.3rem, 2.4vw, 2rem); margin: .4em 0 .3em; }
.promo__text p { color: var(--text-2); }

/* --------------------------------------------------------------- cabeceras de página, filtros, rejilla */
.page-head { padding: calc(var(--header-h) + 36px) 0 22px; background: radial-gradient(1200px 300px at 20% 0, color-mix(in srgb, var(--accent) 18%, transparent), transparent); }
.page-head--center { text-align: center; }
.page-head--center .page-intro { margin-left: auto; margin-right: auto; }
.page-title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; margin-bottom: .2em; }
.page-intro { color: var(--text-2); max-width: 70ch; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 8px; }
.select { display: inline-flex; flex-direction: column; gap: 4px; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.select select, select, input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]), textarea {
  width: 100%; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font-size: .95rem; text-transform: none; letter-spacing: 0; font-weight: 400; transition: border-color .2s, box-shadow .2s;
}
.select select { min-width: 150px; }
select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238189ad' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
select[multiple] { background-image: none; padding-right: 12px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
textarea { resize: vertical; min-height: 44px; }
textarea.code { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
input[type=file] { color: var(--text-2); }
.select--inline { flex-direction: row; align-items: center; }
.results-count { color: var(--muted); font-size: .88rem; margin: 6px 0 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(140px, 15vw, 200px), 1fr)); gap: 18px 14px; padding-bottom: 20px; }
.grid .card { animation: fade-up .45s var(--ease) both; }
.load-more { display: flex; justify-content: center; padding: 10px 0 40px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 24px 0; }
.pagination__info { color: var(--muted); font-size: .9rem; }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } }

.genre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; padding-bottom: 50px; }
.genre-tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 130px; padding: 18px; border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg, hsl(var(--hue, 250) 70% 45%), hsl(calc(var(--hue, 250) + 50) 80% 30%)); transition: transform .25s var(--ease), box-shadow .25s; isolation: isolate; }
.genre-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .25; z-index: -1; mix-blend-mode: luminosity; }
.genre-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.genre-tile__name { font-size: 1.2rem; font-weight: 800; }
.genre-tile__count { font-size: .85rem; opacity: .85; }

/* --------------------------------------------------------------- detalles */
.preview-banner { position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 40; display: flex; gap: 8px; justify-content: center; align-items: center; padding: 8px; background: var(--warn); color: #241600; font-weight: 600; font-size: .9rem; }
.detail-hero { position: relative; padding: calc(var(--header-h) + 60px) 0 50px; min-height: 560px; display: flex; align-items: flex-end; overflow: hidden; }
.detail-hero__bg { position: absolute; inset: 0; z-index: -2; }
.detail-hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7, 10, 18, .96) 10%, rgba(7, 10, 18, .65) 50%, rgba(7, 10, 18, .25)), linear-gradient(0deg, var(--bg), transparent 45%); }
.detail-hero__inner { display: flex; gap: clamp(20px, 4vw, 48px); align-items: flex-end; }
.detail-hero__poster { width: clamp(150px, 18vw, 260px); border-radius: var(--radius); box-shadow: var(--shadow-lg); flex: none; aspect-ratio: 2 / 3; object-fit: cover; background: var(--surface); }
.detail-hero__info { max-width: 760px; }
.detail-hero__title { font-size: clamp(2rem, 4.4vw, 3.6rem); font-weight: 900; margin-bottom: .2em; }
.detail-hero__synopsis { color: var(--text-2); max-width: 70ch; }
.resume { display: flex; align-items: center; gap: 10px; margin-top: 14px; color: var(--muted); }
.detail-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; padding-top: 10px; padding-bottom: 30px; }
.detail-side:empty { display: none; }
.detail-body:has(.detail-side:empty) { grid-template-columns: 1fr; }
.episodes { margin-bottom: 36px; }
.episodes__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.episodes__head h2 { margin: 0; }
.episode-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.episode__link { display: grid; grid-template-columns: 34px 200px 1fr; gap: 16px; align-items: center; padding: 12px; border-radius: var(--radius); transition: background .2s; }
.episode__link:hover { background: var(--surface); }
.episode__num { font-size: 1.4rem; font-weight: 800; color: var(--muted); text-align: center; }
.episode__thumb { position: relative; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 16 / 9; background: var(--surface-2); }
.episode__thumb img { width: 100%; height: 100%; object-fit: cover; }
.episode__thumb .progress { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 0; }
.episode__play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .35); opacity: 0; transition: opacity .2s; }
.episode__play .icon { width: 36px; height: 36px; }
.episode__link:hover .episode__play { opacity: 1; }
.episode__info { display: grid; gap: 2px; }
.episode__info small { color: var(--muted); }
.episode__synopsis { color: var(--text-2); font-size: .88rem; }
.detail-facts dl { display: grid; grid-template-columns: 140px 1fr; gap: 10px 18px; margin: 0 0 16px; }
.detail-facts dt { color: var(--muted); }
.detail-facts dd { margin: 0; }

/* --------------------------------------------------------------- modal de detalles */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(2, 4, 10, .72); backdrop-filter: blur(6px); animation: fade .2s; overflow-y: auto; }
.modal__dialog { position: relative; width: min(860px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); animation: modal-in .3s var(--ease); }
.modal__dialog--sm { width: min(460px, 100%); padding: 24px; }
.modal__close { position: absolute; top: 12px; right: 12px; z-index: 3; background: rgba(0, 0, 0, .5); }
.modal__hero { position: relative; aspect-ratio: 16 / 7; overflow: hidden; }
.modal__hero img { width: 100%; height: 100%; object-fit: cover; }
.modal__hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg-2), transparent 60%); }
.modal__heading { position: absolute; left: 28px; right: 28px; bottom: 16px; z-index: 2; }
.modal__heading h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin: 0 0 10px; }
.modal__body { padding: 8px 28px 28px; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; }
.modal__body dl { margin: 0; display: grid; gap: 4px; font-size: .9rem; }
.modal__body dt { color: var(--muted); }
.modal__body dd { margin: 0 0 8px; }
.modal__episodes { grid-column: 1 / -1; }
.modal__actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
@keyframes fade { from { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(20px) scale(.98); } }
body.has-modal { overflow: hidden; }

/* --------------------------------------------------------------- paneles, formularios, tablas */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(16px, 2.4vw, 26px); margin-bottom: 20px; }
fieldset.panel { min-width: 0; }
fieldset.panel > legend { font-weight: 700; font-size: 1.05rem; padding: 0 6px; margin-left: -6px; }
.panel__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.panel__head h2, .panel__head h3 { margin: 0; }
.panel--danger { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.form { display: grid; gap: 14px; }
.form > h2 { margin: 8px 0 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.field > label, .field > span:first-child { font-weight: 600; font-size: .88rem; color: var(--text-2); }
.field--full { grid-column: 1 / -1; }
.field--sm { max-width: 220px; }
.field--grow { flex: 1; }
.field--inline { display: flex; align-items: center; gap: 8px; }
.field--inline select { width: auto; }
.field-error { color: var(--bad); font-size: .84rem; margin: 0; }
.form__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .9rem; }
.form__row a { color: var(--accent-2); }
.form--inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.form--inline input:not([type=checkbox]), .form--inline select { width: auto; min-width: 0; }
.input-group { display: flex; align-items: center; gap: 6px; }
.input-group input { flex: 1; }
.input--xs { width: 80px !important; padding: 6px 8px !important; font-size: .85rem !important; }
.check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; color: var(--text-2); line-height: 1.4; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.check--chip { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; align-items: center; }
.check--chip:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); color: #fff; }
.check-grid { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.check-grid legend { font-weight: 600; font-size: .88rem; color: var(--text-2); margin-bottom: 8px; }
.switch input { width: 18px; height: 18px; accent-color: var(--accent); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.strength { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.strength span { display: block; height: 100%; width: 0; background: var(--bad); transition: width .3s, background .3s; }
.color-input { display: flex; align-items: center; gap: 10px; }
.color-input input { width: 48px; height: 38px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: none; padding: 2px; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 16px; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--bg-2); font-weight: 700; white-space: nowrap; }
.table tbody tr:hover { background: rgba(255, 255, 255, .025); }
.table tr:last-child td { border-bottom: 0; }
.table--compact th, .table--compact td { padding: 7px 10px; }
.panel > .table-wrap { margin-bottom: 0; }
.table__thumb { width: 36px; height: 54px; object-fit: cover; border-radius: 4px; background: var(--surface-2); }
.table__thumb--wide { width: 64px; height: 36px; }
.table__icon { display: grid; place-items: center; width: 64px; height: 36px; border-radius: 4px; background: var(--surface-2); color: var(--muted); }
.table__actions { white-space: nowrap; }
.table__actions > * { display: inline-flex; vertical-align: middle; margin-left: 4px; }
.table__actions form { display: inline-flex; gap: 4px; align-items: center; }
.dl-grid { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 8px 18px; margin: 0 0 14px; }
.dl-grid dt { color: var(--muted); }
.dl-grid dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.dl-grid--compact { gap: 4px 12px; font-size: .88rem; }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 20px; scrollbar-width: thin; }
.tabs--wrap { flex-wrap: wrap; }
.tabs__tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 600; font-size: .92rem; margin-bottom: -1px; }
.tabs__tab:hover { color: #fff; }
.tabs__tab.is-active { color: #fff; border-color: var(--accent); }
.checklist, .rules { list-style: none; margin: 0 0 1em; padding: 0; display: grid; gap: 8px; }
.checklist li, .rules li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); }
.checklist .icon, .rules .icon { color: var(--accent-2); margin-top: .1em; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checks__item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg-2); }
.checks__item.is-ok > .icon { color: var(--ok); }
.checks__item.is-warn > .icon { color: var(--warn); }
.checks__item.is-fail > .icon { color: var(--bad); }
.list-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); }
.list-row img { width: 48px; height: 72px; object-fit: cover; border-radius: 6px; }
.list-row p { margin: 2px 0 0; }
.list-row.is-unread { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.list-row__icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--accent-2); }
.list-compact { list-style: none; margin: 0 0 16px; padding: 0; }
.list-compact li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: .9rem; }
.list-compact li:last-child { border-bottom: 0; }

/* --------------------------------------------------------------- estado vacío, errores, prose */
.empty-state { text-align: center; padding: 50px 20px; max-width: 520px; margin: 0 auto; }
.empty-state img { margin: 0 auto 18px; width: 220px; }
.empty-state p { color: var(--text-2); }
.error-page { min-height: 80vh; display: grid; place-content: center; justify-items: center; text-align: center; padding: calc(var(--header-h) + 30px) 20px 60px; }
.error-page img { width: min(320px, 80vw); margin-bottom: 10px; }
.error-page__code { font-size: 4.5rem; font-weight: 900; margin: 0; line-height: 1; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page h1 { font-size: 1.8rem; }
.error-page__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.prose { color: var(--text-2); line-height: 1.75; }
.prose h2 { color: var(--text); margin-top: 1.4em; font-size: 1.2rem; }
.prose ul { padding-left: 1.2em; }

/* --------------------------------------------------------------- auth */
.auth { position: relative; min-height: 100vh; display: grid; place-items: center; padding: calc(var(--header-h) + 30px) 16px 50px; }
.auth__bg { position: absolute; inset: 0; z-index: -1; }
.auth__bg img { width: 100%; height: 100%; object-fit: cover; }
.auth__bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 40%, rgba(7, 10, 18, .45), rgba(7, 10, 18, .92) 70%); }
.auth__card { width: min(440px, 100%); padding: clamp(24px, 4vw, 40px); background: rgba(12, 16, 32, .82); backdrop-filter: blur(18px); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.auth__card h1 { font-size: 1.7rem; margin-bottom: .2em; }
.auth__logo { margin-bottom: 18px; }
.auth__alt { text-align: center; margin: 18px 0 0; color: var(--muted); }
.auth__alt a { color: var(--accent-2); font-weight: 600; }
.auth__help { margin-top: 16px; font-size: .88rem; color: var(--muted); }
.auth__help summary { cursor: pointer; }
.auth__help form { margin-top: 10px; }
body.auth-page .site-footer { display: none; }

/* --------------------------------------------------------------- planes */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-bottom: 28px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; padding: 26px 22px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; }
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.plan--premium { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 16%, var(--surface)), var(--surface) 60%); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.plan--current { box-shadow: 0 0 0 2px var(--accent-2); }
.plan__ribbon { position: absolute; top: -12px; right: 18px; padding: 4px 12px; border-radius: 999px; background: var(--gradient); font-size: .75rem; font-weight: 700; }
.plan__name { font-size: 1.3rem; margin: 0; }
.plan__desc { color: var(--muted); font-size: .9rem; min-height: 2.8em; }
.plan__price { margin: 6px 0 18px; color: var(--muted); }
.plan__price strong { font-size: 2.2rem; color: var(--text); font-weight: 900; }
.plan .checklist { flex: 1; }
.plan-summary { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.plan-summary__name { font-size: 1.5rem; }
.plan-summary__actions { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }

/* --------------------------------------------------------------- perfil, ayuda, tickets */
.profile-head { display: flex; align-items: center; gap: 20px; }
.profile-head__avatar { width: 84px; height: 84px; border-radius: 50%; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }
.profile { padding-bottom: 50px; }
.avatar-picker { display: flex; flex-wrap: wrap; gap: 12px; border: 0; padding: 0; margin: 0; }
.avatar-picker legend { font-weight: 600; font-size: .88rem; color: var(--text-2); margin-bottom: 8px; }
.avatar-picker__item input { position: absolute; opacity: 0; }
.avatar-picker__item img { width: 60px; height: 60px; border-radius: 50%; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.avatar-picker__item input:checked + img { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent-2); transform: scale(1.05); }
.avatar-picker__item input:focus-visible + img { outline: 2px solid var(--accent-2); outline-offset: 4px; }
.search-inline { position: relative; margin-top: 18px; }
.search-inline .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-inline input { padding-left: 42px !important; border-radius: 999px !important; }
.faq { display: grid; gap: 10px; margin-bottom: 30px; }
.faq__item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.faq__item summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; font-weight: 600; list-style: none; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary .icon { transition: transform .25s; color: var(--muted); }
.faq__item[open] summary .icon { transform: rotate(180deg); }
.faq__answer { padding: 0 18px 16px; color: var(--text-2); }
.help-cta { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.help-cta h2 { margin: 0; }
.help-cta p { margin: 0; }
.ticket { padding: 0; }
.ticket > *:not(summary) { margin-left: 20px; margin-right: 20px; }
.ticket > form { margin-bottom: 20px; }
.ticket__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 16px 20px; cursor: pointer; }
.ticket__head time { margin-left: auto; }
.ticket__msg { white-space: normal; color: var(--text-2); padding: 14px; background: var(--bg-2); border-radius: var(--radius-sm); margin-bottom: 12px; }
.ticket__reply { padding: 12px 14px; border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-bottom: 12px; }
.ticket__reply p { margin: 4px 0 0; }

/* --------------------------------------------------------------- publicidad */
.ad-slot { display: grid; justify-items: center; gap: 4px; padding: 8px; border-radius: var(--radius); background: rgba(255, 255, 255, .02); border: 1px dashed var(--line-soft); margin: 10px 0; }
.ad-slot__label { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.ad-slot__frame { width: 100%; max-width: 970px; border: 0; background: transparent; }
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 150; max-width: 760px; margin: 0 auto; display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 16px 18px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: toast-in .4s var(--ease); }
.consent p { margin: 0; font-size: .88rem; color: var(--text-2); }
.consent__actions { display: flex; gap: 8px; flex: none; }

/* --------------------------------------------------------------- pie */
.site-footer { margin-top: 40px; border-top: 1px solid var(--line-soft); background: linear-gradient(180deg, var(--bg), #05070d); }
.site-footer__inner { max-width: 1440px; margin: 0 auto; padding: 44px var(--gutter) 26px; display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: 30px; }
.site-footer__brand { display: flex; gap: 14px; align-items: flex-start; }
.site-footer__brand p { color: var(--muted); font-size: .9rem; margin: 4px 0 0; }
.site-footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.site-footer__cols h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 12px; }
.site-footer__cols a { display: block; color: var(--text-2); font-size: .9rem; padding: 3px 0; overflow-wrap: anywhere; }
.site-footer__cols a:hover { color: var(--accent-2); }
.site-footer__legal { max-width: 1440px; margin: 0 auto; padding: 16px var(--gutter) 30px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: .82rem; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer__legal p { margin: 0; }

/* --------------------------------------------------------------- instalación / bare */
.bare-page { background: radial-gradient(900px 400px at 50% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent), var(--bg); }
.bare { max-width: 820px; margin: 0 auto; padding: 40px 16px 80px; }
.install__head { text-align: center; margin-bottom: 26px; }
.install__head img { margin: 0 auto 14px; }
.install form h2 { font-size: 1.1rem; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.install form h2:first-of-type { border: 0; padding-top: 0; }
.install__advanced summary { cursor: pointer; font-weight: 700; padding: 6px 0; }

/* --------------------------------------------------------------- animaciones de entrada */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Reproductor
   ========================================================================== */
.player-page { background: #000; overflow: hidden; }
.player { position: fixed; inset: 0; background: #000; color: #fff; user-select: none; outline: none; }
.player__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player__video::cue { background: rgba(0, 0, 0, .72); color: #fff; font-size: clamp(16px, 2.4vw, 30px); line-height: 1.35; }
.player__backdrop { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .35; filter: blur(6px); transition: opacity .6s; }
.player.has-started .player__backdrop { opacity: 0; }
.player__loading { position: absolute; inset: 0; display: none; place-items: center; pointer-events: none; z-index: 4; }
.player.is-loading .player__loading { display: grid; }
.player__overlay { position: absolute; inset: 0; z-index: 20; display: grid; place-content: center; justify-items: center; text-align: center; gap: 10px; padding: 24px; background: rgba(0, 0, 0, .78); backdrop-filter: blur(4px); }
.player__overlay h2 { font-size: 1.5rem; margin: 0; }
.player__overlay p { color: #cfd3ea; max-width: 520px; margin: 0; }
.player__overlay-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.player__top { position: absolute; top: 0; left: 0; right: 0; z-index: 10; display: flex; align-items: center; gap: 16px; padding: 18px 22px 60px; background: linear-gradient(180deg, rgba(0, 0, 0, .75), transparent); }
.player__titles { display: grid; }
.player__titles strong { font-size: 1.15rem; }
.player__titles span { color: #c7cbe4; font-size: .9rem; }
.player__center { position: absolute; left: 50%; top: 50%; z-index: 6; width: 86px; height: 86px; margin: -43px 0 0 -43px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); backdrop-filter: blur(8px); color: #fff; display: grid; place-items: center; transition: transform .2s var(--ease), opacity .25s, background .2s; }
.player__center .icon { width: 40px; height: 40px; margin-left: 4px; }
.player__center:hover { transform: scale(1.08); background: var(--accent); }
.player.is-playing .player__center { opacity: 0; pointer-events: none; transform: scale(.8); }
.player__seek-feedback { position: absolute; top: 50%; z-index: 6; transform: translateY(-50%); padding: 12px 18px; border-radius: 999px; background: rgba(0, 0, 0, .55); font-weight: 700; opacity: 0; transition: opacity .3s; pointer-events: none; }
.player__seek-feedback.is-left { left: 12%; }
.player__seek-feedback.is-right { right: 12%; }
.player__seek-feedback.is-visible { opacity: 1; }
.player__controls { position: absolute; left: 0; right: 0; bottom: 0; z-index: 10; padding: 70px 22px 16px; background: linear-gradient(0deg, rgba(0, 0, 0, .85), transparent); }
.player [data-chrome] { transition: opacity .35s, transform .35s; }
.player.is-idle [data-chrome] { opacity: 0; pointer-events: none; }
.player.is-idle .player__top { transform: translateY(-10px); }
.player.is-idle .player__controls { transform: translateY(10px); }
.player.is-idle { cursor: none; }
.player__progress { position: relative; height: 22px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.player__rail { position: relative; width: 100%; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .25); overflow: hidden; transition: height .15s; }
.player__progress:hover .player__rail, .player__progress.is-dragging .player__rail { height: 7px; }
.player__buffered, .player__played { position: absolute; left: 0; top: 0; bottom: 0; width: 0; }
.player__buffered { background: rgba(255, 255, 255, .35); }
.player__played { background: var(--gradient); }
.player__knob { position: absolute; top: 50%; width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 45%, transparent); transform: scale(0); transition: transform .15s; left: 0; }
.player__progress:hover .player__knob, .player__progress.is-dragging .player__knob, .player__progress:focus-visible .player__knob { transform: scale(1); }
.player__tooltip { position: absolute; bottom: 26px; padding: 4px 8px; border-radius: 6px; background: rgba(0, 0, 0, .8); font-size: .8rem; font-variant-numeric: tabular-nums; transform: translateX(-50%); opacity: 0; pointer-events: none; transition: opacity .15s; }
.player__progress:hover .player__tooltip, .player__progress.is-dragging .player__tooltip { opacity: 1; }
.player__bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px; }
.player__group { display: flex; align-items: center; gap: 6px; }
.player .icon-btn { width: 44px; height: 44px; background: transparent; border: 0; }
.player .icon-btn .icon { width: 26px; height: 26px; }
.player .icon-btn:hover { background: rgba(255, 255, 255, .14); }
.player__volume { display: flex; align-items: center; }
.player__volume-range { width: 0; opacity: 0; transition: width .25s, opacity .25s; accent-color: #fff; }
.player__volume:hover .player__volume-range, .player__volume:focus-within .player__volume-range { width: 90px; opacity: 1; margin-right: 6px; }
.player__time { font-variant-numeric: tabular-nums; font-size: .92rem; color: #dfe2f3; margin-left: 6px; white-space: nowrap; }
.player__menu { position: absolute; right: 22px; bottom: 76px; min-width: 240px; max-height: 60vh; overflow: auto; padding: 8px; border-radius: var(--radius); background: rgba(14, 17, 32, .96); border: 1px solid rgba(255, 255, 255, .12); box-shadow: var(--shadow-lg); animation: pop .18s var(--ease); }
.player__menu h3 { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: #9aa0c2; margin: 6px 10px; }
.player__menu-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: var(--radius-sm); background: none; color: #e6e8f5; text-align: left; }
.player__menu-item:hover, .player__menu-item:focus-visible { background: rgba(255, 255, 255, .1); }
.player__menu-item[aria-checked="true"] { color: var(--accent-2); font-weight: 700; }
.player__menu-item small { color: #9aa0c2; }
.player__next-card { position: absolute; right: 22px; bottom: 110px; z-index: 15; display: flex; gap: 14px; align-items: center; width: min(460px, calc(100% - 44px)); padding: 12px; border-radius: var(--radius); background: rgba(14, 17, 32, .95); border: 1px solid rgba(255, 255, 255, .14); box-shadow: var(--shadow-lg); animation: toast-in .35s var(--ease); }
.player__next-card img { width: 140px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); flex: none; background: var(--surface-2); }
.player__next-card > div { display: grid; gap: 4px; min-width: 0; }
.player__next-card small { color: #aab0d0; }
.player__next-card .player__overlay-actions { justify-content: flex-start; margin-top: 6px; }

/* ==========================================================================
   Adaptación a pantallas
   ========================================================================== */
@media (max-width: 1100px) {
  .main-nav__link { padding: 8px 9px; }
  .search__input { width: 180px; }
  .search__input:focus { width: 240px; }
  .detail-body { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  :root { --header-h: 60px; }
  .nav-toggle { display: inline-grid; }
  .main-nav { position: fixed; top: var(--header-h); left: 0; bottom: 0; width: min(300px, 82vw); flex-direction: column; gap: 2px; padding: 16px; background: var(--bg-2); border-right: 1px solid var(--line); transform: translateX(-102%); transition: transform .3s var(--ease); z-index: 80; overflow-y: auto; }
  .main-nav.is-open { transform: none; box-shadow: var(--shadow-lg); }
  .main-nav__link { padding: 12px 14px; font-size: 1rem; }
  .main-nav__link .icon { display: inline-block; }
  .brand__suffix { display: none; }
  .search__toggle { display: inline-grid; }
  .search__input { position: absolute; right: 0; top: calc(100% + 10px); width: min(92vw, 420px) !important; display: none; }
  .search.is-open .search__input { display: block; }
  .hero { min-height: 74vh; }
  .hero__shade { background: linear-gradient(0deg, var(--bg) 8%, rgba(7, 10, 18, .55) 60%, rgba(7, 10, 18, .3)); }
  .detail-hero__inner { flex-direction: column; align-items: flex-start; }
  .detail-hero__poster { width: 140px; }
  .episode__link { grid-template-columns: 120px 1fr; }
  .episode__num { display: none; }
  .modal__body { grid-template-columns: 1fr; }
  .site-footer__inner { grid-template-columns: 1fr; }
  .form-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .hide-sm { display: none !important; }
  .form-grid, .form-grid--3 { grid-template-columns: 1fr; }
  .site-footer__cols { grid-template-columns: 1fr 1fr; }
  .detail-facts dl { grid-template-columns: 1fr; gap: 2px; }
  .detail-facts dd { margin-bottom: 8px; }
  .consent { flex-direction: column; align-items: stretch; }
  .list-row { grid-template-columns: auto 1fr; }
  .list-row > time, .list-row > a, .list-row > form, .list-row > .chip { grid-column: 2; justify-self: start; }
  .player__time { display: none; }
  .player__volume-range { display: none; }
  .player .icon-btn { width: 40px; height: 40px; }
  .player__menu { right: 10px; left: 10px; min-width: 0; }
  .player__next-card img { width: 100px; }
  .profile-head { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .hero__bg img { animation: none; }
}
@media (forced-colors: active) {
  .btn, .icon-btn, .chip, .status { border: 1px solid ButtonText; }
}

/* --------------------------------------------------------------- perfiles (Quien esta viendo) */
.profiles-page .site-header .main-nav, .profiles-page .site-header .header-actions, .profiles-page .nav-toggle, .profiles-page .tabbar { display: none; }
.profiles-page .site-header { background: transparent; border-color: transparent; }
.profiles-page main {
  background:
    radial-gradient(900px 420px at 50% -8%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%),
    radial-gradient(700px 380px at 92% 105%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 70%);
}
.profiles {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(1.6rem, 4vw, 2.6rem); padding: calc(var(--header-h) + 1.5rem) var(--gutter) 4rem; text-align: center;
}
.profiles__head { display: grid; gap: .6rem; animation: pf-rise .5s var(--ease) both; }
.profiles__title { font-size: clamp(1.9rem, 5.5vw, 3.4rem); font-weight: 800; letter-spacing: -.02em; margin: 0; }
.profiles__lead { margin: 0; color: var(--text-2); font-size: clamp(.92rem, 2vw, 1.05rem); max-width: 520px; }
.profiles__grid { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(1.1rem, 3.5vw, 2.4rem); max-width: 980px; }
.profile-tile { animation: pf-rise .5s var(--ease) both; }
.profile-tile:nth-child(2) { animation-delay: .05s; } .profile-tile:nth-child(3) { animation-delay: .1s; }
.profile-tile:nth-child(4) { animation-delay: .15s; } .profile-tile:nth-child(5) { animation-delay: .2s; } .profile-tile:nth-child(6) { animation-delay: .25s; }
.profile-tile form { margin: 0; }
.profile-tile__btn {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: .55rem; background: none; border: 0; padding: 0;
  color: var(--text-2); width: clamp(104px, 20vw, 156px); cursor: pointer; transition: color .2s;
}
.profile-tile__avatar {
  position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45); outline: 3px solid transparent; outline-offset: 4px;
  transition: outline-color .2s, transform .25s var(--ease), box-shadow .25s;
}
.profile-tile__avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-tile__avatar > .icon { width: 38%; height: 38%; color: var(--muted); transition: color .2s, transform .25s var(--ease); }
.profile-tile--add .profile-tile__avatar { background: color-mix(in srgb, var(--surface) 70%, transparent); border: 2px dashed var(--line); box-shadow: none; }
.profile-tile__btn:hover, .profile-tile__btn:focus-visible { color: var(--text); }
.profile-tile__btn:focus-visible { outline: none; }
.profile-tile__btn:hover .profile-tile__avatar, .profile-tile__btn:focus-visible .profile-tile__avatar {
  outline-color: var(--text); transform: translateY(-4px) scale(1.03); box-shadow: 0 20px 44px rgba(0, 0, 0, .55);
}
.profile-tile--add .profile-tile__btn:hover .profile-tile__avatar { outline-color: var(--accent-2); border-color: transparent; }
.profile-tile--add .profile-tile__btn:hover .profile-tile__avatar > .icon { color: var(--accent-2); transform: rotate(90deg); }
.profile-tile.is-current .profile-tile__avatar { outline-color: var(--accent-2); }
.profile-tile__name { font-size: clamp(.95rem, 2.4vw, 1.1rem); font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-tile__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem; margin-top: -.15rem; }
.profile-chip {
  display: inline-flex; align-items: center; padding: .12rem .5rem; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .02em;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2);
}
.profile-chip--main { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 40%, transparent); background: color-mix(in srgb, var(--accent-2) 10%, transparent); }
.profile-chip--kids, .kids-badge { color: #3b2a00; background: linear-gradient(135deg, #ffd86b, #ff9f5a); border-color: transparent; }
.profile-chip--ghost { background: transparent; color: var(--muted); }
.profile-chip--paused { color: var(--text-2); background: var(--surface-3); }
.profile-chip--premium { color: #3b2a00; background: linear-gradient(135deg, #ffe08a, var(--premium)); border-color: transparent; }
.profile-tile--paused .profile-tile__avatar img { filter: grayscale(1) brightness(.55); }
.profile-tile__pause {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .2rem;
  color: var(--premium); font-size: .78rem; font-weight: 800;
}
.profile-tile__pause .icon { width: 28px; height: 28px; }
.profile-tile--upgrade .profile-tile__avatar { border-color: color-mix(in srgb, var(--premium) 45%, transparent); }
.profile-tile--upgrade .profile-tile__avatar > .icon { color: var(--premium); }
.profile-tile--upgrade .profile-tile__btn:hover .profile-tile__avatar { outline-color: var(--premium); }
.profile-tile--upgrade .profile-tile__btn:hover .profile-tile__avatar > .icon { color: var(--premium); transform: scale(1.1); }
.profiles__notice {
  display: flex; align-items: center; gap: .5rem; max-width: 560px; margin: 0; padding: .7rem 1rem; border-radius: var(--radius);
  background: color-mix(in srgb, var(--premium) 10%, transparent); border: 1px solid color-mix(in srgb, var(--premium) 30%, transparent);
  color: var(--text-2); font-size: .88rem; text-align: left;
}
.profiles__notice .icon { flex: none; width: 18px; height: 18px; color: var(--premium); }
.kids-badge { display: inline-flex; padding: .1rem .5rem; border-radius: 999px; font-size: .68rem; font-weight: 800; vertical-align: middle; }
.profile-tile__lock {
  position: absolute; right: 6px; top: 6px; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(7, 10, 18, .78); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(6px);
}
.profile-tile__lock .icon { width: 15px; height: 15px; color: #fff; }
.profile-tile__edit {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .25rem;
  background: linear-gradient(180deg, rgba(7, 10, 18, .25), rgba(7, 10, 18, .7)); color: #fff; font-size: .8rem; font-weight: 700;
  opacity: .92; transition: opacity .2s, background .2s;
}
.profile-tile__edit .icon { width: 30px; height: 30px; }
.profile-tile__btn:hover .profile-tile__edit { background: linear-gradient(180deg, rgba(109, 93, 252, .35), rgba(7, 10, 18, .75)); opacity: 1; }
.profiles__actions { display: flex; flex-direction: column; align-items: center; gap: 1rem; animation: pf-rise .5s .2s var(--ease) both; }
.profiles__actions form { margin: 0; }
.profiles__done { min-width: 200px; }
.profiles__logout {
  display: inline-flex; align-items: center; gap: .45rem; background: none; border: 0; padding: .4rem .6rem; color: var(--muted);
  font-size: .9rem; cursor: pointer; border-radius: var(--radius-sm); transition: color .2s;
}
.profiles__logout:hover { color: var(--text); }
.profiles__logout .icon { width: 17px; height: 17px; }
@keyframes pf-rise { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { .profiles__head, .profile-tile, .profiles__actions, .profile-editor { animation: none; } }

/* PIN */
.profiles--pin { gap: 1.4rem; }
.pin-card {
  width: min(400px, 100%); display: flex; flex-direction: column; align-items: center; gap: .9rem; padding: 2rem 1.6rem 1.6rem;
  background: color-mix(in srgb, var(--surface) 82%, transparent); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); backdrop-filter: blur(12px); animation: pf-rise .45s var(--ease) both;
}
.pin-card__avatar { position: relative; width: 104px; }
.pin-card__avatar img { width: 100%; height: auto; border-radius: 50%; box-shadow: 0 14px 30px rgba(0, 0, 0, .45); }
.pin-card__eyebrow { margin: .3rem 0 0; color: var(--accent-2); font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.pin-card__title { margin: 0; font-size: clamp(1.25rem, 3.5vw, 1.6rem); font-weight: 800; line-height: 1.25; }
.pin-form { display: flex; flex-direction: column; align-items: stretch; gap: .9rem; width: 100%; margin-top: .4rem; }
.pin-form__input {
  width: 100%; text-align: center; font-size: 2rem; letter-spacing: .6em; padding: .55rem 1rem .55rem 1.6rem; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text); transition: border-color .2s, box-shadow .2s;
}
.pin-form__input:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-2) 20%, transparent); }
.pin-help { width: 100%; color: var(--muted); font-size: .88rem; text-align: left; }
.pin-help summary { cursor: pointer; text-align: center; }
.pin-help p { margin: .6rem 0 0; }

/* Alta y edición de perfil */
.profile-editor { width: min(720px, 100%); margin: 0 auto; padding: calc(var(--header-h) + 1.2rem) var(--gutter) 4rem; animation: pf-rise .45s var(--ease) both; }
.profile-editor__back { display: inline-flex; align-items: center; gap: .45rem; color: var(--text-2); font-size: .9rem; }
.profile-editor__back:hover { color: var(--text); }
.profile-editor__back .icon { width: 16px; height: 16px; }
.profile-editor__head { margin: 1.2rem 0 1.4rem; }
.profile-editor__head h1 { margin: 0; font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -.02em; }
.profile-editor__head p { margin: .4rem 0 0; color: var(--text-2); }
.profile-editor--welcome .profile-editor__head { text-align: center; margin-top: .4rem; }
.profile-editor--welcome .profile-editor__head p { max-width: 520px; margin-inline: auto; }
.profile-editor__step {
  display: inline-block; margin-bottom: .6rem; padding: .25rem .75rem; border-radius: 999px; font-size: .72rem; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-2) 35%, transparent);
}
.profile-editor--welcome .pe-actions .btn--primary { flex: 1; }
.profile-editor__logout { display: flex; justify-content: center; margin-top: 1rem; }
.profile-editor__card {
  display: grid; gap: 1.6rem; padding: clamp(1.2rem, 3.5vw, 2rem); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--bg-2) 92%, transparent));
  border: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
.pe-label { display: block; margin: 0 0 .5rem; font-size: .85rem; font-weight: 700; color: var(--text-2); padding: 0; }
.pe-hint { margin: .45rem 0 0; font-size: .8rem; color: var(--muted); }
.pe-input {
  width: 100%; padding: .8rem 1rem; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); color: var(--text);
  font-size: 1rem; transition: border-color .2s, box-shadow .2s;
}
.pe-input:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-2) 18%, transparent); }
.pe-input--pin { text-align: center; font-size: 1.5rem; letter-spacing: .5em; padding-left: 1.4rem; }

.pe-identity { display: flex; align-items: center; gap: clamp(1rem, 3vw, 1.6rem); }
.pe-identity__preview { position: relative; flex: none; width: clamp(96px, 18vw, 128px); }
.pe-identity__preview img { width: 100%; height: auto; border-radius: 50%; box-shadow: 0 16px 36px rgba(0, 0, 0, .5); transition: transform .25s var(--ease); }
.pe-identity__kids { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); box-shadow: 0 4px 12px rgba(0, 0, 0, .4); }
.pe-identity__fields { flex: 1; min-width: 0; position: relative; }
.pe-identity__fields .pe-hint { position: absolute; right: 0; top: 0; margin: 0; }

.pe-avatars { border: 0; margin: 0; padding: 0; }
.pe-avatars__list { display: flex; flex-wrap: wrap; gap: .7rem; }
.pe-avatar { position: relative; cursor: pointer; }
.pe-avatar input { position: absolute; opacity: 0; pointer-events: none; }
.pe-avatar img {
  display: block; width: 56px; height: 56px; border-radius: 50%; outline: 3px solid transparent; outline-offset: 3px;
  transition: outline-color .15s, transform .2s var(--ease), filter .2s; filter: saturate(.85);
}
.pe-avatar:hover img { transform: translateY(-2px); filter: none; }
.pe-avatar img, .pe-identity__preview img, .avatar-picker__item img, .avatar-btn img, .profile-head__avatar, .pin-card__avatar img,
.comment__avatar, .dropdown__profile img, .profile-tile__avatar img { aspect-ratio: 1; object-fit: cover; }
.pe-avatar input:checked + img { outline-color: var(--accent-2); transform: scale(1.06); filter: none; }
.pe-avatar input:focus-visible + img { outline-color: var(--text); }

.pe-section { display: grid; gap: .9rem; padding-top: 1.4rem; border-top: 1px solid var(--line-soft); }
.pe-section__title { display: flex; align-items: center; gap: .55rem; margin: 0; font-size: 1.02rem; font-weight: 800; }
.pe-section__title .icon { width: 20px; height: 20px; color: var(--accent-2); }
.pe-section fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

.pe-toggle { display: flex; align-items: flex-start; gap: .9rem; cursor: pointer; padding: .2rem 0; }
.pe-toggle.is-disabled { cursor: not-allowed; opacity: .7; }
.pe-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.pe-toggle__track {
  position: relative; flex: none; width: 46px; height: 26px; margin-top: 1px; border-radius: 999px; background: var(--surface-3);
  border: 1px solid var(--line); transition: background .2s, border-color .2s;
}
.pe-toggle__track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35); transition: transform .22s var(--ease);
}
.pe-toggle input:checked + .pe-toggle__track { background: var(--gradient); border-color: transparent; }
.pe-toggle input:checked + .pe-toggle__track::after { transform: translateX(20px); }
.pe-toggle input:focus-visible + .pe-toggle__track { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.pe-toggle__text { display: grid; gap: .2rem; }
.pe-toggle__text strong { font-size: .95rem; }
.pe-toggle__text small { color: var(--muted); font-size: .8rem; line-height: 1.45; }

.pe-segment { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); }
.pe-segment--wide { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.pe-segment__item { position: relative; cursor: pointer; }
.pe-segment__item input { position: absolute; opacity: 0; pointer-events: none; }
.pe-segment__item span {
  display: grid; place-items: center; min-height: 42px; padding: .4rem .5rem; border-radius: calc(var(--radius) - 4px);
  font-weight: 800; font-size: .9rem; color: var(--text-2); transition: background .2s, color .2s, box-shadow .2s;
}
.pe-segment__item:hover span { background: var(--surface-2); color: var(--text); }
.pe-segment__item input:checked + span { background: var(--gradient); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 40%, transparent); }
.pe-segment__item input:focus-visible + span { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.pe-segment__item input:disabled + span { opacity: .35; cursor: not-allowed; background: none; text-decoration: line-through; }

.pe-select { position: relative; max-width: 320px; }
.pe-select select {
  width: 100%; appearance: none; padding: .75rem 2.6rem .75rem 1rem; border-radius: var(--radius); background: var(--bg-2);
  border: 1px solid var(--line); color: var(--text); font-size: .95rem; cursor: pointer;
}
.pe-select select:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-2) 18%, transparent); }
.pe-select .icon { position: absolute; right: .9rem; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.pe-pin { width: 190px; max-width: 100%; }
.pe-actions { display: flex; flex-wrap: wrap; gap: .75rem; padding-top: .4rem; }
.pe-actions .btn--primary { min-width: 180px; }

.profile-editor__danger {
  display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; margin-top: 1.2rem; padding: 1.1rem 1.4rem; border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); background: color-mix(in srgb, var(--bad) 7%, transparent);
}
.profile-editor__danger > div { flex: 1; min-width: 200px; }
.profile-editor__danger .pe-hint { margin-top: .2rem; }
.profile-editor__danger .pe-input { width: auto; flex: 0 1 220px; }

/* cuenta: selector de avatar */
.avatar-picker { border: 0; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.avatar-picker legend { margin-bottom: .6rem; color: var(--text-2); }
.avatar-picker__item { cursor: pointer; }
.avatar-picker__item input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-picker__item img { width: 100%; border-radius: 10px; outline: 3px solid transparent; transition: outline-color .15s, transform .15s; }
.avatar-picker__item input:checked + img { outline-color: var(--accent); transform: scale(1.05); }
.avatar-picker__item input:focus-visible + img { outline-color: var(--text); }
.dropdown__profile img { width: 24px; height: 24px; border-radius: 5px; }
.dropdown__profile { display: flex; align-items: center; gap: .6rem; }
.dropdown__lock { margin-left: auto; width: 14px; height: 14px; opacity: .7; }
/* --------------------------------------------------------------- comentarios */
.comments { margin-top: 2.5rem; }
.comments h2 { display: flex; align-items: center; gap: .6rem; }
.comments__count { font-size: .8rem; font-weight: 600; background: var(--surface-2); color: var(--text-2); padding: .15rem .55rem; border-radius: 99px; }
.comment-form { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: 1.5rem; }
.comment-form__box { flex: 1; min-width: 0; }
.comment-form textarea {
  width: 100%; resize: vertical; min-height: 64px; padding: .75rem .9rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); color: var(--text); line-height: 1.5;
}
.comment-form textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.comment-form__foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .5rem; flex-wrap: wrap; }
.comment-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.comment { position: relative; display: flex; gap: .8rem; padding: .85rem .9rem; border-radius: var(--radius); transition: background .15s; }
.comment:hover { background: var(--surface); }
.comment:target { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.comment__avatar { width: 40px; height: 40px; border-radius: 8px; flex: none; }
.comment__body { flex: 1; min-width: 0; }
.comment__meta { margin: 0 0 .2rem; font-size: .88rem; }
.comment__meta time { color: var(--muted); margin-left: .35rem; font-size: .8rem; }
.comment__text { margin: 0; color: var(--text-2); overflow-wrap: anywhere; }
.comment__delete { margin: 0; }
.comment__delete .icon-btn { width: 32px; height: 32px; opacity: .55; }
.comment:hover .comment__delete .icon-btn, .comment__delete .icon-btn:focus-visible { opacity: 1; }
.comments__login { color: var(--muted); }
.imdb-badge { display: inline-flex; align-items: center; gap: .35rem; }
.imdb-badge b { background: #f5c518; color: #000; font-weight: 800; font-size: .72rem; padding: .1rem .35rem; border-radius: 4px; }
/* --------------------------------------------------------------- video del destacado */
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .9s var(--ease); pointer-events: none; background: transparent; }
.hero.is-playing .hero__video { opacity: 1; }
.hero.is-playing .hero__bg img { opacity: 0; transition: opacity .9s var(--ease); }
.hero__mute { position: absolute; right: var(--gutter); bottom: clamp(70px, 11vh, 120px); z-index: 3; width: 46px; height: 46px; background: rgba(0, 0, 0, .35); border-color: rgba(255, 255, 255, .5); }
.hero__mute:hover { background: rgba(0, 0, 0, .55); }
.hero.is-playing .hero__synopsis { -webkit-line-clamp: 2; transition: all .6s; }

/* --------------------------------------------------------------- barra inferior (movil) */
.tabbar { display: none; }

/* ==========================================================================
   Diseno movil (estilo app)
   ========================================================================== */
@media (max-width: 760px) {
  :root { --header-h: 56px; --gutter: 14px; --tabbar-h: 62px; }
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }

  /* cabecera compacta: la navegacion pasa a la barra inferior */
  .nav-toggle, .main-nav { display: none !important; }
  .site-header { background: linear-gradient(180deg, rgba(4, 6, 12, .92), rgba(4, 6, 12, 0)); padding-top: env(safe-area-inset-top); height: calc(var(--header-h) + env(safe-area-inset-top)); }
  .site-header__inner { gap: 10px; }
  .brand__mark { width: 30px; height: 30px; }
  .brand__name { font-size: 1rem; }
  .header-actions { gap: 6px; }
  .header-actions .icon-btn, .avatar-btn img { width: 36px; height: 36px; }
  .avatar-btn img { border-radius: 8px; }
  .avatar-btn { border-radius: 10px; }
  .dropdown__menu { position: fixed; left: 10px; right: 10px; top: calc(var(--header-h) + 6px); min-width: 0; max-height: calc(100vh - var(--header-h) - var(--tabbar-h) - 24px); overflow: auto; }
  .dropdown__item { padding: 12px; }
  .search__input { position: fixed; left: 10px; right: 10px; top: calc(var(--header-h) + 6px); width: auto !important; }
  .search-results { position: fixed; left: 10px; right: 10px; top: calc(var(--header-h) + 54px); width: auto; max-height: 60vh; }

  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(7, 10, 18, .94); backdrop-filter: blur(16px) saturate(1.4); border-top: 1px solid var(--line-soft);
  }
  .tabbar__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: .68rem; font-weight: 600; letter-spacing: .01em; -webkit-tap-highlight-color: transparent; }
  .tabbar__item .icon { width: 23px; height: 23px; transition: transform .2s var(--ease); }
  .tabbar__item.is-active { color: #fff; }
  .tabbar__item.is-active .icon { color: var(--accent-2); transform: translateY(-1px) scale(1.06); }
  .tabbar__item:active .icon { transform: scale(.9); }
  .toast-stack { bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); right: 10px; width: calc(100% - 20px); }
  .consent { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }

  /* destacado tipo tarjeta */
  .hero {
    min-height: 0; aspect-ratio: 3 / 4; max-height: 74vh; margin: calc(var(--header-h) + env(safe-area-inset-top) + 8px) 12px 0;
    padding: 18px 16px 18px; border-radius: 18px; isolation: isolate; align-items: flex-end; justify-content: center; text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .08);
  }
  .hero--welcome { aspect-ratio: auto; min-height: 62vh; }
  .hero__bg, .hero__shade { z-index: -1; border-radius: inherit; overflow: hidden; }
  .hero__bg { z-index: -2; }
  .hero__shade { background: linear-gradient(0deg, rgba(7, 10, 18, .96) 0%, rgba(7, 10, 18, .55) 38%, rgba(7, 10, 18, 0) 65%); }
  .hero .hero__content { max-width: 100%; display: flex; flex-direction: column; align-items: center; }
  .hero .hero__kicker { font-size: .66rem; margin-bottom: .5em; }
  .hero .hero__title { font-size: clamp(1.7rem, 8.5vw, 2.4rem); margin-bottom: .3em; }
  .hero .hero__meta { justify-content: center; gap: 6px 10px; font-size: .82rem; margin-bottom: .4em; }
  .hero .hero__meta .chip { background: none; border: 0; padding: 0; font-size: .82rem; }
  .hero .hero__meta .chip + .chip::before { content: "\2022"; margin-right: 10px; color: var(--muted); }
  .hero .hero__meta .chip ~ .chip ~ .chip { display: none; }
  .hero .hero__synopsis { display: none; }
  .hero .hero__actions { display: flex; flex-wrap: nowrap; width: 100%; gap: 8px; margin-top: .9em; }
  .hero .hero__actions > a.btn { flex: 1; }
  .hero .hero__info-btn { width: 46px; height: 46px; padding: 0 !important; flex: none; }
  .hero .hero__info-btn span { display: none; }
  .hero .hero__actions .btn--lg { padding: .78em .8em; font-size: .95rem; border-radius: 10px; }
  .hero .hero__actions .btn--primary { background: #fff; color: #0b0f1d; box-shadow: none; }
  .hero .hero__actions .icon-btn--lg { width: 46px; height: 46px; border-radius: 10px; }
  .hero .hero__mute { top: 12px; right: 12px; bottom: auto; width: 38px; height: 38px; }
  .hero__bg img { animation: none; }

  /* filas: posters compactos y deslizamiento con inercia */
  .page-rows { margin-top: 22px; gap: 24px; }
  .row__head { margin-bottom: 8px; }
  .row__title { font-size: 1.05rem; font-weight: 700; }
  .row__more { font-size: .8rem; }
  .carousel__track { grid-auto-columns: calc((100% - 2 * 8px) / 3.15); gap: 8px; padding-bottom: 6px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; }
  .carousel__btn { display: none; }
  .card { border-radius: 8px; background: transparent; }
  .card:hover, .card:focus-within { transform: none; box-shadow: none; }
  .card:hover .card__img { transform: none; }
  .card__media { border-radius: 8px; }
  .card__body { padding: 6px 2px 0; }
  .card__title { font-size: .78rem; font-weight: 600; color: var(--text-2); }
  .card__meta { display: none; }
  .card__actions { display: none; }
  .card__media .badge { top: 5px; left: 5px; font-size: .56rem; padding: .15em .4em; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 8px; }

  /* ficha */
  .detail-hero { min-height: 0; padding: 0; display: block; isolation: isolate; }
  .detail-hero__bg { position: relative; aspect-ratio: 16 / 9; inset: auto; z-index: -2; }
  .detail-hero__shade { bottom: auto; height: calc(100vw * 9 / 16 + 2px); background: linear-gradient(0deg, var(--bg) 0%, rgba(7, 10, 18, 0) 55%), linear-gradient(180deg, rgba(4, 6, 12, .7), transparent 30%); }
  .detail-hero__inner { margin-top: -38px; position: relative; }
  .detail-hero__poster { display: none; }
  .detail-hero__title { font-size: 1.7rem; }
  .detail-hero__synopsis { font-size: .92rem; }
  .detail-hero .hero__actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .detail-hero .hero__actions .btn { width: 100%; border-radius: 10px; }
  .detail-hero .hero__actions .btn--primary { background: #fff; color: #0b0f1d; box-shadow: none; }
  .detail-body { gap: 20px; }
  .episode__link { grid-template-columns: 130px 1fr; gap: 12px; padding: 8px 0; }
  .comment { padding: .7rem .2rem; }

  /* modales como hoja inferior */
  .modal { place-items: end center; padding: 0; }
  .modal__dialog { width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom); animation: sheet-in .32s var(--ease); }
  .modal__dialog--sm { padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }

  /* objetivos tactiles */
  .btn { min-height: 44px; }
  .btn--sm { min-height: 38px; }
  .btn--xs { min-height: 32px; }
  input, select, textarea { font-size: 16px; }
  .site-footer { padding-bottom: 12px; }
  .profiles { min-height: 100vh; padding-top: calc(var(--header-h) + 1.5rem); justify-content: flex-start; }
  .profiles__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 138px)); gap: 26px 22px; }
  .profile-tile__btn { width: 100%; }
  .pe-identity { flex-direction: column; text-align: center; }
  .pe-identity__fields { width: 100%; text-align: left; }
  .pe-avatars__list { display: grid; grid-template-columns: repeat(4, 1fr); justify-items: center; gap: .8rem; }
  .pe-segment { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .pe-segment__item span { font-size: .82rem; padding: .4rem .2rem; }
  .pe-select { max-width: none; }
  .pe-actions .btn { flex: 1; }
  .profile-editor__danger .pe-input, .profile-editor__danger .btn { flex: 1 1 100%; }
}
@keyframes sheet-in { from { transform: translateY(40px); opacity: .4; } }
@media (max-width: 760px) and (prefers-reduced-motion: reduce) { .hero__video { display: none; } }
/* ---------------------------------------------------------------- billetera, medios de pago y prueba gratuita */
.dropdown__badge { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent-2) 16%, transparent); color: var(--accent-2); font-size: .75rem; font-weight: 700; white-space: nowrap; }
.wallet { display: grid; gap: 18px; padding-bottom: 40px; }
.wallet-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 26px 28px; border-radius: 20px; background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 75%, #000) 0%, color-mix(in srgb, var(--accent-2) 45%, #0b1020) 100%); box-shadow: 0 18px 40px color-mix(in srgb, var(--accent) 30%, transparent); color: #fff; }
.wallet-card__label { margin: 0; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.wallet-card__balance { margin: 4px 0 6px; font-size: clamp(1.9rem, 6vw, 2.6rem); font-weight: 800; letter-spacing: -.01em; }
.wallet-card__hint { margin: 0; font-size: .88rem; opacity: .85; }
.steps { margin: 0 0 14px; padding-left: 1.2em; color: var(--muted); display: grid; gap: 4px; }
.pay-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 12px 0; align-items: start; }
.pay-method { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--surface, #12172a) 80%, transparent); }
.pay-method > div { display: grid; gap: 2px; min-width: 0; }
.pay-method__logo { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; font-weight: 800; font-size: 1.2rem; color: #fff; background: #5b2bd6; }
.pay-method--nequi .pay-method__logo { background: linear-gradient(135deg, #200020, #da0081); }
.pay-method--breb .pay-method__logo { background: linear-gradient(135deg, #00a19b, #0057b8); }
.pay-method--llave .pay-method__logo { background: linear-gradient(135deg, #f7b500, #e5531a); }
.pay-method__field { font-size: .9rem; overflow-wrap: anywhere; }
.pay-method__field code { font-size: .95rem; color: #fff; }
.pay-method__holder { font-size: .8rem; color: var(--muted); }
.pay-qr { width: 160px; height: 160px; object-fit: contain; border-radius: 12px; background: #fff; padding: 6px; }
.method-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; padding: 0; border: 0; }
.method-pick legend { margin-bottom: 8px; font-weight: 600; }
.pay-wallet { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-color: color-mix(in srgb, var(--accent-2) 45%, var(--line)); }
.pay-wallet h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; }
.pay-wallet p { margin: 0; color: var(--muted); }
.ledger { list-style: none; margin: 0; padding: 0; display: grid; }
.ledger__item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ledger__item:last-child { border-bottom: 0; }
.ledger__icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: color-mix(in srgb, var(--bad, #ff5c7a) 18%, transparent); color: var(--bad, #ff5c7a); }
.ledger__icon--in { background: color-mix(in srgb, var(--good, #2bd38f) 18%, transparent); color: var(--good, #2bd38f); }
.ledger__icon .icon { width: 18px; height: 18px; }
.ledger__text { display: grid; min-width: 0; flex: 1; }
.ledger__text small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ledger__amount { font-weight: 700; white-space: nowrap; color: var(--bad, #ff5c7a); }
.ledger__amount.is-in { color: var(--good, #2bd38f); }
.trial-banner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 0 auto 26px; max-width: 980px; padding: 18px 22px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 28%, transparent), color-mix(in srgb, var(--accent-2) 16%, transparent)); }
.trial-banner > .icon { width: 30px; height: 30px; color: var(--accent-2); flex: none; }
.trial-banner > div { display: grid; gap: 2px; flex: 1; min-width: 200px; }
.trial-banner strong { font-size: 1.12rem; }
.trial-banner span { color: var(--muted); }
.trial-banner--active { border-color: color-mix(in srgb, var(--good, #2bd38f) 55%, transparent); background: color-mix(in srgb, var(--good, #2bd38f) 12%, transparent); }
.trial-banner--active > .icon { color: var(--good, #2bd38f); }
.trial-banner--ended { border-color: color-mix(in srgb, var(--bad, #ff5c7a) 55%, transparent); background: color-mix(in srgb, var(--bad, #ff5c7a) 12%, transparent); }
.trial-banner--ended > .icon { color: var(--bad, #ff5c7a); }
@media (max-width: 760px) {
    .wallet-card { padding: 20px; }
    .wallet-card .btn { width: 100%; justify-content: center; }
    .pay-wallet form, .pay-wallet .btn { width: 100%; }
    .trial-banner { padding: 16px; }
    .trial-banner form, .trial-banner .btn { width: 100%; }
    .ledger__amount { font-size: .9rem; }
}

/* ---------------------------------------------------------------- estrenos programados */
.release { display: grid; gap: 12px; margin: 4px 0 22px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 20%, transparent), color-mix(in srgb, var(--accent-2, #22d3ee) 10%, transparent)); backdrop-filter: blur(6px); max-width: 560px; }
.release__label { display: flex; gap: 8px; align-items: center; margin: 0; color: var(--text-2); }
.release__label strong { color: #fff; }
.release__label .icon { color: var(--accent-2, #22d3ee); flex: none; }
.countdown { display: flex; gap: 10px; flex-wrap: wrap; }
.countdown__unit { display: grid; justify-items: center; min-width: 74px; padding: 10px 8px 8px; border-radius: var(--radius-sm); background: rgba(5, 8, 20, .55); border: 1px solid rgba(255, 255, 255, .08); }
.countdown__unit[hidden] { display: none; }
.countdown__unit b { font-size: 2rem; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; color: #fff; }
.countdown__unit small { margin-top: 4px; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.countdown.is-live .countdown__unit { border-color: color-mix(in srgb, var(--ok) 60%, transparent); }
.countdown--compact { gap: 4px; flex-wrap: nowrap; }
.countdown--compact .countdown__unit { min-width: 44px; padding: 6px 4px 5px; background: var(--surface-2); }
.countdown--compact .countdown__unit b { font-size: 1.05rem; }
.countdown--compact .countdown__unit small { margin-top: 2px; font-size: .62rem; }
.btn.is-disabled { opacity: .65; cursor: not-allowed; pointer-events: none; }

.episode--upcoming .episode__link { grid-template-columns: 34px 200px 1fr auto; }
.episode--upcoming .episode__link:hover { background: transparent; }
.episode--upcoming .episode__thumb img { filter: saturate(.7) brightness(.85); }
.episode__soon { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; background: rgba(5, 8, 20, .78); color: #fff; }
.episode__soon .icon { width: 12px; height: 12px; }
.episode__release { display: inline-flex; align-items: center; gap: 5px; color: var(--accent-2, #22d3ee) !important; font-weight: 600; }
.episode__release .icon { width: 13px; height: 13px; flex: none; }

.card__release { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; justify-content: center; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; font-size: .74rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2, #22d3ee)); box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
.card__release .icon { width: 13px; height: 13px; }

/* ---------------------------------------------------------------- compartir */
.share__title { display: flex; align-items: center; gap: 8px; margin: 0 0 2px; font-size: 1.25rem; }
.share__name { margin: 0 0 18px; color: var(--muted); }
.share__nets { display: grid; grid-template-columns: repeat(auto-fit, minmax(62px, 1fr)); gap: 10px 6px; margin-bottom: 20px; }
.share__net { display: grid; justify-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--text-2); font: inherit; font-size: .8rem; cursor: pointer; text-decoration: none; }
.share__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--surface-2); color: #fff; transition: transform .15s, filter .15s; }
.share__icon .icon { width: 24px; height: 24px; }
.share__net:hover .share__icon, .share__net:focus-visible .share__icon { transform: translateY(-2px); filter: brightness(1.15); }
.share__net--whatsapp .share__icon { background: #25d366; }
.share__net--facebook .share__icon { background: #1877f2; }
.share__net--x-logo .share__icon { background: #000; border: 1px solid #333; }
.share__net--telegram .share__icon { background: #229ed9; }
.share__net--mail .share__icon { background: #5a6283; }
.share__label { display: block; margin-bottom: 6px; font-size: .82rem; color: var(--muted); }
.share__copy { display: flex; gap: 8px; }
.share__copy input { flex: 1; min-width: 0; }
.share__copy .btn { flex: none; }
.share__copy .btn.is-done { background: var(--ok); border-color: var(--ok); }

@media (max-width: 900px) {
    .episode--upcoming .episode__link { grid-template-columns: 120px 1fr auto; }
    .episode__soon { left: 6px; bottom: 6px; padding: 4px; }
    .episode__soon span { display: none; }
}

@media (max-width: 760px) {
    .release { padding: 14px; }
    .countdown__unit { min-width: 0; flex: 1; }
    .countdown__unit b { font-size: 1.6rem; }
    .episode--upcoming .episode__link { grid-template-columns: 130px 1fr; }
    .episode--upcoming .countdown { grid-column: 1 / -1; }
    .episode--upcoming .countdown__unit { flex: 1; }
}
/* ---------------------------------------------------------------- reportar un problema */
.player__report { margin-left: auto; opacity: .85; }
.player__net { --net: #2bd67b; margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: rgba(0, 0, 0, .5); border: 1px solid color-mix(in srgb, var(--net) 55%, transparent); color: var(--net);
  font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; transition: color .4s, border-color .4s, opacity .4s; }
.player__net + .player__report { margin-left: 0; }
.player__net[data-level="ok"] { --net: #ffc23d; }
.player__net[data-level="bad"] { --net: #ff4d5e; }
.player__net.is-stale { opacity: .6; }
.player__net-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--net); box-shadow: 0 0 0 0 var(--net); animation: net-pulse 1.6s ease-out infinite; }
.player__net.is-stale .player__net-dot { animation: none; }
@keyframes net-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--net) 70%, transparent); } 100% { box-shadow: 0 0 0 7px transparent; } }
@media (max-width: 760px) { .player__net { padding: 4px 9px; font-size: .76rem; gap: 6px; } }
@media (prefers-reduced-motion: reduce) { .player__net-dot { animation: none; } }
.player__report:hover { opacity: 1; }
.episode--reportable { position: relative; }
.episode--reportable .episode__link { padding-right: 52px; }
.episode__report { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); z-index: 2; color: var(--muted); opacity: .7; }
.episode__report:hover, .episode__report:focus-visible { color: var(--warn); opacity: 1; }
.report-form__title { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 1.3rem; }
.report-form__title .icon { color: var(--warn); }
.report-form__name { margin: 0 0 16px; color: var(--text-2); }
.report-form__reasons { border: 0; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.report-form__reasons legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.report-reason { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; transition: border-color .15s, background .15s; }
.report-reason:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.report-reason:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.report-reason input { accent-color: var(--accent); margin: 0; flex: none; }
.report-form textarea { width: 100%; }
@media (max-width: 760px) {
    .detail-hero .hero__actions { display: flex; flex-wrap: wrap; }
    .detail-hero .hero__actions > :first-child { flex: 1 1 100%; }
    .detail-hero .hero__actions .btn--glass { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 4px; padding: .65em .3em; font-size: .78rem; }
    .episode--reportable .episode__link { padding-right: 40px; }
    .episode__report { right: 0; }
    .report-reason { padding: 9px 10px; font-size: .92rem; }
}

/* Aviso «Actualiza a Premium» */
.upsell { display: grid; gap: 16px; text-align: left; }
.upsell__head { display: grid; gap: 8px; justify-items: start; }
.upsell__badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: linear-gradient(135deg, #ffd98a, #ffb347); color: #2a1a00; box-shadow: 0 6px 20px rgba(255, 179, 71, .35); }
.upsell__badge .icon { width: 14px; height: 14px; }
.upsell__title { margin: 0; font-size: 1.6rem; line-height: 1.15; background: linear-gradient(135deg, #fff, #ffd98a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.upsell__lead { margin: 0; color: #cfd3ea; }
.upsell__benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.upsell__benefits li { display: flex; align-items: center; gap: 12px; font-size: .95rem; }
.upsell__icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: rgba(255, 196, 92, .14); color: #ffc45c; }
.upsell__icon .icon { width: 17px; height: 17px; }
.upsell__price { margin: 0; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); color: #cfd3ea; text-align: center; }
.upsell__price strong { color: #fff; font-size: 1.15rem; }
.upsell__actions { display: grid; gap: 8px; }
.upsell__actions form { margin: 0; }
.upsell__note { margin: 0; text-align: center; }
.modal--upsell .modal__dialog { background: radial-gradient(120% 60% at 50% 0%, rgba(255, 179, 71, .18), transparent 70%), var(--bg-2); border-color: rgba(255, 196, 92, .35); }
.player__upsell { place-content: center; overflow-y: auto; background: radial-gradient(90% 60% at 50% 0%, rgba(255, 179, 71, .2), transparent 70%), rgba(0, 0, 0, .9); }
.player__upsell .upsell, .player__upsell-back { width: min(440px, 100%); }
.player__upsell p { max-width: none; }
.player.is-locked .player__center, .player.is-locked .player__controls { display: none; }
@media (max-width: 760px) {
    .upsell { gap: 14px; }
    .upsell__title { font-size: 1.45rem; }
    .upsell__benefits li { font-size: .9rem; }
    .player__upsell { place-content: start center; padding: calc(64px + env(safe-area-inset-top)) 18px calc(20px + env(safe-area-inset-bottom)); }
}
@media (max-height: 520px) and (orientation: landscape) {
    .player__upsell { place-content: start center; padding-top: 60px; }
    .player__upsell .upsell__benefits { grid-template-columns: 1fr 1fr; }
}

/* Sinopsis largas: se recortan y se despliegan con «Ver más» */
.clamp__text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--clamp-lines, 3); overflow: hidden; transition: max-height .35s var(--ease); }
[data-clamp].is-open .clamp__text { display: block; -webkit-line-clamp: unset; }
.clamp--synopsis .clamp__text { --clamp-lines: 6; }
.clamp--synopsis.is-clamped:not(.is-open) .clamp__text { -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
.clamp--synopsis .clamp__text { cursor: default; }
.clamp--synopsis.is-clamped .clamp__text { cursor: pointer; }
.clamp__btn { display: inline-flex; align-items: center; gap: 4px; margin: 4px 0 0; padding: 4px 0; border: 0; background: none; color: var(--text); font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer; }
.clamp__btn .icon { width: 16px; height: 16px; transition: transform .3s var(--ease); }
[data-clamp].is-open > .clamp__btn .icon { transform: rotate(180deg); }
.clamp__btn:hover, .clamp__btn:focus-visible { color: var(--accent-2); }
.episode__synopsis.clamp__text { --clamp-lines: 3; }
.episode__more { margin: -8px 0 8px calc(12px + 34px + 16px + 200px + 16px); font-size: .8rem; color: var(--text-2); }
@media (max-width: 1100px) { .episode__more { margin-left: calc(12px + 120px + 16px); } }
@media (max-width: 760px) {
    .clamp--synopsis .clamp__text { --clamp-lines: 4; }
    .clamp--synopsis .clamp__btn { width: 100%; justify-content: center; margin-top: 2px; padding: 8px 0; border-top: 1px solid var(--line); color: var(--text-2); }
    .episode__synopsis.clamp__text { --clamp-lines: 2; }
    .episode__more { margin: -4px 0 6px calc(130px + 12px); }
}
