.livestream-page {
  --max-width: 1120px;
  overflow-x: hidden;
}

.status-row {
  margin-bottom: clamp(28px, 5vw, 54px);
}

.stream-stage {
  min-height: clamp(280px, 48vw, 560px);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(14px, 2vw, 22px);
}

.stream-stage.is-live {
  background:
    linear-gradient(135deg, rgba(255,87,51,.12), transparent 46%),
    rgba(10, 14, 28, .76);
}

.stream-stage.is-offline {
  background:
    radial-gradient(circle at 50% 24%, rgba(123,106,202,.2), transparent 36%),
    rgba(10, 14, 28, .72);
}

.stream-player {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--radius-xl);
  background: #050812;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0,0,0,.42);
}

.stream-player video,
.stream-player iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #050812;
}

.offline-state {
  width: min(620px, 100%);
  display: grid;
  justify-items: center;
  text-align: center;
  padding: clamp(28px, 5vw, 58px);
}

.offline-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--accent);
  background: rgba(255,87,51,.08);
  font-size: 54px;
  line-height: 1;
  box-shadow: 0 20px 54px rgba(0,0,0,.28);
}

.offline-state h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 58px);
  line-height: .95;
  letter-spacing: -.055em;
}

.offline-state p {
  max-width: 520px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.55;
}

.stream-error {
  max-width: 620px;
  padding: clamp(22px, 4vw, 36px);
  text-align: center;
}

.stream-error h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -.05em;
}

.stream-error p {
  color: var(--muted);
  line-height: 1.55;
}

.recordings-section {
  margin-top: clamp(34px, 5vw, 58px);
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 68px);
  line-height: .92;
  letter-spacing: -.06em;
}

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

.recording-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(10, 14, 28, .74);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 22px 60px rgba(0,0,0,.32);
  backdrop-filter: blur(18px);
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.recording-card:hover {
  border-color: var(--line-strong);
  background:
    linear-gradient(135deg, rgba(255,87,51,.08), transparent 48%),
    rgba(12, 17, 34, .84);
}

.recording-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 24%, rgba(255,87,51,.22), transparent 34%),
    linear-gradient(135deg, rgba(29,30,61,.9), rgba(10,10,21,.88));
}

.recording-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.recording-body {
  min-width: 0;
}

.recording-body h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.recording-body p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.recordings-empty {
  grid-column: 1 / -1;
  padding: 24px;
}

.to-top-button {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 80;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(13, 19, 38, 0.82);
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.to-top-button.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.to-top-button:hover {
  border-color: rgba(255, 87, 51, 0.65);
  background:
    linear-gradient(135deg, rgba(255, 87, 51, 0.16), transparent 56%),
    rgba(13, 19, 38, 0.9);
}

@media (hover: hover) {
  .recording-card:hover {
    transform: translateY(-2px);
  }
}

@media (max-width: 920px) {
  .recordings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  html,
  body {
    overflow-x: hidden;
  }

  .livestream-page {
    width: calc(100vw - 28px) !important;
    max-width: calc(100vw - 28px) !important;
    overflow-x: hidden;
  }

  .status-row {
    margin-bottom: 30px;
  }

  .stream-stage {
    min-height: 280px;
    padding: 12px;
    border-radius: 22px;
  }

  .stream-player {
    border-radius: 18px;
  }

  .offline-state {
    padding: 28px 18px;
  }

  .offline-icon {
    width: 62px;
    height: 62px;
    font-size: 42px;
  }

  .recordings-section {
    margin-top: 34px;
  }

  .recording-card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px;
    border-radius: 22px;
  }

  .recording-thumb {
    aspect-ratio: 16 / 9;
    border-radius: 14px;
  }

  .recording-body h3 {
    font-size: clamp(24px, 7vw, 34px);
  }
}

@media (max-width: 420px) {
  .livestream-page {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
  }

  .stream-stage {
    min-height: 250px;
  }

  .offline-state p {
    font-size: 14px;
  }

  .recording-card {
    padding: 16px;
  }

  .to-top-button {
    width: 44px;
    height: 44px;
    right: 14px;
    bottom: 14px;
    font-size: 21px;
  }
}

/* Livestream Feinschliff: Archiv-Typografie und Recording-Bilder */
.recordings-section {
  margin-top: clamp(28px, 4.4vw, 48px);
}

.section-head h2 {
  font-size: clamp(32px, 4.4vw, 56px) !important;
  line-height: .96 !important;
  letter-spacing: -.052em !important;
}

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

.recording-card {
  grid-template-columns: 180px 1fr !important;
  align-items: start !important;
  min-height: 150px;
}

.recording-body h3 {
  font-size: clamp(20px, 1.75vw, 28px) !important;
  line-height: 1.04 !important;
  letter-spacing: -.035em !important;
}

.recording-body p {
  font-size: 13px !important;
  line-height: 1.45;
}

.recording-thumb {
  min-height: 104px;
}

.recording-thumb:has(img) {
  background: rgba(5, 8, 18, .78);
}

.recording-thumb-fallback {
  width: 100%;
  height: 100%;
  min-height: 104px;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 34px;
  font-weight: 950;
  background:
    radial-gradient(circle at 50% 36%, rgba(255,87,51,.18), transparent 42%),
    linear-gradient(135deg, rgba(29,30,61,.9), rgba(10,10,21,.88));
}

.offline-state h2 {
  font-size: clamp(30px, 4.2vw, 48px) !important;
  line-height: .98 !important;
}

.offline-state p {
  font-size: clamp(14px, 1.6vw, 16px) !important;
}

@media (max-width: 920px) {
  .recordings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .section-head h2 {
    font-size: clamp(31px, 9vw, 44px) !important;
  }

  .recording-card {
    grid-template-columns: 1fr !important;
    min-height: 0;
  }

  .recording-thumb {
    min-height: 0;
  }

  .recording-body h3 {
    font-size: clamp(22px, 6.4vw, 30px) !important;
  }
}

/* Livestream Fix: Status-Abstand und zentriertes Offline-Symbol */
.livestream-page .back-pill + .status-row {
  margin-top: clamp(24px, 4vw, 42px) !important;
}

.status-row {
  margin-bottom: clamp(30px, 5vw, 58px) !important;
}

.offline-icon {
  position: relative !important;
  width: 72px !important;
  height: 72px !important;
  display: grid !important;
  place-items: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
  font-size: 0 !important;
  line-height: 1 !important;
  color: transparent !important;
}

.offline-icon::before {
  content: "";
  width: 19px;
  height: 19px;
  border-radius: 999px;
  border: 3px dotted var(--accent);
  display: block;
  box-shadow: 0 0 0 12px rgba(255, 87, 51, .08);
}

.offline-state {
  place-items: center !important;
}

.offline-state h2,
.offline-state p {
  text-align: center !important;
}

@media (max-width: 760px) {
  .livestream-page .back-pill + .status-row {
    margin-top: 22px !important;
  }

  .status-row {
    margin-bottom: 34px !important;
  }

  .offline-icon {
    width: 62px !important;
    height: 62px !important;
  }

  .offline-icon::before {
    width: 16px;
    height: 16px;
  }
}

/* Livestream: Offline-Symbol entfernen */
.offline-icon {
  display: none !important;
}

.offline-state {
  padding-top: clamp(34px, 6vw, 72px) !important;
  padding-bottom: clamp(34px, 6vw, 72px) !important;
}

.offline-state h2 {
  margin-top: 0 !important;
}

@media (max-width: 760px) {
  .offline-state {
    padding-top: 34px !important;
    padding-bottom: 34px !important;
  }
}

/* Livestream: Letzte Aufzeichnung im großen Stream-Feld */
.stream-stage.is-recording {
  display: block !important;
  padding: clamp(18px, 2.4vw, 28px) !important;
  min-height: auto !important;
  background:
    linear-gradient(135deg, rgba(255,87,51,.08), transparent 44%),
    rgba(10, 14, 28, .76);
}

.latest-recording {
  display: grid;
  gap: 20px;
}

.latest-recording-head {
  max-width: 880px;
}

.latest-recording-head h2 {
  max-width: 920px;
  margin: 16px 0 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 58px);
  line-height: .96;
  letter-spacing: -.055em;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.latest-recording-head p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.latest-recording-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: #050812;
  box-shadow: 0 26px 70px rgba(0,0,0,.38);
}

.recording-player-video,
.recording-player-frame {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #050812;
}

.recording-player-fallback {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.recording-player-fallback img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .72;
}

.recording-player-fallback .button {
  position: relative;
  z-index: 1;
}

.stream-stage.is-offline {
  min-height: clamp(250px, 42vw, 460px) !important;
}

@media (max-width: 760px) {
  .stream-stage.is-recording {
    padding: 14px !important;
  }

  .latest-recording {
    gap: 16px;
  }

  .latest-recording-head h2 {
    font-size: clamp(25px, 7.6vw, 38px);
    line-height: 1.02;
  }

  .latest-recording-player {
    border-radius: 18px;
  }

  .recording-player-fallback {
    min-height: 220px;
  }
}
