:root {
  color-scheme: dark;
  --bg: #05070d;
  --bg-2: #090d17;
  --panel: #101622;
  --panel-2: #0b111c;
  --line: rgba(120, 240, 255, 0.14);
  --line-strong: rgba(120, 240, 255, 0.28);
  --text: #eff8ff;
  --muted: #8ea2b5;
  --cyan: #46f2ff;
  --pink: #ff3df2;
  --green: #72ff9d;
  --danger: #ff5b7a;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.52);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 76% 14%, rgba(255, 61, 242, 0.12), transparent 28rem),
    radial-gradient(circle at 18% 0%, rgba(70, 242, 255, 0.13), transparent 24rem),
    linear-gradient(135deg, #04050a, #08101b 55%, #05070d);
  color: var(--text);
}

body {
  overflow: hidden;
}

body.modal-open {
  overflow: hidden;
}

button {
  font: inherit;
}

.app-shell {
  --rail-width: 280px;
  height: 100dvh;
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  grid-template-rows: 64px minmax(0, 1fr);
}

.app-shell.channels-collapsed {
  --rail-width: 78px;
}

.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 7, 13, 0.84);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 850;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.topbar-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(70, 242, 255, 0.07);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 850;
}

.topbar-button:hover,
.topbar-button.active {
  border-color: var(--line-strong);
  color: var(--cyan);
  background: rgba(70, 242, 255, 0.12);
}

.topbar-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.brand-mark {
  width: 26px;
  height: 26px;
  display: inline-block;
  border: 2px solid var(--cyan);
  box-shadow: 0 0 22px rgba(70, 242, 255, 0.75), inset 0 0 18px rgba(255, 61, 242, 0.45);
  transform: skew(-10deg);
}

.topbar-status,
.overlay-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 16px rgba(114, 255, 157, 0.85);
}

.channel-rail {
  grid-row: 2;
  padding: 18px 12px 24px;
  border-right: 1px solid var(--line);
  background: rgba(6, 10, 18, 0.72);
  min-height: 0;
  overflow-y: auto;
}

.rail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.icon-button.rail-close {
  display: none;
  width: 32px;
  height: 32px;
}

.rail-title,
.section-label {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}

.channel-backdrop {
  position: fixed;
  inset: 58px 0 0;
  z-index: 28;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(2px);
}

.channel-backdrop[hidden] {
  display: none;
}

.channel-list {
  margin-top: 12px;
  display: grid;
  gap: 6px;
}

.channel-button {
  width: 100%;
  border: 1px solid transparent;
  color: var(--text);
  background: transparent;
  padding: 10px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
}

.channel-button:hover,
.channel-button.active {
  border-color: var(--line-strong);
  background: linear-gradient(90deg, rgba(70, 242, 255, 0.16), rgba(255, 61, 242, 0.08));
}

.channel-number {
  color: var(--cyan);
  font-weight: 900;
  font-size: 13px;
  padding-top: 2px;
}

.channel-copy strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-copy span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-shell.channels-collapsed .channel-rail {
  padding-left: 8px;
  padding-right: 8px;
}

.app-shell.channels-collapsed .rail-title,
.app-shell.channels-collapsed .channel-copy {
  display: none;
}

.app-shell.channels-collapsed .channel-list {
  gap: 8px;
}

.app-shell.channels-collapsed .channel-button {
  grid-template-columns: 1fr;
  place-items: center;
  padding: 10px 6px;
}

.app-shell.channels-collapsed .channel-number {
  font-size: 12px;
  padding-top: 0;
}

.watch-stage {
  grid-row: 2;
  min-width: 0;
  min-height: 0;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  grid-template-rows: auto;
  gap: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  align-content: start;
}

.app-shell.cinema-mode .watch-stage {
  grid-template-columns: minmax(0, 1fr);
}

.app-shell.cinema-mode .info-panel {
  display: none;
}

.player-panel,
.info-section {
  border: 1px solid var(--line);
  background: rgba(13, 19, 31, 0.78);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.player-panel {
  padding: 10px;
}

.player-panel:fullscreen {
  width: 100vw;
  height: 100vh;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #000;
  display: grid;
  place-items: center;
}

.player-panel:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #000;
  display: grid;
  place-items: center;
}

.player-panel:fullscreen .player-frame {
  width: 100vw;
  height: 100vh;
  min-height: 0;
  border-radius: 0;
  aspect-ratio: auto;
}

.player-panel:-webkit-full-screen .player-frame {
  width: 100vw;
  height: 100vh;
  min-height: 0;
  border-radius: 0;
  aspect-ratio: auto;
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 300px;
  overflow: hidden;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(70, 242, 255, 0.10), transparent),
    #02040a;
}

.player-frame::before,
.player-frame::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 4;
  pointer-events: none;
}

.player-frame::before {
  top: 0;
  height: 54px;
  background: linear-gradient(rgba(0, 0, 0, 0.52), transparent);
}

.player-frame::after {
  bottom: 0;
  height: 76px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.68));
}

#player,
#player iframe {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
  user-select: none;
}

#player {
  position: absolute;
  inset: -2.8% -2.2% -5.8%;
  width: 104.4%;
  height: 108.6%;
}

#player iframe {
  display: block;
}

.player-click-shield {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}

.player-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 52px 18px 16px;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
  z-index: 5;
}

.overlay-channel {
  font-size: 13px;
  color: var(--cyan);
  font-weight: 850;
  text-transform: uppercase;
}

.overlay-title {
  margin-top: 4px;
  font-size: clamp(17px, 2vw, 26px);
  line-height: 1.08;
  font-weight: 850;
  max-width: 760px;
}

.difficulty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 5px),
    #070b13;
  z-index: 6;
}

.difficulty.break-mode {
  background:
    radial-gradient(circle at 50% 42%, rgba(70, 242, 255, 0.18), transparent 22rem),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 5px),
    #050912;
}

.difficulty strong {
  font-size: 24px;
}

.difficulty span {
  color: var(--muted);
}

.hidden {
  display: none;
}

.info-panel {
  display: grid;
  gap: 16px;
  align-content: start;
}

.info-section {
  padding: 16px;
}

.now-card h1 {
  margin: 8px 0 8px;
  font-size: 24px;
  line-height: 1.1;
}

.now-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.sync-meter {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.sync-meter strong {
  color: var(--green);
}

.up-next-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.up-next-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.up-next-item img {
  width: 74px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  background: #02040a;
}

.break-thumb {
  width: 74px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--green);
  font-weight: 900;
  background: linear-gradient(135deg, rgba(114, 255, 157, 0.16), rgba(70, 242, 255, 0.08));
  border: 1px solid rgba(114, 255, 157, 0.28);
}

.break-item strong {
  color: var(--green);
}

.up-next-item strong,
.guide-item strong {
  display: block;
  font-size: 13px;
  line-height: 1.25;
}

.up-next-item span,
.guide-item span {
  color: var(--muted);
  font-size: 12px;
}

.guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  padding: 18px;
  background: rgba(2, 4, 9, 0.76);
  backdrop-filter: blur(18px);
  display: grid;
  min-width: 0;
  min-height: 0;
}

.guide-overlay.hidden {
  display: none;
}

.guide-modal {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(7, 12, 21, 0.96);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.guide-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.guide-modal-header h2 {
  margin: 3px 0 0;
  font-size: 22px;
}

.guide-modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(70, 242, 255, 0.08);
  color: var(--cyan);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.guide-grid {
  min-height: 0;
  overflow: auto;
  height: 100%;
  padding-bottom: 20px;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

.guide-modal-body {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  padding: 14px;
}

.guide-timeline {
  position: relative;
  min-width: calc(190px + var(--timeline-width));
}

.guide-timeline-head,
.guide-timeline-row {
  display: grid;
  grid-template-columns: 190px var(--timeline-width);
  min-width: calc(190px + var(--timeline-width));
}

.guide-timeline-head {
  position: sticky;
  top: 0;
  z-index: 4;
  background: rgba(9, 14, 24, 0.96);
  border-bottom: 1px solid var(--line);
}

.guide-channel-head,
.guide-channel {
  position: sticky;
  left: 0;
  z-index: 3;
  border: 1px solid var(--line);
  background: rgba(4, 8, 14, 0.94);
  padding: 10px;
}

.guide-channel-head {
  min-height: 38px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.guide-channel {
  color: var(--cyan);
  font-weight: 850;
  min-height: 56px;
  display: flex;
  align-items: center;
}

.guide-time-head {
  position: relative;
  min-height: 38px;
  background:
    repeating-linear-gradient(90deg, rgba(120, 240, 255, 0.10) 0 1px, transparent 1px 132px),
    rgba(4, 8, 14, 0.52);
}

.guide-time-slot {
  position: absolute;
  top: 11px;
  transform: translateX(8px);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.guide-timeline-body {
  display: grid;
}

.guide-track {
  position: relative;
  min-height: 56px;
  border-bottom: 1px solid rgba(120, 240, 255, 0.10);
  background:
    repeating-linear-gradient(90deg, rgba(120, 240, 255, 0.07) 0 1px, transparent 1px 132px),
    rgba(3, 7, 13, 0.42);
}

.guide-program {
  position: absolute;
  top: 6px;
  bottom: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(7, 14, 22, 0.88);
  padding: 7px 9px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.guide-program:hover,
.guide-program:focus-visible,
.guide-program.selected {
  border-color: rgba(70, 242, 255, 0.65);
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(70, 242, 255, 0.24), 0 0 18px rgba(70, 242, 255, 0.12);
}

.guide-program strong {
  display: block;
  font-size: 12px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guide-program span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guide-program.current {
  border-color: rgba(114, 255, 157, 0.5);
  background: linear-gradient(90deg, rgba(114, 255, 157, 0.18), rgba(70, 242, 255, 0.08));
}

.guide-program.break-program {
  border-color: rgba(114, 255, 157, 0.22);
  background:
    repeating-linear-gradient(135deg, rgba(114, 255, 157, 0.07) 0 6px, transparent 6px 12px),
    rgba(7, 14, 22, 0.9);
}

.guide-program.break-program strong {
  color: var(--green);
}

.guide-details {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 8, 14, 0.78);
  padding: 12px;
}

.guide-detail-empty {
  min-height: 220px;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  color: var(--muted);
}

.guide-detail-empty strong {
  color: var(--text);
  font-size: 18px;
}

.guide-detail-image,
.guide-detail-break {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #02040a;
}

.guide-detail-image {
  object-fit: cover;
  display: block;
}

.guide-detail-break {
  display: grid;
  place-items: center;
  color: var(--green);
  font-size: 42px;
  font-weight: 950;
  background:
    repeating-linear-gradient(135deg, rgba(114, 255, 157, 0.08) 0 8px, transparent 8px 16px),
    rgba(7, 14, 22, 0.9);
}

.guide-detail-copy {
  padding-top: 12px;
}

.guide-detail-kicker {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.guide-detail-copy h3 {
  margin: 6px 0 8px;
  font-size: 22px;
  line-height: 1.1;
}

.guide-detail-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
  font-size: 13px;
}

.guide-detail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.detail-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(70, 242, 255, 0.06);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 850;
}

.detail-pill.live {
  color: var(--green);
  border-color: rgba(114, 255, 157, 0.36);
}

.detail-pill.break {
  color: var(--green);
}

.guide-detail-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.guide-detail-list div {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.guide-detail-list dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.guide-detail-list dd {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.guide-now-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(190px + var(--now-left));
  z-index: 5;
  width: 2px;
  background: var(--pink);
  box-shadow: 0 0 16px rgba(255, 61, 242, 0.8);
  pointer-events: none;
}

.guide-now-line::before {
  content: "Now";
  position: absolute;
  top: 2px;
  left: 7px;
  color: var(--pink);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.skeleton-row {
  height: 58px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255,255,255,0.05), rgba(255,255,255,0.1), rgba(255,255,255,0.05));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

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

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 58px minmax(0, 1fr);
  }

  .channel-rail {
    position: fixed;
    top: 58px;
    bottom: 0;
    left: 0;
    z-index: 30;
    width: min(86vw, 330px);
    border-right: 1px solid var(--line);
    border-bottom: 0;
    overflow-y: auto;
    padding: 16px 12px 24px;
    transform: translateX(-105%);
    transition: transform 180ms ease;
    box-shadow: var(--shadow);
  }

  .app-shell.channels-open .channel-rail {
    transform: translateX(0);
  }

  .icon-button.rail-close {
    display: grid;
  }

  .channel-list {
    display: grid;
    min-width: 0;
  }

  .channel-button {
    width: 100%;
  }

  .watch-stage {
    grid-row: 2;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    padding: 12px;
    overflow-y: auto;
  }

  .player-frame {
    min-height: 210px;
  }

  .guide-grid {
    min-height: 48dvh;
  }

  .guide-modal-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(220px, 34dvh);
  }

  .guide-details {
    min-height: 0;
  }

  .topbar-status {
    display: none;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 0 12px;
    gap: 10px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .topbar-button {
    width: 38px;
    min-width: 38px;
    padding: 0;
    justify-content: center;
  }

  .button-label {
    display: none;
  }

  .brand {
    font-size: 18px;
  }

  .channel-button {
    width: 180px;
  }

  .player-panel,
  .info-section {
    border-radius: 6px;
  }

  .player-frame {
    min-height: 190px;
  }

  .player-overlay {
    padding: 44px 12px 12px;
  }

  .overlay-live {
    display: none;
  }

  .guide-overlay {
    padding: 8px;
  }

  .guide-modal-header {
    padding: 12px;
  }

  .guide-modal-body {
    padding: 10px;
    gap: 10px;
  }

  .guide-timeline-head,
  .guide-timeline-row {
    grid-template-columns: 150px var(--timeline-width);
  }

  .guide-timeline {
    min-width: calc(150px + var(--timeline-width));
  }

  .guide-now-line {
    left: calc(150px + var(--now-left));
  }

  .guide-detail-copy h3 {
    font-size: 18px;
  }
}

/* Swiss International visual system */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-2: #f2f2f2;
  --panel: #ffffff;
  --panel-2: #f2f2f2;
  --line: #000000;
  --line-strong: #000000;
  --text: #000000;
  --muted: #5f5f5f;
  --cyan: #000000;
  --pink: #ff3000;
  --green: #ff3000;
  --danger: #ff3000;
  --accent: #ff3000;
  --shadow: none;
}

html,
body {
  background:
    linear-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.035) 1px, transparent 1px),
    #ffffff;
  background-size: 24px 24px;
  color: #000000;
  font-family: Inter, Helvetica, Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  pointer-events: none;
  background-image: radial-gradient(rgba(0, 0, 0, 0.06) 1px, transparent 1px);
  background-size: 16px 16px;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid #ff3000;
  outline-offset: 2px;
}

.app-shell {
  --rail-width: 308px;
  grid-template-rows: 68px minmax(0, 1fr);
  background: rgba(255, 255, 255, 0.86);
}

.app-shell.channels-collapsed {
  --rail-width: 84px;
}

.topbar {
  align-items: stretch;
  gap: 0;
  padding: 0;
  border-bottom: 3px solid #000000;
  background: #ffffff;
  backdrop-filter: none;
}

.brand {
  min-width: var(--rail-width);
  padding: 0 20px;
  border-right: 3px solid #000000;
  color: #000000;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border: 3px solid #000000;
  background: #ff3000;
  box-shadow: none;
  transform: none;
}

.topbar-actions {
  align-items: stretch;
  gap: 0;
  border-left: 3px solid #000000;
}

.topbar-button {
  min-height: 100%;
  border: 0;
  border-right: 3px solid #000000;
  border-radius: 0;
  background: #ffffff;
  color: #000000;
  padding: 0 18px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-button:hover,
.topbar-button.active {
  color: #ffffff;
  background: #ff3000;
}

.topbar-button svg,
.icon-button svg {
  stroke-width: 2.3;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.topbar-status,
.overlay-live {
  color: #000000;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.topbar-status {
  padding: 0 20px;
  white-space: nowrap;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 0;
  background: #ff3000;
  box-shadow: none;
}

.channel-rail {
  padding: 18px 0 24px;
  border-right: 3px solid #000000;
  background:
    repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.035) 0 10px, transparent 10px 20px),
    #f2f2f2;
}

.rail-heading {
  padding: 0 16px 14px;
  border-bottom: 3px solid #000000;
  justify-content: flex-start;
  gap: 12px;
}

.channel-toggle {
  display: grid;
  width: 42px;
  height: 42px;
  border-width: 3px;
  background: #ffffff;
}

.channel-toggle:hover {
  color: #ffffff;
  background: #ff3000;
}

.rail-title,
.section-label {
  color: #ff3000;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.channel-backdrop {
  inset: 68px 0 0;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: none;
}

.channel-list {
  margin-top: 0;
  gap: 0;
}

.channel-button {
  border: 0;
  border-bottom: 2px solid #000000;
  border-radius: 0;
  color: #000000;
  padding: 12px 14px;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
}

.channel-button:hover,
.channel-button.active {
  color: #ffffff;
  background: #000000;
}

.channel-button:hover .channel-number,
.channel-button.active .channel-number,
.channel-button:hover .channel-copy span,
.channel-button.active .channel-copy span {
  color: #ffffff;
}

.channel-number {
  color: #ff3000;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.channel-copy strong {
  font-size: 13px;
  line-height: 1.12;
  font-weight: 900;
  text-transform: uppercase;
}

.channel-copy span {
  color: #5f5f5f;
  font-size: 11px;
  font-weight: 600;
}

.app-shell.channels-collapsed .rail-heading {
  min-height: 66px;
  padding: 12px 0;
  justify-content: center;
}

.app-shell.channels-collapsed .channel-toggle {
  width: 48px;
  height: 48px;
  background: #ffffff;
}

.app-shell.channels-collapsed .channel-button {
  padding: 14px 6px;
}

.watch-stage {
  padding: 18px;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  background: #ffffff;
}

.player-panel,
.info-section {
  border: 3px solid #000000;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.player-panel {
  padding: 10px;
  background: #000000;
  align-self: start;
}

.info-panel {
  align-self: start;
}

.player-frame {
  width: 100%;
  min-height: 0;
  border-radius: 0;
  background: #000000;
}

.player-frame::before {
  background: linear-gradient(rgba(0, 0, 0, 0.54), transparent);
}

.player-frame::after,
.player-overlay {
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}

.player-overlay {
  justify-content: flex-end;
}

.overlay-channel {
  color: #ff3000;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.overlay-title {
  display: none;
}

.watch-toast {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 7;
  max-width: min(560px, calc(100% - 36px));
  border: 3px solid #000000;
  background: #ffffff;
  color: #000000;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 160ms linear, transform 160ms ease-out;
}

.watch-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.watch-toast[hidden] {
  display: none;
}

.difficulty {
  background:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    #000000;
  background-size: 24px 24px;
}

.difficulty.break-mode {
  background:
    repeating-linear-gradient(135deg, rgba(255, 48, 0, 0.18) 0 10px, transparent 10px 20px),
    #000000;
}

.difficulty strong {
  color: #ffffff;
  font-size: 32px;
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.difficulty span {
  color: #d9d9d9;
  font-weight: 700;
}

.info-section {
  padding: 18px;
}

.now-card h1 {
  font-size: 30px;
  line-height: 0.96;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.now-card p {
  color: #5f5f5f;
  font-size: 13px;
  font-weight: 700;
}

.sync-meter {
  display: none;
  border-top: 3px solid #000000;
  color: #5f5f5f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sync-meter strong {
  color: #ff3000;
}

.up-next-list {
  gap: 0;
  border-top: 2px solid #000000;
}

.up-next-item {
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 2px solid #000000;
}

.up-next-item img,
.break-thumb {
  width: 82px;
  border: 2px solid #000000;
  border-radius: 0;
  background: #000000;
}

.break-thumb {
  color: #ffffff;
}

.break-item strong {
  color: #ff3000;
}

.up-next-item strong,
.guide-item strong {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.up-next-item span,
.guide-item span {
  color: #5f5f5f;
  font-size: 11px;
  font-weight: 700;
}

.chat-section {
  min-height: 260px;
}

.chat-messages {
  height: 180px;
  margin-top: 14px;
  overflow-y: auto;
  border-top: 3px solid #000000;
  border-bottom: 3px solid #000000;
  background:
    repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.035) 0 10px, transparent 10px 20px),
    #f2f2f2;
}

.chat-empty {
  padding: 12px 0;
  color: #5f5f5f;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chat-message {
  padding: 10px 0;
  border-bottom: 2px solid #000000;
  background: #ffffff;
}

.chat-message div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px;
}

.chat-message strong {
  color: #ff3000;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.chat-message time {
  color: #5f5f5f;
  font-size: 10px;
  font-weight: 800;
}

.chat-message p {
  margin: 5px 0 0;
  padding: 0 10px;
  color: #000000;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.18;
  word-break: break-word;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 12px;
  border: 3px solid #000000;
}

.chat-form input {
  min-width: 0;
  border: 0;
  border-right: 3px solid #000000;
  padding: 0 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  background: #ffffff;
  color: #000000;
}

.chat-form button {
  min-height: 42px;
  border: 0;
  background: #000000;
  color: #ffffff;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.chat-form button:hover {
  background: #ff3000;
}

.guide-overlay {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: none;
}

.guide-modal {
  border: 4px solid #000000;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

.guide-modal-header {
  padding: 18px 20px;
  border-bottom: 4px solid #000000;
  background: #ffffff;
}

.guide-modal-header h2 {
  font-size: clamp(28px, 4vw, 54px);
  line-height: 0.88;
  font-weight: 900;
  letter-spacing: -0.07em;
  text-transform: uppercase;
}

.guide-modal-actions {
  gap: 0;
  border-left: 3px solid #000000;
  border-top: 3px solid #000000;
}

.icon-button {
  width: 46px;
  height: 46px;
  border: 0;
  border-right: 3px solid #000000;
  border-bottom: 3px solid #000000;
  border-radius: 0;
  background: #ffffff;
  color: #000000;
}

.icon-button:hover {
  color: #ffffff;
  background: #ff3000;
}

.guide-modal-body {
  grid-template-columns: minmax(0, 1fr) 384px;
  gap: 0;
  padding: 0;
}

.guide-timeline {
  background: #ffffff;
}

.guide-timeline-head {
  background: #ffffff;
  border-bottom: 3px solid #000000;
}

.guide-channel-head,
.guide-channel {
  border-right: 3px solid #000000;
  border-bottom: 2px solid #000000;
  background: #ffffff;
}

.guide-channel-head {
  color: #5f5f5f;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.guide-channel {
  color: #000000;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.guide-timeline-row.viewing-channel .guide-channel {
  color: #ff3000;
  background:
    repeating-linear-gradient(135deg, rgba(255, 48, 0, 0.12) 0 8px, transparent 8px 16px),
    #ffffff;
}

.guide-timeline-row.viewing-channel .guide-track {
  background:
    linear-gradient(rgba(255, 48, 0, 0.10), rgba(255, 48, 0, 0.10)),
    #f2f2f2;
}

.guide-time-head {
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.09) 0 1px, transparent 1px 132px),
    #f2f2f2;
}

.guide-time-slot {
  color: #000000;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.guide-track {
  border-bottom: 2px solid #000000;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.08) 0 1px, transparent 1px 132px),
    #ffffff;
}

.guide-program {
  border: 2px solid #000000;
  border-radius: 0;
  background: #ffffff;
  color: #000000;
}

.guide-program:hover,
.guide-program:focus-visible,
.guide-program.selected {
  color: #ffffff;
  background: #000000;
  box-shadow: none;
}

.guide-program:hover span,
.guide-program:focus-visible span,
.guide-program.selected span {
  color: #ffffff;
}

.guide-program strong {
  font-size: 11px;
  line-height: 1.1;
  font-weight: 900;
  text-transform: uppercase;
}

.guide-program span {
  color: #5f5f5f;
  font-size: 10px;
  font-weight: 700;
}

.guide-program.current {
  border-color: #000000;
  background: #f2f2f2;
  box-shadow: inset 6px 0 0 #ff3000;
}

.guide-program.break-program {
  border-color: #000000;
  background:
    repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.12) 0 8px, transparent 8px 16px),
    #f2f2f2;
}

.guide-program.break-program strong {
  color: #000000;
}

.guide-details {
  border-left: 4px solid #000000;
  border-radius: 0;
  background:
    repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.035) 0 12px, transparent 12px 24px),
    #ffffff;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.guide-detail-empty {
  text-align: left;
  padding: 24px;
}

.guide-detail-empty strong {
  color: #000000;
  font-size: 24px;
  line-height: 0.95;
  font-weight: 900;
  text-transform: uppercase;
}

.guide-detail-image,
.guide-detail-break {
  border: 0;
  border-bottom: 4px solid #000000;
  border-radius: 0;
  background: #000000;
  flex: none;
}

.guide-detail-break {
  color: #ff3000;
  font-size: 68px;
  line-height: 0.8;
  font-weight: 900;
  letter-spacing: -0.08em;
  background:
    repeating-linear-gradient(135deg, rgba(255, 48, 0, 0.28) 0 12px, transparent 12px 24px),
    #000000;
}

.guide-detail-copy {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-bottom: 4px solid #000000;
  background: #ffffff;
}

.guide-detail-kicker {
  color: #ff3000;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.guide-detail-copy h3 {
  margin: 0;
  font-size: 27px;
  line-height: 0.96;
  font-weight: 900;
  letter-spacing: -0.06em;
  text-transform: uppercase;
}

.guide-detail-copy p {
  color: #5f5f5f;
  font-size: 13px;
  font-weight: 800;
}

.guide-detail-pills {
  gap: 0;
  margin: 0;
  border-left: 2px solid #000000;
  border-top: 2px solid #000000;
}

.detail-pill {
  border: 0;
  border-right: 2px solid #000000;
  border-bottom: 2px solid #000000;
  border-radius: 0;
  color: #000000;
  background: #ffffff;
  padding: 7px 9px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-pill.live,
.detail-pill.break {
  color: #ffffff;
  background: #ff3000;
}

.guide-detail-list {
  gap: 0;
  border-top: 3px solid #000000;
}

.guide-detail-list div {
  border-top: 0;
  border-bottom: 2px solid #000000;
  padding: 10px 0;
}

.guide-detail-list dt {
  color: #5f5f5f;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.guide-detail-list dd {
  font-size: 13px;
  font-weight: 900;
}

.guide-now-line {
  width: 4px;
  background: #ff3000;
  box-shadow: none;
}

.guide-now-line::before {
  color: #ffffff;
  background: #ff3000;
  padding: 2px 5px;
  font-size: 10px;
  letter-spacing: 0.06em;
}

.skeleton-row {
  border-radius: 0;
  background: repeating-linear-gradient(90deg, #ffffff 0 18px, #f2f2f2 18px 36px);
  animation: none;
}

@media (prefers-reduced-motion: no-preference) {
  .topbar-button,
  .channel-button,
  .guide-program,
  .icon-button {
    transition: background-color 150ms linear, color 150ms linear, transform 150ms ease-out;
  }

  .topbar-button:hover,
  .icon-button:hover {
    transform: translateY(-1px);
  }
}

@media (max-width: 1180px) and (min-width: 861px) {
  .watch-stage {
    grid-template-columns: minmax(0, 1fr);
  }

  .info-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .chat-section {
    grid-column: 1 / -1;
  }

  .app-status {
    display: none;
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-rows: 64px minmax(0, 1fr);
  }

  .watch-stage {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 18px;
    padding: 18px;
  }

  .player-frame {
    min-height: 190px;
  }

  .brand {
    min-width: 0;
    border-right: 0;
  }

  .channel-rail {
    top: 64px;
    border-right: 3px solid #000000;
    width: min(86vw, 330px);
    padding: 0 0 24px;
    box-shadow: none;
    transform: translateX(calc(-100% + 58px));
    transition: transform 180ms linear;
  }

  .app-shell.channels-open .channel-rail {
    transform: translateX(0);
  }

  .channel-rail .rail-heading {
    min-height: 58px;
    padding: 8px;
    justify-content: flex-end;
    background: #ffffff;
  }

  .channel-rail .channel-toggle {
    width: 42px;
    height: 42px;
  }

  .app-shell.channels-open .channel-rail .rail-heading {
    justify-content: space-between;
  }

  .app-shell:not(.channels-open) .channel-rail .rail-title,
  .app-shell:not(.channels-open) .channel-rail .channel-list {
    visibility: hidden;
  }

  .app-shell:not(.channels-open) .channel-backdrop {
    display: none;
  }

  .app-shell:not(.channels-open) .watch-stage {
    padding-left: 76px;
  }

  .guide-modal-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(230px, 38dvh);
    gap: 0;
  }

  .guide-details {
    border-left: 0;
    border-top: 4px solid #000000;
  }
}

@media (max-width: 640px) {
  .brand {
    padding: 0 12px;
    font-size: 15px;
  }

  .brand-mark {
    width: 22px;
    height: 22px;
  }

  .topbar-button {
    width: 38px;
    min-width: 38px;
    padding: 0;
    justify-content: center;
  }

  .channel-button {
    width: 100%;
  }

  .overlay-title {
    font-size: 19px;
  }

  .guide-detail-copy h3 {
    font-size: 21px;
  }
}
