/* Smilytoys Quiz – Teilnehmer-Ansicht, TV-Anzeige und Rechtstexte.
   Farben nach Smilytoys-CI: Schwarz und Rot #b7393e, kein Gelb. Schrift: Red Hat Display (liegt lokal bei). */
@font-face {
  font-family: 'Red Hat Display';
  src: url('/fonts/rhd.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --black: #000;
  --white: #fff;
  --red: #b7393e;
  --red-deep: #8e2a2f;
  --smoke: #a3a3a3;
  --line: #333;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--black); color: var(--white);
  font-family: 'Red Hat Display', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px; line-height: 1.4; -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }

.wrap {
  min-height: 100dvh; max-width: 520px; margin: 0 auto; display: flex; flex-direction: column;
  padding: max(16px, env(safe-area-inset-top)) 20px max(16px, env(safe-area-inset-bottom));
}

/* Kopfzeile im Spiel */
.top { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; }
.top img { width: 44px; height: 44px; }
.top .who { margin-left: auto; text-align: right; line-height: 1.15; }
.top .nick { font-weight: 800; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .pts { color: var(--smoke); font-size: 15px; font-variant-numeric: tabular-nums; }

.conn { background: var(--white); color: var(--black); font-weight: 700; font-size: 15px; padding: 8px 12px; margin-bottom: 12px; }

h1 { font-weight: 900; font-size: clamp(2rem, 9.5vw, 3rem); line-height: 1.02; letter-spacing: -0.02em; margin: 0 0 12px; overflow-wrap: anywhere; }
h2 { font-weight: 800; font-size: 1.15rem; margin: 28px 0 8px; }
p { margin: 0 0 12px; }
.lead { font-size: 1.15rem; }
.soft { color: var(--smoke); }
.grow { flex: 1; }

/* Formular */
.join-logo { width: 84px; height: 84px; margin: 12px 0 20px; }
.field { display: block; margin: 18px 0 0; }
.field > span { display: block; font-weight: 700; margin-bottom: 6px; }
.field input[type=text], .field input[type=email], .field input[type=tel] {
  width: 100%; height: 56px; padding: 0 14px; border: 0; border-radius: 0; background: var(--white); color: var(--black);
  font-size: 18px; font-weight: 600;
}
.field small { display: block; color: var(--smoke); margin-top: 6px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; cursor: pointer; }
.choice + .choice { border-top: 1px solid var(--line); }
.choice input { width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--red); flex: none; }
.group { margin-top: 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.group-title { font-weight: 700; margin: 18px 0 0; }
.note { border-left: 4px solid var(--red); padding: 2px 0 2px 12px; margin: 14px 0 0; }
.error { background: var(--white); color: var(--black); font-weight: 700; padding: 12px 14px; margin-top: 16px; border-left: 8px solid var(--red); }

.btn {
  display: block; width: 100%; min-height: 60px; margin-top: 22px; padding: 12px 18px; border: 0; border-radius: 0; cursor: pointer;
  background: var(--red); color: var(--white); font-weight: 900; font-size: 1.2rem; box-shadow: 6px 6px 0 var(--white);
  transition: transform .06s, box-shadow .06s;
}
.btn:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0 var(--white); }
.btn[disabled] { opacity: .5; }
.linkbtn { background: none; border: 0; padding: 10px 0; text-decoration: underline; cursor: pointer; color: var(--smoke); font-size: 15px; text-align: left; }

/* Vorlauf 3-2-1 */
.count {
  flex: 1; display: grid; place-items: center; text-align: center;
  background-image: radial-gradient(circle, var(--red) 0 2.4px, transparent 2.9px); background-size: 14px 14px;
  margin: 0 -20px;
}
.count b { font-weight: 900; font-size: min(62vw, 300px); line-height: 1; font-variant-numeric: tabular-nums; text-shadow: 8px 8px 0 var(--black); }
.count span { display: block; font-weight: 800; font-size: 1.3rem; background: var(--black); padding: 4px 12px; }

/* Frage */
.qhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.qmeta { font-weight: 700; color: var(--smoke); }
.qmeta strong { display: block; color: var(--white); font-weight: 900; font-size: 1.25rem; }
.secs { font-weight: 900; font-size: 3.4rem; line-height: .9; font-variant-numeric: tabular-nums; }
.secs.hot { color: var(--red); }
.bar { height: 12px; background: var(--line); margin: 10px 0 18px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; background: var(--red); transform-origin: left center; }
.qtext { font-weight: 800; font-size: clamp(1.3rem, 5.6vw, 1.7rem); line-height: 1.2; margin: 0 0 18px; }

.opts { display: grid; gap: 12px; }
.opt {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 10px 14px; border: 3px solid var(--white); border-radius: 0;
  background: var(--white); color: var(--black); font-weight: 800; font-size: 1.15rem; text-align: left; cursor: pointer;
}
.opt .key { flex: none; width: 38px; height: 38px; display: grid; place-items: center; background: var(--black); color: var(--white); font-weight: 900; }
.opt .txt { flex: 1; overflow-wrap: anywhere; }
.opt .tag { flex: none; font-size: .85rem; font-weight: 800; }
button.opt:active { transform: translate(2px, 2px); }
.opt.mine { background: var(--red); border-color: var(--red); color: var(--white); }
.opt.mine .key { background: var(--white); color: var(--red); }
.opt.dim { background: transparent; border-color: var(--line); color: var(--smoke); }
.opt.dim .key { background: var(--line); color: var(--smoke); }
.opt.right { background: var(--white); border-color: var(--white); color: var(--black); box-shadow: 6px 6px 0 var(--red); }
.opt.wrong { background: transparent; border-color: var(--white); color: var(--white); }
.opt.wrong .txt { text-decoration: line-through; text-decoration-thickness: 2px; }
.opt.wrong .key { background: var(--white); color: var(--black); }
.status { margin-top: 18px; font-weight: 700; }

/* Auflösung */
.verdict { font-weight: 900; font-size: clamp(2.2rem, 11vw, 3.2rem); line-height: 1; letter-spacing: -0.02em; margin: 4px 0 6px; }
.verdict.yes { display: inline-block; background: var(--red); padding: 6px 12px 8px; margin-left: -12px; }
.songline { border-left: 4px solid var(--red); padding-left: 12px; margin: 18px 0 0; }
.songline b { display: block; font-size: 1.15rem; }
.stand { display: flex; align-items: baseline; gap: 12px; margin: 26px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.stand b { font-weight: 900; font-size: 2.6rem; line-height: 1; font-variant-numeric: tabular-nums; }

/* Rangliste */
.board { list-style: none; margin: 10px 0 0; padding: 0; }
.board li { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.board .r { width: 2ch; font-weight: 900; font-variant-numeric: tabular-nums; text-align: right; }
.board .n { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .p { font-weight: 800; font-variant-numeric: tabular-nums; }
.board li:first-child { font-size: 1.25rem; }
.board li.me { background: var(--red); border-bottom-color: var(--red); }

.foot { margin-top: 36px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; color: var(--smoke); }
.foot button { font-size: 14px; padding: 0; }

/* Rechtstexte */
.legal main { max-width: 680px; margin: 0 auto; padding: 24px 20px 60px; }
.legal .logo { width: 72px; height: 72px; }
.legal h1 { font-size: clamp(1.8rem, 7vw, 2.6rem); margin-top: 16px; }

@media (prefers-reduced-motion: reduce) { .btn, button.opt { transition: none; } }
