@font-face {
  font-family: 'Lexend'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/lexend-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lexend'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/lexend-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0f2f3d;
  --bg2: #164552;
  --line: #e4edef;
  --soft: #f4fafb;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(13, 66, 76, .06), 0 10px 30px -12px rgba(13, 66, 76, .25);
  --shadow-lg: 0 30px 70px -25px rgba(2, 32, 38, .7);
  --font: 'Lexend', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #6b6b76;
  --accent: #0e7470;    /* Petrol: Auswahl, Links, Schalter */
  --accent-rgb: 14, 116, 112;
  --cta: #c4420c;       /* Ziegelorange: Hauptknöpfe */
  --cta-hover: #a8380a;
  /* Volders-Palette: eigene Farben und Symbole (Berg, Sonne, Blatt, Tropfen, Stern, Mond) */
  --a0: #0b7f7a; /* Petrol   - Berg    */
  --a1: #d9480f; /* Ziegel   - Sonne   */
  --a2: #9cc83c; /* Limette  - Blatt (dunkle Schrift) */
  --a3: #c2255c; /* Beere    - Tropfen */
  --a4: #5f3dc4; /* Indigo   - Stern   */
  --a5: #1c7ed6; /* Himmel   - Mond    */
  --ok: #2b8a3e;
  --bad: #c92a2a;
  --bad-screen: #a8394a; /* Vollbild "falsch" am Handy: gedämpfter als das Signalrot */
}

* { box-sizing: border-box; }

html { background: var(--bg); }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: #fff;
}
/* Tiefe durch zwei Farbflächen (Morgenlicht oben links, Abendblau unten rechts), unten eine leise Bergkette */
body {
  background:
    radial-gradient(110% 70% at 0% 0%, #1b6f78 0%, transparent 60%),
    radial-gradient(90% 70% at 100% 100%, #1b4f7c 0%, transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
body::before {
  content: ''; position: fixed; left: 0; right: 0; bottom: 0; height: 32vh; z-index: -1; pointer-events: none; opacity: .07;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200' preserveAspectRatio='none'%3E%3Cpolygon points='0,200 0,120 90,70 160,105 250,30 330,95 400,60 470,110 560,20 640,85 720,55 800,115 880,40 960,95 1040,65 1120,110 1200,75 1200,200' fill='white'/%3E%3Cpolygon points='0,200 0,160 120,120 220,150 340,100 460,150 600,110 720,155 860,115 980,150 1100,125 1200,145 1200,200' fill='white'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
}

.hidden { display: none !important; }

.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  gap: 16px;
}

.logo {
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -.04em;
  margin: 0 0 8px;
  display: flex; align-items: center;
}
/* Bildmarke: Berg mit Sonne (Volders liegt im Inntal) */
.logo::before {
  content: ''; width: .8em; height: .62em; flex: none; margin-right: .28em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 30'%3E%3Ccircle cx='29' cy='8' r='6' fill='%23ff9a62'/%3E%3Cpolygon points='0,30 13,6 21,18 26,11 40,30' fill='%236fd6cf'/%3E%3Cpolygon points='13,6 17.5,14.3 14.5,12.5 11.5,15 9.6,12.3' fill='white'/%3E%3C/svg%3E") center / contain no-repeat;
}
.logo span { color: #ff9a62; }

.card {
  background: var(--card);
  color: var(--text);
  border-radius: 20px;
  padding: 22px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card.wide { max-width: 960px; }

input, textarea, select {
  font: inherit;
  padding: 12px;
  border: 1.5px solid #d9e5e7;
  border-radius: 12px;
  width: 100%;
  color: var(--text);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .15); }
input.big { font-size: 1.4rem; text-align: center; font-weight: 700; }

button {
  font: inherit;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
  background: #243a3f;
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
}
button:active:not(:disabled) { transform: scale(.97); }
button:focus-visible, a:focus-visible, label.button:focus-within { outline: 3px solid #ffd54f; outline-offset: 2px; }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--cta); box-shadow: 0 8px 20px -8px rgba(196, 66, 12, .8); }
button.primary:hover:not(:disabled) { background: var(--cta-hover); }
button.light { background: #fff; color: var(--text); border-color: var(--line); }
button.light:hover:not(:disabled) { background: var(--soft); border-color: #d1e2e5; }
button.danger { background: var(--bad); }
button.small { padding: 7px 12px; font-size: .88rem; border-radius: 10px; }
/* Auf dem dunklen Spielhintergrund: halbdurchsichtige Knöpfe */
.screen > .row button.light, .lobby-opts button.light {
  background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .22); backdrop-filter: blur(6px);
}
.screen > .row button.light:hover:not(:disabled), .lobby-opts button.light:hover:not(:disabled) { background: rgba(255, 255, 255, .18); }
.ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.ico.fill { fill: currentColor; stroke: none; }

.error { color: var(--bad); font-weight: 600; min-height: 1.2em; margin: 0; }
.muted { color: var(--muted); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------- Antwortkacheln ---------- */
.answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 1100px;
}
.answer {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 80px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 0;
  color: #fff;
  font-size: clamp(1rem, 2.4vw, 1.6rem);
  font-weight: 600;
  text-align: left;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 55%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 14px 24px -14px rgba(0, 0, 0, .8);
  transition: transform .12s, opacity .25s, filter .15s;
}
.answer.a0 { background: var(--a0); }
.answer.a1 { background: var(--a1); }
.answer.a2 { background: var(--a2); }
.answer.a3 { background: var(--a3); }
.answer.a4 { background: var(--a4); }
.answer.a5 { background: var(--a5); }
.answer.dim { opacity: .3; }
.answer .count { margin-left: auto; font-size: 1.4em; }

.shape { width: 32px; height: 32px; flex: none; fill: #fff; }
.answer > .shape { box-sizing: content-box; padding: 8px; border-radius: 12px; background: rgba(0, 0, 0, .16); width: 26px; height: 26px; }

.player-answers { flex: 1; width: 100%; grid-auto-rows: 1fr; }
.player-answers .answer { justify-content: center; min-height: 0; }
.player-answers .answer > .shape { width: 48px; height: 48px; padding: 14px; border-radius: 20px; }
.player-answers .answer:hover:not(:disabled) { filter: brightness(1.06); }
.player-answers .answer:active:not(:disabled) { transform: scale(.95); }

/* ---------- Spielanzeige ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  font-weight: 600;
  font-size: .95rem;
  z-index: 10;
}
.topbar > span {
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); border-radius: 999px;
  padding: 5px 14px; backdrop-filter: blur(8px); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.topbar > span:empty { display: none; }
/* Schmale Handys: nichts darf überlappen. Frage, Zeit und Punkte bleiben ganz, nur der Name wird gekürzt. */
.topbar > span { flex: 0 0 auto; }
.topbar > #me { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) {
  .topbar { gap: 6px; padding: 8px 10px; font-size: .85rem; }
  .topbar > span { padding: 4px 10px; }
}
.progress { position: fixed; top: 0; left: 0; right: 0; height: 4px; background: rgba(255, 255, 255, .1); z-index: 11; }
.progress > b { display: block; height: 100%; width: 0; background: #ffd54f; border-radius: 0 4px 4px 0; transition: width .4s; }
.question-text {
  background: #fff;
  color: var(--text);
  border-radius: 20px;
  padding: 20px 28px;
  box-shadow: var(--shadow-lg);
  letter-spacing: -.01em;
  text-wrap: balance;
  font-size: clamp(1.3rem, 3.5vw, 2.4rem);
  font-weight: 700;
  text-align: center;
  width: 100%;
  max-width: 1100px;
}
/* Ablaufender Ring: --p (0-100) setzt das Skript, --ring wird in den letzten Sekunden rot */
.timer {
  --p: 100; --ring: #ffd54f;
  width: 104px; height: 104px;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, #1a515c calc(100% - 9px), transparent calc(100% - 8px)),
    conic-gradient(var(--ring) calc(var(--p) * 1%), rgba(255, 255, 255, .14) 0);
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: --p 1s linear;
}
.timer.low { --ring: #ff5a72; animation: throb 1s ease-in-out infinite; }
@keyframes throb { 50% { transform: scale(1.06); } }
@property --p { syntax: '<number>'; inherits: false; initial-value: 100; }
.pin-box {
  background: #fff;
  color: var(--text);
  border-radius: 22px;
  padding: 14px 32px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.pin-box .pin { font-size: clamp(3rem, 10vw, 6rem); font-weight: 800; letter-spacing: .02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.pin-box .pin .gap { display: inline-block; width: .35em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 1100px; }
.chip {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .16);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.chip:hover { background: var(--bad); border-color: var(--bad); text-decoration: line-through; }
.chip.new { animation: chip-in .6s cubic-bezier(.2, 1.4, .4, 1) both; background: #ffd54f; color: #1d1d1f; border-color: #ffd54f; }
@keyframes chip-in { from { transform: scale(.4); opacity: 0; } }

.board { width: 100%; max-width: 640px; display: flex; flex-direction: column; gap: 8px; }
.board-row {
  display: flex;
  justify-content: space-between;
  background: #fff;
  color: var(--text);
  border-radius: 14px;
  padding: 12px 20px;
  font-size: 1.3rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 12px 24px -16px rgba(0, 0, 0, .7);
  animation: slide-in .4s ease-out both;
}
.board-row:nth-child(2) { animation-delay: .06s; } .board-row:nth-child(3) { animation-delay: .12s; }
.board-row:nth-child(4) { animation-delay: .18s; } .board-row:nth-child(5) { animation-delay: .24s; }
@keyframes slide-in { from { transform: translateX(-24px); opacity: 0; } }

.podium { display: flex; align-items: flex-end; gap: 12px; }
.podium .step {
  width: clamp(90px, 22vw, 180px);
  background: var(--accent);
  border-radius: 16px 16px 0 0;
  text-align: center;
  padding: 14px 6px;
  font-weight: 700;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, 0) 50%);
}
.podium .step .name { font-size: 1.2rem; word-break: break-word; }
.podium .p1 { height: 240px; background-color: #ffb300; }
.podium .p2 { height: 180px; background-color: #b0bec5; color: #222; }
.podium .p3 { height: 140px; background-color: #a1887f; }

.feedback { font-size: 2.4rem; font-weight: 800; text-align: center; letter-spacing: -.02em; }
.feedback.ok { color: #b9f6ca; }
.feedback.bad { color: #ffcdd2; }
.big-number { font-size: 3rem; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- Quiz-Editor ---------- */
.quiz-list { display: flex; flex-direction: column; gap: 8px; }
.quiz-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  flex-wrap: wrap;
  transition: border-color .15s, box-shadow .15s;
}
.quiz-item:hover { border-color: #d1e2e5; box-shadow: var(--shadow); }
.quiz-item .title { font-weight: 600; }
.q-edit {
  border: 2px solid #eee;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.q-edit .answer-edit { display: flex; gap: 8px; align-items: center; }
.q-edit .answer-edit .swatch { width: 14px; align-self: stretch; border-radius: 4px; flex: none; }
.q-edit .answer-edit label { display: flex; gap: 4px; align-items: center; white-space: nowrap; font-size: .9rem; }
.q-edit .answer-edit input[type=checkbox] { width: 20px; height: 20px; }
.q-edit input.time { width: 90px; }

@media (max-width: 600px) {
  .answers { grid-template-columns: 1fr; }
  .player-answers { grid-template-columns: 1fr 1fr; }
}

/* ---------- Erweiterungen: Fragetypen, Berichte, Musik ---------- */
:root {
  --a0-light: #6fd6cf;
  --a1-light: #ffa77a;
  --a2-light: #c9ec8a;
  --a3-light: #ff8fb5;
  --a4-light: #b5a3ff;
  --a5-light: #8cc8ff;
}
label.button, a.button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  border-radius: 10px;
  padding: 7px 12px;
  font-size: .88rem;
  cursor: pointer;
  text-decoration: none;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}
label.button:hover, a.button:hover { background: var(--soft); }
.field { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; flex: 1; min-width: 110px; }
.tabs { display: flex; gap: 4px; background: var(--soft); border-radius: 12px; padding: 4px; margin-bottom: 14px; flex-wrap: wrap; }
.tab { background: none; color: var(--muted); box-shadow: none; border-radius: 9px; padding: 8px 16px; flex: 1 1 auto; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); background: #fff; box-shadow: 0 1px 3px rgba(13, 66, 76, .12); }
.thumb { height: 56px; border-radius: 6px; }

.mute {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 20;
  font-size: 1.6rem;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(6px);
}
.mute .ico { width: 26px; height: 26px; }
.qr { background: #fff; border-radius: 22px; padding: 12px; width: 160px; height: 160px; box-shadow: var(--shadow-lg); }
.q-image { max-height: 260px; max-width: min(480px, 90vw); border-radius: 16px; background: #fff; box-shadow: var(--shadow-lg); }
.q-image.small { max-height: 160px; align-self: center; }
.badge { background: #ffd54f; color: #222; font-weight: 800; padding: 8px 14px; border-radius: 999px; }
.info-box {
  background: #fff;
  color: var(--text);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 20px 28px;
  font-size: 1.4rem;
  font-weight: 600;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.word-list { display: flex; flex-wrap: wrap; gap: 8px; }
.word { background: #eee; border-radius: 999px; padding: 6px 14px; font-size: 1.1rem; }
.word.ok { background: #c8f2bd; }
.cloud {
  display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: center; align-items: center;
  max-width: 1100px; font-weight: 800; line-height: 1.1; padding: 12px;
}
.bars { display: flex; gap: 18px; align-items: flex-end; justify-content: center; min-height: 260px; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 6px; width: clamp(60px, 13vw, 180px); }
.bar { width: 100%; border-radius: 12px 12px 0 0; transition: height .6s;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 60%); }
.bar.a0 { background: var(--a0); } .bar.a1 { background: var(--a1); }
.bar.a2 { background: var(--a2); } .bar.a3 { background: var(--a3); }
.bar.a4 { background: var(--a4); } .bar.a5 { background: var(--a5); }
.bar-num { font-size: 1.6rem; font-weight: 900; }
.bar-label { display: flex; gap: 6px; align-items: center; font-weight: 700; text-align: center; }
.bar-label .shape { width: 20px; height: 20px; }
.scale { position: relative; height: 56px; background: #eee; border-radius: 8px; margin-top: 8px; }
.scale .zone { position: absolute; top: 0; bottom: 0; min-width: 4px; background: #c8f2bd; border-radius: 4px; }
.scale .dot { position: absolute; top: 34px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--a1); opacity: .7; }
.scale .mark { position: absolute; top: -2px; margin-left: -10px; color: var(--ok); font-size: 1.4rem; }
.order-list { margin: 0; padding-left: 1.4em; font-size: 1.5rem; }

.p-body { flex: 1; width: 100%; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.p-body .card { margin-top: 12px; }
.p-body .hint { color: #ddd; text-align: center; }
.answer.selected { outline: 5px solid #fff; outline-offset: -5px; filter: brightness(1.1); }
.submit { width: 100%; max-width: 420px; font-size: 1.2rem; padding: 14px; }
.order-pick { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 520px; }
.order-pick .answer { min-height: 64px; }
.order-pick .num {
  width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .3);
  display: grid; place-items: center; font-weight: 900; flex: none;
}
input[type=range] { padding: 0; border: 0; accent-color: var(--accent); height: 36px; }

.hint-box { background: #fff4d6; border-radius: 12px; padding: 12px 16px; align-items: center; }
.hint-box ul { margin: 6px 0 0; padding-left: 1.2em; }
.table-wrap { overflow-x: auto; }
table.report { border-collapse: collapse; width: 100%; font-size: .9rem; }
table.report th, table.report td { border-bottom: 1px solid #eee; padding: 6px 8px; text-align: left; vertical-align: top; }
table.report th { background: #f4fafb; position: sticky; top: 0; }
.cell-ok, .cell-bad, .cell-none, .cell-poll { text-align: center !important; font-weight: 800; cursor: help; }
.cell-ok { background: #d9f5d0; color: var(--ok); }
.cell-bad { background: #fde0e4; color: var(--bad); }
.cell-none { color: #aaa; }
.cell-poll { color: var(--accent); }
.rate {
  display: inline-block; min-width: 70px; padding: 2px 8px; border-radius: 4px; font-weight: 700;
  background: linear-gradient(90deg, #c8f2bd var(--rate), #fde0e4 var(--rate));
}

@keyframes rise { from { transform: translateY(120%); opacity: 0; } to { transform: none; opacity: 1; } }
.podium .step { animation: rise .8s ease-out both; }

@keyframes blink { 50% { background: var(--bad); } }
.mute.blink { animation: blink 1.2s infinite; font-size: 1.1rem; }

.userbar { font-size: .95rem; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.pw-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.pw-form input { flex: 1; min-width: 180px; }
h3.group { margin: 12px 0 0; font-size: 1rem; color: var(--muted); }
.tag { display: inline-block; font-size: .72rem; font-weight: 600; background: #def8fd; color: var(--accent);
  border-radius: 999px; padding: 2px 8px; vertical-align: middle; margin-left: 4px; }
.tag.grey { background: #eee; color: var(--muted); }

/* ---------- Quiz-Editor (v6) ---------- */
.editor { gap: 18px; padding: 0 24px 24px; }
.editor-bar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  margin: 0 -24px; padding: 14px 24px; background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); border-radius: 20px 20px 0 0;
}
.editor-count { font-weight: 700; color: var(--muted); font-size: .95rem; }
.editor-head { display: flex; flex-direction: column; gap: 10px; }
.editor input, .editor textarea, .editor select { border-width: 1.5px; border-color: #e0e8ea; background: #fafeff; transition: border-color .15s, box-shadow .15s; }
.editor input:focus, .editor textarea:focus, .editor select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .15); background: #fff; outline: none; }
.e-title { font-size: 1.5rem; font-weight: 800; padding: 14px 16px; }

.switch { display: flex; gap: 12px; align-items: center; cursor: pointer; font-size: .95rem; line-height: 1.3; }
.switch input { display: none; }
.switch .slider-ui { width: 46px; height: 26px; border-radius: 999px; background: #d3dcde; position: relative; flex: none; transition: background .2s; }
.switch .slider-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.switch input:checked + .slider-ui { background: var(--accent); }
.switch input:checked + .slider-ui::after { transform: translateX(20px); }

.q-list { display: flex; flex-direction: column; gap: 16px; }
.q-edit {
  border: 0; border-radius: 14px; padding: 16px; gap: 12px; background: #fff;
  box-shadow: 0 1px 2px rgba(13, 66, 76, .06), 0 6px 20px rgba(13, 66, 76, .08);
  border-left: 5px solid var(--accent); animation: pop .25s ease-out;
}
@keyframes pop { from { transform: scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.q-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.q-num {
  width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 900; flex: none;
}
.pill { display: inline-flex; align-items: center; gap: 4px; background: #f0fafc; border-radius: 999px; padding: 0 4px 0 12px; font-size: .9rem; }
.editor .pill select { border: 0; background: transparent; padding: 8px 6px; width: auto; font-weight: 700; color: #2e6873; box-shadow: none; cursor: pointer; }
.pill select:disabled { color: var(--muted); cursor: default; }
.editor .pill-check { padding: 8px 12px; gap: 6px; white-space: nowrap; font-weight: 700; color: #2e6873; cursor: pointer; }
.editor .pill-check input { width: auto; margin: 0; accent-color: var(--accent); }
.q-tools { display: flex; gap: 4px; }
.icon-btn {
  width: 34px; height: 34px; padding: 0; border-radius: 10px; background: #f0f4f5; color: #444;
  box-shadow: none; font-size: 1rem; display: inline-grid; place-items: center;
}
.icon-btn:hover:not(:disabled) { background: #e1eef1; }
.icon-btn.del:hover:not(:disabled) { background: #fde0e4; color: var(--bad); }
.icon-btn:active { transform: none; box-shadow: none; }
.icon-btn:disabled { opacity: .3; }
.editor input.q-text { font-size: 1.25rem; font-weight: 700; text-align: center; padding: 16px; }
.q-media { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.drop {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 2px dashed #c8e3e8;
  border-radius: 10px; color: #4e8792; font-weight: 700; font-size: .9rem; cursor: pointer;
}
.drop:hover { border-color: var(--accent); background: #f5fdfe; }
.q-thumb { position: relative; }
.q-thumb img { height: 72px; border-radius: 10px; display: block; }
.q-thumb .icon-btn { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; font-size: .7rem; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.q-hint { font-size: .85rem; }
.q-note { font-size: .85rem; color: var(--muted); }
.q-note.warn { color: #b26a00; font-weight: 600; }

.tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 64px;
  padding: 8px 10px 8px 14px; border-radius: 14px; color: #fff;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 55%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 10px 18px -12px rgba(13, 66, 76, .6); transition: transform .12s;
}
.tile:hover { transform: translateY(-1px); }
.tile.a0 { background: var(--a0); } .tile.a1 { background: var(--a1); } .tile.a2 { background: var(--a2); }
.tile.a3 { background: var(--a3); } .tile.a4 { background: var(--a4); } .tile.a5 { background: var(--a5); }
.tile-shape .shape { width: 26px; height: 26px; }
.editor .tile input {
  flex: 1; min-width: 0; background: rgba(255, 255, 255, .16); border: 1.5px solid transparent;
  color: #fff; font-weight: 700; font-size: 1.05rem; padding: 10px 12px;
}
.editor .tile input::placeholder { color: rgba(255, 255, 255, .7); }
.editor .tile input:focus { background: rgba(255, 255, 255, .26); border-color: #fff; box-shadow: none; }
.tick {
  width: 38px; height: 38px; padding: 0; border-radius: 50%; flex: none; font-size: 1.2rem;
  background: rgba(255, 255, 255, .2); border: 2px solid rgba(255, 255, 255, .8); color: transparent; box-shadow: none;
}
.tick:hover { color: rgba(255, 255, 255, .7); }
.tile.correct .tick { background: #fff; color: var(--ok); border-color: #fff; }
.tile.correct { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ok); }
.tile-del {
  position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; padding: 0; border-radius: 50%;
  background: #fff; color: #555; font-size: .7rem; box-shadow: 0 1px 4px rgba(0,0,0,.35); opacity: 0; transition: opacity .15s;
}
.tile:hover .tile-del, .tile:focus-within .tile-del { opacity: 1; }
.tile-del:hover { background: var(--bad); color: #fff; }
.tile.add {
  justify-content: center; background: #f8feff; color: #4e8792; border: 2px dashed #c8e3e8;
  box-shadow: none; font-weight: 700;
}
.tile.add span { font-size: 1.3rem; }
.tile.add:hover { border-color: var(--accent); background: #f0fafc; }
.order-edit { display: flex; flex-direction: column; gap: 8px; }
.order-num { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.3); display: grid; place-items: center; font-weight: 900; flex: none; }
.icon-btn.ghost { background: rgba(255, 255, 255, .18); color: #fff; }
.icon-btn.ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .32); }
.order-edit .tile.add { min-height: 52px; }

.add-q { border: 2px dashed #d2eaee; border-radius: 14px; padding: 16px; background: #fafeff; }
.add-q-title { font-weight: 800; margin-bottom: 10px; color: #2e6873; }
.add-q-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.type-btn {
  display: flex; align-items: center; gap: 8px; background: #fff; color: var(--text); border: 1.5px solid #e0e8ea;
  box-shadow: none; font-weight: 700; font-size: .92rem; padding: 10px 12px; text-align: left;
}
.type-btn:hover { border-color: var(--accent); background: #f0fafc; transform: translateY(-1px); }
.type-ico { font-size: 1.2rem; }

@media (max-width: 700px) {
  .tile-grid { grid-template-columns: 1fr; }
  .editor { padding: 0 14px 14px; }
  .editor-bar { margin: 0 -14px; padding: 12px 14px; }
  .tile-del { opacity: 1; }
}

/* ---------- Fach, Thema, Filter (v7) ---------- */
.meta-row { display: grid; grid-template-columns: 1.2fr 1.5fr .8fr; gap: 10px; }
.meta-row .field { font-size: .8rem; }
.filter-bar { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; margin-bottom: 4px; }
#f-search { padding-left: 38px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a84a0' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E") 12px 50% / 18px no-repeat; }
.filter-bar input, .filter-bar select { padding: 9px 12px; border-width: 1.5px; font-size: .95rem; }
.tag.subj { margin-left: 0; margin-right: 2px; background: hsl(var(--h) 75% 92%); color: hsl(var(--h) 55% 32%); }
@media (max-width: 700px) { .meta-row, .filter-bar { grid-template-columns: 1fr; } }
.meta-row input, .meta-row select { font-size: 1rem; padding: 10px 12px; }

/* ---------- Bildsuche (v8) ---------- */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(10, 42, 48, .6); backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center; padding: 4vh 16px; }
.modal-card { background: #fff; color: var(--text); border-radius: 16px; width: 100%; max-width: 980px; max-height: 92vh;
  display: flex; flex-direction: column; gap: 12px; padding: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.4); animation: pop .2s ease-out; }
.modal-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 1.1rem; }
.seg { display: inline-flex; background: #eff7f8; border-radius: 999px; padding: 3px; }
.seg button { background: transparent; color: #4e8792; box-shadow: none; border-radius: 999px; padding: 6px 14px; font-size: .9rem; }
.seg button.on { background: var(--accent); color: #fff; }
.modal input[type=search] { border-width: 1.5px; }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; overflow-y: auto; padding: 2px; }
.img-hit { position: relative; padding: 0; border-radius: 10px; overflow: hidden; background: #eee; box-shadow: none; aspect-ratio: 4 / 3; }
.img-hit img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.img-hit span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px; font-size: .68rem; font-weight: 500; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.7)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.img-hit:hover img { transform: scale(1.05); }
.img-hit:hover { outline: 3px solid var(--accent); }
.img-hit.busy { opacity: .5; cursor: progress; }
.q-credit { font-size: .75rem; max-width: 280px; }
.q-fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.q-fig figcaption { font-size: .75rem; color: rgba(255,255,255,.75); max-width: min(480px, 90vw); text-align: center; }
button.drop { background: transparent; box-shadow: none; font: inherit; font-weight: 700; font-size: .9rem; }
button.drop:active { transform: none; }

/* ---------- Lobby-Optionen (v10) ---------- */
.lobby-opts { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: center; align-items: center;
  background: rgba(255, 255, 255, .1); border-radius: 14px; padding: 12px 18px; max-width: 1000px; }
.lobby-opts .switch { color: #fff; }
.lobby-opts .sub { font-size: .82rem; color: rgba(255, 255, 255, .75); }
.lobby-opts .switch input:checked + .slider-ui { background: #ffd54f; }
#btn-lock.locked { background: #ffd54f; color: #222; }

/* ---------- Hausaufgaben (v10) ---------- */
.hw-kicker { font-size: .85rem; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.hw-card { max-width: 620px; }
.hw-form { display: flex; flex-direction: column; gap: 14px; }
.hw-form input[type=datetime-local] { font-size: 1.05rem; }
.hw-share { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.hw-share .qr { width: 180px; height: 180px; border: 1px solid #eee; }
.hw-share-text { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 10px; }
.tag.green { background: #d9f5d0; color: var(--ok); }

/* ---------- Team-Modus, Folien, Bildantworten (v11) ---------- */
.chip small { display: block; font-size: .72rem; font-weight: 500; opacity: .8; }
.timer.talk { background: #ffd54f; color: #222; font-size: 2rem; }
.talk-box { margin-top: 24px; text-align: center; font-size: 1.6rem; font-weight: 900; }
.slide-body { background: #fff; color: var(--text); border-radius: 14px; padding: 20px 26px; max-width: 900px; width: 100%;
  font-size: clamp(1.1rem, 2.2vw, 1.6rem); line-height: 1.45; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.p-body .slide-body { font-size: 1.05rem; padding: 14px 16px; }
.slide-mode .question-text { font-size: clamp(1.8rem, 4vw, 3rem); }
.answer-img { height: 100px; max-width: 45%; object-fit: contain; border-radius: 8px; background: #fff; flex: none; }
.answers.with-images .answer { min-height: 120px; }
.player-answers.with-images .answer { flex-direction: column; gap: 6px; }
.player-answers.with-images .shape { width: 28px; height: 28px; }
.player-answers.with-images .answer-img { height: auto; max-height: 22vh; max-width: 90%; }
.bar-img { height: 36px; border-radius: 4px; background: #fff; }
.tile-img { position: relative; flex: none; }
.tile-img img { height: 48px; width: 64px; object-fit: cover; border-radius: 8px; display: block; background: #fff; }
.tile-img-del { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; padding: 0; border-radius: 50%;
  background: #fff; color: #555; font-size: .6rem; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.tile-img-btns { display: flex; gap: 4px; flex: none; }
.tile-img-btns .icon-btn { width: 30px; height: 30px; font-size: .85rem; cursor: pointer; }
.q-edit.is-slide { border-left: 6px solid #ffd54f; }
.editor .slide-text { width: 100%; font-size: 1.05rem; line-height: 1.4; }

/* ---------- Formatierung und Formeln (v11) ---------- */
.fmt-bar { display: inline-flex; gap: 2px; background: #f0fafc; border-radius: 10px; padding: 3px; }
.fmt-bar button { background: transparent; color: #2e6873; box-shadow: none; padding: 6px 10px; font-size: .9rem; border-radius: 8px; min-width: 34px; }
.fmt-bar button:hover { background: #def5f9; }
.fmt-bar button:active { transform: none; }
.fmt-help table { border-collapse: collapse; margin: 6px 0; }
.fmt-help td { padding: 2px 14px 2px 0; }
.fmt-help code, .q-preview code { background: rgba(0, 0, 0, .06); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.q-preview { background: #f5fdfe; border: 1.5px dashed #d2eaee; border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; }
.q-preview .pv-label { font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.q-preview .pv-q { font-size: 1.15rem; font-weight: 700; text-align: center; }
.q-preview .pv-answers { display: flex; flex-wrap: wrap; gap: 6px; }
.q-preview .pv-answers > span { background: #fff; border: 1px solid #e0e8ea; border-radius: 8px; padding: 4px 10px; }
.question-text .katex, .answer .katex { font-size: 1.05em; }
.answer .katex { color: #fff; }
.slide-body .katex-display { margin: .4em 0; }
@media (max-width: 700px) { .fmt-bar { order: 5; width: 100%; justify-content: space-between; } }
.editor-bar { flex-wrap: wrap; }

/* Rechtliches, Hilfe */
.legal-links { text-align: center; font-size: .85rem; padding: 12px; color: #c8e6ec; }
.legal-links a { color: #c8e6ec; }
.doc { line-height: 1.55; gap: 4px; }
.doc h1 { margin: 0 0 4px; font-size: 1.6rem; }
.doc h2 { margin: 18px 0 2px; font-size: 1.15rem; }
.doc h3 { margin: 12px 0 0; font-size: 1rem; }
.doc p, .doc ul, .doc ol { margin: 4px 0; }
.doc a { color: var(--accent); }
.doc .missing { color: var(--bad); font-style: italic; }
.doc .toc a { margin-right: 12px; }
.answer-detail { margin-top: 6px; min-height: 1.4em; }
td[data-answer] { cursor: pointer; }
@media print {
  html, body { background: #fff; color: #000; }
  .doc { box-shadow: none; max-width: none; }
  .no-print, .legal-links { display: none; }
}

/* ---------- Eingeklappte Fragen im Editor ---------- */
.q-list:has(.folded) { gap: 8px; }
.q-edit.folded { padding: 8px 10px 8px 8px; animation: none; }
.q-fold {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: left;
  background: transparent; color: inherit; box-shadow: none; padding: 2px; border-radius: 10px; font-weight: 400;
}
.q-fold:hover { background: #f5fdfe; }
.q-fold:active { transform: none; }
.q-sum { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.q-sum-text, .q-sum-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-sum-text { font-weight: 700; font-size: 1rem; }
.q-sum-meta { font-size: .85rem; color: var(--muted); }
.q-warn { flex: none; font-size: .8rem; font-weight: 700; color: #a15c00; background: #fff3dc; border-radius: 999px; padding: 4px 10px; }
.q-chev { flex: none; color: var(--muted); font-size: 1.1rem; padding: 0 4px; }
.q-chev-btn { color: var(--muted); }
@media (max-width: 700px) {
  .q-edit.folded .q-head { flex-wrap: nowrap; }
  .q-edit.folded .q-tools [data-act=up], .q-edit.folded .q-tools [data-act=down] { display: none; }
  .q-warn-t { display: none; }
  .q-edit.folded .q-sum-text { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: .95rem; }
}

/* ---------- v0.4: neuer Grundlook, Quizkacheln, Rückmeldung ---------- */
.screen { animation: screen-in .28s ease-out; }
@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } }
.screen.top { justify-content: flex-start; }
.screen.game { padding-top: 64px; }
.screen-title { margin: 0; display: flex; align-items: center; gap: .35em; letter-spacing: -.02em; font-weight: 700; }
.screen-title .ico { color: #ffd54f; }
.gap-below { margin-bottom: 12px; }
.no-top { margin-top: 0; }
.on-dark-hint { color: rgba(255, 255, 255, .7); margin: 0; font-size: .9rem; }
.lobby-join { justify-content: center; align-items: stretch; gap: 12px; }
.lobby-count { display: flex; align-items: baseline; gap: 8px; }
.q-mid { justify-content: center; gap: 24px; align-items: center; }
#h-body { width: 100%; display: flex; justify-content: center; }
.card.wide { max-width: 1020px; }
.timer.talk { --ring: #7fd3ff; background:
  radial-gradient(closest-side, #1a515c calc(100% - 9px), transparent calc(100% - 8px)),
  conic-gradient(var(--ring) calc(var(--p) * 1%), rgba(255, 255, 255, .14) 0); color: #fff; }
.timer.talk::before { content: 'Beraten'; position: absolute; transform: translateY(46px); font-size: .7rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.timer { position: relative; }
.timer .ico { width: 46px; height: 46px; stroke-width: 3; }

/* Fach-Filter */
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.fchip { background: #fff; color: #465c61; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: .82rem; font-weight: 500; }
.fchip:hover { border-color: #c9dde1; background: var(--soft); }
.fchip.on { background: #192b2f; color: #fff; border-color: #192b2f; }
.fchip[style*="--h"]::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--h) 65% 55%); }
.fchip.on[style*="--h"]::before { background: hsl(var(--h) 80% 72%); }

/* Quiz-Kacheln */
.quiz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 12px; }
.qcard { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; background: #fff; min-width: 0;
  transition: box-shadow .2s, transform .2s, border-color .2s; }
.qcard:hover { box-shadow: var(--shadow); border-color: #d8e6e9; transform: translateY(-2px); }
.qcard-cover { --h: 188; height: 64px; border-radius: 15px 15px 0 0; padding: 10px 12px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
  background: linear-gradient(135deg, hsl(var(--h) 72% 58%), hsl(calc(var(--h) + 40) 70% 44%)); color: #fff; position: relative; overflow: hidden; }
.qcard-cover::after { content: ''; position: absolute; right: -14px; top: -18px; width: 70px; height: 70px; border-radius: 18px; background: rgba(255, 255, 255, .12); transform: rotate(20deg); }
.qcard-subj { font-size: .74rem; font-weight: 600; background: rgba(0, 0, 0, .22); padding: 3px 9px; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.qcard-n { font-size: .74rem; font-weight: 600; white-space: nowrap; opacity: .95; }
.qcard-body { padding: 12px 14px 8px; display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.qcard-title { font-weight: 600; font-size: 1.02rem; line-height: 1.3; overflow-wrap: anywhere; }
.qcard-meta { font-size: .82rem; color: var(--muted); }
.qcard-desc { font-size: .82rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qcard-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.qcard-tags .tag { margin-left: 0; }
.qcard-act { display: flex; gap: 6px; padding: 0 12px 12px; align-items: center; }
.qcard-act > button.primary { flex: 1; }
button.icon-only { padding: 7px 9px; }
button.icon-only .ico { margin: 0; }

/* Aufklappmenü */
.menu-wrap { position: relative; }
.qcard:has(.menu-wrap.open) { position: relative; z-index: 5; }
.menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 220px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 6px; box-shadow: 0 20px 50px -12px rgba(13, 66, 76, .4); animation: pop .15s ease-out; }
.menu-wrap.open .menu { display: flex; flex-direction: column; }
.menu-item { background: transparent; color: var(--text); justify-content: flex-start; padding: 9px 10px; border-radius: 9px; font-weight: 500; font-size: .9rem; gap: 10px; }
.menu-item .ico { color: var(--muted); }
.menu-item:hover { background: var(--soft); }
.menu-item.danger { color: var(--bad); background: transparent; }
.menu-item.danger .ico { color: var(--bad); }
.menu-item.danger:hover { background: #fde0e4; }

/* Rückmeldung auf dem Schülergerät */
#s-result, #s-standing, #s-end, #s-wait { text-align: center; }
.r-icon { width: 108px; height: 108px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .18);
  animation: pop-big .5s cubic-bezier(.2, 1.5, .4, 1) both; }
.r-icon .ico { width: 60px; height: 60px; stroke-width: 3; }
.r-icon:empty { display: none; }
@keyframes pop-big { from { transform: scale(.3); opacity: 0; } }
#r-points:not(:empty) { font-size: 1.5rem; background: rgba(0, 0, 0, .2); padding: 6px 20px; border-radius: 999px; }
.r-streak { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; background: rgba(255, 255, 255, .16); padding: 6px 14px; border-radius: 999px; }
.r-streak .ico { color: #ffd54f; }
.r-streak:empty { display: none; }
#r-rank { margin: 0; opacity: .9; font-variant-numeric: tabular-nums; }
.wait-dots { display: flex; gap: 8px; }
.wait-dots span { width: 12px; height: 12px; border-radius: 3px; animation: bob 1.2s ease-in-out infinite; }
.wait-dots span:nth-child(1) { background: var(--a0); } .wait-dots span:nth-child(2) { background: var(--a1); animation-delay: .15s; }
.wait-dots span:nth-child(3) { background: var(--a2); animation-delay: .3s; } .wait-dots span:nth-child(4) { background: var(--a3); animation-delay: .45s; }
@keyframes bob { 50% { transform: translateY(-10px); } }
.me-row { outline: 3px solid #ffd54f; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.no-margin { margin: 0; }
.board.narrow { max-width: 360px; }
.board.narrow .board-row { font-size: 1rem; }
.player-q { justify-content: flex-start; }
.player-q .question-text { font-size: 1.2rem; padding: 16px 18px; }
.player-answers:not(.with-images) .answer { flex-direction: column; gap: 10px; font-size: 1.25rem; text-align: center; }
@media (max-width: 700px) {
  .filter-chips { flex-wrap: nowrap; overflow-x: auto; margin: 6px -2px 2px; padding: 2px; scrollbar-width: none; }
  .fchip { flex: none; }
}

/* ---------- v0.5: Bedienung im Unterricht ---------- */
/* Gelbe Kachel: dunkle Schrift statt weiß (Kontrast 7:1 statt 2,4:1, am Beamer bei Tageslicht lesbar) */
.answer.a2, .tile.a2, .answer.a2 .count { color: #162b2f; }
.answer.a2 .shape, .tile.a2 .shape, .answer.a2 > .shape { fill: #162b2f; }
.tile.a2 input { color: #162b2f; }
.tile.a2 input::placeholder { color: rgba(22, 43, 47, .6); }

/* Verbindung weg */
.conn-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: #ffd54f; color: #162b2f; text-align: center;
  font-weight: 600; padding: 10px 16px; box-shadow: 0 4px 16px rgba(0, 0, 0, .3); }

/* Vollbild-Knopf neben dem Ton */
.mute.full { right: 82px; }
.mute.full .ico { stroke-width: 2.4; }
.keys-hint { font-size: .8rem; }
@media (hover: none) { .keys-hint { display: none; } }

/* Beamer: Frage und Antworten größer, damit es auch die letzte Reihe liest */
#s-question:not(.player-q) .question-text { font-size: clamp(1.5rem, 4.2vw, 3.4rem); max-width: 1400px; padding: 26px 34px; }
#s-question:not(.player-q) .answers { max-width: 1400px; gap: 14px; }
#s-question:not(.player-q) .answer { min-height: clamp(80px, 13vh, 150px); font-size: clamp(1.1rem, 2.9vw, 2.3rem); }
#s-question:not(.player-q) .answer > .shape { width: clamp(26px, 3vw, 44px); height: clamp(26px, 3vw, 44px); }
#s-question:not(.player-q) .info-box { font-size: clamp(1.1rem, 2.4vw, 1.9rem); }

/* Lobby: Auswahl und Klasse */
.lobby-opts .opt-field { display: flex; flex-direction: column; gap: 4px; color: #fff; font-size: .95rem; }
.lobby-opts .opt-field select, .lobby-opts .opt-field input { padding: 6px 10px; font-size: .95rem; border-radius: 10px; min-width: 150px; }

/* Schüler: eigene Antwort beim Warten */
.my-answer { display: flex; flex-direction: column; gap: 8px; align-items: center; width: 100%; max-width: 420px; }
.my-answer .my-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; opacity: .75; font-weight: 600; }
.my-answer .answer { width: 100%; min-height: 56px; justify-content: center; font-size: 1.15rem; box-shadow: none; }
.my-answer .answer > .shape { width: 22px; height: 22px; padding: 6px; }
.my-answer ol { text-align: left; margin: 0; background: rgba(255, 255, 255, .1); border-radius: 14px; padding: 10px 14px 10px 34px; }
.my-text { background: rgba(255, 255, 255, .14); border-radius: 14px; padding: 10px 18px; font-size: 1.3rem; font-weight: 600; }

/* Hausaufgabe: Nachschau */
.review { width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.review-item { background: #fff; color: var(--text); border-radius: 14px; padding: 12px 14px; border-left: 6px solid #ccc; display: flex; flex-direction: column; gap: 4px; }
.review-item.ok { border-left-color: var(--ok); }
.review-item.bad { border-left-color: var(--bad); }
.review-q { font-weight: 600; }
#s-end { justify-content: flex-start; padding-top: 12vh; padding-bottom: 40px; }

/* Anmeldung: angemeldet bleiben */
label.check { display: flex; gap: 8px; align-items: center; font-size: .9rem; color: var(--muted); cursor: pointer; }
label.check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* Klassen-Filter */
.group-filter { width: auto; min-width: 160px; }

/* Editor: Ziehen, Vorschau, Fragen übernehmen */
.grip { cursor: grab; display: inline-grid; place-items: center; touch-action: none; }
.q-edit.dragging { opacity: .45; }
.q-edit.drop-before { box-shadow: 0 -4px 0 0 var(--accent); }
.q-edit.drop-after { box-shadow: 0 4px 0 0 var(--accent); }
@media (hover: none) { .grip { display: none; } }
.add-q #btn-import-q { margin-top: 10px; }
.pv-card { max-width: 420px; align-items: center; }
.phone { width: 340px; max-width: 100%; height: 640px; max-height: 70vh; border-radius: 36px; padding: 10px; background: #111;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.phone-screen { height: 100%; border-radius: 28px; overflow: auto; position: relative; padding: 52px 12px 12px; gap: 10px;
  display: flex; flex-direction: column; align-items: center;
  background: radial-gradient(120% 70% at 0% 0%, #3295a9 0%, transparent 60%), #143036; color: #fff; animation: none; }
.phone-screen .pv-top { position: absolute; padding: 10px; font-size: .78rem; color: #fff; }
.editor-foot { margin-top: 4px; }
.phone-screen .question-text { font-size: 1.05rem; padding: 12px 14px; }
.phone-screen .player-answers:not(.with-images) .answer { font-size: 1rem; }
.phone-screen .player-answers .answer > .shape { width: 30px; height: 30px; padding: 9px; }
.pv-note { font-size: .8rem; margin: 0; text-align: center; }
.iq-card { max-width: 640px; }
.iq-list { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; max-height: 50vh; }
.iq-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.iq-item:hover { background: var(--soft); }
.iq-item input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--accent); }

/* ---------- v0.6: Ordner in der Quizliste ---------- */
/* Leiste links in der Karte; die Karte wird dafür auf großen Bildschirmen breiter */
.card.wide:has(#tab-quizzes:not(.hidden)) { max-width: 1320px; }
.quiz-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
.quiz-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.quiz-main > .filter-chips { margin: 0; }
.folder-bar { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto;
  border-right: 1px solid var(--line); padding: 2px 12px 2px 0; }
.fb-head { font-size: .7rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 14px 8px 4px; }
.fb-tip { font-size: .76rem; color: var(--muted); margin: 14px 8px 0; line-height: 1.4; }
.fold { display: flex; align-items: center; border-radius: 10px; border: 1.5px solid transparent; position: relative; }
.fold:hover { background: var(--soft); }
.fold.on { background: #e7fafe; }
.fold.drop { background: #e2f5dc; border-color: var(--ok); border-style: dashed; }
.fold-btn { flex: 1; min-width: 0; background: transparent; color: var(--text); box-shadow: none; justify-content: flex-start; gap: 9px;
  padding: 8px 8px; font-weight: 500; font-size: .9rem; border-radius: 10px; }
.fold-btn:hover { background: transparent; }
.fold.on .fold-btn { color: #2693a9; font-weight: 600; }
.fold.drop .fold-btn { color: #1b5e08; }
.fold-btn .ico { flex: none; color: var(--muted); }
.fold.on .fold-btn .ico { color: var(--accent); }
.fold-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.fold-n { font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.fold .menu-wrap > button { background: transparent; border: 0; box-shadow: none; padding: 4px 5px; opacity: 0; }
.fold:hover .menu-wrap > button, .fold.on .menu-wrap > button, .fold .menu-wrap > button:focus-visible, .fold .menu-wrap.open > button { opacity: 1; }
.fold .menu { min-width: 180px; }
.fold:has(.menu-wrap.open) { z-index: 5; }
.fold-new { background: transparent; color: var(--accent); box-shadow: none; border: 1.5px dashed #c9dde1; justify-content: flex-start; gap: 9px;
  padding: 7px 8px; font-weight: 500; font-size: .88rem; border-radius: 10px; margin-top: 6px; }
.fold-new:hover { background: var(--soft); }
.fold-input { font-size: .9rem; padding: 7px 9px; border-radius: 10px; border: 1.5px solid var(--accent); margin: 2px 0; }
body.dragging-quiz .fold[data-drop] { border-color: #c9dde1; border-style: dashed; }
body.dragging-quiz .fold.drop { border-color: var(--ok); }
.qcard[draggable="true"] { cursor: grab; }
.qcard.dragging { opacity: .4; }
.qcard.sel { outline: 3px solid var(--accent); outline-offset: 1px; }
.tag.fold-tag { background: #fff4d6; color: #7a5600; display: inline-flex; align-items: center; gap: 3px; }
.tag.fold-tag .ico { width: 11px; height: 11px; margin: 0; }
.sel-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #192b2f; color: #fff; border-radius: 12px; padding: 8px 12px; }
.sel-bar strong { margin-right: auto; }
.undo-toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; background: #192b2f; color: #fff;
  border-radius: 12px; padding: 10px 16px; display: flex; gap: 14px; align-items: center; box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .5);
  max-width: calc(100vw - 32px); animation: pop .2s ease-out; }
.undo-toast span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.undo-toast button { background: transparent; box-shadow: none; color: #bcf1fb; font-weight: 600; padding: 4px 6px; }
.fm-card { max-width: 420px; }
.fm-list { display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow-y: auto; padding: 2px; }
.fm-item { background: #fff; color: var(--text); box-shadow: none; border: 1px solid var(--line); justify-content: flex-start; gap: 10px; font-weight: 500; padding: 10px 12px; }
.fm-item:hover { background: var(--soft); }
.fm-item.on { border-color: var(--accent); color: #2693a9; font-weight: 600; }
.fm-item span { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-item .ico { color: var(--muted); }
#fm-new input { flex: 1; min-width: 140px; }
.folder-actions { display: none; gap: 6px; flex-wrap: wrap; }
/* Schmale Bildschirme: Ordner als waagrechte Leiste über der Liste */
@media (max-width: 800px) {
  .quiz-layout { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .folder-bar { position: static; flex-direction: row; overflow-x: auto; max-height: none; border-right: 0; padding: 2px 2px 6px; gap: 6px; scrollbar-width: thin; }
  .fb-head, .fb-tip { display: none; }
  .fold { flex: none; border: 1px solid var(--line); border-radius: 999px; }
  .fold.on { border-color: #cef5fc; }
  .fold-btn { padding: 6px 12px; border-radius: 999px; }
  .fold-name { max-width: 160px; }
  .fold .menu-wrap { display: none; }
  .folder-actions { display: flex; }
  .fold-new { flex: none; margin-top: 0; border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
  .fold-input { flex: none; width: 180px; margin: 0; border-radius: 999px; }
}

/* Countdown vor der ersten Frage */
.countdown-wrap { display: flex; justify-content: center; margin: 2rem 0 1rem; }
.countdown-num { font-size: 5rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; text-align: center; }
.countdown-num.big { font-size: clamp(8rem, 30vh, 16rem); width: 1.5em; height: 1.5em; display: grid; place-items: center;
  border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; }
.countdown-num.pop { animation: cd-pop .9s ease-out; }
@keyframes cd-pop { 0% { transform: scale(1.35); opacity: .2; } 25% { transform: scale(1); opacity: 1; } 100% { transform: scale(.96); } }
@media (prefers-reduced-motion: reduce) { .countdown-num.pop { animation: none; } }
.cd-sub { text-align: center; font-size: 1.4rem; color: #fff; opacity: .9; }
#s-wait .countdown-num { margin-bottom: .5rem; }

/* Titelbild pro Quiz */
.e-title-row { display: flex; gap: 12px; align-items: stretch; }
.e-title-row .e-title { flex: 1; min-width: 0; }
.e-cover { flex: 0 0 190px; min-height: 64px; border: 2px dashed #d2e9ee; border-radius: 14px; display: flex; flex-wrap: wrap;
  align-items: center; justify-content: center; gap: 6px; padding: 6px; position: relative; overflow: hidden; background: #f8feff; }
.e-cover .drop { padding: 4px 10px; font-size: .82rem; }
.e-cover-label { width: 100%; text-align: center; font-size: .8rem; font-weight: 700; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 4px; }
.e-cover.has-img { border: 0; padding: 0; background: #eee; aspect-ratio: 16 / 9; min-height: 0; }
.e-cover.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.e-cover-act { position: absolute; top: 4px; right: 4px; display: flex; gap: 4px; }
.e-cover-act .icon-btn { background: rgba(255, 255, 255, .92); cursor: pointer; }
.e-cover-credit { position: absolute; left: 0; right: 0; bottom: 0; font-size: .65rem; color: #fff; background: rgba(0, 0, 0, .45);
  padding: 2px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .e-title-row { flex-direction: column; } .e-cover { flex-basis: auto; } }
.qcard-cover.has-img { height: 110px; }
.qcard-cover.has-img::after { display: none; }
.qcard-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.qcard-cover.has-img::before { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(0, 0, 0, .45)); }
.qcard-cover.has-img > span { position: relative; z-index: 1; }
.lobby-head { display: flex; align-items: center; justify-content: center; gap: 18px; }
.lobby-cover { height: 84px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; box-shadow: 0 6px 20px rgba(0, 0, 0, .3); }
.hw-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; margin-bottom: 4px; }

/* Zuordnen */
.match-rows { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 560px; }
.match-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: stretch; padding: 6px; border-radius: 14px;
  background: rgba(255, 255, 255, .12); border: 2px solid transparent; color: #fff; font: inherit; text-align: left; cursor: pointer; }
.match-row.target .match-slot:not(.filled) { border-color: #ffd54f; }
.match-row.selected { border-color: #fff; }
.match-left { display: flex; align-items: center; padding: 8px 10px; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.match-slot { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 6px 10px; border-radius: 10px;
  border: 2px dashed rgba(255, 255, 255, .5); font-weight: 700; text-align: center; overflow-wrap: anywhere; }
.match-slot.filled { border: 0; }
.match-slot.a0 { background: var(--a0); } .match-slot.a1 { background: var(--a1); } .match-slot.a2 { background: var(--a2); color: #1c292b; }
.match-slot.a3 { background: var(--a3); } .match-slot.a4 { background: var(--a4); } .match-slot.a5 { background: var(--a5); }
.match-pool { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 100%; max-width: 560px; min-height: 8px; }
.match-pool .match-card { min-height: 52px; padding: 8px 14px; flex: 0 1 auto; width: auto; justify-content: center; }
/* Ziehen: Kärtchen und belegte Plätze scrollen nicht mit, das Kärtchen folgt dem Finger */
.match-pool .match-card, .match-row:has(.match-slot.filled) { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.match-card.dragging, .match-row.dragging .match-slot { opacity: .35; }
.match-ghost { position: fixed; z-index: 1000; pointer-events: none; transform: translate(-50%, -60%) scale(1.06) rotate(-2deg);
  min-height: 52px; padding: 8px 14px; justify-content: center; box-shadow: 0 10px 28px rgba(0, 0, 0, .45); }
.match-row.drop-over { border-color: #ffd54f; background: rgba(255, 213, 79, .22); }
.match-pool.drop-over { outline: 2px dashed rgba(255, 255, 255, .6); outline-offset: 4px; border-radius: 14px; }
.match-pool { min-height: 52px; }
/* Beamer: zwei Spalten, bei der Auflösung die richtigen Paare */
.match-board { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; width: 100%; max-width: 1100px; }
.match-board { gap: 8px 24px; }
#s-question .match-board .answer { min-height: clamp(48px, 8vh, 90px); padding: 8px 18px; font-size: clamp(1rem, 2.2vw, 1.8rem); }
.match-board .mb-left { background: rgba(255, 255, 255, .14); color: #fff; }
.match-solution { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 1000px; }
.match-solution .ms-row { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 14px; align-items: center; background: rgba(255, 255, 255, .12);
  border-radius: 14px; padding: 10px 16px; font-size: 1.35rem; font-weight: 700; color: #fff; }
.match-solution .ms-arrow { opacity: .7; }
.match-solution .ms-hits { font-size: 1rem; background: rgba(0, 0, 0, .25); border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
/* Editor: Paare */
.match-edit { display: flex; flex-direction: column; gap: 8px; }
.match-edit .pair { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 8px; align-items: center; }
.match-edit .pair-arrow { font-weight: 800; color: var(--muted); }
.match-edit .pair input { min-width: 0; }
@media (max-width: 640px) { .match-edit .pair { grid-template-columns: 1fr 1fr auto; } .match-edit .pair-arrow { display: none; } }
.my-pairs { display: flex; flex-direction: column; gap: 4px; text-align: left; font-size: 1.05rem; }

/* ---------- v0.9: Spannung, Lesezeit, Klassenziel ---------- */
/* Lobby: Optionen aufklappbar, damit die Namen die Beamermitte bekommen */
.opt-box { width: 100%; max-width: 1000px; }
.opt-box > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  color: rgba(255, 255, 255, .85); font-weight: 600; padding: 8px 14px; border-radius: 12px; }
.opt-box > summary::-webkit-details-marker { display: none; }
.opt-box > summary:hover { background: rgba(255, 255, 255, .08); }
.opt-box > summary::after { content: '▾'; transition: transform .2s; }
.opt-box[open] > summary::after { transform: rotate(180deg); }
.opt-sum-title { display: inline-flex; align-items: center; gap: 6px; }
.opt-summary { font-weight: 400; font-size: .88rem; color: rgba(255, 255, 255, .65); }
.opt-box .lobby-opts { margin-top: 8px; }
#s-lobby .chips { min-height: 48px; }
#s-lobby .chip { font-size: 1.15rem; padding: 10px 20px; }
#s-lobby .lobby-count .big-number { font-size: 3.4rem; }

/* Frage: Ansage der letzten Frage, Antwortzähler, Lesezeit */
.q-flag { background: #ffd54f; color: #1b2a2e; font-weight: 800; padding: 6px 18px; border-radius: 999px; font-size: clamp(1rem, 2vw, 1.4rem);
  letter-spacing: .02em; animation: flag-in .6s cubic-bezier(.2, 1.4, .4, 1) both; }
.q-flag.finale { background: var(--cta); color: #fff; }
@keyframes flag-in { from { transform: scale(.5) rotate(-4deg); opacity: 0; } }
.answer-meter { display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 10px; row-gap: 6px; color: #fff; }
.answer-meter b { font-size: 3.2rem; line-height: 1; font-variant-numeric: tabular-nums; display: inline-block; }
.answer-meter b.bump { animation: bump .35s ease-out; }
@keyframes bump { 40% { transform: scale(1.25); color: #ffd54f; } }
.answer-meter > span { font-size: .95rem; line-height: 1.25; color: rgba(255, 255, 255, .8); }
.answer-meter i { grid-column: 1 / -1; display: block; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .16); overflow: hidden; min-width: 120px; }
.answer-meter em { display: block; height: 100%; width: 0; background: #ffd54f; border-radius: inherit; transition: width .3s; }
.answer-meter.full em { background: var(--a2); }
.timer.talk::before { content: attr(data-label); }
.read-hint { color: rgba(255, 255, 255, .8); font-size: clamp(1rem, 2vw, 1.4rem); text-align: center; }
#s-question.reading #h-body, #s-question.reading .answer-meter { visibility: hidden; }
#s-question.reading.read-body #h-body { visibility: visible; }
#h-body.appear .answer { animation: tile-in .45s cubic-bezier(.2, 1.3, .4, 1) both; }
#h-body.appear .answer:nth-child(2) { animation-delay: .06s; } #h-body.appear .answer:nth-child(3) { animation-delay: .12s; }
#h-body.appear .answer:nth-child(4) { animation-delay: .18s; } #h-body.appear .answer:nth-child(5) { animation-delay: .24s; }
#h-body.appear .answer:nth-child(6) { animation-delay: .3s; }
@keyframes tile-in { from { transform: translateY(18px) scale(.96); opacity: 0; } }

/* Auflösung: Anteil je Antwort als Balken in der Kachel, darunter ein Hinweis */
.answer.revealed { position: relative; overflow: hidden; }
.answer.revealed::after { content: ''; position: absolute; left: 0; bottom: 0; height: 7px; width: var(--share, 0%);
  background: rgba(255, 255, 255, .85); border-radius: 0 4px 0 0; animation: share-in .8s ease-out both; }
.answer.a2.revealed::after { background: rgba(22, 43, 47, .7); }
@keyframes share-in { from { width: 0; } }
.reveal-note { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .12); color: #fff;
  border-radius: 999px; padding: 8px 18px; font-size: clamp(.95rem, 1.6vw, 1.2rem); animation: pop .4s ease-out both; }
.reveal-note .ico { color: #ffd54f; }

/* Zwischenstand mit Bewegung */
.board.lb { max-width: 760px; }
.lb-row { position: relative; overflow: hidden; align-items: center; gap: 14px; justify-content: flex-start; padding: 14px 22px; animation: fade-in .3s ease-out both; }
@keyframes fade-in { from { opacity: 0; } }
.lb-row.go { transition: transform .9s cubic-bezier(.3, .9, .3, 1); }
.lb-row > span { position: relative; }
.lb-bar { position: absolute; inset: 0 auto 0 0; width: var(--w); background: rgba(var(--accent-rgb), .14); }
.lb-row.go .lb-bar { width: var(--w2); transition: width 1s ease-out; }
.lb-row.first .lb-bar { background: rgba(255, 179, 0, .22); }
.lb-rank { width: 1.6em; text-align: center; color: var(--muted); }
.lb-row.first .lb-rank { color: #b37a00; }
.lb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-move { font-size: .8rem; font-weight: 700; min-width: 3em; text-align: right; }
.lb-move.up { color: var(--ok); } .lb-move.down { color: var(--bad); }
.lb-gain { font-size: .9rem; color: var(--accent); font-weight: 600; min-width: 3.5em; text-align: right; opacity: 0; }
.lb-row.go .lb-gain { opacity: 1; transition: opacity .3s .2s; }
.lb-score { min-width: 3.2em; text-align: right; }
.board-note { display: inline-flex; align-items: center; gap: 8px; color: #fff; margin: 0; font-size: 1.15rem; animation: pop .4s ease-out both; flex-wrap: wrap; justify-content: center; }
.board-note .ico { color: #ffd54f; }
.board-note button.light { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .2); }

/* Klassenziel */
.board.coop { max-width: 820px; align-items: center; gap: 14px; }
.coop-meter { position: relative; width: 100%; height: 46px; border-radius: 999px; background: rgba(255, 255, 255, .14); margin-top: 34px; }
.coop-meter i { position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, var(--a0), var(--a2)); transition: width 1.4s cubic-bezier(.3, .9, .3, 1); }
.coop-meter b { position: absolute; top: -10px; bottom: -10px; width: 4px; margin-left: -2px; background: #ffd54f; border-radius: 2px; }
.coop-meter b span { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .95rem; color: #ffd54f; padding-bottom: 4px; }
.coop-num { font-size: clamp(2.4rem, 7vw, 4.6rem); font-weight: 800; }
.coop-num strong { font-weight: 800; }
.coop-sub { color: rgba(255, 255, 255, .8); font-size: 1.1rem; text-align: center; }

/* Siegerehrung: Name über der Säule, Plätze erscheinen nacheinander */
.podium { align-items: flex-end; gap: 14px; }
.podium .place { display: flex; flex-direction: column; align-items: center; gap: 10px; transition: opacity .5s; }
.podium .place-name { text-align: center; font-size: clamp(1.1rem, 2.4vw, 1.7rem); font-weight: 800; max-width: clamp(90px, 22vw, 200px); word-break: break-word; line-height: 1.15; }
.podium .place-name small { display: block; font-size: .62em; font-weight: 500; opacity: .85; margin-top: 2px; }
.podium .pl1 .place-name { font-size: clamp(1.4rem, 3vw, 2.2rem); color: #ffd54f; }
.podium .step { animation: none; display: flex; justify-content: center; align-items: flex-start; padding-top: 16px; transition: transform .8s cubic-bezier(.2, 1.1, .4, 1); transform-origin: bottom; }
.podium .medal { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 1.8rem; font-weight: 800;
  background: rgba(255, 255, 255, .35); color: #1b2a2e; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.podium .place.wait .step { transform: scaleY(0); }
.podium .place.wait .place-name { opacity: 0; transform: translateY(10px); }
.podium .place-name { transition: opacity .4s .5s, transform .4s .5s; }
#rest.wait { opacity: 0; }
#rest { transition: opacity .6s; }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; display: none; }
.confetti.on { display: block; }
@media (prefers-reduced-motion: reduce) {
  .lb-row.go, .lb-row.go .lb-bar, .podium .step, .podium .place-name, .coop-meter i { transition: none; }
  #h-body.appear .answer, .answer.revealed::after, .q-flag { animation: none; }
}

/* Handy: Live-Zähler beim Warten, ermutigende Sätze, Rückblick am Ende */
.wait-live { display: grid; gap: 8px; justify-items: center; margin: 4px 0 0; color: rgba(255, 255, 255, .85); font-size: 1rem; }
.wait-live b { font-size: 1.3rem; }
.wait-live i { display: block; width: min(260px, 70vw); height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.wait-live em { display: block; height: 100%; background: #ffd54f; border-radius: inherit; transition: width .3s; }
.r-cheer { margin: 0; font-size: 1.1rem; font-weight: 600; max-width: 30ch; text-align: center; }
.r-cheer:empty { display: none; }
.talk-box .q-flag { display: block; width: fit-content; margin: 0 auto 18px; font-size: 1.1rem; }
.p-body > .q-flag { align-self: center; margin-bottom: 8px; }
.coop-meter.small { height: 22px; margin-top: 8px; }
.coop-meter.small b { top: -6px; bottom: -6px; }
.recap { width: 100%; max-width: 420px; display: grid; gap: 14px; }
.recap-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.recap-stats > div { background: rgba(255, 255, 255, .12); border-radius: 14px; padding: 10px 6px; display: grid; gap: 2px; text-align: center; }
.recap-stats b { font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.recap-stats span { font-size: .8rem; color: rgba(255, 255, 255, .8); }
.recap-wrong { background: #fff; color: var(--text); border-radius: 16px; padding: 4px 14px; text-align: left; }
.recap-wrong > summary { cursor: pointer; font-weight: 700; padding: 10px 0; display: flex; align-items: center; gap: 8px; color: var(--accent); }
.recap-wrong .rw { border-top: 1px solid var(--line); padding: 10px 0; display: grid; gap: 4px; font-size: .95rem; }
.rw-q { font-weight: 600; }
.rw-q span { display: block; font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.rw-mine { color: var(--bad); }
.rw-right { color: var(--ok); font-weight: 600; }
.recap-all { margin: 0; text-align: center; font-weight: 600; }

/* Editor: einheitliche Schalter, ⋯-Menü je Frage, Zeithinweis */
.switch.small { gap: 8px; font-size: .9rem; }
.switch.small .slider-ui { width: 36px; height: 20px; }
.switch.small .slider-ui::after { width: 14px; height: 14px; }
.switch.small input:checked + .slider-ui::after { transform: translateX(16px); }
.editor .pill.switch { padding: 6px 12px; }
.m-partial-row { margin-top: 6px; color: var(--text); }
.q-edit:has(.menu-wrap.open) { position: relative; z-index: 5; }
.q-more .menu { min-width: 200px; }
.menu-item:disabled { opacity: .4; cursor: default; }
.time-hint { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .88rem; color: #8a4b00; background: #fff4e0;
  border-radius: 10px; padding: 6px 10px; }
.time-hint .ico { width: 16px; height: 16px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 700; text-decoration: underline; cursor: pointer; font-size: inherit; box-shadow: none; }
.link-btn:hover:not(:disabled) { background: none; }

/* ---------- Auf Bild tippen (v0.10) ---------- */
.pin-wrap { position: relative; display: inline-block; max-width: 100%; line-height: 0; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: var(--shadow-lg); }
.pin-wrap img { display: block; max-width: 100%; height: auto; user-select: none; -webkit-user-select: none; }
.pin-zone { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; border: 3px solid #fff;
  background: rgba(43, 138, 62, .35); box-shadow: 0 0 0 3px var(--ok), 0 0 0 9999px rgba(0, 0, 0, .18); animation: zone-in .5s ease-out both; }
@keyframes zone-in { from { transform: translate(-50%, -50%) scale(.3); opacity: 0; } }
.pin-dot { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #ffd54f; border: 2px solid #1b2a2e; }
.pin-dot.hit { background: var(--a2); }
.pin-dot.miss { background: #ff8a93; }
.pin-dot.mine { width: 26px; height: 26px; margin: -13px 0 0 -13px; background: var(--cta); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.pin-dot.mine::after { content: ''; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: #fff; }
.pin-input { cursor: crosshair; touch-action: manipulation; align-self: center; }
.p-body .pin-input img { max-height: 58vh; width: auto; }
.my-answer .pin-wrap img, .recap .pin-wrap img, .hw-review .pin-wrap img { max-height: 200px; width: auto; }
#s-question.pin-mode .q-mid .q-image { max-height: min(52vh, 520px); max-width: min(900px, 92vw); }
#s-question.pin-mode .pin-wrap { box-shadow: var(--shadow-lg); }
#h-image-wrap { position: relative; display: inline-block; line-height: 0; }
#h-pins { position: absolute; inset: 0; pointer-events: none; }
#h-pins .pin-dot { width: 18px; height: 18px; margin: -9px 0 0 -9px; }
.pin-small { margin-top: 8px; }
.pin-small img { max-height: 180px; width: auto; }
.pin-small .pin-dot.mine { width: 18px; height: 18px; margin: -9px 0 0 -9px; }
.pin-edit { margin: 8px 0; }
.pin-edit img { max-height: 380px; width: auto; }
.pin-edit-tools { align-items: flex-end; gap: 16px; }
.pin-edit-tools .field { flex: 1 1 220px; }

/* Lernstand pro Klasse */
.class-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: #eef7f6; }
.class-progress .cp-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--accent); margin-right: 4px; }
.class-progress .cp-label .ico { width: 18px; height: 18px; }
.class-progress .muted { font-weight: 500; margin-left: 2px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0 4px; }
.stat { background: #f4fafb; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 1.7rem; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat span { font-size: .85rem; color: var(--muted); }
.stat.warn b { color: var(--cta); }
.trend { font-weight: 700; color: var(--muted); margin-left: 4px; white-space: nowrap; }
.trend.up { color: var(--ok); }
.trend.down { color: var(--bad); }
table.report tr.click { cursor: pointer; }
table.report tr.click:hover td { background: #f4fafb; }

/* ---------- v0.11: Hausaufgaben, Berichte, Lehrkräfte ---------- */
.card.wide:has(#tab-homework:not(.hidden)), .card.wide:has(#tab-users:not(.hidden)), .card.wide:has(#tab-reports:not(.hidden)) { max-width: 1200px; }
.tab-note { font-size: .85rem; }
.no-margin { margin: 0; }
.mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; letter-spacing: .02em; }
.row.nowrap { flex-wrap: nowrap; }
.row.nowrap input { flex: 1; min-width: 0; }
.tag.warn { background: #fff1e0; color: #8a4b08; }
.hw-sections, .rep-sections { display: flex; flex-direction: column; gap: 10px; }
.hw-sections > h3.group, .rep-sections > h3.group { margin-top: 8px; }
#hw-chips, #rep-chips { margin: 0 0 10px; }

/* Leerer Zustand mit kurzer Anleitung */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 36px 16px; border: 2px dashed var(--line); border-radius: 16px; }
.empty > .ico { width: 40px; height: 40px; color: var(--accent); opacity: .8; }
.empty strong { font-size: 1.1rem; }
.empty p { margin: 0; max-width: 52ch; }

/* Fortschrittsring */
.ring { --ring: 0; flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--ring-c, var(--accent)) calc(var(--ring) * 1%), #e7eef0 0); }
.ring > b { width: 38px; height: 38px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: .78rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ring.good { --ring-c: var(--ok); }
.ring.mid { --ring-c: #d9a400; }
.ring.low { --ring-c: var(--bad); }
.ring.none { --ring-c: #cfd8db; }
.ring.fin { --ring-c: var(--ok); }

/* Hausaufgaben-Karten */
.hwcard .qcard-cover { align-items: flex-end; }
.due { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; position: relative; z-index: 1; white-space: nowrap; }
.due .ico { width: 13px; height: 13px; margin: 0; }
.due.ok { background: var(--ok); color: #fff; }
.due.soon { background: var(--cta); color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); }
.due.over { background: rgba(0, 0, 0, .45); color: #fff; }
.due-inline { font-weight: 700; }
.due-inline.ok { color: var(--ok); }
.due-inline.soon { color: var(--cta); }
.hwcard.ended .qcard-cover { filter: saturate(.35); }
.hwcard .qcard-meta .tag { margin-left: 0; }
.hw-prog { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.hw-prog strong { font-size: .92rem; }
.hw-prog .muted { font-size: .8rem; }
.goal-bar { position: relative; height: 8px; border-radius: 99px; background: #e7eef0; margin-top: 8px; }
.goal-bar > i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--accent); max-width: 100%; }
.goal-bar > u { position: absolute; top: -4px; width: 2px; height: 16px; background: var(--text); border-radius: 1px; }
.goal-bar.done > i { background: var(--ok); }
.goal-text { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.goal-text .ico { width: 14px; height: 14px; margin: 0; color: var(--ok); }
.hwcard.goal-done .goal-text { color: var(--ok); font-weight: 600; }
.hwcard .qcard-act > button.light:not(.icon-only) { flex: 0 0 auto; }
details.archive > summary { cursor: pointer; list-style: none; }
details.archive > summary::-webkit-details-marker { display: none; }
details.archive > summary h3::before { content: '▸ '; }
details.archive[open] > summary h3::before { content: '▾ '; }
details.archive > .quiz-grid { margin-top: 10px; }
.hw-class-row .field { min-width: 150px; }
.hw-goal-note { font-size: .82rem; margin: -6px 0 0; }

/* QR-Code groß am Beamer */
.beamer-modal { background: rgba(8, 30, 38, .96); align-items: center; }
.beamer-qr { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; color: #fff; text-align: center; padding: 24px; max-width: 100%; }
.beamer-qr h2 { margin: 0; font-size: clamp(1.4rem, 3.5vw, 2.4rem); }
.hw-kicker.light { color: #8fe3dc; }
.qr-big { width: min(62vh, 82vw); height: min(62vh, 82vw); background: #fff; border-radius: 18px; padding: 14px; }
.qr-url { font-size: clamp(1.2rem, 3vw, 2rem); font-weight: 700; letter-spacing: .01em; overflow-wrap: anywhere; }
.qr-meta { display: inline-flex; align-items: center; gap: 6px; color: #cfe3e6; }
.qr-meta .ico { width: 18px; height: 18px; }
.beamer-close { position: absolute; top: 0; right: 0; }

/* Berichte: Zeilen nach Woche, Lernstand-Karten */
.rep-list { display: flex; flex-direction: column; gap: 6px; }
.rep-row { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 4px 8px 4px 4px; transition: box-shadow .2s, border-color .2s; }
.rep-row:hover { box-shadow: var(--shadow); border-color: #d8e6e9; }
.rep-row:has(.menu-wrap.open) { position: relative; z-index: 5; }
.rep-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; background: transparent; color: var(--text); box-shadow: none; padding: 6px 8px; text-align: left; font-weight: 400; justify-content: flex-start; }
.rep-open:active { transform: none; }
.rep-main { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.rep-title { font-weight: 600; overflow-wrap: anywhere; }
.rep-title .tag { margin-left: 2px; }
.rep-meta { font-size: .82rem; color: var(--muted); }
.cp-box { margin-bottom: 12px; }
.cp-box h3.group { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; }
.cp-box h3 .ico { width: 18px; height: 18px; color: var(--accent); }
.cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.cp-card { display: flex; align-items: center; gap: 12px; text-align: left; justify-content: flex-start; background: #eef7f6; color: var(--text);
  box-shadow: none; border: 1px solid #d6ebe8; border-radius: 14px; padding: 12px; font-weight: 400; }
.cp-card:hover:not(:disabled) { background: #e3f2f0; }
.cp-card .ring > b { background: #eef7f6; }
.cp-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cp-name { font-weight: 700; font-size: 1.05rem; }
.cp-meta { font-size: .8rem; color: var(--muted); }
.cp-hard { font-size: .8rem; color: var(--cta); font-weight: 600; }
.cp-ok { font-size: .8rem; color: var(--ok); font-weight: 600; }

/* Ergebnisansicht */
.rep-head { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-top: 10px; }
.rep-head-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rep-head h2 { margin: 0; overflow-wrap: anywhere; }
.rep-link { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rep-link input { width: 250px; max-width: 100%; font-size: .85rem; padding: 7px 10px; }
.kpis .stat.good b { color: var(--ok); }
.kpis .stat.mid b { color: #a87700; }
.kpis .stat.low b { color: var(--bad); }
.rep-actions { margin: 4px 0 2px; }
.stat b small { font-size: .55em; color: var(--muted); font-weight: 600; }
.qstat-list { display: flex; flex-direction: column; gap: 6px; }
.qstat { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.qstat[open] { box-shadow: var(--shadow); }
.qstat > summary { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; list-style: none; }
.qstat > summary::-webkit-details-marker { display: none; }
.qstat-n { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--soft); display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: var(--accent); }
.qstat-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; overflow-wrap: anywhere; }
.qstat-type { font-size: .76rem; display: inline-flex; align-items: center; gap: 4px; }
.qstat-type .ico { width: 13px; height: 13px; margin: 0; }
.qstat > :not(summary) { margin: 0 12px 10px 50px; }
.qstat-sol { font-size: .85rem; }
.miss-box { display: flex; align-items: center; gap: 8px; background: #fff4e6; color: #8a4b08; border-radius: 10px; padding: 7px 10px; font-size: .88rem; }
.miss-box .ico { flex: none; width: 16px; height: 16px; }
.abars { display: flex; flex-direction: column; gap: 5px; }
.abar { display: grid; grid-template-columns: minmax(90px, 2fr) 3fr 2.4em; align-items: center; gap: 10px; font-size: .86rem; }
.abar-label { display: flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.abar-label .ico { width: 14px; height: 14px; color: var(--ok); margin: 0; flex: none; }
.abar-track { height: 12px; background: #f0f4f5; border-radius: 4px; overflow: hidden; }
.abar-track > i { display: block; height: 100%; background: #b9c6ca; border-radius: 4px; }
.abar.ok .abar-track > i { background: var(--ok); }
.abar.bad .abar-track > i { background: #e4a0a8; }
.abar.miss .abar-track > i { background: var(--cta); }
.abar.miss .abar-label { font-weight: 700; }
.abar.none { color: var(--muted); }
.abar-n { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.abar-shape { flex: none; width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; padding: 3px; color: #fff; }
.abar-shape svg { width: 100%; height: 100%; }
.abar-shape.a0 { background: var(--a0); } .abar-shape.a1 { background: var(--a1); } .abar-shape.a2 { background: var(--a2); color: #1d1d1f; }
.abar-shape.a3 { background: var(--a3); } .abar-shape.a4 { background: var(--a4); } .abar-shape.a5 { background: var(--a5); }
.abars .pin-wrap { max-width: 360px; margin-top: 4px; }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--accent); }
th.sorted { color: var(--accent); }
.matrix-wrap { max-height: 70vh; }
table.matrix th.sticky, table.matrix td.sticky { position: sticky; left: 0; background: #fff; z-index: 1; box-shadow: 1px 0 0 #eee; max-width: 180px; overflow-wrap: anywhere; }
table.matrix th.sticky { background: #f4fafb; z-index: 2; }
table.matrix th.qcol { text-align: center; min-width: 30px; }

/* Am Beamer besprechen */
.disc-body { width: min(980px, 100%); display: flex; flex-direction: column; gap: 14px; align-items: center; }
.disc-bars { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.disc-row { display: grid; grid-template-columns: minmax(140px, 2fr) 4fr 3em; align-items: center; gap: 14px; font-size: clamp(1rem, 2.1vw, 1.45rem); font-weight: 700;
  background: rgba(255, 255, 255, .08); border-radius: 14px; padding: 10px 14px; transition: background .3s, opacity .3s; }
.disc-label { display: flex; align-items: center; gap: 10px; min-width: 0; overflow-wrap: anywhere; }
.disc-label .abar-shape { width: 30px; height: 30px; border-radius: 8px; padding: 6px; }
.disc-label .ico { width: 24px; height: 24px; color: #b9f6ca; flex: none; }
.disc-track { height: 22px; background: rgba(255, 255, 255, .12); border-radius: 6px; overflow: hidden; }
.disc-track > i { display: block; height: 100%; background: #9ec5cc; border-radius: 6px; transition: width .6s ease-out; }
.disc-track > i.a0 { background: var(--a0); } .disc-track > i.a1 { background: var(--a1); } .disc-track > i.a2 { background: var(--a2); }
.disc-track > i.a3 { background: var(--a3); } .disc-track > i.a4 { background: var(--a4); } .disc-track > i.a5 { background: var(--a5); }
.disc-n { text-align: right; font-variant-numeric: tabular-nums; }
.disc-bars.shown .disc-row.bad { opacity: .55; }
.disc-bars.shown .disc-row.ok { background: rgba(43, 138, 62, .45); box-shadow: inset 0 0 0 2px #b9f6ca; }
.disc-row.none { opacity: .6; font-weight: 500; }
.disc-pin { max-width: min(620px, 92vw); }
.disc-keys { color: rgba(255, 255, 255, .6); margin: 0; }
@media (max-width: 600px) { .disc-row { grid-template-columns: 1fr 3em; } .disc-track { grid-column: 1 / -1; grid-row: 2; } }

/* Lehrkräfte und Schule */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.person { display: grid; grid-template-columns: 44px 1fr auto; grid-template-areas: 'av main menu' 'av tags tags' 'cnt cnt cnt'; gap: 4px 12px; align-items: center;
  border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 12px; }
.person:has(.menu-wrap.open) { position: relative; z-index: 5; }
.person .avatar { grid-area: av; width: 44px; height: 44px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 700; align-self: start; }
.person-main { grid-area: main; min-width: 0; }
.person-name { font-weight: 700; overflow-wrap: anywhere; }
.person-user { font-size: .82rem; }
.person .menu-wrap { grid-area: menu; align-self: start; }
.person-tags { grid-area: tags; }
.person-tags .tag { margin-left: 0; }
.person-counts { grid-area: cnt; display: flex; gap: 14px; font-size: .85rem; color: var(--text); border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; flex-wrap: wrap; }
.person-counts > span { display: inline-flex; align-items: center; gap: 4px; }
.person-counts .ico { width: 15px; height: 15px; color: var(--muted); margin: 0; }
.pulse { margin-bottom: 12px; }
.pulse-row { margin-top: 0; }
.popular { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: .85rem; margin-top: 8px; }
.pop-item { display: inline-flex; align-items: center; gap: 4px; }
.settings-form { max-width: 760px; }
.user-card { max-width: 560px; }
.access-card { border: 2px solid var(--text); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 12px; background: #fff; color: var(--text); }
.ac-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.ac-logo { font-weight: 800; font-size: 1.3rem; }
.ac-logo span { color: var(--cta); }
.ac-body { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.ac-qr { width: 130px; height: 130px; }
.ac-body dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; flex: 1; min-width: 220px; }
.ac-body dt { color: var(--muted); font-size: .85rem; }
.ac-body dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.ac-body dd.big { font-size: 1.25rem; }
.ac-note { margin: 0; font-size: .85rem; color: var(--muted); }
#um-access { display: flex; flex-direction: column; gap: 12px; }
@media print {
  body.print-card > *:not(#user-modal) { display: none !important; }
  body.print-card #user-modal { position: static; background: none; backdrop-filter: none; display: block; padding: 0; }
  body.print-card .user-card { box-shadow: none; max-width: 520px; padding: 0; }
  body.print-card .user-card > .modal-head, body.print-card #um-access > .row { display: none; }
  body.print-card::before { display: none; }
}
@media (max-width: 600px) {
  .rep-head { align-items: flex-start; }
  .abar { grid-template-columns: 1fr 2.4em; }
  .abar-track { grid-column: 1 / -1; grid-row: 2; }
  .qstat > :not(summary) { margin-left: 12px; }
  .tab-note { display: none; }
}

/* ---------- v0.11: Hausaufgabe am Handy ---------- */
.hw-social { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; color: var(--text); }
.hw-social > span { display: inline-flex; align-items: center; gap: 6px; }
.hw-social .ico { width: 16px; height: 16px; color: var(--accent); margin: 0; flex: none; }
.hw-social .due-chip { align-self: flex-start; background: #e6f4ea; color: var(--ok); font-weight: 700; border-radius: 999px; padding: 3px 10px; }
.hw-social .due-chip .ico { color: var(--ok); }
/* Bergleiste: Fortschritt als Silhouette unten am Bildschirm */
.climb { position: fixed; left: 0; right: 0; bottom: 0; height: 34px; pointer-events: none; z-index: 5; }
.climb > i { position: absolute; inset: 0;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 34' preserveAspectRatio='none'%3E%3Cpolygon points='0,34 0,28 40,22 70,26 110,14 140,20 175,10 205,17 240,8 270,15 305,6 335,12 370,4 400,0 400,34' fill='black'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 34' preserveAspectRatio='none'%3E%3Cpolygon points='0,34 0,28 40,22 70,26 110,14 140,20 175,10 205,17 240,8 270,15 305,6 335,12 370,4 400,0 400,34' fill='black'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.climb-bg { background: rgba(255, 255, 255, .14); }
.climb-fill { background: linear-gradient(90deg, var(--a0), var(--a2)); clip-path: inset(0 100% 0 0); transition: clip-path .6s ease-out; }
.climb-flag { position: absolute; bottom: 30px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #ffd54f; box-shadow: 0 0 0 3px rgba(255, 213, 79, .35); transition: left .6s ease-out; }
/* Abzeichen am Ende */
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 560px; }
.badge-item { width: 104px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; animation: badge-pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.badge-item b { font-size: .88rem; }
.badge-item > span:last-child { font-size: .72rem; color: rgba(255, 255, 255, .75); line-height: 1.25; }
.badge-ico { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; color: #fff; transform: rotate(-6deg); box-shadow: 0 10px 20px -10px rgba(0, 0, 0, .6); }
.badge-ico .ico { width: 30px; height: 30px; margin: 0; }
.badge-ico.a0 { background: var(--a0); } .badge-ico.a1 { background: var(--a1); } .badge-ico.a2 { background: var(--a2); color: #1d1d1f; }
.badge-ico.a3 { background: var(--a3); } .badge-ico.a4 { background: var(--a4); } .badge-ico.a5 { background: var(--a5); }
@keyframes badge-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
/* Klassenziel am Ende */
.class-goal { width: 100%; max-width: 440px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); border-radius: 16px; padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 10px; }
.cg-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .95rem; }
.cg-head span { color: rgba(255, 255, 255, .8); }
.cg-bar { position: relative; height: 14px; border-radius: 99px; background: rgba(255, 255, 255, .18); margin-top: 16px; }
.cg-bar > i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--a2); max-width: 100%; transition: width .8s ease-out; }
.cg-bar.done > i { background: #b9f6ca; }
.cg-bar > u { position: absolute; top: -6px; bottom: -6px; width: 3px; margin-left: -1.5px; background: #fff; border-radius: 2px; text-decoration: none; }
.cg-bar > u em { position: absolute; bottom: calc(100% + 2px); left: 50%; transform: translateX(-50%); font-style: normal; font-size: .72rem; white-space: nowrap; color: #fff; font-weight: 700; }
.cg-text { font-size: .85rem; color: rgba(255, 255, 255, .85); }
@media (prefers-reduced-motion: reduce) { .badge-item { animation: none; } .climb-fill, .climb-flag, .cg-bar > i { transition: none; } }
#s-question:has(> .climb) { padding-bottom: 46px; }
#e-score { font-size: clamp(2rem, 9vw, 3rem); text-align: center; line-height: 1.1; }

/* ---------- v0.12: neue Fragetypen, Hörfrage, Blitzrunde, Sicherheits-Einsatz, Abstimmung, Rekord ---------- */
/* Gruppenfarben (In Gruppen sortieren): eigene Reihenfolge, damit sie nicht wie Antwortkacheln wirken */
.g0 { --g: var(--a5); } .g1 { --g: var(--a1); } .g2 { --g: var(--a4); } .g3 { --g: var(--a0); }

/* Lückentext */
.gap-text { display: block; line-height: 2.4; font-size: 1.15rem; color: var(--text); text-align: left; width: 100%; max-width: 560px; }
.gap-field { display: inline-block; width: 9em; max-width: 60vw; margin: 0 4px; padding: 6px 10px; font: inherit; font-weight: 700;
  border: 2px solid var(--accent); border-radius: 10px; background: #f5fdfe; color: var(--text); vertical-align: baseline; }
select.gap-field { width: auto; min-width: 7em; }
.gap-sentence { line-height: 2.1; font-size: clamp(1.2rem, 2.6vw, 2rem); }
.gap-blank { display: inline-block; min-width: 3.4em; margin: 0 6px; padding: 0 10px; border-bottom: 4px solid var(--accent);
  color: var(--accent); font-size: .7em; text-align: center; vertical-align: baseline; }
.gap-fill { display: inline-flex; align-items: baseline; gap: 8px; margin: 0 4px; padding: 2px 12px; border-radius: 10px; background: #d3f9d8; color: var(--ok); font-weight: 800; }
.gap-fill b { font-size: .6em; color: var(--muted); font-weight: 700; }
.gap-bank { display: flex; flex-wrap: wrap; gap: 8px; }
.gap-bank span { background: var(--soft); border: 2px dashed #c8e3e8; border-radius: 10px; padding: 4px 12px; font-size: 1.1rem; }
.gap-wrong { font-size: 1rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.gap-wrong b { display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: 50%; background: var(--line); color: var(--text); font-size: .8em; }
.gap-preview { font-size: .95rem; line-height: 1.9; color: var(--text); }
.gap-chip { display: inline-grid; place-items: center; min-width: 2.2em; margin: 0 3px; padding: 0 6px; border-bottom: 3px solid var(--accent); color: var(--accent); font-weight: 800; font-size: .85em; }
.gap-mode { gap: 22px; }
.my-gap { background: rgba(255, 255, 255, .12); border-radius: 14px; padding: 10px 16px; font-size: 1.1rem; line-height: 1.7; text-align: center; }
.my-gap strong { background: rgba(255, 255, 255, .22); border-radius: 6px; padding: 0 6px; }
.my-gap mark { background: #ffd54f; color: #222; border-radius: 6px; padding: 0 6px; }

/* Schätzfrage */
.est-row { display: flex; align-items: center; gap: 10px; }
.est-row input { flex: 1; min-width: 0; }
.est-unit { font-weight: 700; color: var(--text); }
.est-read { min-height: 1.2em; text-align: center; font-variant-numeric: tabular-nums; }
.est-closest { font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
.est-closest .ico { color: var(--a1); }

/* In Gruppen sortieren */
.sort-rows { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 560px; }
.sort-row { background: rgba(255, 255, 255, .1); border: 2px solid transparent; border-radius: 14px; padding: 8px 10px; display: grid; gap: 8px; }
.sort-row.done { border-color: rgba(255, 255, 255, .25); }
.sort-item { font-size: 1.15rem; font-weight: 700; }
.sort-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.sort-g { flex: 1 1 auto; padding: 8px 10px; font-size: .95rem; background: rgba(255, 255, 255, .14); border: 2px solid var(--g); color: #fff; border-radius: 10px; }
.sort-g.selected { background: var(--g); box-shadow: 0 0 0 2px #fff; }
.sort-beamer { width: 100%; max-width: 1100px; display: grid; gap: 14px; }
.sort-heads { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.sort-heads .sort-g { background: var(--g); font-size: 1.4rem; font-weight: 800; padding: 14px; text-align: center; border-radius: 14px; }
.sort-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.sort-chips span { background: #fff; color: var(--text); border-radius: 12px; padding: 10px 18px; font-size: 1.3rem; font-weight: 700; box-shadow: var(--shadow); }
.sort-solution { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; width: 100%; max-width: 1100px; }
.sort-col { background: #fff; color: var(--text); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; border-top: 8px solid var(--g); }
.sort-col-head { font-weight: 800; padding: 10px 14px; font-size: 1.2rem; display: flex; gap: 6px; align-items: center; }
.ss-item { display: flex; justify-content: space-between; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 1.15rem; }
.ss-item b { color: var(--muted); font-variant-numeric: tabular-nums; }
.sort-edit { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; align-items: start; }
.sort-edit .sort-col { border: 1px solid var(--line); border-top: 6px solid var(--g); padding: 0 8px 8px; gap: 6px; }
.sort-edit .sort-col-head { padding: 8px 0 2px; }
.sort-edit .sort-col-head input { font-weight: 700; flex: 1; min-width: 0; }
.sort-edit .sort-add { min-height: 60px; }

/* Fehler finden */
.spot-text { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; width: 100%; max-width: 560px; }
.spot-word { background: var(--soft); color: var(--text); border: 2px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 1.15rem; font-weight: 600; }
.spot-word.selected { background: #ffd54f; border-color: #e0a800; }
.spot-word.wrong { background: #fde0e4; border-color: var(--bad); }
.spot-preview { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.spot-preview .spot-word { padding: 3px 8px; font-size: .95rem; }
.spot-beamer .gap-sentence span { display: inline-flex; align-items: baseline; gap: 4px; }
.spot-wrong { background: #fde0e4; color: var(--bad); border-radius: 8px; padding: 0 8px; box-shadow: inset 0 -4px 0 var(--bad); }
.spot-miss { color: var(--muted); }
.spot-beamer .gap-sentence b { font-size: .55em; background: var(--line); color: var(--text); border-radius: 999px; padding: 0 8px; text-decoration: none; }

/* Ideen sammeln und abstimmen */
.idea-box { width: 100%; max-width: 1100px; display: grid; gap: 14px; }
.idea-list { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.idea { background: #fff; color: var(--text); border: 3px solid transparent; border-radius: 14px; padding: 10px 16px; font-size: 1.25rem; font-weight: 600; display: inline-flex; gap: 8px; align-items: center; }
.idea b { background: var(--soft); border-radius: 999px; padding: 0 8px; font-size: .85em; }
.idea.selected { border-color: var(--cta); box-shadow: 0 0 0 3px #fff; }
.idea-actions { justify-content: center; }
.idea-actions .muted { color: rgba(255, 255, 255, .8); }
.vote-bars { display: grid; gap: 10px; width: 100%; max-width: 900px; }
.vote-list { display: grid; gap: 10px; width: 100%; max-width: 480px; }
.vote-list .answer { min-height: 64px; }
.vote-result { display: grid; gap: 6px; width: 100%; }
.vr-row { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.vr-row i { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255, 255, 255, .18); z-index: 0; }
.vr-row span, .vr-row b { position: relative; z-index: 1; }
.vr-row.mine { outline: 2px solid #ffd54f; }
.vote-rep { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .9rem; margin: 6px 0; }

/* Hörfrage */
.audio-box { width: 100%; max-width: 420px; display: flex; justify-content: center; }
.audio-btn { display: inline-flex; align-items: center; gap: 8px; font-size: 1.1rem; padding: 12px 22px; }
.beamer-audio { display: flex; justify-content: center; flex: 0 0 100%; }
#h-body:has(.beamer-audio) { flex-wrap: wrap; gap: 14px; }
.beamer-audio button { font-size: 1.3rem; padding: 14px 26px; }
.beamer-audio button { display: inline-flex; align-items: center; gap: 8px; }
.q-extras { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; padding-top: 2px; }
.q-extras .drop.small { padding: 5px 10px; font-size: .85rem; }
.q-extras .switch .ico { width: 16px; height: 16px; vertical-align: -3px; }
.q-audio { display: inline-flex; align-items: center; gap: 6px; }
.q-audio audio { height: 34px; max-width: 260px; }

/* Bild aufdecken: unscharf, wird bis zum Ende der Fragezeit scharf */
.q-image.unveil { animation: unveil var(--t, 20s) linear var(--d, 0s) both; }
@keyframes unveil { from { filter: blur(28px) saturate(.6); } 70% { filter: blur(6px); } to { filter: blur(0); } }

/* Blitzrunde */
#s-blitz { justify-content: center; }
.blitz-title { font-size: clamp(3rem, 10vw, 7rem); margin: 0; letter-spacing: -.03em; text-align: center; color: #ffd54f; animation: cd-pop .9s ease-out; }
.blitz-bolt { width: clamp(90px, 18vh, 160px); aspect-ratio: 1; background: #ffd54f;
  clip-path: polygon(58% 0, 14% 56%, 46% 56%, 36% 100%, 86% 40%, 54% 40%, 70% 0); animation: blitz-flash 1.2s ease-in-out infinite; }
@keyframes blitz-flash { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .7; transform: scale(.94); } }

/* Sicherheits-Einsatz am Handy */
.conf-box { background: #fff; color: var(--text); border-radius: 18px; padding: 14px; width: 100%; max-width: 420px; display: grid; gap: 10px; text-align: center; }
.conf-q { font-weight: 800; font-size: 1.15rem; }
.conf-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.conf-btns button { padding: 14px 8px; font-size: 1.05rem; color: #fff; }
.conf-sure { background: var(--ok); }
.conf-guess { background: var(--a4); }
.conf-btns button.selected { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--text); opacity: 1; }
.conf-btns button:disabled:not(.selected) { opacity: .3; }
.conf-sub { font-size: .8rem; color: var(--muted); }
.r-note { display: block; margin: 6px 0 0; font-size: 1rem; background: rgba(255, 255, 255, .16); border-radius: 12px; padding: 8px 14px; text-align: center; }

/* Klassenrekord, Revanche, Fragenpool */
.record-line { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; background: rgba(255, 255, 255, .12);
  border-radius: 999px; padding: 8px 18px; font-size: 1.1rem; margin: 6px auto; }
.record-line.new { background: #ffd54f; color: #222; }
.record-line .ico { width: 20px; height: 20px; }
.lobby-info { margin: -4px 0 0; color: #ffd54f; font-weight: 700; text-align: center; }

/* Berichte: teilweise richtig */
.cell-part { text-align: center !important; font-weight: 800; cursor: help; background: #fff4d6; color: #b26a00; }
@media (prefers-reduced-motion: reduce) {
  .q-image.unveil { animation: none; filter: none; }
  .blitz-bolt, .blitz-title { animation: none; }
}
.info-line { display: flex; align-items: center; gap: 12px; }
.info-line .ico { flex: none; width: 1.3em; height: 1.3em; }

/* Startseite (/) */
.landing .logo { margin-bottom: 0; }
.landing-hint { max-width: 420px; margin: 0; text-align: center; color: #c8e6ec; font-size: .95rem; line-height: 1.45; }
.landing-teacher { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 14px; margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .15); width: 100%; max-width: 420px; color: #c8e6ec; font-size: .95rem; }
.landing-teacher a { color: #fff; }
.landing-teacher .landing-btn { padding: 8px 18px; border-radius: 12px; background: rgba(255, 255, 255, .12); font-weight: 700; text-decoration: none; }
.landing-teacher .landing-btn:hover { background: rgba(255, 255, 255, .2); }
.landing .error:empty { display: none; }
/* Schul- und Trägerlogo auf weißer Karte: am Handy untereinander, am PC nebeneinander */
.landing-logos { width: 100%; max-width: 420px; margin-top: 8px; background: #fff; border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; align-items: center; gap: 14px; box-shadow: var(--shadow-lg); }
.landing-logos img { display: block; max-width: 100%; height: auto; }
.landing-logos .porg { width: 220px; } .landing-logos .vosoe { width: 280px; }
.landing-logos hr { width: 100%; border: 0; border-top: 1px solid #e3edef; margin: 0; }
@media (min-width: 900px) {
  .landing-logos { max-width: 720px; flex-direction: row; justify-content: center; gap: 28px; }
  .landing-logos hr { width: 1px; height: 48px; border-top: 0; border-left: 1px solid #e3edef; }
}
