.channel-banner {
  position: relative;
  height: 248px;
  overflow: hidden;
  background: #07080c;
  color: #d7ffe4;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  border-radius: 0;
}

.sheet > main > .channel-banner {
  width: calc(100% + 40px);
  margin: 0 -20px 16px;
}

.snap-card > .channel-banner {
  flex: 0 0 210px;
  height: 210px;
  width: auto;
  margin: 0 -16px;
}

.channel-banner.is-paused .cctv-feed,
.channel-banner.is-paused .radar-sweep,
.channel-banner.is-paused .planet,
.channel-banner.is-paused .ticker-track,
.channel-banner.is-paused .hud-alert {
  animation-play-state: paused;
}

.cctv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  height: 100%;
  background: #000;
}

.cctv-tile {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 0;
  color: inherit;
  text-decoration: none;
  background: #0c1210;
}

.cctv-feed,
.cctv-figure {
  position: absolute;
  inset: -8%;
  width: 116%;
  height: 116%;
  object-fit: cover;
  filter: grayscale(1) sepia(0.45) hue-rotate(78deg) contrast(1.15) brightness(0.78);
}

.cctv-feed {
  animation: cctv-pan 18s steps(10, end) infinite alternate;
}

.cctv-figure {
  opacity: 0;
  filter: grayscale(1) sepia(0.2) hue-rotate(70deg) brightness(0.35) contrast(1.4);
  transition: opacity 0.18s linear;
}

.cctv-tile.is-figure .cctv-figure {
  opacity: 0.55;
}

.cctv-vignette,
.cctv-scan,
.cctv-static,
.cctv-bar,
.cctv-lost {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cctv-vignette {
  box-shadow: inset 0 0 28px 10px rgba(0, 0, 0, 0.72);
}

.cctv-scan {
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.28) 0 1px, transparent 1px 4px);
  mix-blend-mode: multiply;
}

.cctv-static {
  opacity: 0.18;
  mix-blend-mode: screen;
}

.cctv-tile.is-glitch[data-glitch="static"] .cctv-static {
  opacity: 0.85;
}

.cctv-bar {
  display: none;
  top: 0;
  height: 18%;
  background: linear-gradient(to bottom, transparent, rgba(180, 255, 190, 0.45), transparent);
}

.cctv-tile.is-glitch[data-glitch="bar"] .cctv-bar {
  display: block;
  animation: cctv-roll 0.7s linear infinite;
}

.cctv-lost {
  display: none;
  place-items: center;
  background: rgba(0, 0, 0, 0.72);
  color: #d8ffe4;
  font-size: 12px;
  letter-spacing: 0.16em;
}

.cctv-tile.is-glitch[data-glitch="lost"] .cctv-lost {
  display: grid;
}

.cctv-meta {
  position: absolute;
  left: 6px;
  right: 6px;
  top: 5px;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 2px #000;
}

.cctv-time {
  position: absolute;
  left: 6px;
  bottom: 5px;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 2px #000;
}

.cctv-rec {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 3px 1px 0;
  border-radius: 50%;
  background: #ff2b2b;
  box-shadow: 0 0 6px #ff2b2b;
  animation: rec-blink 1.1s steps(1, end) infinite;
}

@keyframes cctv-pan {
  from { transform: scale(1.08) translate3d(-2%, -1%, 0); }
  to { transform: scale(1.16) translate3d(2%, 2%, 0); }
}

@keyframes cctv-roll {
  from { transform: translateY(-20%); }
  to { transform: translateY(520%); }
}

@keyframes rec-blink {
  50% { opacity: 0.15; }
}

.channel-banner.hud,
.channel-banner.lab,
.channel-banner.money {
  display: grid;
  height: 248px;
  padding: 10px 12px 8px;
  box-sizing: border-box;
}

.snap-card > .channel-banner.hud,
.snap-card > .channel-banner.lab,
.snap-card > .channel-banner.money {
  height: 210px;
}

.hud {
  grid-template-columns: 1.3fr 0.8fr;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  background:
    linear-gradient(180deg, rgba(6, 28, 18, 0.88), rgba(4, 16, 12, 0.92)),
    url("/media/survive/hank-mountain-goat.webp") center/cover;
}

.hud-read,
.lab-read,
.money-side {
  min-width: 0;
}

.hud-kicker,
.lab-kicker,
.money-kicker {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: #9dffc3;
}

.hud-bpm {
  margin: 2px 0 0;
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
}

.hud-bpm span {
  font-size: 11px;
  letter-spacing: 0.12em;
  margin-left: 4px;
}

.ecg {
  grid-column: 1 / -1;
  width: 100%;
  height: 54px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
}

.hud-bars {
  display: grid;
  gap: 6px;
  align-content: center;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.bar {
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  width: 50%;
  background: #3dff9a;
}

.bar.o2 i { background: #7ecbff; }

.radar {
  position: relative;
  width: 92px;
  height: 92px;
  justify-self: end;
  border-radius: 50%;
  border: 1px solid rgba(120, 255, 170, 0.45);
  background:
    repeating-radial-gradient(circle, transparent 0 14px, rgba(120, 255, 170, 0.18) 15px 16px);
  overflow: hidden;
}

.radar-sweep {
  position: absolute;
  inset: 0;
  background: conic-gradient(from 0deg, transparent 0 72%, rgba(80, 255, 150, 0.45) 88%, transparent 100%);
  animation: sweep 3.4s linear infinite;
}

.blip {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b8ffd2;
  box-shadow: 0 0 6px #b8ffd2;
}

.hud-alert {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid transparent;
  font-size: 12px;
  letter-spacing: 0.14em;
  opacity: 0;
}

.hud-alert.is-on {
  opacity: 1;
  color: #ffd36a;
  border-color: #ffd36a;
  animation: rec-blink 0.45s steps(1, end) infinite;
}

.hud-alert.is-hot {
  color: #ff5a5a;
  border-color: #ff5a5a;
}

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

.lab {
  grid-template-columns: 108px 1fr;
  grid-template-rows: auto 1fr;
  gap: 8px 12px;
  background:
    linear-gradient(180deg, rgba(10, 16, 40, 0.9), rgba(8, 10, 24, 0.94)),
    url("/media/whatif/sun-and-earth.webp") center/cover;
  color: #d7e8ff;
}

.planet {
  width: 96px;
  height: 96px;
  justify-self: center;
  animation: spin 28s linear infinite;
}

.planet circle.face { fill: #6aa6e0; }
.planet circle.shade { fill: #16345c; opacity: 0.55; }
.planet ellipse { fill: none; stroke: #d5ecff; stroke-width: 1.4; }

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

.lab-kicker { color: #9ec4ff; }

.sim-count {
  margin: 4px 0 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.graphs {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.graphs p {
  margin: 0 0 2px;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: #9ec4ff;
}

.graphs canvas {
  width: 100%;
  height: 42px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
}

.money {
  grid-template-rows: 1fr 28px;
  padding: 0;
  background: #120e0c;
  color: #f4efe6;
}

.money-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 0;
}

.money-side {
  padding: 12px 12px 8px;
  background:
    linear-gradient(180deg, rgba(8, 32, 18, 0.88), rgba(6, 18, 10, 0.92)),
    url("/media/richvspoor/characters-split.webp") left center/cover;
}

.money-side.poor {
  background:
    linear-gradient(180deg, rgba(48, 12, 12, 0.9), rgba(24, 8, 8, 0.94)),
    url("/media/richvspoor/characters-split.webp") right center/cover;
  color: #ffd0d0;
}

.money-kicker { color: #8dffb6; }
.money-side.poor .money-kicker { color: #ff8d8d; }

.money-amt {
  margin: 8px 0 0;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  color: #b6ffc9;
}

.money-side.poor .money-amt { color: #ff9a9a; }

.money-note {
  margin: 8px 0 0;
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 11px;
  letter-spacing: 0;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.78);
}

.ticker {
  overflow: hidden;
  background: #1a140f;
  border-top: 1px solid rgba(255, 220, 160, 0.25);
}

.ticker-track {
  display: inline-block;
  white-space: nowrap;
  padding: 6px 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #ffe3a3;
  animation: tape 16s linear infinite;
}

@keyframes tape {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.channel-banner.karma-banner {
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  background: #120c09;
  color: #fff6ec;
  font-family: var(--font-display, Georgia, "Times New Roman", serif);
}

.snap-card > .channel-banner.karma-banner {
  flex: 0 0 auto;
  height: auto;
  width: 100%;
  margin: 0;
}

.karma-stage {
  position: relative;
  align-self: center;
  width: min(100%, calc(85vh * 9 / 16));
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #000;
}

.karma-clip {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  opacity: 0;
}

.karma-clip.is-live {
  opacity: 1;
  z-index: 1;
}

.karma-line,
.karma-end {
  margin: 0;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.karma-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 48px 16px 18px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82) 42%);
  color: #fff6ec;
  font-size: clamp(18px, 4.8vw, 26px);
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.karma-end {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #120c09;
  color: #ffe7c2;
  text-align: center;
  font-size: clamp(32px, 8vw, 48px);
}

.karma-end[hidden] {
  display: none;
}

.karma-flash {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}

.karma-flash.is-on {
  animation: karma-flash 200ms linear;
}

@keyframes karma-flash {
  0% { opacity: 0; }
  40% { opacity: 1; }
  100% { opacity: 0; }
}

.karma-strip {
  display: flex;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.karma-strip figure {
  flex: 0 0 min(82vw, 240px);
  min-width: 0;
  margin: 0;
  scroll-snap-align: center;
}

.karma-strip img {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: #000;
}

.karma-strip figcaption {
  margin-top: 6px;
  color: #fff6ec;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.25;
  white-space: normal;
}

.karma-still-beat {
  width: 100%;
  margin: 0;
  padding: 4px 16px 14px;
  text-align: center;
  color: #ffe7c2;
  font-size: 22px;
  font-weight: 750;
}

@media (min-width: 800px) {
  .karma-stage {
    width: min(315px, calc(70vh * 9 / 16));
  }

  .karma-strip {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cctv-feed,
  .radar-sweep,
  .planet,
  .ticker-track,
  .cctv-bar,
  .hud-alert.is-on,
  .karma-flash {
    animation: none !important;
  }

  .cctv-rec {
    animation: rec-blink 1.1s steps(1, end) infinite;
  }
}
