/* Seifenkisten-Zeiterfassung */
:root {
  --navy: #13294b;
  --navy2: #1e3c6e;
  --akzent: #f26b1d;
  --gruen: #1f9d55;
  --rot: #d64545;
  --gelb: #f5c518;
  --grau: #6b7280;
  --hell: #f3f5f9;
  --linie: #dde2ea;
  --text: #1b2330;
  --radius: 10px;
  --kopf-text: #fff;
  --akzent-text: #fff;
  --hd-hg: #0b1526;
  --hd-hg2: #1d3a6b;
  --c-live: #d62f3a;
  --c-start: #1f6fd1;
  --c-erg: #c99700;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--text); background: var(--hell); }
a { color: var(--navy2); }
h1 { font-size: 1.6rem; margin: .4em 0 .5em; }
h2 { font-size: 1.25rem; margin: 1.6em 0 .6em; }
h3 { font-size: 1.05rem; margin: 1em 0 .5em; }
small { color: var(--grau); }
code { background: #e8ecf3; padding: 1px 5px; border-radius: 4px; font-size: .9em; word-break: break-all; }
pre.code { background: #0f1b31; color: #d6e2ff; padding: 12px; border-radius: 8px; overflow-x: auto; font-size: .85rem; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.r { text-align: right; }
.c { text-align: center; }
.nowrap { white-space: nowrap; }
.lead { color: #3d4757; }
.hint { color: var(--grau); font-size: .88rem; }
.leer { color: var(--grau); font-style: italic; text-align: center; }
.warn { color: #b45309; }
.ok { color: var(--gruen); }

/* Kopfleiste */
.topbar { background: var(--navy); color: var(--kopf-text); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; }
.brand .logo { height: 38px; width: auto; border-radius: 4px; background: #fff; }
.topnav { display: flex; gap: 4px; flex-wrap: wrap; }
.topnav a { color: var(--kopf-text); opacity: .85; text-decoration: none; padding: 6px 12px; border-radius: 6px; }
.topnav a:hover, .topnav a.on { background: rgba(127,127,127,.22); opacity: 1; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 18px; }
.wrap.narrow { max-width: 520px; }

/* Schritte */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-bottom: 1px solid var(--linie); }
.step { display: flex; gap: 10px; align-items: center; padding: 12px 16px; text-decoration: none; color: var(--grau); border-bottom: 3px solid transparent; }
.step .nr { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--linie); color: var(--text); display: grid; place-items: center; font-weight: 700; }
.step .txt { display: flex; flex-direction: column; line-height: 1.2; }
.step .txt b { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.step.done .nr { background: var(--gruen); color: #fff; }
.step.on { color: var(--text); border-bottom-color: var(--akzent); }
.step.on .nr { background: var(--akzent); color: #fff; }
@media (max-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); } .step small { display: none; } }
.subnav { display: flex; gap: 6px; margin-bottom: 14px; }
.subnav a { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid var(--linie); text-decoration: none; color: var(--text); }
.subnav a.on { background: var(--navy); color: var(--kopf-text); border-color: var(--navy); }

/* Meldungen */
.msg { padding: 10px 14px; border-radius: 8px; margin: 0 0 12px; border-left: 5px solid; background: #fff; }
.msg.ok { border-color: var(--gruen); }
.msg.err { border-color: var(--rot); background: #fff3f3; }
.msg.info { border-color: var(--gelb); background: #fffbea; }

/* Buttons */
.btn { display: inline-block; background: var(--akzent); color: var(--akzent-text); border: 2px solid var(--akzent); padding: 9px 18px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.07); }
.btn.ghost { background: #fff; color: var(--navy2); border-color: var(--linie); }
.btn.small { padding: 4px 10px; font-size: .88rem; }
.btn.big { padding: 16px 26px; font-size: 1.15rem; }
.btn.danger { background: var(--rot); border-color: var(--rot); color: #fff; }
.btn.danger.ghost { background: #fff; color: var(--rot); border-color: #f0c4c4; }
.btn.gruen { background: var(--gruen); border-color: var(--gruen); }
.btn.rot { background: var(--rot); border-color: var(--rot); }
button.icon { background: none; border: 1px solid var(--linie); border-radius: 6px; cursor: pointer; padding: 3px 8px; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 14px; }
.toolbar input[type=search] { margin-left: auto; }
.wizard-nav { display: flex; justify-content: space-between; margin: 30px 0 10px; padding-top: 18px; border-top: 1px solid var(--linie); }
form.inline { display: inline; }
.buttons { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }

/* Formulare */
.form { display: flex; flex-direction: column; gap: 10px; }
.form label { display: flex; flex-direction: column; gap: 3px; font-size: .9rem; color: #374151; }
.form label:has(> input[type=radio]), .form label:has(> input[type=checkbox]), .form label.check { flex-direction: row; align-items: center; gap: 8px; }
input, select, textarea { font: inherit; padding: 7px 9px; border: 1px solid #c8d0dc; border-radius: 6px; background: #fff; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--akzent); outline-offset: 0; border-color: var(--akzent); }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--linie); border-radius: var(--radius); background: #fff; padding: 12px 16px; margin: 0; }
legend { font-weight: 700; padding: 0 6px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > label { flex: 1 1 200px; }
.w-xs { width: 4.2em; } .w-s { width: 7em; }
.row > label:has(.w-s) { flex: 0 0 auto; }
.thumb { max-height: 80px; border-radius: 6px; display: block; margin-bottom: 4px; }
details.hilfe { background: #fff; border: 1px solid var(--linie); border-radius: 8px; padding: 8px 14px; margin-bottom: 14px; }
details.hilfe summary { cursor: pointer; font-weight: 600; }
.danger-zone { border: 1px solid #f0c4c4; }

/* Karten */
.card { background: #fff; border: 1px solid var(--linie); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 14px 0; }
.cards .card { margin: 0; }
.card.link { text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: 4px; border-left: 5px solid var(--akzent); }
.card.link b { font-size: 1.15rem; }
.card.link span { color: var(--grau); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }
.ko-card { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.podium { padding-left: 0; list-style: none; margin: 8px 0; }

/* Tabellen */
.tablewrap { overflow-x: auto; background: #fff; border-radius: var(--radius); border: 1px solid var(--linie); }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 7px 10px; border-bottom: 1px solid var(--linie); text-align: left; vertical-align: middle; }
th { background: var(--navy); color: var(--kopf-text); font-weight: 600; font-size: .88rem; white-space: nowrap; }
tbody tr:nth-child(even) { background: #f8f9fc; }
tr.aktiv td { background: #fff1e6 !important; font-weight: 600; }
tr.edit td { background: #fffbea !important; }
tr.st-fertig td { color: var(--grau); }
td.warn { color: #b45309; }
table.edit td { padding: 4px; }
table.edit input, table.edit select { width: 100%; }
table.edit input.w-xs { width: 4.2em; } table.edit input.w-s { width: 7em; }
table.kompakt td, table.kompakt th { padding: 4px 8px; font-size: .9rem; }
label.del { color: var(--rot); cursor: pointer; white-space: nowrap; }
.bar { height: 6px; background: var(--linie); border-radius: 3px; width: 90px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--gruen); }
.badge { display: inline-block; background: var(--akzent); color: #fff; border-radius: 10px; padding: 1px 8px; font-size: .8rem; font-weight: 600; }
.badge.warn { background: var(--gelb); color: #000; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tabs a { padding: 6px 14px; border-radius: 20px; background: #fff; border: 1px solid var(--linie); text-decoration: none; color: var(--text); }
.tabs a.on { background: var(--navy); color: var(--kopf-text); border-color: var(--navy); }
section.klasse { margin-bottom: 30px; }
.ko-baum { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
table.ko { background: #fff; border: 1px solid var(--linie); }
table.ko tr.sieger td { font-weight: 700; color: var(--gruen); }
table.ko tr.sep td { padding: 2px; background: var(--hell); border: 0; }
table.ko tr.frei td { color: var(--grau); font-style: italic; }
td.gesamt { font-weight: 700; }
.klassenliste li { margin: 4px 0; }

/* Erfassungsmaske */
.laufwahl { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.laufwahl label { display: flex; flex-direction: column; font-size: .85rem; }
.laufwahl select { font-size: 1.05rem; min-width: 320px; }
.fortschritt { font-weight: 600; color: var(--navy2); }
.erfassung { background: #fff; border: 1px solid var(--linie); border-radius: 14px; padding: 16px 20px; margin-bottom: 18px; }
.erf-kopf { display: flex; align-items: center; gap: 12px; }
.erf-kopf h1 { margin: 0 0 10px; }
.bahnen { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .bahnen { grid-template-columns: 1fr; } }
.bahn { border: 2px solid var(--navy2); }
.bahn legend { font-size: 1.15rem; color: var(--navy2); }
.bahn.aus { opacity: .35; border-color: var(--linie); background: #eef0f4; }
.bahn label.nr { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.bahn label.nr input { font-size: 2rem; width: 4.2em; text-align: center; font-weight: 700; }
.bahn .fname { font-size: 1.15rem; font-weight: 600; min-height: 1.6em; margin: 6px 0; }
.zeit { display: flex; align-items: flex-end; gap: 4px; margin: 8px 0; }
.zeit label { display: flex; flex-direction: column; align-items: center; font-size: .75rem; color: var(--grau); }
.zeit input { font-size: 2.2rem; width: 2.1em; text-align: center; font-variant-numeric: tabular-nums; padding: 4px; }
.zeit input.t-z, .zeit input.t-h { width: 1.4em; }
.zeit span { font-size: 2rem; font-weight: 700; padding-bottom: 6px; }
.status { display: flex; gap: 12px; flex-wrap: wrap; font-size: .9rem; }
.status label { display: flex; gap: 4px; align-items: center; }
.messung { min-height: 1.6em; margin-top: 8px; font-size: .95rem; }
.kommandos { display: flex; gap: 12px; flex-wrap: wrap; margin: 16px 0 6px; }
.naechste { list-style: none; padding: 0; margin: 0; font-size: 1.1rem; }
.naechste li { padding: 6px 0; border-bottom: 1px dashed var(--linie); }

/* Öffentliche Seiten (normal) */
.kopfzeile { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.kopfzeile .lauf { font-size: 1.2rem; }
.ziel { margin-left: auto; padding: 4px 14px; border-radius: 20px; font-weight: 700; color: #fff; }
.ziel.frei { background: var(--gruen); }
.ziel.belegt { background: var(--rot); }
.fahrerkarte, .infokarte { background: #fff; border: 1px solid var(--linie); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; }
.fk-kopf { display: flex; align-items: baseline; gap: 12px; font-size: 1.4rem; font-weight: 700; flex-wrap: wrap; }
.fk-kopf .snr { background: var(--navy); color: var(--kopf-text); border-radius: 8px; padding: 0 10px; }
.fk-kopf .bahn { margin-left: auto; font-size: .9rem; background: var(--akzent); color: #fff; border-radius: 6px; padding: 2px 10px; }
.kiste { color: var(--grau); margin: 2px 0 8px; }
table.laeufe tr.strecke td { color: var(--akzent); font-weight: 700; }
table.laeufe tr.offen td.r { color: var(--grau); }
.info-body { display: flex; gap: 16px; margin-top: 10px; }
.foto { width: 140px; height: 170px; object-fit: cover; border-radius: 8px; flex: 0 0 auto; }
.foto.leer { background: var(--navy2); color: #fff; display: grid; place-items: center; font-size: 2.5rem; font-weight: 700; }
dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; }
dt { font-weight: 600; color: var(--grau); }
dd { margin: 0; }
.leerseite { padding: 60px 20px; text-align: center; font-size: 1.4rem; color: var(--grau); }
tr.klassenzeile td { background: #eef2f9 !important; font-weight: 600; color: var(--navy2); }
.export { margin: 6px 0 14px; }
@media (max-width: 600px) {
  .info-body { flex-direction: column; }
  .foto { width: 100%; height: 220px; }
  dl { grid-template-columns: 1fr; gap: 0; } dd { margin-bottom: 8px; }
  th, td { padding: 6px; }
  .ergebnis td, .ergebnis th { font-size: .85rem; }
}

/* ================= HD-Ansicht (TV 1920x1080) ================= */
body.hd { background: var(--hd-hg); color: #fff; overflow: hidden; margin: 0; }
body.hd #stage { position: absolute; width: 1920px; height: 1080px; transform-origin: 0 0; padding: 34px 50px; overflow: hidden;
  background: radial-gradient(ellipse at top left, var(--hd-hg2) 0%, var(--hd-hg) 60%); }
body.hd .kopfzeile { margin-bottom: 26px; gap: 30px; }
body.hd .brand { font-size: 44px; }
body.hd .brand .logo { height: 80px; }
body.hd .kopfzeile .lauf { font-size: 38px; color: #cbd8f5; }
body.hd .kopfzeile .lauf b { color: #fff; }
body.hd .ziel { font-size: 30px; padding: 8px 26px; border-radius: 40px; }
body.hd h3 { font-size: 32px; margin: 0 0 14px; color: var(--akzent); text-transform: uppercase; letter-spacing: .04em; }
body.hd table { background: transparent; }
body.hd th { background: rgba(255,255,255,.08); color: #9fb3d9; font-size: 24px; padding: 8px 16px; }
body.hd td { font-size: 30px; padding: 7px 16px; border-bottom: 1px solid rgba(255,255,255,.1); color: #fff; }
body.hd tbody tr:nth-child(even) { background: rgba(255,255,255,.035); }
body.hd tr.aktiv td { background: var(--akzent) !important; color: var(--akzent-text); }
body.hd small { color: #9fb3d9; }
body.hd .hd-live { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; height: 900px; }
body.hd .hd-live .links.n2 { display: flex; flex-direction: column; gap: 22px; }
body.hd .fahrerkarte, body.hd .infokarte { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); padding: 22px 28px; border-radius: 18px; }
body.hd .fk-kopf { font-size: 54px; gap: 22px; }
body.hd .fk-kopf .snr { background: var(--akzent); color: var(--akzent-text); padding: 0 18px; border-radius: 12px; }
body.hd .fk-kopf .bahn { font-size: 28px; background: rgba(255,255,255,.15); }
body.hd .kiste { font-size: 28px; color: #9fb3d9; }
body.hd .n2 .fk-kopf { font-size: 44px; }
body.hd .n2 table.laeufe td { font-size: 24px; padding: 3px 14px; }
body.hd .n2 table.laeufe th { font-size: 18px; padding: 3px 14px; }
body.hd table.laeufe tr.aktiv td { background: rgba(242,107,29,.85) !important; }
body.hd table.laeufe tr.strecke td { color: var(--gelb); }
body.hd table.laeufe tr.aktiv.strecke td { color: #fff; }
body.hd .rechts table.rang td { font-size: 31px; padding: 5px 16px; }
body.hd .hd-info { display: grid; gap: 40px; height: 900px; }
body.hd .hd-info.n2 { grid-template-columns: 1fr 1fr; }
body.hd .hd-info .infokarte { padding: 34px 40px; }
body.hd .hd-info .info-body { gap: 40px; margin-top: 24px; }
body.hd .hd-info .foto { width: 380px; height: 480px; border-radius: 18px; }
body.hd .hd-info .foto.leer { font-size: 120px; background: rgba(255,255,255,.1); }
body.hd .hd-info.n2 .foto { width: 280px; height: 350px; }
body.hd dl { gap: 14px 30px; font-size: 34px; }
body.hd .hd-info.n2 dl { font-size: 27px; grid-template-columns: 1fr; gap: 2px; }
body.hd .hd-info.n2 dd { margin-bottom: 12px; }
body.hd dt { color: #9fb3d9; }
body.hd .leerseite { font-size: 60px; color: #9fb3d9; padding-top: 250px; }
body.hd .tablewrap { background: transparent; border: 0; overflow: hidden; }
body.hd table.ergebnis td { font-size: 30px; padding: 6px 14px; }
body.hd table.ergebnis th { font-size: 22px; }
body.hd tr.klassenzeile td { background: rgba(255,255,255,.1) !important; color: #cbd8f5; }
body.hd table.ko { border: 0; }
body.hd table.ko tr.sieger td { color: #6ee7a8; }
body.hd table.ko tr.sep td { background: transparent; padding: 6px; }
body.hd .hint { color: #9fb3d9; font-size: 22px; }
body.hd .leer { color: #9fb3d9; }
body.hd tr.aktiv small { color: #fff; }

/* Schritt-3-Leiste mit Streckenposten oben rechts */
.subnav-leiste { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.subnav-leiste .subnav { margin: 0; }
.posten-leiste { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-left: auto; }
.posten-pill { font: inherit; padding: 6px 14px; border-radius: 20px; border: 2px solid transparent; cursor: pointer; font-weight: 700; color: #fff; }
.posten-pill span { font-weight: 500; }
.posten-pill.st-frei { background: var(--gruen); cursor: default; }
.posten-pill.st-gesperrt { background: #e08a00; }
.posten-pill.st-unfall { background: var(--rot); animation: blink .6s steps(2) infinite; }
@keyframes blink { 50% { background: #7a0000; border-color: #fff; } }
.ton-an, .alarm-aus { font: inherit; padding: 6px 14px; border-radius: 20px; border: 1px solid var(--linie); background: #fff; cursor: pointer; }
.alarm-aus { background: var(--rot); color: #fff; border-color: var(--rot); font-weight: 700; }
body.alarm::after { content: ''; position: fixed; inset: 0; pointer-events: none; border: 10px solid var(--rot); animation: alarmrand .8s steps(2) infinite; z-index: 99; }
@keyframes alarmrand { 50% { border-color: transparent; } }
.steps.nur-eins { grid-template-columns: 1fr; }
.adresse { display: block; color: var(--grau); font-size: .75rem; margin: 1px 0 0 4px; }
.posten-anz { margin-top: 6px; }
.posten-anz label { font-weight: 600; }

/* Matrix Definition Wertung */
table.matrix th.probe { background: #3b5788; }
table.matrix td.zelle { background: #f6f7fa; }
table.matrix td.zelle.an { background: #e6f6ec; }
table.matrix td.zelle label { display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; }
table.matrix td.zelle input { width: 22px; height: 22px; }
table.matrix td.zelle small { font-size: .72rem; }
table.matrix td.leer { color: #c0c6d0; font-style: normal; }

/* Handy-Seite Streckenposten */
body.posten-seite { background: var(--hd-hg); color: #fff; }
.posten { display: flex; flex-direction: column; gap: 12px; padding: 12px; height: 100vh; height: 100dvh; }
.posten-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 1.05rem; flex-wrap: wrap; }
.posten-kopf small { color: #9fb3d9; }
.posten-kopf a, .posten-kopf button.link { color: #9fb3d9; background: none; border: 0; font: inherit; padding: 0; cursor: pointer; text-decoration: underline; }
.posten-aktuell { font-weight: 700; padding: 4px 12px; border-radius: 16px; background: rgba(255,255,255,.12); }
.posten[data-status="frei"] .posten-aktuell { background: var(--gruen); }
.posten[data-status="gesperrt"] .posten-aktuell { background: #e08a00; }
.posten[data-status="unfall"] .posten-aktuell { background: var(--rot); }
.pb { flex: 1 1 0; width: 100%; border: 0; border-radius: 18px; color: #fff; font: 800 clamp(2rem, 9vw, 4rem)/1.1 system-ui, sans-serif; letter-spacing: .02em;
  cursor: pointer; opacity: .7; transition: opacity .15s, transform .1s; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.pb:active { transform: scale(.98); }
.pb.aktiv { opacity: 1; box-shadow: 0 0 0 6px #fff inset; }
.pb.sendet { opacity: .8; }
.pb-frei { background: var(--gruen); }
.pb-gesperrt { background: #e08a00; }
.pb-unfall { background: var(--rot); flex-grow: 1.3; }
.posten[data-status="unfall"] .pb-unfall.aktiv { animation: blink .6s steps(2) infinite; }
.posten-fehler { background: #fff; color: var(--rot); font-weight: 700; text-align: center; padding: 8px; border-radius: 10px; }
.posten-wahl { padding: 20px; text-align: center; }
.posten-wahl a { color: #9fb3d9; }
.wahl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.wahl-grid .btn { padding: 26px 10px; font-size: 1.5rem; }

/* ============ Öffentliche Seiten: Navigation, Kopfbereiche ============ */
.topbar .home { color: inherit; text-decoration: none; }
.seitennav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; background: #fff; border-bottom: 1px solid var(--linie); position: sticky; top: 0; z-index: 5; }
.seitennav a { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 8px; text-decoration: none; color: var(--text);
  font-weight: 700; font-size: 1.05rem; border-bottom: 4px solid transparent; }
.seitennav a .ico { font-size: 1.2rem; }
.seitennav a.sn-live.on { border-color: var(--c-live); color: var(--c-live); background: #fdeeef; }
.seitennav a.sn-start.on { border-color: var(--c-start); color: var(--c-start); background: #ecf3fd; }
.seitennav a.sn-erg.on { border-color: var(--c-erg); color: #8a6700; background: #fdf7e3; }
@media (max-width: 560px) { .seitennav a { flex-direction: column; gap: 2px; font-size: .85rem; padding: 10px 4px; } }
.live-dot { display: inline-block; width: .7em; height: .7em; border-radius: 50%; background: var(--c-live); box-shadow: 0 0 0 0 rgba(214,47,58,.6); animation: puls 1.6s infinite; vertical-align: middle; }
@keyframes puls { 0% { box-shadow: 0 0 0 0 rgba(214,47,58,.6); } 70% { box-shadow: 0 0 0 .6em rgba(214,47,58,0); } 100% { box-shadow: 0 0 0 0 rgba(214,47,58,0); } }

.hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; color: #fff; border-radius: 14px; padding: 18px 22px; margin-bottom: 18px; }
.hero-live { background: linear-gradient(120deg, #b3202b, #e2474f); }
.hero-start { background: linear-gradient(120deg, #1452a3, #2f86e8); }
.hero-erg { background: linear-gradient(120deg, #a87c00, #e0b21e); }
.hero-titel { font-size: 1.9rem; font-weight: 800; letter-spacing: .01em; display: flex; align-items: center; gap: 12px; }
.hero-live .live-dot { background: #fff; }
.hero-unter { font-size: 1.1rem; opacity: .95; margin-top: 2px; }
.hero-rechts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn.hell { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.6); color: #fff; }
h2.sektion { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .06em; color: var(--grau); margin: 22px 0 10px; }
h2.sektion small { text-transform: none; letter-spacing: 0; }
.panel { background: #fff; border: 1px solid var(--linie); border-radius: var(--radius); padding: 4px 16px 14px; }
.panel h2.sektion { margin-top: 14px; }

/* Status Ziel / Strecke */
.status-gruppe { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.status-gruppe .ziel { margin-left: 0; }
.kopfzeile .status-gruppe { margin-left: auto; }
.strecken-status { display: flex; align-items: center; gap: 6px; }
.strecke { padding: 4px 14px; border-radius: 20px; font-weight: 700; color: #fff; }
.strecke.st-frei { background: var(--gruen); }
.strecke.st-gesperrt { background: #e08a00; }
.strecke.st-unfall { background: var(--rot); animation: blink .6s steps(2) infinite; }
.pp-liste { display: inline-flex; gap: 3px; }
.pp { width: 1.6em; height: 1.6em; border-radius: 50%; display: inline-grid; place-items: center; font-size: .8rem; font-weight: 700; color: #fff; border: 2px solid rgba(255,255,255,.7); }
.pp.st-frei { background: var(--gruen); }
.pp.st-gesperrt { background: #e08a00; }
.pp.st-unfall { background: var(--rot); animation: blink .6s steps(2) infinite; }
.start-status { margin: 10px 0 0; }
.card.c-live { border-left-color: var(--c-live); }
.card.c-start { border-left-color: var(--c-start); }
.card.c-erg { border-left-color: var(--c-erg); }

/* Große Bahn-Karten */
.bahnkarten { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.bahnkarten.n1 { grid-template-columns: minmax(0, 520px); }
@media (max-width: 640px) { .bahnkarten { grid-template-columns: 1fr; } }
.bahnkarte { background: #fff; border-radius: 14px; border: 1px solid var(--linie); padding: 14px 18px; display: grid;
  grid-template-columns: auto 1fr; grid-template-areas: "bahn bahn" "nr name" "nr kiste" "zeit zeit"; column-gap: 14px; align-items: center; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.bk-bahn { grid-area: bahn; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--grau); font-weight: 700; margin-bottom: 4px; }
.bk-nr { grid-area: nr; background: var(--navy); color: var(--kopf-text); font-weight: 800; font-size: 1.8rem; border-radius: 10px; padding: 4px 12px; text-align: center; }
.bk-name { grid-area: name; font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.bk-kiste { grid-area: kiste; color: var(--grau); }
.bk-zeit { grid-area: zeit; margin-top: 10px; font-size: 2.2rem; font-weight: 800; text-align: right; }
.bk-zeit.unterwegs { color: var(--c-live); animation: blink 1s steps(2) infinite; font-size: 1.6rem; }
.bk-zeit.bereit { color: var(--c-start); font-size: 1.4rem; }
.bk-zeit.aus { color: var(--grau); font-size: 1.3rem; }
.hero-live ~ .bahnkarten .bahnkarte { border-top: 5px solid var(--c-live); }
.hero-start ~ .bahnkarten .bahnkarte { border-top: 5px solid var(--c-start); }
.live-grid { margin-top: 6px; }

/* Zeitstrahl */
.zeitstrahl { list-style: none; padding: 0; margin: 0; position: relative; }
.zeitstrahl::before { content: ''; position: absolute; left: 62px; top: 6px; bottom: 6px; width: 3px; background: var(--linie); }
.zeitstrahl li { display: flex; gap: 22px; align-items: baseline; padding: 7px 0; position: relative; }
.zeitstrahl li::before { content: ''; position: absolute; left: 57px; top: 13px; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 3px solid var(--c-start); }
.zs-zeit { width: 46px; flex: 0 0 46px; font-weight: 700; color: var(--c-start); }
.zs-text { padding-left: 14px; }
.zeitstrahl li.zs-aktiv::before { background: var(--c-start); }
.zeitstrahl li.zs-aktiv .zs-text b { color: var(--c-start); }
.zeitstrahl li.zs-pause::before { border-color: var(--grau); border-style: dashed; }
.zeitstrahl li.zs-pause .zs-text { color: var(--grau); font-style: italic; }
table.queue td:first-child { color: var(--c-start); font-weight: 700; width: 4em; }

/* Treppchen */
.podest { display: flex; justify-content: center; align-items: flex-end; gap: 10px; margin: 6px 0 16px; }
.stufe { text-align: center; border-radius: 12px 12px 0 0; padding: 10px 12px; width: 190px; color: #1b2330; }
.stufe .pl { font-size: 1.9rem; font-weight: 900; }
.stufe .nm { font-weight: 700; }
.stufe .nr, .stufe .wt { font-size: .9rem; }
.stufe.s1 { background: linear-gradient(#f7d84a, #e0b21e); min-height: 150px; }
.stufe.s2 { background: linear-gradient(#e9edf2, #c4ccd6); min-height: 125px; }
.stufe.s3 { background: linear-gradient(#efc9a2, #cf9361); min-height: 105px; }
@media (max-width: 560px) { .stufe { width: 32%; padding: 8px 4px; } .stufe .nm { font-size: .85rem; } }

/* Ablaufplan: Zeitplanung */
td.zeitzelle small { display: block; font-size: .72rem; color: var(--grau); }
td.zeitzelle.q-fest { color: var(--c-start); font-weight: 700; }
td.zeitzelle.q-ist { color: var(--grau); }
form.zeitform { display: inline-flex; gap: 4px; align-items: center; }
form.zeitform select { padding: 4px; font-size: .85rem; }
form.zeitform input { padding: 4px; }
tr.pause-zeile td { background: #f4f4f4 !important; color: var(--grau); font-style: italic; padding: 4px 10px; }

/* QR-Anmeldung */
.qr-karte { text-align: center; max-width: 420px; margin: 0 auto; }
.qr-karte .qr svg, .qr-karte .qr img { width: 300px; height: 300px; }
.qr-karte .qr-url { word-break: break-all; font-size: .8rem; color: var(--grau); }
.farbfelder { display: flex; gap: 16px; flex-wrap: wrap; }
.farbfelder label { align-items: flex-start; }
.farbfelder input[type=color] { width: 70px; height: 44px; padding: 2px; }
@media print { .topbar, .steps, .wizard-nav, .no-print { display: none !important; } body { background: #fff; } }

/* HD: Status */
body.hd .strecke { font-size: 30px; padding: 8px 24px; border-radius: 40px; }
body.hd .pp { width: 44px; height: 44px; font-size: 22px; }
body.hd .status-gruppe { gap: 14px; }
.bahnkarten + .grid2, .bahnkarten + .live-grid { margin-top: 16px; }
