:root {
  color-scheme: dark;
  --bg: #020b13;
  --panel: rgba(4, 22, 38, .84);
  --panel-2: rgba(8, 30, 52, .84);
  --panel-3: rgba(9, 47, 82, .88);
  --line: rgba(0, 162, 255, .34);
  --text: #f6f8fb;
  --muted: #8fb2d1;
  --accent: #16c8ff;
  --accent-2: #007dff;
  --warn: #f0c15a;
  --bad: #ff6f7d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { font-size: clamp(16px, 1vw, 21px); }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: clamp(280px, 20vw, 340px) minmax(0, 1fr);
  background:
    linear-gradient(90deg, rgba(1, 9, 17, .98), rgba(1, 9, 17, .68)),
    radial-gradient(circle at 72% 12%, rgba(0, 162, 255, .26), transparent 30%),
    url("/player/zappyzing-web-skin-reference.png") center / cover fixed,
    var(--bg);
}

.sidebar {
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 12px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(0, 9, 18, .96), rgba(3, 18, 34, .94));
  box-shadow: 12px 0 30px rgba(0, 0, 0, .38);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
}
.brand img { width: 32px; height: 32px; }
.brand span span { color: var(--accent); }
.brand b {
  margin-left: 8px;
  color: var(--accent);
  font-size: 12px;
}

.login-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(7, 24, 42, .88), rgba(3, 13, 25, .88));
  box-shadow: inset 0 0 24px rgba(0, 162, 255, .05);
}
.login-card.hidden { display: none; }

.form-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}
.form-row label, .search-wrap span, .category-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
input, select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: #031326;
  padding: 0 10px;
  outline: none;
}
input:focus, select:focus, button:focus-visible {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(103,167,255,.18);
}
.primary-button, .mode-tabs button, .category-head button, .top-actions button, .session-card button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: var(--panel-2);
}
.primary-button {
  border-color: rgba(22, 200, 255, .65);
  background: linear-gradient(180deg, rgba(22, 200, 255, .34), rgba(0, 125, 255, .18));
  font-weight: 800;
}
.login-card p {
  margin: 0;
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.session-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(35, 241, 226, .38);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(35, 241, 226, .10), rgba(0, 168, 255, .06));
}
.session-card.hidden { display: none; }
.session-card div { min-width: 0; display: grid; gap: 2px; }
.session-card span, .session-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.session-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.session-card button { padding: 0 10px; }

.rail-tools { display: grid; gap: 8px; }
.search-wrap { display: grid; gap: 6px; }
.mode-tabs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}
.bouquet-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid rgba(245, 213, 93, .42);
  border-radius: 6px;
  color: var(--text);
  background: linear-gradient(90deg, rgba(245, 174, 18, .18), rgba(22, 200, 255, .08));
  padding: 0 10px;
  text-align: left;
}
.bouquet-button strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bouquet-button span {
  color: var(--muted);
  font-size: 12px;
}
.bouquet-button.active {
  border-color: rgba(48,213,162,.60);
  background: rgba(48,213,162,.18);
}
.mode-tabs button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
  font-weight: 750;
  text-align: left;
}
.mode-tabs button::before {
  content: "";
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 1px solid currentColor;
  border-radius: 4px;
  opacity: .85;
}
.mode-tabs button.active {
  border-color: rgba(22, 200, 255, .80);
  color: var(--text);
  background: linear-gradient(90deg, rgba(22, 200, 255, .30), rgba(0, 125, 255, .16));
  box-shadow: inset 3px 0 0 var(--accent);
}
.mode-tabs .guide-button {
  border-color: rgba(245, 213, 93, .38);
  background: linear-gradient(90deg, rgba(245, 213, 93, .14), rgba(35, 241, 226, .08));
}

.category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.category-head button {
  min-width: 48px;
  padding: 0 10px;
}
.categories {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 5px;
  padding-right: 4px;
}
.categories button {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(22, 205, 255, .16);
  border-radius: 6px;
  color: var(--text);
  background: rgba(4, 22, 42, .78);
  text-align: left;
  padding: 0 10px 0 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.categories button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 99px;
  background: var(--accent);
}
.cat-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cat-chevron { color: var(--muted); font-weight: 800; }
.categories button:hover, .categories button.active {
  border-color: rgba(35, 241, 226, .50);
  background: var(--panel-3);
}
.categories button.active { color: var(--accent); }
.categories button.dragging { opacity: .42; }
.categories button.drop-target {
  border-color: var(--warn);
  background: rgba(240, 193, 90, .12);
}

.player-area {
  min-width: 0;
  height: 100vh;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 20px;
  overflow: hidden;
}
.topbar {
  display: grid;
  grid-template-columns: minmax(116px, 0.42fr) minmax(420px, 1.65fr) auto;
  align-items: center;
  gap: 10px;
}
.title-block { min-width: 0; }
.status-strip {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.status-strip article {
  min-height: 54px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(4, 22, 42, .88), rgba(2, 13, 25, .78));
  box-shadow: 0 0 18px rgba(0, 162, 255, .10);
  padding: 8px 10px;
}
.status-strip strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.topbar span, .catalog-head span, .now-next span, .status-strip span, .overview-card > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
h1, h2, p { margin: 0; }
h1 { font-size: 28px; line-height: 1.1; }
h2 { font-size: 20px; line-height: 1.2; }
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.top-actions select { width: 112px; }
.top-actions #bufferModeSelect { width: 144px; }
.top-actions button { padding: 0 14px; }

.content-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(430px, .6fr);
  gap: 14px;
  overflow: hidden;
}
.catalog-pane, .watch-pane {
  min-width: 0;
  min-height: 0;
  display: grid;
  gap: 10px;
}
.catalog-pane {
  grid-template-rows: auto minmax(0, 1fr);
}
.watch-pane {
  grid-template-rows: minmax(260px, 42vh) auto minmax(220px, 1fr);
}

.stage {
  position: relative;
  width: 100%;
  min-height: 0;
  height: 100%;
  aspect-ratio: auto;
  max-height: none;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(22, 200, 255, .56);
  background: #020307;
  box-shadow: 0 0 28px rgba(0, 162, 255, .22), inset 0 0 48px rgba(0, 162, 255, .08);
}
video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020307;
}
.startup-intro {
  position: absolute;
  inset: 14px;
  z-index: 5;
  overflow: hidden;
  border: 1px solid rgba(35, 241, 226, .72);
  border-radius: 10px;
  background: #020307;
  box-shadow: 0 0 34px rgba(25, 236, 255, .28), inset 0 0 42px rgba(0, 160, 255, .14);
}
.startup-intro.hidden { display: none; }
.startup-intro video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.startup-intro button {
  position: absolute;
  right: 12px;
  bottom: 12px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(35, 241, 226, .56);
  border-radius: 999px;
  color: #eaf8ff;
  background: rgba(0, 10, 20, .78);
  font-weight: 950;
  cursor: pointer;
}
.stage-overlay {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: grid;
  gap: 4px;
  max-width: min(420px, calc(100% - 32px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(6,8,12,.72);
  backdrop-filter: blur(12px);
}
.stage-overlay.hidden { display: none; }
.stage-overlay span { color: var(--muted); }
.player-toast {
  position: absolute;
  right: 16px;
  bottom: 16px;
  max-width: min(420px, calc(100% - 32px));
  padding: 12px 14px;
  border: 1px solid rgba(35, 241, 226, .38);
  border-radius: 8px;
  color: #eaf8ff;
  background: rgba(2, 11, 25, .88);
  box-shadow: 0 12px 38px rgba(0, 0, 0, .32);
  font-size: 13px;
  font-weight: 800;
  z-index: 4;
}
.player-toast.hidden { display: none; }

.now-next {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.now-next article, .catalog-head, .overview-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(5, 23, 40, .86), rgba(1, 12, 23, .78));
  padding: 12px;
  box-shadow: 0 0 20px rgba(0, 162, 255, .09);
}
.now-next article {
  display: grid;
  gap: 4px;
  min-height: 68px;
  align-content: start;
}
.now-next strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.now-next small { color: var(--muted); }
.next-list {
  display: grid;
  gap: 3px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.next-list li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #dce9fb;
  font-size: 11px;
  line-height: 1.2;
}
.next-list li span {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  color: #00101d;
  background: var(--accent);
  font-size: 9px;
  font-weight: 900;
}
.next-list li strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}
.next-list li small {
  color: var(--muted);
  font-size: 10px;
}
.health.playing strong { color: var(--accent); }
.health.buffering strong { color: var(--warn); }
.health.failed strong { color: var(--bad); }

.catalog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.catalog-head p { color: var(--muted); }
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(164px, 1fr));
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding: 0 4px 24px 0;
}
.catalog-grid.media-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  align-items: start;
}
.channel-card {
  position: relative;
  display: grid;
  grid-template-rows: 82px 34px 22px minmax(42px, auto);
  gap: 6px;
  min-height: 202px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: linear-gradient(180deg, rgba(8, 30, 52, .84), rgba(2, 13, 25, .84));
  padding: 10px;
  text-align: left;
}
.channel-card.media-card {
  grid-template-rows: auto auto auto minmax(42px, 1fr);
  min-height: 372px;
  padding: 12px;
}
.channel-card:hover, .channel-card.selected {
  border-color: rgba(22, 200, 255, .72);
  background: rgba(8, 44, 78, .95);
  box-shadow: 0 0 22px rgba(0, 162, 255, .18);
}
.poster {
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #090d14;
  overflow: hidden;
  width: 100%;
  height: 82px;
}
.poster img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.media-card .poster {
  height: auto;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  background: #02050b;
}
.media-card .poster img {
  object-fit: cover;
}
.poster span {
  color: var(--muted);
  font-weight: 800;
  font-size: 24px;
}
.channel-card .channel-title {
  display: -webkit-box;
  min-width: 0;
  min-height: 32px;
  max-height: 34px;
  line-height: 1.22;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.media-card .media-title {
  min-height: 38px;
  max-height: 40px;
  font-size: 14px;
  line-height: 1.25;
}
.media-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #cde8ff;
  font-size: 11px;
  font-weight: 800;
}
.media-card-meta em {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stars {
  color: #f5c542;
  letter-spacing: 1px;
  white-space: nowrap;
}
.stars.empty {
  color: #7d8da4;
  letter-spacing: 0;
}
.media-card-overview {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  color: #9fb4cc;
  font-size: 11px;
  line-height: 1.35;
}
.channel-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}
.channel-badges i {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 76px;
  height: 18px;
  padding: 0 6px;
  border: 1px solid rgba(33, 211, 255, .36);
  border-radius: 4px;
  color: #bff2ff;
  background: rgba(12, 48, 74, .72);
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
  line-height: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-guide {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.card-guide-line, .card-meta {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 15px;
}
.card-guide-line b {
  color: var(--accent);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}
.card-guide-line em, .card-meta {
  min-width: 0;
  color: #d6e6ff;
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-meta {
  display: block;
}
.recording-pill {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 20px;
  border: 1px solid rgba(255, 111, 125, .68);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 38, 65, .78);
  box-shadow: 0 0 14px rgba(255, 38, 65, .36);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
}
.quick-actions {
  position: fixed;
  z-index: 1000;
  display: grid;
  gap: 6px;
  width: min(230px, calc(100vw - 20px));
  border: 1px solid rgba(22, 200, 255, .58);
  border-radius: 8px;
  background: rgba(3, 15, 28, .98);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .48), 0 0 26px rgba(0, 162, 255, .20);
  padding: 8px;
}
.quick-actions > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 6px 7px;
  border-bottom: 1px solid rgba(22, 200, 255, .20);
  font-size: 12px;
}
.quick-actions button {
  min-height: 36px;
  border: 1px solid rgba(22, 200, 255, .24);
  border-radius: 6px;
  color: var(--text);
  background: rgba(8, 30, 52, .94);
  text-align: left;
  padding: 0 10px;
  font-weight: 800;
}
.quick-actions button:hover,
.quick-actions button:focus-visible {
  border-color: rgba(22, 200, 255, .78);
  background: rgba(8, 44, 78, .98);
  outline: none;
}

.quick-actions button:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.quick-actions.bouquet-actions {
  min-width: 238px;
}

.quick-actions.bouquet-actions button[data-bouquet-action^="delete"],
.quick-actions.bouquet-actions button[data-bouquet-action="remove-entry"] {
  border-color: rgba(255, 76, 111, .46);
}

.quick-actions.bouquet-actions small {
  display: block;
  margin-top: 6px;
  color: #9db9cf;
  font-size: 11px;
  font-weight: 800;
}

.zz-guide-shell {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  overflow: hidden;
  color: #f6f7fb;
  background:
    radial-gradient(circle at 78% 10%, rgba(229, 9, 63, .20), transparent 36%),
    linear-gradient(135deg, #030408 0%, #080912 44%, #120409 100%);
  outline: none;
}
.zz-guide-shell.hidden { display: none; }
.zz-side-rail {
  width: 80px;
  height: 100vh;
  flex: 0 0 80px;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 22px 0;
  border-right: 1px solid rgba(255, 255, 255, .09);
  background: rgba(5, 8, 14, .96);
}
.zz-rail-dot {
  width: 14px;
  height: 14px;
  margin-bottom: 50px;
  border-radius: 50%;
  background: #fff;
}
.zz-side-rail button {
  width: 80px;
  height: 54px;
  border: 0;
  border-left: 4px solid transparent;
  color: #cfd3df;
  background: transparent;
  font-size: 22px;
}
.zz-side-rail button.active {
  border-left-color: #e5093f;
  color: #fff;
  background: rgba(229, 9, 63, .12);
}
.zz-rail-spacer { flex: 1; }
.zz-guide-main {
  flex: 1 1 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.zz-top-nav {
  height: 70px;
  display: flex;
  align-items: center;
  padding: 0 36px 0 28px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  background: rgba(4, 5, 9, .84);
}
.zz-logo {
  width: 220px;
  font-size: 28px;
  font-weight: 950;
  font-style: italic;
  letter-spacing: -1px;
}
.zz-logo span { color: #e5093f; }
.zz-top-nav nav {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}
.zz-top-nav nav button,
.zz-top-actions button {
  height: 70px;
  border: 0;
  color: #c6c9d3;
  background: transparent;
  font-size: 16px;
}
.zz-top-nav nav button.active {
  border-bottom: 3px solid #e5093f;
  color: #fff;
}
.zz-top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.zz-top-actions button { font-size: 24px; }
.zz-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, .16);
}
.zz-hero {
  min-height: 290px;
  display: grid;
  grid-template-columns: 220px minmax(360px, 1fr) minmax(460px, 690px);
  align-items: center;
  gap: 34px;
  padding: 28px 38px 26px 30px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  background: linear-gradient(90deg, rgba(4, 5, 10, .96) 0%, rgba(10, 8, 16, .82) 45%, rgba(95, 5, 27, .36) 100%);
}
.zz-poster {
  width: 220px;
  height: 240px;
  overflow: hidden;
  border-radius: 8px;
  background: #151822;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .38);
}
.zz-poster img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #070910;
}
.zz-poster-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 20px;
  text-align: center;
  text-transform: uppercase;
  background: linear-gradient(145deg, rgba(229, 9, 63, .55), rgba(12, 14, 24, 1));
  font-size: 26px;
  font-weight: 900;
}
.zz-programme-info { min-width: 0; }
.zz-channel-mark {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 14px;
}
.zz-channel-mark span {
  color: #e5093f;
  font-size: 20px;
  font-weight: 950;
}
.zz-channel-mark b {
  color: #f0f1f6;
  font-size: 17px;
}
.zz-programme-info h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 2.4vw, 42px);
  line-height: 1.05;
  letter-spacing: -1px;
}
.zz-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  color: #f4f4f6;
  font-size: 17px;
}
.zz-meta em,
.zz-programme-badges small,
.badge {
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 4px;
  padding: 3px 6px;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
}
.zz-meta em.live,
.zz-programme-badges .live {
  border-color: #e5093f;
  background: #e5093f;
  color: #fff;
}
.zz-programme-info p {
  max-width: 720px;
  margin: 0;
  color: #a9adba;
  font-size: 16px;
  line-height: 1.55;
}
.zz-preview-column { min-width: 0; }
.zz-live-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(229, 9, 63, .8);
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(229, 9, 63, .25), rgba(5, 7, 12, 1));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .34);
}
.zz-preview-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #05070c;
}
.zz-preview-badge {
  position: absolute;
  z-index: 2;
  top: 16px;
  left: 18px;
  border-radius: 5px;
  padding: 7px 10px;
  color: #fff;
  background: rgba(229, 9, 63, .92);
  font-size: 12px;
  font-weight: 900;
}
.zz-muted {
  position: absolute;
  z-index: 2;
  bottom: 14px;
  left: 18px;
  border: 0;
  border-radius: 6px;
  padding: 7px 10px;
  color: #fff;
  background: rgba(0, 0, 0, .48);
  font-size: 13px;
}
.zz-action-row {
  display: flex;
  gap: 16px;
  margin-top: 12px;
}
.zz-action-row button {
  flex: 1;
  min-width: 0;
  height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, .075);
  font-size: 14px;
  font-weight: 800;
}
.zz-action-row button.primary { background: linear-gradient(180deg, #e5093f, #b90432); }
.zz-action-row button:disabled { opacity: .42; cursor: not-allowed; }
.zz-guide-controls {
  height: 66px;
  display: flex;
  align-items: center;
  padding: 0 38px 0 24px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  background: rgba(5, 7, 12, .72);
}
.zz-filter-left,
.zz-date-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}
.zz-date-controls { margin-left: auto; }
.zz-guide-controls button {
  height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 0 17px;
  color: #eef0f6;
  background: rgba(255, 255, 255, .075);
  font-weight: 700;
}
.zz-guide-bouquet-strip {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 38px 10px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  background: linear-gradient(90deg, rgba(6, 10, 18, .95), rgba(11, 20, 32, .88));
  scrollbar-width: thin;
}
.zz-bouquet-chip {
  flex: 0 0 210px;
  height: 52px;
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(0, 216, 255, .28);
  border-radius: 8px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(6, 20, 34, .92);
  text-align: left;
}
.zz-bouquet-chip.in-guide {
  border-color: rgba(229, 9, 63, .62);
  box-shadow: inset 3px 0 0 #e5093f;
}
.zz-bouquet-chip span {
  width: 54px;
  height: 36px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 5px;
  color: #00d8ff;
  background: rgba(255, 255, 255, .06);
  font-size: 12px;
  font-weight: 950;
}
.zz-bouquet-chip img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.zz-bouquet-chip b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.zz-bouquet-empty {
  color: #a9b6cc;
  font-size: 14px;
  font-weight: 800;
}
.zz-grid-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: rgba(3, 5, 10, .82);
}
.zz-time-ruler {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 40px;
  display: flex;
  background: rgba(6, 8, 14, .98);
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}
.zz-time-slot {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  border-left: 1px solid rgba(255, 255, 255, .09);
  padding-left: 18px;
  color: #f2f3f7;
  font-size: 15px;
}
.zz-grid-body { position: relative; }
.zz-channel-row {
  position: relative;
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}
.zz-channel-cell {
  position: sticky;
  left: 0;
  z-index: 4;
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 48px 72px 1fr 34px;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-right: 1px solid rgba(255, 255, 255, .16);
  background: rgba(7, 10, 17, .98);
}
.zz-channel-cell strong { font-size: 17px; }
.zz-channel-logo {
  color: #e5093f;
  font-size: 15px;
  font-weight: 950;
}
.zz-channel-cell span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e6e8f0;
  font-size: 14px;
}
.zz-channel-cell button {
  border: 0;
  color: #b7bbc8;
  background: transparent;
  font-size: 20px;
}
.zz-programme-row {
  position: relative;
  flex: 1;
}
.zz-programme-block {
  position: absolute;
  top: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 6px;
  color: #fff;
  background: linear-gradient(180deg, #151726, #10131d);
  padding: 0 16px;
  text-align: left;
}
.zz-programme-block:nth-child(3n) { background: linear-gradient(180deg, #191627, #11121d); }
.zz-programme-block.is-live { background: linear-gradient(180deg, #102228, #08161c); }
.zz-programme-block.selected {
  border-color: rgba(255, 255, 255, .18);
  background: linear-gradient(180deg, #ef0b47, #b90432);
  box-shadow: 0 10px 28px rgba(229, 9, 63, .25);
}
.zz-programme-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 750;
}
.zz-programme-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  min-width: max-content;
}
.zz-programme-badges small {
  padding: 4px 5px;
  color: #dfe3ec;
  background: rgba(255, 255, 255, .14);
  line-height: 1;
}
.zz-programme-badges .new { background: #20b642; color: #fff; }
.zz-current-time {
  position: absolute;
  top: -40px;
  z-index: 8;
  width: 2px;
  background: #e5093f;
  pointer-events: none;
}
.zz-current-time span {
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 6px;
  padding: 8px 10px;
  color: #fff;
  background: #e5093f;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.zz-current-time span::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 7px solid #e5093f;
}
.zz-guide-footer {
  height: 54px;
  display: flex;
  align-items: center;
  padding: 0 38px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, .09);
  color: #b9bdc8;
  background: rgba(3, 5, 10, .96);
  font-size: 14px;
}
.zz-guide-footer div {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.live { background: #e5093f; }
.dot.new { background: #20b642; }
.dot.repeat { background: #aeb4bf; }

.overview-card {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 8px;
  align-content: start;
}
.overview-card h2 { font-size: 20px; }
.overview-card p { color: #b7c7dd; line-height: 1.45; }
.media-detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.media-detail-meta.hidden,
.media-detail-actions.hidden {
  display: none;
}
.media-detail-meta span,
.media-stars {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  border: 1px solid rgba(34, 244, 255, .22);
  border-radius: 999px;
  padding: 0 10px;
  color: #dff8ff;
  background: rgba(0, 13, 28, .72);
  font-size: 12px;
  font-weight: 800;
}
.media-stars b {
  color: #fff;
  font-size: 12px;
}
.media-detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.media-detail-actions button {
  min-width: 120px;
  height: 40px;
  border: 1px solid rgba(34, 244, 255, .28);
  border-radius: 10px;
  color: #eaf8ff;
  background: rgba(7, 28, 52, .88);
  font-weight: 950;
}
.media-detail-actions button.primary {
  border: 0;
  color: #001225;
  background: linear-gradient(135deg, var(--zz-brand-blue), var(--zz-brand-cyan));
  box-shadow: 0 0 22px rgba(25, 236, 255, .25);
}
.ad-slot {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  border: 1px solid rgba(245, 213, 93, .28);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(245, 213, 93, .10), rgba(35, 241, 226, .08));
  padding: 12px;
}
.ad-slot small {
  color: var(--warn);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.ad-slot button {
  min-height: 34px;
  border: 1px solid rgba(35, 241, 226, .44);
  border-radius: 6px;
  color: #00101d;
  background: linear-gradient(90deg, #f0e66a, var(--accent));
  font-weight: 800;
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; max-height: none; }
  .player-area { height: auto; overflow: visible; padding: 12px; }
  .topbar { grid-template-columns: 1fr; align-items: stretch; }
  .status-strip { grid-template-columns: 1fr 1fr; }
  .content-workspace { grid-template-columns: 1fr; overflow: visible; }
  .catalog-pane, .watch-pane { min-height: 0; }
  .now-next { grid-template-columns: 1fr 1fr; }
  .stage { min-height: 220px; aspect-ratio: 16 / 9; }
}

/* ZappyZing Web Player brand cockpit skin */
:root {
  --zz-bg-0: #020611;
  --zz-bg-1: #041225;
  --zz-bg-2: #071b34;
  --zz-panel: rgba(5, 18, 36, 0.72);
  --zz-panel-strong: rgba(7, 26, 52, 0.88);
  --zz-panel-soft: rgba(255, 255, 255, 0.045);
  --zz-cyan: #22f4ff;
  --zz-cyan-soft: rgba(34, 244, 255, 0.18);
  --zz-blue: #1478ff;
  --zz-blue-2: #0647d9;
  --zz-electric: #00d7ff;
  --zz-green: #39ffb6;
  --zz-warning: #ffd166;
  --zz-danger: #ff3864;
  --zz-text: #f4fbff;
  --zz-muted: #8fb3ca;
  --zz-dim: #527188;
  --zz-border: rgba(34, 244, 255, 0.16);
  --zz-border-strong: rgba(34, 244, 255, 0.42);
  --zz-radius-sm: 8px;
  --zz-radius-md: 12px;
  --zz-radius-lg: 18px;
  --zz-glow-cyan: 0 0 18px rgba(34, 244, 255, 0.22);
  --zz-glow-blue: 0 0 36px rgba(20, 120, 255, 0.24);
  --bg: var(--zz-bg-0);
  --panel: var(--zz-panel);
  --panel-2: var(--zz-panel-strong);
  --panel-3: rgba(13, 56, 98, .72);
  --line: var(--zz-border);
  --text: var(--zz-text);
  --muted: var(--zz-muted);
  --accent: var(--zz-cyan);
  --accent-2: var(--zz-blue);
  --warn: var(--zz-warning);
  --bad: var(--zz-danger);
}

html, body {
  background: var(--zz-bg-0);
}

.app-shell {
  position: relative;
  isolation: isolate;
  grid-template-columns: clamp(280px, 20vw, 340px) minmax(0, 1fr);
  background:
    radial-gradient(circle at 78% 18%, rgba(34, 244, 255, 0.17), transparent 28%),
    radial-gradient(circle at 18% 82%, rgba(20, 120, 255, 0.18), transparent 36%),
    linear-gradient(135deg, #020611 0%, #041225 44%, #020814 100%);
  overflow: hidden;
}

.app-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0%, rgba(34, 244, 255, 0.08) 48%, transparent 52%),
    linear-gradient(135deg, transparent 0%, rgba(20, 120, 255, 0.05) 58%, transparent 64%),
    url("/player/zappyzing-web-skin-reference.png") center / cover fixed;
  opacity: .46;
}

.app-shell::after {
  content: "Z";
  position: fixed;
  right: 4vw;
  bottom: -3vh;
  z-index: -1;
  color: rgba(34, 244, 255, .04);
  font-size: min(38vw, 620px);
  font-style: italic;
  font-weight: 950;
  line-height: .8;
  pointer-events: none;
  transform: skewX(-8deg);
}

.sidebar,
.login-card,
.session-card,
.status-strip article,
.catalog-head,
.overview-card,
.now-next article,
.channel-card,
.stage-overlay,
.player-toast,
.ad-slot {
  border: 1px solid var(--zz-border);
  background:
    linear-gradient(180deg, rgba(10, 34, 66, 0.78), rgba(4, 13, 28, 0.82));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 16px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
}

.sidebar {
  gap: 10px;
  padding: 16px 12px;
  border-right-color: var(--zz-border);
  background:
    linear-gradient(180deg, rgba(3, 12, 26, .88), rgba(2, 8, 18, .84)),
    radial-gradient(circle at 50% 0%, rgba(34, 244, 255, .10), transparent 42%);
  box-shadow: 18px 0 54px rgba(0, 0, 0, .38);
}

.brand {
  min-height: 58px;
  gap: 12px;
  padding: 8px 4px 12px;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  box-shadow: 0 0 22px rgba(34, 244, 255, .38);
}

.brand > span {
  font-size: 23px;
  font-weight: 950;
  letter-spacing: 0;
}

.brand b {
  display: block;
  margin: 2px 0 0;
  color: var(--zz-muted);
  font-size: 10px;
  letter-spacing: 1px;
}

.login-card,
.session-card {
  border-radius: var(--zz-radius-md);
}

input, select {
  min-height: 38px;
  border-color: var(--zz-border);
  border-radius: 10px;
  background: rgba(0, 8, 18, .72);
}

input:focus, select:focus, button:focus-visible {
  border-color: var(--zz-cyan);
  box-shadow: 0 0 0 3px rgba(34, 244, 255, .16), var(--zz-glow-cyan);
}

.primary-button,
.top-actions button,
.session-card button,
.category-head button {
  border-radius: 10px;
  border-color: var(--zz-border);
  background: linear-gradient(180deg, rgba(14, 62, 112, .70), rgba(4, 20, 40, .88));
  color: var(--zz-text);
  font-weight: 850;
}

.primary-button,
.top-actions #fullButton {
  border-color: transparent;
  background: linear-gradient(135deg, var(--zz-cyan), var(--zz-blue));
  color: #00111f;
  box-shadow: var(--zz-glow-cyan);
}

.bouquet-button,
.mode-tabs button,
.categories button {
  min-height: 40px;
  border-radius: 12px;
  border-color: rgba(34, 244, 255, .12);
  background: rgba(4, 17, 35, .68);
}

.bouquet-button {
  border-color: rgba(34, 244, 255, .22);
  background: linear-gradient(135deg, rgba(34, 244, 255, .14), rgba(20, 120, 255, .08));
}

.bouquet-button.active,
.mode-tabs button.active,
.categories button.active {
  border-color: var(--zz-cyan);
  background: linear-gradient(135deg, rgba(34, 244, 255, .28), rgba(20, 120, 255, .20));
  box-shadow: inset 3px 0 0 var(--zz-cyan), var(--zz-glow-cyan);
  color: var(--zz-text);
}

.mode-tabs button:hover,
.categories button:hover,
.bouquet-button:hover {
  border-color: var(--zz-border-strong);
  box-shadow: var(--zz-glow-cyan);
}

.bouquet-button.protected {
  border-color: rgba(247, 201, 72, .72);
  box-shadow: inset 3px 0 0 #f7c948, 0 0 18px rgba(247, 201, 72, .14);
}

.bouquet-button.protected strong::after {
  content: " PIN";
  margin-left: 6px;
  border: 1px solid rgba(247, 201, 72, .55);
  border-radius: 999px;
  padding: 2px 6px;
  color: #f7c948;
  font-size: 10px;
}

.mode-tabs button::before {
  border-radius: 5px;
  color: var(--zz-cyan);
  box-shadow: inset 0 0 10px rgba(34, 244, 255, .10);
}

.categories button::before {
  top: 9px;
  bottom: 9px;
  width: 4px;
  background: linear-gradient(180deg, var(--zz-cyan), var(--zz-blue));
  box-shadow: 0 0 12px rgba(34, 244, 255, .44);
}

.player-area {
  padding: 16px 18px 18px;
}

.topbar {
  grid-template-columns: 190px minmax(420px, 1fr) auto;
  gap: 14px;
  min-height: 74px;
}

.title-block {
  display: grid;
  gap: 4px;
}

.title-block span {
  color: var(--zz-cyan);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.title-block h1 {
  font-size: 32px;
  letter-spacing: 0;
  text-shadow: 0 0 24px rgba(34, 244, 255, .24);
}

.status-strip {
  gap: 10px;
}

.status-strip article {
  min-height: 60px;
  border-radius: 14px;
  padding: 10px 14px;
}

.status-strip article:hover,
.now-next article:hover,
.overview-card:hover,
.channel-card:hover {
  border-color: var(--zz-border-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .08),
    var(--zz-glow-cyan),
    0 18px 50px rgba(0, 0, 0, .34);
}

.topbar span,
.catalog-head span,
.now-next span,
.status-strip span,
.overview-card > span {
  color: var(--zz-cyan);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .7px;
}

.top-actions select,
.top-actions button {
  min-height: 38px;
  border-radius: 10px;
}

.top-actions select {
  background:
    linear-gradient(180deg, rgba(14, 62, 112, .58), rgba(4, 20, 40, .86));
}

.content-workspace {
  grid-template-columns: minmax(0, 1.4fr) minmax(430px, .6fr);
  gap: 14px;
}

.catalog-head,
.overview-card,
.now-next article {
  border-radius: 16px;
}

.catalog-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  padding: 2px 8px 28px 2px;
}

.channel-card {
  grid-template-rows: 104px 38px 20px minmax(0, 74px);
  min-height: 266px;
  border-radius: 16px;
  padding: 10px 12px 12px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(12, 36, 66, .88), rgba(4, 13, 28, .94));
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.channel-card:hover {
  transform: translateY(-2px);
}

.channel-card.selected {
  border-color: var(--zz-cyan);
  box-shadow:
    0 0 0 1px rgba(34, 244, 255, .5),
    var(--zz-glow-cyan),
    0 18px 52px rgba(0, 0, 0, .35);
}

.poster {
  height: 104px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 20%, rgba(34, 244, 255, .18), transparent 45%),
    linear-gradient(135deg, #08233f, #020814);
}

.poster img {
  object-fit: cover;
}

.channel-card .channel-title {
  min-height: 36px;
  max-height: 38px;
  font-size: 14px;
  font-weight: 950;
}

.channel-badges i {
  border-color: rgba(34, 244, 255, .42);
  color: #00111f;
  background: linear-gradient(135deg, var(--zz-cyan), var(--zz-green));
}

.card-guide-line b {
  color: var(--zz-green);
}

.card-guide {
  gap: 3px;
  min-height: 0;
  overflow: hidden;
}

.card-guide-line {
  grid-template-columns: 36px minmax(0, 1fr);
  font-size: 11px;
  line-height: 15px;
  min-height: 15px;
}

.card-guide-line b {
  font-size: 9px;
  line-height: 15px;
}

.card-guide-line em,
.card-meta {
  color: #dff8ff;
  line-height: 15px;
}

.card-guide-line.countdown b {
  color: var(--zz-cyan);
}

.card-guide-line.countdown em {
  color: #9fffea;
  font-weight: 800;
}

.stage {
  border-radius: 20px;
  border-color: rgba(34, 244, 255, .36);
  background: #000;
  box-shadow:
    0 0 0 1px rgba(20, 120, 255, .20),
    0 0 42px rgba(34, 244, 255, .16),
    0 24px 80px rgba(0, 0, 0, .50);
}

.stage::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 2;
  border-radius: 19px;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}

.stage-live-chip,
.stage-buffer-chip {
  position: absolute;
  top: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(34, 244, 255, .42);
  border-radius: 999px;
  color: var(--zz-text);
  background: rgba(0, 8, 18, .74);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 950;
}

.stage-live-chip {
  left: 14px;
  gap: 8px;
}

.stage-live-chip span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--zz-green);
  box-shadow: 0 0 12px var(--zz-green);
}

.stage-live-chip.is-buffering span {
  background: var(--zz-warning);
  box-shadow: 0 0 12px var(--zz-warning);
}

.stage-live-chip.is-failed span {
  background: var(--zz-danger);
  box-shadow: 0 0 12px var(--zz-danger);
}

.stage-buffer-chip {
  right: 14px;
  color: var(--zz-cyan);
}

.stage-now-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: grid;
  gap: 4px;
  padding: 22px 20px 20px;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(0, 4, 10, .84), transparent);
}

.stage-now-overlay strong {
  max-width: calc(100% - 32px);
  overflow: hidden;
  color: var(--zz-text);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-now-overlay span {
  max-width: calc(100% - 32px);
  overflow: hidden;
  color: var(--zz-muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-overlay {
  left: 18px;
  bottom: 76px;
  z-index: 6;
  border-radius: 14px;
}

.now-next {
  gap: 10px;
}

.now-next article {
  min-height: 74px;
}

.health.playing strong {
  color: var(--zz-green);
}

.health.buffering strong {
  color: var(--zz-warning);
}

.health.failed strong {
  color: var(--zz-danger);
}

.ad-slot {
  border-color: rgba(34, 244, 255, .22);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(34, 244, 255, .12), rgba(20, 120, 255, .08)),
    rgba(4, 17, 35, .78);
}

.ad-slot small {
  color: var(--zz-green);
}

.ad-slot button {
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--zz-green), var(--zz-cyan));
  color: #00111f;
  font-weight: 950;
}

@media (max-width: 1280px) {
  .app-shell { grid-template-columns: clamp(280px, 20vw, 340px) minmax(0, 1fr); }
  .topbar { grid-template-columns: 1fr; align-items: stretch; }
  .content-workspace { grid-template-columns: minmax(0, 1.4fr) minmax(430px, .6fr); }
  .status-strip { grid-template-columns: repeat(4, minmax(120px, 1fr)); }
  .catalog-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-shell::after { font-size: 70vw; right: -8vw; bottom: 12vh; }
  .sidebar { position: relative; height: auto; }
  .content-workspace { grid-template-columns: 1fr; }
  .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
  .status-strip, .now-next { grid-template-columns: 1fr 1fr; }
}

/* Supplied ZappyZing brand asset pass */
:root {
  --zz-brand-cyan: #19ecff;
  --zz-brand-blue: #106bff;
  --zz-brand-deep: #010716;
  --zz-brand-ink: #00040d;
  --zz-brand-glow: 0 0 28px rgba(25, 236, 255, .44), 0 0 64px rgba(16, 107, 255, .28);
}

.app-shell {
  background:
    linear-gradient(90deg, rgba(0, 4, 13, .94), rgba(1, 10, 28, .72) 46%, rgba(0, 7, 20, .92)),
    radial-gradient(circle at 74% 16%, rgba(25, 236, 255, .22), transparent 30%),
    url("/player/zappyzing-brand-bg-20260703.jpg") center / cover fixed,
    var(--zz-brand-ink);
}

.app-shell::before {
  background:
    linear-gradient(90deg, rgba(0, 4, 13, .96), rgba(0, 8, 22, .48) 50%, rgba(0, 4, 13, .86)),
    url("/player/zappyzing-brand-bg-20260703.jpg") center / cover fixed;
  opacity: .96;
}

.app-shell::after {
  content: "";
  right: -2vw;
  bottom: 2vh;
  width: min(34vw, 560px);
  height: min(34vw, 560px);
  background: url("/player/zappyzing-brand-icon-20260703.jpg") center / contain no-repeat;
  opacity: .10;
  filter: saturate(1.25) drop-shadow(0 0 36px rgba(25, 236, 255, .45));
  transform: none;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(0, 7, 19, .94), rgba(0, 4, 12, .88)),
    url("/player/zappyzing-brand-bg-20260703.jpg") center / cover;
  border-right-color: rgba(25, 236, 255, .34);
}

.brand {
  min-height: 66px;
  align-items: center;
}

.brand > img {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: var(--zz-brand-glow);
}

.brand-wordmark {
  display: grid;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.brand-wordmark img {
  display: block;
  width: 154px;
  height: 34px;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  box-shadow: none;
}

.brand-wordmark b {
  display: inline-flex;
  width: fit-content;
  margin: -2px 0 0 6px;
  padding: 2px 7px;
  border: 1px solid rgba(25, 236, 255, .42);
  border-radius: 999px;
  color: var(--zz-brand-cyan);
  background: rgba(0, 10, 26, .78);
  letter-spacing: 1.2px;
}

.primary-button,
.top-actions button:last-child,
.ad-slot button {
  background: linear-gradient(135deg, var(--zz-brand-blue), var(--zz-brand-cyan));
  color: #001225;
  box-shadow: 0 0 22px rgba(25, 236, 255, .30);
}

.catalog-head,
.stage,
.overview-card,
.now-next article,
.channel-card {
  border-color: rgba(25, 236, 255, .30);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 0 0 1px rgba(16, 107, 255, .08),
    0 20px 58px rgba(0, 0, 0, .36);
}

.stage {
  background:
    linear-gradient(180deg, rgba(0, 6, 18, .28), rgba(0, 0, 0, .88)),
    url("/player/zappyzing-brand-bg-20260703.jpg") center / cover,
    #000;
}

.stage-overlay::before {
  content: "";
  width: 132px;
  height: 132px;
  margin: 0 auto 18px;
  display: block;
  border-radius: 32px;
  background: url("/player/zappyzing-brand-icon-20260703.jpg") center / cover no-repeat;
  box-shadow: var(--zz-brand-glow);
}

.stage-overlay .play-symbol {
  display: none;
}

.stage-now-overlay strong {
  color: #fff;
  text-shadow: 0 0 18px rgba(25, 236, 255, .52);
}

.zz-guide-shell {
  background:
    linear-gradient(90deg, rgba(0, 4, 13, .98), rgba(2, 10, 28, .88)),
    url("/player/zappyzing-brand-bg-20260703.jpg") center / cover fixed,
    #00040d;
}

.zz-top-nav {
  background: rgba(0, 5, 15, .90);
  border-bottom-color: rgba(25, 236, 255, .24);
}

.zz-logo {
  display: flex;
  align-items: center;
  width: 220px;
}

.zz-logo img {
  width: 174px;
  height: 40px;
  object-fit: cover;
  object-position: center;
}

.zz-top-nav nav button.active {
  border-bottom-color: var(--zz-brand-cyan);
  color: #fff;
  text-shadow: 0 0 14px rgba(25, 236, 255, .58);
}

.zz-side-rail button.active {
  border-left-color: var(--zz-brand-cyan);
  background: rgba(25, 236, 255, .14);
}

.zz-hero {
  background:
    linear-gradient(90deg, rgba(0, 4, 13, .96), rgba(0, 17, 44, .70) 52%, rgba(0, 86, 180, .18)),
    url("/player/zappyzing-brand-bg-20260703.jpg") center / cover;
}

.zz-preview-frame,
.zz-programme-block.is-selected {
  border-color: var(--zz-brand-cyan);
  box-shadow: 0 0 32px rgba(25, 236, 255, .26);
}

/* Brand polish pass: calmer logo lockup and clean player idle state */
.brand {
  gap: 10px;
  overflow: hidden;
}

.brand > img {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}

.brand-wordmark img {
  width: 132px;
  height: 30px;
  object-fit: cover;
  object-position: 58% center;
}

.brand-wordmark b {
  margin-left: 4px;
  padding: 1px 6px;
  font-size: 9px;
}

.stage-overlay {
  left: 18px;
  right: auto;
  bottom: 74px;
  top: auto;
  z-index: 7;
  width: min(360px, calc(100% - 36px));
  max-width: none;
  justify-items: start;
  gap: 4px;
  padding: 12px 14px;
  text-align: left;
  border-radius: 10px;
  background: rgba(0, 8, 20, .82);
  box-shadow:
    inset 3px 0 0 var(--zz-brand-cyan),
    0 16px 44px rgba(0, 0, 0, .34);
  transform: none;
}

.stage-overlay::before {
  content: none;
}

.stage-overlay strong {
  font-size: 14px;
  line-height: 1.15;
}

.stage-overlay span {
  max-width: 34ch;
  line-height: 1.35;
  font-size: 12px;
}

/* Live guide performance/layout pass */
.top-actions #muteButton.muted {
  border-color: rgba(255, 213, 74, .58);
  color: #fff0a8;
  background: rgba(82, 56, 8, .82);
}

.zz-hero {
  min-height: 218px;
  grid-template-columns: 154px minmax(330px, 1fr) minmax(420px, 560px);
  gap: 24px;
  padding: 18px 24px 16px 22px;
}

.zz-poster {
  width: 154px;
  height: 168px;
}

.zz-poster-fallback {
  font-size: 21px;
}

.zz-programme-info h1 {
  margin-bottom: 8px;
  font-size: clamp(24px, 1.8vw, 34px);
}

.zz-programme-info p {
  max-width: 820px;
  font-size: 14px;
  line-height: 1.42;
}

.zz-channel-mark {
  margin-bottom: 8px;
}

.zz-meta {
  margin-bottom: 10px;
}

.zz-guide-controls {
  height: 52px;
}

.zz-guide-bouquet-strip {
  min-height: 58px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.zz-bouquet-chip {
  flex-basis: 180px;
  height: 44px;
}

.zz-time-ruler {
  height: 34px;
}

.zz-time-slot {
  padding-left: 10px;
  font-size: 13px;
}

.zz-channel-cell {
  grid-template-columns: 38px 54px 1fr 26px;
  padding: 0 10px;
}

.zz-channel-cell strong {
  font-size: 14px;
}

.zz-channel-logo {
  font-size: 13px;
}

.zz-channel-cell span {
  font-size: 13px;
}

.zz-programme-block {
  top: 3px;
  gap: 6px;
  padding: 0 10px;
}

.zz-programme-title {
  font-size: 13px;
}

.zz-programme-loading {
  display: flex;
  align-items: center;
  margin: 4px;
  border: 1px dashed rgba(25, 236, 255, .22);
  border-radius: 6px;
  padding: 0 14px;
  color: #8fb3ca;
  background: rgba(3, 12, 24, .72);
  font-size: 13px;
  font-weight: 800;
}

.zz-current-time {
  top: -34px;
}

body.zz-not-authenticated .player-area,
body.zz-not-authenticated .rail-tools,
body.zz-not-authenticated .bouquet-button,
body.zz-not-authenticated .mode-tabs,
body.zz-not-authenticated .category-head,
body.zz-not-authenticated .categories,
body.zz-not-authenticated .zz-guide-shell {
  display: none !important;
}

body.zz-not-authenticated .app-shell {
  grid-template-columns: minmax(360px, 620px);
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(25, 236, 255, .24), transparent 32%),
    radial-gradient(circle at 50% 58%, rgba(16, 107, 255, .18), transparent 38%),
    linear-gradient(135deg, rgba(0, 4, 13, .96), rgba(0, 14, 38, .90)),
    url("/player/zappyzing-brand-bg-20260703.jpg") center / cover fixed,
    #00040d;
}

body.zz-not-authenticated .sidebar {
  position: relative;
  width: min(620px, calc(100vw - 32px));
  height: auto;
  min-height: 0;
  gap: 16px;
  padding: 28px;
  border: 1px solid rgba(25, 236, 255, .46);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(0, 10, 26, .96), rgba(0, 4, 13, .96)),
    url("/player/zappyzing-brand-bg-20260703.jpg") center / cover;
  box-shadow:
    0 34px 130px rgba(0, 0, 0, .58),
    0 0 0 1px rgba(16, 107, 255, .24),
    0 0 64px rgba(25, 236, 255, .34),
    var(--zz-brand-glow);
}

body.zz-not-authenticated .sidebar::before {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -38px;
  width: 260px;
  height: 260px;
  background: url("/player/zappyzing-brand-icon-20260703.jpg") center / contain no-repeat;
  opacity: .10;
  pointer-events: none;
  filter: saturate(1.25) drop-shadow(0 0 36px rgba(25, 236, 255, .50));
}

body.zz-not-authenticated .brand {
  position: relative;
  z-index: 1;
  min-height: 82px;
  gap: 16px;
}

body.zz-not-authenticated .brand > img {
  width: 76px;
  height: 76px;
  flex-basis: 76px;
  border-radius: 20px;
}

body.zz-not-authenticated .brand-wordmark img {
  width: 236px;
  height: 52px;
}

body.zz-not-authenticated .brand-wordmark b {
  margin-left: 8px;
  padding: 3px 10px;
  font-size: 12px;
}

body.zz-not-authenticated .login-intro {
  position: relative;
  z-index: 1;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(35, 241, 226, .66);
  border-radius: 16px;
  background: #020307;
  box-shadow: 0 0 34px rgba(25, 236, 255, .28), inset 0 0 38px rgba(16, 107, 255, .14);
}

body.zz-not-authenticated .login-intro.hidden {
  display: none;
}

body.zz-not-authenticated .login-intro video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body.zz-not-authenticated .login-card {
  position: relative;
  z-index: 1;
  gap: 12px;
  padding: 18px;
  border-radius: 16px;
  border-color: rgba(25, 236, 255, .42);
  background: linear-gradient(180deg, rgba(3, 21, 46, .90), rgba(0, 8, 22, .92));
}

body.zz-not-authenticated .form-row {
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 14px;
}

body.zz-not-authenticated .form-row label {
  font-size: 13px;
  letter-spacing: .04em;
}

body.zz-not-authenticated .login-card input {
  min-height: 48px;
  border-radius: 12px;
  padding: 0 16px;
  font-size: 17px;
}

body.zz-not-authenticated .primary-button {
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  color: #001225;
  background: linear-gradient(135deg, #1478ff, var(--zz-brand-cyan));
  box-shadow: 0 0 28px rgba(25, 236, 255, .32);
  font-size: 17px;
  font-weight: 950;
}

body.zz-not-authenticated .login-card p {
  font-size: 13px;
  color: #b7d4e9;
}

.login-downloads {
  display: none;
}

body.zz-not-authenticated .login-downloads {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.login-download-card {
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 156px;
  border: 1px solid rgba(25, 236, 255, .62);
  border-radius: 18px;
  padding: 18px 14px;
  color: #eef8ff;
  text-align: center;
  text-decoration: none;
  background:
    linear-gradient(180deg, rgba(3, 23, 50, .82), rgba(0, 7, 20, .94)),
    url("/player/zappyzing-brand-bg-20260703.jpg") center / cover;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 0 28px rgba(25,236,255,.18),
    0 18px 46px rgba(0,0,0,.34);
}

.login-download-card:hover,
.login-download-card:focus-visible {
  border-color: rgba(25, 236, 255, .96);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 0 34px rgba(25,236,255,.32),
    0 22px 52px rgba(0,0,0,.38);
}

.download-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  color: var(--zz-brand-cyan);
  background: rgba(10, 39, 75, .68);
  box-shadow: inset 0 0 0 1px rgba(25,236,255,.25), 0 0 20px rgba(25,236,255,.18);
  font-size: 34px;
  font-style: normal;
  font-weight: 950;
}

.download-icon[data-icon="android"] {
  color: #8cff29;
}

.download-icon[data-icon="windows"] {
  color: #27a7ff;
}

.login-download-card small {
  color: #a9c7ff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.login-download-card strong {
  color: #fff;
  font-size: 20px;
  font-weight: 950;
  line-height: 1.1;
}

.login-download-card em {
  display: inline-grid;
  place-items: center;
  min-height: 36px;
  min-width: min(180px, 100%);
  border: 1px solid rgba(25, 236, 255, .72);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--zz-brand-cyan);
  font-style: normal;
  font-size: 14px;
  font-weight: 950;
}

.settings-panel {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 4, 13, .72);
  backdrop-filter: blur(12px);
}

.settings-panel.hidden {
  display: none;
}

.settings-card {
  width: min(520px, 100%);
  border: 1px solid rgba(25, 236, 255, .36);
  border-radius: 16px;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(4, 18, 38, .96), rgba(0, 6, 18, .98)),
    url("/player/zappyzing-brand-bg-20260703.jpg") center / cover;
  box-shadow: 0 28px 120px rgba(0, 0, 0, .56), var(--zz-brand-glow);
}

.settings-card header,
.settings-actions,
.settings-status {
  display: flex;
  gap: 10px;
}

.settings-card header {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.settings-card h2 {
  margin: 2px 0 0;
  font-size: 26px;
}

.settings-card label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: #a9c4d9;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.settings-card select,
.settings-card button {
  min-height: 40px;
  border: 1px solid rgba(25, 236, 255, .26);
  border-radius: 10px;
  padding: 0 12px;
  background: rgba(1, 14, 31, .92);
  color: #fff;
  font-weight: 850;
}

.settings-status {
  margin: 14px 0;
}

.settings-status article {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(25, 236, 255, .20);
  border-radius: 10px;
  padding: 10px;
  background: rgba(0, 8, 20, .72);
}

.settings-status span {
  display: block;
  color: var(--zz-brand-cyan);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.settings-status strong {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-status a {
  color: #fff;
  text-decoration: none;
}

.settings-status a:hover {
  color: var(--zz-brand-cyan);
}

.settings-actions {
  flex-wrap: wrap;
}

.settings-actions button {
  flex: 1 1 150px;
}

#settingsHelp {
  margin: 14px 0 0;
  color: #9eb8ca;
  line-height: 1.45;
}

body[data-content-mode="movies"] .now-next,
body[data-content-mode="series"] .now-next,
body[data-content-mode="movies"] .stage-live-chip,
body[data-content-mode="series"] .stage-live-chip,
body[data-content-mode="movies"] .stage-buffer-chip,
body[data-content-mode="series"] .stage-buffer-chip,
body[data-content-mode="movies"] .ad-slot,
body[data-content-mode="series"] .ad-slot,
body[data-content-mode="movies"][data-playback-state="idle"] #holdBufferButton,
body[data-content-mode="movies"][data-playback-state="idle"] #saveButton,
body[data-content-mode="movies"][data-playback-state="idle"] #warmButton,
body[data-content-mode="movies"][data-playback-state="idle"] #retryButton,
body[data-content-mode="movies"][data-playback-state="idle"] #fullButton,
body[data-content-mode="movies"][data-playback-state="idle"] #muteButton,
body[data-content-mode="series"][data-playback-state="idle"] #holdBufferButton,
body[data-content-mode="series"][data-playback-state="idle"] #saveButton,
body[data-content-mode="series"][data-playback-state="idle"] #warmButton,
body[data-content-mode="series"][data-playback-state="idle"] #retryButton,
body[data-content-mode="series"][data-playback-state="idle"] #fullButton,
body[data-content-mode="series"][data-playback-state="idle"] #muteButton {
  display: none !important;
}

body[data-content-mode="movies"] .watch-pane,
body[data-content-mode="series"] .watch-pane {
  grid-template-rows: minmax(240px, 38vh) auto minmax(320px, 1fr);
  align-content: stretch;
}

body[data-content-mode="movies"] .overview-card,
body[data-content-mode="series"] .overview-card {
  min-height: 0;
  padding: 18px;
  overflow: auto;
}

body[data-content-mode="movies"] .overview-card > span,
body[data-content-mode="series"] .overview-card > span {
  color: var(--zz-cyan);
}

body[data-content-mode="movies"] #overviewTitle,
body[data-content-mode="series"] #overviewTitle {
  font-size: clamp(26px, 2vw, 38px);
}

body[data-content-mode="movies"] #overviewText,
body[data-content-mode="series"] #overviewText {
  max-width: 76ch;
  color: #d5e8f7;
  font-size: 15px;
  line-height: 1.55;
}

.series-episode-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  min-width: 0;
}

.series-episode-panel.hidden {
  display: none;
}

.series-panel-head,
.season-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.series-panel-head {
  justify-content: space-between;
}

.series-panel-head strong {
  color: #fff;
  font-size: 16px;
}

.season-tabs button,
.series-panel-head button,
.episode-row {
  border: 1px solid rgba(34, 244, 255, .28);
  border-radius: 9px;
  background: rgba(4, 18, 38, .82);
  color: #e8f7ff;
  font-weight: 850;
}

.season-tabs button {
  min-height: 32px;
  padding: 0 10px;
}

.season-tabs button.active {
  border-color: var(--zz-cyan);
  color: #00111f;
  background: linear-gradient(135deg, var(--zz-cyan), var(--zz-green));
}

.series-panel-head button {
  min-height: 34px;
  padding: 0 12px;
}

.episode-list {
  display: grid;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
}

.episode-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 56px;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 10px;
  text-align: left;
}

.episode-row span {
  color: var(--zz-cyan);
  font-size: 12px;
  font-weight: 950;
}

.episode-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.episode-row em {
  justify-self: end;
  color: var(--zz-green);
  font-style: normal;
  font-size: 12px;
  font-weight: 950;
}

/* Final topbar control normalization */
.top-actions {
  align-items: stretch;
  gap: 8px;
}

.top-actions select,
.top-actions button {
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  border: 1px solid rgba(34, 244, 255, .28);
  border-radius: 10px;
  padding: 0 16px;
  color: #f6fbff;
  background: linear-gradient(180deg, rgba(12, 43, 78, .92), rgba(3, 17, 36, .96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 8px 24px rgba(0, 0, 0, .20);
  font-size: 14px;
  font-weight: 900;
  line-height: 44px;
  white-space: nowrap;
}

.top-actions select {
  width: 126px;
  border-color: rgba(34, 244, 255, .62);
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(22, 135, 255, .26), rgba(2, 19, 43, .98)),
    #031226;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .80);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .14),
    0 0 0 1px rgba(34, 244, 255, .12),
    0 8px 24px rgba(0, 0, 0, .24);
  appearance: auto;
}

.top-actions select option {
  color: #ffffff;
  background: #061326;
}

.top-actions #bufferModeSelect {
  width: 154px;
}

.top-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
}

.top-actions #holdBufferButton {
  min-width: 94px;
}

.top-actions #muteButton {
  min-width: 106px;
}

.top-actions #fullButton,
.top-actions #settingsButton {
  border-color: rgba(34, 244, 255, .70);
  color: #001225;
  background: linear-gradient(135deg, #1687ff, var(--zz-cyan));
  box-shadow:
    0 0 0 1px rgba(34, 244, 255, .20),
    0 0 24px rgba(34, 244, 255, .28);
}

.top-actions #settingsButton {
  min-width: 116px;
}

.top-actions #remoteButton {
  min-width: 100px;
}

.remote-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 3, 10, .72);
  backdrop-filter: blur(10px);
}

.remote-modal.hidden {
  display: none;
}

.remote-card {
  position: relative;
  width: min(640px, calc(100vw - 32px));
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid rgba(34, 244, 255, .52);
  border-radius: 18px;
  color: #f5fbff;
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 244, 255, .18), transparent 42%),
    linear-gradient(180deg, rgba(5, 24, 50, .98), rgba(1, 7, 18, .98));
  box-shadow:
    0 24px 90px rgba(0, 0, 0, .58),
    0 0 42px rgba(34, 244, 255, .18),
    inset 0 1px 0 rgba(255, 255, 255, .08);
}

.remote-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(34, 244, 255, .34);
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 12, 28, .86);
  font-size: 15px;
  font-weight: 950;
}

.remote-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--zz-cyan);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.remote-brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(34, 244, 255, .34);
}

.remote-card h2 {
  font-size: 28px;
}

.remote-card p {
  color: #bad3e7;
  line-height: 1.45;
}

#remotePairCode {
  display: block;
  padding: 16px 18px;
  border: 1px solid rgba(34, 244, 255, .30);
  border-radius: 14px;
  color: #fff;
  background: rgba(0, 8, 20, .70);
  font-size: clamp(42px, 8vw, 64px);
  font-weight: 950;
  letter-spacing: 8px;
  text-align: center;
  text-shadow: 0 0 22px rgba(34, 244, 255, .46);
}

.remote-pair-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 12px;
  align-items: stretch;
}

.remote-code-panel,
.remote-qr-panel {
  min-width: 0;
  border: 1px solid rgba(34, 244, 255, .30);
  border-radius: 14px;
  background: rgba(0, 8, 20, .70);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}

.remote-code-panel {
  display: grid;
  gap: 10px;
  align-content: center;
  padding: 12px;
}

.remote-code-panel > span,
.remote-qr-panel > span {
  color: #22f4ff;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.remote-code-panel #remotePairCode {
  border: 0;
  padding: 0;
  background: transparent;
}

.remote-qr-panel {
  display: grid;
  gap: 8px;
  place-items: center;
  padding: 12px;
  color: #f5fbff;
  text-decoration: none;
}

.remote-qr-panel img {
  width: 138px;
  height: 138px;
  padding: 8px;
  border-radius: 12px;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(34, 244, 255, .35),
    0 0 22px rgba(34, 244, 255, .22);
}

.remote-qr-panel small {
  color: #a8bfd6;
  font-size: 12px;
  font-weight: 800;
}

#remotePairLink {
  overflow: hidden;
  color: #9fffea;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#remotePairStatus {
  color: #a8bfd6;
  font-weight: 800;
}

.remote-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.remote-actions button {
  flex: 1 1 140px;
  min-height: 42px;
  border: 1px solid rgba(34, 244, 255, .42);
  border-radius: 10px;
  color: #001225;
  background: linear-gradient(135deg, #1687ff, var(--zz-cyan));
  font-weight: 950;
}

@media (max-width: 560px) {
  .remote-pair-grid {
    grid-template-columns: 1fr;
  }

  .remote-qr-panel img {
    width: 156px;
    height: 156px;
  }
}

/* P0-2 production accent discipline: gold is action, cyan is live/selected, red is destructive/error only. */
:root {
  --zz-cta: #f5b942;
  --zz-cta-ink: #1a1200;
  --zz-cta-glow: 0 0 18px rgba(245, 185, 66, .35);
}

.primary-button,
.media-detail-actions button.primary,
#overviewPlayButton,
#guideWatchButton,
.zz-action-row button.primary,
body[data-content-mode="movies"] .media-detail-actions button.primary,
body[data-content-mode="series"] .media-detail-actions button.primary,
body[data-content-mode="series"] .series-summary-strip button,
body[data-content-mode="series"] .episode-play-button,
.quick-actions button[data-action="play"] {
  border-color: rgba(245, 185, 66, .72) !important;
  color: var(--zz-cta-ink) !important;
  background: linear-gradient(180deg, #ffd56c, var(--zz-cta)) !important;
  box-shadow: var(--zz-cta-glow) !important;
  text-shadow: none !important;
}

#overviewBouquetButton,
body[data-content-mode="movies"] #overviewBouquetButton,
body[data-content-mode="series"] #overviewBouquetButton,
.quick-actions button[data-action="bouquet"] {
  border-color: rgba(245, 185, 66, .72) !important;
  color: var(--zz-cta-ink) !important;
  background: linear-gradient(180deg, #ffe07e, var(--zz-cta)) !important;
  box-shadow: var(--zz-cta-glow) !important;
}

.media-detail-actions button:not(.primary):not(#overviewBouquetButton),
#overviewTrailerButton,
.series-panel-head button,
.season-tabs button,
.zz-action-row button:not(.primary),
.settings-card button,
.top-actions button,
.remote-actions button {
  border-color: rgba(180, 214, 236, .22) !important;
  color: #eef7ff !important;
  background: linear-gradient(180deg, rgba(7, 31, 58, .88), rgba(2, 13, 30, .96)) !important;
  box-shadow: none !important;
}

.top-actions #settingsButton,
body:not(.zz-not-authenticated) .top-actions #settingsButton {
  border-color: rgba(180, 214, 236, .28) !important;
  color: #eef7ff !important;
  background: linear-gradient(180deg, rgba(7, 31, 58, .88), rgba(2, 13, 30, .96)) !important;
  box-shadow: none !important;
}

.top-actions #settingsButton::before,
body:not(.zz-not-authenticated) .top-actions #settingsButton::before {
  color: #a9cbe0 !important;
  text-shadow: none !important;
}

.quick-actions.bouquet-actions button[data-bouquet-action^="delete"],
.quick-actions.bouquet-actions button[data-bouquet-action="remove-entry"] {
  border-color: rgba(255, 56, 100, .42) !important;
  color: #ffdce4 !important;
  background: linear-gradient(180deg, rgba(255, 56, 100, .24), rgba(80, 8, 26, .86)) !important;
  box-shadow: none !important;
}

/* Hotfix 51 EOF guard: identical watch sizing across Live TV, Movies, and Box Sets. */
body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .content-workspace {
  grid-template-columns: minmax(520px, 1fr) minmax(720px, 1.05fr) !important;
  align-items: stretch !important;
  gap: 14px !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .watch-pane {
  display: grid !important;
  grid-template-rows: minmax(430px, 54vh) auto minmax(280px, 1fr) !important;
  gap: 14px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  align-self: stretch !important;
  overflow: hidden !important;
}

body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .stage {
  width: 100% !important;
  height: 100% !important;
  min-height: 430px !important;
  max-height: none !important;
  aspect-ratio: 16 / 9;
  align-self: stretch !important;
}

body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .overview-card {
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 280px !important;
  max-height: none !important;
  justify-self: stretch !important;
  align-self: stretch !important;
  overflow: auto !important;
}

body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .status-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

@media (max-width: 1320px) {
  body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .content-workspace {
    grid-template-columns: 1fr !important;
    overflow: visible !important;
  }

  body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .watch-pane {
    grid-template-rows: minmax(360px, 52vh) auto minmax(240px, auto) !important;
    overflow: visible !important;
  }

  body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .stage {
    min-height: 360px !important;
  }
}

@media (max-width: 780px) {
  body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .watch-pane {
    grid-template-rows: minmax(240px, 42vh) auto minmax(220px, auto) !important;
  }

  body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .stage {
    min-height: 240px !important;
  }

  body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Repair 14 true final cascade: movie cards/details readable after shared guards. */
body[data-content-mode="movies"] .catalog-grid.media-grid {
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)) !important;
  grid-auto-rows: 382px !important;
  align-items: stretch !important;
  gap: 14px !important;
}

body[data-content-mode="movies"] .catalog-grid.media-grid .channel-card.media-card {
  height: 382px !important;
  min-height: 382px !important;
  max-height: 382px !important;
  grid-template-rows: 226px 42px 24px 52px !important;
  gap: 8px !important;
  padding: 10px !important;
  overflow: hidden !important;
}

body[data-content-mode="movies"] .catalog-grid.media-grid .channel-card.media-card .poster,
body[data-content-mode="movies"] .catalog-grid.media-grid .channel-card.media-card .media-poster {
  height: 226px !important;
  max-height: 226px !important;
  aspect-ratio: auto !important;
}

body[data-content-mode="movies"] .catalog-grid.media-grid .channel-card.media-card img {
  pointer-events: none !important;
}

body[data-content-mode="movies"] .watch-pane {
  grid-template-rows: minmax(230px, 30vh) auto minmax(430px, auto) !important;
  overflow: auto !important;
}

body[data-content-mode="movies"] .stage {
  min-height: 230px !important;
  height: 30vh !important;
  max-height: 300px !important;
}

body[data-content-mode="movies"] .overview-card {
  min-height: 430px !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Repair 13 true EOF override: Movies must not inherit Live TV stage/detail sizing. */
body:not(.zz-not-authenticated)[data-content-mode="movies"] .catalog-grid.media-grid {
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)) !important;
  grid-auto-rows: 382px !important;
  align-items: stretch !important;
  gap: 14px !important;
}

body:not(.zz-not-authenticated)[data-content-mode="movies"] .catalog-grid.media-grid .channel-card.media-card {
  height: 382px !important;
  min-height: 382px !important;
  max-height: 382px !important;
  grid-template-rows: 226px 42px 24px 52px !important;
  gap: 8px !important;
  padding: 10px !important;
  overflow: hidden !important;
}

body:not(.zz-not-authenticated)[data-content-mode="movies"] .catalog-grid.media-grid .channel-card.media-card .poster,
body:not(.zz-not-authenticated)[data-content-mode="movies"] .catalog-grid.media-grid .channel-card.media-card .media-poster {
  height: 226px !important;
  max-height: 226px !important;
  aspect-ratio: auto !important;
}

body:not(.zz-not-authenticated)[data-content-mode="movies"] .catalog-grid.media-grid .channel-card.media-card img {
  pointer-events: none !important;
}

body:not(.zz-not-authenticated)[data-content-mode="movies"] .watch-pane {
  grid-template-rows: minmax(230px, 30vh) auto minmax(430px, auto) !important;
  overflow: auto !important;
}

body:not(.zz-not-authenticated)[data-content-mode="movies"] .stage {
  min-height: 230px !important;
  height: 30vh !important;
  max-height: 300px !important;
}

body:not(.zz-not-authenticated)[data-content-mode="movies"] .overview-card {
  min-height: 430px !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Repair 10 final movie formatting guard: prevent tile overlap and clipped details. */
body[data-content-mode="movies"] .catalog-grid.media-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)) !important;
  grid-auto-rows: 382px !important;
  align-items: stretch !important;
  gap: 14px !important;
  overflow: auto !important;
}

body[data-content-mode="movies"] .catalog-grid.media-grid .channel-card.media-card {
  height: 382px !important;
  min-height: 382px !important;
  max-height: 382px !important;
  display: grid !important;
  grid-template-rows: 226px 42px 24px 52px !important;
  gap: 8px !important;
  padding: 10px !important;
  overflow: hidden !important;
}

body[data-content-mode="movies"] .catalog-grid.media-grid .channel-card.media-card .poster,
body[data-content-mode="movies"] .catalog-grid.media-grid .channel-card.media-card .media-poster {
  height: 226px !important;
  max-height: 226px !important;
  aspect-ratio: auto !important;
  overflow: hidden !important;
}

body[data-content-mode="movies"] .catalog-grid.media-grid .channel-card.media-card img {
  pointer-events: none !important;
}

body[data-content-mode="movies"] .watch-pane {
  grid-template-rows: minmax(230px, 30vh) auto minmax(430px, auto) !important;
  overflow: auto !important;
}

body[data-content-mode="movies"] .stage {
  min-height: 230px !important;
  max-height: 300px !important;
  height: 30vh !important;
}

body[data-content-mode="movies"] #video,
body[data-content-mode="movies"] .stage-intro video,
body[data-content-mode="movies"] .stage > video {
  height: 100% !important;
  object-fit: contain !important;
}

body[data-content-mode="movies"] .overview-card {
  min-height: 430px !important;
  max-height: none !important;
  overflow: visible !important;
}

body[data-content-mode="movies"] .overview-card #overviewText,
body[data-content-mode="movies"] .overview-card .media-continuity-panel,
body[data-content-mode="movies"] .overview-card .media-detail-actions {
  max-width: 100% !important;
}

/* Player 1 screen 2 functional repair lock: no redesign, only fit/crop/click fixes. */
body:not(.zz-not-authenticated) .brand {
  min-height: clamp(72px, 8vh, 98px) !important;
  padding: 10px !important;
  overflow: hidden !important;
}

body:not(.zz-not-authenticated) .brand .brand-full-logo,
body:not(.zz-not-authenticated) .brand > img.brand-full-logo {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 82px !important;
  object-fit: contain !important;
  object-position: center !important;
}

.catalog-grid.media-grid {
  align-items: start !important;
}

.catalog-grid.media-grid .channel-card.media-card {
  display: grid !important;
  grid-template-rows: auto auto auto minmax(0, 1fr) !important;
  align-content: start !important;
  overflow: hidden !important;
}

.catalog-grid.media-grid .channel-card.media-card .media-poster,
.catalog-grid.media-grid .channel-card.media-card .poster {
  width: 100% !important;
  aspect-ratio: 2 / 3 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.catalog-grid.media-grid .channel-card.media-card .media-poster img,
.catalog-grid.media-grid .channel-card.media-card .poster img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.catalog-grid:not(.media-grid) .channel-card:not(.media-card) {
  overflow: hidden !important;
}

.catalog-grid:not(.media-grid) .channel-card:not(.media-card) .poster img {
  object-fit: contain !important;
}

body[data-content-mode="movies"] .overview-card,
body[data-content-mode="series"] .overview-card {
  overflow: auto !important;
  max-height: min(46vh, 520px) !important;
}

body[data-content-mode="movies"] .media-continuity-panel,
body[data-content-mode="series"] .media-continuity-panel {
  min-width: 0 !important;
  overflow: visible !important;
}

.overview-actions button,
.episode-play-button,
.episode-detail-card button,
.episode-row,
.channel-card {
  pointer-events: auto !important;
}

/* Hotfix 51 final layout guard: Live TV, Movies, and Box Sets share the same watch geometry. */
body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .content-workspace {
  grid-template-columns: minmax(520px, 1fr) minmax(720px, 1.05fr) !important;
  align-items: stretch !important;
  gap: 14px !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .watch-pane {
  display: grid !important;
  grid-template-rows: minmax(430px, 54vh) auto minmax(280px, 1fr) !important;
  gap: 14px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  align-self: stretch !important;
  overflow: hidden !important;
}

body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .stage {
  width: 100% !important;
  height: 100% !important;
  min-height: 430px !important;
  max-height: none !important;
  aspect-ratio: 16 / 9;
  align-self: stretch !important;
}

body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .overview-card {
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 280px !important;
  max-height: none !important;
  justify-self: stretch !important;
  align-self: stretch !important;
  overflow: auto !important;
}

body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .status-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

@media (max-width: 1320px) {
  body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .content-workspace {
    grid-template-columns: 1fr !important;
    overflow: visible !important;
  }

  body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .watch-pane {
    grid-template-rows: minmax(360px, 52vh) auto minmax(240px, auto) !important;
    overflow: visible !important;
  }

  body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .stage {
    min-height: 360px !important;
  }
}

@media (max-width: 780px) {
  body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .watch-pane {
    grid-template-rows: minmax(240px, 42vh) auto minmax(220px, auto) !important;
  }

  body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .stage {
    min-height: 240px !important;
  }

  body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Hotfix 51: one uniform watch layout for Live TV, Movies, and Box Sets. */
body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .content-workspace {
  grid-template-columns: minmax(520px, 1fr) minmax(720px, 1.05fr) !important;
  align-items: stretch !important;
  gap: 14px !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .catalog-pane {
  min-width: 0 !important;
  min-height: 0 !important;
}

body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .watch-pane {
  display: grid !important;
  grid-template-rows: minmax(430px, 54vh) auto minmax(280px, 1fr) !important;
  gap: 14px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  align-self: stretch !important;
  overflow: hidden !important;
}

body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .stage {
  width: 100% !important;
  height: 100% !important;
  min-height: 430px !important;
  max-height: none !important;
  aspect-ratio: 16 / 9;
  align-self: stretch !important;
}

body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) #video {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .status-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .status-strip article {
  min-width: 0 !important;
  min-height: 72px !important;
}

body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .overview-card {
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 280px !important;
  max-height: none !important;
  justify-self: stretch !important;
  align-self: stretch !important;
  overflow: auto !important;
}

body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .overview-card h2,
body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .overview-card p,
body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .media-detail-meta,
body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .series-summary-strip {
  max-width: 100% !important;
}

@media (max-width: 1320px) {
  body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .content-workspace {
    grid-template-columns: 1fr !important;
    overflow: visible !important;
  }

  body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .watch-pane {
    grid-template-rows: minmax(360px, 52vh) auto minmax(240px, auto) !important;
    overflow: visible !important;
  }

  body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .stage {
    min-height: 360px !important;
  }
}

@media (max-width: 780px) {
  body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .watch-pane {
    grid-template-rows: minmax(240px, 42vh) auto minmax(220px, auto) !important;
  }

  body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .stage {
    min-height: 240px !important;
  }

  body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Hotfix 49: readable live cards at full browser width. */
body[data-content-mode="live"] .catalog-grid:not(.media-grid) {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)) !important;
  align-items: start !important;
}

body[data-content-mode="live"] .channel-card:not(.media-card) {
  grid-template-rows: minmax(86px, 104px) minmax(34px, auto) auto minmax(38px, auto) !important;
  min-height: 222px !important;
  overflow: hidden !important;
}

body[data-content-mode="live"] .channel-card:not(.media-card) .poster {
  height: 100% !important;
  min-height: 86px !important;
}

body[data-content-mode="live"] .channel-card:not(.media-card) .card-guide {
  gap: 4px !important;
  min-height: 38px !important;
  overflow: visible !important;
}

body[data-content-mode="live"] .channel-card:not(.media-card) .card-guide-line {
  grid-template-columns: 38px minmax(0, 1fr) !important;
  min-height: 17px !important;
  line-height: 17px !important;
  font-size: 11px !important;
}

body[data-content-mode="live"] .channel-card:not(.media-card) .card-guide-line b {
  line-height: 17px !important;
}

body[data-content-mode="live"] .channel-card:not(.media-card) .card-guide-line em {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  line-height: 17px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-content-mode="live"] .channel-card:not(.media-card) .card-guide-line.next-programme em {
  display: flex !important;
  gap: 6px !important;
  align-items: center !important;
}

body[data-content-mode="live"] .channel-card:not(.media-card) .card-guide-line.next-programme em span {
  flex: 0 0 auto !important;
  color: #9fffea !important;
  font-weight: 900 !important;
}

/* Hotfix 48: real content on mode click, larger player, full-screen box-set explorer. */
.category-head {
  flex-wrap: wrap;
}

.category-quick-access {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 42px;
  gap: 8px;
  width: 100%;
}

.category-quick-access select,
.category-quick-access button {
  min-width: 0;
  min-height: 38px;
  border: 1px solid rgba(0, 216, 255, .34);
  border-radius: 10px;
  color: #eef7ff;
  background: linear-gradient(180deg, rgba(7, 31, 58, .92), rgba(2, 13, 30, .98));
  font-weight: 850;
}

.category-quick-access select {
  padding: 0 10px;
  text-overflow: ellipsis;
}

.category-quick-access button {
  padding: 0;
  color: #ffd56c !important;
}

body:not(.zz-not-authenticated) .content-workspace {
  grid-template-columns: minmax(480px, .95fr) minmax(720px, 1.05fr) !important;
}

body:not(.zz-not-authenticated) .watch-pane {
  grid-template-rows: minmax(520px, 64vh) auto minmax(160px, .65fr) !important;
}

body:not(.zz-not-authenticated) .stage {
  min-height: min(64vh, 620px) !important;
  max-height: none !important;
}

body[data-content-mode="series"] .series-episode-panel[data-state="explorer"],
body[data-content-mode="series"] .series-episode-panel[data-state="loading"] {
  position: fixed;
  inset: clamp(12px, 2vw, 28px);
  z-index: 1200;
  margin: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  padding: clamp(16px, 2vw, 28px);
  border: 1px solid rgba(34, 244, 255, .55);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(3, 20, 42, .98), rgba(0, 7, 20, .99)),
    radial-gradient(circle at 82% 0, rgba(34, 244, 255, .18), transparent 34%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .72), 0 0 0 9999px rgba(0, 4, 14, .74);
}

body[data-content-mode="series"] .series-episode-panel[data-state="explorer"] .series-panel-head strong {
  font-size: clamp(24px, 2.4vw, 44px);
}

body[data-content-mode="series"] .series-episode-panel[data-state="explorer"] .season-tabs button {
  min-height: 44px;
  padding: 0 18px;
}

body[data-content-mode="series"] .series-episode-panel[data-state="explorer"] .episode-explorer-grid {
  grid-template-columns: minmax(360px, .75fr) minmax(520px, 1.25fr);
  height: auto;
  max-height: none;
}

body[data-content-mode="series"] .series-episode-panel[data-state="explorer"] .episode-list {
  max-height: none;
}

body[data-content-mode="series"] .series-episode-panel[data-state="explorer"] .episode-row {
  min-height: 86px;
}

body[data-content-mode="series"] .series-episode-panel[data-state="explorer"] .episode-detail-card {
  grid-template-rows: minmax(240px, 36vh) minmax(0, 1fr);
}

body[data-content-mode="series"] .series-episode-panel[data-state="explorer"] .episode-detail-art {
  height: 100%;
  min-height: 240px;
  max-height: none;
}

body[data-content-mode="series"] .series-episode-panel[data-state="explorer"] .episode-detail-copy h3 {
  font-size: clamp(28px, 2.7vw, 52px);
}

body[data-content-mode="series"] .series-episode-panel[data-state="explorer"] .episode-detail-copy p {
  max-height: none;
  font-size: clamp(17px, 1.05vw, 22px);
}

@media (max-width: 1250px) {
  body:not(.zz-not-authenticated) .content-workspace {
    grid-template-columns: 1fr !important;
  }

  body[data-content-mode="series"] .series-episode-panel[data-state="explorer"] .episode-explorer-grid {
    grid-template-columns: 1fr;
  }
}

/* Media continuity and consistent player sizing */
.watch-pane {
  grid-template-rows: auto auto minmax(240px, 1fr);
}

.stage {
  height: auto;
  min-height: 260px;
  max-height: 520px;
  aspect-ratio: 16 / 9;
}

body[data-content-mode="movies"][data-playback-state="idle"] .stage,
body[data-content-mode="series"][data-playback-state="idle"] .stage {
  display: block !important;
  height: auto !important;
  min-height: 260px !important;
  max-height: 520px !important;
  border: 1px solid rgba(34, 244, 255, .36) !important;
  margin: 0 !important;
  overflow: hidden !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

body[data-content-mode="movies"] .stage-live-chip,
body[data-content-mode="series"] .stage-live-chip,
body[data-content-mode="movies"] .stage-buffer-chip,
body[data-content-mode="series"] .stage-buffer-chip {
  display: flex !important;
}

body[data-content-mode="movies"][data-playback-state="idle"] #fullButton,
body[data-content-mode="movies"][data-playback-state="idle"] #muteButton,
body[data-content-mode="series"][data-playback-state="idle"] #fullButton,
body[data-content-mode="series"][data-playback-state="idle"] #muteButton {
  display: inline-flex !important;
}

.zz-live-preview {
  aspect-ratio: 16 / 9;
  max-height: 360px;
}

.media-continuity-panel {
  display: grid;
  grid-template-columns: minmax(110px, 150px) minmax(0, 1fr);
  gap: 14px;
  margin: 14px 0;
  min-width: 0;
}

.media-continuity-panel.hidden {
  display: none;
}

.media-art-card {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(34, 244, 255, .42);
  border-radius: 12px;
  background: radial-gradient(circle at 50% 20%, rgba(34, 244, 255, .16), rgba(2, 9, 22, .95));
  box-shadow: 0 14px 34px rgba(0, 0, 0, .30);
}

.media-art-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-art-card span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--zz-cyan);
  font-size: 34px;
  font-weight: 950;
}

.media-continuity-copy {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
}

.media-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.media-progress-head strong {
  color: #fff;
  font-size: 15px;
}

.media-progress-head em {
  color: #9fffea;
  font-style: normal;
  font-weight: 900;
}

.watch-progress {
  display: block;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .10);
}

.watch-progress > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--zz-cyan), var(--zz-green));
  box-shadow: 0 0 18px rgba(34, 244, 255, .32);
}

.media-fact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.media-fact-row span {
  min-height: 26px;
  padding: 5px 8px;
  border: 1px solid rgba(34, 244, 255, .22);
  border-radius: 999px;
  color: #cfeeff;
  background: rgba(2, 15, 32, .78);
  font-size: 12px;
  font-weight: 850;
}

.next-up-button,
.episode-next-up {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid rgba(34, 244, 255, .54);
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, rgba(18, 135, 255, .28), rgba(34, 244, 255, .10));
  text-align: left;
}

.next-up-button b,
.episode-next-up span {
  color: var(--zz-cyan);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.next-up-button span,
.episode-next-up strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.episode-next-up em {
  color: #001225;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--zz-cyan);
  font-style: normal;
  font-weight: 950;
}

.episode-list {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  max-height: 520px;
}

.episode-row {
  grid-template-columns: 82px minmax(0, 1fr) auto;
  min-height: 116px;
  padding: 10px;
  align-items: stretch;
}

.episode-row.watched {
  border-color: rgba(45, 255, 196, .42);
}

.episode-thumb {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 82px;
  height: 96px;
  border-radius: 9px;
  color: var(--zz-cyan);
  background: rgba(0, 8, 18, .82);
}

.episode-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.episode-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.episode-copy b {
  color: var(--zz-cyan);
  font-size: 12px;
  font-weight: 950;
}

.episode-copy small {
  display: -webkit-box;
  overflow: hidden;
  color: #a9c4d8;
  font-size: 12px;
  line-height: 1.25;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.episode-row > em {
  align-self: center;
}

/* Final media-stage spacing: keep detail cards below the player, never over it. */
.watch-pane {
  gap: 14px;
  grid-template-rows: minmax(260px, min(42vh, 430px)) auto minmax(230px, 1fr);
}

.stage {
  position: relative;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  overflow: hidden;
}

body[data-content-mode="movies"] .watch-pane,
body[data-content-mode="series"] .watch-pane {
  gap: 16px;
  grid-template-rows: minmax(300px, min(40vh, 410px)) auto minmax(340px, 1fr);
}

body[data-content-mode="movies"] .overview-card,
body[data-content-mode="series"] .overview-card {
  position: relative;
  z-index: 1;
  margin-top: 0;
  min-height: 340px;
  max-height: none;
}

body[data-content-mode="movies"] .stage-now-overlay,
body[data-content-mode="series"] .stage-now-overlay {
  padding-bottom: 46px;
}

/* Full ZappyZing logo fit for the sidebar header. */
.brand {
  display: block;
  min-height: 58px;
  padding: 0;
}

.brand .brand-full-logo {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-height: 74px;
  object-fit: contain;
  object-position: left center;
  border-radius: 0;
  box-shadow: none;
}

.brand > img.brand-full-logo {
  flex-basis: auto;
}

body.zz-not-authenticated .brand {
  min-height: 112px;
}

body.zz-not-authenticated .brand .brand-full-logo {
  max-height: 112px;
  object-position: center;
}

body[data-content-mode="movies"] .overview-card,
body[data-content-mode="series"] .overview-card {
  justify-self: end;
  width: min(820px, 100%);
  min-height: 330px;
  max-height: none;
  overflow: visible;
  padding: 18px 18px 20px;
  gap: 12px;
  border-color: rgba(0, 216, 255, .52);
  background:
    linear-gradient(180deg, rgba(7, 32, 58, .94), rgba(2, 15, 31, .94)),
    radial-gradient(circle at 100% 0, rgba(0, 216, 255, .14), transparent 34%);
}

body[data-content-mode="movies"] .overview-card > span,
body[data-content-mode="series"] .overview-card > span {
  color: #22f4ff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
}

body[data-content-mode="movies"] #overviewTitle,
body[data-content-mode="series"] #overviewTitle {
  margin: 0;
  overflow-wrap: anywhere;
  color: #f7fbff;
  font-size: clamp(30px, 2.35vw, 42px);
  line-height: 1.06;
}

body[data-content-mode="movies"] #overviewText,
body[data-content-mode="series"] #overviewText {
  max-width: 70ch;
  margin: 0;
  color: #eff8ff;
  font-size: 18px;
  line-height: 1.6;
}

body[data-content-mode="movies"] .media-detail-meta,
body[data-content-mode="series"] .media-detail-meta {
  align-items: flex-start;
  gap: 9px;
}

body[data-content-mode="movies"] .media-detail-meta span,
body[data-content-mode="series"] .media-detail-meta span,
body[data-content-mode="movies"] .media-stars,
body[data-content-mode="series"] .media-stars,
body[data-content-mode="movies"] .media-fact-row span,
body[data-content-mode="series"] .media-fact-row span {
  max-width: 100%;
  min-height: 30px;
  white-space: normal;
  overflow-wrap: anywhere;
  color: #e9fbff;
  background: rgba(1, 18, 36, .82);
}

body[data-content-mode="movies"] .media-stars .stars,
body[data-content-mode="series"] .media-stars .stars,
body[data-content-mode="movies"] .stars,
body[data-content-mode="series"] .stars {
  color: #f7c948;
  text-shadow: 0 0 12px rgba(247, 201, 72, .34);
  letter-spacing: 1px;
}

body[data-content-mode="movies"] .media-stars b,
body[data-content-mode="series"] .media-stars b {
  color: #fff;
}

body[data-content-mode="movies"] .media-continuity-panel,
body[data-content-mode="series"] .media-continuity-panel {
  grid-template-columns: minmax(118px, 150px) minmax(0, 1fr);
  gap: 16px;
  margin: 8px 0 4px;
}

body[data-content-mode="movies"] .media-art-card,
body[data-content-mode="series"] .media-art-card {
  align-self: start;
  max-height: 226px;
  border-color: rgba(0, 216, 255, .56);
}

body[data-content-mode="movies"] .media-continuity-copy,
body[data-content-mode="series"] .media-continuity-copy {
  min-width: 0;
  gap: 11px;
}

body[data-content-mode="movies"] .media-progress-head,
body[data-content-mode="series"] .media-progress-head {
  flex-wrap: wrap;
}

body[data-content-mode="movies"] .media-detail-actions,
body[data-content-mode="series"] .media-detail-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

body[data-content-mode="movies"] .media-detail-actions button,
body[data-content-mode="series"] .media-detail-actions button {
  min-width: 138px;
  height: 44px;
  border-radius: 8px;
  font-size: 15px;
}

body[data-content-mode="movies"] .media-detail-actions button.primary,
body[data-content-mode="series"] .media-detail-actions button.primary {
  color: #fff;
  background: linear-gradient(180deg, #ff244f, #c70835);
  box-shadow: 0 0 24px rgba(229, 9, 63, .28);
}

body[data-content-mode="movies"] #overviewBouquetButton,
body[data-content-mode="series"] #overviewBouquetButton {
  border-color: rgba(247, 201, 72, .66);
  color: #1b1200;
  background: linear-gradient(180deg, #ffe27a, #d89b17);
}

@media (max-width: 1200px) {
  body[data-content-mode="movies"] .content-workspace,
  body[data-content-mode="series"] .content-workspace {
    grid-template-columns: 1fr;
  }

  body[data-content-mode="movies"] .watch-pane,
  body[data-content-mode="series"] .watch-pane,
  body[data-content-mode="movies"] .overview-card,
  body[data-content-mode="series"] .overview-card {
    justify-self: stretch;
    width: 100%;
  }
}

@media (max-width: 720px) {
  body[data-content-mode="movies"] .media-continuity-panel,
  body[data-content-mode="series"] .media-continuity-panel {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  body[data-content-mode="movies"] #overviewText,
  body[data-content-mode="series"] #overviewText {
    font-size: 16px;
  }
}

/* Web Player guide rebuild: same product language as Live TV / Movies. */
.zz-guide-shell {
  background:
    linear-gradient(90deg, rgba(1, 9, 17, .98), rgba(1, 9, 17, .72)),
    radial-gradient(circle at 78% 12%, rgba(0, 216, 255, .22), transparent 34%),
    url("/player/zappyzing-web-skin-reference.png") center / cover fixed,
    #020b13;
}

.zz-side-rail {
  width: 58px;
  border-right: 1px solid rgba(0, 216, 255, .24);
  background: linear-gradient(180deg, rgba(0, 8, 16, .96), rgba(4, 18, 34, .94));
}

.zz-side-rail button.active {
  color: #00101d;
  background: linear-gradient(180deg, #22f4ff, #1388ff);
  box-shadow: 0 0 22px rgba(34, 244, 255, .26);
}

.zz-guide-main {
  background: linear-gradient(180deg, rgba(1, 12, 25, .88), rgba(1, 8, 18, .95));
}

.zz-top-nav {
  height: 62px;
  border-bottom: 1px solid rgba(0, 216, 255, .24);
  background: rgba(2, 10, 20, .92);
}

.zz-top-nav nav button {
  color: #dcecff;
}

.zz-top-nav nav button.active {
  border-bottom-color: #22f4ff;
  color: #22f4ff;
}

.zz-top-actions button,
.zz-guide-controls button {
  border: 1px solid rgba(0, 216, 255, .34);
  color: #effaff;
  background: linear-gradient(180deg, rgba(9, 47, 82, .86), rgba(3, 20, 38, .86));
}

.zz-hero {
  min-height: 228px;
  grid-template-columns: 150px minmax(360px, 1fr) minmax(420px, 620px);
  gap: 22px;
  padding: 18px 28px 16px 24px;
  border-bottom: 1px solid rgba(0, 216, 255, .22);
  background:
    linear-gradient(90deg, rgba(4, 22, 40, .94), rgba(4, 18, 34, .84)),
    radial-gradient(circle at 72% 50%, rgba(0, 216, 255, .16), transparent 38%);
}

.zz-poster {
  width: 150px;
  height: 156px;
  border: 1px solid rgba(0, 216, 255, .28);
  border-radius: 8px;
  background: rgba(3, 13, 25, .9);
  box-shadow: 0 14px 38px rgba(0, 0, 0, .34);
}

.zz-poster-fallback {
  color: #fff;
  background: linear-gradient(145deg, rgba(0, 216, 255, .26), rgba(4, 18, 34, .98));
  font-size: 20px;
}

.zz-channel-mark {
  gap: 12px;
  margin-bottom: 8px;
}

.zz-channel-mark span {
  color: #22f4ff;
}

.zz-channel-mark b {
  color: #f7c948;
}

.zz-programme-info h1 {
  margin-bottom: 8px;
  font-size: clamp(26px, 2vw, 36px);
  letter-spacing: 0;
}

.zz-programme-info p {
  max-width: 760px;
  color: #d2e8fa;
  font-size: 15px;
}

.zz-meta {
  gap: 8px;
  margin-bottom: 10px;
  font-size: 14px;
}

.zz-meta em,
.zz-programme-badges small,
.badge {
  border-color: rgba(0, 216, 255, .42);
  color: #dff8ff;
  background: rgba(1, 18, 36, .72);
}

.zz-meta em.live,
.zz-programme-badges .live,
.dot.live {
  background: #18d2a7;
}

.zz-meta em.live,
.zz-programme-badges .live {
  border-color: rgba(24, 210, 167, .84);
  color: #001a16;
}

.zz-live-preview {
  border-color: rgba(0, 216, 255, .62);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(0, 216, 255, .12), rgba(5, 13, 25, .98));
  box-shadow: 0 0 0 1px rgba(0, 216, 255, .10), 0 18px 48px rgba(0, 0, 0, .36);
}

.zz-preview-badge {
  background: linear-gradient(180deg, #22f4ff, #1388ff);
  color: #00101d;
}

.zz-action-row {
  gap: 10px;
}

.zz-guide-shell:not(.has-guide-selection) .zz-action-row {
  display: none;
}

.zz-action-row button {
  border-color: rgba(0, 216, 255, .28);
  background: rgba(6, 26, 48, .88);
}

.zz-action-row button.primary {
  color: #00101d;
  background: linear-gradient(180deg, #22f4ff, #1388ff);
}

.zz-guide-controls {
  height: 62px;
  padding: 0 28px 0 24px;
  border-bottom: 1px solid rgba(0, 216, 255, .20);
  background: rgba(2, 12, 24, .92);
}

.zz-filter-left {
  flex: 1;
  min-width: 0;
}

.zz-guide-search {
  flex: 1;
  min-width: 260px;
  max-width: 520px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  height: 40px;
  border: 1px solid rgba(0, 216, 255, .34);
  border-radius: 8px;
  padding: 0 12px;
  color: #8fb2d1;
  background: rgba(3, 19, 38, .92);
}

.zz-guide-search span {
  color: #22f4ff;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.zz-guide-search input {
  min-height: 30px;
  border: 0;
  padding: 0;
  background: transparent;
}

.zz-date-controls button#guideNowButton {
  border-color: rgba(247, 201, 72, .58);
  color: #1a1200;
  background: linear-gradient(180deg, #ffe27a, #d89b17);
}

.zz-guide-bouquet-strip {
  min-height: 62px;
  padding: 8px 28px 8px 24px;
  border-bottom: 1px solid rgba(0, 216, 255, .18);
  background: linear-gradient(90deg, rgba(3, 15, 30, .96), rgba(4, 24, 43, .9));
}

.zz-bouquet-chip {
  flex-basis: 190px;
  height: 46px;
  border-color: rgba(0, 216, 255, .30);
  background: rgba(4, 22, 40, .9);
}

.zz-bouquet-chip.in-guide {
  border-color: rgba(247, 201, 72, .58);
  box-shadow: inset 3px 0 0 #f7c948;
}

.zz-grid-wrap {
  background: rgba(1, 8, 17, .92);
}

.zz-time-ruler {
  height: 36px;
  background: rgba(2, 12, 24, .98);
  border-bottom-color: rgba(0, 216, 255, .18);
}

.zz-time-slot {
  color: #d9ecff;
  border-left-color: rgba(0, 216, 255, .12);
  font-size: 13px;
}

.zz-channel-row {
  border-bottom-color: rgba(0, 216, 255, .10);
}

.zz-channel-cell {
  grid-template-columns: 42px 58px 1fr 28px;
  padding: 0 12px;
  border-right-color: rgba(0, 216, 255, .18);
  background: rgba(3, 13, 25, .98);
}

.zz-channel-logo {
  color: #22f4ff;
}

.zz-programme-block {
  border-color: rgba(0, 216, 255, .10);
  background: linear-gradient(180deg, rgba(12, 25, 45, .96), rgba(6, 16, 31, .96));
}

.zz-programme-block:nth-child(3n) {
  background: linear-gradient(180deg, rgba(9, 31, 50, .96), rgba(7, 18, 34, .96));
}

.zz-programme-block.is-live {
  background: linear-gradient(180deg, rgba(7, 54, 62, .96), rgba(4, 31, 38, .96));
}

.zz-programme-block.selected {
  border-color: rgba(34, 244, 255, .78);
  background: linear-gradient(180deg, rgba(0, 168, 255, .96), rgba(0, 92, 190, .96));
  box-shadow: 0 10px 28px rgba(0, 216, 255, .20);
}

.zz-current-time {
  background: #f7c948;
}

.zz-current-time span {
  color: #1a1200;
  background: #f7c948;
}

.zz-current-time span::after {
  border-top-color: #f7c948;
}

.zz-guide-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: #8fb2d1;
  font-size: 18px;
  font-weight: 900;
}

.zz-guide-footer {
  height: 48px;
  border-top-color: rgba(0, 216, 255, .18);
  background: rgba(2, 10, 20, .96);
}

@media (max-width: 1180px) {
  .zz-hero {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .zz-preview-column {
    grid-column: 1 / -1;
  }
}

/* Compact production EPG: keep the grid as the main work area. */
.zz-hero {
  height: 252px;
  min-height: 252px;
  align-items: center;
  overflow: hidden;
}

.zz-hero .zz-preview-column {
  max-width: 440px;
  justify-self: end;
}

.zz-hero .zz-live-preview {
  max-height: 184px;
}

.zz-hero .zz-poster {
  width: 128px;
  height: 136px;
}

.zz-grid-wrap {
  min-height: 260px;
}

@media (max-height: 780px) {
  .zz-hero {
    height: 220px;
    min-height: 220px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .zz-hero .zz-live-preview {
    max-height: 160px;
  }

  .zz-programme-info p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* Larger clean page title, no route badge. */
.topbar {
  grid-template-columns: minmax(240px, .34fr) minmax(420px, 1fr) auto;
}

.title-block {
  gap: 0;
  align-content: center;
}

#routeBadge {
  display: none !important;
}

.title-block h1,
#modeTitle {
  font-size: clamp(42px, 3.2vw, 62px);
  line-height: .96;
  font-weight: 950;
  letter-spacing: 0;
  white-space: nowrap;
}

/* One visual language for every topbar action control. */
.top-actions {
  align-items: center;
  gap: 8px;
}

.top-actions select,
.top-actions button,
.top-actions #fullButton,
.top-actions #settingsButton,
.top-actions #muteButton,
.top-actions #remoteButton,
.top-actions #holdBufferButton {
  box-sizing: border-box;
  height: 46px !important;
  min-height: 46px !important;
  max-height: 46px !important;
  min-width: 88px;
  border: 1px solid rgba(34, 244, 255, .56) !important;
  border-radius: 12px !important;
  padding: 0 16px !important;
  color: #f4fbff !important;
  background:
    linear-gradient(180deg, rgba(12, 46, 82, .94), rgba(3, 18, 38, .98)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .10),
    0 0 0 1px rgba(16, 107, 255, .12),
    0 12px 28px rgba(0, 0, 0, .24) !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  line-height: 46px !important;
  text-align: center;
  text-shadow: none !important;
  white-space: nowrap;
}

.top-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.top-actions select {
  appearance: auto;
}

.top-actions #engineSelect {
  width: 132px;
}

.top-actions #bufferModeSelect {
  width: 160px;
}

.top-actions #muteButton {
  min-width: 112px;
}

.top-actions #settingsButton {
  min-width: 116px;
}

.top-actions select:hover,
.top-actions button:hover {
  border-color: rgba(34, 244, 255, .86) !important;
  background:
    linear-gradient(180deg, rgba(18, 67, 112, .98), rgba(4, 23, 48, .98)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .14),
    0 0 22px rgba(34, 244, 255, .22),
    0 12px 28px rgba(0, 0, 0, .26) !important;
}

/* Browser responsive fit: real laptop viewport, browser chrome, zoom-safe layout. */
:root {
  --app-vh: 100vh;
  --safe-vh: calc(var(--vh, 1vh) * 100);
}

@supports (height: 100dvh) {
  :root {
    --app-vh: 100dvh;
  }
}

html,
body {
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: var(--safe-vh);
  margin: 0;
  overflow: hidden;
}

body {
  min-height: var(--safe-vh);
}

.app-shell {
  width: 100%;
  height: var(--safe-vh);
  max-height: var(--safe-vh);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  grid-template-columns: clamp(280px, 20vw, 340px) minmax(0, 1fr);
}

.app-shell > *,
.player-area,
.content-workspace,
.catalog-pane,
.watch-pane,
.status-strip,
.topbar {
  min-width: 0;
  min-height: 0;
}

.sidebar {
  height: var(--safe-vh);
  max-height: var(--safe-vh);
  min-height: 0;
  overflow: hidden;
}

.player-area {
  height: var(--safe-vh);
  max-height: var(--safe-vh);
  overflow: hidden;
  padding: clamp(8px, .9vw, 16px);
}

.topbar {
  grid-template-columns: minmax(170px, .28fr) minmax(300px, 1fr) auto;
  gap: clamp(8px, .8vw, 14px);
}

.content-workspace {
  height: 100%;
  overflow: hidden;
  grid-template-columns: minmax(0, 1.4fr) minmax(430px, .6fr);
  gap: clamp(8px, .9vw, 14px);
}

.catalog-pane,
.watch-pane {
  overflow: hidden;
}

.catalog-grid,
.categories,
.zz-grid-wrap,
.overview-card,
.settings-card {
  min-width: 0;
  overflow: auto;
}

.catalog-grid.media-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.channel-card,
.media-card {
  min-width: 0;
  width: auto;
}

.media-card .poster,
.media-card-poster {
  aspect-ratio: 2 / 3;
  width: 100%;
}

.stage,
.watch-panel,
.detail-panel,
.overview-card {
  min-width: 0;
  max-height: calc(var(--safe-vh) - 90px);
}

body.zz-not-authenticated {
  overflow: hidden;
}

body.zz-not-authenticated .app-shell {
  width: 100%;
  height: var(--safe-vh);
  max-height: var(--safe-vh);
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  padding: clamp(10px, 2vh, 24px);
  overflow: auto;
}

body.zz-not-authenticated .sidebar {
  width: min(92vw, 760px);
  max-width: 760px;
  height: auto;
  max-height: calc(var(--safe-vh) - clamp(20px, 4vh, 48px));
  display: grid;
  grid-template-rows: auto auto auto auto;
  gap: clamp(8px, 1.4vh, 14px);
  padding: clamp(14px, 2.1vh, 24px);
  overflow: auto;
  border-radius: clamp(14px, 2vw, 24px);
}

body.zz-not-authenticated .brand {
  min-height: 0;
  justify-content: center;
  padding: 0;
}

body.zz-not-authenticated .brand .brand-full-logo {
  width: min(78vw, 520px) !important;
  max-height: clamp(70px, 13vh, 132px);
  object-fit: contain;
  object-position: center;
}

/* Repair 9: movie browser/detail readability only. Keep the locked layout, fix clipping. */
body[data-content-mode="movies"] .catalog-grid.media-grid {
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)) !important;
  align-items: start !important;
  align-content: start !important;
  gap: 14px !important;
  padding-right: 8px !important;
}

body[data-content-mode="movies"] .catalog-grid.media-grid .channel-card.media-card {
  display: grid !important;
  grid-template-rows: auto auto auto auto !important;
  align-content: start !important;
  gap: 9px !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 12px !important;
  overflow: hidden !important;
}

body[data-content-mode="movies"] .catalog-grid.media-grid .channel-card.media-card .poster,
body[data-content-mode="movies"] .catalog-grid.media-grid .channel-card.media-card .media-poster {
  width: 100% !important;
  max-height: 280px !important;
  aspect-ratio: 2 / 3 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  background: rgba(0, 0, 0, .34) !important;
}

body[data-content-mode="movies"] .catalog-grid.media-grid .channel-card.media-card .poster img,
body[data-content-mode="movies"] .catalog-grid.media-grid .channel-card.media-card .media-poster img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
}

body[data-content-mode="movies"] .catalog-grid.media-grid .channel-card.media-card .media-title {
  display: -webkit-box !important;
  min-height: 42px !important;
  max-height: 46px !important;
  overflow: hidden !important;
  color: #f7fbff !important;
  font-size: 15px !important;
  line-height: 1.18 !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
}

body[data-content-mode="movies"] .catalog-grid.media-grid .channel-card.media-card .media-card-meta {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  min-height: 22px !important;
  color: #f7c948 !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}

body[data-content-mode="movies"] .catalog-grid.media-grid .channel-card.media-card .media-card-meta em {
  min-width: 0 !important;
  overflow: hidden !important;
  color: #d4e8f8 !important;
  font-style: normal !important;
  text-overflow: ellipsis !important;
}

body[data-content-mode="movies"] .catalog-grid.media-grid .channel-card.media-card .media-card-overview {
  display: -webkit-box !important;
  min-height: 48px !important;
  max-height: 52px !important;
  overflow: hidden !important;
  color: #b9d4e8 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
}

body[data-content-mode="movies"] .watch-pane {
  grid-template-rows: minmax(260px, min(34vh, 380px)) auto minmax(360px, auto) !important;
  overflow: auto !important;
}

body[data-content-mode="movies"] .overview-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-content: start !important;
  width: 100% !important;
  min-height: 360px !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 18px 20px 22px !important;
}

body[data-content-mode="movies"] #overviewTitle {
  max-width: 100% !important;
  font-size: clamp(28px, 2.15vw, 42px) !important;
  line-height: 1.08 !important;
}

body[data-content-mode="movies"] .media-detail-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-bottom: 2px !important;
}

body[data-content-mode="movies"] .media-detail-meta span,
body[data-content-mode="movies"] .media-stars {
  min-height: 28px !important;
  max-width: 100% !important;
  padding: 6px 10px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
}

body[data-content-mode="movies"] .media-continuity-panel {
  display: grid !important;
  grid-template-columns: minmax(112px, 150px) minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 16px !important;
  margin: 8px 0 0 !important;
}

body[data-content-mode="movies"] .media-art-card {
  width: 100% !important;
  max-height: none !important;
  aspect-ratio: 2 / 3 !important;
  overflow: hidden !important;
}

body[data-content-mode="movies"] .media-art-card img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

body[data-content-mode="movies"] .media-continuity-copy {
  min-width: 0 !important;
}

body[data-content-mode="movies"] .media-fact-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

body[data-content-mode="movies"] #overviewText {
  max-width: 76ch !important;
  color: #f4fbff !important;
  font-size: 16px !important;
  line-height: 1.5 !important;
}

body[data-content-mode="movies"] .media-detail-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  margin-top: 8px !important;
}

body[data-content-mode="movies"] .media-detail-actions button {
  min-width: 132px !important;
  height: 44px !important;
  padding: 0 18px !important;
}

body.zz-not-authenticated .login-intro {
  max-height: min(22vh, 150px);
}

body.zz-not-authenticated .login-card {
  gap: clamp(8px, 1.2vh, 12px);
  padding: clamp(12px, 1.8vh, 18px);
  overflow: visible;
}

body.zz-not-authenticated .form-row {
  grid-template-columns: clamp(44px, 7vw, 62px) minmax(0, 1fr);
  gap: clamp(8px, 1vw, 14px);
}

body.zz-not-authenticated .login-card input {
  min-height: clamp(40px, 5.2vh, 48px);
  font-size: clamp(15px, 1.1vw, 17px);
}

body.zz-not-authenticated .primary-button {
  min-height: clamp(44px, 5.5vh, 52px);
}

body.zz-not-authenticated .login-card p {
  min-height: 0;
  line-height: 1.3;
}

body.zz-not-authenticated .login-downloads {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(8px, .9vw, 12px);
}

body.zz-not-authenticated .login-download-card {
  min-height: clamp(84px, 12vh, 128px);
  padding: clamp(10px, 1.5vh, 14px);
  border-radius: clamp(10px, 1.5vw, 16px);
}

body.zz-not-authenticated .download-icon {
  width: clamp(38px, 5vh, 56px);
  height: clamp(38px, 5vh, 56px);
  font-size: clamp(26px, 4vh, 42px);
}

body.zz-not-authenticated .login-download-card strong {
  font-size: clamp(14px, 1vw, 17px);
}

body.zz-not-authenticated .login-download-card em,
body.zz-not-authenticated .login-download-card small {
  font-size: clamp(10px, .8vw, 12px);
}

@media (max-height: 850px) {
  body.zz-not-authenticated .app-shell {
    align-items: start;
    padding: 10px;
  }

  body.zz-not-authenticated .sidebar {
    width: min(94vw, 680px);
    gap: 10px;
    padding: 14px;
    max-height: calc(var(--safe-vh) - 20px);
  }

  body.zz-not-authenticated .brand .brand-full-logo {
    max-height: 70px;
  }

  body.zz-not-authenticated .login-intro {
    display: none !important;
  }

  body.zz-not-authenticated .login-card {
    gap: 9px;
    padding: 14px;
  }

  body.zz-not-authenticated .login-card input {
    min-height: 42px;
  }

  body.zz-not-authenticated .primary-button {
    min-height: 46px;
  }

  body.zz-not-authenticated .login-download-card {
    min-height: 74px;
  }

  body.zz-not-authenticated .download-icon {
    width: 34px;
    height: 34px;
    font-size: 24px;
  }
}

@media (max-height: 740px) {
  body.zz-not-authenticated .login-downloads {
    display: none;
  }

  body.zz-not-authenticated .sidebar {
    max-height: calc(var(--safe-vh) - 16px);
  }
}

@media (max-width: 1600px) {
  .app-shell {
    grid-template-columns: clamp(190px, 13vw, 230px) minmax(0, 1fr);
  }

  .sidebar {
    padding: 10px 8px;
  }

  .topbar {
    grid-template-columns: minmax(150px, .24fr) minmax(260px, 1fr) auto;
  }

  #modeTitle,
  .title-block h1 {
    font-size: clamp(30px, 2.5vw, 46px);
  }

  .top-actions select,
  .top-actions button,
  .top-actions #fullButton,
  .top-actions #settingsButton,
  .top-actions #muteButton,
  .top-actions #remoteButton,
  .top-actions #holdBufferButton {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    min-width: 72px;
    padding: 0 10px !important;
    font-size: 12px !important;
    line-height: 40px !important;
  }

  .top-actions #engineSelect {
    width: 108px;
  }

  .top-actions #bufferModeSelect {
    width: 132px;
  }

  .content-workspace {
    grid-template-columns: minmax(0, 1.4fr) minmax(400px, .6fr);
  }

  .catalog-grid.media-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
  }
}

@media (max-width: 1366px) {
  .app-shell {
    grid-template-columns: clamp(240px, 22vw, 320px) minmax(0, 1fr);
  }

  .content-workspace {
    grid-template-columns: minmax(0, 1.4fr) minmax(360px, .6fr);
  }

  .status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    grid-template-columns: 1fr;
  }

  .top-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  }

  .stage {
    max-height: 32vh;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    max-height: 38vh;
    overflow: auto;
  }

  .player-area {
    height: auto;
    min-height: 0;
    overflow: auto;
  }

  .content-workspace {
    grid-template-columns: 1fr;
  }

  .watch-pane,
  .overview-card {
    width: 100% !important;
    justify-self: stretch !important;
  }
}

body.zz-qa-viewport::before {
  content: "Viewport: " attr(data-viewport) " DPR " attr(data-dpr) " " attr(data-breakpoint);
  position: fixed;
  right: 10px;
  bottom: 10px;
  z-index: 9999;
  border: 1px solid rgba(34, 244, 255, .48);
  border-radius: 8px;
  padding: 6px 8px;
  color: #dff8ff;
  background: rgba(1, 9, 18, .86);
  font: 700 12px/1.2 ui-sans-serif, system-ui, sans-serif;
  pointer-events: none;
}

/* Box Sets progressive disclosure: summary first, explorer on demand. */
body[data-content-mode="series"] .series-episode-panel {
  display: grid;
  gap: 14px;
  margin-top: 12px;
  min-width: 0;
}

body[data-content-mode="series"] .series-episode-panel.hidden {
  display: none;
}

body[data-content-mode="series"] .series-summary-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(0, 216, 255, .34);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(0, 216, 255, .10), rgba(0, 6, 18, .78)),
    rgba(2, 16, 34, .92);
}

body[data-content-mode="series"] .series-summary-strip span,
body[data-content-mode="series"] .series-panel-head span,
body[data-content-mode="series"] .episode-detail-copy > span {
  display: block;
  color: #25f3ff;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

body[data-content-mode="series"] .series-summary-strip strong,
body[data-content-mode="series"] .series-panel-head strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: #f6fbff;
  font-size: 17px;
  line-height: 1.2;
}

body[data-content-mode="series"] .series-summary-strip button,
body[data-content-mode="series"] .series-panel-head button,
body[data-content-mode="series"] .episode-play-button {
  min-height: 42px;
  border: 1px solid rgba(0, 216, 255, .62);
  border-radius: 9px;
  padding: 0 15px;
  color: #06101b;
  background: linear-gradient(180deg, #22f4ff, #14b8ff);
  font-size: 14px;
  font-weight: 950;
}

body[data-content-mode="series"] .episode-next-up {
  min-height: 58px;
  border-color: rgba(247, 201, 72, .62);
  background:
    linear-gradient(135deg, rgba(247, 201, 72, .16), rgba(0, 216, 255, .10)),
    rgba(2, 14, 31, .92);
}

body[data-content-mode="series"] .episode-next-up em {
  background: linear-gradient(180deg, #ffe27a, #d89b17);
}

body[data-content-mode="series"] .series-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

body[data-content-mode="series"] .series-panel-head button {
  color: #dff8ff;
  background: rgba(2, 18, 38, .88);
}

body[data-content-mode="series"] .season-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

body[data-content-mode="series"] .season-tabs button {
  flex: 0 0 auto;
  min-height: 36px;
  border: 1px solid rgba(0, 216, 255, .34);
  border-radius: 999px;
  padding: 0 14px;
  color: #dff8ff;
  background: rgba(2, 17, 36, .86);
  font-weight: 950;
}

body[data-content-mode="series"] .season-tabs button.active {
  border-color: rgba(247, 201, 72, .76);
  color: #1b1200;
  background: linear-gradient(180deg, #ffe27a, #d89b17);
}

body[data-content-mode="series"] .episode-explorer-grid {
  display: grid;
  grid-template-columns: minmax(220px, .82fr) minmax(300px, 1.18fr);
  gap: 14px;
  min-height: 0;
  height: 330px;
  max-height: 330px;
  overflow: hidden;
}

body[data-content-mode="series"] .episode-list {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 8px;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding: 2px 4px 2px 0;
}

body[data-content-mode="series"] .episode-row {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 72px;
  padding: 10px;
  border: 1px solid rgba(0, 216, 255, .26);
  border-radius: 11px;
  color: #eaf8ff;
  background: rgba(2, 16, 34, .82);
  text-align: left;
}

body[data-content-mode="series"] .episode-row-play {
  align-self: center;
  justify-self: end;
  min-width: 70px;
  padding: 9px 14px;
  border: 1px solid rgba(245, 185, 66, .72);
  border-radius: 8px;
  color: #07111d;
  background: linear-gradient(180deg, #ffd56c, var(--zz-cta));
  box-shadow: var(--zz-cta-glow);
  font-weight: 950;
  text-align: center;
}

body[data-content-mode="series"] .episode-row.selected {
  border-color: #22f4ff;
  background:
    linear-gradient(135deg, rgba(0, 216, 255, .18), rgba(247, 201, 72, .08)),
    rgba(2, 20, 42, .96);
  box-shadow: inset 3px 0 0 #22f4ff, 0 0 20px rgba(0, 216, 255, .16);
}

body[data-content-mode="series"] .episode-index {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 9px;
  color: #08111d;
  background: linear-gradient(180deg, #22f4ff, #16b9ff);
  font-size: 12px;
  font-weight: 950;
}

body[data-content-mode="series"] .episode-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

body[data-content-mode="series"] .episode-copy strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #fff;
  font-size: 14px;
  line-height: 1.18;
  white-space: normal;
}

body[data-content-mode="series"] .episode-copy small {
  color: #a9cbe0;
  font-size: 12px;
  line-height: 1.25;
}

body[data-content-mode="series"] .episode-detail-card {
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: auto;
  display: grid;
  grid-template-rows: 112px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(0, 216, 255, .34);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(5, 27, 52, .95), rgba(1, 12, 28, .96)),
    radial-gradient(circle at 100% 0, rgba(0, 216, 255, .16), transparent 34%);
}

body[data-content-mode="series"] .episode-detail-art {
  overflow: hidden;
  display: grid;
  place-items: center;
  height: 112px;
  min-height: 112px;
  max-height: 112px;
  border: 1px solid rgba(0, 216, 255, .32);
  border-radius: 12px;
  color: #22f4ff;
  background: rgba(0, 6, 16, .78);
}

body[data-content-mode="series"] .episode-detail-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body[data-content-mode="series"] .episode-detail-copy {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  padding-right: 4px;
}

body[data-content-mode="series"] .episode-detail-copy h3 {
  margin: 0;
  overflow-wrap: anywhere;
  color: #fff;
  font-size: clamp(19px, 1.45vw, 26px);
  line-height: 1.08;
}

body[data-content-mode="series"] .episode-detail-copy p {
  margin: 0;
  overflow: auto;
  max-height: 132px;
  color: #e8f6ff;
  font-size: 15px;
  line-height: 1.48;
}

body[data-content-mode="series"] .episode-play-button {
  justify-self: start;
  min-width: 150px;
  margin-top: 0;
  color: #fff;
  background: linear-gradient(180deg, #ff244f, #c70835);
  box-shadow: 0 0 24px rgba(229, 9, 63, .28);
}

@media (max-width: 1480px) {
  body[data-content-mode="series"] .episode-explorer-grid {
    grid-template-columns: 1fr;
    max-height: none;
  }

  body[data-content-mode="series"] .episode-list {
    max-height: 260px;
  }
}

@media (max-width: 720px) {
  body[data-content-mode="series"] .series-summary-strip,
  body[data-content-mode="series"] .series-panel-head {
    grid-template-columns: 1fr;
  }
}

/* Sidebar ZappyZing logo: use the cropped full lockup, not the tiny canvas-fit version. */
body:not(.zz-not-authenticated) .brand {
  display: grid;
  place-items: center;
  min-height: clamp(78px, 9.8vh, 118px);
  overflow: hidden;
  border: 1px solid rgba(0, 216, 255, .50);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(0, 216, 255, .10), rgba(0, 7, 20, .86)),
    rgba(1, 9, 22, .94);
  box-shadow: 0 0 24px rgba(0, 216, 255, .18);
}

body:not(.zz-not-authenticated) .brand .brand-full-logo {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: cover;
  object-position: center;
  border-radius: 12px;
}

@media (max-width: 1600px), (max-height: 820px) {
  body:not(.zz-not-authenticated) .brand {
    min-height: 68px;
  }
}

/* Production control deck: one branded top-row language for status and actions. */
body:not(.zz-not-authenticated) .topbar {
  display: grid;
  grid-template-columns: minmax(560px, 1fr) max-content;
  gap: 8px;
  align-items: stretch;
  padding: 0;
  margin-bottom: 10px;
}

body:not(.zz-not-authenticated) .topbar .title-block {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

body:not(.zz-not-authenticated) .topbar::after {
  content: "";
  grid-column: 1 / -1;
  grid-row: 1;
  min-height: 72px;
  border: 1px solid rgba(0, 216, 255, .62);
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 50%, rgba(0, 216, 255, .16), transparent 18%),
    linear-gradient(180deg, rgba(0, 36, 70, .82), rgba(0, 12, 30, .96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .10),
    0 0 24px rgba(0, 216, 255, .20);
  pointer-events: none;
}

body:not(.zz-not-authenticated) .status-strip,
body:not(.zz-not-authenticated) .top-actions {
  grid-row: 1;
  z-index: 1;
  min-width: 0;
}

body:not(.zz-not-authenticated) .status-strip {
  grid-column: 1;
  display: grid;
  grid-template-columns:
    minmax(150px, 1.15fr)
    minmax(118px, .74fr)
    minmax(180px, 1.15fr)
    minmax(150px, .95fr);
  gap: 6px;
  padding: 6px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body:not(.zz-not-authenticated) .status-strip article {
  position: relative;
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 60px;
  padding: 10px 12px 10px 44px;
  border: 1px solid rgba(0, 216, 255, .58);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(7, 37, 73, .82), rgba(2, 16, 38, .96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .10),
    0 0 12px rgba(0, 216, 255, .10);
}

body:not(.zz-not-authenticated) .status-strip article::before,
body:not(.zz-not-authenticated) .top-actions button::before {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #22f4ff;
  font-size: 23px;
  line-height: 1;
  text-shadow: 0 0 14px rgba(34, 244, 255, .52);
}

body:not(.zz-not-authenticated) .status-strip article:nth-child(1)::before { content: "▷"; }
body:not(.zz-not-authenticated) .status-strip article:nth-child(2)::before { content: "▱"; }
body:not(.zz-not-authenticated) .status-strip article:nth-child(3)::before { content: "▦"; }
body:not(.zz-not-authenticated) .status-strip article:nth-child(4)::before { content: "◇"; }

body:not(.zz-not-authenticated) .status-strip span {
  min-width: 0;
  overflow: hidden;
  color: #22f4ff;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .04em;
  line-height: 1.1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

body:not(.zz-not-authenticated) .status-strip strong {
  min-width: 0;
  overflow: hidden;
  color: #f8fcff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.zz-not-authenticated) .top-actions {
  grid-column: 2;
  justify-self: end;
  display: grid;
  grid-template-columns: 96px 126px 82px 86px 78px 78px 76px 92px 84px 84px;
  gap: 6px;
  align-items: stretch;
  width: auto;
  max-width: none;
  padding: 6px;
}

body:not(.zz-not-authenticated) .top-actions select,
body:not(.zz-not-authenticated) .top-actions button,
body:not(.zz-not-authenticated) .top-actions #fullButton,
body:not(.zz-not-authenticated) .top-actions #settingsButton,
body:not(.zz-not-authenticated) .top-actions #muteButton,
body:not(.zz-not-authenticated) .top-actions #remoteButton,
body:not(.zz-not-authenticated) .top-actions #holdBufferButton {
  position: relative;
  box-sizing: border-box;
  width: 100% !important;
  min-width: 0 !important;
  height: 60px !important;
  min-height: 60px !important;
  max-height: 60px !important;
  margin: 0 !important;
  border: 1px solid rgba(0, 216, 255, .58) !important;
  border-radius: 10px !important;
  color: #f7fbff !important;
  background:
    linear-gradient(180deg, rgba(9, 42, 79, .86), rgba(2, 15, 36, .96)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .10),
    0 0 12px rgba(0, 216, 255, .10) !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  text-align: center !important;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .45) !important;
  white-space: nowrap;
}

body:not(.zz-not-authenticated) .top-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px 0 28px !important;
}

body:not(.zz-not-authenticated) .top-actions select {
  padding: 0 28px 0 14px !important;
  appearance: auto;
}

body:not(.zz-not-authenticated) .top-actions #engineSelect,
body:not(.zz-not-authenticated) .top-actions #bufferModeSelect {
  width: 100% !important;
}

body:not(.zz-not-authenticated) .top-actions #holdBufferButton::before { content: "⏱"; }
body:not(.zz-not-authenticated) .top-actions #saveButton::before { content: "▣"; }
body:not(.zz-not-authenticated) .top-actions #warmButton::before { content: "♨"; }
body:not(.zz-not-authenticated) .top-actions #retryButton::before { content: "↻"; }
body:not(.zz-not-authenticated) .top-actions #fullButton::before { content: "□"; }
body:not(.zz-not-authenticated) .top-actions #muteButton::before { content: "◔"; }
body:not(.zz-not-authenticated) .top-actions #remoteButton::before { content: "▥"; }
body:not(.zz-not-authenticated) .top-actions #settingsButton::before { content: "☰"; }

body:not(.zz-not-authenticated) .top-actions button::before {
  left: 9px;
  width: 16px;
  font-size: 16px;
  text-align: center;
}

body:not(.zz-not-authenticated) .top-actions select:hover,
body:not(.zz-not-authenticated) .top-actions button:hover,
body:not(.zz-not-authenticated) .top-actions select:focus-visible,
body:not(.zz-not-authenticated) .top-actions button:focus-visible {
  border-color: rgba(34, 244, 255, .92) !important;
  background:
    linear-gradient(180deg, rgba(14, 61, 111, .96), rgba(3, 21, 48, .98)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .14),
    0 0 22px rgba(34, 244, 255, .24) !important;
  outline: none;
}

body:not(.zz-not-authenticated) .top-actions #settingsButton {
  color: #001524 !important;
  border-color: rgba(34, 244, 255, .90) !important;
  background: linear-gradient(135deg, #1b82ff, #22f4ff) !important;
}

body:not(.zz-not-authenticated) .top-actions #settingsButton::before {
  color: #001524;
  text-shadow: none;
}

@media (max-width: 1500px) {
  body:not(.zz-not-authenticated) .topbar {
    grid-template-columns: 1fr;
  }

  body:not(.zz-not-authenticated) .topbar::after {
    grid-row: 1 / span 2;
  }

  body:not(.zz-not-authenticated) .status-strip {
    grid-column: 1;
    grid-row: 1;
    padding: 6px;
  }

  body:not(.zz-not-authenticated) .top-actions {
    grid-column: 1;
    grid-row: 2;
    justify-self: stretch;
    grid-template-columns: 96px 124px repeat(7, minmax(72px, 1fr));
    max-width: none;
  }

  body:not(.zz-not-authenticated) .top-actions #remoteButton {
    display: none;
  }
}

@media (max-width: 1260px) {
  body:not(.zz-not-authenticated) .status-strip {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    padding: 6px;
  }

  body:not(.zz-not-authenticated) .top-actions {
    grid-row: 2;
    justify-self: stretch;
    max-width: none;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* P0-2 final cascade enforcement for action colors only. Layout now lives in source rules above. */
:root {
  --zz-cta: #f5b942;
  --zz-cta-ink: #1a1200;
  --zz-cta-glow: 0 0 18px rgba(245, 185, 66, .35);
}

.primary-button,
.media-detail-actions button.primary,
#overviewPlayButton,
#guideWatchButton,
.zz-action-row button.primary,
body[data-content-mode="movies"] .media-detail-actions button.primary,
body[data-content-mode="series"] .media-detail-actions button.primary,
body[data-content-mode="series"] .series-summary-strip button,
body[data-content-mode="series"] .episode-play-button,
.quick-actions button[data-action="play"] {
  border-color: rgba(245, 185, 66, .72) !important;
  color: var(--zz-cta-ink) !important;
  background: linear-gradient(180deg, #ffd56c, var(--zz-cta)) !important;
  box-shadow: var(--zz-cta-glow) !important;
  text-shadow: none !important;
}

#overviewBouquetButton,
body[data-content-mode="movies"] #overviewBouquetButton,
body[data-content-mode="series"] #overviewBouquetButton,
.quick-actions button[data-action="bouquet"] {
  border-color: rgba(245, 185, 66, .72) !important;
  color: var(--zz-cta-ink) !important;
  background: linear-gradient(180deg, #ffe07e, var(--zz-cta)) !important;
  box-shadow: var(--zz-cta-glow) !important;
}

.media-detail-actions button:not(.primary):not(#overviewBouquetButton),
#overviewTrailerButton,
.series-panel-head button,
.season-tabs button,
.zz-action-row button:not(.primary),
.settings-card button,
.top-actions button,
.remote-actions button {
  border-color: rgba(180, 214, 236, .22) !important;
  color: #eef7ff !important;
  background: linear-gradient(180deg, rgba(7, 31, 58, .88), rgba(2, 13, 30, .96)) !important;
  box-shadow: none !important;
}

.top-actions #settingsButton,
body:not(.zz-not-authenticated) .top-actions #settingsButton {
  border-color: rgba(180, 214, 236, .28) !important;
  color: #eef7ff !important;
  background: linear-gradient(180deg, rgba(7, 31, 58, .88), rgba(2, 13, 30, .96)) !important;
  box-shadow: none !important;
}

.top-actions #settingsButton::before,
body:not(.zz-not-authenticated) .top-actions #settingsButton::before {
  color: #a9cbe0 !important;
  text-shadow: none !important;
}

.quick-actions.bouquet-actions button[data-bouquet-action^="delete"],
.quick-actions.bouquet-actions button[data-bouquet-action="remove-entry"] {
  border-color: rgba(255, 56, 100, .42) !important;
  color: #ffdce4 !important;
  background: linear-gradient(180deg, rgba(255, 56, 100, .24), rgba(80, 8, 26, .86)) !important;
  box-shadow: none !important;
}
/* Hotfix 51 EOF guard: identical watch sizing across Live TV, Movies, and Box Sets. */
body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .content-workspace {
  grid-template-columns: minmax(520px, 1fr) minmax(720px, 1.05fr) !important;
  align-items: stretch !important;
  gap: 14px !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .watch-pane {
  display: grid !important;
  grid-template-rows: minmax(430px, 54vh) auto minmax(280px, 1fr) !important;
  gap: 14px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  align-self: stretch !important;
  overflow: hidden !important;
}

body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .stage {
  width: 100% !important;
  height: 100% !important;
  min-height: 430px !important;
  max-height: none !important;
  aspect-ratio: 16 / 9;
  align-self: stretch !important;
}

body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) #video {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .overview-card {
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 280px !important;
  max-height: none !important;
  justify-self: stretch !important;
  align-self: stretch !important;
  overflow: auto !important;
}

body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .status-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

@media (max-width: 1320px) {
  body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .content-workspace {
    grid-template-columns: 1fr !important;
    overflow: visible !important;
  }

  body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .watch-pane {
    grid-template-rows: minmax(360px, 52vh) auto minmax(240px, auto) !important;
    overflow: visible !important;
  }

  body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .stage {
    min-height: 360px !important;
  }
}

@media (max-width: 780px) {
  body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .watch-pane {
    grid-template-rows: minmax(240px, 42vh) auto minmax(220px, auto) !important;
  }

  body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .stage {
    min-height: 240px !important;
  }

  body:not(.zz-not-authenticated):is([data-content-mode="live"], [data-content-mode="movies"], [data-content-mode="series"]) .status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
