/* =========================================================================
   Quiz Tool – Gestaltung
   Sachlich und klar: kühles Hellgrau, weiße Flächen mit feinen Linien,
   ein Blau als einzige Akzentfarbe, eine Schrift (IBM Plex Sans).
   Bewegung nur dort, wo sich etwas ändert: Frage erscheint, Auflösung,
   Punkte zählen, Rangliste sortiert sich um.
   ========================================================================= */

@font-face { font-family: "IBM Plex Sans"; font-weight: 300; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-700-normal.woff2") format("woff2"); }

:root {
  --grund: #F4F5F7;
  --flaeche: #FFFFFF;
  --flaeche-2: #F8F9FA;
  --linie: #E2E5E9;
  --linie-stark: #C9CFD6;
  --tinte: #151B23;
  --tinte-2: #5A6470;
  --tinte-3: #8A939E;
  --akzent: #0F5C9E;
  --akzent-dunkel: #0B4A80;
  --akzent-hell: #EAF2F9;
  --akzent-mittel: #C4D9EC;
  --ok: #1E7A4E;
  --ok-hell: #E7F3EC;
  --nok: #B3402F;
  --nok-hell: #F8E9E6;
  --warn-hell: #FFF6E0;
  --neutral: #8A939E;

  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r-klein: 6px;
  --r: 8px;
  --r-gross: 12px;
  --rand: clamp(16px, 4vw, 40px);
  --schatten: 0 1px 2px rgba(21, 27, 35, .06), 0 12px 32px -16px rgba(21, 27, 35, .28);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh;
  font: 400 1.0625rem/1.5 var(--sans); color: var(--tinte);
  background: var(--grund);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
  font-feature-settings: "kern";
}
#app { outline: none; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.2; font-weight: 600; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
a { color: var(--akzent); text-underline-offset: 3px; }
code, pre { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .88em; }
[hidden] { display: none !important; }
.unsichtbar { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip-path: inset(50%); }
.leise { color: var(--tinte-2); }
.klein { font-size: .9rem; }
.noscript { padding: 2rem; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; border-radius: 4px; }

.icon { display: inline-grid; place-items: center; width: 1.15em; height: 1.15em; flex: none; }
.icon svg { width: 100%; height: 100%; display: block; }

/* ---------- Knöpfe ---------- */

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  border: 1px solid transparent; border-radius: var(--r); padding: .62em 1.1em; min-height: 44px;
  font-weight: 500; line-height: 1.2; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, transform .1s;
  touch-action: manipulation;
}
.knopf:active:not(:disabled) { transform: translateY(1px); }
.knopf:disabled, .knopf.gesperrt { opacity: .45; cursor: not-allowed; pointer-events: none; }
.knopf-primaer { background: var(--akzent); color: #fff; }
.knopf-primaer:hover { background: var(--akzent-dunkel); }
.knopf-zweit { background: var(--flaeche); color: var(--tinte); border-color: var(--linie-stark); }
.knopf-zweit:hover { border-color: var(--tinte-2); }
.knopf-leise { background: transparent; color: var(--tinte-2); }
.knopf-leise:hover { color: var(--tinte); background: rgba(21, 27, 35, .05); }
.knopf-gefahr { background: var(--nok); color: #fff; }
.knopf-gefahr:hover { background: #962f20; }
.gefahr-text { color: var(--nok); }
.knopf-gross { font-size: 1.06rem; padding: .8em 1.4em; min-height: 52px; }
.knopf-klein { font-size: .92rem; padding: .4em .8em; min-height: 36px; }
.knopf-voll { width: 100%; }
.knopf-reihe { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.link-knopf { background: none; border: 0; padding: 0; color: var(--akzent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-weight: 500; }
.icon-knopf {
  display: inline-grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: var(--r);
  border: 0; background: transparent; color: var(--tinte-2); cursor: pointer; padding: 0;
  transition: background-color .15s, color .15s;
}
.icon-knopf svg { width: 21px; height: 21px; display: block; }
.icon-knopf:hover:not(:disabled) { background: rgba(21, 27, 35, .06); color: var(--tinte); }
.icon-knopf:disabled { opacity: .3; cursor: default; }
.icon-knopf.klein { width: 34px; height: 34px; }
.icon-knopf.klein svg { width: 18px; height: 18px; }
.icon-knopf.rund { border: 1px solid var(--linie-stark); background: var(--flaeche); border-radius: 50%; }

/* ---------- Formularfelder ---------- */

.feld { display: grid; gap: 6px; align-content: start; }
.feld-label { font-weight: 500; font-size: .95rem; }
.feld-hilfe { color: var(--tinte-2); font-size: .88rem; }
.feld-fehler { color: var(--nok); font-weight: 500; font-size: .95rem; }
.feld-zeile { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.feld-zeile > input, .feld-zeile > select { flex: 1 1 180px; }
input[type="text"], input[type="password"], input[type="url"], input[type="number"], input:not([type]), select, textarea {
  width: 100%; padding: .62em .8em; border-radius: var(--r); border: 1px solid var(--linie-stark);
  background: var(--flaeche); min-height: 46px; font-size: 1rem;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; line-height: 1.45; }
select { appearance: none; -webkit-appearance: none; padding-right: 2.2em; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A6470' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .7em center; background-size: 1.1em; }
input:focus, select:focus, textarea:focus { border-color: var(--akzent); outline: none; box-shadow: 0 0 0 3px var(--akzent-hell); }
input[aria-invalid="true"] { border-color: var(--nok); }
input.kurz { max-width: 9em; }
.haken-feld { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.haken-feld input { width: 18px; height: 18px; accent-color: var(--akzent); }

.schalter { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; padding: 4px 0; position: relative; }
.schalter input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.schalter-knopf { flex: none; position: relative; width: 40px; height: 24px; border-radius: 999px; margin-top: 1px; background: var(--linie-stark); transition: background-color .2s; }
.schalter-knopf::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .2s var(--ease); }
.schalter input:checked + .schalter-knopf { background: var(--akzent); }
.schalter input:checked + .schalter-knopf::after { transform: translateX(16px); }
.schalter input:focus-visible + .schalter-knopf { outline: 2px solid var(--akzent); outline-offset: 2px; }
.schalter-text { display: grid; }
.schalter-titel { font-weight: 500; }
.schalter-info { color: var(--tinte-2); font-size: .92rem; }

.segment { display: inline-flex; border: 1px solid var(--linie-stark); border-radius: var(--r); overflow: hidden; background: var(--flaeche); justify-self: start; }
.segment-knopf { position: relative; padding: .6em 1.4em; cursor: pointer; font-weight: 500; transition: background-color .15s, color .15s; }
.segment-knopf input { position: absolute; opacity: 0; }
.segment-knopf + .segment-knopf { border-left: 1px solid var(--linie-stark); }
.segment-knopf.aktiv { background: var(--akzent); color: #fff; }
.segment-knopf:focus-within { box-shadow: inset 0 0 0 2px var(--akzent-mittel); }

.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-gross); padding: clamp(20px, 4vw, 32px); }

/* ---------- Banner, Toasts, Dialoge ---------- */

.banner { position: sticky; top: 0; z-index: 40; background: var(--warn-hell); color: #5a3d00; border-bottom: 1px solid #ecd59a; padding: 10px var(--rand); font-weight: 500; text-align: center; }
.toasts { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 8px; z-index: 60; width: min(460px, calc(100vw - 32px)); pointer-events: none; }
.toast { background: var(--tinte); color: #fff; padding: 12px 16px; border-radius: var(--r); font-weight: 500; box-shadow: var(--schatten); transition: opacity .3s, transform .3s; }
.toast-fehler { background: var(--nok); }
.toast.weg { opacity: 0; transform: translateY(6px); }

.dialog { border: 0; border-radius: var(--r-gross); padding: clamp(18px, 4vw, 28px); width: min(460px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; background: var(--flaeche); color: var(--tinte); box-shadow: 0 24px 64px -24px rgba(0, 0, 0, .45); }
.dialog-breit { width: min(1000px, calc(100vw - 24px)); }
.dialog::backdrop { background: rgba(21, 27, 35, .5); }
.dialog-titel { font-size: 1.35rem; font-weight: 600; margin-bottom: 10px; letter-spacing: -.01em; }
.dialog-text { color: var(--tinte-2); margin-bottom: 6px; }
.dialog-knoepfe { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.menue-knoepfe { display: grid; gap: 8px; margin-top: 12px; }
.menue-knoepfe .knopf { justify-content: flex-start; }

/* ---------- Fortschritt: ein Segment pro Schritt ---------- */

.schritte { display: flex; gap: 4px; padding: 0 var(--rand); height: 4px; }
.schritt { flex: 1 1 0; height: 100%; border-radius: 2px; background: var(--linie); position: relative; overflow: hidden; }
.schritt.fertig { background: var(--akzent-mittel); }
.schritt.aktuell { background: var(--akzent-mittel); }
.schritt.aktuell::after { content: ""; position: absolute; inset: 0; background: var(--akzent); transform-origin: left; }

/* ---------- Initialen-Kreis ---------- */

.avatar {
  --bg: #E7EDF3; --fg: #2C4A66;
  display: inline-grid; place-items: center; flex: none; width: 2em; height: 2em; border-radius: 50%;
  background: var(--bg); color: var(--fg); font-weight: 600; font-size: .78em; line-height: 1; letter-spacing: .01em;
  user-select: none; -webkit-user-select: none; vertical-align: middle;
}
.avatar.k0 { --bg: #E4ECF5; --fg: #23476B; } .avatar.k1 { --bg: #F3E8E1; --fg: #7A3E1D; } .avatar.k2 { --bg: #E3F0E8; --fg: #245A3B; }
.avatar.k3 { --bg: #F4E4E4; --fg: #7C2B2B; } .avatar.k4 { --bg: #ECE7F4; --fg: #4A3A72; } .avatar.k5 { --bg: #E1EFF1; --fg: #1F5560; }
.avatar.k6 { --bg: #F2EDDD; --fg: #6A5418; } .avatar.k7 { --bg: #F3E5EC; --fg: #7A2D52; } .avatar.k8 { --bg: #E8EAED; --fg: #39424D; }
.avatar.k9 { --bg: #E9F0DF; --fg: #44591F; } .avatar.k10 { --bg: #E2E8F6; --fg: #2B3F7A; } .avatar.k11 { --bg: #F2E6DF; --fg: #6E3B24; }
.mini-avatar { font-size: .62em; margin-right: .25em; }
.avatar-gross { font-size: 1.15rem; }

/* ---------- Startseite ---------- */

.start { width: min(520px, 100%); margin: 0 auto; padding: clamp(32px, 10vh, 96px) var(--rand) 48px; display: grid; gap: 24px; }
.wortmarke { display: inline-flex; align-items: center; gap: .32em; font-weight: 600; font-size: clamp(2.2rem, 9vw, 3rem); line-height: 1; letter-spacing: -.025em; color: var(--tinte); }
.wortmarke::before { content: ""; flex: none; width: .82em; height: .82em; border-radius: .2em; background: var(--akzent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='30' cy='30' r='13' fill='none' stroke='%23fff' stroke-width='6'/%3E%3Cpath d='M37 37l11 11' stroke='%23fff' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.wortmarke.klein { font-size: 1.6rem; }
.wortmarke-klein { display: inline-flex; align-items: center; gap: .4em; font-weight: 600; font-size: 1.12rem; letter-spacing: -.015em; color: var(--tinte); }
.wortmarke-klein::before { content: ""; width: 1em; height: 1em; border-radius: .22em; background: var(--akzent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='30' cy='30' r='13' fill='none' stroke='%23fff' stroke-width='6'/%3E%3Cpath d='M37 37l11 11' stroke='%23fff' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.start-kopf { display: grid; gap: 12px; }
.start-claim { font-size: 1.15rem; color: var(--tinte-2); }
.beitreten h2 { font-size: 1.35rem; margin-bottom: 18px; letter-spacing: -.01em; }
.beitreten form { display: grid; gap: 16px; }
.feld input.eingabe-code { font-size: 2rem; font-weight: 500; letter-spacing: .12em; padding: .3em .5em; min-height: 60px; font-variant-numeric: tabular-nums; }
.start-admin { display: inline-flex; align-items: center; gap: 8px; justify-self: start; color: var(--tinte-2); font-weight: 500; text-decoration: none; padding: 8px 2px; }
.start-admin:hover { color: var(--akzent); }
.angebot { display: grid; gap: 12px; background: var(--flaeche); border: 1px solid var(--akzent-mittel); border-left: 3px solid var(--akzent); border-radius: var(--r); padding: 14px 16px; }
.angebot p { font-weight: 500; }
.info-text { font-size: 1.25rem; line-height: 1.45; }
.fuss { color: var(--tinte-3); font-size: .85rem; }

/* ---------- Raum: Rahmen ---------- */

.raum { min-height: 100dvh; display: flex; flex-direction: column; }
.raum-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px var(--rand); min-height: 58px; }
.spieler .raum-kopf { background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.kopf-links, .kopf-rechts { display: flex; align-items: center; gap: 12px; min-width: 0; }
.kopf-marke { display: inline-flex; align-items: center; gap: .4em; font-weight: 600; font-size: 1.05rem; letter-spacing: -.015em; }
.kopf-marke::before { content: ""; width: 1em; height: 1em; border-radius: .22em; background: var(--akzent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='30' cy='30' r='13' fill='none' stroke='%23fff' stroke-width='6'/%3E%3Cpath d='M37 37l11 11' stroke='%23fff' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.kopf-code, .kopf-anzahl { color: var(--tinte-2); font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.kopf-avatar { font-size: .85rem; }
.kopf-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kopf-punkte { font-weight: 600; font-size: 1.15rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.kopf-punkte small { font-weight: 400; font-size: .85rem; color: var(--tinte-2); }
.raum > .schritte { margin: 4px 0 6px; }
.spieler > .schritte { margin-top: 0; padding: 0; gap: 2px; height: 3px; }
.spieler > .schritte .schritt { border-radius: 0; }
.raum-inhalt { flex: 1; display: flex; flex-direction: column; padding: clamp(14px, 2.6vh, 32px) var(--rand) 28px; width: 100%; }
.spieler .raum-inhalt, .host.handy .raum-inhalt { max-width: 760px; margin: 0 auto; }
.host.beamer .raum-inhalt { max-width: 1680px; margin: 0 auto; }

.host-aktionen {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap;
  padding: 12px var(--rand) calc(12px + env(safe-area-inset-bottom));
  background: rgba(244, 245, 247, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--linie);
}
.status { display: flex; align-items: center; gap: 12px; color: var(--tinte-2); font-weight: 500; min-width: 0; flex: 1; font-variant-numeric: tabular-nums; }
.host-aktionen .knopf-reihe { margin-left: auto; }
.status-balken { --anteil: 0; position: relative; flex: none; width: 110px; height: 4px; border-radius: 999px; background: var(--linie); overflow: hidden; }
.status-balken::after { content: ""; position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--anteil)); background: var(--akzent); transition: transform .4s var(--ease), background-color .3s; }
.status-balken.voll::after { background: var(--ok); }

/* ---------- Lobby ---------- */

.lobby { display: grid; gap: clamp(24px, 4vw, 56px); align-items: start; }
.einladung { display: grid; gap: 22px; }
.einladung-text { display: grid; gap: 2px; }
.einladung-schritt { color: var(--tinte-2); font-size: 1.05rem; }
.einladung-url { font-weight: 600; font-size: clamp(1.25rem, 2.6vw, 2.1rem); line-height: 1.2; letter-spacing: -.01em; overflow-wrap: anywhere; margin-bottom: 10px; }
.einladung-url.lang { font-size: clamp(1.1rem, 2vw, 1.7rem); }
.raumcode { font-weight: 600; font-size: clamp(3.2rem, 10vw, 8rem); line-height: 1; letter-spacing: .04em; color: var(--tinte); font-variant-numeric: tabular-nums; }
.raumcode .luecke { display: inline-block; width: .28em; }
.einladung-qr { display: flex; align-items: center; gap: 16px; }
.einladung-qr figcaption { color: var(--tinte-2); max-width: 11em; }
.qr { background: #fff; padding: 10px; border-radius: var(--r); border: 1px solid var(--linie); width: clamp(130px, 24vh, 250px); flex: none; line-height: 0; }
.qr svg { width: 100%; height: auto; display: block; }
.warnung { background: var(--nok-hell); color: var(--nok); border-radius: var(--r); padding: 10px 14px; font-weight: 500; }
.einladung-dialog .raumcode { font-size: 3.6rem; }
.einladung-dialog .einladung-url { font-size: 1.2rem; }
.warteliste { display: grid; gap: 14px; align-content: start; }
.quiz-titel { font-weight: 600; font-size: clamp(1.6rem, 3vw, 2.5rem); line-height: 1.15; letter-spacing: -.02em; }
.quiz-meta { color: var(--tinte-2); }
.lobby-zahl { font-weight: 600; font-size: clamp(1.15rem, 1.8vw, 1.6rem); font-variant-numeric: tabular-nums; }

.internet-hinweis { display: flex; align-items: flex-start; gap: 10px; max-width: 40em; padding: 10px 14px; border-radius: var(--r); background: var(--flaeche); border: 1px solid var(--linie); color: var(--tinte-2); font-weight: 500; }
.internet-hinweis .icon { width: 1.3em; height: 1.3em; margin-top: .1em; }
.internet-hinweis.bereit { border-color: #BFDCCB; background: var(--ok-hell); color: var(--ok); }
.internet-hinweis.fehler { border-color: #E8C4BC; background: var(--nok-hell); color: var(--nok); }
.internet-hinweis.laedt .icon { animation: drehen 2.4s linear infinite; }
.internet-hinweis a { color: inherit; font-weight: 600; }
.internet-zusatz { margin-top: 4px; font-weight: 400; font-size: .9rem; color: var(--tinte-2); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; border-radius: 999px; background: var(--flaeche); border: 1px solid var(--linie); font-weight: 500; font-size: 1.02rem; transition: border-color .15s, opacity .3s; }
button.chip { cursor: pointer; }
button.chip:hover { border-color: var(--nok); text-decoration: line-through; text-decoration-color: var(--nok); }
.chip.offline { opacity: .45; }
.chip.ich { border-color: var(--akzent); }
.chip-avatar { font-size: .8rem; }
.chips-klein .chip { font-size: .92rem; padding: 3px 10px 3px 3px; }
.chips-klein .chip-avatar { font-size: .7rem; }

/* ---------- Frage: Kopf, Text, Medien, Timer ---------- */

.buehne { display: flex; flex-direction: column; gap: clamp(12px, 2.2vh, 26px); position: relative; }
.frage-kopf { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; min-height: 44px; }
.frage-nummer { font-weight: 500; color: var(--tinte-2); font-size: .95rem; font-variant-numeric: tabular-nums; }
.frage-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.frage-tags li { font-size: .82rem; font-weight: 500; color: var(--tinte-2); background: var(--flaeche); border: 1px solid var(--linie); padding: 1px 9px; border-radius: 999px; }
.frage-kopf .timer { margin-left: auto; }
.frage-text { font-weight: 600; font-size: clamp(1.4rem, 5.4vw, 1.95rem); line-height: 1.2; letter-spacing: -.015em; text-wrap: balance; }
.buehne .frage-text { font-size: clamp(1.7rem, 3.3vw, 3.5rem); max-width: 30em; }
.folien-titel { font-weight: 600; font-size: clamp(2rem, 5vw, 4.6rem); line-height: 1.08; letter-spacing: -.025em; text-wrap: balance; }
.folien-text { font-size: clamp(1.1rem, 2vw, 1.85rem); line-height: 1.5; max-width: 40em; white-space: pre-line; color: var(--tinte-2); }
.buehne-frage { display: grid; gap: 14px; }
.frage-medien { display: grid; gap: 10px; justify-items: start; }
.frage-bild { max-height: 34vh; width: auto; border-radius: var(--r); background: var(--flaeche); border: 1px solid var(--linie); }
.spiel-eingabe .frage-bild { max-height: 26vh; }
.frage-audio { width: min(420px, 100%); }
@media (min-width: 1100px) {
  .buehne.mit-bild .buehne-frage { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .buehne.mit-bild .frage-medien { justify-items: end; }
  .buehne.mit-bild .frage-bild { max-height: 30vh; max-width: 38vw; }
}

.timer { position: relative; width: clamp(60px, 6vw, 100px); aspect-ratio: 1; flex: none; --rest: 1; }
.timer-ring, .timer-ring svg { width: 100%; height: 100%; display: block; }
.timer-ring svg { transform: rotate(-90deg); }
.timer-spur { fill: none; stroke: var(--linie); stroke-width: 4; }
.timer-wert { fill: none; stroke: var(--akzent); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--rest)); transition: stroke-dashoffset .2s linear, stroke .3s; }
.timer .timer-zahl { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 500; font-size: clamp(1.4rem, 2.3vw, 2.3rem); line-height: 1; font-variant-numeric: tabular-nums; transition: color .3s; }
.timer.knapp .timer-wert { stroke: var(--nok); }
.timer.knapp .timer-zahl { color: var(--nok); }
.timer-ohne { border: 2px dashed var(--linie-stark); border-radius: 50%; }
.timer-ohne .timer-zahl { color: var(--tinte-3); }

.zeitbalken { --rest: 1; display: flex; align-items: center; gap: 10px; }
.zeitbalken-spur { flex: 1; height: 4px; border-radius: 999px; background: var(--linie); overflow: hidden; }
.zeitbalken-wert { height: 100%; width: 100%; background: var(--akzent); transform-origin: left; transform: scaleX(var(--rest)); transition: transform .2s linear, background-color .3s; border-radius: 999px; }
.zeitbalken .timer-zahl { min-width: 2.2em; text-align: right; font-weight: 500; font-size: 1.2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.zeitbalken.knapp .zeitbalken-wert { background: var(--nok); }
.zeitbalken.knapp .timer-zahl { color: var(--nok); }
.zeitbalken-ohne span { color: var(--tinte-2); font-weight: 500; font-size: .92rem; }

/* ---------- Antwort-Zeilen ---------- */

.zeilen { display: grid; gap: 10px; }
.zeile {
  position: relative; display: flex; align-items: center; gap: .85em; width: 100%; overflow: hidden;
  background: var(--flaeche); border: 1px solid var(--linie-stark); border-radius: var(--r);
  padding: .5em .9em .5em .5em; min-height: 3.5em; text-align: left; color: var(--tinte);
  font-weight: 500; font-size: 1.06rem; line-height: 1.25;
}
button.zeile { cursor: pointer; transition: border-color .15s, background-color .15s, opacity .25s; touch-action: manipulation; }
button.zeile:hover:not(:disabled) { border-color: var(--akzent); }
button.zeile:active:not(:disabled) { background: var(--akzent-hell); }
button.zeile:disabled { opacity: .55; cursor: default; }
.zeile-marke { position: relative; z-index: 1; flex: none; width: 2.2em; height: 2.2em; display: grid; place-items: center; border-radius: var(--r-klein); background: var(--flaeche-2); border: 1px solid var(--linie); color: var(--tinte-2); font-weight: 600; font-size: 1em; transition: background-color .25s, color .25s, border-color .25s; }
.zeile-marke .icon { width: 1.05em; height: 1.05em; }
.zeile-inhalt { position: relative; z-index: 1; flex: 1; min-width: 0; display: grid; gap: 6px; }
.zeile-text { overflow-wrap: anywhere; }
.zeile-zahl { position: relative; z-index: 1; margin-left: auto; display: grid; justify-items: end; font-weight: 600; font-size: 1.15em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.zeile-zahl small { font-weight: 400; font-size: .68em; color: var(--tinte-2); }
.zeile.gewaehlt { border-color: var(--akzent); background: var(--akzent-hell); }
.zeile.gewaehlt .zeile-marke { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.zeilen.aufgeloest .zeile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--anteil, 0) * 100%); background: var(--akzent-hell); }
.zeile.richtig { border-color: var(--ok); }
.zeilen.aufgeloest .zeile.richtig::before { background: var(--ok-hell); }
.zeile.richtig .zeile-marke { background: var(--ok); border-color: var(--ok); color: #fff; }
.zeile.nicht-richtig { color: var(--tinte-2); border-color: var(--linie); }
.zeilen-wf { grid-template-columns: 1fr 1fr; }
.zeilen-wf .zeile { min-height: 4.4em; }
.zeilen.mit-bild { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.zeilen.mit-bild .zeile { flex-direction: column; align-items: stretch; padding: .5em; }
.zeilen.mit-bild .zeile-marke { position: absolute; top: .4em; left: .4em; z-index: 2; width: 2em; height: 2em; }
.zeile-bild { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--flaeche-2); border-radius: var(--r-klein); }
.zeilen.mit-bild .zeile-zahl { margin-left: 0; justify-items: start; grid-auto-flow: column; gap: 6px; align-items: baseline; }

.zeilen-gross { font-size: clamp(1rem, 1.5vw, 1.8rem); }
.zeilen-gross .zeile { font-size: 1em; }
@media (min-width: 900px) { .zeilen-gross:not(.mit-bild) { grid-template-columns: 1fr 1fr; } }
.zeilen-klein .zeile { font-size: .98rem; min-height: 2.9em; }

/* ---------- Bühne: Ergebnisse ---------- */

.hinweis-tafel { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 18px; padding: clamp(16px, 3vh, 30px); border: 1px dashed var(--linie-stark); border-radius: var(--r-gross); color: var(--tinte-2); font-size: clamp(1.05rem, 1.8vw, 1.65rem); font-weight: 500; background: var(--flaeche); }
.hinweis-icon { width: clamp(30px, 3.2vw, 48px); height: auto; color: var(--tinte-3); }
.kennzahl { color: var(--tinte-2); font-size: 1.05rem; }
.kennzahl strong { font-weight: 600; font-size: clamp(2rem, 3.6vw, 3.3rem); line-height: 1; color: var(--tinte); margin-right: 6px; font-variant-numeric: tabular-nums; }
.ergebnis-block { display: grid; gap: 14px; justify-items: start; }
.loesung-gross { font-weight: 600; font-size: clamp(2.1rem, 5.6vw, 5.2rem); line-height: 1.05; letter-spacing: -.02em; color: var(--ok); font-variant-numeric: tabular-nums; border-left: 4px solid var(--ok); padding: .02em 0 .06em .35em; }
.loesung-auch { color: var(--tinte-2); font-size: clamp(1rem, 1.5vw, 1.35rem); max-width: 44em; }

.eingaben { display: flex; flex-wrap: wrap; gap: 8px; }
.eingabe { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px; background: var(--flaeche); border: 1px solid var(--linie); font-weight: 500; font-size: clamp(.95rem, 1.4vw, 1.3rem); }
.eingabe .icon { width: 1.3em; height: 1.3em; border-radius: 50%; color: #fff; padding: 3px; }
.eingabe.ok { border-color: #A9D1BA; }
.eingabe.ok .icon { background: var(--ok); }
.eingabe.nok { color: var(--tinte-2); }
.eingabe.nok .icon { background: var(--neutral); }
.eingabe small { color: var(--tinte-2); }

.tipps { display: grid; gap: 6px; width: 100%; max-width: 860px; counter-reset: tipp; }
.tipp { display: grid; grid-template-columns: 2em 1.7em minmax(0, 1fr) auto minmax(7em, auto); align-items: center; gap: 12px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-klein); padding: 8px 14px; font-size: clamp(.95rem, 1.4vw, 1.3rem); counter-increment: tipp; font-variant-numeric: tabular-nums; }
.tipp::before { content: counter(tipp); color: var(--tinte-3); font-weight: 500; }
.tipp.ok { border-color: #A9D1BA; box-shadow: inset 3px 0 0 var(--ok); }
.tipp-avatar { font-size: .62em; }
.tipp-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tipp-wert { font-weight: 600; }
.tipp-diff { color: var(--tinte-2); text-align: right; }

.sortiert-anzeige { display: grid; gap: 8px; max-width: 900px; width: 100%; }
.sortiert-anzeige li { display: flex; align-items: center; gap: .8em; background: var(--flaeche); border: 1px solid var(--linie-stark); border-radius: var(--r); padding: .45em .9em .45em .45em; font-size: clamp(1rem, 1.5vw, 1.6rem); font-weight: 500; }
.sortiert-anzeige.richtig li { border-color: #A9D1BA; }
.sortiert-anzeige.richtig .zeile-marke { background: var(--ok); border-color: var(--ok); color: #fff; }

.regler-anzeige { display: grid; gap: 10px; max-width: 900px; width: 100%; }
.regler-skala { display: flex; align-items: center; gap: 14px; font-weight: 600; font-size: clamp(1.1rem, 2vw, 1.7rem); font-variant-numeric: tabular-nums; }
.regler-linie { flex: 1; height: 4px; border-radius: 999px; background: var(--linie-stark); }

.skala-anzeige { display: grid; gap: 8px; max-width: 900px; width: 100%; }
.skala-werte { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.skala-werte li { display: grid; place-items: center; height: clamp(44px, 7vh, 80px); background: var(--flaeche); border: 1px solid var(--linie-stark); border-radius: var(--r-klein); font-weight: 600; font-size: clamp(1.1rem, 2vw, 1.9rem); font-variant-numeric: tabular-nums; }
.skala-labels { display: flex; justify-content: space-between; gap: 16px; color: var(--tinte-2); font-size: .95rem; width: 100%; max-width: 900px; }
.skala-labels span:last-child { text-align: right; }

.saeulen { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; align-items: end; width: 100%; max-width: 900px; height: clamp(160px, 30vh, 320px); border-bottom: 1px solid var(--linie-stark); padding-bottom: 0; }
.saeule { --anteil: 0; display: grid; grid-template-rows: auto 1fr auto; height: 100%; justify-items: center; gap: 4px; }
.saeule-zahl { font-weight: 600; font-size: 1.05rem; color: var(--tinte-2); font-variant-numeric: tabular-nums; }
.saeule-balken { align-self: end; width: 100%; height: calc(var(--anteil) * 100%); min-height: 2px; background: var(--akzent); border-radius: 3px 3px 0 0; }
.saeule-wert { font-weight: 500; font-size: 1rem; color: var(--tinte-2); }
.saeule.kritiker .saeule-balken { background: var(--nok); }
.saeule.passiv .saeule-balken { background: var(--neutral); }
.saeule.promotor .saeule-balken { background: var(--ok); }
.saeulen.klein { height: 150px; }
.nps-gruppen { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.nps-gruppen ul { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.nps-gruppen li { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.nps-gruppen li::before { content: ""; width: 10px; height: 10px; border-radius: 2px; }
.nps-gruppen li.kritiker::before { background: var(--nok); }
.nps-gruppen li.passiv::before { background: var(--neutral); }
.nps-gruppen li.promotor::before { background: var(--ok); }

.wolke { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .2em .8em; padding: clamp(10px, 3vh, 34px); max-width: 1200px; margin: 0 auto; }
.wolke-wort { --g: .5; font-weight: 600; font-size: calc(1.1rem + var(--g) * clamp(1.3rem, 3.2vw, 3.4rem)); line-height: 1.1; letter-spacing: -.015em; color: var(--akzent); }
.wolke-wort.t1 { color: var(--tinte); }
.wolke-wort.t2 { color: var(--tinte-2); font-weight: 500; }

.karten-wand { columns: 3 280px; column-gap: 12px; }
.karten-wand li { break-inside: avoid; margin-bottom: 12px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r); padding: 10px 14px; font-size: clamp(1rem, 1.3vw, 1.3rem); line-height: 1.45; }

.ideen-wand { display: flex; flex-wrap: wrap; gap: 8px; }
.ideen-wand li { display: inline-flex; align-items: center; gap: 6px; background: var(--flaeche); border: 1px solid var(--linie-stark); border-radius: var(--r); padding: 6px 6px 6px 14px; font-weight: 500; font-size: clamp(1rem, 1.4vw, 1.4rem); }
.ideen-rang { display: grid; gap: 8px; max-width: 900px; width: 100%; }
.ideen-rang li { display: grid; grid-template-columns: 3em minmax(0, 1fr) auto; align-items: center; gap: 12px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r); padding: 8px 14px 8px 8px; font-size: clamp(1rem, 1.4vw, 1.4rem); }
.ideen-rang li.top { border-color: var(--akzent-mittel); }
.idee-stimmen { display: grid; place-items: center; height: 2em; border-radius: var(--r-klein); background: var(--flaeche-2); border: 1px solid var(--linie); color: var(--tinte-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.ideen-rang li.top .idee-stimmen { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.idee-text { font-weight: 500; }
.idee-autor { color: var(--tinte-2); font-size: .9em; white-space: nowrap; }

.erklaerung { border-left: 3px solid var(--akzent-mittel); background: var(--flaeche); border-radius: 0 var(--r) var(--r) 0; padding: 12px 18px; font-size: clamp(1rem, 1.45vw, 1.45rem); line-height: 1.5; max-width: 52em; color: var(--tinte-2); }

/* Bild antippen */
.bild-tipp { position: relative; display: inline-block; max-width: 100%; line-height: 0; border-radius: var(--r); overflow: hidden; border: 1px solid var(--linie); background: var(--flaeche); align-self: start; justify-self: start; user-select: none; -webkit-user-select: none; }
.bild-tipp img { display: block; max-width: 100%; max-height: 56vh; width: auto; height: auto; }
.buehne .bild-tipp img { max-height: 58vh; }
.bild-tipp.interaktiv { cursor: crosshair; touch-action: manipulation; }
.bild-ebene { position: absolute; inset: 0; pointer-events: none; }
.bild-punkt, .bild-pin { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--akzent); border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.bild-punkt.ok { background: var(--ok); }
.bild-punkt.nok { background: var(--nok); }
.bild-pin { width: 24px; height: 24px; margin: -12px 0 0 -12px; box-shadow: 0 0 0 5px rgba(15, 92, 158, .22), 0 1px 3px rgba(0, 0, 0, .4); }
.bild-bereich { position: absolute; border: 3px solid var(--ok); background: rgba(30, 122, 78, .18); border-radius: 3px; box-shadow: 0 0 0 2px #fff; }
.bild-bereich.bearbeiten { border-style: dashed; }
.bereich-zeichnen { cursor: crosshair; touch-action: none; }

/* ---------- Handy: Eingaben ---------- */

.spiel-eingabe { display: flex; flex-direction: column; gap: 14px; position: relative; }
.hinweis-klein { color: var(--tinte-2); font-weight: 400; font-size: .95rem; }
.eingabe-mehrfach, .eingabe-bild, .eingabe-sortieren, .eingabe-regler, .eingabe-skala, .eingabe-ideen, .eingabe-abstimmung { display: grid; gap: 12px; }
.eingabe-form { display: grid; gap: 12px; }
.eingabe-zeile { display: flex; align-items: center; gap: 10px; }
.eingabe-zeile input, .eingabe-form textarea { flex: 1; min-width: 0; font-size: 1.25rem; min-height: 56px; }
.eingabe-form textarea { font-size: 1.1rem; }
.einheit { font-weight: 600; font-size: 1.25rem; color: var(--tinte-2); }
.zeichen-zaehler { justify-self: end; color: var(--tinte-2); font-size: .85rem; font-variant-numeric: tabular-nums; }
.wort-felder { display: grid; gap: 8px; }
.zeit-um-text { display: none; font-weight: 600; color: var(--nok); }
.spiel-eingabe.zeit-um .zeit-um-text { display: block; }

.regler-wert { justify-self: center; font-weight: 600; font-size: clamp(2.2rem, 11vw, 3.2rem); line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.regler-zeile { display: flex; align-items: center; gap: 10px; }
.regler-grenzen { display: flex; justify-content: space-between; color: var(--tinte-2); font-weight: 500; font-variant-numeric: tabular-nums; }
input.regler { --fuellung: .5; flex: 1; width: auto; -webkit-appearance: none; appearance: none; height: 44px; background: transparent; min-height: 0; border: 0; padding: 0; box-shadow: none; }
input.regler:focus { box-shadow: none; }
input.regler::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--akzent) calc(var(--fuellung) * 100%), var(--linie-stark) calc(var(--fuellung) * 100%)); }
input.regler::-moz-range-track { height: 6px; border-radius: 999px; background: var(--linie-stark); }
input.regler::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--akzent); }
input.regler::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -11px; border-radius: 50%; background: #fff; border: 2px solid var(--akzent); box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
input.regler::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid var(--akzent); }
input.regler:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--akzent-mittel); }

.sortier-liste { display: grid; gap: 8px; }
.sortier-eintrag { display: flex; align-items: center; gap: 8px; background: var(--flaeche); border: 1px solid var(--linie-stark); border-radius: var(--r); padding: 4px; min-height: 56px; position: relative; transition: box-shadow .2s, border-color .2s; }
.sortier-eintrag.zieht { z-index: 3; border-color: var(--akzent); box-shadow: var(--schatten); }
.sortier-griff { display: grid; place-items: center; width: 40px; align-self: stretch; color: var(--tinte-3); cursor: grab; touch-action: none; }
.sortier-griff svg { width: 20px; height: 20px; }
.sortier-nr { flex: none; width: 2em; height: 2em; display: grid; place-items: center; border-radius: var(--r-klein); background: var(--flaeche-2); border: 1px solid var(--linie); color: var(--tinte-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.sortier-text { flex: 1; min-width: 0; font-weight: 500; }
.sortier-knoepfe { display: flex; }

.skala-knoepfe { display: grid; grid-template-columns: repeat(auto-fit, minmax(44px, 1fr)); gap: 6px; }
.skala-knoepfe.anzahl-11 { grid-template-columns: repeat(6, 1fr); }
@media (min-width: 560px) { .skala-knoepfe.anzahl-11 { grid-template-columns: repeat(11, 1fr); } }
.skala-knopf { width: 100%; min-height: 56px; border-radius: var(--r); border: 1px solid var(--linie-stark); background: var(--flaeche); font-weight: 600; font-size: 1.3rem; cursor: pointer; font-variant-numeric: tabular-nums; transition: border-color .15s, background-color .15s, opacity .25s; }
.skala-knopf:hover:not(:disabled) { border-color: var(--akzent); color: var(--akzent); }
.skala-knopf:disabled { opacity: .55; }

.meine-ideen { display: grid; gap: 6px; }
.meine-ideen li { background: var(--flaeche); border: 1px solid var(--linie); border-left: 3px solid var(--akzent); border-radius: var(--r-klein); padding: 8px 12px; font-weight: 500; }
.ideen-auswahl { display: grid; gap: 8px; }
.idee-knopf { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 14px 10px 10px; min-height: 54px; background: var(--flaeche); border: 1px solid var(--linie-stark); border-radius: var(--r); font-weight: 500; cursor: pointer; transition: border-color .15s, background-color .15s; }
.idee-knopf small { margin-left: auto; color: var(--tinte-2); font-weight: 400; }
.idee-check { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--linie-stark); display: grid; place-items: center; color: transparent; transition: background-color .15s, border-color .15s, color .15s; }
.idee-check svg { width: 15px; height: 15px; }
.idee-knopf.gewaehlt { border-color: var(--akzent); background: var(--akzent-hell); }
.idee-knopf.gewaehlt .idee-check { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.idee-knopf.eigene { opacity: .6; cursor: default; }

.warte-karte { display: grid; justify-items: start; gap: 8px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-gross); padding: 22px; }
.gross-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--akzent); color: #fff; padding: 12px; }
.warte-titel { font-weight: 600; font-size: 1.4rem; line-height: 1.2; letter-spacing: -.01em; }
.abgegeben { display: grid; gap: 16px; }
.abgegeben-antwort { font-weight: 500; color: var(--tinte-2); overflow-wrap: anywhere; }
.fortschritt-box { display: flex; align-items: center; gap: 12px; font-weight: 500; color: var(--tinte-2); font-variant-numeric: tabular-nums; }

.aufloesung { display: grid; gap: 14px; }
.ergebnis { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 16px; padding: 18px 20px; border-radius: var(--r-gross); border: 1px solid; }
.ergebnis-ok { background: var(--ok-hell); border-color: #BFDCCB; color: var(--ok); }
.ergebnis-nok { background: var(--nok-hell); border-color: #E8C4BC; color: var(--nok); }
.ergebnis-leer { background: var(--flaeche); border-color: var(--linie); color: var(--tinte-2); }
.ergebnis-neutral { background: var(--akzent-hell); border-color: var(--akzent-mittel); color: var(--akzent-dunkel); }
.ergebnis-icon { grid-row: span 2; width: 48px; height: 48px; border-radius: 50%; background: currentColor; padding: 12px; }
.ergebnis-icon svg { color: #fff; }
.ergebnis-leer .ergebnis-icon { background: var(--neutral); }
.ergebnis-titel { font-weight: 600; font-size: 1.75rem; line-height: 1.1; letter-spacing: -.015em; }
.ergebnis-punkte { font-weight: 500; color: var(--tinte); font-variant-numeric: tabular-nums; }
.loesung-box { display: grid; gap: 6px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-gross); padding: 16px 18px; }
.loesung-label { color: var(--tinte-2); font-weight: 500; font-size: .92rem; }
.loesung-text { font-weight: 600; font-size: 1.4rem; line-height: 1.25; overflow-wrap: anywhere; }
.deine-antwort { color: var(--tinte-2); overflow-wrap: anywhere; }
.loesung-box .erklaerung { margin-top: 8px; font-size: 1rem; background: var(--flaeche-2); }
.loesung-box .bild-tipp img { max-height: 40vh; }
.statistik-klein { display: grid; gap: 10px; }
.statistik-klein h2 { font-size: 1rem; color: var(--tinte-2); font-weight: 500; }
.statistik-klein .loesung-gross { font-size: 2rem; }
.statistik-klein .tipp { grid-template-columns: 1.6em 1.5em minmax(0, 1fr) auto; font-size: .95rem; }
.statistik-klein .tipp-diff { display: none; }
.statistik-klein .wolke-wort { font-size: calc(1rem + var(--g) * 1.3rem); }
.statistik-klein .karten-wand { columns: 1; }
.platz-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.platz-aenderung { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px 2px 6px; border-radius: 999px; font-weight: 500; font-size: .9rem; }
.platz-aenderung.hoch { background: var(--ok-hell); color: var(--ok); }
.platz-aenderung.runter { background: var(--nok-hell); color: var(--nok); }

.spieler-lobby { display: grid; gap: 16px; justify-items: start; }
.gross-titel { font-weight: 600; font-size: clamp(1.9rem, 8.5vw, 2.6rem); line-height: 1.05; letter-spacing: -.025em; }
.ich-zeile { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 1.25rem; }
.lobby-quiz { display: grid; gap: 4px; margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--linie); width: 100%; }
.lobby-quiz .quiz-titel { font-size: 1.4rem; }
.folie-handy { display: grid; gap: 14px; }
.folie-handy .folien-titel { font-size: clamp(1.7rem, 8vw, 2.3rem); }
.folie-handy .folien-text { font-size: 1.1rem; }

.spieler-rang, .spieler-ende { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.platz-gross { display: flex; align-items: baseline; gap: 10px; }
.platz-label { font-weight: 500; font-size: 1.5rem; color: var(--tinte-2); }
.platz-zahl { font-weight: 600; font-size: 4.6rem; line-height: .9; letter-spacing: -.03em; color: var(--tinte); font-variant-numeric: tabular-nums; }
.platz-punkte { font-weight: 500; font-size: 1.05rem; margin-bottom: 6px; color: var(--tinte-2); font-variant-numeric: tabular-nums; }

/* ---------- Rangliste ---------- */

.rangliste-seite, .ende-seite { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(14px, 2.5vh, 28px); align-content: start; }
.seiten-titel { font-weight: 600; font-size: clamp(2rem, 4.4vw, 3.8rem); line-height: 1.1; letter-spacing: -.025em; }
.rang { display: grid; border-top: 1px solid var(--linie); }
.rang-zeile { display: grid; grid-template-columns: 2.4em minmax(7em, 16em) minmax(0, 1fr) 5.5em; align-items: center; gap: 0 16px; min-height: clamp(48px, 6.6vh, 74px); border-bottom: 1px solid var(--linie); background: var(--grund); }
.rang-platz { font-weight: 600; font-size: 1.15em; color: var(--tinte-3); text-align: right; font-variant-numeric: tabular-nums; }
.rang-zeile.platz-1 .rang-platz, .rang-zeile.platz-2 .rang-platz, .rang-zeile.platz-3 .rang-platz { color: var(--tinte); }
.rang-name { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; font-size: clamp(1rem, 1.55vw, 1.55rem); }
.rang-avatar { font-size: .66em; }
.rang-name-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rang-spur { --p: 0; position: relative; height: 6px; border-radius: 999px; background: var(--linie); overflow: hidden; }
.rang-fuellung { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p) * 100%); background: var(--akzent-mittel); border-radius: 999px; transition: width 1.2s var(--ease); }
.rang-zeile.platz-1 .rang-fuellung, .rang-zeile.platz-2 .rang-fuellung, .rang-zeile.platz-3 .rang-fuellung { background: var(--akzent); }
.rang-punkte { display: grid; justify-items: end; font-weight: 600; font-size: clamp(1.15rem, 1.9vw, 1.85rem); line-height: 1.05; font-variant-numeric: tabular-nums; }
.rang-punkte small { font-weight: 500; font-size: .55em; color: var(--ok); }
.rang-zeile.ich .rang-name { color: var(--akzent); }
.rang-zeile.ich .rang-fuellung { background: var(--akzent); }
.rang-zeile.offline { opacity: .55; }
.rang-klein .rang-zeile { grid-template-columns: 2em minmax(5em, 10em) minmax(0, 1fr) 4.2em; min-height: 46px; gap: 0 12px; }
.rang-klein .rang-name, .rang-klein .rang-punkte { font-size: 1.02rem; }
.rang-klein .rang-platz { font-size: 1rem; }

.sieger { display: grid; gap: 10px; max-width: 980px; }
.sieger-karte { display: grid; grid-template-columns: 2.2em auto minmax(0, 1fr) auto; align-items: center; gap: 0 16px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-gross); padding: clamp(12px, 1.8vh, 20px) clamp(14px, 2vw, 24px); }
.sieger-karte.platz-1 { border-color: var(--akzent); box-shadow: inset 4px 0 0 var(--akzent); }
.sieger-platz { font-weight: 600; font-size: clamp(1.8rem, 3.2vw, 3rem); line-height: 1; color: var(--tinte-3); font-variant-numeric: tabular-nums; }
.sieger-karte.platz-1 .sieger-platz { color: var(--akzent); }
.sieger-avatar { font-size: clamp(.9rem, 1.4vw, 1.3rem); }
.sieger-name { font-weight: 600; font-size: clamp(1.15rem, 2vw, 1.9rem); line-height: 1.15; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sieger-karte.platz-1 .sieger-name { font-size: clamp(1.3rem, 2.5vw, 2.4rem); }
.sieger-punkte { color: var(--tinte-2); font-weight: 500; font-size: clamp(1rem, 1.5vw, 1.4rem); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Beamer: alles etwas größer ---------- */

.seite-beamer .raum-kopf { min-height: 64px; }
.seite-beamer .frage-tags li { font-size: clamp(.82rem, .95vw, 1.05rem); }
.seite-beamer .frage-nummer { font-size: clamp(.95rem, 1.1vw, 1.25rem); }
@media (min-width: 900px) {
  .host.beamer .lobby { grid-template-columns: minmax(340px, 44%) 1fr; }
}
/* Auf großen Bildschirmen wächst alles mit (1366 px ≈ 16 px, 1920 px ≈ 20 px, 2560 px ≈ 25 px Grundschrift) */
html:has(body.seite-beamer) { font-size: clamp(16px, calc(6px + .75vw), 28px); }
.host.beamer .zeilen-gross:not(.mit-bild):not(.zeilen-wf) .zeile { min-height: clamp(3.4em, 11vh, 6.5em); }
.host.beamer .zeilen-wf .zeile { min-height: clamp(4.4em, 16vh, 8em); }
.host.beamer .raumcode { font-size: clamp(3.2rem, 8.5vw, 11rem); }
.host.beamer .qr { width: clamp(130px, 28vh, 340px); }
.host.beamer .chip { font-size: 1.12rem; }
.seite-beamer .bild-punkt { width: 22px; height: 22px; margin: -11px 0 0 -11px; }
.buehne.ist-aufgeloest .bild-tipp img { max-height: 46vh; }
.buehne.typ-pin .bild-tipp img, .buehne.typ-bildpunkt .bild-tipp img { max-height: 52vh; }

/* ---------- Admin-Bereich ---------- */

.admin { min-height: 100dvh; display: flex; flex-direction: column; }
.admin-kopf { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px 24px; flex-wrap: wrap; padding: 10px var(--rand); background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.admin-marke { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.admin-marke-zusatz { font-weight: 500; color: var(--tinte-3); padding-left: 10px; border-left: 1px solid var(--linie); }
.admin-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.admin-nav a { padding: 7px 12px; border-radius: var(--r); text-decoration: none; color: var(--tinte-2); font-weight: 500; transition: background-color .15s, color .15s; }
.admin-nav a:hover { color: var(--tinte); background: var(--flaeche-2); }
.admin-nav a.aktiv { color: var(--tinte); background: var(--grund); box-shadow: inset 0 -2px 0 var(--akzent); }
.admin-person { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--tinte-2); font-weight: 500; }
.admin-inhalt { width: 100%; max-width: 1100px; margin: 0 auto; padding: clamp(20px, 4vw, 40px) var(--rand) 60px; display: grid; gap: 22px; align-content: start; }
.admin-inhalt.breit { max-width: 1440px; }
.seiten-kopf { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-end; justify-content: space-between; }
.seiten-kopf h1 { font-weight: 600; font-size: clamp(1.7rem, 3.6vw, 2.4rem); line-height: 1.15; letter-spacing: -.02em; }
.zurueck-link { display: inline-flex; align-items: center; gap: 6px; color: var(--tinte-2); font-weight: 500; text-decoration: none; margin-bottom: 6px; }
.zurueck-link:hover { color: var(--akzent); }
.abschnitt { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-gross); padding: clamp(16px, 3vw, 26px); display: grid; gap: 14px; }
.abschnitt h2 { font-size: 1.2rem; font-weight: 600; letter-spacing: -.01em; }
.formular-aktion { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.formular-raster { display: grid; gap: 14px; }
@media (min-width: 720px) { .abschnitt .formular-raster { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; } .abschnitt .formular-raster > .feld-fehler, .abschnitt .formular-raster > div:last-child { grid-column: 1 / -1; } }
.fehlerliste { padding-left: 1.2em; list-style: disc; color: var(--nok); font-weight: 500; display: grid; gap: 4px; }
.status-marke { display: inline-flex; align-items: center; font-size: .8rem; font-weight: 500; padding: 1px 8px; border-radius: 999px; background: var(--flaeche-2); border: 1px solid var(--linie); color: var(--tinte-2); margin-left: 6px; }
.status-marke.ok { background: var(--ok-hell); border-color: #BFDCCB; color: var(--ok); margin-left: 0; }
.status-marke.nok { background: var(--nok-hell); border-color: #E8C4BC; color: var(--nok); margin-left: 0; }

.quiz-liste { display: grid; gap: 10px; }
.quiz-karte { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-gross); padding: 16px 18px; transition: border-color .15s; }
.quiz-karte:hover { border-color: var(--linie-stark); }
.quiz-karte.fehlerhaft { box-shadow: inset 3px 0 0 var(--nok); }
.quiz-karte-text { flex: 1 1 320px; min-width: 0; display: grid; gap: 4px; }
.quiz-karte h2 { font-weight: 600; font-size: 1.15rem; line-height: 1.25; letter-spacing: -.01em; }
.quiz-karte h2 a { color: var(--tinte); text-decoration: none; }
.quiz-karte h2 a:hover { color: var(--akzent); text-decoration: underline; }
.quiz-karte-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--tinte-2); font-size: .92rem; }
.quiz-karte-aktionen { display: flex; gap: 8px; align-items: center; }
.leer-hinweis { display: grid; justify-items: start; gap: 12px; padding: 28px; border: 1px dashed var(--linie-stark); border-radius: var(--r-gross); }

.spielen { display: grid; gap: 18px; }
.spielen-form { display: grid; gap: 16px; max-width: 820px; }
.wahl-raster { display: grid; gap: 10px; }
@media (min-width: 640px) { .wahl-raster { grid-template-columns: 1fr 1fr; } }
.wahl-karte { position: relative; display: grid; gap: 4px; cursor: pointer; border: 1px solid var(--linie-stark); border-radius: var(--r); padding: 14px 16px 14px 46px; background: var(--flaeche); transition: border-color .15s, background-color .15s; }
.wahl-karte:hover { border-color: var(--tinte-2); }
.wahl-karte input { position: absolute; left: 16px; top: 17px; width: 18px; height: 18px; margin: 0; accent-color: var(--akzent); }
.wahl-karte.aktiv { border-color: var(--akzent); background: var(--akzent-hell); }
.wahl-titel { font-weight: 600; }
.wahl-text { color: var(--tinte-2); font-size: .94rem; }

.admin-zeilen { display: grid; gap: 10px; }
.admin-zeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r); padding: 14px 16px; }
.admin-zeile-name { font-weight: 600; font-size: 1.08rem; }

.login { min-height: 100dvh; display: grid; align-content: center; justify-items: center; gap: 14px; padding: 24px var(--rand); }
.login-karte { width: min(420px, 100%); display: grid; gap: 14px; }
.login-karte h1 { font-weight: 600; font-size: 1.45rem; letter-spacing: -.015em; }
.login-zurueck { display: inline-flex; align-items: center; gap: 6px; color: var(--tinte-2); text-decoration: none; font-weight: 500; justify-self: center; }

.admin-hinweis { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px var(--rand); background: var(--ok-hell); color: var(--ok); border-bottom: 1px solid #BFDCCB; font-weight: 500; }
.admin-hinweis > .icon { width: 20px; height: 20px; }
.admin-hinweis p { flex: 1 1 300px; }
.admin-hinweis-adresse { margin-left: 2px; font-weight: 600; color: inherit; overflow-wrap: anywhere; }
.admin-hinweis-zusatz { font-weight: 400; }
.admin-hinweis.gestoert { background: var(--nok-hell); color: var(--nok); border-color: #E8C4BC; }
.admin-hinweis.warnung-stark { background: var(--warn-hell); color: #5a3d00; border-color: #ecd59a; }
.admin-hinweis-pw { font-weight: 500; }

/* ---------- Editor ---------- */

.editor { display: grid; gap: 16px; }
.editor-leiste { position: sticky; top: 62px; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; background: rgba(244, 245, 247, .95); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); padding: 10px 0; border-bottom: 1px solid var(--linie); }
.editor-leiste .zurueck-link { margin: 0; }
.editor-titel { font-weight: 600; font-size: 1.25rem; line-height: 1.2; letter-spacing: -.01em; flex: 1 1 200px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor-status { display: inline-block; font-size: .9rem; font-weight: 500; color: var(--ok); }
.editor-status.offen { color: #8a5a00; }
.editor-status.mit-fehlern { color: var(--nok); }
.editor-spalten { display: grid; gap: 18px; align-items: start; }
@media (min-width: 1000px) {
  .editor-spalten { grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); }
  .editor-liste { position: sticky; top: 132px; max-height: calc(100dvh - 150px); overflow: auto; padding-right: 4px; }
  .nur-schmal { display: none !important; }
}
@media (max-width: 999px) {
  .editor.zeige-liste .editor-formular { display: none; }
  .editor.zeige-formular .editor-liste { display: none; }
  .editor-leiste { top: 0; position: relative; }
}
.editor-liste { display: grid; gap: 10px; align-content: start; }
.editor-eintraege { display: grid; gap: 6px; }
.editor-eintrag { display: flex; align-items: stretch; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r); transition: border-color .15s, box-shadow .15s; }
.editor-eintrag.aktiv { border-color: var(--akzent); box-shadow: inset 3px 0 0 var(--akzent); }
.editor-eintrag.hat-fehler { border-color: #E2B4AB; }
.editor-eintrag.aktiv.hat-fehler { border-color: var(--akzent); }
.editor-eintrag.zieht { opacity: .5; }
.editor-eintrag.drop-ziel { border-color: var(--akzent); border-style: dashed; }
.editor-eintrag.einstellungen { background: var(--flaeche-2); }
.eintrag-haupt { flex: 1; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "nr typ fehler" "nr text fehler"; gap: 0 10px; align-items: center; text-align: left; background: none; border: 0; padding: 8px 4px 8px 10px; cursor: pointer; border-radius: var(--r); }
.eintrag-nr { grid-area: nr; width: 1.9em; height: 1.9em; display: grid; place-items: center; border-radius: var(--r-klein); background: var(--flaeche-2); border: 1px solid var(--linie); color: var(--tinte-2); font-weight: 600; font-size: .95rem; font-variant-numeric: tabular-nums; }
.einstellungen .eintrag-haupt { grid-template-areas: "typ fehler" "text fehler"; grid-template-columns: minmax(0, 1fr) auto; }
.eintrag-typ { grid-area: typ; font-size: .78rem; font-weight: 500; color: var(--tinte-3); }
.eintrag-text { grid-area: text; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eintrag-fehler { grid-area: fehler; min-width: 1.6em; height: 1.6em; padding: 0 5px; display: grid; place-items: center; border-radius: 999px; background: var(--nok); color: #fff; font-size: .8rem; font-weight: 600; }
.eintrag-knoepfe { display: flex; flex-direction: column; justify-content: center; padding-right: 2px; }
.eintrag-knoepfe .icon-knopf.klein { width: 30px; height: 26px; border-radius: 6px; }

.editor-formular { min-width: 0; }
.formular { display: grid; gap: 16px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-gross); padding: clamp(16px, 3vw, 28px); }
.formular h1, .formular h2 { font-weight: 600; font-size: 1.3rem; line-height: 1.2; letter-spacing: -.01em; }
.formular-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.formular-kopf .knopf-reihe { margin-left: auto; gap: 2px; }
.typ-wechsel { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--linie-stark); background: var(--flaeche); color: var(--tinte-2); font-weight: 500; cursor: pointer; transition: border-color .15s; }
.typ-wechsel:hover { border-color: var(--akzent); color: var(--akzent); }
.formular-fehler { background: var(--nok-hell); border: 1px solid #E6BDB5; border-radius: var(--r); padding: 10px 14px; color: var(--nok); }
.formular-fehler p { font-weight: 600; }
.formular-fehler ul { list-style: disc; padding-left: 1.2em; }
.feld-raster { display: grid; gap: 14px; }
@media (min-width: 640px) { .feld-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .feld-raster { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.feld-raster .voll { grid-column: 1 / -1; }

.antwort-editor { display: grid; gap: 8px; }
.antwort-zeile { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--flaeche-2); border: 1px solid var(--linie); border-radius: var(--r); padding: 6px; transition: border-color .2s, background-color .2s; }
.antwort-zeile.ist-richtig { border-color: #A9D1BA; background: var(--ok-hell); }
.antwort-zeile .zeile-marke { width: 2.1em; height: 2.1em; }
.antwort-felder { flex: 1 1 220px; display: flex; gap: 8px; align-items: center; min-width: 0; }
.antwort-felder input { flex: 1; min-width: 0; }
.antwort-bild { position: relative; display: inline-flex; align-items: center; gap: 2px; }
.antwort-bild img { width: 52px; height: 40px; object-fit: cover; border-radius: 4px; border: 1px solid var(--linie); }
.antwort-knoepfe { display: flex; }
.richtig-schalter { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--linie-stark); background: var(--flaeche); font-weight: 500; font-size: .9rem; color: var(--tinte-2); cursor: pointer; position: relative; transition: background-color .2s, border-color .2s, color .2s; }
.richtig-schalter input { position: absolute; opacity: 0; }
.richtig-schalter .icon { width: 1em; height: 1em; opacity: .4; }
.richtig-schalter.an { background: var(--ok); border-color: var(--ok); color: #fff; }
.richtig-schalter.an .icon { opacity: 1; }
.richtig-schalter:focus-within { outline: 2px solid var(--akzent); outline-offset: 2px; }
.marken-liste { display: flex; flex-wrap: wrap; gap: 6px; }
.marken-liste li { display: inline-flex; align-items: center; gap: 2px; padding: 2px 2px 2px 12px; border-radius: 999px; background: var(--ok-hell); border: 1px solid #A9D1BA; font-weight: 500; }
.datei-knopf { display: inline-flex; }
.medien-leer { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.medien-leer input { flex: 1 1 240px; width: auto; }
.medien-vorschau { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.medien-vorschau img { max-height: 140px; max-width: 260px; border-radius: var(--r-klein); border: 1px solid var(--linie); }
.medien-vorschau audio { max-width: 100%; }
.bereich-zeichnen img { max-height: 60vh; }

.typ-wahl { display: grid; gap: 18px; }
.typ-gruppe h3 { font-size: 1rem; font-weight: 500; margin-bottom: 8px; color: var(--tinte-2); }
.typ-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.typ-karte { width: 100%; height: 100%; display: grid; gap: 2px; align-content: start; text-align: left; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--linie-stark); background: var(--flaeche); cursor: pointer; transition: border-color .15s, background-color .15s; }
.typ-karte:hover { border-color: var(--akzent); background: var(--akzent-hell); }
.typ-name { font-weight: 600; }
.typ-info { font-size: .88rem; color: var(--tinte-2); }

.vorschau { display: grid; gap: 18px; }
@media (min-width: 900px) { .vorschau { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; } }
.vorschau-label { font-weight: 500; color: var(--tinte-2); font-size: .85rem; margin-bottom: 6px; }
.vorschau-buehne { background: var(--grund); border: 1px solid var(--linie); border-radius: var(--r); padding: 16px; font-size: 14px; }
.vorschau-buehne .buehne .frage-text, .vorschau-buehne .folien-titel { font-size: 1.55rem; }
.vorschau-buehne .timer { width: 56px; }
.vorschau-buehne .timer .timer-zahl { font-size: 1.3rem; }
.vorschau-handy { width: min(360px, 100%); background: var(--grund); border: 8px solid var(--tinte); border-radius: 28px; padding: 14px; justify-self: center; }
.vorschau-handy .frage-text { font-size: 1.2rem; }
.json-feld { width: 100%; min-height: 50vh; font: 400 .85rem/1.45 ui-monospace, Consolas, monospace; }

/* ---------- Schmale Bildschirme ---------- */

@media (max-width: 560px) {
  body { font-size: 16px; }
  .host-aktionen { flex-direction: column; align-items: stretch; }
  .host-aktionen .knopf-reihe { margin-left: 0; }
  .host-aktionen .knopf-reihe .knopf { flex: 1; }
  .kopf-code { display: none; }
  .einladung-qr { flex-direction: column; align-items: flex-start; }
  .rang-zeile, .rang-klein .rang-zeile { grid-template-columns: 1.6em minmax(3.6em, 7.5em) minmax(0, 1fr) 3.6em; gap: 0 8px; }
  .rang-name { font-size: .98rem; gap: 6px; }
  .rang-avatar { display: none; }
  .rang-punkte { font-size: 1.1rem; }
  .sieger-karte { grid-template-columns: 1.6em auto minmax(0, 1fr); gap: 2px 12px; }
  .sieger-punkte { grid-column: 3; }
  .sieger-avatar { grid-row: span 2; }
  .sieger-platz { grid-row: span 2; }
  .tipp { grid-template-columns: 1.6em 1.4em minmax(0, 1fr) auto; }
  .tipp-diff { display: none; }
  .admin-person span { display: none; }
  .quiz-karte-aktionen { width: 100%; }
  .quiz-karte-aktionen .knopf { flex: 1; }
  .zeilen-wf .zeile { min-height: 5em; }
}
@media (max-width: 380px) {
  .kopf-punkte small { display: none; }
  .zeile { font-size: 1rem; }
}

/* Querformat-Handy: weniger Höhe verschenken */
@media (max-height: 500px) and (orientation: landscape) {
  .raum-inhalt { padding-top: 8px; }
  .frage-bild, .spiel-eingabe .frage-bild { max-height: 40vh; }
}

/* =========================================================================
   Bewegung
   Ruhig und kurz. Jede Bewegung zeigt, was sich gerade geändert hat:
   Frage erscheint → Antworten bauen sich auf → Auflösung (Balken wachsen,
   richtige Antwort wird grün) → Punkte zählen → Rangliste sortiert sich um.
   ========================================================================= */

@keyframes rein { from { opacity: 0; transform: translateY(8px); } }
@keyframes einblenden { from { opacity: 0; } }
@keyframes ausblenden { to { opacity: 0; } }
@keyframes skalieren { from { opacity: 0; transform: scale(.96); } }
@keyframes drehen { to { transform: rotate(360deg); } }
@keyframes strich { from { stroke-dashoffset: 1; } }

.aktualisiert { animation: einblenden .35s ease; }
[data-p="spieleranzahl"], [data-p="fortschritt"] { display: inline-block; }

/* ---------- Meldungen, Dialoge ---------- */

.toast { animation: rein .25s var(--ease) backwards; }
.dialog[open] { animation: skalieren .2s var(--ease); }
.dialog[open]::backdrop { animation: einblenden .2s ease; }
.dialog-geist { position: fixed; z-index: 80; margin: 0; pointer-events: none; overflow: hidden; animation: dialog-raus .15s ease-in forwards; }
.dialog-geist-hinten { position: fixed; inset: 0; z-index: 79; pointer-events: none; background: rgba(21, 27, 35, .5); animation: ausblenden .15s ease-in forwards; }
@keyframes dialog-raus { to { opacity: 0; transform: scale(.98); } }

/* ---------- Seiten erscheinen ---------- */

.start > * { animation: rein .45s var(--ease) both; }
.start > :nth-child(2) { animation-delay: .06s; }
.start > :nth-child(3) { animation-delay: .12s; }
.start > :nth-child(n+4) { animation-delay: .18s; }
.raum-inhalt > * { animation: rein .35s var(--ease) both; }
.admin-inhalt > * { animation: einblenden .25s ease both; }
.login-karte { animation: rein .4s var(--ease) both; }

/* Fortschritt: das aktuelle Segment füllt sich */
.schritt.aktuell::after { animation: segment-fuellen .6s .1s var(--ease) both; }
@keyframes segment-fuellen { from { transform: scaleX(0); } }
.schritt.aktuell:not(.gerade)::after { animation: none; }

/* ---------- Lobby ---------- */

.raumcode .ziffer { display: inline-block; animation: rein .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms + 150ms); }
.einladung-qr .qr { animation: einblenden .5s .45s both; }
.einladung-url { animation: einblenden .4s .05s both; }
.internet-hinweis { animation: einblenden .4s .6s both; }
.einladung-dialog .internet-hinweis, .einladung-dialog .qr, .einladung-dialog .ziffer, .einladung-dialog .einladung-url { animation: none; }
.chip.neu { animation: skalieren .3s var(--ease); }

/* ---------- Countdown vor der Frage ---------- */

.vor-start .buehne-inhalt, .vor-start .eingabe-bereich, .vor-start .zeit-um-text { display: none; }
.vorlauf {
  display: grid; justify-items: center; align-content: center; gap: 14px; padding: 24px 16px;
  min-height: clamp(150px, 28vh, 420px); border-radius: var(--r-gross); background: var(--flaeche); border: 1px solid var(--linie);
}
.vorlauf-zahl { font-weight: 300; font-size: clamp(3.4rem, 9vw, 8rem); line-height: 1; color: var(--tinte); font-variant-numeric: tabular-nums; min-height: 1em; }
.vorlauf-zahl.zeigen { animation: zahl-wechsel .35s var(--ease); }
@keyframes zahl-wechsel { from { opacity: 0; transform: translateY(10px); } }
.vorlauf-leiste { width: min(420px, 70%); height: 3px; border-radius: 999px; background: var(--linie); overflow: hidden; }
.vorlauf-leiste span { display: block; height: 100%; background: var(--akzent); transform-origin: left; animation: leeren linear forwards; }
@keyframes leeren { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.vorlauf-text { color: var(--tinte-2); font-size: clamp(.95rem, 1.3vw, 1.2rem); }
.vorlauf.los { position: absolute; left: 0; right: 0; z-index: 3; pointer-events: none; animation: ausblenden .3s ease-in forwards; }

/* ---------- Frage erscheint ---------- */

.buehne:not(.ist-aufgeloest) .frage-text, .spiel-eingabe .frage-text, .folien-titel { animation: rein .45s var(--ease) both; }
.frage-tags, .frage-nummer { animation: einblenden .4s both; }
.folien-text { animation: rein .45s .15s var(--ease) both; }
.frage-medien { animation: einblenden .45s .15s both; }
.buehne:not(.ist-aufgeloest) .timer { animation: einblenden .4s .1s both; }
.hinweis-tafel { animation: rein .4s .15s var(--ease) both; }

/* Antworten bauen sich nacheinander auf */
.zeilen:not(.aufgeloest) > li { animation: rein .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms + 80ms); }
.zeilen.ruhig > li { animation: none; }
.sortiert-anzeige > li { animation: rein .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms + 80ms); }
.skala-werte li, .skala-knoepfe li { animation: einblenden .35s both; }
.eingabe-bereich > * { animation: rein .35s .05s var(--ease) both; }
.ideen-wand > li { animation: skalieren .3s var(--ease) both; animation-delay: calc(var(--i, 0) * 30ms + 100ms); }

/* Timer: die letzten fünf Sekunden */
.timer.tick .timer-zahl, .zeitbalken.tick .timer-zahl { animation: einblenden .4s ease; }

/* Handy: Antwort antippen */
.hat-wahl button:not(.getippt) { opacity: .4; }
button.zeile.getippt, .skala-knopf.getippt { border-color: var(--akzent); background: var(--akzent-hell); }
button.zeile.getippt:disabled, .skala-knopf.getippt:disabled { opacity: 1; }
.bild-pin.gesetzt { animation: skalieren .2s var(--ease); }

/* Handy: Antwort abgegeben */
.zeichnen .strich { stroke-dasharray: 1; stroke-dashoffset: 0; animation: strich .35s .15s ease-out both; }
.zeichnen .strich-2 { animation-delay: .35s; }
.warte-karte { animation: rein .35s var(--ease) both; }

/* ---------- Auflösung ---------- */

.zeilen.aufgeloest .zeile::before { animation: balken-wachsen .9s .15s var(--ease) both; }
@keyframes balken-wachsen { from { width: 0; } }
.zeilen.aufgeloest .zeile.nicht-richtig { opacity: .6; animation: abblenden .4s ease both; }
@keyframes abblenden { from { opacity: 1; } }
.zeile.richtig .zeile-marke .icon { animation: einblenden .3s .2s both; }
.loesung-gross { animation: rein .45s var(--ease) both; }
.eingaben > li, .karten-wand > li { animation: einblenden .35s both; animation-delay: calc(var(--i, 0) * 30ms + 250ms); }
.tipps > li { animation: rein .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms + 300ms); }
.saeule-balken { transform-origin: bottom; animation: saeule .8s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms + 150ms); }
@keyframes saeule { from { transform: scaleY(0); } }
.wolke-wort { animation: skalieren .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms + 100ms); }
.ideen-rang > li { animation: rein .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 100ms); }
.bild-bereich { animation: einblenden .4s .15s both; }
.bild-punkt { animation: skalieren .25s var(--ease) both; animation-delay: calc(var(--i, 0) * 25ms + 350ms); }
.erklaerung { animation: rein .4s .5s var(--ease) both; }

/* Handy: eigenes Ergebnis */
.ergebnis { animation: rein .35s var(--ease) both; }
.loesung-box { animation: rein .35s .12s var(--ease) both; }
.statistik-klein { animation: rein .35s .24s var(--ease) both; }
.platz-zeile { animation: rein .35s .36s var(--ease) both; }
.platz-aenderung .icon { animation: einblenden .3s .7s both; }

/* ---------- Rangliste: Balken wachsen, dann wird umsortiert ---------- */

.rang > .rang-zeile { animation: einblenden .3s both; animation-delay: calc(var(--i, 0) * 35ms + var(--verz, 0ms)); }
.rang-punkte small { animation: einblenden .35s both; animation-delay: calc(var(--verz, 0ms) + 1.3s); }
.rang-platz.neu-platz { animation: einblenden .4s ease; }

/* ---------- Endstand: Platz 3, dann 2, dann 1 ---------- */

.ende-seite .seiten-titel { animation: rein .45s var(--ease) both; }
.sieger-karte { animation: rein .5s var(--ease) both; animation-delay: var(--verz, 0ms); }

/* ---------- Editor: Rückmeldung auf Klicks ---------- */

.editor-formular.rein > * { animation: einblenden .2s ease; }
.editor-eintrag.neu-eintrag { animation: skalieren .25s var(--ease); }

/* Wer im Betriebssystem „weniger Bewegung“ eingestellt hat, bekommt alles sofort im Endzustand */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
