/* Gemeinsames Design: festlich, Nachtblau/Aubergine mit Gold und Champagner */
:root {
  --bg: #0f1634;
  --bg2: #3a1840;
  --gold: #e8b84a;
  --champagne: #f6e7c1;
  --ink: #f8f3e6;
  --muted: #b9b2cf;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-border: rgba(246, 231, 193, 0.22);
  /* Antwortfarben (Okabe-Ito-nah, farbenblind-tauglich) + Buchstabe */
  --a: #3b8fd9;
  --b: #e69f00;
  --c: #1fa67a;
  --d: #cc79a7;
  --a-ink: #ffffff;
  --b-ink: #1b1200;
  --c-ink: #ffffff;
  --d-ink: #1b0a14;
  --ok: #4cd08a;
  --bad: #ff8a80;
  --radius: 18px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: radial-gradient(120% 90% at 50% 0%, var(--bg2) 0%, var(--bg) 70%) fixed;
  background-color: var(--bg);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: 0.01em; }
.gold { color: var(--gold); }
.champagne { color: var(--champagne); }
.muted { color: var(--muted); }
.center { text-align: center; }

.phone {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
  padding: calc(16px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right))
           calc(20px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
  max-width: 560px; margin: 0 auto; gap: 14px;
}
.phone-head { font-size: 1.05rem; color: var(--champagne); display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.phone-head .title { font-weight: 800; color: var(--gold); }
.phone-main { flex: 1; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.big { font-size: 2rem; line-height: 1.2; }
.huge { font-size: 3.6rem; line-height: 1.05; font-weight: 900; color: var(--gold); }
.panel { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 18px; }
.question-text { font-size: 1.45rem; font-weight: 700; line-height: 1.3; color: var(--champagne); }
.question-img { width: 100%; max-height: 28vh; object-fit: contain; border-radius: 12px; }
.meta { display: flex; justify-content: space-between; font-size: 0.95rem; color: var(--muted); }

.btn, .answer {
  font: inherit; border: 0; cursor: pointer; border-radius: var(--radius);
  min-height: 64px; width: 100%; padding: 14px 16px; text-align: left;
  touch-action: manipulation;
}
.btn {
  background: linear-gradient(180deg, var(--champagne), var(--gold)); color: #2a1a00;
  font-weight: 800; font-size: 1.2rem; text-align: center;
}
.btn:disabled { opacity: 0.55; }
.field {
  font: inherit; font-size: 1.3rem; width: 100%; min-height: 64px; padding: 12px 16px;
  border-radius: var(--radius); border: 2px solid var(--panel-border);
  background: rgba(0, 0, 0, 0.3); color: var(--ink);
}
.field:focus { outline: none; border-color: var(--gold); }
.error { color: var(--bad); font-weight: 600; min-height: 1.3em; }

.answers { display: flex; flex-direction: column; gap: 10px; }
.answer { display: flex; align-items: center; gap: 14px; font-size: 1.2rem; font-weight: 700; color: var(--ink); border: 3px solid transparent; }
.answer .letter {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 900; font-size: 1.3rem; background: rgba(255, 255, 255, 0.92); color: #1b1440;
}
.answer .label { flex: 1; overflow-wrap: anywhere; }
.answer.opt-0 { background: var(--a); color: var(--a-ink); }
.answer.opt-1 { background: var(--b); color: var(--b-ink); }
.answer.opt-2 { background: var(--c); color: var(--c-ink); }
.answer.opt-3 { background: var(--d); color: var(--d-ink); }
.answer.dim { opacity: 0.35; }
.answer.selected { border-color: #fff; box-shadow: 0 0 0 3px var(--gold), 0 0 22px rgba(232, 184, 74, 0.6); }
.answer.correct { border-color: #fff; box-shadow: 0 0 0 3px var(--ok); }
.answer .mark { font-size: 1.4rem; }
.answer:disabled { cursor: default; }

.countdown { height: 12px; border-radius: 6px; background: rgba(255, 255, 255, 0.15); overflow: hidden; }
.countdown > i { display: block; height: 100%; width: 100%; background: var(--gold); transform-origin: left; }
.countdown.low > i { background: var(--bad); }
.secs { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--champagne); }

.result-ok { color: var(--ok); }
.result-bad { color: var(--bad); }
.rankline { font-size: 1.4rem; color: var(--champagne); font-weight: 700; }

.conn {
  position: fixed; left: 0; right: 0; top: 0; z-index: 50; text-align: center;
  padding: calc(6px + env(safe-area-inset-top)) 10px 6px; font-size: 0.9rem; font-weight: 700;
  background: #7a2b2b; color: #fff;
}
.conn[hidden] { display: none; }
