:root {
  --bg: #0b0d12;
  --surface: #161a22;
  --text: #e8eaef;
  --muted: #8b92a7;
  --accent: #3d8bfd;
  --focus: #6eb6ff;
  --danger: #f07178;
  --safe-x: 5vw;
  --safe-y: 4vh;
  /**
   * Sans legible en TV / webOS: prioriza UI del sistema, luego fuentes anchas
   * (Verdana) si faltan las anteriores.
   */
  --font-sans:
    ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Segoe UI Variable",
    Roboto, "Noto Sans", "Helvetica Neue", Verdana, Arial, "Liberation Sans",
    sans-serif;
  /**
   * Rail / menú lateral: prioriza glifos anchos y pesos visibles a distancia (webOS).
   */
  --font-menu:
    Verdana, Tahoma, "Trebuchet MS", "Segoe UI", "Segoe UI Variable",
    ui-sans-serif, system-ui, Roboto, "Noto Sans", "Helvetica Neue", Arial,
    sans-serif;
  /**
   * menu_chrome (api/logo.php) — mismas claves que Android MenuChromeTokens.mergePanelColorMap.
   * La app puede pisar estas variables desde JS; valores por defecto = colors_menu_chrome.xml del APK.
   */
  --mc-fill-unfocused: #80000000;
  --mc-fill-focused: #5d00ff;
  --mc-fill-focused-translucent: #805d00ff;
  --mc-stroke-focused: #ffffff;
  --mc-stroke-rail-unfocused: #38ffffff;
  --mc-stroke-hidden: #00000000;
  --mc-focus-ring: #ffffff;
  --mc-events-header: #ffd54f;
  --mc-events-card: #80000000;
  --mc-events-muted: #ffffff;
  --mc-events-empty: #ffffff;
  --mc-player-scrim: #66000000;
  --mc-player-dim: #d9000000;
  --mc-player-panel: #e6161622;
  --mc-player-bar: #9914141c;
  --mc-player-error: #ffff5252;
  --mc-player-favorite: #ffe53935;

  /** Superficie rail / cabecera home: enlazada al tema remoto */
  --rail-surface-bg: var(--mc-fill-unfocused);
  --rail-surface-edge: var(--mc-stroke-rail-unfocused);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  font-family: var(--font-sans);
  font-size: 16px;
  font-optical-sizing: auto;
  letter-spacing: 0.02em;
  line-height: 1.45;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

#app {
  position: absolute;
  inset: 0;
  padding: var(--safe-y) var(--safe-x);
}

.view {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 1rem;
}

.view.hidden,
.hidden {
  display: none !important;
}

h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}

h2 {
  font-size: 1.25rem;
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 42rem;
}

label {
  font-size: 0.85rem;
  color: var(--muted);
}

input[type="text"],
input[type="password"],
input[type="url"] {
  font-size: 1.05rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #2a3142;
  background: var(--surface);
  color: var(--text);
  outline: none;
}

input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 2px rgba(110, 182, 255, 0.25);
}

.row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

button {
  font-size: 1rem;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  border: 1px solid #2a3142;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  outline: none;
}

button.primary {
  background: linear-gradient(180deg, #4a9eff, #3579d9);
  border-color: #3579d9;
  color: #fff;
}

button:focus,
.tile:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(110, 182, 255, 0.35);
}

button.danger {
  border-color: #5c2a2e;
  color: #ffb4b8;
}

.err {
  color: var(--danger);
  font-size: 0.95rem;
  max-width: 42rem;
}

/* ——— Login (dos columnas, estilo referencia panel / synthwave) ——— */
#view-login.view-login {
  position: relative;
  margin: calc(-1 * var(--safe-y)) calc(-1 * var(--safe-x));
  width: calc(100% + 2 * var(--safe-x));
  min-height: calc(100% + 2 * var(--safe-y));
  --login-yellow: #ffdd33;
  --login-yellow-soft: #ffe566;
  --login-grad-a: #8b3dff;
  --login-grad-b: #2d0a5c;
  --login-input-border: rgba(255, 255, 255, 0.55);
  --login-glass: rgba(8, 4, 22, 0.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.login-splash-video {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

#view-login .login-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(1.5rem, 4vh, 3rem);
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(1rem, 2.5vh, 2rem) clamp(0.75rem, 3vw, 2rem);
  justify-content: space-between;
}

.login-hero {
  text-align: center;
  flex-shrink: 0;
}

.login-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.35rem, 1.2vh, 0.75rem);
}

.login-logo-img {
  max-height: clamp(5.5rem, 14vh, 11rem);
  max-width: min(560px, 88vw);
  object-fit: contain;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.45));
}

.login-hero-inner.login-hero--has-logo .login-brand-name {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.login-brand-name {
  margin: 0;
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #fff;
  text-transform: uppercase;
  text-shadow:
    0 0 20px rgba(255, 61, 200, 0.5),
    0 2px 0 rgba(0, 0, 0, 0.4);
}

.login-tagline {
  margin: 0;
  font-size: clamp(0.9rem, 2.4vw, 1.45rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
}

.login-api-sub {
  margin: 0.35rem 0 0;
  font-size: clamp(0.95rem, 1.9vw, 1.2rem);
  color: rgba(255, 255, 255, 0.7);
  max-width: min(52rem, 92vw);
}

.login-api-sub.hidden {
  display: none;
}

.login-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 7vw, 5.5rem);
  align-items: stretch;
  align-content: center;
  flex: 1;
  min-height: 0;
  width: 100%;
}

@media (max-width: 720px) {
  .login-split {
    grid-template-columns: 1fr;
  }
}

.login-col {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2.8vh, 1.85rem);
  min-width: 0;
  justify-content: center;
}

.login-section-title {
  margin: 0 0 0.25rem;
  font-size: clamp(1.35rem, 3.2vw, 2.15rem);
  font-weight: 700;
  color: var(--login-yellow);
  text-transform: none;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.login-input-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.login-input-label {
  position: absolute;
  left: clamp(0.95rem, 2vw, 1.35rem);
  top: clamp(0.55rem, 1.5vh, 0.85rem);
  z-index: 1;
  font-size: clamp(0.72rem, 1.4vw, 0.95rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.75);
  pointer-events: none;
}

.login-input {
  width: 100%;
  min-height: clamp(3.5rem, 9vh, 5rem);
  padding: clamp(1.65rem, 3.5vh, 2.35rem) clamp(1rem, 2vw, 1.35rem)
    clamp(0.65rem, 1.5vh, 1rem);
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  border-radius: clamp(14px, 1.8vw, 22px);
  border: 1px solid var(--login-input-border);
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  outline: none;
  backdrop-filter: blur(4px);
}

.login-input:focus {
  border-color: rgba(255, 221, 51, 0.85);
  box-shadow: 0 0 0 2px rgba(255, 61, 200, 0.25);
}

.login-input-wrap--pass .login-input--pass {
  padding-right: clamp(3rem, 8vw, 3.75rem);
}

.login-pass-toggle {
  position: absolute;
  right: clamp(0.4rem, 1.2vw, 0.75rem);
  bottom: clamp(0.4rem, 1.2vh, 0.75rem);
  width: clamp(2.5rem, 6vw, 3.25rem);
  height: clamp(2.5rem, 6vw, 3.25rem);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  cursor: pointer;
}

.login-pass-toggle:focus {
  outline: 2px solid var(--login-yellow);
  outline-offset: 2px;
}

.login-check {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
}

.login-check input {
  width: clamp(1.15rem, 2.5vw, 1.45rem);
  height: clamp(1.15rem, 2.5vw, 1.45rem);
  accent-color: var(--login-grad-a);
}

.login-err {
  margin: 0;
  font-size: clamp(0.95rem, 1.9vw, 1.15rem);
}

.login-loading {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.7);
}

.login-cta {
  margin-top: auto;
  width: 100%;
  padding: clamp(1rem, 2.8vh, 1.5rem) clamp(1.25rem, 3vw, 2rem);
  font-size: clamp(1.15rem, 2.6vw, 1.55rem);
  font-weight: 700;
  border: none;
  border-radius: clamp(16px, 2vw, 24px);
  color: #fff;
  cursor: pointer;
  background: linear-gradient(
    180deg,
    var(--login-grad-a) 0%,
    var(--login-grad-b) 100%
  );
  box-shadow:
    0 4px 20px rgba(80, 20, 180, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.login-cta:focus {
  outline: 3px solid var(--login-yellow);
  outline-offset: 2px;
}

.login-cta:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.login-mac-instr {
  margin: 0;
  font-size: clamp(0.95rem, 2vw, 1.25rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
}

.login-mac-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 1.5vh, 1rem);
  padding: clamp(1.35rem, 3.5vh, 2.5rem) clamp(1rem, 3vw, 2rem);
  border-radius: clamp(14px, 1.8vw, 22px);
  background: var(--login-glass);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
}

.login-mac-label {
  font-size: clamp(0.78rem, 1.6vw, 1.05rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.65);
}

.login-mac-value {
  font-size: clamp(1.5rem, 4.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--login-yellow-soft);
  font-variant-numeric: tabular-nums;
  word-break: break-all;
  text-align: center;
}

.login-panel-hint {
  margin: 0;
  text-align: center;
  font-size: clamp(0.85rem, 1.7vw, 1.1rem);
  color: rgba(255, 255, 255, 0.45);
}

#view-login .debug-out {
  max-height: 18vh;
}

#view-login .debug-toolbar {
  justify-content: center;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}

.tile {
  padding: 1.5rem 1rem;
  border-radius: 12px;
  border: 1px solid #2a3142;
  background: var(--surface);
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
}

.split {
  display: flex;
  gap: 1rem;
  flex: 1;
  min-height: 0;
}

.col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.col.cats {
  flex: 0 0 32%;
}

.col.items {
  flex: 1;
}

.list-scroll {
  overflow: auto;
  flex: 1;
  padding-right: 0.25rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.list-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.list-btn {
  display: block;
  width: 100%;
  text-align: left;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}

.list-btn.small {
  font-size: 0.88rem;
  padding: 0.45rem 0.6rem;
}

.list-btn.active,
.list-btn:focus {
  border-color: color-mix(in srgb, var(--mc-stroke-focused) 50%, transparent);
  background: var(--mc-fill-focused);
  color: #fff;
  box-shadow: 0 0 0 2px
    color-mix(in srgb, var(--mc-focus-ring) 22%, transparent);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

#video-layer {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 50;
  display: flex;
  flex-direction: column;
}

.live-player-stage {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.live-player-stage iframe,
.live-player-stage video {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #000;
}

#video-layer.live-player-aspect-fit .live-player-stage iframe,
#video-layer.live-player-aspect-fit .live-player-stage video {
  object-fit: contain;
}

#video-layer.live-player-aspect-fill .live-player-stage iframe,
#video-layer.live-player-aspect-fill .live-player-stage video {
  object-fit: cover;
}

#video-layer.live-player-aspect-zoom .live-player-stage iframe,
#video-layer.live-player-aspect-zoom .live-player-stage video {
  object-fit: cover;
  transform: scale(1.12);
  transform-origin: center center;
}

.live-player-chrome {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.live-player-chrome:not(.hidden) {
  pointer-events: auto;
}

.live-player-scrim {
  position: absolute;
  inset: 0;
  background: var(--mc-player-scrim, rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

.live-player-scrim.hidden {
  display: none;
}

.live-player-scrim--dim {
  background: var(--mc-player-dim, rgba(0, 0, 0, 0.55));
}

#video-layer.live-player--channels-open .live-player-scrim {
  display: block;
}

#video-layer.live-player--channels-open
  .live-player-scrim.live-player-scrim--dim {
  background: rgba(0, 0, 0, 0.38);
}

.live-player-channels-panel {
  position: absolute;
  left: auto;
  right: 1.15rem;
  top: 50%;
  bottom: auto;
  z-index: 9;
  display: flex;
  flex-direction: column;
  width: min(40vw, 27rem);
  max-width: calc(100% - 2.3rem);
  height: 40rem;
  min-height: 40rem;
  max-height: 40rem;
  padding: 1rem 0.85rem 0.85rem;
  overflow: hidden;
  box-sizing: border-box;
  transform: translateY(-50%);
  border-radius: 0.75rem;
  background: rgba(14, 12, 28, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 12px 48px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  pointer-events: auto;
}

#video-layer.live-player--channels-open .live-player-channels-panel {
  animation: live-channels-overlay-in 0.22s ease-out;
}

@keyframes live-channels-overlay-in {
  from {
    opacity: 0;
    transform: translateY(-50%) translateX(0.75rem);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

.live-player-channels-panel.hidden {
  display: none;
}

.live-player-channels-header {
  flex: 0 0 auto;
  margin: 0 0 0.55rem;
  padding: 0.5rem 0.55rem 0.55rem;
  background: rgba(0, 0, 0, 0.32);
  border-radius: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.live-player-channels-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
}

.live-player-channels-title {
  margin: 0;
  padding: 0;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.98);
  letter-spacing: 0.01em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  white-space: normal;
  word-break: break-word;
}

.live-player-channels-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.live-player-channels-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.live-player-channels-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.live-player-channels-list .live-channel-btn {
  margin-bottom: 0;
  background: rgba(0, 0, 0, 0.32);
  border-color: rgba(255, 255, 255, 0.12);
}

.live-player-channels-list .live-ch-text {
  min-width: 0;
  overflow: hidden;
}

.live-player-channels-list .live-ch-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-player-channels-list .live-ch-fav {
  justify-self: end;
  margin-left: auto;
}

.live-player-channels-list .live-channel-btn:focus,
.live-player-channels-list .live-channel-btn.active {
  border-color: color-mix(in srgb, var(--mc-stroke-focused) 70%, transparent);
  background: color-mix(
    in srgb,
    var(--mc-fill-focused) 82%,
    rgba(0, 0, 0, 0.25)
  );
  box-shadow: 0 0 0 2px
    color-mix(in srgb, var(--mc-focus-ring) 28%, transparent);
}

.live-player-channels-empty {
  margin: 0.5rem 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
}

.live-player-reconnect {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  z-index: 5;
  background: rgba(0, 0, 0, 0.65);
  pointer-events: none;
}

.live-player-reconnect-label {
  color: #fff;
  font-size: 1rem;
}

.live-player-reconnect-num {
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.live-player-channel-off {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  pointer-events: none;
}

.live-player-channel-off.hidden {
  display: none;
}

.live-player-channel-off-msg {
  margin: 0;
  padding: 0.65rem 1.25rem;
  border-radius: 0.45rem;
  border: 2px solid rgba(255, 90, 90, 0.55);
  background: rgba(40, 12, 12, 0.85);
  color: #ff8a80;
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-player-lock {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--mc-player-dim, rgba(0, 0, 0, 0.72));
}

.live-player-lock-msg {
  margin: 0;
  font-size: 1.25rem;
  color: var(--mc-menu-stroke-focused, #fff);
}

.live-player-top,
.live-player-bottom {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: var(--mc-player-bar, rgba(20, 20, 28, 0.92));
  pointer-events: auto;
}

.live-player-top {
  top: 0;
  justify-content: center;
  padding: 1.25rem 2rem 0.85rem;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.35) 70%,
    transparent 100%
  );
  border: 0;
  pointer-events: none;
}

.live-player-bottom {
  bottom: 0;
  flex-direction: row;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  padding: 0.45rem 0.75rem 0.65rem;
  min-height: 3.1rem;
}

.live-player-bottom-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding-right: 0;
}

.live-player-fav-info {
  position: absolute;
  right: 0.75rem;
  bottom: 0.65rem;
  z-index: 2;
  width: max-content;
  max-width: min(92vw, 28rem);
  text-align: left;
  white-space: nowrap;
  flex-wrap: nowrap;
}

.live-player-fav-info .fav-info-btn__text {
  white-space: nowrap;
}

.live-player-fav-info.hidden {
  display: none;
}

/* Botón rectangular informativo de favoritos (browse + player + filas). */
.fav-info-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.38rem 0.7rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(0, 0, 0, 0.42);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.2;
  pointer-events: none;
  flex-shrink: 0;
  box-sizing: border-box;
}

.fav-info-btn__icon {
  flex-shrink: 0;
  font-size: 0.95rem;
  line-height: 1;
  color: var(--mc-player-favorite, #e53935);
}

.fav-info-btn__text {
  min-width: 0;
}

.fav-info-btn--on {
  border-color: color-mix(
    in srgb,
    var(--mc-player-favorite, #e53935) 70%,
    #fff
  );
  background: color-mix(
    in srgb,
    var(--mc-player-favorite, #e53935) 18%,
    rgba(0, 0, 0, 0.5)
  );
}

.fav-info-btn--compact {
  pointer-events: auto;
  cursor: pointer;
  padding: 0.22rem 0.45rem;
  min-width: 2.15rem;
  min-height: 1.55rem;
  justify-content: center;
  font-size: 0.95rem;
  color: var(--mc-player-favorite, #e53935);
}

.live-player-top-title {
  flex: none;
  width: 100%;
  max-width: 92vw;
  margin: 0;
  padding: 0;
  font-size: clamp(1.85rem, 4.5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: #fff;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow:
    0 2px 12px rgba(0, 0, 0, 0.85),
    0 0 28px rgba(0, 0, 0, 0.45);
}

.live-player-bar-btn {
  border: 2px solid transparent;
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-size: 0.85rem;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
}

.live-player-bar-btn:focus {
  outline: none;
  border-color: var(--mc-menu-stroke-focused, #7eb8ff);
  box-shadow: 0 0 0 3px rgba(126, 184, 255, 0.28);
}

.live-player-bar-btn--primary {
  background: var(--mc-player-panel, rgba(40, 40, 50, 0.95));
}

.live-player-btn-favorite {
  font-size: 1.35rem;
  line-height: 1;
  min-width: 2.25rem;
}

.live-player-btn-favorite.live-player-btn--fav-on {
  color: var(--mc-player-favorite, #e53935);
}

.sub {
  color: var(--muted);
  font-size: 0.95rem;
}

.loading {
  color: var(--muted);
}

/* Panel de depuración (login); activar con DEBUG: true en js/config.js */
.debug-out {
  flex: 1;
  min-height: 0;
  max-height: 28vh;
  margin: 0;
  padding: 0.5rem;
  font-size: 11px;
  line-height: 1.35;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-all;
  overflow: auto;
  background: #0a1a0d;
  color: #7dff9a;
  border: 1px solid #1e4d2e;
  border-radius: 8px;
  font-family: ui-monospace, Consolas, monospace;
}

.debug-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.debug-toolbar.hidden {
  display: none;
}

.debug-copy-hint {
  font-size: 0.85rem;
  color: #7dff9a;
}

.debug-copy-hint.hidden {
  display: none;
}

/* ——— Catálogo (películas / series): raíz con toolbar ——— */
.browse-catalog-root {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 0.75rem;
}

/* ——— Live TV: barra + cabecera + preview + 3 columnas ——— */
#view-browse.view-browse--live {
  padding: 0;
  margin: calc(-1 * var(--safe-y)) calc(-1 * var(--safe-x));
  width: calc(100% + 2 * var(--safe-x));
  height: calc(100% + 2 * var(--safe-y));
  max-height: none;
  background:
    linear-gradient(
      180deg,
      rgba(26, 10, 46, 0.75) 0%,
      rgba(12, 4, 28, 0.9) 50%,
      rgba(8, 2, 20, 0.95) 100%
    ),
    radial-gradient(
      ellipse 100% 70% at 50% 100%,
      #ff3d9a33 0%,
      transparent 55%
    ),
    linear-gradient(195deg, #12082a 0%, #060018 55%, #0c0630 100%);
  color: #f2eaff;
}

#view-browse.view-browse--live.view-browse--has-panel-bg {
  background: transparent;
}

#view-browse.view-browse--live #browse-err,
#view-browse.view-browse--live #browse-loading {
  margin: 0.5rem var(--safe-x) 0;
}

.browse-live-root {
  position: relative;
  display: flex;
  flex: 1;
  min-height: 0;
  gap: 0;
}

.live-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  pointer-events: none;
}

.live-backdrop--on {
  background-color: #060018;
}

.live-rail {
  position: relative;
  z-index: 2;
  flex: 0 0 5.5rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  padding: 0.65rem 0.35rem;
  background: var(--rail-surface-bg);
  border-right: 1px solid var(--rail-surface-edge);
  font-family: var(--font-menu);
}

.live-rail-brand {
  position: relative;
  width: 2.35rem;
  height: 2.35rem;
  margin: 0 auto 0.25rem;
  border-radius: 8px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.82);
  flex-shrink: 0;
}

.live-rail-brand--has-logo .live-rail-brand-fallback {
  display: none;
}

.live-rail-logo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  padding: 1px;
}

.rail-btn {
  width: 100%;
  min-height: 3.1rem;
  padding: 0.3rem 0.15rem;
  border-radius: 10px;
  border: 1px solid var(--mc-stroke-rail-unfocused);
  background: var(--mc-fill-unfocused);
  color: #e8e0ff;
  font-size: 1.05rem;
  line-height: 1.1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
}

.rail-btn--stack .rail-btn-icon {
  flex-shrink: 0;
  line-height: 1;
}

.rail-btn-label {
  /* Antes el tope en rem (~10px) hacía el menú ilegible en TV; escala con viewport. */
  font-size: clamp(0.72rem, 1.55vw, 0.95rem);
  font-weight: 800;
  line-height: 1.08;
  text-align: center;
  max-width: 100%;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  word-break: break-word;
  hyphens: auto;
}

.rail-btn:focus .rail-btn-label,
.rail-btn.active .rail-btn-label {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}

.rail-btn:focus,
.rail-btn.active {
  border-color: var(--mc-stroke-focused);
  box-shadow: 0 0 0 2px
    color-mix(in srgb, var(--mc-focus-ring) 28%, transparent);
  background: var(--mc-fill-focused);
}

.rail-btn--muted .rail-btn-label {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 700;
  text-shadow: none;
}

.rail-btn--muted {
  opacity: 0.35;
}

.live-main {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: var(--safe-y) var(--safe-x) 1.5rem 0.75rem;
  min-height: 0;
}

.live-topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
}

.live-title {
  margin: 0;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 24px rgba(255, 61, 154, 0.35);
}

.live-clock {
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.25rem, 2.8vw, 1.85rem);
  font-weight: 600;
  color: #c9b8ff;
}

.live-preview-wrap {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  max-height: 38vh;
  aspect-ratio: 16 / 9;
  background: rgba(8, 4, 22, 0.55);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.live-preview-hint {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 1rem;
  text-align: center;
  pointer-events: none;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.95rem;
  background: rgba(0, 0, 0, 0.35);
}

.live-preview-wrap--empty .live-preview-hint {
  display: flex;
}

.live-preview-loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.65);
  pointer-events: none;
}

.live-preview-spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #ff3d9a;
  border-radius: 50%;
  animation: live-preview-spin 0.75s linear infinite;
}

@keyframes live-preview-spin {
  to {
    transform: rotate(360deg);
  }
}

#live-preview-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}

.live-three-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 0.65rem;
  flex: 1;
  min-height: 0;
}

@media (max-width: 900px) {
  .live-three-cols {
    grid-template-columns: 1fr 1fr;
  }

  .live-col--epg {
    grid-column: 1 / -1;
    max-height: 28vh;
  }
}

/* ——— Películas / Series (MoviesScreen / SeriesScreen) ——— */
#view-browse.view-browse--vod {
  padding: 0;
  margin: calc(-1 * var(--safe-y)) calc(-1 * var(--safe-x));
  width: calc(100% + 2 * var(--safe-x));
  height: calc(100% + 2 * var(--safe-y));
  max-height: none;
  color: #f2eaff;
}

#view-browse.view-browse--vod #browse-err,
#view-browse.view-browse--vod #browse-loading {
  margin: 0.5rem var(--safe-x) 0;
  position: relative;
  z-index: 6;
}

.browse-vod-root {
  position: relative;
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.vod-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  pointer-events: none;
}

.vod-backdrop--on {
  background-color: #060018;
}

.vod-rail {
  position: relative;
  z-index: 2;
}

.vod-main {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0.35rem 0.5rem 0.4rem 0;
}

.vod-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2rem;
  padding: 0 0.35rem 0.25rem;
}

.vod-screen-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.8vw, 1.75rem);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.vod-clock {
  font-size: clamp(1.2rem, 2.5vw, 1.65rem);
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.92);
}

.vod-detail {
  flex: 0 0 auto;
  height: 30rem;
  min-height: 30rem;
  max-height: 30rem;
  margin: 0 0.35rem 0.35rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  box-sizing: border-box;
}

.vod-detail-empty {
  margin: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
}

.vod-detail-body {
  min-height: 0;
  height: 100%;
}

.vod-detail-layout {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  height: 100%;
  min-height: 0;
}

.vod-detail-layout.vod-detail-layout--stack-top {
  align-items: stretch;
}

.vod-detail-body--has-trailer .vod-detail-layout {
  justify-content: space-between;
}

.vod-detail-main {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: center;
  gap: 0.55rem;
  min-height: 0;
  padding: 0.35rem 0.5rem 0.35rem 0;
}

.vod-detail-main.vod-detail-main--stack-top {
  justify-content: flex-start;
  align-self: stretch;
  padding-top: 0.15rem;
}

/* Tráiler 16:9 grande a la derecha (como Android MovieDetailColumn). */
.vod-detail-trailer {
  flex: 0 0 min(58%, 40rem);
  width: min(58%, 40rem);
  max-width: 58%;
  min-width: 16rem;
  align-self: center;
  margin-left: auto;
}

.vod-detail-trailer.hidden {
  display: none !important;
}

.vod-detail-trailer-frame {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 56.25%;
  overflow: hidden;
  border-radius: 10px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

.vod-detail-trailer-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  pointer-events: none;
}

.vod-detail-title {
  margin: 0;
  font-size: clamp(1.55rem, 3.1vw, 2.15rem);
  font-weight: 700;
  line-height: 1.2;
  flex-shrink: 0;
}

.vod-detail-meta {
  margin: 0;
  font-size: clamp(1.05rem, 1.85vw, 1.32rem);
  color: rgba(255, 255, 255, 0.84);
  flex-shrink: 0;
}

.vod-detail-plot {
  margin: 0;
  flex: 0 1 auto;
  min-height: 0;
  max-height: 52%;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  font-size: clamp(1rem, 1.75vw, 1.22rem);
  line-height: 1.52;
  color: rgba(255, 255, 255, 0.92);
}

.vod-detail-main.vod-detail-main--stack-top .vod-detail-plot {
  flex: 1 1 auto;
  max-height: none;
}

.vod-detail-episodes {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.vod-eps-season {
  margin: 0.35rem 0 0.1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.vod-ep-btn {
  width: 100%;
  text-align: left;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: #f0e8ff;
  font-size: 0.8rem;
}

.vod-ep-btn:focus {
  border-color: var(--mc-stroke-focused);
  background: var(--mc-fill-focused-translucent);
}

/* Panel detalle serie (temporadas + episodios), como Android SeriesDetailScreen */
.vod-series-panel {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 0.35rem 0.35rem;
  display: none;
  flex-direction: column;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  box-sizing: border-box;
}

.vod-series-panel:not(.hidden) {
  display: flex;
}

.vod-main.vod-main--series-open .vod-bottom {
  display: none;
}

.vod-series-panel-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.75rem;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.vod-series-back-btn {
  flex-shrink: 0;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.35);
  color: #f0e8ff;
  font-size: 0.9rem;
}

.vod-series-back-btn:focus {
  border-color: var(--mc-stroke-focused);
  background: var(--mc-fill-focused-translucent);
}

.vod-series-panel-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vod-series-panel-body {
  flex: 1;
  min-height: 0;
  padding: 0.5rem 0.75rem 0.65rem;
  overflow: hidden;
}

.vod-series-panel-layout {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  height: 100%;
  min-height: 0;
}

.vod-series-panel-upper {
  display: grid;
  grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
  gap: 0.75rem;
  flex: 0 1 auto;
  min-height: 0;
  max-height: 48%;
  overflow: hidden;
}

.vod-detail-plot::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.vod-series-panel-info {
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.vod-series-panel-info::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.vod-series-panel-meta {
  margin: 0 0 0.45rem;
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  color: rgba(255, 255, 255, 0.84);
}

.vod-series-panel-plot {
  margin: 0;
  font-size: clamp(0.92rem, 1.5vw, 1.05rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
}

.vod-series-panel-ep-row {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.45rem;
}

.vod-series-seasons {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.55rem;
  min-height: 0;
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.2rem 0.15rem 0.35rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.vod-series-seasons::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.vod-series-season-btn {
  flex: 0 0 auto;
  min-width: 5.5rem;
  min-height: 2.85rem;
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.42);
  color: #f0e8ff;
  font-size: clamp(0.95rem, 1.65vw, 1.15rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.vod-series-season-btn.active {
  border-color: var(--mc-stroke-focused);
  background: var(--mc-fill-focused-translucent);
}

.vod-series-season-btn:focus {
  border-color: var(--mc-stroke-focused);
  background: var(--mc-fill-focused-translucent);
}

.vod-series-ep-list > .sub {
  flex: 1 0 100%;
  align-self: center;
  text-align: center;
}

.vod-series-ep-list {
  flex: 1;
  min-height: 10.5rem;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.65rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.25rem 0.75rem 0.5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.vod-series-ep-list::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.vod-series-ep-btn {
  position: relative;
  flex: 0 0 auto;
  width: clamp(15rem, 22vw, 20rem);
  height: clamp(8.5rem, 12.5vw, 11.25rem);
  padding: 0;
  overflow: hidden;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.55);
  text-align: left;
}

.vod-series-ep-btn:focus {
  border-color: var(--mc-stroke-focused);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.45);
}

.vod-series-ep-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(0, 0, 0, 0.4);
}

.vod-series-ep-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vod-series-ep-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.5) 42%,
    rgba(0, 0, 0, 0.12) 72%,
    transparent 100%
  );
}

.vod-series-ep-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 0.55rem 0.58rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.14rem;
  pointer-events: none;
}

.vod-series-ep-num {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.vod-series-ep-title {
  font-size: clamp(0.88rem, 1.35vw, 1rem);
  line-height: 1.3;
  font-weight: 600;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
}

.vod-bottom {
  flex: 1;
  min-height: 0;
  display: grid;
  /* Columna estrecha (Android ~28% del bloque inferior, pero en TV 28% es demasiado). */
  grid-template-columns: minmax(5.5rem, 15rem) minmax(0, 1fr);
  gap: 0.4rem;
  padding: 0 0.2rem;
}

.vod-col {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.vod-col--cats {
  max-width: 15rem;
}

.vod-cat-list {
  flex: 1;
  min-height: 0;
  padding: 0.25rem 0.4rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.32);
}

.vod-cat-btn {
  display: block;
  width: 100%;
  text-align: left;
  margin-bottom: 0.2rem;
  padding: 0.48rem 0.45rem;
  font-size: clamp(0.78rem, 1.35vw, 0.92rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
}

.vod-cat-btn.active {
  background: var(--mc-fill-focused-translucent);
  border-color: color-mix(in srgb, var(--mc-stroke-focused) 50%, transparent);
  color: #fff;
}

.vod-cat-btn.active::after {
  content: " ›";
}

.vod-cat-btn:focus {
  border-color: var(--mc-stroke-focused);
  box-shadow: 0 0 0 2px
    color-mix(in srgb, var(--mc-focus-ring) 28%, transparent);
  background: var(--mc-fill-focused);
  color: #fff;
}

.vod-grid-hint {
  margin: 0 0 0.35rem;
  align-self: flex-start;
}

.vod-col--grid {
  min-width: 0;
}

/* Scroll fuera del grid (webOS falla si grid + overflow en el mismo nodo). */
.vod-grid-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0.15rem 0.25rem 0.35rem 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.vod-grid-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.vod-grid {
  display: grid;
  /* Sin var() en repeat(): en webOS invalida todo el grid y los pósters se apilan. */
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 0.45rem;
  align-content: start;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.vod-poster-btn {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  padding-top: 150%;
  height: 0;
  overflow: hidden;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.45);
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
}

.vod-poster-btn:focus {
  border-color: var(--mc-stroke-focused);
  box-shadow: 0 0 0 2px
    color-mix(in srgb, var(--mc-focus-ring) 40%, transparent);
}

.vod-poster-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.vod-poster-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.6rem;
  opacity: 0.5;
  pointer-events: none;
}

.vod-poster-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.25rem 0.3rem;
  font-size: 0.62rem;
  line-height: 1.15;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.88));
  color: #fff;
  text-align: center;
  pointer-events: none;
}

.vod-poster-fav {
  position: absolute;
  top: 0.2rem;
  right: 0.25rem;
  z-index: 2;
  pointer-events: auto;
  cursor: pointer;
  color: var(--mc-player-favorite, #e53935);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.vod-poster-fav:not(.fav-info-btn--on) {
  opacity: 0.75;
}

.vod-poster-fav.fav-info-btn--on {
  opacity: 1;
}

.vod-grid-more {
  grid-column: 1 / -1;
  text-align: center;
  margin: 0.25rem 0;
}

.vod-version {
  margin-top: auto;
}

.live-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  min-height: 0;
}

.live-col-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.live-fav-hint {
  margin: 0;
  align-self: flex-start;
}

.live-list {
  flex: 1;
  min-height: 0;
  padding-right: 0.2rem;
}

.live-cat-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  margin-bottom: 0.35rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.82rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
  color: #e8e0ff;
}

.live-cat-btn::before {
  content: "✓";
  opacity: 0.35;
  margin-right: 0.35rem;
  font-size: 0.75rem;
}

.live-cat-btn.active {
  background: var(--mc-fill-focused-translucent);
  border-color: color-mix(in srgb, var(--mc-stroke-focused) 55%, transparent);
  color: #fff;
}

.live-cat-btn.active::before {
  opacity: 0.9;
}

.live-cat-btn.active::after {
  content: "›";
  font-size: 1.1rem;
  opacity: 0.95;
}

.live-cat-btn:focus {
  border-color: var(--mc-stroke-focused);
  box-shadow: 0 0 0 2px
    color-mix(in srgb, var(--mc-focus-ring) 28%, transparent);
  background: var(--mc-fill-focused);
  color: #fff;
}

.live-channel-btn {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin-bottom: 0.35rem;
  padding: 0.45rem 0.55rem;
  text-align: left;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  color: #f0e8ff;
  font-size: 0.82rem;
}

.live-channel-btn:focus,
.live-channel-btn.active {
  border-color: color-mix(in srgb, var(--mc-stroke-focused) 55%, transparent);
  background: var(--mc-fill-focused);
  box-shadow: 0 0 0 2px
    color-mix(in srgb, var(--mc-focus-ring) 28%, transparent);
  color: #fff;
}

.live-ch-logo {
  position: relative;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.live-ch-logo img,
.live-ch-logo .live-ch-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.live-ch-logo img.live-ch-logo-img--panel,
.live-ch-logo .live-ch-logo-img--panel,
.live-ch-logo img.live-ch-logo-img--placeholder,
.live-ch-logo .live-ch-logo-img--placeholder {
  object-fit: contain;
  padding: 0.2rem;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.45);
}

.live-ch-logo .live-ch-logo-img--preload {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.live-ch-logo-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0.04)
  );
}

.live-ch-meta {
  display: block;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 0.15rem;
}

.live-ch-fav {
  flex-shrink: 0;
  color: var(--mc-player-favorite, #e53935);
  opacity: 0.75;
}

.live-ch-fav--on,
.live-ch-fav.fav-info-btn--on {
  opacity: 1;
}

.live-channel-btn--fav {
  border-color: var(--mc-player-favorite, #e53935);
}

#live-epg-list {
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.live-epg-row {
  display: block;
  width: 100%;
  text-align: left;
  margin-bottom: 0.35rem;
  padding: 0.5rem 0.6rem;
  font-size: 1rem;
  line-height: 1.35;
  border-radius: 6px;
  border: 1px solid transparent;
  background: rgba(0, 0, 0, 0.15);
  color: rgba(255, 255, 255, 0.82);
}

.live-epg-body {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  word-break: break-word;
  line-height: 1.35;
}

.live-epg-row--now {
  color: #ffe066;
  border-color: rgba(255, 224, 102, 0.35);
  background: rgba(255, 224, 102, 0.08);
}

.live-epg-row--now .live-epg-time {
  color: rgba(255, 224, 102, 0.85);
}

.live-epg-time {
  display: inline;
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.65);
}

.live-epg-title {
  display: inline;
}

.live-version {
  position: absolute;
  bottom: 0.35rem;
  left: 0.5rem;
  margin: 0;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.35);
}

/* —— Home (estructura tipo Android HomeScreen: rail | cabecera + héroe + carrusel + status) —— */
#view-home.view-home {
  gap: 0;
  padding: 0;
  min-height: 0;
  position: relative; /* ancla backdrop y tráiler a pantalla completa */
  /* Misma ocupación que Live TV: anula el padding de #app y usa todo el viewport */
  margin: calc(-1 * var(--safe-y)) calc(-1 * var(--safe-x));
  width: calc(100% + 2 * var(--safe-x));
  height: calc(100% + 2 * var(--safe-y));
  max-height: none;
}

/* Backdrop a pantalla completa (imagen del póster seleccionado) */
.home-fullscreen-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center center;
  filter: saturate(1.15);
  pointer-events: none;
  transition: background-image 0.6s ease;
}

/* Velo oscuro encima del backdrop para que el texto sea legible */
.home-fullscreen-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0.25) 40%,
    rgba(0, 0, 0, 0.55) 75%,
    rgba(0, 0, 0, 0.8) 100%
  );
}

/* Tráiler YouTube detrás del home (debajo de .home-shell); sin captura de puntero */
.home-fullscreen-trailer {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background: #000;
  pointer-events: none;
}

.home-fullscreen-trailer.hidden {
  display: none !important;
}

.home-fullscreen-trailer-slot {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.home-fullscreen-trailer-fadeout {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: #000;
  opacity: 0;
  transition: opacity 0.52s ease-in;
  pointer-events: none;
}

.home-fullscreen-trailer.is-fade-out-end .home-fullscreen-trailer-fadeout {
  opacity: 1;
}

.home-fullscreen-trailer-timer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  z-index: 6;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.home-fullscreen-trailer-timer-fill {
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(1);
  background: linear-gradient(
    90deg,
    rgba(255, 61, 154, 0.92),
    rgba(124, 92, 255, 0.88)
  );
}

.home-fullscreen-trailer iframe {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.home-shell {
  position: relative;
  z-index: 2; /* encima del backdrop y del tráiler */
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100%;
}

.home-rail {
  flex-shrink: 0;
}

.home-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  /* sin background sólido: el backdrop de pantalla completa se ve a través */
  background: transparent;
}

.home-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem 1.5rem;
  align-items: start;
  padding: 0.75rem 1rem 0.5rem 0.75rem;
  flex-shrink: 0;
  background: var(--rail-surface-bg);
  border-bottom: 1px solid var(--rail-surface-edge);
}

.home-brand-block {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.home-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.home-app-name {
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
}

.home-app-tag {
  font-size: clamp(0.65rem, 1.2vw, 0.8rem);
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.home-clock-block {
  text-align: center;
  justify-self: center;
}

.home-clock {
  font-size: clamp(1.5rem, 3.5vw, 2.35rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #fff;
  line-height: 1.1;
}

.home-date {
  font-size: clamp(0.7rem, 1.3vw, 0.85rem);
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.2rem;
}

.home-events-panel {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  margin: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  max-height: none;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(22, 22, 28, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.65rem 0.8rem 0.55rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

/* Ocultar sin quitar la columna del grid (mismo hueco que al iniciar la app). */
.home-events-panel.home-events-panel--hidden {
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
}

/* Preview grande a la izquierda (columna héroe), estilo Android / captura */
.home-events-preview-pop {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  width: min(52vw, 34rem);
  min-width: 15rem;
  max-width: calc(100% - 1rem);
  pointer-events: none;
  filter: drop-shadow(0 14px 36px rgba(0, 0, 0, 0.65));
}

.home-events-preview-pop.hidden {
  display: none !important;
}

.home-events-preview-pop-card {
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid var(--mc-fill-focused);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--mc-focus-ring) 32%, transparent),
    inset 0 0 0 1px rgba(0, 0, 0, 0.2);
  background: #0a0a0c;
}

.home-events-preview-title {
  margin: 0;
  padding: 0.42rem 0.65rem 0.38rem;
  font-size: clamp(0.72rem, 1.2vw, 0.85rem);
  font-weight: 700;
  line-height: 1.25;
  max-height: 2.6em;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.96);
  background: linear-gradient(
    180deg,
    rgba(18, 12, 22, 0.98) 0%,
    rgba(10, 8, 14, 0.99) 100%
  );
  border-bottom: 1px solid
    color-mix(in srgb, var(--mc-stroke-focused) 42%, transparent);
}

.home-events-preview-video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.home-events-preview-live-badge {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 2;
  padding: 0.22rem 0.55rem 0.2rem;
  font-size: clamp(0.62rem, 1vw, 0.72rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: color-mix(in srgb, var(--mc-fill-focused) 50%, transparent);
  border-radius: 6px;
  border: 1px solid
    color-mix(in srgb, var(--mc-stroke-focused) 55%, transparent);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.home-events-preview-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.home-events-preview-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(0, 0, 0, 0.55);
}

.home-events-preview-loading.hidden {
  display: none !important;
}

.home-events-preview-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--mc-fill-focused);
  border-radius: 50%;
  animation: live-preview-spin 0.75s linear infinite;
}

.home-events-title {
  font-size: clamp(0.92rem, 1.55vw, 1.12rem);
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--mc-events-header);
  margin: 0 0 0.4rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.home-events-body {
  flex: 1;
  min-height: 0;
  font-size: clamp(0.85rem, 1.35vw, 1rem);
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.4;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.home-events-body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.home-events-subline {
  margin: 0 0 0.55rem;
  font-size: clamp(0.78rem, 1.25vw, 0.95rem);
  line-height: 1.3;
  color: rgba(255, 224, 102, 0.88);
}

.home-events-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-events-row {
  display: flex;
  align-items: center;
  gap: clamp(0.55rem, 1.2vw, 0.85rem);
  width: 100%;
  margin: 0 0 clamp(0.45rem, 1vw, 0.65rem);
  padding: clamp(0.45rem, 1.1vw, 0.65rem) clamp(0.5rem, 1.2vw, 0.75rem);
  border: 1px solid
    color-mix(in srgb, var(--mc-stroke-focused) 12%, transparent);
  border-radius: 12px;
  background: var(--mc-events-card);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.home-events-thumb-wrap {
  flex: 0 0 auto;
  width: clamp(2.35rem, 4.8vw, 3.15rem);
  height: clamp(2.35rem, 4.8vw, 3.15rem);
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.home-events-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-events-thumb.home-events-thumb--logo {
  object-fit: contain;
  padding: 0.2rem;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.45);
}

.home-events-thumb-wrap .home-events-thumb:not(img) {
  display: block;
  width: 100%;
  height: 100%;
}

.home-events-thumb--empty {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0.04)
  );
}

.home-events-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.home-events-row:last-child {
  margin-bottom: 0;
}

.home-events-row:focus {
  outline: 2px solid var(--mc-focus-ring);
  outline-offset: 1px;
  border-color: color-mix(in srgb, var(--mc-stroke-focused) 45%, transparent);
  background: var(--mc-fill-focused);
  color: #fff;
  box-shadow: 0 0 0 1px
    color-mix(in srgb, var(--mc-focus-ring) 28%, transparent);
}

.home-events-row:focus::after {
  content: "▶";
  flex-shrink: 0;
  margin-left: auto;
  font-size: 0.75rem;
  line-height: 1;
  opacity: 0.95;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.home-events-row:focus .home-events-name {
  color: #fff;
  opacity: 1;
}

.home-events-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: clamp(0.88rem, 1.45vw, 1.08rem);
  line-height: 1.3;
  font-weight: 600;
  color: var(--mc-events-muted);
  opacity: 0.9;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-events-footer {
  margin-top: 0.45rem;
  font-size: clamp(0.62rem, 1vw, 0.72rem);
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.38);
}

.home-events-placeholder {
  margin: 0;
}

.home-hero {
  position: relative;
  flex: 1;
  min-height: 0;
  padding: 1rem 1rem 0.75rem 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.home-hero-layout {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 32vw);
  grid-template-rows: minmax(0, 1fr);
  gap: 1rem 1.35rem;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  box-sizing: border-box;
}

.home-hero-main {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  /* Acerca la ficha de la película al carrusel (antes quedaba arriba del todo). */
  justify-content: flex-end;
  padding-bottom: 0.5rem;
}

.home-hero-content {
  position: relative;
  z-index: 1;
  max-width: min(48rem, 100%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
}

@media (max-width: 720px) {
  .home-hero-layout {
    grid-template-columns: 1fr;
  }

  .home-events-panel {
    height: auto;
    min-height: min(14rem, 42vh);
    max-height: min(50vh, 28rem);
    order: 2;
  }

  .home-hero-main {
    order: 1;
  }
}

.home-hero-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.9rem, 4.6vw, 2.85rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  line-height: 1.12;
}

.home-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.home-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.9);
}

.home-meta-chip--star {
  color: #ffe066;
  border-color: rgba(255, 224, 102, 0.35);
}

.home-meta-chip--hd {
  color: #7dffb3;
  border-color: rgba(125, 255, 179, 0.35);
}

.home-hero-plot {
  margin: 0;
  /* Siempre menor que .home-hero-title (el clamp anterior tenía min > max y fallaba). */
  font-size: clamp(1rem, 1.55vw, 1.28rem);
  font-weight: 500;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
  /* Sin -webkit-line-clamp: en webOS/Chromium el "…" nativo queda a media altura de la línea.
     El recorte a 3 líneas y U+2026 lo hace `clampHomeHeroPlotToMaxLines` en app.js. */
  display: block;
  overflow: hidden;
  word-break: break-word;
}

.home-carousel-wrap {
  flex-shrink: 0;
  padding: 0.35rem 0.75rem 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.home-carousel {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: clamp(0.25rem, 0.9vw, 0.45rem);
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.35rem 0 0.5rem;
}

.home-carousel-item {
  width: 100%;
  min-width: 0;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  border: 2px solid transparent;
  background-size: cover;
  background-position: center;
  background-color: #1a1f2a;
  cursor: pointer;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.home-carousel-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.home-carousel-item:focus,
.home-carousel-item.home-carousel-item--selected {
  border-color: var(--mc-stroke-focused);
  box-shadow: 0 0 0 2px
    color-mix(in srgb, var(--mc-focus-ring) 28%, transparent);
}

.home-statusbar {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5rem 0.65rem 0.65rem;
  background: transparent;
  border-top: none;
}

.home-statusbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem 0.7rem;
  max-width: min(100%, 96vw);
  padding: 0.5rem clamp(0.75rem, 1.8vw, 1.25rem) 0.55rem;
  font-size: clamp(0.72rem, 1.2vw, 0.88rem);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
  background: rgba(8, 8, 12, 0.78);
  border: 1px solid rgba(212, 175, 90, 0.82);
  border-radius: 999px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 4px 18px rgba(0, 0, 0, 0.45);
}

.home-status-item {
  white-space: nowrap;
}

.home-status-item--version {
  font-weight: 600;
  letter-spacing: 0.05em;
  color: rgba(255, 248, 220, 0.92);
}

.home-status-sep {
  opacity: 0.55;
  color: rgba(255, 255, 255, 0.75);
  user-select: none;
}
