:root {
  --bg: #0f0f10;
  --fl: #18181a;
  --line: #2c2c2f;
  --text: #f2f2f2;
  --mute: #8a8a8e;
  --soft: #bdbdc1;
  --accent: #f2a65a;
  --yes-bg: #1c2a20; --yes-line: #2f4a36; --yes: #9fd9ad;
  --no-bg: #2b1e1e;  --no-line: #4a2f2f;  --no: #e3a5a5;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
.weg { visibility: hidden; }

html, body { height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); }
body { -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; touch-action: manipulation; }

.screen {
  min-height: 100vh; min-height: 100dvh;
  max-width: 520px; margin: 0 auto;
  display: flex; flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 18px) 20px calc(env(safe-area-inset-bottom) + 20px);
}

.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 40px; color: var(--mute); font-size: .9rem; }
.mid { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 14px; padding: 24px 0; }
.bottom { display: flex; flex-direction: column; gap: 10px; }
.bottom.row { flex-direction: row; }
.bottom.row .btn { flex: 1; }
.bottom.row .btn.narrow { flex: 0 0 auto; width: auto; padding-left: 18px; padding-right: 18px; }

.accent { color: var(--accent); }
.logo { font-size: clamp(3rem, 15vw, 4.5rem); font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.lead { color: var(--soft); font-size: 1.15rem; }
.stats, .hint { color: var(--mute); font-size: .85rem; line-height: 1.45; }
.sub { color: var(--soft); font-size: 1.05rem; }

.btn { display: block; width: 100%; border-radius: 16px; padding: 17px 16px; font-weight: 600; font-size: 1.05rem; text-align: center; transition: transform .08s ease, background .15s ease; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--text); color: var(--bg); }
.btn.ghost { border: 1px solid var(--line); color: var(--soft); }
.btn.small { width: auto; padding: 12px 16px; font-size: .95rem; }
.btn.yes { background: var(--yes-bg); border: 1px solid var(--yes-line); color: var(--yes); padding: 34px 16px; font-size: 1.35rem; }
.btn.no  { background: var(--no-bg);  border: 1px solid var(--no-line);  color: var(--no);  padding: 34px 16px; font-size: 1.35rem; }
.link { color: var(--mute); font-size: .95rem; padding: 8px 0; }
.link.danger { color: var(--no); }

/* Spiel */
.phase { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.prefix { color: var(--mute); font-size: 1rem; }
.frage { font-size: clamp(1.7rem, 7.5vw, 2.4rem); font-weight: 600; line-height: 1.25; letter-spacing: -.01em; max-width: 16em; }
.zahl { font-size: clamp(7rem, 40vw, 11rem); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.zahl.puls { animation: puls .45s ease-out; }
@keyframes puls { from { transform: scale(.82); opacity: .4; } to { transform: scale(1); opacity: 1; } }
.stack { width: 100%; display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.reaktion { font-size: clamp(1.8rem, 8vw, 2.4rem); font-weight: 600; }
.reaktion.yes { color: var(--yes); }
.reaktion.no { color: var(--no); }

/* Ergebnis */
.score { font-size: clamp(5rem, 28vw, 7rem); font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.score .von { font-size: .3em; color: var(--mute); font-weight: 600; letter-spacing: 0; }
.badge { color: var(--accent); font-weight: 600; font-size: .95rem; border: 1px solid #5a4430; border-radius: 999px; padding: 6px 14px; }

/* Text-Seiten */
.text { padding: 12px 0 24px; }
.text h2 { font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: 20px; }
.text h3 { font-size: 1rem; color: var(--soft); margin: 28px 0 10px; }
.rules { padding-left: 1.3em; display: grid; gap: 12px; line-height: 1.5; color: var(--soft); }
.rules em { font-style: normal; color: var(--text); }
.rules b { color: var(--text); }
.tips { list-style: none; display: grid; gap: 10px; color: var(--mute); font-size: .92rem; line-height: 1.5; }
.tips li { padding-left: 14px; position: relative; }
.tips li::before { content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

.field { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.field:last-child { border-bottom: 0; }
.label { color: var(--soft); font-size: .92rem; }
.two { display: flex; gap: 10px; }
.two > * { flex: 1; min-width: 0; }
.two > .btn.small { flex: 0 0 auto; }
input[type=text], select { background: var(--fl); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; font-size: 1rem; width: 100%; outline: none; }
input[type=text]:focus, select:focus { border-color: #4a4a4f; }
select { appearance: none; -webkit-appearance: none; }

.seg { display: flex; background: var(--fl); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.seg button { flex: 1; padding: 11px 8px; border-radius: 9px; color: var(--mute); font-size: .95rem; }
.seg button.on { background: #2a2a2d; color: var(--text); }

.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 1rem; cursor: pointer; }
.toggle input { order: 2; appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 999px; background: #2a2a2d; position: relative; transition: background .2s; flex: 0 0 auto; cursor: pointer; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #d9d9dc; transition: transform .2s; }
.toggle input:checked { background: #7a5a36; }
.toggle input:checked::after { transform: translateX(20px); background: var(--accent); }
