.stream-banner {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  padding: 0.42rem clamp(0.55rem, 2vw, 1.25rem);
  color: #ffffff;
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.25;
}

.stream-banner[hidden] {
  display: none !important;
}

.stream-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, #2563eb 0%, #0891b2 55%, #0f766e 100%);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.28);
}

.stream-banner[data-mode='live']::before {
  background: linear-gradient(110deg, #e11d48 0%, #be123c 42%, #7c3aed 100%);
  box-shadow: 0 8px 30px rgba(225, 29, 72, 0.34);
}

.stream-banner__link {
  display: block;
  width: min(76rem, 100%);
  margin-inline: auto;
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease;
}

.stream-banner__link[href]:hover {
  background: rgba(255, 255, 255, 0.1);
}

.stream-banner__link[href]:active {
  transform: scale(0.995);
}

.stream-banner__link:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

.stream-banner__inner {
  min-height: 3.45rem;
  display: grid;
  grid-template-columns: auto minmax(8rem, 1fr) auto auto;
  align-items: center;
  gap: clamp(0.65rem, 2vw, 1.15rem);
  padding: 0.42rem 0.75rem;
}

.stream-banner__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.09em;
}

.stream-banner__pulse {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #ffffff;
}

.stream-banner[data-mode='live'] .stream-banner__pulse {
  animation: stream-pulse 1.1s ease-in-out infinite alternate;
}

@keyframes stream-pulse {
  from { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
  to { box-shadow: 0 0 0 0.42rem rgba(255, 255, 255, 0); }
}

.stream-banner__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.stream-banner__title,
.stream-banner__subtitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-banner__title {
  font-size: clamp(0.92rem, 2vw, 1.06rem);
  font-weight: 900;
  letter-spacing: -0.01em;
}

.stream-banner__subtitle {
  margin-top: 0.08rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 700;
}

.stream-banner__countdown {
  display: flex;
  gap: 0.34rem;
}

.stream-banner__time-chip {
  width: 3.25rem;
  padding: 0.25rem 0.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  font-variant-numeric: tabular-nums;
}

.stream-banner__time-chip strong {
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1;
}

.stream-banner__time-chip span {
  margin-top: 0.16rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.stream-banner__action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

html.has-stream-banner header.top {
  top: var(--stream-banner-height, 4.3rem);
}

@media (max-width: 680px) {
  .stream-banner {
    padding: 0.3rem 0.35rem;
  }

  .stream-banner__inner {
    min-height: 3.25rem;
    grid-template-columns: auto minmax(4.5rem, 1fr) auto;
    gap: 0.5rem;
    padding: 0.35rem 0.45rem;
  }

  .stream-banner__action {
    display: none;
  }

  .stream-banner__badge {
    padding-inline: 0.5rem;
  }

  .stream-banner__time-chip {
    width: 2.65rem;
  }

  .stream-banner__subtitle {
    display: none;
  }
}

@media (max-width: 410px) {
  .stream-banner__inner {
    grid-template-columns: minmax(4rem, 1fr) auto;
  }

  .stream-banner__badge {
    display: none;
  }

  .stream-banner__time-chip {
    width: 2.45rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stream-banner__link,
  .stream-banner__pulse {
    animation: none;
    transition: none;
  }
}
