/* Farben, Schriften, Abstände: Anpassungen am Aussehen nur hier oben */
:root {
  --bg: #f6f7f9; --flaeche: #ffffff; --flaeche2: #eef0f3; --text: #1d2228; --leise: #6b7480; --linie: #d9dde3;
  --akzent: #e07000; --akzent-text: #ffffff; --link: #0b62c4;
  --bes: #eaf2fb; --bes-rand: #2f6db5;
  --todo: #fff6e8; --todo-rand: #f0a540; --ok: #2f8f46; --fehler: #c62828; --ueber: #c62828;
  --k0: #fff1a6; --k1: #ffc8c2; --k2: #c6defc; --k3: #cdebc4; --k4: #e2d3f6; --ktext: #1d2228; --krand: rgba(0,0,0,.14);
  --schatten: 0 1px 3px rgba(0,0,0,.08);
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --mono: ui-monospace, Consolas, monospace;
  --r: 6px; --abstand: 12px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #15181c; --flaeche: #1e2228; --flaeche2: #272c33; --text: #e4e7eb; --leise: #929ba6; --linie: #353b44;
  --akzent: #f28a1c; --akzent-text: #15181c; --link: #6aa9f5;
  --bes: #17263a; --bes-rand: #6fa3e0; --todo: #2b2418; --todo-rand: #b9772a; --ok: #5cc077; --fehler: #ef6b6b; --ueber: #ff7b7b;
  --k0: #e9d978; --k1: #e9a49c; --k2: #9fc0ea; --k3: #a9d29d; --k4: #c3addf; --ktext: #15181c; --krand: rgba(0,0,0,.3);
  --schatten: 0 1px 3px rgba(0,0,0,.4);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15181c; --flaeche: #1e2228; --flaeche2: #272c33; --text: #e4e7eb; --leise: #929ba6; --linie: #353b44;
    --akzent: #f28a1c; --akzent-text: #15181c; --link: #6aa9f5;
    --bes: #17263a; --bes-rand: #6fa3e0; --todo: #2b2418; --todo-rand: #b9772a; --ok: #5cc077; --fehler: #ef6b6b; --ueber: #ff7b7b;
    --k0: #e9d978; --k1: #e9a49c; --k2: #9fc0ea; --k3: #a9d29d; --k4: #c3addf; --ktext: #15181c; --krand: rgba(0,0,0,.3);
    --schatten: 0 1px 3px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 var(--schrift); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 20px; margin: 0 0 var(--abstand); }
h2 { font-size: 16px; margin: 24px 0 8px; }
h3 { font-size: 14px; margin: 0; }
code, kbd { font-family: var(--mono); background: var(--flaeche2); padding: 1px 4px; border-radius: 3px; }
[hidden] { display: none !important; } /* auch bei Knöpfen u. Ä. mit eigenem display */
.leise { color: var(--leise); }
.platz { flex: 1; }
hr.trenn { border: 0; border-top: 1px solid var(--linie); margin: 10px 0; }
.rechts { text-align: right; }
.inline { display: inline; }

/* Warnung: keine Verbindung zum Server / abgemeldet (app.js: verbindung()) */
.netzweg { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 1000; width: min(640px, calc(100vw - 24px));
  background: #c62828; color: #fff; border-radius: 10px; padding: 14px 20px; box-shadow: 0 8px 30px rgba(0,0,0,.35); text-align: center; }
.netzweg b { display: block; font-size: 22px; }
.netzweg span { display: block; font-size: 14px; margin-top: 4px; }

/* Kopf */
.kopf { display: flex; align-items: center; gap: 14px; padding: 8px 16px; background: var(--flaeche); border-bottom: 1px solid var(--linie); }
.kopf nav { display: flex; gap: 14px; flex-wrap: wrap; }
.kopf nav a, .kopf .wer { color: var(--text); }
.marke { font-weight: 800; font-size: 16px; color: var(--akzent); letter-spacing: .5px; display: inline-flex; align-items: baseline; gap: 6px; }
a.marke:hover { text-decoration: none; }
.marke small { font-size: 11px; font-weight: 400; letter-spacing: 0; color: var(--leise); }
.marke small b { color: #f27d00; font-weight: 700; }
.zaehler { background: var(--akzent); color: var(--akzent-text); border-radius: 9px; font-size: 11px; font-weight: 700; padding: 0 6px; line-height: 17px; min-width: 18px; text-align: center; }
.menueliste a.aktiv { font-weight: 700; color: var(--akzent); }
.menueliste a.alle { border-top: 1px solid var(--linie); margin-top: 4px; padding-top: 8px; color: var(--leise); }
main { padding: 16px; max-width: 1200px; margin: 0 auto; }

/* Fußzeile der Seiten ohne Anmeldung */
.fuss { text-align: center; font-size: 12px; padding: 16px; }
.fuss a { color: var(--leise); }

/* Benutzermenü */
.menue { position: relative; }
.menue > summary { list-style: none; cursor: pointer; padding: 3px 8px; border-radius: var(--r); }
.menue > summary::-webkit-details-marker { display: none; }
.menue > summary:hover, .menue[open] > summary { background: var(--flaeche2); }
.menueliste { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 190px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r); box-shadow: 0 6px 18px rgba(0,0,0,.18); padding: 4px 0; }
.menueliste a, .menueliste button { display: block; width: 100%; text-align: left; padding: 6px 14px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; }
.menueliste a:hover, .menueliste button:hover { background: var(--flaeche2); text-decoration: none; }
.menueliste form { border-top: 1px solid var(--linie); margin-top: 4px; padding-top: 4px; }

/* Formulare und Knöpfe */
input, select, textarea { font: inherit; color: var(--text); background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r); padding: 5px 8px; max-width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--akzent); outline-offset: -1px; border-color: transparent; }
textarea { width: 100%; resize: vertical; }
label { display: block; margin: 0 0 10px; }
label > input:not([type=checkbox]), label > textarea, label > select { display: block; width: 100%; margin-top: 3px; }
label.haken { display: inline-flex; align-items: center; gap: 5px; margin: 0 12px 6px 0; }
.knopf { display: inline-block; font: inherit; cursor: pointer; padding: 5px 12px; border-radius: var(--r); border: 1px solid var(--linie); background: var(--flaeche); color: var(--text); white-space: nowrap; }
.knopf:hover { background: var(--flaeche2); text-decoration: none; }
.knopf.haupt { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); font-weight: 600; }
.knopf.haupt:hover { filter: brightness(1.08); }
.knopf.klein { padding: 2px 8px; font-size: 13px; }
.knopf.gefahr { color: var(--fehler); }
.zeile { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.zeile.eng { gap: 6px; margin: 4px 0; }
.titelzeile { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: var(--abstand); }
.titelzeile h1 { margin: 0; }
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r); padding: 16px; box-shadow: var(--schatten); margin: 12px 0; }
.karte.schmal { max-width: 440px; margin: 40px auto; }
details > summary { cursor: pointer; }
.aufklapp { position: relative; }
.aufklapp > summary { list-style: none; }
.aufklapp > .karte { position: absolute; right: 0; z-index: 5; width: 320px; }

.meldung { padding: 8px 12px; border-radius: var(--r); margin: 0 0 12px; border: 1px solid; word-break: break-all; }
.meldung.ok { border-color: var(--ok); color: var(--ok); }
.meldung.fehler { border-color: var(--fehler); color: var(--fehler); }

/* Listen und Tabellen */
table.liste { border-collapse: collapse; width: 100%; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r); }
.liste th, .liste td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--linie); vertical-align: top; }
.liste th { font-weight: 600; color: var(--leise); font-size: 12px; }
input.url { width: 340px; font-size: 12px; }
input.nr { width: 64px; }
input.breit { flex: 1; min-width: 220px; }
.inline { display: inline; }
.klein { font-size: 12px; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kachel { display: flex; flex-direction: column; gap: 4px; padding: 14px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r); color: var(--text); box-shadow: var(--schatten); }
.kachel:hover { border-color: var(--akzent); text-decoration: none; }
.kachel b { font-size: 16px; }
.knopf.an { background: var(--akzent); border-color: var(--akzent); color: var(--akzent-text); }
.knopf:disabled { opacity: .6; cursor: default; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 2px; }

/* Einklappbare Bereiche */
details.bereich { margin: 16px 0; }
details.bereich > summary { list-style: none; display: flex; align-items: center; gap: 6px; }
details.bereich > summary::-webkit-details-marker { display: none; }
details.bereich > summary::before { content: "▸"; color: var(--leise); }
details.bereich[open] > summary::before { content: "▾"; }
details.bereich > summary h2 { margin: 0; }
.karte h3 { margin: 16px 0 4px; }

/* Phasen */
.phasen { display: inline-flex; gap: 0; }
.phasen .knopf { border-radius: 0; margin-left: -1px; }
.phasen form:first-child .knopf { border-radius: var(--r) 0 0 var(--r); }
.phasen form:last-child .knopf { border-radius: 0 var(--r) var(--r) 0; }
.phase { font-size: 12px; padding: 0 7px; border-radius: 10px; background: var(--flaeche2); }
.phase.ph-sammeln { background: var(--k3); color: var(--ktext); }
.phase.ph-ordnen { background: var(--k2); color: var(--ktext); }
.phase.ph-bewerten { background: var(--k0); color: var(--ktext); }

/* Kartenfarben (5 feste, Bedeutung je Raum) */
.f0 { --kf: var(--k0); } .f1 { --kf: var(--k1); } .f2 { --kf: var(--k2); } .f3 { --kf: var(--k3); } .f4 { --kf: var(--k4); }
.f0, .f1, .f2, .f3, .f4 { --kc: var(--ktext); --kr: var(--krand); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 0 9px; border-radius: 10px; font: inherit; font-size: 13px; line-height: 24px; background: var(--kf, var(--flaeche2)); color: var(--kc, var(--text)); border: 1px solid var(--kr, transparent); white-space: nowrap; }
button.chip, label.chip { cursor: pointer; }
button.chip:hover, label.chip:hover { filter: brightness(.96); }
label.chip { margin: 0; }
label.chip:has(input:checked) { outline: 2px solid var(--akzent); outline-offset: 1px; font-weight: 600; }
label.chip input { position: absolute; opacity: 0; pointer-events: none; }
label.chip { position: relative; }
label.chip:has(input:focus-visible) { outline: 2px dashed var(--akzent); }
.legende { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0; }
.artenliste { display: grid; gap: 6px; max-width: 420px; }
label.art { display: flex; align-items: center; gap: 8px; margin: 0; }
label.art input { flex: 1; }
.farbfeld { width: 28px; height: 22px; border-radius: 3px; background: var(--kf); border: 1px solid var(--krand); flex: none; }

/* Karten als Rechtecke */
.kartenfeld { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; margin: 6px 0 14px; }
.mkarte { position: relative; width: 180px; min-height: 84px; padding: 8px 10px 18px; background: var(--kf); color: var(--ktext); border: 1px solid var(--krand);
  border-radius: 3px; box-shadow: 0 1px 3px rgba(0,0,0,.18); font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; white-space: pre-line; }
.mkarte.klickbar { cursor: pointer; }
.mkarte.klickbar:hover { box-shadow: 0 3px 8px rgba(0,0,0,.25); }
.mkarte .kkat { position: absolute; left: 10px; bottom: 3px; font-size: 11px; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.mkarte .kmehr { position: absolute; right: 5px; bottom: 4px; width: 14px; height: 14px; border-radius: 50%; border: 1px solid currentColor; font: italic 700 10px/12px Georgia, serif; text-align: center; opacity: .55; }
.gruppe h3 { margin: 14px 0 4px; }

/* Teilnehmer-Seite (Handy zuerst) */
body.tn main { max-width: 900px; }
.hinweis { background: var(--flaeche); border: 1px solid var(--linie); border-left: 4px solid var(--akzent); border-radius: var(--r); padding: 8px 12px; }
.hinweis:empty { display: none; }
.namenfeld { max-width: 420px; }
.kform { max-width: 560px; }
.kform textarea[name=text]::placeholder { color: color-mix(in srgb, var(--kc, var(--text)) 50%, transparent); }
.kform textarea[name=text] { font-size: 17px; background: var(--kf, var(--flaeche)); color: var(--kc, var(--text)); }

@media (max-width: 600px) {
  main { padding: 12px 16px; }
  .mkarte { width: calc(50% - 5px); }
  input.url { width: 100%; }
}
@media print {
  .kopf, .meldung, .phasen, details.bereich, .fuss { display: none !important; }
  main { padding: 0; max-width: none; }
}

/* Volle Höhe (Board) */
body.voll { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
main.voll { flex: 1; min-height: 0; width: 100%; max-width: none; padding: 6px 12px 8px; display: flex; flex-direction: column; }
main.voll > .meldung { margin-bottom: 6px; }

/* Board */
.brettrahmen { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; background: var(--bg); }
.brettrahmen:fullscreen { padding: 8px; }
.brettleiste { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.phasenwahl, .tnwahl { font-size: 13px; padding: 2px 6px; }
.tnwahl { max-width: 150px; }
.chip.klein { font-size: 12px; line-height: 20px; padding: 0 7px; }
.punkteknopf { white-space: nowrap; }
.pdfmenue > summary { list-style: none; }
.pdfmenue > summary::-webkit-details-marker { display: none; }
.pdfmenue .menueliste { right: 0; }
.legende.eng { margin: 0; gap: 4px; }
.chip.ue { background: var(--uf); color: var(--uc); border-color: var(--ur); font-weight: 700; }
.brett { flex: 1; min-height: 0; position: relative; overflow: hidden; border: 1px solid var(--linie); border-radius: var(--r);
  background-color: var(--flaeche2); background-image: radial-gradient(circle, var(--linie) 1.2px, transparent 1.6px);
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.brett:focus { outline: none; }
.brett:focus-visible { outline: 2px solid var(--akzent); }
.welt { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.bkarte { position: absolute; width: var(--kb); height: var(--kh); padding: 8px 10px; display: flex; overflow: hidden;
  background: var(--kf); color: var(--kc); border: 1px solid var(--kr); border-radius: 3px; box-shadow: 0 1px 3px rgba(0,0,0,.2);
  font-size: 15px; line-height: 1.28; overflow-wrap: anywhere; white-space: pre-line; }
.bkarte.lang { font-size: 13px; }
.bkarte.sehrlang { font-size: 11.5px; }
.bkarte.ziehbar { cursor: grab; }
.bkarte .ktext { flex: 1; min-width: 0; }
.bkarte .kmehr { position: absolute; right: 5px; bottom: 4px; width: 14px; height: 14px; border-radius: 50%; border: 1px solid currentColor; font: italic 700 10px/12px Georgia, serif; text-align: center; opacity: .55; }
.bkarte.ueberschrift { height: var(--khu); padding: 4px 10px; background: var(--uf); color: var(--uc); border: 2px solid var(--ur); font-weight: 700; font-size: 18px; line-height: 1.15; align-items: center; justify-content: center; text-align: center; }
.geist.ue { height: var(--khu); }
/* Farbe der Überschriften je Raum (raeume.ue_farbe): data-ue am Board, an der Leiste und im Dialog */
:root { --uf: #ffffff; --uc: #1d2228; --ur: #f27d00; }
[data-ue="rot"] { --uf: #c62828; --uc: #ffffff; --ur: #8e1b1b; }
[data-ue="blau"] { --uf: #1f3a68; --uc: #ffffff; --ur: #0f2244; }
[data-ue="gelb"] { --uf: #fff6c2; --uc: #1d2228; --ur: #e0b400; }
.farbwahl { display: flex; flex-wrap: wrap; gap: 6px; }
.farbwahl label { margin: 0; }
.ue-muster { display: inline-block; padding: 1px 10px; font-weight: 700; background: var(--uf); color: var(--uc); border: 2px solid var(--ur); border-radius: 3px; }
.bkarte.ueberschrift.lang, .bkarte.ueberschrift.sehrlang { font-size: 14px; }
/* Stapel: versetzte Kanten dahinter und Zähler */
.bkarte.stapel { box-shadow: 5px 5px 0 -1px var(--kf, var(--flaeche)), 5px 5px 0 0 rgba(0,0,0,.55), 0 1px 3px rgba(0,0,0,.2); }
.bkarte.stapel2 { box-shadow: 5px 5px 0 -1px var(--kf, var(--flaeche)), 5px 5px 0 0 rgba(0,0,0,.55), 10px 10px 0 -1px var(--kf, var(--flaeche)), 10px 10px 0 0 rgba(0,0,0,.55), 0 1px 3px rgba(0,0,0,.2); }
.bkarte:has(.ksumme) .ktext { padding-right: 18px; } /* Punktzahl sitzt oben rechts */
.stapelzahl { position: absolute; right: 22px; bottom: 4px; font: 700 12px/18px var(--schrift); padding: 0 6px; border-radius: 9px; border: 0;
  background: var(--text); color: var(--bg); cursor: pointer; }
.bkarte.gefaechert { box-shadow: 0 6px 18px rgba(0,0,0,.35); outline: 2px dashed var(--akzent); outline-offset: 2px; }
.bkarte.zieht { z-index: 50 !important; box-shadow: 0 10px 24px rgba(0,0,0,.35); opacity: .93; cursor: grabbing; }
.bkarte.stapelziel { outline: 3px solid var(--akzent); outline-offset: 2px; }
.bkarte.meine::before { content: ""; position: absolute; left: 5px; bottom: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--akzent); }
.geist { position: absolute; width: var(--kb); height: var(--kh); border: 2px dashed var(--akzent); border-radius: 3px; background: color-mix(in srgb, var(--akzent) 12%, transparent); pointer-events: none; z-index: 40; }
.geist.rein { height: 8px; margin-top: -7px; background: var(--akzent); border: 0; } /* Einfügen zwischen zwei Karten: Linie statt Rahmen */
.tnbrett { height: 72vh; height: 72dvh; flex: none; }

/* Dialog: Karte bearbeiten */
.kdialog { border: 1px solid var(--linie); border-radius: var(--r); background: var(--flaeche); color: var(--text); padding: 16px; width: min(520px, calc(100vw - 32px)); box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.kdialog::backdrop { background: rgba(0,0,0,.35); }
.kdialog h2 { margin: 0 0 10px; }
.kform.ue textarea[name=text] { font-weight: 700; background: var(--uf); color: var(--uc); border: 2px solid var(--ur); }

/* Bewerten: eigene Punkte als Klebepunkte unten, Summe nach dem Aufdecken oben links */
.bkarte.tippbar { cursor: pointer; }
.bkarte.tippbar:hover { box-shadow: 0 0 0 3px color-mix(in srgb, var(--akzent) 45%, transparent), 0 1px 3px rgba(0,0,0,.2); }
.kpunkte { position: absolute; left: 20px; bottom: 5px; display: flex; gap: 3px; }
.kpunkte i { width: 11px; height: 11px; border-radius: 50%; background: #1f3a68; box-shadow: 0 0 0 1.5px #fff; }
.ksumme { position: absolute; right: -14px; top: -14px; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 20px; background: var(--akzent); color: #fff;
  font: 800 22px/40px var(--schrift); text-align: center; box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0,0,0,.4); z-index: 2; }
.bkarte:has(.ksumme) { overflow: visible; }
.bkarte:has(.ksumme) .ktext { overflow: hidden; }
.punktinfo { margin: 0 0 6px; padding: 6px 10px; border-radius: var(--r); background: var(--flaeche); border: 1px solid var(--akzent); font-weight: 600; }
.punktinfo.fehler { border-color: var(--fehler); color: var(--fehler); }
.rangliste { counter-reset: rang; list-style: none; padding: 0; margin: 6px 0 14px; }
.rangliste li { display: flex; gap: 10px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--linie); }
.rangliste .n { min-width: 34px; text-align: center; font-weight: 700; color: var(--akzent); }
.rangliste .chip { max-width: 70%; white-space: normal; }

/* Teilnehmer: eigene Karten einem Thema zuordnen (Phase Ordnen) */
.zuliste { display: grid; gap: 6px; margin-bottom: 16px; }
.zuzeile { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.zuzeile .chip { white-space: normal; max-width: 100%; line-height: 1.3; padding: 4px 9px; border-radius: 4px; flex: 1 1 220px; }
.zuzeile select { flex: 0 1 220px; }
.legende button:disabled { opacity: .45; cursor: not-allowed; }

/* Moderator: Karten eines Teilnehmers hervorheben */

.bkarte.gedimmt { opacity: .28; }
.bkarte.hervor { outline: 3px solid #d32f2f; outline-offset: 2px; } /* Karten des gewählten Teilnehmers: rot umrandet */

/* Raumansicht: Karten zwischen Kategorien ziehen */
.mkarte.verschiebbar { cursor: grab; }
.mkarte.zieht { opacity: .5; }
.gruppe.ablage { border: 2px dashed transparent; border-radius: var(--r); padding: 0 8px; margin: 0 -10px; }
.gruppe.ablage.ueber { border-color: var(--akzent); background: color-mix(in srgb, var(--akzent) 8%, transparent); }

/* Schrift auf den Karten: Größe setzt app.js (Faktor A−/A+), Text auf die passenden Zeilen gekürzt */
.bkarte .ktext { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--zeilen, 6); line-clamp: var(--zeilen, 6); }
.bkarte.ueberschrift .ktext { flex: 0 1 auto; }
/* Lupe: Karte im Format des Originals, nur größer (Breite/Höhe setzt app.js), über allem, ohne Zeigerereignisse */
.lupe { position: fixed; z-index: 1000; max-width: calc(100vw - 16px); pointer-events: none; }
.lupe .lkarte { position: relative; display: flex; max-width: 100%; padding: 11px 14px; background: var(--kf, var(--flaeche)); color: var(--kc, var(--text));
  border: 1px solid var(--kr, var(--linie)); border-radius: 4px; box-shadow: 0 12px 32px rgba(0,0,0,.4);
  font-size: 18px; line-height: 1.28; white-space: pre-line; overflow-wrap: anywhere; }
.lupe .lkarte.stapel { box-shadow: 6px 6px 0 -1px var(--kf), 6px 6px 0 0 rgba(0,0,0,.55), 0 12px 32px rgba(0,0,0,.4); }
.lupe .lkarte.stapel2 { box-shadow: 6px 6px 0 -1px var(--kf), 6px 6px 0 0 rgba(0,0,0,.55), 12px 12px 0 -1px var(--kf), 12px 12px 0 0 rgba(0,0,0,.55), 0 12px 32px rgba(0,0,0,.4); }
.lupe.ue .lkarte { background: var(--uf); color: var(--uc); border: 2px solid var(--ur); font-weight: 700; font-size: 20px; line-height: 1.15;
  align-items: center; justify-content: center; text-align: center; hyphens: manual; -webkit-hyphens: manual; overflow-wrap: normal; }
.lupe .ltext { min-width: 0; }
.lupe .lstapel { position: absolute; right: 8px; bottom: 6px; font-size: 13px; font-weight: 700; opacity: .7; }
.lupe .lerkl { margin-top: 8px; padding: 8px 12px; background: var(--flaeche); color: var(--text); border: 1px solid var(--linie); border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,.3); font-size: 14px; font-style: italic; line-height: 1.35; white-space: pre-line; overflow-wrap: anywhere; }
.bkarte, .lupe { hyphens: auto; -webkit-hyphens: auto; } /* deutsche Silbentrennung (html lang="de") statt hartem Umbruch */
.logovorschau { max-width: 260px; max-height: 90px; background: #fff; padding: 6px; border: 1px solid var(--linie); border-radius: var(--r); }
.pdfknoepfe { display: inline-flex; gap: 6px; align-items: center; color: var(--leise); font-size: 13px; }

/* Vorgruppieren am Laptop: eigene Fläche des Teilnehmers */
.vorgruppen { margin: 18px 0; }
.vorgruppen h2 { margin: 0; }
.vgbrett { height: 60vh; min-height: 360px; flex: none; }
.bkarte .kunter { position: absolute; left: 10px; right: 26px; bottom: 4px; font-size: 11px; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.bkarte.ausgerichtet { outline: 2px dashed var(--akzent); outline-offset: 3px; } /* Ausrichthilfe: an dieser Überschrift wird ausgerichtet */

/* QR-Code: klein auf der Raumseite, groß für den Beamer */
.linkkarte { display: flex; gap: 16px; align-items: flex-start; }
.linkteil { flex: 1; min-width: 0; }
.qrklein { flex: none; display: block; width: 112px; height: 112px; border: 1px solid var(--linie); border-radius: 4px; overflow: hidden; background: #fff; }
.qrklein svg, .qrgross svg { display: block; width: 100%; height: 100%; }
.qrseite { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; text-align: center; background: var(--bg); padding: 8px; }
.qrleiste { align-self: stretch; }
.qrseite h1 { font-size: clamp(22px, 4vh, 44px); margin: 0 0 4px; }
.qrtext { margin: 0 0 12px; font-size: clamp(15px, 2.4vh, 26px); color: var(--leise); }
.qrgross { width: min(60vh, 90vw); height: min(60vh, 90vw); background: #fff; padding: 0; border-radius: 6px; }
.qrlink { margin: 14px 0 0; font: 600 clamp(14px, 2.4vh, 26px) var(--mono); overflow-wrap: anywhere; }
.qrseite:fullscreen { justify-content: center; }
.qrseite:fullscreen .qrleiste { position: absolute; top: 8px; left: 8px; right: 8px; }
.qrseite:fullscreen .qrgross { width: min(70vh, 90vw); height: min(70vh, 90vw); }
@media (max-width: 600px) { .linkkarte { flex-direction: column; } }

/* Raumseite: vier Blöcke (2 × 2), auf schmalen Bildschirmen untereinander */
.raumgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.raumgrid > .karte { margin: 0; }
.raumblock h1 { margin-bottom: 4px; }
.raumblock h2 { margin: 0 0 8px; }
.raumblock .url { width: 100%; margin-bottom: 6px; }
.raumblock .phasen { flex-wrap: wrap; }
.raumblock details.bereich { margin: 10px 0 0; }
.raumblock details.bereich h3 { margin: 0; }
.inline-label { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
@media (max-width: 800px) { .raumgrid { grid-template-columns: 1fr; } }
.inline-label { white-space: nowrap; }
.inline-label > input.nr { display: inline-block; width: 64px; margin: 0; }

/* Teilnehmer am Handy: Name in einer Zeile, Erklärung eingeklappt, Tastenhinweis nur mit Maus */
.namenfeld { display: flex; align-items: center; gap: 8px; max-width: 420px; }
.namenfeld > input { flex: 1; margin: 0 !important; }
.namenfeld span { white-space: nowrap; font-weight: 600; }
.kkat { display: flex; align-items: center; gap: 8px; }
.kkat > select { flex: 1; width: auto !important; margin: 0 !important; }
details.erkl { margin: 0 0 10px; }
details.erkl > summary { color: var(--link); font-size: 13px; padding: 2px 0; }
details.erkl textarea { margin-top: 4px; }
@media (pointer: coarse) { .nurmaus { display: none; } }

.rangdialog { width: min(640px, calc(100vw - 32px)); max-height: 85vh; }
.rangdialog h2 { margin: 0; }
.rangdialog .rangliste li { font-size: 16px; }
.rangdialog .rangliste .n { font-size: 20px; min-width: 44px; }

.hinweisleiste { margin: 0; padding: 6px 12px; border-radius: var(--r); background: #fff3cd; color: #5c4400; border: 1px solid #e0b400; font-weight: 600; }

/* Datenschutzhinweis auf der Teilnehmerseite */
details.datenschutz { margin: -4px 0 10px; font-size: 12px; color: var(--leise); }
details.datenschutz > summary { color: var(--link); }
details.datenschutz p { margin: 6px 0; line-height: 1.4; }

.bkarte.ueberschrift { hyphens: manual; -webkit-hyphens: manual; overflow-wrap: normal; } /* lieber kleinere Schrift als getrennte Wörter (uePassend) */

.bkarte.neu { outline: 2px dashed var(--leise); outline-offset: 2px; } /* noch ohne festen Platz (Sammeln) */

.knopf:disabled { opacity: .4; cursor: default; } /* z. B. Rückgängig ohne Schritte */

.bkarte.zieht.verboten { outline: 3px solid #d33; outline-offset: 1px; opacity: .6; cursor: not-allowed; } /* Block würde andere Karten verdecken */
