:root {
  color-scheme: dark;
  --ink: #fff4df;
  --muted: #d7c4ff;
  --black: #10071b;
  --violet-950: #140820;
  --violet-900: #1d0d34;
  --violet-800: #2c1554;
  --violet-700: #4c2389;
  --violet-500: #8e55ff;
  --orange: #ae432b;
  --orange-hot: #ef6d35;
  --cyan: #7ee6ff;
  --line: rgba(255, 244, 223, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--black);
  color: var(--ink);
  font-family: "Avenir Next Condensed", "Bahnschrift", "DIN Condensed", "Arial Narrow", sans-serif;
  letter-spacing: 0;
  overflow: hidden;
}

body {
  min-height: 100dvh;
}

button {
  font: inherit;
}

.channel-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100vw;
  height: calc(100dvh - 50px);
  background:
    linear-gradient(115deg, rgba(174, 67, 43, 0.12), transparent 28%),
    linear-gradient(135deg, #130720 0%, #241047 48%, #12071f 100%);
}

.channel-shell.is-expanded {
  grid-template-columns: minmax(0, 1fr);
}

.broadcast {
  position: relative;
  min-width: 0;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(21, 9, 36, 0.6), rgba(10, 4, 18, 0.94)),
    var(--violet-950);
}

.broadcast::before,
.broadcast::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.broadcast::before {
  z-index: 2;
  background:
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(126, 230, 255, 0.08) 32px),
    repeating-linear-gradient(90deg, transparent 0 39px, rgba(255, 244, 223, 0.045) 40px),
    linear-gradient(120deg, rgba(239, 109, 53, 0.08), transparent 34%, rgba(142, 85, 255, 0.2) 68%, transparent);
  opacity: 0.62;
  mix-blend-mode: screen;
}

.broadcast::after {
  z-index: 2;
  top: auto;
  left: -8%;
  right: -8%;
  height: 42%;
  background:
    repeating-linear-gradient(90deg, transparent 0 58px, rgba(255, 244, 223, 0.08) 60px),
    linear-gradient(180deg, transparent, rgba(31, 11, 55, 0.78));
  clip-path: polygon(0 24%, 100% 0, 100% 100%, 0 100%);
  opacity: 0.58;
}

.broadcast-video {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #10071b;
  filter: saturate(1.14) contrast(1.06);
  opacity: 0;
  transition: opacity 120ms linear;
}

.broadcast-video.is-active {
  opacity: 1;
}

.broadcast-video-buffer {
  pointer-events: none;
}

.scanlines {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.045), transparent 1px),
    linear-gradient(110deg, transparent 0%, rgba(126, 230, 255, 0.14) 46%, transparent 52%);
  background-size: 100% 5px, 260% 100%;
  mix-blend-mode: screen;
  opacity: 0.36;
}

.story-transition {
  position: absolute;
  z-index: 9;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(120px, 19vw) minmax(0, 1fr);
  grid-template-areas:
    "kicker kicker"
    "slot story";
  align-content: center;
  gap: 14px 26px;
  padding: clamp(28px, 5vw, 82px);
  background:
    linear-gradient(100deg, rgba(174, 67, 43, 0.92) 0 24%, transparent 24% 30%, rgba(20, 8, 32, 0.96) 30%),
    repeating-linear-gradient(90deg, rgba(255, 244, 223, 0.18) 0 1px, transparent 1px 88px),
    linear-gradient(135deg, rgba(31, 11, 55, 0.92), rgba(10, 4, 18, 0.98));
  color: #ffffff;
  opacity: 0;
  transform: translate3d(12%, 0, 0);
  pointer-events: none;
  transition: opacity 180ms ease, transform 420ms cubic-bezier(0.2, 0.84, 0.22, 1);
}

.story-transition::before,
.story-transition::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.story-transition::before {
  inset: 0;
  background:
    linear-gradient(115deg, transparent 0 38%, rgba(126, 230, 255, 0.22) 39% 40%, transparent 41%),
    linear-gradient(115deg, transparent 0 56%, rgba(239, 109, 53, 0.36) 57% 59%, transparent 60%);
  mix-blend-mode: screen;
}

.story-transition::after {
  left: -18%;
  right: -18%;
  top: 49%;
  height: 6px;
  background: linear-gradient(90deg, transparent, var(--cyan), #ffffff, var(--orange-hot), transparent);
  box-shadow: 0 0 34px rgba(126, 230, 255, 0.82);
  transform: rotate(-7deg);
}

.story-transition.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  animation: transition-punch 1450ms ease both;
}

.transition-kicker,
.story-transition strong,
.story-transition div {
  position: relative;
  z-index: 1;
}

.transition-kicker {
  grid-area: kicker;
  width: fit-content;
  padding: 9px 15px 8px;
  background: var(--orange-hot);
  color: #160824;
  font-size: clamp(20px, 2vw, 34px);
  line-height: 1;
  font-weight: 950;
  text-transform: uppercase;
}

.story-transition.is-loop-reset .transition-kicker {
  background: var(--cyan);
}

.story-transition strong {
  grid-area: slot;
  align-self: stretch;
  display: grid;
  place-items: center;
  min-height: 150px;
  border: 1px solid rgba(255, 244, 223, 0.24);
  background: rgba(255, 244, 223, 0.08);
  color: var(--cyan);
  font-size: clamp(42px, 7vw, 104px);
  line-height: 0.9;
  font-weight: 950;
  box-shadow: inset 8px 0 0 var(--cyan);
}

.story-transition div {
  grid-area: story;
  align-self: stretch;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  border-left: 10px solid var(--orange-hot);
  padding: 18px 26px;
  background: linear-gradient(90deg, rgba(58, 26, 112, 0.94), rgba(26, 9, 47, 0.72));
}

.story-transition div span {
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 24px);
  font-weight: 900;
  text-transform: uppercase;
}

.story-transition h2 {
  margin: 7px 0 0;
  color: #ffffff;
  font-size: clamp(34px, 5.1vw, 82px);
  line-height: 0.95;
  font-weight: 950;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

@keyframes transition-punch {
  0% {
    filter: brightness(1.22) saturate(1.28);
  }
  42% {
    filter: brightness(1.06) saturate(1.12);
  }
  100% {
    filter: brightness(1) saturate(1);
  }
}

.topbar {
  position: absolute;
  z-index: 5;
  top: 24px;
  left: 28px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-lockup,
.live-badge,
.control-button,
.size-button,
.audio-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  background: rgba(18, 7, 31, 0.72);
  color: var(--ink);
  backdrop-filter: blur(16px);
  text-transform: uppercase;
  font-weight: 900;
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.28);
}

.brand-lockup {
  gap: 12px;
  padding: 7px 16px 7px 7px;
  font-size: 18px;
  white-space: nowrap;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 34px;
  background:
    linear-gradient(135deg, #b991ff, var(--violet-500) 58%, #3b1770);
  color: #10071b;
  font-size: 18px;
  font-weight: 950;
  box-shadow:
    inset -6px -6px 0 rgba(22, 7, 39, 0.32),
    inset 5px 5px 0 rgba(255, 255, 255, 0.22);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.market-pulse {
  display: flex;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}

.market-card {
  display: grid;
  grid-template-columns: auto auto;
  align-items: end;
  min-width: 148px;
  gap: 2px 10px;
  padding: 8px 12px 7px;
  border: 1px solid rgba(126, 230, 255, 0.28);
  background:
    linear-gradient(90deg, rgba(18, 7, 31, 0.8), rgba(40, 18, 82, 0.7)),
    rgba(18, 7, 31, 0.7);
  box-shadow: inset 4px 0 0 rgba(126, 230, 255, 0.82), 0 16px 46px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.market-card span,
.market-card em {
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}

.market-card span {
  font-size: 13px;
}

.market-card strong {
  color: #ffffff;
  font-size: 22px;
  line-height: 0.9;
  font-weight: 950;
}

.market-card em {
  grid-column: 1 / -1;
  font-size: 12px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control-button {
  justify-content: center;
  min-width: 82px;
  padding: 10px 14px 9px;
  border-color: rgba(255, 244, 223, 0.18);
  cursor: pointer;
  font-size: 16px;
}

.control-button:hover,
.control-button.is-active {
  border-color: rgba(126, 230, 255, 0.7);
  color: #ffffff;
  box-shadow: inset 0 -3px 0 rgba(126, 230, 255, 0.86), 0 16px 46px rgba(0, 0, 0, 0.28);
}

.control-button.is-active {
  background: rgba(126, 230, 255, 0.16);
}

.control-glyph {
  line-height: 1;
}

.transport-controls {
  position: absolute;
  z-index: 7;
  right: 34px;
  bottom: 164px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(255, 244, 223, 0.18);
  background: rgba(18, 7, 31, 0.74);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
}

.transport-controls .control-button:first-child {
  background: linear-gradient(90deg, rgba(126, 230, 255, 0.24), rgba(142, 85, 255, 0.16));
}

.transport-controls .control-button:last-child {
  background: linear-gradient(90deg, rgba(174, 67, 43, 0.28), rgba(18, 7, 31, 0.76));
}

.size-button {
  gap: 8px;
  padding: 7px 12px 7px 7px;
  cursor: pointer;
  font-size: 16px;
}

.size-button:hover,
.size-button[aria-pressed="true"] {
  border-color: rgba(239, 109, 53, 0.78);
  color: #ffffff;
}

.size-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: var(--orange-hot);
  color: #1a0815;
  font-size: 24px;
  line-height: 1;
  font-weight: 950;
}

.audio-button {
  gap: 6px;
  min-width: 48px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 18px;
}

.audio-button:hover,
.audio-button[aria-pressed="true"] {
  border-color: rgba(126, 230, 255, 0.7);
  color: #ffffff;
}

.audio-button.needs-gesture {
  animation: audio-pulse 1.6s ease-in-out infinite;
}

@keyframes audio-pulse {
  0%, 100% { box-shadow: 0 16px 46px rgba(0, 0, 0, 0.28); }
  50% { box-shadow: 0 0 0 4px rgba(126, 230, 255, 0.32), 0 16px 46px rgba(0, 0, 0, 0.28); }
}

.audio-icon {
  display: inline-block;
  line-height: 1;
}

.tap-to-hear {
  position: absolute;
  z-index: 12;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  background: radial-gradient(ellipse at center, rgba(18, 7, 31, 0.62), rgba(0, 0, 0, 0.82));
  color: #ffffff;
  cursor: pointer;
  text-align: center;
  padding: 32px;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(4px);
}

.tap-to-hear[hidden] {
  display: none;
}

.tap-to-hear.is-dismissed {
  opacity: 0;
  pointer-events: none;
}

.tap-icon {
  display: grid;
  place-items: center;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--orange-hot);
  color: #10071b;
  font-size: 58px;
  line-height: 1;
  box-shadow: 0 24px 78px rgba(239, 109, 53, 0.42),
    0 0 0 6px rgba(239, 109, 53, 0.22);
  animation: tap-pulse 1.5s ease-in-out infinite;
}

@keyframes tap-pulse {
  0%, 100% {
    box-shadow: 0 24px 78px rgba(239, 109, 53, 0.42),
      0 0 0 6px rgba(239, 109, 53, 0.22);
  }
  50% {
    box-shadow: 0 24px 78px rgba(239, 109, 53, 0.66),
      0 0 0 18px rgba(239, 109, 53, 0.12);
  }
}

.tap-headline {
  font-size: 44px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}

.tap-sub {
  font-size: 18px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.78);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.live-badge {
  padding: 8px 16px;
  color: #ffffff;
  font-size: 18px;
  background:
    linear-gradient(90deg, rgba(174, 67, 43, 0.82), rgba(33, 13, 58, 0.82));
  box-shadow:
    inset 5px 0 0 var(--orange-hot),
    0 16px 46px rgba(0, 0, 0, 0.28);
}

.story-plate {
  position: absolute;
  z-index: 4;
  left: 34px;
  right: 34px;
  bottom: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: stretch;
  max-width: 1040px;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.42));
}

.story-plate-kicker {
  display: flex;
  align-items: center;
  gap: 0;
  width: fit-content;
}

.segment-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 6px 12px 5px;
  background: var(--orange-hot);
  color: #10071b;
  font-size: 16px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.story-source {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px 5px;
  background: rgba(76, 35, 137, 0.92);
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.story-plate h1 {
  margin: 0;
  min-height: 60px;
  padding: 14px 28px 12px;
  background:
    linear-gradient(90deg, #3a1a70, var(--violet-700) 72%, #2a1252);
  color: #ffffff;
  font-size: 36px;
  line-height: 1.02;
  font-weight: 950;
  text-transform: uppercase;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.52);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.unmute-button {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-width: 146px;
  height: 52px;
  border: 1px solid rgba(255, 244, 223, 0.34);
  background: rgba(18, 7, 31, 0.84);
  color: var(--ink);
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.48);
}

.unmute-button:hover {
  border-color: var(--orange-hot);
  color: #ffffff;
}

.unmute-button[hidden] {
  display: none;
}

.progress-rail {
  position: absolute;
  z-index: 7;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: rgba(255, 244, 223, 0.16);
}

.progress-rail span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--orange-hot), var(--violet-500), var(--cyan));
}

.schedule {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  min-height: 0;
  max-height: calc(100dvh - 50px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 24px 20px 20px;
  border-left: 1px solid rgba(255, 244, 223, 0.16);
  background:
    linear-gradient(180deg, rgba(30, 13, 54, 0.96), rgba(14, 6, 25, 0.98)),
    repeating-linear-gradient(0deg, rgba(255, 244, 223, 0.05) 0 1px, transparent 1px 10px);
}

.schedule > div {
  position: sticky;
  z-index: 2;
  top: -24px;
  margin: -24px -20px 0;
  padding: 24px 20px 12px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  background:
    linear-gradient(180deg, rgba(30, 13, 54, 0.98), rgba(30, 13, 54, 0.9) 72%, rgba(30, 13, 54, 0)),
    rgba(30, 13, 54, 0.94);
  backdrop-filter: blur(14px);
}

.eyebrow {
  color: var(--orange-hot);
  text-transform: uppercase;
  font-size: 16px;
  font-weight: 900;
}

.schedule strong {
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
}

.schedule ol {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 0;
  margin: 0;
  padding: 0 0 34px;
  list-style: none;
  overflow: visible;
}

.schedule::-webkit-scrollbar {
  width: 10px;
}

.schedule::-webkit-scrollbar-track {
  background: rgba(255, 244, 223, 0.08);
}

.schedule::-webkit-scrollbar-thumb {
  border: 2px solid rgba(30, 13, 54, 0.96);
  background: linear-gradient(180deg, var(--orange-hot), var(--violet-500));
}

.schedule li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.schedule li > span {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 244, 223, 0.16);
  color: var(--muted);
  font-weight: 900;
}

.schedule button {
  min-height: 74px;
  width: 100%;
  border: 1px solid rgba(255, 244, 223, 0.16);
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  padding: 10px 12px;
}

.schedule button:hover {
  border-color: rgba(239, 109, 53, 0.58);
}

.schedule button strong,
.schedule button em {
  display: block;
}

.schedule button strong {
  font-size: 17px;
  line-height: 1.04;
}

.schedule button em {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  text-transform: uppercase;
}

.schedule li.active > span,
.schedule li.active button {
  border-color: rgba(239, 109, 53, 0.78);
  background: rgba(239, 109, 53, 0.14);
}

.ticker {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 50px;
  overflow: hidden;
  border-top: 1px solid rgba(255, 244, 223, 0.2);
  background:
    linear-gradient(90deg, #281252, var(--violet-800) 44%, #17091f),
    var(--violet-800);
}

.ticker::before {
  display: none;
}

.ticker-track {
  display: inline-block;
  min-width: 200%;
  padding-left: 100%;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  line-height: 50px;
  text-transform: uppercase;
  white-space: nowrap;
  animation: ticker-move 72s linear infinite;
}

@keyframes ticker-move {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .channel-shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(560px, calc(100dvh - 50px)) auto;
    height: auto;
    min-height: calc(100dvh - 50px);
  }

  .channel-shell.is-expanded {
    grid-template-rows: minmax(560px, calc(100dvh - 50px));
  }

  .schedule {
    border-left: 0;
    border-top: 1px solid rgba(255, 244, 223, 0.16);
  }

  .story-plate {
    right: 24px;
    left: 24px;
    max-width: none;
  }

  .transport-controls {
    right: 24px;
    bottom: 148px;
  }

  .story-plate h1 {
    font-size: 34px;
  }

  .story-transition {
    grid-template-columns: minmax(90px, 150px) minmax(0, 1fr);
    gap: 10px 14px;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .market-pulse {
    display: none;
  }
}

@media (max-width: 640px) {
  .topbar {
    top: 14px;
    left: 14px;
    right: 14px;
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .top-actions {
    align-items: stretch;
    justify-content: space-between;
  }

  .brand-lockup,
  .live-badge,
  .size-button {
    min-height: 38px;
    font-size: 15px;
  }

  .story-plate {
    left: 14px;
    right: 14px;
    bottom: 48px;
    grid-template-columns: 1fr;
    grid-template-areas: "headline";
  }

  .story-plate h1 {
    min-height: 88px;
    padding: 14px 16px;
    font-size: 29px;
  }

  .transport-controls {
    left: 14px;
    right: 14px;
    bottom: 250px;
    justify-content: stretch;
  }

  .transport-controls .control-button {
    flex: 1;
  }

  .story-transition {
    grid-template-columns: 1fr;
    grid-template-areas:
      "kicker"
      "slot"
      "story";
    align-content: center;
    padding: 22px;
  }

  .story-transition strong {
    min-height: 86px;
    font-size: 46px;
  }

  .story-transition div {
    padding: 15px 18px;
  }

  .story-transition h2 {
    font-size: 32px;
  }

  .ticker::before {
    width: 104px;
    font-size: 18px;
  }
}
