/* =====================================================================
   player.css: video stage shared by the full screen player (.player) and
   the inline live player (.stage--inline). Apple TV look: the picture full
   bleed on black, soft scrims only while the controls show, round frosted
   glass buttons, a thin white scrubber, glass popovers and cards.
   On phones and small windows player.js adds .is-touch (centre transport,
   bottom sheets); html.is-tv drops the blur (LG/Samsung) for solid glass.
   ===================================================================== */

.player { position: fixed; inset: 0; z-index: var(--z-player); background: #000; animation: fade-in .2s var(--ease-calm); }
.player .stage { position: absolute; inset: 0; }

.stage {
  /* Glass over video. Literal values (no token references), so they may live on the stage. */
  --pg: rgba(44, 44, 50, .42);                 /* round buttons */
  --pg-hover: rgba(78, 78, 86, .56);
  --pg-solid: rgba(48, 48, 54, .9);            /* no backdrop-filter, TVs */
  --pg-card: rgba(30, 30, 34, .62);            /* popovers, panels, cards */
  --pg-card-solid: rgba(28, 28, 32, .97);
  --pg-filter: blur(24px) saturate(180%);
  --pg-card-filter: blur(44px) saturate(180%);
  --pg-ring: inset 0 0 0 .5px rgba(255, 255, 255, .2), inset 0 1px 0 rgba(255, 255, 255, .12);
  --pg-shadow: 0 24px 60px -12px rgba(0, 0, 0, .6), 0 2px 10px rgba(0, 0, 0, .25);
  --pg-text-2: rgba(255, 255, 255, .66);
  --pg-text-3: rgba(255, 255, 255, .5);
  --pg-pad: max(32px, var(--safe-l), var(--safe-r));
  --pg-ctrl: var(--control);
  position: relative; background: #000; overflow: hidden; user-select: none; -webkit-user-select: none; color: #fff;
  font-family: var(--font);
}
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.stage.is-idle { cursor: none; }
.stage.is-preparing::before, .stage.has-error::before { content: ""; position: absolute; inset: 0; z-index: var(--z-stage-shade); background: rgba(0, 0, 0, .5); pointer-events: none; }
/* An alert in the centre: the scrubber and the times go (nothing to seek); the button row stays, so
   Episodios and Siguiente still reach another episode when this one cannot play. */
.stage.has-error .seekrow, .stage.has-error .timerow { visibility: hidden; }
/* Nothing to send to picture in picture while preparing or under an alert. */
.stage.has-error .ctrl--pip, .stage.is-preparing .ctrl--pip { display: none; }

/* Subtitles. Sizes are written into <style id="xh-cue"> by player.js. While the controls show they
   rise above the whole bottom area and its scrim (--controls-h, player.js layout()), so they stay white. */
.stage video::cue {
  font-family: var(--font); font-weight: 600; line-height: 1.3; color: #fff; background: transparent;
  text-shadow: 0 0 4px #000, 0 2px 4px #000, 0 0 12px rgba(0, 0, 0, .6);
}
.stage.cue-box video::cue { background: rgba(0, 0, 0, .72); }
.player .stage video::-webkit-media-text-track-container { transition: transform 240ms var(--ease-calm); }
.player .stage:not(.is-idle) video::-webkit-media-text-track-container { transform: translateY(calc(-1 * var(--controls-h, 140px) - 28px)); }
/* TV: clear of the overscan edge when the controls are hidden too. */
html.is-tv .player .stage video::-webkit-media-text-track-container { transform: translateY(-5vh); }
html.is-tv .player .stage:not(.is-idle) video::-webkit-media-text-track-container { transform: translateY(calc(-1 * var(--controls-h, 140px) - 5vh)); }

/* "Mejorar nitidez": the canvas sits exactly over the letterboxed picture; subtitles are drawn above it. */
.stage__sharpen { position: absolute; pointer-events: none; }
.stage__cues { position: absolute; left: 4%; right: 4%; bottom: 7%; z-index: var(--z-stage-shade); display: none; justify-content: center; pointer-events: none; text-align: center; transition: transform 240ms var(--ease-calm); }
.stage.is-sharpened .stage__cues { display: flex; }
.player .stage.is-sharpened:not(.is-idle) .stage__cues { transform: translateY(calc(-1 * var(--controls-h, 140px) - 28px)); }
html.is-tv .player .stage.is-sharpened .stage__cues { transform: translateY(-5vh); }
html.is-tv .player .stage.is-sharpened:not(.is-idle) .stage__cues { transform: translateY(calc(-1 * var(--controls-h, 140px) - 5vh)); }
/* The next episode card (--upnext-h, player.js showUpNext): the subtitles rise above it too. */
.player .stage.has-upnext video::-webkit-media-text-track-container,
html.is-tv .player .stage.has-upnext video::-webkit-media-text-track-container { transform: translateY(calc(-1 * var(--upnext-h, 0px) - 40px)); }
.player .stage.has-upnext:not(.is-idle) video::-webkit-media-text-track-container,
html.is-tv .player .stage.has-upnext:not(.is-idle) video::-webkit-media-text-track-container { transform: translateY(calc(-1 * var(--controls-h, 140px) - var(--upnext-h, 0px) - 28px)); }
.player .stage.is-sharpened.has-upnext .stage__cues,
html.is-tv .player .stage.is-sharpened.has-upnext .stage__cues { transform: translateY(calc(-1 * var(--upnext-h, 0px) - 40px)); }
.player .stage.is-sharpened.has-upnext:not(.is-idle) .stage__cues,
html.is-tv .player .stage.is-sharpened.has-upnext:not(.is-idle) .stage__cues { transform: translateY(calc(-1 * var(--controls-h, 140px) - var(--upnext-h, 0px) - 28px)); }
.stage__cues span {
  padding: .08em .4em; border-radius: 4px; color: #fff; font-family: var(--font); font-weight: 600; line-height: 1.3; white-space: pre-line;
  text-shadow: 0 0 4px #000, 0 2px 4px #000, 0 0 12px rgba(0, 0, 0, .6);
}
.stage.cue-box .stage__cues span { background: rgba(0, 0, 0, .72); }

/* Scrims: only while the controls show. */
.stage__shade { position: absolute; inset: 0; z-index: var(--z-stage-shade); pointer-events: none; }
.stage__shade::before, .stage__shade::after { content: ""; position: absolute; left: 0; right: 0; transition: opacity 320ms var(--ease-calm); }
.stage__shade::before { top: 0; height: 200px; background: linear-gradient(180deg, rgba(0, 0, 0, .62) 0, rgba(0, 0, 0, .28) 45%, rgba(0, 0, 0, 0) 100%); }
/* The bottom one only as tall as the controls (the lifted subtitles sit above it, white). */
.stage__shade::after { bottom: 0; height: 164px; height: calc(var(--controls-h, 140px) + 24px); background: linear-gradient(0deg, rgba(0, 0, 0, .72) 0, rgba(0, 0, 0, .38) 60%, rgba(0, 0, 0, 0) 100%); }
/* Live, inline: only the edges darken, not the whole small picture. */
.stage--inline .stage__shade::before { height: 32%; height: min(32%, 160px); }
.stage--inline .stage__shade::after { height: 40%; height: min(40%, 200px); }
.stage.is-idle .stage__shade::before, .stage.is-idle .stage__shade::after { opacity: 0; }

/* ---------------------------------------------------------------- chrome */
.stage__top, .stage__bottom { position: absolute; left: 0; right: 0; z-index: var(--z-stage-chrome); transition: opacity 320ms var(--ease-calm); }
.stage.is-idle .stage__top, .stage.is-idle .stage__bottom { opacity: 0; pointer-events: none; }
.stage__top {
  top: 0; display: flex; align-items: flex-start; gap: 16px;
  padding: max(26px, var(--safe-t)) var(--pg-pad) 0 var(--pg-pad);
}
.stage__titles { min-width: 0; flex: 1; padding-top: 4px; text-shadow: 0 1px 10px rgba(0, 0, 0, .35); }
.stage__title { font-size: 19px; font-weight: 600; letter-spacing: -.012em; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage__subtitle { margin-top: 3px; color: var(--pg-text-2); font-size: 14px; font-weight: 500; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage__subtitle:empty { display: none; }
.stage__ends { flex: none; padding-top: 12px; color: var(--pg-text-2); font-size: 13px; font-weight: 500; white-space: nowrap; text-shadow: 0 1px 8px rgba(0, 0, 0, .55); }
.stage__ends[hidden] { display: none; }
.stage__actions { flex: none; display: flex; align-items: center; gap: 12px; }
.stage__bottom { bottom: 0; padding: 0 var(--pg-pad) max(20px, var(--safe-b)) var(--pg-pad); }

/* ------------------------------------------------------- glass buttons */
.stage .ctrl {
  position: relative; width: var(--pg-ctrl); height: var(--pg-ctrl); flex: none; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; color: #fff; background: var(--pg); box-shadow: var(--pg-ring);
  -webkit-backdrop-filter: var(--pg-filter); backdrop-filter: var(--pg-filter);
  transition: background-color 160ms var(--ease-std), color 160ms var(--ease-std), transform 200ms var(--ease-calm), box-shadow 160ms;
}
.stage .ctrl .icon { width: 22px; height: 22px; stroke-width: 1.9; }
.stage .ctrl .icon.is-filled { width: 20px; height: 20px; }
.stage .ctrl:active { transform: scale(.9); }
.stage .ctrl:disabled { opacity: .4; cursor: default; }
@media (hover: hover) and (pointer: fine) { .stage .ctrl:hover { background: var(--pg-hover); } }
.stage .ctrl:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: var(--pg-ring); }
/* An open popover's button turns white, like a selected tvOS control. */
.stage .ctrl[aria-expanded="true"] { background: rgba(255, 255, 255, .92); color: #000; }
.stage .ctrl--label { width: auto; border-radius: var(--radius-pill); padding: 0 18px 0 14px; gap: 8px; font: 600 15px/1 var(--font); }
.stage .ctrl--label .icon.is-filled { width: 16px; height: 16px; }
.stage .ctrl--close .icon { width: 20px; height: 20px; stroke-width: 2.2; }

.controls { display: flex; align-items: center; gap: 12px; height: calc(var(--pg-ctrl) + 4px); }
.controls__group { display: flex; align-items: center; gap: 12px; }
.controls__spacer { flex: 1; }
.controls__push { display: none; }
.controls .ctrl[hidden] { display: none; }

/* Volume: one glass capsule; the slider slides out on hover or focus (it is not built on touch screens). */
.volume {
  display: inline-flex; align-items: center; height: var(--pg-ctrl); border-radius: var(--radius-pill);
  background: var(--pg); box-shadow: var(--pg-ring); -webkit-backdrop-filter: var(--pg-filter); backdrop-filter: var(--pg-filter);
  transition: background-color 160ms;
}
.stage .volume .ctrl { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.volume input {
  -webkit-appearance: none; appearance: none; width: 0; height: 4px; margin: 0; padding: 0; opacity: 0; cursor: pointer;
  border-radius: 2px; background: linear-gradient(90deg, #fff var(--v, 100%), rgba(255, 255, 255, .28) var(--v, 100%));
  transition: width 240ms var(--ease-calm), margin 240ms var(--ease-calm), opacity 160ms;
}
.volume input::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.volume input::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }
.volume input::-moz-range-track { background: transparent; }
.volume:focus-within input { width: 88px; margin-right: 16px; opacity: 1; }
.volume input:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
@media (hover: hover) and (pointer: fine) {
  .volume:hover { background: var(--pg-hover); }
  .volume:hover input { width: 88px; margin-right: 16px; opacity: 1; }
}

/* ----------------------------------------------------- scrubber + times */
.seekrow { display: flex; align-items: center; height: 24px; margin-top: 14px; }
.seek { position: relative; flex: 1; height: 24px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.seek:focus-visible { outline: none; box-shadow: none; }
.seek__track {
  position: relative; width: 100%; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .18);
  transform: scaleY(.5); transition: transform 200ms var(--ease-calm);
}
.seek.is-dragging .seek__track, .seek:focus-visible .seek__track { transform: scaleY(1); }
@media (hover: hover) and (pointer: fine) { .seek:hover .seek__track { transform: scaleY(1); } }
.seek__buffered, .seek__played { position: absolute; inset: 0; border-radius: inherit; transform-origin: left; transform: scaleX(0); }
.seek__buffered { background: rgba(255, 255, 255, .35); }
.seek__played { background: #fff; }
.seek__thumb {
  position: absolute; top: 50%; left: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .45); transform: scale(0); transition: transform 200ms var(--ease-calm);
}
.seek.is-dragging .seek__thumb, .seek:focus-visible .seek__thumb { transform: scale(1); }
.seek__tip {
  position: absolute; bottom: 30px; padding: 6px 11px; border-radius: 10px;
  background: var(--pg-card); box-shadow: var(--pg-ring), 0 8px 24px rgba(0, 0, 0, .35); -webkit-backdrop-filter: var(--pg-card-filter); backdrop-filter: var(--pg-card-filter);
  font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap;
  transform: translateX(-50%) translateY(4px); opacity: 0; pointer-events: none; transition: opacity 120ms, transform 160ms var(--ease-calm);
}
.seek.is-dragging .seek__tip { opacity: 1; transform: translateX(-50%); }
@media (hover: hover) and (pointer: fine) { .seek:hover .seek__tip { opacity: 1; transform: translateX(-50%); } }
@media (pointer: coarse) { .seek, .seekrow { height: 32px; } .seek__track { transform: scaleY(.62); } }

.timerow { display: flex; align-items: center; justify-content: space-between; height: 20px; margin-top: 2px; }
.timerow__elapsed, .time-remaining { font-size: 13px; font-weight: 600; color: var(--pg-text-2); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.time-remaining { height: 20px; padding: 0; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .time-remaining:hover { color: #fff; } }

/* ------------------------------------------------------------------ centre */
/* −10 · play · +10: paused, on touch screens, on TV, and while loading (the play disc turns into the spinner). */
.stage__transport {
  position: absolute; inset: 0; z-index: var(--z-stage-center); display: flex; align-items: center; justify-content: center; gap: 48px;
  pointer-events: none; visibility: hidden; opacity: 0; transition: opacity 240ms var(--ease-calm), visibility 0s linear 240ms;
}
.stage__transport > * { pointer-events: auto; }
.stage.is-paused .stage__transport, .stage.is-touch .stage__transport, .stage.is-loading .stage__transport, html.is-tv .player .stage__transport {
  visibility: visible; opacity: 1; transition-delay: 0s;
}
.stage.is-idle:not(.is-loading) .stage__transport { opacity: 0; }
.stage.is-idle .stage__transport > * { pointer-events: none; }
.stage.has-error .stage__transport { display: none; }
/* A popover or the episodes panel open (desktop, TV): the centre clears, so nothing sits under it. */
.stage.has-layer:not(.is-touch) .stage__transport { opacity: 0; visibility: hidden; transition-delay: 0s, 0s; }
/* TV while playing with the next episode card up (its "Ver ahora" has the focus): the centre clears too, the
   subtitles lifted above the card take its place (Apple TV shows no transport with the card either). */
.stage.has-upnext:not(.is-touch):not(.is-paused) .stage__transport { opacity: 0; visibility: hidden; transition-delay: 0s, 0s; }
.stage .ctrl--disc { width: 64px; height: 64px; }
.stage .ctrl--disc .icon { width: 32px; height: 32px; stroke-width: 1.7; }
.stage .transport__play { width: 88px; height: 88px; }
.stage .transport__play .icon, .stage .transport__play .icon.is-filled { width: 34px; height: 34px; }
.transport__play .activity { display: none; }
/* Loading: no disc, only Apple's spinner in its place; −10 and +10 step aside. */
.stage.is-loading .transport__play { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; color: #fff; outline: none; transform: none; }
.stage.is-loading .transport__play .icon { display: none; }
.stage.is-loading .transport__play .activity { display: block; width: 40px; height: 40px; }
.stage.is-loading .transport__skip { opacity: 0; pointer-events: none; }

.activity { color: #fff; animation: activity-turn .8s steps(8) infinite; }
@keyframes activity-turn { to { transform: rotate(360deg); } }

.stage__center { position: absolute; inset: 0; z-index: var(--z-stage-center); display: flex; align-items: center; justify-content: center; pointer-events: none; }
.stage__center > * { pointer-events: auto; }
.stage__center > .activity { width: 36px; height: 36px; pointer-events: none; }
/* One line as a rule; the longer "asking the video server again" lines wrap inside the stage (phones). */
.stage__status {
  position: absolute; left: 50%; top: calc(50% + 40px); z-index: var(--z-stage-center); transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 32px); text-align: center; line-height: 1.4;
  color: var(--pg-text-2); font-size: 15px; font-weight: 500; pointer-events: none; text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
}
.stage__status-note { display: block; margin-top: 4px; font-size: 14px; }

/* Double tap / J / L: a glass disc on that side with the arrow and the seconds. */
.seek-ripple {
  position: absolute; top: 50%; z-index: var(--z-stage-center); width: 96px; height: 96px; margin: -48px 0 0 -48px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 50%;
  background: var(--pg); box-shadow: var(--pg-ring); -webkit-backdrop-filter: var(--pg-filter); backdrop-filter: var(--pg-filter);
  font-size: 13px; font-weight: 600; pointer-events: none;
  animation: ripple-out 700ms var(--ease-calm) forwards;
}
.seek-ripple .icon { width: 30px; height: 30px; stroke-width: 1.8; }
/* …or the transport's own disc: its arrow turns a little and the seconds show under it. */
.transport__skip.is-skipping .icon { animation: skip-turn 420ms var(--ease-calm); }
.transport__skip:first-child.is-skipping .icon { animation-name: skip-turn-back; }
@keyframes skip-turn { 40% { transform: rotate(28deg); } }
@keyframes skip-turn-back { 40% { transform: rotate(-28deg); } }
.skip-count {
  position: absolute; top: 100%; left: 50%; margin-top: 10px; transform: translateX(-50%); white-space: nowrap;
  font-size: 14px; font-weight: 600; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); pointer-events: none;
  animation: count-out 900ms var(--ease-calm) forwards;
}
@keyframes count-out { 0% { opacity: 0; transform: translate(-50%, -4px); } 20%, 70% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
@keyframes ripple-out { 0% { opacity: 0; transform: scale(.82); } 18% { opacity: 1; transform: scale(1); } 70% { opacity: 1; } 100% { opacity: 0; transform: scale(1.04); } }

/* Short messages: subtitles on/off, volume, speed (player.js flash()). */
.stage__hud {
  position: absolute; left: 50%; top: 22%; z-index: var(--z-stage-notice); transform: translate(-50%, -6px);
  padding: 10px 18px; border-radius: var(--radius-pill); white-space: nowrap;
  background: var(--pg-card); box-shadow: var(--pg-ring), var(--pg-shadow); -webkit-backdrop-filter: var(--pg-card-filter); backdrop-filter: var(--pg-card-filter);
  font-size: 15px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity 200ms, transform 240ms var(--ease-calm);
}
.stage__hud.is-on { opacity: 1; transform: translate(-50%, 0); }

/* "Activar sonido": its own slot, never cleared by the loading status. */
.stage__notice { position: absolute; top: calc(max(26px, var(--safe-t)) + 64px); left: 50%; transform: translateX(-50%); z-index: var(--z-stage-notice); }
.stage--inline .stage__notice { top: 56px; }

/* ------------------------------------------------ buttons inside the stage */
/* White pill for the main action, glass pill for the other one (alerts, the next episode card, "Activar sonido"). */
.stage .btn { height: 44px; padding: 0 22px; font-size: 15px; font-weight: 600; }
.stage .btn--primary { background: #fff; color: #000; }
.stage .btn--primary .icon.is-filled { width: 16px; height: 16px; }
.stage .btn--overlay {
  background: rgba(255, 255, 255, .14); color: #fff; box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .22);
}
@media (hover: hover) and (pointer: fine) {
  .stage .btn--primary:hover { background: #fff; transform: scale(1.02); }
  .stage .btn--overlay:hover { background: rgba(255, 255, 255, .22); }
}
.stage .btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; box-shadow: none; }
.stage__notice .btn { box-shadow: var(--pg-shadow); }

/* -------------------------------------------------------------- touch mode */
.stage.is-touch { --pg-pad: max(14px, var(--safe-l), var(--safe-r)); }
.stage.is-touch .stage__top { gap: 10px; padding-top: max(14px, var(--safe-t)); }
.stage.is-touch .stage__titles { padding-top: 6px; }
.stage.is-touch .stage__title { font-size: 17px; }
.stage.is-touch .stage__subtitle { font-size: 13px; }
.stage.is-touch .stage__bottom { padding-bottom: max(12px, var(--safe-b)); }
.stage.is-touch .seekrow { margin-top: 10px; }
.stage.is-touch .controls { gap: 10px; }
.stage.is-touch .controls__group { gap: 10px; }
.stage.is-touch .stage__notice { top: calc(max(14px, var(--safe-t)) + 56px); }
.stage.is-touch .stage__transport { gap: 36px; }
.stage.is-touch.is-narrow .stage__transport { gap: 26px; }
.stage.is-touch .ctrl--disc { width: 56px; height: 56px; }
.stage.is-touch .ctrl--disc .icon { width: 28px; height: 28px; }
.stage.is-touch .transport__play { width: 76px; height: 76px; }
.stage.is-touch .transport__play .icon, .stage.is-touch .transport__play .icon.is-filled { width: 30px; height: 30px; }
/* Touch bar: Episodios · Siguiente on the left; subtitles, settings and full screen on the right. */
.stage.is-touch .controls__group--start, .stage.is-touch .controls__spacer, .stage.is-touch .ctrl--pip { display: none; }
.stage.is-touch .controls__group--end { flex: 1; }
.stage.is-touch .controls__push { display: block; flex: 1; }
.stage.is-touch .stage__hud { top: 18%; }

/* ------------------------------------------------------- menus and panels */
.menu {
  position: absolute; right: var(--pg-pad); bottom: calc(var(--controls-h) + 10px); z-index: var(--z-stage-menu);
  max-height: min(64vh, 560px); max-height: min(64svh, 560px); overflow-y: auto; overscroll-behavior: contain; padding: 8px;
  background: var(--pg-card); border-radius: 22px; box-shadow: var(--pg-ring), var(--pg-shadow);
  -webkit-backdrop-filter: var(--pg-card-filter); backdrop-filter: var(--pg-card-filter);
  transform-origin: bottom right; animation: menu-in 240ms var(--ease-calm);
}
@keyframes menu-in { from { opacity: 0; transform: scale(.94) translateY(6px); } }
/* Columns grow to their longest label ("Español (Latinoamérica)", the admin marks) instead of cutting it. */
.menu { max-width: calc(100% - 24px); }
.menu__cols { display: grid; grid-template-columns: repeat(var(--cols, 1), 232px); grid-template-columns: repeat(var(--cols, 1), minmax(232px, max-content)); }
.menu__cols > div + div { margin-left: 8px; padding-left: 8px; box-shadow: inset .5px 0 0 rgba(255, 255, 255, .14); }
.menu__cols--settings { grid-template-columns: 168px 260px; grid-template-columns: 168px minmax(260px, max-content); }
.menu__head { display: block; padding: 10px 14px 6px; color: var(--pg-text-3); font-size: 13px; font-weight: 600; letter-spacing: 0; }
.menu__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: 8px 0 0; padding: 12px 8px 4px; box-shadow: inset 0 .5px 0 rgba(255, 255, 255, .14); }
.menu__foot-size { display: flex; align-items: center; }
.menu__foot-label { color: var(--pg-text-2); font-size: 14px; font-weight: 500; margin-right: 12px; }
.menu__note { padding: 2px 14px 8px 42px; color: var(--pg-text-3); font-size: 13px; line-height: 1.45; max-width: 34ch; }
.menu__line { display: flex; align-items: center; min-height: 40px; padding: 0 14px 0 42px; color: #fff; font-size: 15px; font-weight: 500; }
.menu__option {
  display: grid; grid-template-columns: 24px 1fr; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 0 14px 0 10px;
  border-radius: 12px; font: 500 15px/1.2 var(--font); color: rgba(255, 255, 255, .86); text-align: left;
  transition: background-color 120ms;
}
.menu__option .icon { width: 16px; height: 16px; color: #fff; stroke-width: 2.6; justify-self: center; }
.menu__option[aria-checked="true"] { color: #fff; font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .menu__option:hover { background: rgba(255, 255, 255, .1); color: #fff; } }
.menu__option:focus-visible { outline: none; box-shadow: none; background: rgba(255, 255, 255, .16); color: #fff; }
.menu__option > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage .segmented button[aria-pressed="true"] { background: #fff; color: #000; }

/* Touch: a glass bottom sheet inside the stage, so it also works in full screen. */
.sheet-scrim { position: absolute; inset: 0; z-index: calc(var(--z-stage-sheet) - 1); background: rgba(0, 0, 0, .38); animation: fade-in 200ms; }
.sheet--player {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: var(--z-stage-sheet); max-height: 74%;
  display: flex; flex-direction: column; border-radius: 26px 26px 0 0;
  background: var(--pg-card); box-shadow: var(--pg-ring), var(--pg-shadow); -webkit-backdrop-filter: var(--pg-card-filter); backdrop-filter: var(--pg-card-filter);
  padding: 8px max(14px, var(--safe-r)) max(16px, var(--safe-b)) max(14px, var(--safe-l));
  animation: sheet-in 360ms var(--ease-calm);
}
.sheet--player.sheet--tall { max-height: 82%; }
@keyframes sheet-in { from { transform: translateY(100%); } }
.sheet__grabber { width: 36px; height: 5px; margin: 0 auto 4px; border-radius: 3px; background: rgba(255, 255, 255, .3); flex: none; }
.sheet__head { display: flex; align-items: center; gap: 8px; min-height: 52px; flex: none; padding-left: 6px; }
.sheet__title { flex: 1; font-size: 17px; font-weight: 600; }
.sheet__head .ctrl { --pg-ctrl: 34px; background: rgba(255, 255, 255, .12); -webkit-backdrop-filter: none; backdrop-filter: none; }
.sheet__head .ctrl .icon { width: 16px; height: 16px; }
.sheet__body { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.sheet__body .menu__option { min-height: 50px; }
.sheet__body .segmented { margin: 4px 0 12px; }
.sheet__body .toggle { width: 100%; justify-content: space-between; min-height: 50px; padding: 0 12px; color: #fff; }
.sheet__body .menu__head { padding-top: 12px; }
.sheet__body .menu__foot { padding-left: 4px; }

/* Episodes panel (desktop, TV): a glass column on the right that stops above the controls. */
.panel {
  position: absolute; right: 16px; top: calc(max(26px, var(--safe-t)) + 60px); bottom: calc(var(--controls-h) + 10px);
  width: 440px; max-width: calc(100% - 32px); z-index: var(--z-stage-panel); display: flex; flex-direction: column;
  background: var(--pg-card); border-radius: 26px; box-shadow: var(--pg-ring), var(--pg-shadow);
  -webkit-backdrop-filter: var(--pg-card-filter); backdrop-filter: var(--pg-card-filter);
  animation: panel-in 320ms var(--ease-calm);
}
@keyframes panel-in { from { transform: translateX(28px); opacity: 0; } }
.panel__head { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 6px 12px 2px 18px; flex: none; }
.panel__head h3 { font-size: 19px; font-weight: 600; }
.panel__head .ctrl { --pg-ctrl: 36px; background: rgba(255, 255, 255, .12); -webkit-backdrop-filter: none; backdrop-filter: none; }
.panel__head .ctrl .icon { width: 16px; height: 16px; }
.panel__head .picker { background: rgba(255, 255, 255, .12); }
.panel__count { color: var(--pg-text-3); font-size: 14px; white-space: nowrap; }
.panel__spacer { flex: 1; }
.panel__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 10px 12px; }
.panel__loading { display: flex; justify-content: center; padding: 32px 0; }
/* A long season: 1–40, 41–80… above the list. */
.panel__ranges { padding: 2px 8px 10px; }
.sheet__body .panel__ranges { padding: 2px 0 10px; }
.stage .panel__ranges .segmented, .stage .menu .segmented { background: rgba(255, 255, 255, .1); }
.stage .panel__ranges .segmented button:not([aria-pressed="true"]) { color: rgba(255, 255, 255, .8); }
.panel__loading .activity { width: 32px; height: 32px; }

/* An episode: its 16:9 still (or a plate with the number), "3. Nombre", length or time left, two lines of synopsis. */
.pep-list { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.pep {
  display: grid; grid-template-columns: 148px 1fr; gap: 14px; align-items: center; width: 100%; padding: 8px; border-radius: 16px;
  text-align: left; color: #fff; transition: background-color 120ms, transform 200ms var(--ease-calm);
}
@media (hover: hover) and (pointer: fine) { .pep:hover { background: rgba(255, 255, 255, .08); } }
.pep:focus-visible { outline: none; box-shadow: inset 0 0 0 2px #fff; background: rgba(255, 255, 255, .1); }
.pep[aria-current="true"] { background: rgba(255, 255, 255, .12); }
.pep__art { position: relative; display: block; overflow: hidden; border-radius: 10px; background: #1c1c1e; box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .1); }
.pep__art::before { content: ""; display: block; padding-top: 56.25%; }
.pep__art > img, .pep__plate { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pep__plate {
  display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; color: rgba(255, 255, 255, .34);
  background: linear-gradient(135deg, #2a2a2e, #161618);
}
.pep.is-watched .pep__art > img { opacity: .72; }
.pep__bar { position: absolute; left: 8px; right: 8px; bottom: 7px; height: 3px; border-radius: 2px; overflow: hidden; background: rgba(255, 255, 255, .3); }
.pep__bar > span { position: absolute; inset: 0; background: #fff; transform-origin: left; }
/* The one playing: a dimmed still with three white bars. */
.pep__now { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding-bottom: calc(28% - 9px); background: rgba(0, 0, 0, .42); }
.pep__now > span { width: 4px; height: 18px; border-radius: 2px; background: #fff; transform-origin: bottom; animation: pep-eq 1s ease-in-out infinite alternate; }
.pep__now > span:nth-child(2) { animation-delay: -.35s; }
.pep__now > span:nth-child(3) { animation-delay: -.7s; }
@keyframes pep-eq { from { transform: scaleY(.3); } to { transform: scaleY(1); } }
.pep__text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pep__over { font-size: 12px; font-weight: 600; color: var(--pg-text-2); }
.pep__title { font-size: 15px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.pep__meta { font-size: 13px; color: var(--pg-text-3); font-variant-numeric: tabular-nums; }
.pep__desc { font-size: 13px; line-height: 1.4; color: var(--pg-text-3); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.sheet__body .pep { grid-template-columns: 124px 1fr; gap: 12px; padding: 6px; }
.sheet__body .pep__desc { display: none; }
.sheet__body .panel__count { margin-left: 4px; }

/* ----------------------------------------------------------------- up next */
.upnext {
  position: absolute; right: var(--pg-pad); bottom: calc(var(--controls-h) + 14px); z-index: var(--z-stage-upnext);
  width: min(380px, calc(100% - 32px)); padding: 12px 12px 14px; border-radius: 24px;
  background: var(--pg-card); box-shadow: var(--pg-ring), var(--pg-shadow); -webkit-backdrop-filter: var(--pg-card-filter); backdrop-filter: var(--pg-card-filter);
  animation: menu-in 280ms var(--ease-calm);
}
.stage.is-idle .upnext { bottom: max(28px, var(--safe-b)); }
.stage.is-touch .upnext { right: 12px; width: min(400px, calc(100% - 24px)); bottom: calc(var(--controls-h) + 10px); }
.stage.is-touch.is-idle .upnext { bottom: max(12px, var(--safe-b)); }
/* Under a menu, the episodes panel or a sheet (TV glass is see-through): hidden, its countdown held (player.js). */
.stage.has-layer .upnext { visibility: hidden; }
/* The next episode's still with the 10 s countdown ring over it (player.js showUpNext), the label and the name beside it. */
.upnext__head { display: grid; grid-template-columns: 144px 1fr; gap: 14px; align-items: center; }
.upnext__art { position: relative; overflow: hidden; border-radius: 12px; background: #1c1c1e; box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .1); }
.upnext__art::before { content: ""; display: block; padding-top: 56.25%; }
.upnext__art > img, .upnext__plate { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.upnext__plate { display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; color: rgba(255, 255, 255, .3); background: linear-gradient(135deg, #2a2a2e, #161618); }
.upnext__art.is-counting::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .38); }
.upnext__text { min-width: 0; }
.upnext__label { color: var(--pg-text-2); font-size: 13px; font-weight: 600; }
.upnext--ask .upnext__label { color: #fff; font-size: 15px; }
.upnext__title { margin-top: 3px; font-size: 16px; font-weight: 600; line-height: 1.3; }
.upnext__ring { position: absolute; left: 50%; top: 50%; z-index: 1; width: 46px; height: 46px; margin: -23px 0 0 -23px; }
.upnext__ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.upnext__track { fill: none; stroke: rgba(255, 255, 255, .28); stroke-width: 3; }
.upnext__arc { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset 200ms linear; }
.upnext.is-held .upnext__arc { stroke: rgba(255, 255, 255, .5); }
.upnext__seconds { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; }
.upnext__actions { display: flex; gap: 10px; margin-top: 12px; }
.upnext__actions .btn { flex: 1 1 0; min-width: 0; }
.stage.is-touch .upnext__head { grid-template-columns: 120px 1fr; }
/* Phone in landscape: the card would cover the centre discs; they step aside while it shows. */
@media (max-height: 500px) {
  .stage.is-touch.has-upnext .stage__transport { opacity: 0; visibility: hidden; }
  .stage.is-touch .upnext { width: min(340px, calc(100% - 24px)); padding: 10px 10px 12px; }
  .stage.is-touch .upnext__head { grid-template-columns: 96px 1fr; gap: 12px; }
  .stage.is-touch .upnext__actions { margin-top: 10px; }
}
@media (prefers-reduced-motion: reduce) { .upnext__arc { transition: none; } }

/* -------------------------------------------------------------- skip intro */
/* Bottom right above the controls; it stays while the controls fade (player.js renderIntro). */
.stage .skip-intro {
  position: absolute; right: var(--pg-pad); bottom: calc(var(--controls-h) + 16px); z-index: var(--z-stage-upnext);
  gap: 6px; padding: 0 18px 0 22px; color: #fff;
  background: var(--pg); box-shadow: var(--pg-ring); -webkit-backdrop-filter: var(--pg-filter); backdrop-filter: var(--pg-filter);
  animation: menu-in 240ms var(--ease-calm);
}
.stage .skip-intro .icon { width: 14px; height: 14px; }
@media (hover: hover) and (pointer: fine) { .stage .skip-intro:hover { background: var(--pg-hover); } }
.stage.is-idle .skip-intro { bottom: max(28px, var(--safe-b)); }
.stage.is-touch .skip-intro { bottom: calc(var(--controls-h) + 10px); }

/* ------------------------------------------------------------------- alert */
.alert {
  width: min(420px, calc(100% - 32px)); padding: 28px 24px 22px; border-radius: 28px; text-align: center;
  background: var(--pg-card); box-shadow: var(--pg-ring), var(--pg-shadow); -webkit-backdrop-filter: var(--pg-card-filter); backdrop-filter: var(--pg-card-filter);
  animation: menu-in 280ms var(--ease-calm);
}
.alert__icon-wrap { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.alert__icon-wrap .icon { width: 24px; height: 24px; color: #fff; stroke-width: 2; }
.alert h3 { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.alert p { max-width: 38ch; margin: 8px auto 20px; color: var(--pg-text-2); font-size: 15px; line-height: 1.5; }
.alert__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.alert__actions .btn { flex: 1 1 140px; }
/* Three actions (screen limit: Reintentar · Ver dispositivos · Volver): one under the other, the white one first. */
.alert__actions--stack { flex-direction: column; }
.alert__actions--stack .btn { flex: none; width: 100%; }
.alert .alert__note { margin: -8px auto 16px; color: var(--pg-text-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.stage--inline .alert .alert__note { margin: -4px auto 12px; font-size: 12px; }
.stage--inline .alert { padding: 18px; border-radius: 22px; }
.stage--inline .alert p { margin-bottom: 14px; font-size: 14px; }
.stage--inline .alert__icon-wrap { width: 40px; height: 40px; margin-bottom: 10px; }
.stage--inline .alert .btn { height: 40px; }
/* A small live stage (phones, short landscape; player.js sets .is-compact under 360px of height): a compact card
   that never spills out of the stage and scrolls inside if it must. The chrome gives way under it (nothing to
   play, pause or enlarge, and the now bar under the stage names the channel). */
.stage--inline.is-compact .stage__center { padding: 8px; }
.stage--inline.is-compact .alert {
  width: min(360px, 100%); max-height: 100%; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 12px 14px 14px; border-radius: 18px;
}
.stage--inline.is-compact .alert__icon-wrap { width: 28px; height: 28px; margin-bottom: 6px; }
.stage--inline.is-compact .alert__icon-wrap .icon { width: 16px; height: 16px; }
.stage--inline.is-compact .alert h3 { font-size: 15px; line-height: 1.3; }
.stage--inline.is-compact .alert p { margin: 4px auto 10px; font-size: 13px; line-height: 1.4; }
.stage--inline.is-compact .alert .alert__note { margin: -4px auto 8px; font-size: 12px; }
.stage--inline.is-compact .alert__actions { gap: 8px; }
.stage--inline.is-compact .alert__actions .btn { flex-basis: 120px; height: 36px; padding: 0 16px; font-size: 14px; }
.stage--inline.is-compact.has-error .stage__top, .stage--inline.is-compact.has-error .stage__bottom { visibility: hidden; }
/* "Activar sonido" means nothing under an alert. */
.stage--inline.has-error .stage__notice { display: none; }

/* ------------------------------------------------------------- live player */
/* The inline stage on the page's ambient tint: 18px corners and a deep soft shadow with a hairline edge
   (live.css only changes them for its pinned and short layouts). */
.stage--inline {
  --pg-pad: 16px; --pg-ctrl: 40px; aspect-ratio: 16 / 9; border-radius: 18px;
  box-shadow: 0 34px 80px -24px rgba(0, 0, 0, .8), 0 12px 28px -12px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .07);
}
html.is-tv .stage--inline { border-radius: calc(22px * var(--tvu)); }
.stage--inline .stage__top { align-items: center; gap: 10px; padding: 14px 16px 0; }
.stage--inline .stage__titles { padding-top: 0; }
.stage--inline .stage__title { font-size: 15px; font-weight: 600; }
.stage--inline .stage__bottom { padding: 0 14px 12px; }
.stage--inline .controls { gap: 10px; height: 44px; }
.stage--inline .ctrl .icon { width: 20px; height: 20px; }
.stage--inline .ctrl .icon.is-filled { width: 18px; height: 18px; }
@media (pointer: coarse) { .stage--inline { --pg-ctrl: 44px; } }
.stage:fullscreen { --pg-pad: max(32px, var(--safe-l), var(--safe-r)); --pg-ctrl: var(--control); border-radius: 0; box-shadow: none; }
.stage:-webkit-full-screen { border-radius: 0; box-shadow: none; }
/* Square again in full screen on TV, over the rule above (separate rules: an engine that does not know one
   of the selectors would drop a combined list). */
html.is-tv .stage--inline:fullscreen { border-radius: 0; box-shadow: none; }
html.is-tv .stage--inline:-webkit-full-screen { border-radius: 0; box-shadow: none; }
.stage--inline:fullscreen .stage__top { padding: max(26px, var(--safe-t)) 32px 0; }
.stage--inline:fullscreen .stage__title { font-size: 19px; }
.stage--inline:fullscreen .stage__bottom { padding: 0 32px max(24px, var(--safe-b)); }
/* "EN VIVO": a red badge (no scrubber nor times in live). */
.live-badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; flex: none;
  border-radius: 6px; background: #ff3b30; box-shadow: 0 2px 10px rgba(255, 59, 48, .35);
  font: 700 11.5px/1 var(--font); letter-spacing: .06em; color: #fff;
}

/* Channel OSD after a channel change: bottom left over the picture. While a status shows in the centre
   ("Sintonizando…") it waits top left in place of the title row (.is-up, player.js placeOsd); an alert hides it. */
.stage__osd {
  position: absolute; left: max(16px, var(--safe-l)); bottom: 64px; z-index: var(--z-stage-osd);
  display: flex; gap: 14px; align-items: center; max-width: calc(100% - 32px); padding: 12px 18px 12px 12px; border-radius: 20px;
  background: var(--pg-card); box-shadow: var(--pg-ring), var(--pg-shadow); -webkit-backdrop-filter: var(--pg-card-filter); backdrop-filter: var(--pg-card-filter);
  opacity: 0; transition: opacity 240ms; pointer-events: none;
}
.stage__osd.is-visible { opacity: 1; transition-duration: 160ms; }
.stage__osd.is-up { top: 14px; bottom: auto; }
.stage.has-osd-up .stage__top { opacity: 0; }
.stage.has-error .stage__osd { visibility: hidden; }
.stage__osd-logo { display: flex; align-items: center; justify-content: center; width: 72px; height: 48px; border-radius: 10px; background: rgba(255, 255, 255, .1); overflow: hidden; flex: none; }
.stage__osd-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.stage__osd-num { flex: none; font-size: 28px; font-weight: 700; }
.stage__osd-text { min-width: 0; }
.stage__osd-name { font-size: 20px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage__osd-cat { color: var(--pg-text-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* A small stage: a smaller card, clear of the controls (44 + 12) and of the spinner when it is up. */
.stage.is-compact .stage__osd { left: 12px; bottom: 62px; max-width: calc(100% - 24px); gap: 10px; padding: 8px 14px 8px 8px; border-radius: 16px; }
.stage.is-compact .stage__osd.is-up { top: 10px; bottom: auto; }
.stage.is-compact .stage__osd-logo { width: 54px; height: 36px; border-radius: 8px; }
.stage.is-compact .stage__osd-num { font-size: 21px; }
.stage.is-compact .stage__osd-name { font-size: 16px; }
.stage.is-compact .stage__osd-cat { font-size: 12px; }
/* Full screen and TV: 1.5× from the corner (separate rules: an engine that does not know :fullscreen would
   drop a combined list, the TV's rule with it). */
.stage:fullscreen .stage__osd { left: max(32px, var(--safe-l)); bottom: 96px; max-width: calc((100% - 64px) / 1.5); transform: scale(1.5); transform-origin: bottom left; }
.stage:fullscreen .stage__osd.is-up { top: max(32px, var(--safe-t)); bottom: auto; transform-origin: top left; }
html.is-tv .stage__osd { left: max(32px, var(--safe-l)); bottom: 96px; max-width: calc((100% - 64px) / 1.5); transform: scale(1.5); transform-origin: bottom left; }
html.is-tv .stage__osd.is-up { top: 32px; bottom: auto; transform-origin: top left; }

/* "Pantallas en uso" (player.js screensDialog): the account's devices that hold its screens, each
   with "Detener allí". An account dialog (auth.css: .modal--account, .devices) in frosted glass over the player. */
.modal--glass::backdrop { background: rgba(0, 0, 0, .45); }
.modal--glass.modal--fallback { background: rgba(0, 0, 0, .45); }
.modal--glass .modal__box {
  border-radius: 28px; background: rgba(30, 30, 34, .7); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .18), 0 30px 80px -12px rgba(0, 0, 0, .7);
  -webkit-backdrop-filter: blur(44px) saturate(180%); backdrop-filter: blur(44px) saturate(180%);
}
.modal--glass .device { border-radius: 16px; }
.screens { margin-top: 16px; }
.screen .device__label { font-size: 16px; }
.screen .screen__what { color: var(--text-2); }
.screen .screen__quiet { color: var(--star); } /* auth.css .device__meta loads later */
.screens__note { margin-top: 14px; color: var(--text-2); font-size: 14px; line-height: 1.45; }
html.is-tv .screen .device__label { font-size: var(--fs-callout); }
/* TV: "Detener allí" stays on the right, above "Cancelar", so the D-pad goes straight up and down between them. */
html.is-tv .screen { flex-wrap: nowrap; }
html.is-tv .screen .device__body { flex-basis: auto; }
html.is-tv .screen .device__action { margin-left: 0; }
html.is-tv .screens__note { font-size: calc(18px * var(--tvu)); }
/* TV: no blur over playing video (LG/Samsung GPUs), like the rest of the player. */
html.is-tv .modal--glass .modal__box { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(28, 28, 32, .97); }

/* ------------------------------------------------------------------ TV size */
/* Solid glass (no blur: LG/Samsung), bigger type, and the focused control turns white with a dark icon. */
html.is-tv .stage {
  --pg: rgba(52, 52, 58, .72); --pg-hover: rgba(70, 70, 78, .8); --pg-card: rgba(28, 28, 32, .94);
  --pg-filter: none; --pg-card-filter: none; --pg-pad: calc(64px * var(--tvu));
}
html.is-tv .player .stage__top { padding-top: calc(44px * var(--tvu)); gap: calc(20px * var(--tvu)); }
html.is-tv .stage__title { font-size: calc(30px * var(--tvu)); }
html.is-tv .stage__subtitle { margin-top: calc(6px * var(--tvu)); font-size: calc(20px * var(--tvu)); }
html.is-tv .stage__ends { font-size: calc(18px * var(--tvu)); padding-top: calc(14px * var(--tvu)); }
html.is-tv .player .stage__bottom { padding-bottom: calc(40px * var(--tvu)); }
html.is-tv .stage .ctrl .icon { width: calc(26px * var(--tvu)); height: calc(26px * var(--tvu)); }
html.is-tv .stage .ctrl .icon.is-filled { width: calc(24px * var(--tvu)); height: calc(24px * var(--tvu)); }
html.is-tv .stage .ctrl--label { font-size: calc(20px * var(--tvu)); padding: 0 calc(24px * var(--tvu)) 0 calc(18px * var(--tvu)); }
html.is-tv .stage .ctrl--disc { width: calc(76px * var(--tvu)); height: calc(76px * var(--tvu)); }
html.is-tv .stage .ctrl--disc .icon { width: calc(38px * var(--tvu)); height: calc(38px * var(--tvu)); }
html.is-tv .stage .transport__play { width: calc(104px * var(--tvu)); height: calc(104px * var(--tvu)); }
html.is-tv .stage .transport__play .icon, html.is-tv .stage .transport__play .icon.is-filled { width: calc(40px * var(--tvu)); height: calc(40px * var(--tvu)); }
html.is-tv .stage__transport { gap: calc(56px * var(--tvu)); }
html.is-tv .controls, html.is-tv .controls__group { gap: calc(16px * var(--tvu)); }
html.is-tv .player .controls__group--start { display: none; }
html.is-tv .seekrow, html.is-tv .seek { height: calc(32px * var(--tvu)); }
html.is-tv .seekrow { margin-top: calc(18px * var(--tvu)); }
html.is-tv .seek__track { height: 10px; border-radius: 5px; }
html.is-tv .seek__thumb { width: 22px; height: 22px; margin: -11px 0 0 -11px; }
html.is-tv .seek:focus .seek__track { transform: scaleY(1); box-shadow: 0 0 0 4px rgba(255, 255, 255, .16); }
html.is-tv .seek:focus .seek__thumb { transform: scale(1); }
html.is-tv .timerow { height: calc(30px * var(--tvu)); margin-top: calc(6px * var(--tvu)); }
html.is-tv .timerow__elapsed, html.is-tv .time-remaining { font-size: calc(20px * var(--tvu)); height: auto; }
html.is-tv .stage__status { font-size: calc(20px * var(--tvu)); top: calc(50% + 60px * var(--tvu)); }
html.is-tv .stage__hud { font-size: calc(22px * var(--tvu)); padding: calc(14px * var(--tvu)) calc(26px * var(--tvu)); }
/* Focus: white disc or pill, dark icon, a little bigger. Plain :focus only (every focus on TV comes
   from the remote), so engines without :focus-visible (Chromium < 86, older Tizen) keep the rule. */
html.is-tv .stage .ctrl:focus {
  outline: none; background: #fff; color: #000; transform: scale(1.12); box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
html.is-tv .stage.is-loading .transport__play:focus { background: transparent; color: #fff; transform: none; box-shadow: none; }
html.is-tv .stage .btn { height: calc(56px * var(--tvu)); padding: 0 calc(30px * var(--tvu)); font-size: calc(20px * var(--tvu)); }
html.is-tv .stage .btn--primary, html.is-tv .stage .btn--overlay, html.is-tv .stage .skip-intro { background: var(--pg); color: #fff; box-shadow: var(--pg-ring); }
html.is-tv .stage .btn:focus {
  outline: none; background: #fff; color: #000; transform: scale(1.06); box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
html.is-tv .menu__option { min-height: calc(56px * var(--tvu)); font-size: calc(20px * var(--tvu)); border-radius: calc(14px * var(--tvu)); }
html.is-tv .menu__option .icon { width: calc(20px * var(--tvu)); height: calc(20px * var(--tvu)); }
html.is-tv .menu__option:focus { background: #fff; color: #000; }
html.is-tv .menu__option:focus .icon { color: #000; }
/* Subtitle size and "Fondo" in the captions popover: the chosen size is a soft pill, the focused one white. */
html.is-tv .stage .segmented { height: calc(48px * var(--tvu)); background: rgba(255, 255, 255, .1); }
html.is-tv .stage .segmented button { padding: 0 calc(18px * var(--tvu)); font-size: calc(18px * var(--tvu)); color: rgba(255, 255, 255, .8); transition: transform 160ms var(--ease-calm); }
html.is-tv .stage .segmented button[aria-pressed="true"] { background: rgba(255, 255, 255, .24); color: #fff; }
html.is-tv .stage .segmented button:focus { outline: none; box-shadow: none; background: #fff; color: #000; transform: scale(1.06); }
html.is-tv .menu .toggle { font-size: calc(18px * var(--tvu)); color: rgba(255, 255, 255, .8); }
html.is-tv .menu .toggle input:focus { outline: none; box-shadow: 0 0 0 3px #fff, 0 0 0 7px rgba(255, 255, 255, .25); transform: scale(1.1); }
html.is-tv .menu .toggle:focus-within { color: #fff; }
html.is-tv .menu { max-width: calc(100% - 2 * var(--pg-pad)); }
html.is-tv .menu__cols { grid-template-columns: repeat(var(--cols, 1), calc(300px * var(--tvu))); grid-template-columns: repeat(var(--cols, 1), minmax(calc(300px * var(--tvu)), max-content)); }
html.is-tv .menu__cols--settings { grid-template-columns: calc(220px * var(--tvu)) calc(340px * var(--tvu)); grid-template-columns: calc(220px * var(--tvu)) minmax(calc(340px * var(--tvu)), max-content); }
html.is-tv .menu__head { font-size: calc(18px * var(--tvu)); padding: calc(12px * var(--tvu)) calc(16px * var(--tvu)) calc(8px * var(--tvu)); }
html.is-tv .menu__line, html.is-tv .menu__note { font-size: calc(18px * var(--tvu)); }
html.is-tv .menu { border-radius: calc(26px * var(--tvu)); padding: calc(10px * var(--tvu)); }
html.is-tv .panel { width: calc(600px * var(--tvu)); border-radius: calc(30px * var(--tvu)); }
html.is-tv .panel__head h3 { font-size: calc(26px * var(--tvu)); }
html.is-tv .panel__count { font-size: calc(18px * var(--tvu)); }
html.is-tv .pep { grid-template-columns: calc(200px * var(--tvu)) 1fr; gap: calc(18px * var(--tvu)); padding: calc(10px * var(--tvu)); border-radius: calc(20px * var(--tvu)); }
html.is-tv .pep__title { font-size: calc(21px * var(--tvu)); }
html.is-tv .pep__meta, html.is-tv .pep__desc, html.is-tv .pep__over { font-size: calc(17px * var(--tvu)); }
html.is-tv .pep:focus { background: #fff; color: #000; box-shadow: none; transform: scale(1.02); }
html.is-tv .pep:focus .pep__meta, html.is-tv .pep:focus .pep__desc, html.is-tv .pep:focus .pep__over { color: rgba(0, 0, 0, .62); }
html.is-tv .upnext { width: calc(520px * var(--tvu)); padding: calc(16px * var(--tvu)); border-radius: calc(30px * var(--tvu)); }
html.is-tv .upnext__head { grid-template-columns: calc(200px * var(--tvu)) 1fr; }
html.is-tv .upnext__label { font-size: calc(18px * var(--tvu)); }
html.is-tv .upnext__title { font-size: calc(22px * var(--tvu)); }
html.is-tv .upnext__ring { width: calc(60px * var(--tvu)); height: calc(60px * var(--tvu)); margin: calc(-30px * var(--tvu)) 0 0 calc(-30px * var(--tvu)); }
html.is-tv .upnext__seconds { font-size: calc(20px * var(--tvu)); }
html.is-tv .alert { width: calc(560px * var(--tvu)); padding: calc(36px * var(--tvu)); border-radius: calc(32px * var(--tvu)); }
html.is-tv .alert h3 { font-size: calc(28px * var(--tvu)); }
html.is-tv .alert p { font-size: calc(20px * var(--tvu)); }
html.is-tv .stage--inline .ctrl:focus { transform: scale(1.08); }

/* ------------------------------------------------- browsers without blur */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .stage { --pg: var(--pg-solid); --pg-hover: rgba(70, 70, 78, .92); --pg-card: var(--pg-card-solid); }
  .modal--glass .modal__box { background: rgba(28, 28, 32, .97); }
}

/* ---------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  .player, .menu, .panel, .sheet--player, .sheet-scrim, .upnext, .alert, .stage .skip-intro { animation: none; }
  .stage__top, .stage__bottom, .stage__transport, .stage__shade::before, .stage__shade::after, .stage__hud,
  .seek__track, .seek__thumb, .seek__tip, .volume input, .stage__cues,
  .player .stage video::-webkit-media-text-track-container { transition: none; }
  .seek-ripple { animation: ripple-fade 600ms linear forwards; }
  .transport__skip.is-skipping .icon { animation: none; }
  .skip-count { animation: ripple-fade 900ms linear forwards; transform: translateX(-50%); }
  .pep__now > span { animation: none; transform: scaleY(.7); }
  .activity { animation-duration: 1.6s; }
  html.is-tv .stage .ctrl:focus, html.is-tv .stage .btn:focus, html.is-tv .pep:focus { transform: none; }
}
@keyframes ripple-fade { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
