/* Whiteboard für Kuble Slides: helle Tafel, bleibt auch im dunklen Deck hell. */
:root {
  --wb-bg: #ffffff;
  --wb-raster: #e9ecf3;
  --wb-ink: #05070c;
  --wb-ink-2: #4a5161;
  --wb-linie: #d5dae6;
  --wb-blau: #2e5cff;
  --wb-blau-hell: #eef2ff;
  --wb-gold: #edaa3c;
  --wb-gold-hell: #fdf4e3;
  --wb-rot: #c2272d;
  --wb-gross: clamp(18px, 2.05vw, 34px);
  --wb-mittel: clamp(15px, 1.45vw, 24px);
  --wb-klein: clamp(12px, 1.05vw, 16px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: Montserrat, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--wb-ink);
  background: var(--wb-bg);
  line-height: 1.3;
}
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }

.wb {
  height: 100%;
  display: flex; flex-direction: column; gap: clamp(8px, 1.2vw, 18px);
  padding: clamp(12px, 1.8vw, 28px);
  background-color: var(--wb-bg);
  background-image: radial-gradient(var(--wb-raster) 1.4px, transparent 1.5px);
  background-size: 26px 26px;
}
.wb-titel { margin: 0; font-size: var(--wb-mittel); font-weight: 700; color: var(--wb-ink-2); }

/* Zähler */
.wb-zaehler { display: flex; flex-wrap: wrap; gap: clamp(8px, 1vw, 16px); }
.wb-zaehler__knopf {
  display: inline-flex; align-items: center; gap: .6em;
  padding: .35em .5em .35em .8em; border: 2px solid var(--wb-blau); border-radius: 999px;
  background: var(--wb-bg); font-size: var(--wb-mittel); font-weight: 700; cursor: pointer;
}
.wb-zaehler__knopf:hover { background: var(--wb-blau-hell); }
.wb-zaehler__zahl {
  min-width: 1.8em; padding: .05em .45em; border-radius: 999px; text-align: center;
  background: var(--wb-blau); color: #fff; font-variant-numeric: tabular-nums;
}
.wb-zaehler__minus {
  width: 1.6em; height: 1.6em; margin-left: .3em; border: 1px solid var(--wb-linie); background: #fff; color: var(--wb-ink-2);
  font-size: var(--wb-klein); font-weight: 700; cursor: pointer; padding: 0; border-radius: 999px;
}
.wb-zaehler__minus:hover { color: #fff; background: var(--wb-rot); border-color: var(--wb-rot); }
.wb-zaehler__gruppe { display: inline-flex; align-items: center; }

/* Notizen */
.wb-notizen { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: clamp(8px, 1vw, 14px); }
.wb-karten {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0; padding: 2px; list-style: none;
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: clamp(8px, 1vw, 14px);
}
.wb-karte {
  position: relative; max-width: 100%;
  padding: .45em 1.9em .45em .7em; border-radius: 12px;
  background: var(--wb-blau-hell); border-left: 5px solid var(--wb-blau);
  font-size: var(--wb-gross); font-weight: 600; overflow-wrap: anywhere;
}
.wb-karte.is-neu { animation: wb-rein .18s ease-out; }
.wb-karte:nth-child(3n+2) { background: var(--wb-gold-hell); border-left-color: var(--wb-gold); }
.wb-karten.is-liste { flex-direction: column; flex-wrap: nowrap; }
.wb-karten.is-liste .wb-karte { background: transparent; border-left: 0; border-bottom: 2px solid var(--wb-linie); border-radius: 0; padding-left: 1.2em; }
.wb-karten.is-liste .wb-karte::before { content: "–"; position: absolute; left: .2em; color: var(--wb-blau); }
.wb-x {
  position: absolute; top: 50%; right: .25em; transform: translateY(-50%);
  width: 1.3em; height: 1.3em; border: 0; border-radius: 999px; background: transparent;
  color: var(--wb-ink-2); font-size: .8em; line-height: 1; cursor: pointer; opacity: .55;
}
.wb-x:hover, .wb-x:focus-visible { opacity: 1; color: #fff; background: var(--wb-rot); }
.wb-leer { color: var(--wb-ink-2); font-size: var(--wb-mittel); font-style: italic; }
@keyframes wb-rein { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }

.wb-eingabe input, .wb-zelle input {
  width: 100%; padding: .5em .7em; border: 2px solid var(--wb-linie); border-radius: 12px;
  background: #fff; font-size: var(--wb-mittel); outline: none;
}
.wb-eingabe input:focus, .wb-zelle input:focus { border-color: var(--wb-blau); }

/* Zahlen */
.wb-zahlen { flex: 1 1 auto; min-height: 0; display: grid; gap: clamp(8px, 1vw, 14px); align-content: stretch; }
.wb-zahlen__kopf { font-size: var(--wb-mittel); font-weight: 800; color: var(--wb-ink-2); align-self: end; }
.wb-zahlen__label { font-size: var(--wb-gross); font-weight: 700; align-self: center; }
.wb-zelle {
  display: flex; flex-direction: column; gap: .4em; min-height: 0;
  padding: clamp(8px, 1vw, 14px); border-radius: 14px; background: var(--wb-blau-hell); border: 2px solid transparent;
}
.wb-zelle.is-spalte-1 { background: var(--wb-gold-hell); }
.wb-zelle__oben { display: flex; align-items: baseline; gap: .5em; }
.wb-zelle__schnitt { font-size: clamp(30px, 4.4vw, 72px); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.wb-zelle__n { font-size: var(--wb-klein); color: var(--wb-ink-2); }
.wb-werte { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; max-height: 5.5em; overflow-y: auto; }
.wb-wert {
  display: inline-flex; align-items: center; gap: .2em; padding: .1em .15em .1em .55em; border-radius: 999px;
  background: #fff; border: 1px solid var(--wb-linie); font-size: var(--wb-mittel); font-weight: 700; font-variant-numeric: tabular-nums;
}
.wb-wert .wb-x { position: static; transform: none; font-size: .75em; }
.wb-delta { font-size: clamp(22px, 2.8vw, 46px); font-weight: 800; align-self: center; text-align: center; color: var(--wb-blau); }
.wb-delta small { display: block; font-size: var(--wb-klein); font-weight: 600; color: var(--wb-ink-2); }

/* Fuss */
.wb-fuss { display: flex; align-items: center; gap: 1em; font-size: var(--wb-klein); color: var(--wb-ink-2); }
.wb-hilfe { flex: 1 1 auto; }
.wb-status { color: var(--wb-blau); font-weight: 600; }
.wb-leeren {
  border: 1px solid var(--wb-linie); background: #fff; border-radius: 999px; padding: .3em .9em; cursor: pointer;
  font-size: var(--wb-klein); color: var(--wb-ink-2);
}
.wb-leeren.is-sicher { border-color: var(--wb-rot); color: #fff; background: var(--wb-rot); }

/* Doku ohne id */
.doku { max-width: 760px; margin: 0 auto; padding: 32px 20px 60px; }
.doku h1 { font-size: 2rem; margin: 0 0 12px; }
.doku h2 { font-size: 1.2rem; margin: 28px 0 8px; }
.doku code { background: var(--wb-blau-hell); padding: 0 .3em; border-radius: 4px; }
.doku a { color: var(--wb-blau); }
