/* Sender — Variante 2 */

@font-face {
  font-family: "Martian Mono";
  src: url("fonts/martian-mono-latin-standard-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-display: swap;
}

:root {
  --schwarz: #050506;
  --tief: #0d0d10;
  --weiss: #f1f1ec;
  --grau: #9a9a94;
  /* Sender-Palette */
  --rot: #ff4b3e;
  --gruen: #46d36a;
  --gelb: #f6d70b;
  --blau: #4a72ff;
  --magenta: #e352c4;
  --cyan: #3fd3dc;
  --akzent: var(--cyan);
  --mono: "Martian Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
}
body[data-kanal="2"] { --akzent: var(--gelb); }
body[data-kanal="3"] { --akzent: var(--gruen); }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--schwarz);
  color: var(--weiss);
  font-family: var(--mono);
  font-stretch: 87.5%;
  font-weight: 340;
  font-size: 15px;
  line-height: 1.45;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-underline-offset: .2em; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }
.nur-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprung { position: fixed; left: 12px; top: -80px; z-index: 50; background: var(--weiss); color: var(--schwarz); padding: .5em .8em; }
.sprung:focus { top: 12px; }
.kicker {
  display: inline-block;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  font-stretch: 112.5%; font-weight: 600;
  color: var(--akzent);
}

/* ——— Kopf ——— */
#kopf {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 18px 22px;
  pointer-events: none;
}
.kennung-logo { display: flex; flex-direction: column; gap: 6px; }
.logo {
  font-stretch: 112.5%; font-weight: 700; font-size: 14px; letter-spacing: .02em;
  background: var(--weiss); color: var(--schwarz); padding: 3px 7px 4px; align-self: flex-start;
}
.live { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-stretch: 112.5%; display: flex; align-items: center; gap: 7px; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--rot); animation: puls 2s ease-in-out infinite; }
body.pause .live i { background: var(--grau); animation: none; }
@keyframes puls { 50% { opacity: .25; } }
.uhr { text-align: right; text-shadow: 0 1px 12px rgba(0,0,0,.6); }
#uhr {
  display: block;
  font-size: clamp(26px, 4.4vw, 58px); line-height: 1;
  font-stretch: 112.5%; font-weight: 250;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.uhr-ort { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; font-stretch: 112.5%; color: var(--grau); }

/* ——— Kanäle ——— */
#sender { position: fixed; inset: 0; }
.kanal { position: absolute; inset: 0; }
.kanal[hidden] { display: none; }

/* Kanal 1 */
.sendebild { position: absolute; inset: 0; background: var(--schwarz); }
.sendebild img, .sendebild canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.sendebild canvas { pointer-events: none; }
.bauchbinde {
  position: absolute; left: 22px; bottom: 86px; z-index: 3;
  max-width: min(560px, calc(100vw - 44px));
  background: var(--schwarz);
  border-left: 4px solid var(--akzent);
  padding: 12px 18px 14px;
}
.bauchbinde p { margin: 0; }
.bauchbinde .gross {
  font-size: clamp(22px, 2.6vw, 34px); line-height: 1.1;
  font-stretch: 112.5%; font-weight: 300; margin: 4px 0 4px;
}
.bauchbinde .gross b { font-weight: 650; }
.bauchbinde #b-datum { color: var(--weiss); opacity: .86; }
.naechstes { display: flex; gap: 12px; align-items: center; margin-top: 8px !important; color: var(--grau); font-size: 12px; }
.balken { flex: 1; height: 2px; background: rgba(255,255,255,.18); min-width: 60px; position: relative; overflow: hidden; }
.balken i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--akzent); }
.untertitel {
  position: absolute; left: 50%; bottom: 210px; transform: translateX(-50%); z-index: 4;
  width: max-content; max-width: min(860px, calc(100vw - 44px));
  margin: 0; text-align: center;
  font-size: clamp(15px, 1.6vw, 20px); line-height: 1.5;
}
.untertitel span { background: var(--schwarz); color: var(--gelb); padding: .12em .45em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

.kennung {
  position: absolute; inset: 0; z-index: 6;
  background: var(--schwarz);
  display: grid; place-content: center; gap: 28px;
  padding: 0 6vw; text-align: center;
}
.kennung[hidden] { display: none; }
.kennung p {
  margin: 0;
  font-size: clamp(30px, 6.4vw, 104px); line-height: 1.02;
  font-stretch: 75%; font-weight: 200; letter-spacing: -.02em;
  text-wrap: balance;
}

/* Kanal 2 */
.radio {
  position: absolute; inset: 0;
  padding: 120px 22px 100px;
  display: grid; grid-template-rows: auto 1fr auto; gap: 18px;
  background: color-mix(in srgb, var(--mixfarbe, #222) 32%, var(--schwarz));
  transition: background 1.5s ease;
}
.radio-kopf { display: flex; gap: 18px; align-items: center; }
.radio-kopf img { width: 76px; height: 76px; object-fit: cover; display: block; }
.radio-kopf .mix { font-stretch: 112.5%; font-weight: 600; font-size: 18px; }
.radio-kopf .meta { color: var(--grau); font-size: 12px; }
.jetzt { align-self: center; max-width: 1200px; }
.jetzt .kuenstler {
  display: block;
  font-size: clamp(34px, 7.4vw, 120px); line-height: .95;
  font-stretch: 112.5%; font-weight: 700; letter-spacing: -.03em;
  overflow-wrap: anywhere;
}
.jetzt .titel {
  display: block; margin-top: .3em;
  font-size: clamp(20px, 3.4vw, 52px); line-height: 1.08;
  font-stretch: 75%; font-weight: 250;
}
.jetzt .stelle { display: block; margin-top: 1.2em; font-variant-numeric: tabular-nums; color: var(--gelb); font-size: clamp(14px, 1.4vw, 18px); }
.leiste-mix { position: relative; height: 30px; margin-bottom: 6px; }
.leiste-mix .spur { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(255,255,255,.3); }
.leiste-mix .t { position: absolute; top: 8px; width: 1px; height: 14px; background: rgba(255,255,255,.55); }
.leiste-mix .t.ist { background: var(--gelb); }
.leiste-mix .kopf { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--gelb); box-shadow: 0 0 10px var(--gelb); }
.danach { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--grau); font-size: 13px; }
.danach b { color: var(--weiss); font-weight: 500; }
.radio .knopf, .tafel .knopf {
  display: inline-block; margin: 8px 10px 0 0; padding: .5em .9em;
  border: 1px solid var(--gelb); color: var(--gelb); text-decoration: none;
  font-stretch: 112.5%; font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
}
.radio iframe { width: min(640px, 100%); height: 60px; border: 0; display: block; margin-top: 10px; }
.radio .hinweis { color: var(--grau); font-size: 12px; max-width: 60ch; margin: 8px 0 0; }
.stille { align-self: center; }
.stille .wort { font-size: clamp(56px, 13vw, 210px); line-height: .9; font-stretch: 75%; font-weight: 150; letter-spacing: -.03em; display: block; }
.stille .bis { display: block; margin-top: .8em; font-size: clamp(15px, 1.6vw, 21px); }
.stille .count { color: var(--gelb); font-variant-numeric: tabular-nums; }
.pausenzeichen { display: flex; gap: 10px; margin-top: 26px; align-items: flex-end; height: 24px; }
.pausenzeichen i { width: 10px; background: var(--gelb); opacity: .3; }
.pausenzeichen i.an { opacity: 1; }

/* Kanal 3: Text-Tafeln */
.tafel {
  position: absolute; left: 50%; top: 104px; bottom: 80px; transform: translateX(-50%);
  width: calc(40ch + 2px);
  font-size: min(20px, calc((100vw - 28px) / 25));
  font-stretch: 87.5%;
  display: flex; flex-direction: column;
  outline: none;
}
.tafel-kopf {
  display: flex; justify-content: space-between; gap: 1ch;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
#seitennummer { color: var(--weiss); background: var(--blau); padding: 0 .5ch; }
.tafel-sender { color: var(--gelb); }
.tafel-inhalt { flex: 1; overflow-y: auto; padding: .6em 0 1em; white-space: normal; overscroll-behavior: contain; scrollbar-width: thin; }
.tafel-inhalt p { margin: 0 0 1em; }
.tafel .dh {                    /* doppelte Höhe, wie im Videotext */
  display: block; margin: .3em 0 1.25em;
  transform: scaleY(2); transform-origin: 0 0;
  font-stretch: 112.5%; font-weight: 600;
}
.tafel .z { display: grid; grid-template-columns: 4ch 1fr; gap: 1ch; }
.tafel .zeile { display: grid; grid-template-columns: 6ch 1fr; gap: 1ch; padding: .08em 0; }
.tafel .zeile.jetzt-hier { color: var(--gelb); }
.tafel .g { color: var(--gelb); } .tafel .c { color: var(--cyan); } .tafel .gr { color: var(--gruen); }
.tafel .m { color: var(--magenta); } .tafel .r { color: var(--rot); } .tafel .w { color: var(--weiss); } .tafel .x { color: var(--grau); }
.tafel .band { display: block; background: var(--blau); color: var(--weiss); padding: 0 1ch; margin: 0 0 .8em; }
.tafel .band.c { background: var(--cyan); color: var(--schwarz); }
.tafel .band.m { background: var(--magenta); color: var(--schwarz); }
.tafel .band.g { background: var(--gelb); color: var(--schwarz); }
.tafel .band.r { background: var(--rot); color: var(--schwarz); }
.tafel a.seite, .tafel button.seite { color: var(--cyan); text-decoration: none; font-variant-numeric: tabular-nums; }
.tafel a.seite:hover, .tafel button.seite:hover { text-decoration: underline; }
.tafel .lesen { font-stretch: 75%; font-weight: 320; line-height: 1.6; hyphens: auto; -webkit-hyphens: auto; }
.tafel .bilder { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5ch; margin: 1em 0; }
.tafel .bilder img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.tafel ol.tl { list-style: none; padding: 0; margin: 0 0 1em; }
.tafel ol.tl li { display: grid; grid-template-columns: 8ch 1fr; gap: 1ch; }
.tafel ol.tl .zt { color: var(--gelb); font-variant-numeric: tabular-nums; }
.fastext { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5ch; padding-top: .4em; }
.fastext button { text-align: left; padding: .15em .3ch; color: var(--schwarz); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-rot { background: var(--rot); } .ft-gruen { background: var(--gruen); } .ft-gelb { background: var(--gelb); } .ft-blau { background: var(--blau); color: var(--weiss) !important; }

/* ——— OSD ——— */
#osd {
  position: fixed; right: 22px; top: 96px; z-index: 12;
  display: flex; align-items: baseline; gap: 12px;
  color: var(--gruen);
  font-stretch: 112.5%;
  opacity: 0; pointer-events: none;
  text-shadow: 0 2px 16px rgba(0,0,0,.8);
}
#osd-nr { font-size: clamp(64px, 9vw, 140px); font-weight: 700; line-height: 1; }
#osd-name { font-size: 18px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
#osd.zeigt { animation: osd 1.6s ease forwards; }
@keyframes osd { 0% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }

/* ——— Steuerung ——— */
#steuer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 22px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(5,5,6,.92), rgba(5,5,6,0));
}
.kanaele { display: flex; gap: 6px; }
.kanaele button, .extras button {
  padding: .55em .9em; border: 1px solid rgba(255,255,255,.28);
  font-stretch: 112.5%; font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(5,5,6,.6);
  white-space: nowrap;
}
.kanaele button b { font-weight: 700; margin-right: .35em; }
.kanaele button[aria-pressed="true"] { background: var(--akzent); color: var(--schwarz); border-color: var(--akzent); }
.extras { display: flex; gap: 6px; align-items: center; }
.extras button[aria-pressed="true"] { border-color: var(--gelb); color: var(--gelb); }
#ton-knopf i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .35; margin-right: .5em; vertical-align: .1em; }
#ton-knopf[aria-pressed="true"] i { opacity: 1; }
.extras a { font-size: 11px; color: var(--grau); text-decoration: none; margin-left: 8px; }
.extras a:hover, .extras a:focus-visible { color: var(--weiss); text-decoration: underline; }

/* ——— Zeitreise (Seite 999) ——— */
body.zeitreise #uhr { color: var(--magenta); }
body.zeitreise .live i { background: var(--magenta); animation: none; }
#zeitreise {
  position: fixed; left: 22px; right: 22px; bottom: 64px; z-index: 11;
  background: var(--schwarz); border-top: 2px solid var(--magenta);
  padding: 10px 14px 12px;
}
#zeitreise[hidden] { display: none; }
#zeitreise .kicker { color: var(--magenta); }
.zr-kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 8px; }
.zr-zeit { font-stretch: 112.5%; font-weight: 600; font-size: 20px; font-variant-numeric: tabular-nums; color: var(--magenta); }
.zr-knoepfe { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.zr-knoepfe button { padding: .35em .7em; border: 1px solid rgba(255,255,255,.28); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; font-stretch: 112.5%; white-space: nowrap; }
.zr-knoepfe .zr-ende { border-color: var(--magenta); color: var(--magenta); }
.zr-leiste { position: relative; height: 44px; }
#zr-spur { position: absolute; inset: 6px 0 14px; border-bottom: 1px solid rgba(255,255,255,.3); }
#zr-spur i { position: absolute; top: 0; bottom: 0; }
#zr-spur .zr-pause { background: repeating-linear-gradient(135deg, rgba(255,255,255,.1) 0 4px, transparent 4px 8px); }
#zr-spur .zr-sendung { top: auto; height: 5px; bottom: -3px; background: var(--gelb); opacity: .85; }
#zr-spur .zr-bild { width: 1px; background: var(--cyan); opacity: .8; }
#zr-spur .zr-std { position: absolute; bottom: -17px; transform: translateX(-50%); font-size: 10px; color: var(--grau); }
#zr-regler { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.zr-leiste:focus-within { outline: 2px solid var(--magenta); outline-offset: 3px; }
.zr-leiste::after {
  content: ""; position: absolute; top: 0; bottom: 10px; width: 2px; left: var(--zr-pos, 0%);
  background: var(--magenta); box-shadow: 0 0 10px var(--magenta); pointer-events: none;
}
body.zeitreise:has(#zeitreise:not([hidden])) .bauchbinde { bottom: 200px; }
body.zeitreise:has(#zeitreise:not([hidden])) .untertitel { bottom: 330px; }

/* ——— Telefon ——— */
@media (max-width: 700px) {
  body { font-size: 14px; }
  #kopf { padding: 14px 16px; }
  .sendebild img, .sendebild canvas { object-fit: contain; object-position: 50% 38%; }
  .bauchbinde { left: 16px; right: 16px; bottom: 112px; max-width: none; padding: 10px 14px 12px; }
  .untertitel { bottom: auto; top: 112px; }
  #steuer { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .kanaele button { flex: 1; }
  .extras { justify-content: space-between; }
  .extras a { margin-left: 0; }
  .radio { padding: 100px 16px 128px; }
  .tafel { top: 92px; bottom: 116px; }
  #osd { top: 84px; right: 16px; }
  #zeitreise { left: 0; right: 0; bottom: 104px; padding: 8px 16px 10px; }
  .zr-knoepfe { margin-left: 0; }
  body.zeitreise:has(#zeitreise:not([hidden])) .bauchbinde { bottom: 268px; }
}

/* ——— Ruhe ——— */
@media (prefers-reduced-motion: reduce) {
  .live i { animation: none; }
  #osd.zeigt { animation: none; opacity: 1; }
  .radio { transition: none; }
}

/* ——— Statische Seiten und ohne JS ——— */
body.statisch { overflow: auto; }
.tafel-statisch { max-width: 44ch; margin: 0 auto; padding: 8vh 20px 12vh; font-stretch: 75%; line-height: 1.6; }
.tafel-statisch h1 { font-stretch: 112.5%; font-weight: 650; font-size: 2rem; }
.tafel-statisch h2 { font-size: 1rem; color: var(--gelb); margin: 1.6em 0 .3em; }
.ohne-js { position: fixed; inset: 0; z-index: 99; background: var(--schwarz); display: grid; place-content: center; padding: 2em; text-align: center; }

/* ——— Druck: nur der Text-Kanal ——— */
@media print {
  body { overflow: visible; background: #fff; color: #000; }
  #kopf, #steuer, #kanal-1, #kanal-2, #osd, .fastext, .sprung { display: none !important; }
  #kanal-3 { display: block !important; position: static; }
  .tafel { position: static; transform: none; width: auto; font-size: 10pt; }
  .tafel-inhalt { overflow: visible; }
  .tafel .g, .tafel .c, .tafel .gr, .tafel .m, .tafel .r, .tafel .w, .tafel .x, #seitennummer, .tafel .band { color: #000 !important; background: none !important; }
}
