/* IPTVPlayer. A dark, quiet theme: deep background with a little light from the
   top, glass only where it sits over video, one accent. Sizes scale with the
   viewport so the same layout reads at ten feet and on a desk. */

:root {
  --bg: #0c0918;
  --surface: rgba(18, 23, 32, 0.78);
  --surface-solid: #161126;
  --surface-2: rgba(30, 37, 51, 0.72);
  --surface-3: #251d39;
  --hover: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #eef2f7;
  --muted: #8b96a8;
  --faint: #5d6779;
  --accent: #b68cff;
  --accent-2: #65c9ff;
  --accent-ink: #1b0b2b;
  --accent-soft: rgba(182, 140, 255, 0.13);
  --warn: #ffb547;
  --danger: #ff6b5a;
  --live: #ff4d5e;
  --radius: 14px;
  --ring: 0 0 0 2px var(--accent), 0 0 0 6px rgba(53, 214, 193, 0.16);
  font-size: clamp(13px, 1.05vw, 24px);
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  font-family: "Segoe UI Variable Text", "Segoe UI", Inter, "SF Pro Text", system-ui, -apple-system, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* Scroll bars: thin and quiet on the dark theme, a little brighter over the list in use.
   (The ::-webkit-scrollbar rules are for older WebViews; current engines use scrollbar-color.) */

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}
.vlist:hover, .vlist.active, .guide-grid:hover, .settings:hover, .results:hover, .progs:hover, .series-detail:hover, .side-panel:hover, .group-list:hover {
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.32);
}

/* Inner scroll areas keep their scrolling to themselves (no chaining to the page). */

.settings, .results, .progs, .series-detail, .group-list, .track-menu, .archive-panel, .layer {
  overscroll-behavior: contain;
}

/* Native engines draw video in a window behind the page. Only once the current stream's
   first frame is on screen (picture-on) is the page itself see-through; the backdrop then
   paints everything except the picture. Before that, and on errors, all stays opaque. */

html.native-video.picture-on, html.native-video.picture-on body {
  background: transparent;
}
html.native-video:not(.overlay-test) .video {
  display: none !important;
}

/* The overlay test (?overlay-test): the video element plays the native window behind the page. */

html.overlay-test .video {
  z-index: -2;
  background: transparent;
  border-radius: 0;
}
#root, .app {
  height: 100%;
}
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(1100px 560px at 10% -12%, rgba(53, 214, 193, 0.10), transparent 62%),
    radial-gradient(900px 520px at 98% -6%, rgba(91, 140, 255, 0.11), transparent 60%),
    linear-gradient(180deg, #121025 0%, #0c0918 65%);
}
.backdrop.open {
  display: none;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.82rem;
}
.accent {
  color: var(--accent);
}
.error {
  color: var(--warn);
}
.note {
  color: var(--accent);
}
.hidden {
  visibility: hidden;
}
.spacer {
  flex: 1;
}
.link {
  color: var(--accent);
}
h1, h2 {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.01em;
}
h1 {
  font-size: 1.9rem;
}
.icon {
  flex: none;
  display: block;
}
p .icon, .muted .icon {
  display: inline-block;
  vertical-align: -0.15em;
}
.video {
  position: fixed;
  display: none;
  z-index: 0;
  background: #000;
  object-fit: contain;
  border-radius: 12px;
}
.panel {
  position: relative;
  z-index: 2;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(20px) saturate(140%);
}

/* Controls */

input, select, textarea {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  font: inherit;
  font-size: 1rem;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(53, 214, 193, 0.14);
}
button {
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.62rem 1.05rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.12s;
}
button:hover {
  background: #222b3c;
  border-color: var(--line-strong);
}
button:active {
  transform: scale(0.98);
}
button:focus {
  outline: none;
}
button:focus-visible {
  box-shadow: var(--ring);
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button.primary, button[type="submit"] {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 650;
}
button.primary:hover, button[type="submit"]:hover {
  background: #4fe3cf;
}
button.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #1a0502;
  font-weight: 650;
}
button.danger-outline {
  color: #ff9a85;
}
button.focus {
  box-shadow: var(--ring);
}
.buttons {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.55rem 1.05rem;
  background: var(--surface-2);
}
.pill.primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.pill.ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}
.pill.focus {
  box-shadow: var(--ring);
}
.icon-btn {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.icon-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}
.icon-btn.small {
  width: 2.1rem;
  height: 2.1rem;
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.icon-btn.small:hover {
  color: var(--text);
  background: var(--hover);
}
.icon-btn.big {
  width: 3.7rem;
  height: 3.7rem;
  background: #fff;
  color: #05070a;
  border: none;
}
.icon-btn.big:hover {
  background: #e7ecf3;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}
.tag.on {
  color: var(--accent-ink);
  background: var(--accent);
}
.tag.catchup {
  color: var(--accent);
  background: var(--accent-soft);
}
.badge {
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  border-radius: 6px;
  padding: 0.25rem 0.55rem;
}
.badge.live {
  background: var(--live);
  color: #fff;
}
.badge.catchup {
  background: var(--accent);
  color: var(--accent-ink);
}

/* Logos and posters */

/* The logo is laid out inside fixed bounds: it scales down to fit and is never cut. */

.logo {
  position: relative;
  width: 3rem;
  height: 2.2rem;
  flex: none;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  place-items: center;
}
.logo img {
  position: absolute;
  inset: 0.2rem;
  width: calc(100% - 0.4rem);
  height: calc(100% - 0.4rem);
  object-fit: contain;
  border-radius: 4px;
}
.logo.big {
  width: 4.4rem;
  height: 3.2rem;
  border-radius: 12px;
}
.logo.thumb {
  width: 2.4rem;
  height: 3.4rem;
  border-radius: 7px;
}
.logo.thumb {
  overflow: hidden;
}
.logo.thumb img {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}
.logo.pl-logo {
  width: 4rem;
  height: 2.9rem;
  background: rgba(255, 255, 255, 0.1);
}
.logo-initials {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* Start: accounts, forms, loading */

.setup, .accounts {
  width: min(46rem, 94vw);
  margin: 7vh auto 2vh;
  padding: 2rem;
  display: grid;
  gap: 0.95rem;
  max-height: 86vh;
  overflow-y: auto;
}
.setup {
  width: min(36rem, 94vw);
}
.setup label {
  display: grid;
  gap: 0.35rem;
}
.setup label span {
  color: var(--muted);
  font-size: 0.85rem;
}
.account-list {
  display: grid;
  gap: 0.55rem;
}
.account {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.5rem;
  align-items: stretch;
}
.account-open {
  display: grid;
  gap: 0.2rem;
  text-align: left;
  padding: 0.85rem 1.1rem;
  min-width: 0;
  border-radius: 14px;
  background: var(--surface-2);
}
.account-open .name {
  font-size: 1.08rem;
}
.account-open .small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account.active .account-open {
  border-color: rgba(53, 214, 193, 0.5);
}
.account-open:focus {
  background: var(--accent);
  color: var(--accent-ink);
}
.account-open:focus .muted {
  color: var(--accent-ink);
}
.loading {
  width: min(40rem, 94vw);
  margin: 10vh auto;
  padding: 1.6rem 2rem;
}
.boot-failed {
  display: grid;
  gap: 0.9rem;
}
.newer-data .choices {
  display: grid;
  gap: 0.6rem;
}
.newer-data .choice {
  display: grid;
  gap: 0.25rem;
  text-align: left;
  padding: 0.8rem 1rem;
}
.step {
  display: grid;
  grid-template-columns: 1fr 6rem 6rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
}
.step span:not(:first-child) {
  text-align: right;
  color: var(--muted);
}
.testresult {
  width: min(60rem, 94vw);
  margin: 0 auto 4vh;
  padding: 1rem 1.4rem;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Main frame and top bar */

.main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.tabs {
  display: flex;
  gap: 0.3rem;
  align-items: center;
  padding: 0.9rem 2vw 0.8rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-right: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand-mark {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #03161b;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 16px rgba(53, 214, 193, 0.25);
}
.tabs > .tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  white-space: nowrap;
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
}
.tabs > .tab:hover {
  color: var(--text);
  background: var(--hover);
}
.tabs > .tab.selected {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--line);
}
.tabs > .tab.focus {
  background: var(--accent);
  color: var(--accent-ink);
}
.nowplaying {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-right: 0.4rem;
}
.nowplaying .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 8px var(--live);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

.clock {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  padding: 0 0.6rem;
  font-size: 0.92rem;
}
.refresh-btn {
  margin-left: 0.2rem;
}
.refresh-btn:disabled {
  opacity: 1;
  color: var(--accent);
  cursor: progress;
}
.refresh-btn.spinning .icon {
  animation: spin 0.9s linear infinite;
}

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

.icon-btn.small.focus, .account-switch.focus {
  box-shadow: var(--ring);
  color: var(--text);
}
.toast {
  position: absolute;
  top: 4.2rem;
  right: 2vw;
  z-index: 3;
  max-width: min(34rem, 90vw);
  padding: 0.6rem 0.95rem;
  border-radius: 12px;
  background: rgba(16, 22, 30, 0.92);
  border: 1px solid rgba(53, 214, 193, 0.35);
  color: var(--text);
  font-size: 0.86rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  cursor: pointer;
  animation: toast-in 0.25s ease-out;
}
.toast.warn {
  border-color: rgba(255, 181, 71, 0.45);
  color: #ffd9a0;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  padding: 0.18rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.account-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  padding: 0.15rem 0.6rem 0.15rem 0.15rem;
  border-radius: 999px;
}
.account-switch:hover {
  background: var(--hover);
}
.avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 750;
  font-size: 0.8rem;
  color: #03161b;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.account-name {
  white-space: nowrap;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.92rem;
}
.view {
  flex: 1;
  min-height: 0;
  padding: 0 2vw 1.4rem;
}
.notice-bar {
  margin: 0 2vw 0.6rem;
  padding: 0.6rem 0.95rem;
  border-radius: 12px;
  background: rgba(255, 181, 71, 0.08);
  border: 1px solid rgba(255, 181, 71, 0.3);
  color: var(--warn);
  font-size: 0.88rem;
  cursor: pointer;
}

/* Three columns: groups | items | detail. Narrow windows: picture, group button, list. */

.browser {
  display: grid;
  grid-template-columns: 17vw 1fr 38vw;
  gap: 1vw;
  height: 100%;
}
.browser.narrow {
  grid-template-columns: 1fr;
  grid-template-rows: auto auto 1fr;
  gap: 0.5rem;
}
.browser.narrow .detail {
  order: -1;
  overflow: visible;
}
.browser.narrow .detail .preview-box {
  width: min(100%, calc(34vh * 16 / 9));
  margin: 0 auto;
}
.cats-button .pill {
  width: 100%;
  justify-content: space-between;
  padding: 0.6rem 1rem;
}
.cats-button .pill .name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.group-picker .group-list.cats {
  height: min(60vh, 32rem);
  display: flex;
  flex-direction: column;
  border: none;
  background: transparent;
}
.col {
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.cats, .items {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.page-error {
  margin: 0.5rem;
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
  font-size: 0.82rem;
  color: var(--warn);
  background: rgba(40, 20, 0, 0.6);
  border: 1px solid rgba(255, 181, 71, 0.3);
  text-align: left;
  cursor: pointer;
  flex: none;
}
.detail {
  overflow: hidden;
}
.empty {
  padding: 1rem;
}
.vlist {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;

  /* Scrolled on the compositor even over the see-through background. */

  will-change: scroll-position;
}
.vlist-inner {
  position: relative;
  width: 100%;
}
.vrow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  contain: strict;
  cursor: pointer;
}
.skeleton {
  pointer-events: none;
}
.sk {
  display: block;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05));
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

.sk-logo {
  width: 3rem;
  height: 2.2rem;
  border-radius: 9px;
}
.sk-thumb {
  width: 2.4rem;
  height: 3.4rem;
  border-radius: 7px;
}
.sk-line {
  height: 0.8rem;
  width: 70%;
  margin: 0.25rem 0;
}
.sk-line.short {
  width: 40%;
}
.poster-empty {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #1b2434, #0f141d);
  color: var(--faint);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 1rem;
  color: var(--muted);
  position: relative;
  font-size: 0.95rem;
}
.cat .name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cat .count {
  font-size: 0.72rem;
  color: var(--faint);
}
.cat:hover {
  color: var(--text);
  background: var(--hover);
}
.cat.selected {
  color: var(--text);
  font-weight: 600;
}
.cat.selected::before {
  content: "";
  position: absolute;
  left: 0;
  top: 25%;
  bottom: 25%;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
}
.cat.focus {
  background: var(--accent);
  color: var(--accent-ink);
}
.cat.focus .count {
  color: var(--accent-ink);
}
.ch, .vod {
  display: grid;
  align-items: center;
  gap: 0.75rem;
  height: 100%;
  padding: 0 0.9rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.ch {
  grid-template-columns: 2.1rem auto 1fr auto;
}
.vod {
  grid-template-columns: auto 1fr auto;
}
.ch:hover, .vod:hover {
  background: var(--hover);
}
.ch .num {
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-size: 0.85rem;
}
.name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 580;
}
.chmain {
  min-width: 0;
}
.ch .now {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: pre;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.1rem;
}
.bar, .seekbar {
  height: 3px;
  background: rgba(255, 255, 255, 0.09);
  border-radius: 3px;
  margin-top: 5px;
  overflow: hidden;
}
.bar div, .seekbar div {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #6fe9d8);
  border-radius: 3px;
}
.row-tags {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.fav-mark {
  color: #ffd166;
}
.ch.playing .name {
  color: var(--accent);
}
.ch.playing::after {
  content: "";
  position: absolute;
  right: 0.4rem;
  top: 0.5rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 8px var(--live);
}
.ch.focus, .vod.focus {
  background: linear-gradient(90deg, rgba(53, 214, 193, 0.16), rgba(53, 214, 193, 0.04));
}
.ch.focus::before, .vod.focus::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  bottom: 18%;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
}
.meta {
  color: var(--muted);
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Detail column */

.preview-box {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 16px;
  background: #000;
  flex: none;
  cursor: pointer;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 0 1px var(--line);
  overflow: hidden;
}
html.picture-on .preview-box {
  background: transparent;
}

/* The stream's state where its picture goes: opening, buffering over the last picture, failed. */

.play-status {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.6rem;
  padding: 1rem;
  text-align: center;
  color: #d7dde6;
  font-size: 0.88rem;
  background: radial-gradient(circle at 50% 45%, #121a26, #05070a 75%);
  pointer-events: none;
}
.play-status.over {
  background: rgba(5, 7, 10, 0.35);
  animation: play-status-in 0.15s ease 0.35s both;
}

/* Over a picture the panel waits a moment: a seek inside the buffer never flashes it. */

@keyframes play-status-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.play-status.failed {
  pointer-events: auto;
  background: radial-gradient(circle at 50% 45%, #1a1410, #06070a 75%);
}
.play-status.big {
  position: fixed;
  z-index: 2;
  font-size: 1rem;
  gap: 0.9rem;
}
.player-layer .play-status.big {
  z-index: 0;
}
.spinner {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
.play-status.big .spinner {
  width: 3.4rem;
  height: 3.4rem;
  border-width: 4px;
}

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

.play-status-text {
  letter-spacing: 0.01em;
}
.play-status .dots {
  display: inline-block;
  width: 1.2em;
  text-align: left;
}
.play-status-message {
  margin: 0;
  max-width: 34rem;
  line-height: 1.45;
  color: #f0d6b8;
}
.play-status:not(.big) .play-status-message {
  font-size: 0.8rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.play-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.play-status:not(.big) .play-status-actions .pill {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: pulse 1.6s ease-in-out infinite;
    border-top-color: rgba(255, 255, 255, 0.14);
    background: rgba(53, 214, 193, 0.18);
  }

  @keyframes pulse {
    50% {
      opacity: 0.45;
    }
  }
}

/* The next episode, offered at the end of one. */

.up-next {
  position: absolute;
  right: 2.5vw;
  bottom: 9rem;
  z-index: 4;
  width: min(24rem, 92vw);
  padding: 1rem 1.2rem;
  border-radius: 16px;
  background: rgba(12, 15, 21, 0.94);
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  display: grid;
  gap: 0.4rem;
}
.up-next-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.up-next-title {
  font-size: 1.05rem;
  font-weight: 640;
  line-height: 1.3;
}
.up-next-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.3rem;
}
.preview-idle {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
  background: radial-gradient(circle at 50% 40%, rgba(53, 214, 193, 0.10), transparent 60%), #05070a;
}
.preview-hint {
  position: absolute;
  right: 0.6rem;
  top: 0.6rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.2s;
}
.preview-box:hover .preview-hint {
  opacity: 1;
}
.detail-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0.9rem 0 0.5rem;
}
.detail-titles {
  min-width: 0;
}
.title {
  font-size: 1.35rem;
  margin: 0.6rem 0 0.35rem;
}
.detail-head .title {
  margin: 0 0 0.15rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word;
}
.now-card {
  padding: 0.75rem 0.95rem;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  margin-bottom: 0.7rem;
}
.now-title {
  font-weight: 620;
  margin-bottom: 0.15rem;
}
.detail-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}
.progs {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: 0.3rem;
  scrollbar-width: thin;
}
.day-head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.55rem 0.55rem 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  background: linear-gradient(180deg, var(--bg) 70%, transparent);
}
.prog {
  display: grid;
  grid-template-columns: minmax(3.4rem, auto) 1fr auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  cursor: pointer;
}
.prog:hover {
  background: var(--hover);
}
.prog.past {
  color: var(--muted);
}
.prog.past:not(.playable) {
  color: var(--faint);
  cursor: default;
}
.prog.live .ptitle {
  color: var(--accent);
  font-weight: 620;
}
.prog .time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.88rem;
  white-space: nowrap;
}
.ptitle {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prog.focus {
  background: var(--surface-3);
  box-shadow: inset 3px 0 0 var(--accent);
}

/* A series: the whole column scrolls (head, story, seasons, episodes). */

.series-detail {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.series-head {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.series-head .title {
  margin: 0.1rem 0 0.15rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.series-actions {
  margin: 0.55rem 0 0;
}
.series-actions .pill.on {
  color: #ffd166;
}
.series-plot {
  margin: 0;
  max-height: 6.2em;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.season-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.35rem 0;
  background: linear-gradient(180deg, var(--bg) 75%, transparent);
}
.season-pill {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  background: var(--surface-2);
}
.season-pill.on {
  background: var(--surface-3);
  box-shadow: 0 0 0 1px var(--line-strong);
  color: var(--text);
  font-weight: 600;
}
.season-pill.focus {
  box-shadow: var(--ring);
}
.ep-list {
  display: grid;
  gap: 0.45rem;
  padding-bottom: 0.5rem;
}
.ep-card {
  display: grid;
  grid-template-columns: 2.2rem 1fr auto;
  gap: 0.7rem;
  align-items: start;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--line);
  position: relative;
}
.ep-card:hover {
  background: var(--hover);
  border-color: var(--line-strong);
}
.ep-card.focus {
  background: var(--surface-3);
  border-color: rgba(53, 214, 193, 0.45);
  box-shadow: inset 3px 0 0 var(--accent);
}
.ep-card.seen .ep-num, .ep-card.seen .ep-title {
  color: var(--muted);
}
.ep-num {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  text-align: right;
  line-height: 1.3;
}
.ep-card.next .ep-num {
  color: var(--accent);
}
.ep-main {
  min-width: 0;
  display: grid;
  gap: 0.25rem;
}
.ep-title-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  min-width: 0;
}
.ep-title {
  font-weight: 620;
  line-height: 1.3;
  min-width: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word;
}
.ep-len {
  color: var(--muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ep-seen {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 650;
  white-space: nowrap;
}
.ep-plot {
  margin: 0;
  color: #b9c2cf;
  font-size: 0.82rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ep-bar {
  margin-top: 0.15rem;
}
.ep-play {
  align-self: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  opacity: 0;
  transition: opacity 0.15s;
}
.ep-card:hover .ep-play, .ep-card.focus .ep-play {
  opacity: 1;
  color: var(--accent-ink);
  background: var(--accent);
}
.ep-card.skeleton {
  display: grid;
  gap: 0.4rem;
  cursor: default;
}
.movie-bar {
  max-width: 14rem;
  margin-top: 0.45rem;
}

/* Narrow windows: the detail sits above the list, so a long series scrolls inside a bounded area. */

.browser.narrow .series-detail {
  max-height: 48vh;
}
.poster-row {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
}
.poster {
  width: 9rem;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: var(--surface-3);
  flex: none;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}
.plot {
  line-height: 1.5;
  max-height: 30vh;
  overflow: hidden;
  color: #c9d1dd;
}

/* Search and settings */

.search-view {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  height: 100%;
  max-width: 70rem;
}
.search-input {
  font-size: 1.15rem;
  border-radius: 999px;
  padding: 0.85rem 1.3rem;
}
.results {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: 0.3rem;
}
.result {
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.result:hover {
  background: var(--hover);
}
.result.focus {
  background: var(--surface-3);
  box-shadow: inset 3px 0 0 var(--accent);
}
.settings {
  max-width: 58rem;
  overflow-y: auto;
  height: 100%;
  padding-right: 0.4rem;
}
.setting {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  margin-bottom: 0.2rem;
  background: var(--surface);
  border: 1px solid transparent;
}
.setting.action {
  cursor: pointer;
}
.setting:hover {
  border-color: var(--line);
}
.setting .value {
  color: var(--muted);
  text-align: right;
}
.setting.focus {
  background: var(--surface-3);
  border-color: rgba(53, 214, 193, 0.45);
}

/* The player over the whole window */

.player-layer {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.player-layer > * {
  transition: opacity 0.3s;
}

/* The controls fade out; the stream's state and the next-episode offer stay. */

.player-layer.idle {
  cursor: none;
}
.player-layer.idle > :not(.play-status):not(.up-next) {
  opacity: 0;
}
.pl-top {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.3rem 2.5vw 3.5rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.78), transparent);
}
.pl-titles {
  min-width: 0;
}
.pl-title {
  font-size: 1.55rem;
  font-weight: 680;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}
.pl-sub {
  color: #c3cbd8;
  font-size: 0.9rem;
  margin-top: 0.1rem;
}
.pl-bottom {
  padding: 4rem 2.5vw 1.6rem;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.5) 55%, transparent);
}
.pl-progress {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.9rem;
  align-items: center;
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  color: #d3d9e3;
  margin-bottom: 1rem;
}
.pl-progress .seekbar {
  height: 5px;
  margin: 0;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
}
.pl-progress .seekbar:hover {
  height: 7px;
}
.pl-progress .seekbar.live {
  cursor: default;
}
.pl-progress .seekbar.live div {
  background: var(--live);
}
.pl-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.pl-meta {
  color: #9aa5b6;
  font-size: 0.78rem;
}
.player-error {
  margin: 0 3vw;
  align-self: center;
  padding: 0.75rem 1.1rem;
  border-radius: 12px;
  background: rgba(40, 20, 0, 0.88);
  color: var(--warn);
  border: 1px solid rgba(255, 181, 71, 0.3);
}
.track-menu {
  position: fixed;
  right: 2.5vw;
  bottom: 9rem;
  width: min(26rem, 90vw);
  max-height: 50vh;
  overflow-y: auto;
  padding: 0.6rem;
  border-radius: 16px;
  background: rgba(12, 15, 21, 0.92);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(16px);
}
.menu-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 0.3rem 0.6rem 0.5rem;
}
.track {
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  cursor: pointer;
}
.track:hover {
  background: var(--hover);
}
.track.selected {
  color: var(--accent);
}
.track.focus {
  background: var(--surface-3);
}

/* Catch-up in the player: the timeline, winding, earlier programmes */

.seekbar.tv {
  position: relative;
  overflow: hidden;
}
.seekbar.tv.seekable {
  cursor: pointer;
}
.seekbar.tv .tv-available {
  position: absolute;
  inset: 0 auto 0 0;
  background: rgba(255, 255, 255, 0.28);
}
.seekbar.tv .tv-head {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--accent);
}
.seekbar.tv.live .tv-head {
  background: var(--live);
}
.pl-behind {
  font-size: 0.82rem;
  color: var(--accent);
  margin: -0.5rem 0 0.8rem;
}
.travel {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1.4rem;
  border-radius: 18px;
  background: rgba(8, 11, 16, 0.86);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(14px);
}
.travel-time {
  font-size: 1.35rem;
  font-weight: 680;
  font-variant-numeric: tabular-nums;
}
.archive-panel {
  position: fixed;
  right: 2.5vw;
  top: 6rem;
  bottom: 9rem;
  width: min(30rem, 92vw);
  overflow-y: auto;
  padding: 0.6rem;
  border-radius: 16px;
  background: rgba(12, 15, 21, 0.94);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(16px);
}
.archive-panel .day-head {
  background: linear-gradient(180deg, rgba(12, 15, 21, 0.98) 70%, transparent);
}

/* TV guide */

.guide {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 0.7rem;
  --grid-line: rgba(255, 255, 255, 0.035);
}
.guide-top {
  display: grid;
  grid-template-columns: 1fr minmax(15rem, 28vw);
  gap: 1.4rem;
  align-items: stretch;
}

/* The info's height never moves the grid: it takes the picture's height and cuts what does not fit. */

.guide-info {
  min-width: 0;
  padding-top: 0.2rem;
  contain: size;
  overflow: hidden;
}
.guide-info .title {
  font-size: 1.5rem;
  margin: 0.5rem 0 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.guide-info .plot {
  max-height: 4.6em;
  margin: 0.5rem 0 0;
}
.guide-info-ch {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.guide-status {
  margin-top: 0.45rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}
.guide-status.live {
  color: var(--live);
}
.guide-status.catchup {
  color: var(--accent);
}
.guide-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.guide-bar .pill {
  padding: 0.45rem 0.9rem;
  font-size: 0.88rem;
}
.guide-day {
  white-space: nowrap;
}
.zoom-seg {
  display: inline-flex;
  padding: 0.2rem;
  gap: 0.15rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.zoom-seg button {
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 0.32rem 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}
.zoom-seg button:hover {
  color: var(--text);
  background: var(--hover);
}
.zoom-seg button.on {
  background: var(--surface-3);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--line-strong);
}
.zoom-seg button.focus {
  box-shadow: var(--ring);
}

/* One scroll box for both directions; the ruler and the channel column are sticky inside it. */

.guide-grid {
  position: relative;
  flex: 1;
  min-height: 8rem;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  will-change: scroll-position;
}
.guide-canvas {
  position: relative;
}
.guide-ruler {
  position: sticky;
  top: 0;
  z-index: 4;
  height: var(--ruler-h);
  background: var(--surface-solid);
  border-bottom: 1px solid var(--line);
}
.guide-corner {
  position: sticky;
  left: 0;
  z-index: 2;
  width: var(--chan-w);
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  background: var(--surface-solid);
  border-right: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
}
.guide-ticks {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--chan-w);
  right: 0;
}
.tick {
  position: absolute;
  bottom: 0;
  height: 32%;
  border-left: 1px solid var(--line-strong);
}
.tick.major {
  top: 0;
  height: auto;
  display: flex;
  align-items: center;
  padding-left: 0.45rem;
  font-size: 0.76rem;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.tick.day {
  color: var(--text);
  font-weight: 650;
  border-left-color: rgba(255, 255, 255, 0.3);
}
.now-mark {
  position: absolute;
  bottom: 0;
  width: 2px;
  height: 55%;
  margin-left: -1px;
  background: var(--live);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(255, 77, 94, 0.7);
}
.now-mark::before {
  content: "";
  position: absolute;
  top: -4px;
  left: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
}
.guide-rows {
  position: relative;
}
.guide-row {
  position: absolute;
  left: 0;
  width: 100%;
  height: var(--row-h);
  display: flex;
  border-bottom: 1px solid var(--line);
}
.guide-ch {
  position: sticky;
  left: 0;
  z-index: 3;
  width: var(--chan-w);
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.6rem;
  background: var(--surface-solid);
  border-right: 1px solid var(--line);
  cursor: pointer;
  min-width: 0;
}
.guide-ch:hover {
  background: #151b26;
}
.guide-ch .gnum {
  color: var(--faint);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}
.guide-ch .gname {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word;
  font-size: 0.84rem;
  line-height: 1.18;
  font-weight: 560;
}
.guide-ch.playing .gname {
  color: var(--accent);
}
.guide-row.focus .guide-ch {
  background: var(--surface-3);
  box-shadow: inset 3px 0 0 var(--accent);
}
.guide-progs {
  position: relative;
  flex: 1;
  height: 100%;
}

/* A programme: left edge at its start, right edge at its end (less a small gap). */

.gp {
  --pad: 0.55rem;
  position: absolute;
  top: 3px;
  bottom: 3px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0 var(--pad);
  overflow: hidden;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.12s;
}

/* overflow: clip (not hidden) keeps the cell from becoming a scroll box, so its text can stay sticky in the guide. */

@supports (overflow: clip) {
  .gp {
    overflow: clip;
  }
}

.gp:hover {
  background: rgba(255, 255, 255, 0.09);
}
.gp.past {
  opacity: 0.42;
}
.gp.catchup {
  opacity: 0.85;
}
.gp.live {
  background: rgba(53, 214, 193, 0.11);
  border-color: rgba(53, 214, 193, 0.28);
}
.gp.live:hover {
  background: rgba(53, 214, 193, 0.17);
}
.gp.empty {
  background: transparent;
  border: none;
  color: var(--faint);
  font-size: 0.8rem;
  cursor: default;
}
.gp.focus {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  opacity: 1;
  box-shadow: 0 6px 22px rgba(53, 214, 193, 0.3);
  z-index: 1;
}
.gp.s {
  --pad: 0.3rem;
  border-radius: 7px;
}
.gp.xs {
  --pad: 0;
  border-radius: 4px;
}

/* The text sticks just right of the channel column while its programme scrolls under it. */

.gp-text {
  position: sticky;
  left: calc(var(--chan-w) + var(--pad));
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.gp-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word;
  font-weight: 580;
  font-size: 0.82rem;
  line-height: 1.14;
}
.gp-icon {
  display: inline-block;
  vertical-align: -0.1em;
  margin-right: 0.25rem;
}
.gp.s .gp-title {
  font-size: 0.74rem;
}

/* Little room (a short programme, or one mostly scrolled away): one line, cut with an ellipsis, never mid-word on two. */

.gp.tight .gp-title {
  display: block;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.gp.m .gp-title {
  font-size: 0.8rem;
}
.gp-time {
  font-size: 0.64rem;
  line-height: 1.15;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.gp.focus .gp-time {
  color: inherit;
  opacity: 0.7;
}
.now-seg {
  position: absolute;
  top: 0;
  bottom: -1px;
  width: 2px;
  margin-left: -1px;
  background: var(--live);
  box-shadow: 0 0 10px rgba(255, 77, 94, 0.5);
  z-index: 2;
  pointer-events: none;
}

/* The whole title, times and description of the programme under the mouse or the focus. */

.gp-card {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
  padding: 0.85rem 1rem 0.9rem;
  border-radius: 14px;
  background: rgba(14, 18, 26, 0.97);
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  animation: card-in 0.14s ease-out;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
}

.gp-card-ch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.8rem;
}
.gp-card-ch .logo {
  width: 2rem;
  height: 1.5rem;
}
.gp-card-title {
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.25;
  margin: 0.4rem 0 0.25rem;
  overflow-wrap: break-word;
}
.gp-card-time {
  color: var(--muted);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}
.gp-card-status {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}
.gp-card-status.live {
  color: var(--live);
}
.gp-card-status.catchup {
  color: var(--accent);
}
.gp-card .bar {
  margin-top: 0.45rem;
}
.gp-card-desc {
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #c9d1dd;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.group-picker {
  width: min(30rem, 92vw);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  padding: 1.3rem;
  gap: 0.7rem;
}
.group-list {
  overflow-y: auto;
  border-radius: 12px;
}
.group-list .cat {
  height: 2.7rem;
  border-radius: 10px;
  cursor: pointer;
}

/* Dialogs and full-window layers */

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}
.dialog {
  width: min(30rem, 92vw);
  padding: 1.5rem;
  display: grid;
  gap: 0.95rem;
}
.layer {
  position: fixed;
  inset: 0;
  z-index: 4;
  overflow-y: auto;
  background: var(--bg);
}
.feedback, .diagnostics {
  width: min(48rem, 94vw);
  margin: 4vh auto;
  padding: 1.7rem;
  display: grid;
  gap: 0.8rem;
}
.feedback label {
  display: grid;
  gap: 0.35rem;
}
.feedback label span, .feedback .label {
  color: var(--muted);
  font-size: 0.85rem;
}
.feedback label.check {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.6rem;
}
.feedback label.check input {
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.15rem;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.chips button {
  padding: 0.45rem 0.85rem;
  font-size: 0.9rem;
  border-radius: 999px;
}
.chips button.selected {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.preview {
  margin: 0;
  padding: 0.85rem;
  max-height: 50vh;
  overflow: auto;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--line);
  border-radius: 12px;
  font: 12px/1.45 ui-monospace, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}
.metrics {
  position: fixed;
  z-index: 5;
  top: 0.5rem;
  right: 0.5rem;
  max-width: 60vw;
  padding: 0.5rem 0.7rem;
  font: 12px/1.45 ui-monospace, Menlo, Consolas, monospace;
  background: rgba(0, 0, 0, 0.82);
  border-radius: 8px;
}

/* Phones and narrow windows: one column; the picture on top. */

@media (max-width: 760px), (orientation: portrait) and (max-width: 1000px) {
  :root {
    font-size: 15px;
  }
  .tabs {
    padding: 0.5rem;
    gap: 0.15rem;
  }
  .brand-name, .tab-label, .clock, .tabs .account-name {
    display: none;
  }
  .brand {
    margin-right: 0.4rem;
  }
  .tabs > .tab {
    padding: 0.5rem 0.65rem;
  }
  .view {
    padding: 0 0.5rem 0.5rem;
  }
  .browser:not(.live) .detail .plot, .browser:not(.live) .detail .muted.small {
    display: none;
  }
  .browser:not(.live) .detail .poster-row .poster {
    width: 4.5rem;
  }
  .live .detail .progs, .live .detail .now-card, .live .detail .detail-head, .live .detail > p.muted {
    display: none;
  }
  .live .detail .detail-buttons {
    margin: 0.5rem 0 0;
  }
  .poster {
    width: 5.5rem;
  }
  .ch {
    grid-template-columns: 1.6rem auto 1fr auto;
    gap: 0.5rem;
  }
  .guide-top {
    grid-template-columns: 1fr;
  }
  .guide-preview {
    order: -1;
    width: min(100%, calc(30vh * 16 / 9));
    margin: 0 auto;
  }
  .guide-info {
    height: 7.6rem;
  }
  .guide-info .plot {
    display: none;
  }
  .guide-info .title {
    font-size: 1.15rem;
    -webkit-line-clamp: 1;
  }
  .accounts, .feedback, .diagnostics, .setup {
    margin: 1rem auto;
    padding: 1.1rem;
  }
  .account {
    grid-template-columns: 1fr 1fr;
  }
  .account-open {
    grid-column: 1 / -1;
  }
  .pl-title {
    font-size: 1.15rem;
  }
  .pl-meta {
    display: none;
  }
}

/* Updates (Windows) and About */

.update-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 2.1rem;
  padding: 0 0.8rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(53, 214, 193, 0.35);
  font-weight: 600;
  font-size: 0.85rem;
}
.update-pill:hover {
  background: rgba(53, 214, 193, 0.22);
}
.update-pill.focus {
  box-shadow: var(--ring);
}
.update-dialog {
  width: min(36rem, calc(100vw - 2rem));
  display: grid;
  gap: 0.8rem;
}
.update-notes {
  max-height: 12rem;
  overflow: auto;
  white-space: pre-wrap;
  margin: 0;
  padding: 0.7rem 0.9rem;
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  font: inherit;
  font-size: 0.9rem;
}
.update-progress {
  margin: 0;
  color: var(--accent);
}
.update-progress.error {
  color: #ff8a80;
}
.update-bar {
  height: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.update-bar > span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 0.2s;
}
.about .notices {
  max-height: 50vh;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 0.8rem;
}

/* Voddler palette: same original Windows layouts, typography and components. */

:root {
  --ring: 0 0 0 2px var(--accent), 0 0 0 6px rgba(182,140,255,.17);
}
.backdrop {
  background: radial-gradient(1100px 600px at 12% -10%, rgba(157,85,255,.15), transparent 66%), radial-gradient(850px 540px at 94% 6%, rgba(82,144,255,.14), transparent 64%), linear-gradient(180deg,#121025,#0c0918 70%);
}
button.primary:hover, button[type=submit]:hover {
  background: #c8a9ff;
}
button.primary, button[type=submit] {
  color: #180e2b;
}
.brand-mark, .avatar {
  background: linear-gradient(135deg,#d79cff,#9587ff,#65c9ff);
  color: #1b0b2b;
}
