:root {
  --bg: #0d2a22;
  --bg2: #143c30;
  --card: #1b4a3c;
  --line: #2f6553;
  --text: #f6efe0;
  --muted: #b9cabf;
  --gold: #f0c35a;
  --red: #c8372d;
  --red2: #a52a22;
  --ok: #58c27d;
  --bad: #e2695f;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 700px at 50% -10%, var(--bg2), var(--bg)) fixed;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3, .serif { font-family: Georgia, "Times New Roman", serif; font-weight: 700; margin: 0; }
h1 { color: var(--gold); letter-spacing: .01em; }
.muted { color: var(--muted); }
.gold { color: var(--gold); }
.center { text-align: center; }
.hidden { display: none !important; }

.wrap { max-width: 34rem; margin: 0 auto; padding: 1rem 1rem 3rem; }
.wide { max-width: 60rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem; margin: 1rem 0; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grow { flex: 1 1 auto; }

button, .btn {
  font: inherit; font-weight: 700; color: #fff; background: var(--red); border: 0; border-radius: 12px;
  padding: .85rem 1.2rem; cursor: pointer; text-decoration: none; display: inline-block; touch-action: manipulation;
}
button:hover { background: var(--red2); }
button:disabled { opacity: .5; cursor: default; }
button.big { width: 100%; font-size: 1.2rem; padding: 1.05rem; }
button.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
button.ghost:hover { background: rgba(255,255,255,.06); }
button.small { padding: .4rem .7rem; border-radius: 9px; font-size: .9rem; }
button.gold { background: var(--gold); color: #2a1e00; }

input, textarea, select {
  font: inherit; color: var(--text); background: #0f3229; border: 1px solid var(--line); border-radius: 12px;
  padding: .8rem .9rem; width: 100%;
}
input:focus, textarea:focus, select:focus, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }
label { display: block; font-size: .85rem; color: var(--muted); margin: .7rem 0 .25rem; }
.err { color: #ffb4ac; min-height: 1.4em; margin-top: .5rem; }

.badge { display: inline-block; background: rgba(240,195,90,.15); color: var(--gold); border-radius: 999px; padding: .15rem .7rem; font-size: .85rem; font-weight: 700; }
.qtext { font-family: Georgia, serif; font-size: 1.45rem; line-height: 1.25; margin: .6rem 0 1rem; }

.opts { display: grid; gap: .6rem; }
.opt { text-align: left; background: #0f3229; border: 2px solid var(--line); color: var(--text); font-weight: 600; display: flex; gap: .7rem; align-items: center; }
.opt:hover { background: #134035; }
.opt b { color: var(--gold); min-width: 1.2em; }
.opt.sel { border-color: var(--gold); background: #1f5445; }

.timer { height: 8px; background: rgba(255,255,255,.12); border-radius: 99px; overflow: hidden; margin: .4rem 0 .2rem; }
.timer > i { display: block; height: 100%; width: 100%; background: var(--gold); transition: width .25s linear; }
.timer.low > i { background: var(--bad); }

.bigval { font-family: Georgia, serif; font-size: 2.2rem; color: var(--gold); }
.plus { color: var(--ok); font-weight: 800; }
.zero { color: var(--muted); }

table { width: 100%; border-collapse: collapse; }
td, th { padding: .45rem .4rem; text-align: left; border-bottom: 1px solid rgba(255,255,255,.08); }
th { color: var(--muted); font-weight: 600; font-size: .85rem; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.me td { color: var(--gold); font-weight: 700; }
.dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; background: #6b7f76; margin-right: .4rem; }
.dot.on { background: var(--ok); }

.tabs { display: flex; gap: .5rem; margin-top: 1rem; }
.tabs button { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.tabs button.act { background: var(--card); color: var(--gold); border-color: var(--gold); }
.qcard { border: 1px solid var(--line); border-radius: 14px; padding: .9rem; margin: .8rem 0; background: rgba(0,0,0,.12); }
.qcard .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .8rem; }
.optrow { display: flex; gap: .5rem; align-items: center; margin: .35rem 0; }
.optrow input[type=radio] { width: 1.3rem; height: 1.3rem; flex: none; accent-color: var(--gold); }
.sticky { position: sticky; bottom: 0; background: var(--bg); padding: .8rem 0; border-top: 1px solid var(--line); }

/* ---------- Fernseher ---------- */
body.screen { overflow: hidden; }
.stage { height: 100vh; padding: 4vh 5vw; display: flex; flex-direction: column; }
.stage header { display: flex; justify-content: space-between; align-items: baseline; font-size: clamp(1rem, 1.6vw, 1.6rem); color: var(--muted); }
.stage main { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 0; }
.s-title { font-size: clamp(2.4rem, 6vw, 6rem); text-align: center; }
.s-q { font-family: Georgia, serif; font-size: clamp(1.8rem, 4.2vw, 4.4rem); line-height: 1.15; text-align: center; margin: 0 0 4vh; }
.s-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 2vh 2vw; }
.s-opt { background: var(--card); border: 3px solid var(--line); border-radius: 1.2vw; padding: 2.2vh 2vw; font-size: clamp(1.2rem, 2.6vw, 2.8rem); display: flex; gap: 1.2vw; align-items: center; }
.s-opt b { color: var(--gold); }
.s-opt .cnt { margin-left: auto; color: var(--muted); font-size: .8em; }
.s-opt.right { border-color: var(--ok); background: #1f5f47; }
.s-opt.wrong { opacity: .55; }
.s-sol { font-family: Georgia, serif; color: var(--gold); font-size: clamp(2.5rem, 7vw, 7.5rem); text-align: center; line-height: 1.05; }
.s-note { text-align: center; color: var(--muted); font-size: clamp(1rem, 1.8vw, 1.8rem); margin-top: 1vh; }
.s-list { margin: 3vh auto 0; width: min(100%, 70rem); font-size: clamp(1.1rem, 2.2vw, 2.3rem); columns: 1; }
.s-list.two { columns: 2; column-gap: 4vw; }
.s-row { display: flex; gap: 1.2vw; padding: .7vh 0; border-bottom: 1px solid rgba(255,255,255,.1); break-inside: avoid; align-items: baseline; }
.s-row .rk { width: 2.2em; color: var(--gold); font-weight: 800; text-align: right; }
.s-row .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-row .vl { color: var(--muted); font-variant-numeric: tabular-nums; }
.s-row .pt { width: 3.2em; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.s-timer { height: 1.6vh; margin-top: 4vh; }
.s-count { text-align: center; color: var(--muted); font-size: clamp(1rem, 2vw, 2rem); margin-top: 2vh; }
.lobby { display: grid; grid-template-columns: auto 1fr; gap: 5vw; align-items: center; margin-top: 4vh; }
.qr { background: #fff; padding: 1.4vw; border-radius: 1.4vw; width: min(36vh, 30vw); }
.qr svg { display: block; width: 100%; height: auto; }
.url { font-size: clamp(1.1rem, 2.4vw, 2.4rem); color: var(--gold); word-break: break-all; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 1vh 1vw; margin-top: 2vh; }
.chip { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: .5vh 1.3vw; font-size: clamp(1rem, 1.9vw, 2rem); }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 2vw; margin: 2vh 0; }
.pod { background: var(--card); border: 3px solid var(--line); border-radius: 1.2vw 1.2vw 0 0; width: 22vw; text-align: center; padding: 2vh 1vw; font-size: clamp(1.1rem, 2.2vw, 2.4rem); }
.pod .medal { font-size: 1.8em; }
.pod.p1 { border-color: var(--gold); padding-bottom: 9vh; }
.pod.p2 { padding-bottom: 5vh; }
.pod.p3 { padding-bottom: 2vh; }
.pod .nm { font-weight: 800; overflow-wrap: anywhere; }

.s-list.tight { margin-top: 0; font-size: clamp(.85rem, 1.3vw, 1.4rem); }
.s-list.tight .s-row { padding: .35vh 0; }

/* Abstimmung */
.chips.big { justify-content: center; margin-top: 3vh; }
.chips.big .chip { font-size: clamp(1.1rem, 2.2vw, 2.4rem); padding: 1vh 1.8vw; }
.s-bars { display: grid; gap: 1.2vh; margin: 2.5vh auto 0; width: min(90vw, 1100px); }
.s-bar { display: grid; grid-template-columns: 22% 1fr 3.5em; gap: 1.2vw; align-items: center; font-size: clamp(1.1rem, 2.3vw, 2.5rem); }
.s-bar .nm { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-bar .bar { background: rgba(255,255,255,.08); border-radius: 999px; height: 1.1em; overflow: hidden; }
.s-bar .bar i { display: block; height: 100%; background: var(--muted); border-radius: 999px; }
.s-bar.win .bar i { background: var(--gold); }
.s-bar.win .nm { color: var(--gold); font-weight: 800; }
.s-bar .cnt { font-variant-numeric: tabular-nums; font-weight: 800; }
.award { text-align: center; margin-top: 3vh; font-size: clamp(1.2rem, 2.6vw, 2.8rem); }
.award b { color: var(--gold); }
