@font-face { font-family: "Fredoka"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(/fonts/fredoka-latin.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fredoka"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(/fonts/fredoka-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url(/fonts/nunito-latin.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 200 1000; font-display: swap;
  src: url(/fonts/nunito-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #ffffff;
  --flaeche: #f6f9f3;
  --flaeche-2: #eef4ea;
  --linie: #e3ebdf;
  --text: #2c372d;
  --leise: #75806f;
  --gruen: #7db87a;
  --gruen-tief: #4d8a4a;
  --gruen-hell: #e4f1df;
  --matcha: #a9cf8e;
  --creme: #fbf6ea;
  --wange: #f5c6c4;
  --warm: #e9b872;
  --rot-sanft: #d98c7a;
  --schatten: 0 1px 2px rgba(60, 90, 55, .06), 0 6px 20px rgba(60, 90, 55, .07);
  --radius: 20px;
  --radius-k: 12px;
  --kopf: "Fredoka", "Nunito", system-ui, sans-serif;
  --text-font: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text); font-family: var(--text-font); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--kopf); font-weight: 600; letter-spacing: .1px; margin: 0 0 .4em; line-height: 1.2; }
h1 { font-size: clamp(22px, 1.2vw + 14px, 30px); }
h2 { font-size: clamp(18px, .5vw + 14px, 21px); }
h3 { font-size: 17px; }
h1, h2, h3, h4, .titel, .gruss { overflow-wrap: anywhere; hyphens: auto; }
svg.mochi { max-width: 100%; height: auto; }
a { color: var(--gruen-tief); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 .7em; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
.leise { color: var(--leise); }
.klein { font-size: 13.5px; }
.versteckt { display: none !important; }

/* ---------- Grundgeruest */
.rahmen { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.seitenleiste {
  position: sticky; top: 0; height: 100vh; padding: 22px 16px; border-right: 1px solid var(--linie);
  display: flex; flex-direction: column; gap: 4px; background: var(--bg);
}
.marke { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: var(--text); }
.marke:hover { text-decoration: none; }
.marke svg { width: 40px; height: 40px; flex: none; }
.marke span { font-family: var(--kopf); font-weight: 600; font-size: 24px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; color: var(--text);
  font-weight: 600; font-size: 15.5px;
}
.nav a svg { width: 21px; height: 21px; stroke: var(--leise); flex: none; }
.nav a:hover { background: var(--flaeche); text-decoration: none; }
.nav a.aktiv { background: var(--gruen-hell); color: var(--gruen-tief); }
.nav a.aktiv svg { stroke: var(--gruen-tief); }
.seitenleiste .fuss { margin-top: auto; padding: 10px 12px; }
.inhalt { min-width: 0; padding: 32px 40px 80px; max-width: 1180px; width: 100%; }
.unten-nav { display: none; }

@media (max-width: 860px) {
  .rahmen { grid-template-columns: 1fr; }
  .seitenleiste { display: none; }
  .inhalt { padding: 18px 16px 104px; }
  .unten-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255,255,255,.96);
    border-top: 1px solid var(--linie); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); backdrop-filter: blur(8px);
  }
  .unten-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0;
    font-size: 11.5px; font-weight: 700; color: var(--leise); border-radius: 12px; }
  .unten-nav a svg { width: 22px; height: 22px; stroke: currentColor; }
  .unten-nav a.aktiv { color: var(--gruen-tief); }
  .unten-nav a:hover { text-decoration: none; }
}

/* ---------- Bausteine */
.kopfzeile { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.kopfzeile .unter { color: var(--leise); margin: 0; }
.karte {
  background: var(--bg); border: 1px solid var(--linie); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--schatten);
}
.karte + .karte { margin-top: 14px; }
.karte h2, .karte h3 { display: flex; align-items: center; gap: 8px; }
.karte.zart { background: var(--flaeche); box-shadow: none; border-color: transparent; }
.raster { display: grid; gap: 16px; }
.raster.zwei { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.raster.drei { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.raster.module { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
@media (max-width: 860px) { .raster.zwei, .raster.drei { grid-template-columns: 1fr; } }
.zeile { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.zeile.zwischen { justify-content: space-between; }
.stapel > * + * { margin-top: 10px; }
.trenner { height: 1px; background: var(--linie); margin: 14px 0; border: 0; }

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--linie);
  background: var(--bg); padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: 14.5px; cursor: pointer;
  color: var(--text); transition: background .15s, transform .1s; white-space: nowrap; min-height: 40px;
}
.knopf:hover { background: var(--flaeche); text-decoration: none; }
.knopf:active { transform: scale(.98); }
.knopf.haupt { background: var(--gruen-tief); border-color: var(--gruen-tief); color: #fff; }
.knopf.haupt:hover { background: #437c40; }
.knopf.sanft { background: var(--gruen-hell); border-color: transparent; color: var(--gruen-tief); }
.knopf.sanft:hover { background: #d7ead0; }
.knopf.flach { border-color: transparent; background: transparent; }
.knopf.flach:hover { background: var(--flaeche); }
.knopf.klein { padding: 5px 12px; font-size: 13.5px; min-height: 32px; }
.knopf.gefahr { color: #a5503e; }
.knopf svg { width: 18px; height: 18px; stroke: currentColor; }
.knopf[disabled] { opacity: .5; cursor: default; }

.feld { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.feld label { font-size: 13.5px; font-weight: 700; color: var(--leise); }
input[type=text], input[type=url], input[type=number], input[type=date], input[type=time], input[type=datetime-local],
input[type=search], select, textarea {
  width: 100%; border: 1px solid var(--linie); border-radius: var(--radius-k); padding: 10px 12px; background: var(--bg);
  outline: none; transition: border-color .15s, box-shadow .15s; min-height: 42px;
}
input:focus, select:focus, textarea:focus { border-color: var(--gruen); box-shadow: 0 0 0 3px var(--gruen-hell); }
textarea { resize: vertical; min-height: 120px; line-height: 1.55; }
.felder { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 12px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--flaeche-2);
  font-size: 12.5px; font-weight: 700; color: var(--leise); white-space: nowrap;
}
.chip.gruen { background: var(--gruen-hell); color: var(--gruen-tief); }
.chip.warm { background: #fbefd9; color: #8a6420; }
.chip.ruhig { background: #f1efe9; color: #6f6a5c; }
.punkt { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }

.balken { height: 10px; border-radius: 999px; background: var(--flaeche-2); overflow: hidden; position: relative; }
.balken > span { position: absolute; inset: 0 auto 0 0; background: var(--gruen); border-radius: 999px; }
.balken > span.soll { background: transparent; border-right: 2px solid var(--gruen-tief); border-radius: 0; }

.liste { list-style: none; margin: 0; padding: 0; }
.liste > li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--linie); }
.liste > li:last-child { border-bottom: 0; }
.liste .haupt { flex: 1; min-width: 0; }
.liste .titel { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.liste .unter { font-size: 13.5px; color: var(--leise); }
.zeit { font-family: var(--kopf); font-weight: 600; font-size: 15px; min-width: 56px; color: var(--gruen-tief); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--linie); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 700; color: var(--leise); cursor: pointer;
  border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.aktiv { color: var(--gruen-tief); border-color: var(--gruen-tief); }

.leer { text-align: center; padding: 28px 12px; color: var(--leise); }
.leer svg, .leer img { width: 150px; height: auto; margin: 0 auto 10px; display: block; }
.leer h3 { color: var(--text); }

/* ---------- Heute */
.heute-kopf { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px; margin-bottom: 22px; }
.heute-kopf .bild { width: 150px; height: 120px; display: flex; align-items: flex-end; justify-content: center; }
.heute-kopf .bild img, .heute-kopf .bild svg { max-height: 120px; width: auto; }
.heute-kopf .gruss { font-size: clamp(24px, 1.5vw + 14px, 32px); font-family: var(--kopf); font-weight: 600; margin: 0; }
.motivation { background: var(--creme); border-radius: 16px; padding: 10px 14px; color: #6b5e3c; font-size: 14.5px; display: inline-block; margin-top: 8px; }
@media (max-width: 860px) {
  .heute-kopf { grid-template-columns: 1fr 96px; gap: 10px; }
  .heute-kopf .bild { width: 96px; height: 80px; }
}
.streak { display: flex; align-items: center; gap: 12px; }
.streak .zahl { font-family: var(--kopf); font-size: 34px; font-weight: 600; color: var(--gruen-tief); line-height: 1; }
.sprossen { display: flex; gap: 5px; align-items: flex-end; height: 28px; }
.sprossen i { width: 10px; border-radius: 6px 6px 3px 3px; background: var(--flaeche-2); display: block; }
.sprossen i.an { background: var(--gruen); }

.termin-band { border-left: 4px solid var(--gruen); padding-left: 12px; }
.termin-band.vorbei { opacity: .55; }
.termin-band.laeuft { background: var(--gruen-hell); border-radius: 0 12px 12px 0; padding: 6px 12px; }

/* ---------- Module */
.modulkarte { position: relative; overflow: hidden; display: block; color: var(--text); cursor: pointer; min-height: 132px; }
.modulkarte:hover { text-decoration: none; border-color: var(--gruen); }
.modulkarte .farbe { position: absolute; right: -24px; top: -24px; width: 92px; height: 92px; border-radius: 50%; opacity: .45; }
.modulkarte .kuerzel { font-family: var(--kopf); font-size: 13px; font-weight: 600; color: var(--leise); text-transform: uppercase; letter-spacing: .6px; }
.modulkarte h3 { margin: 2px 0 10px; font-size: 18.5px; position: relative; padding-right: 30px; }
.zahlen { display: flex; gap: 14px; font-size: 13px; color: var(--leise); flex-wrap: wrap; }
.zahlen b { color: var(--text); }

.material { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.mat {
  border: 1px solid var(--linie); border-radius: 16px; overflow: hidden; background: var(--bg); display: flex; flex-direction: column;
  color: var(--text); cursor: pointer; position: relative;
}
.mat:hover { border-color: var(--gruen); text-decoration: none; }
.mat .vor { height: 120px; background: var(--flaeche) center/cover no-repeat; display: flex; align-items: center; justify-content: center; }
.mat .vor svg { width: 44px; height: 44px; stroke: var(--gruen-tief); opacity: .7; }
.mat .txt { padding: 8px 10px; font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.mat .txt small { display: block; font-weight: 600; color: var(--leise); font-size: 12px; margin-top: 2px; }
.ablage {
  border: 2px dashed var(--linie); border-radius: var(--radius); padding: 20px; text-align: center; color: var(--leise);
  transition: background .15s, border-color .15s; margin-bottom: 16px;
}
.ablage.ueber { background: var(--gruen-hell); border-color: var(--gruen); color: var(--gruen-tief); }
.abschnitt-titel { font-family: var(--kopf); font-weight: 600; color: var(--leise); font-size: 14px; margin: 18px 0 8px; text-transform: none; }

/* ---------- Dialog, Meldung */
.schleier { position: fixed; inset: 0; background: rgba(40, 55, 40, .28); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; }
.dialog { background: var(--bg); border-radius: 24px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 22px 22px 18px; box-shadow: 0 20px 60px rgba(40,60,40,.22); }
.dialog.breit { width: min(900px, 100%); }
.dialog .aktionen { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--text); color: #fff; padding: 10px 18px; border-radius: 999px; z-index: 95; font-weight: 700; font-size: 14.5px; box-shadow: var(--schatten); max-width: calc(100vw - 32px); }
@media (max-width: 860px) { .toast { bottom: 96px; } }

/* ---------- Notizen */
.notiz-kopf input { font-family: var(--kopf); font-size: 24px; font-weight: 600; border: 0; padding: 4px 0; box-shadow: none !important; }
.notiz-text { min-height: 260px; font-size: 16px; border-radius: 16px; background: var(--bg); }
.vorschau-md { line-height: 1.65; }
.vorschau-md h1 { font-size: 24px; margin-top: .6em; }
.vorschau-md h2 { font-size: 19px; margin-top: 1em; color: var(--gruen-tief); }
.vorschau-md ul { padding-left: 1.3em; }
.vorschau-md code { background: var(--flaeche); padding: 1px 5px; border-radius: 6px; }
.speicher-status { font-size: 13px; color: var(--leise); }

.zeichnen { border: 1px solid var(--linie); border-radius: 18px; overflow: hidden; background: var(--bg); }
.werkzeuge { display: flex; gap: 6px; padding: 8px; border-bottom: 1px solid var(--linie); background: var(--flaeche); flex-wrap: wrap; align-items: center; position: sticky; top: 0; z-index: 2; }
.werkzeuge button { border: 1px solid transparent; background: var(--bg); border-radius: 12px; height: 38px; min-width: 38px; padding: 0 10px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; font-size: 13.5px; }
.werkzeuge button.aktiv { border-color: var(--gruen); background: var(--gruen-hell); color: var(--gruen-tief); }
.werkzeuge button svg { width: 18px; height: 18px; stroke: currentColor; }
.werkzeuge .farbe { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--linie); padding: 0; min-width: 0; height: 26px; }
.werkzeuge .farbe.aktiv { box-shadow: 0 0 0 2px var(--gruen-tief); }
.blatt-flaeche { position: relative; touch-action: pan-y; background:
  repeating-linear-gradient(to bottom, transparent 0, transparent 31px, #eef3ec 31px, #eef3ec 32px); }
.blatt-flaeche canvas { display: block; width: 100%; touch-action: pan-y; }
.blatt-flaeche.stift-aktiv canvas { touch-action: none; }

/* ---------- Stundenplan */
.woche { display: grid; grid-template-columns: 52px repeat(var(--tage, 5), minmax(0, 1fr)); border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; background: var(--bg); }
.woche .kopf { padding: 10px 6px; text-align: center; font-weight: 700; font-size: 13.5px; border-bottom: 1px solid var(--linie); background: var(--flaeche); }
.woche .kopf.heute { color: var(--gruen-tief); background: var(--gruen-hell); }
.woche .spalte { position: relative; border-left: 1px solid var(--linie); }
.woche .stunden { position: relative; }
.woche .stunde { position: absolute; left: 0; right: 0; font-size: 11.5px; color: var(--leise); text-align: right; padding-right: 6px; transform: translateY(-7px); }
.woche .linie { position: absolute; left: 0; right: 0; border-top: 1px dashed #edf2ea; }
.woche .ev { position: absolute; left: 4px; right: 4px; border-radius: 10px; padding: 4px 7px; font-size: 12.5px; line-height: 1.25; overflow: hidden; cursor: pointer; border-left: 4px solid var(--gruen-tief); background: var(--gruen-hell); }
.woche .ev b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.woche .ev.uebung { background: #fbf1dc; border-left-color: var(--warm); }
.woche .ev.abgesagt { opacity: .45; text-decoration: line-through; }
@media (max-width: 860px) { .woche-rahmen { overflow-x: auto; } .woche { min-width: 640px; } }
.tagesliste .tag { margin-bottom: 14px; }

/* ---------- Altklausur nebeneinander */
.geteilt { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; height: calc(100vh - 210px); min-height: 420px; }
.geteilt .seite-spalte { overflow-y: auto; background: var(--flaeche); border-radius: 18px; padding: 10px; position: relative; }
.geteilt .seite-spalte h3 { position: sticky; top: -10px; background: var(--flaeche); margin: -10px -10px 8px; padding: 10px; z-index: 1; font-size: 15px; }
.geteilt img.pdfseite { width: 100%; display: block; background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.08); margin-bottom: 10px; }
@media (max-width: 860px) { .geteilt { grid-template-columns: 1fr; height: auto; } .geteilt .seite-spalte { max-height: 70vh; } }
.aufgaben-leiste { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.aufgaben-leiste button { border: 1px solid var(--linie); background: var(--bg); border-radius: 12px; padding: 6px 12px; font-weight: 700; cursor: pointer; }
.aufgaben-leiste button.gut { background: var(--gruen-hell); border-color: transparent; color: var(--gruen-tief); }
.aufgaben-leiste button.unsicher { background: #fbefd9; border-color: transparent; color: #8a6420; }
.aufgaben-leiste button.aktiv { box-shadow: 0 0 0 2px var(--gruen-tief); }

/* ---------- Statistik */
.heatmap { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 14px); gap: 4px; overflow-x: auto; padding-bottom: 4px; }
.heatmap i { width: 14px; height: 14px; border-radius: 4px; background: var(--flaeche-2); display: block; }
.heatmap i.a1 { background: #cfe6c6; } .heatmap i.a2 { background: #a9d39c; } .heatmap i.a3 { background: var(--gruen); } .heatmap i.a4 { background: var(--gruen-tief); }
.saeulen { display: flex; align-items: flex-end; gap: 10px; height: 140px; padding-top: 10px; }
.saeulen .s { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.saeulen .s i { width: 100%; max-width: 42px; background: var(--matcha); border-radius: 10px 10px 4px 4px; display: block; min-height: 3px; }
.saeulen .s span { font-size: 12px; color: var(--leise); }
.kennzahl { font-family: var(--kopf); font-size: 30px; font-weight: 600; color: var(--gruen-tief); line-height: 1.1; }

/* ---------- Anmelden, Meldungen */
.anmelden { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background:
  radial-gradient(1200px 600px at 50% 110%, #eef6ea 0, #fff 60%); }
.anmelden .karte { max-width: 420px; text-align: center; padding: 34px 28px; }
.anmelden svg.mochi { width: 150px; height: auto; margin: 0 auto 10px; display: block; }
body.schlicht { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.meldung { text-align: center; padding: 24px; max-width: 460px; }

.link-zeile { display: flex; gap: 8px; }
.link-zeile input { font-family: ui-monospace, monospace; font-size: 13px; }

.kbd { font-family: ui-monospace, monospace; background: var(--flaeche); padding: 1px 6px; border-radius: 6px; font-size: 13px; }

@media print { .seitenleiste, .unten-nav, .werkzeuge, .knopf { display: none !important; } .inhalt { padding: 0; } }

/* ---------- Ergaenzungen Runde 1 */
.illu { display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 100%; }
.illu img { max-height: 120px; width: auto; border-radius: 18px; }
.illu svg.szene { width: 100%; height: auto; max-height: 120px; }
.knopf.gross { padding: 14px 24px; font-size: 16.5px; min-height: 52px; }
.heute-raster { align-items: start; }
.lern-start { background: linear-gradient(135deg, #f3f9ef 0%, #ffffff 70%); border-color: #d6e9cf; }
.lern-start h2 { font-size: 24px; }
.haken-knopf { width: 30px; height: 30px; flex: none; border-radius: 50%; border: 2px solid var(--linie); background: var(--bg);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: transparent; padding: 0; }
.haken-knopf svg { width: 16px; height: 16px; stroke: currentColor; }
.haken-knopf:hover { border-color: var(--gruen); color: var(--gruen); }
.haken-knopf.an { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.block-zeile.fertig .haupt { opacity: .55; }
.termin-band.block { border-left-style: dashed; }
.aktuell-zeile { background: var(--gruen-hell); border-radius: 12px; padding-left: 8px !important; padding-right: 8px !important; }

.woche-punkte { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 12px; }
.wp { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--leise); }
.wp i { width: 26px; height: 26px; border-radius: 50%; background: var(--flaeche-2); display: block; }
.wp.an i { background: var(--gruen); box-shadow: inset 0 -3px 0 rgba(0,0,0,.08); }
.wp.pause i { background: repeating-linear-gradient(45deg, #eef2ea, #eef2ea 4px, #dfe8da 4px, #dfe8da 8px); }
.wp.zukunft i { background: transparent; border: 2px dashed var(--linie); }

.phasen { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 8px; }
.phase { background: var(--flaeche); border-radius: 14px; padding: 9px 11px; font-size: 13px; }
.phase.aktuell { background: var(--gruen-hell); box-shadow: inset 0 0 0 1.5px #bcdcb0; }
.phase.vorbei { opacity: .6; }
.phase-name { font-family: var(--kopf); font-weight: 600; font-size: 14px; }
.phase-ziel { color: var(--text); line-height: 1.3; margin: 2px 0 6px; }
.phase-zeit { color: var(--leise); font-size: 12px; margin-top: 4px; }
.balken.klein { height: 6px; }

.kurve-box { margin-top: 12px; }
.kurve { width: 100%; height: auto; background: var(--flaeche); border-radius: 14px; }
.legende { display: inline-block; width: 18px; height: 0; border-top: 3px solid #4d8a4a; margin-right: 6px; vertical-align: middle; }
.legende.gestrichelt { border-top: 3px dashed #a9cf8e; }

.chip-wahl { display: inline-flex; align-items: center; gap: 4px; background: var(--flaeche); padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 13px; cursor: pointer; }
.chip-wahl input { margin: 0; }
.schritte { padding-left: 1.2em; line-height: 1.7; }
table.zuordnung { width: 100%; border-collapse: collapse; }
table.zuordnung td, table.zuordnung th { padding: 8px 6px; border-bottom: 1px solid var(--linie); text-align: left; vertical-align: top; }
table.zuordnung select { min-width: 160px; }

/* Stundenplan */
.woche .gesperrt { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, #f4f5f2, #f4f5f2 6px, #eceee9 6px, #eceee9 12px); }
.woche .ev.lernblock { background: #f6faf3; border-left-style: dashed; color: var(--leise); }
.woche .ev.lernblock.fertig { opacity: .5; }
.woche .ev { box-shadow: 0 1px 2px rgba(0,0,0,.05); }

/* Notizen */
.notiz-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1100px) { .notiz-raster { grid-template-columns: 1fr; } }
.notiz-bilder { display: flex; gap: 8px; flex-wrap: wrap; }
.notiz-bild img { width: 120px; height: 90px; object-fit: cover; border-radius: 12px; display: block; }

/* Anzeige */
.video-rahmen { position: relative; padding-top: 56.25%; border-radius: 18px; overflow: hidden; background: #000; }
.video-rahmen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pdf-ansicht { width: 100%; height: calc(100vh - 200px); min-height: 480px; border: 1px solid var(--linie); border-radius: 16px; background: #fff; }
.bild-ansicht { max-width: 100%; border-radius: 16px; box-shadow: var(--schatten); }

/* Altklausur */
.seite-spalte.loesung.verdeckt img.pdfseite { filter: blur(14px) saturate(.4); pointer-events: none; user-select: none; }
.seite-spalte.loesung { position: relative; }
.deckel { position: sticky; bottom: 12px; margin: 0 auto; width: min(360px, 92%); background: #fff; border-radius: 18px; padding: 14px 16px; text-align: center; box-shadow: var(--schatten); z-index: 2; }

/* Ablage ueberall */
.ablage-schleier { position: fixed; inset: 0; z-index: 70; background: rgba(228, 241, 223, .82); display: flex; align-items: center; justify-content: center; pointer-events: none; }
.ablage-schleier > div { background: #fff; border: 2px dashed var(--gruen); border-radius: 24px; padding: 28px 40px; font-family: var(--kopf); font-size: 22px; color: var(--gruen-tief); display: flex; align-items: center; gap: 12px; }
.ablage-schleier svg { width: 30px; height: 30px; stroke: currentColor; }
.ablage-knopf { position: fixed; right: 22px; bottom: 22px; z-index: 25; width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--gruen-tief); color: #fff; box-shadow: 0 6px 18px rgba(60,100,55,.28); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ablage-knopf svg { width: 24px; height: 24px; stroke: currentColor; }
@media (max-width: 860px) { .ablage-knopf { bottom: 86px; right: 16px; width: 50px; height: 50px; } }
body.lm-offen .ablage-knopf, body.lm-offen .unten-nav { display: none; }

/* Lernmodus */
.lernmodus { position: fixed; inset: 0; z-index: 80; background: #fff; display: flex; flex-direction: column; }
.lm-kopf { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 22px; border-bottom: 1px solid var(--linie); flex-wrap: wrap; }
.lm-titel h2 { margin: 6px 0 2px; font-size: 22px; }
.lm-titel p { margin: 0; }
.lm-steuer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lm-uhr { font-family: var(--kopf); font-size: 34px; font-weight: 600; color: var(--gruen-tief); min-width: 110px; text-align: center; font-variant-numeric: tabular-nums; }
.lm-uhr.gross { font-size: 56px; margin: 6px 0 14px; }
.lm-uhr.fertig { color: var(--warm); }
.lm-inhalt { flex: 1; display: grid; grid-template-columns: 300px 1fr; min-height: 0; }
.lm-seite { border-right: 1px solid var(--linie); padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; background: var(--flaeche); }
.lm-eintrag { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; background: none; border: 0; padding: 4px 0; cursor: pointer; font-weight: 700; }
.lm-eintrag svg { width: 18px; height: 18px; stroke: var(--gruen-tief); flex: none; margin-top: 2px; }
.lm-eintrag small { display: block; font-weight: 600; color: var(--leise); font-size: 12px; }
.lm-viewer { min-height: 0; overflow: auto; display: flex; align-items: stretch; justify-content: center; }
.lm-hinweis { margin: auto; text-align: center; color: var(--leise); padding: 20px; }
.lm-hinweis svg { margin: 0 auto 8px; display: block; }
.lm-video, .lm-pdf { width: 100%; height: 100%; border: 0; }
.lm-bild { max-width: 100%; max-height: 100%; object-fit: contain; margin: auto; }
.lm-notiz-rahmen { width: 100%; max-width: 860px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.lm-notiz { flex: 1; min-height: 50vh; }
.klein-ablage { padding: 14px; margin: 0; font-size: 13.5px; }
.klein-ablage svg { width: 22px; height: 22px; stroke: var(--leise); }
.lm-pause { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px;
  background: radial-gradient(900px 500px at 50% 100%, #eef6ea 0, #fff 70%); }
.pause-bild img { max-width: min(420px, 80vw); border-radius: 24px; }
.pause-vorschlag { font-size: 19px; max-width: 520px; }
@media (max-width: 860px) {
  .lm-inhalt { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .lm-seite { border-right: 0; border-bottom: 1px solid var(--linie); max-height: 36vh; }
  .lm-uhr { font-size: 26px; min-width: 80px; }
  .lm-kopf { padding: 10px 14px; }
}

/* Deck-Baum */
.deck-wahl { display: flex; flex-direction: column; gap: 8px; }
.deck-baum { max-height: 340px; overflow-y: auto; border: 1px solid var(--linie); border-radius: 14px; padding: 6px; }
.deck-zeile { display: flex; align-items: center; gap: 4px; padding: 3px 4px; border-radius: 10px; }
.deck-zeile:hover { background: var(--flaeche); }
.deck-zeile.vorschlag { background: #fbf6ea; }
.deck-pfeil { width: 24px; height: 24px; border: 0; background: none; cursor: pointer; color: var(--leise); flex: none; font-size: 13px; }
.deck-pfeil.leer { cursor: default; }
.deck-label { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; cursor: pointer; }
.deck-label > span { min-width: 0; }
.deck-kurz { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deck-label small { display: block; color: var(--leise); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deck-zahl { font-size: 12px; color: var(--leise); flex: none; }
.deck-chips .chip { padding-right: 4px; }
.chip-x { border: 0; background: none; cursor: pointer; color: inherit; font-size: 14px; line-height: 1; padding: 0 4px; }
.deck-vorschlag { background: #fbf6ea; border-radius: 12px; padding: 6px 10px; justify-content: space-between; }

/* Symbole ohne eigene Regel bekommen Textgroesse; ohne das blaeht ein SVG mit viewBox sich auf die volle Breite auf.
   :where() haelt die Spezifitaet bei null, damit alle gezielten Regeln (Knopf, Navigation usw.) weiter gelten. */
:where(svg.ico) { width: 1.2em; height: 1.2em; flex: none; vertical-align: -0.22em; stroke: currentColor; }
:where(h1, h2, h3) > svg.ico { margin-right: 8px; }

/* Phasen-Zeitleiste */
.zeitleiste { margin: 6px 0 4px; }
.zeitleiste { overflow-x: clip; }
.zl-leiste { position: relative; height: 22px; background: var(--flaeche); border-radius: 999px; margin: 20px 18px 6px 4px; }
.zl-seg { position: absolute; top: 0; bottom: 0; border-radius: 999px; overflow: hidden; border: 2px solid #fff; box-sizing: border-box; }
.zl-seg.erarbeiten { background: #e1f0da; } .zl-seg.altklausuren { background: #c4e1b6; } .zl-seg.wiederholen { background: #a6cf95; }
.zl-seg i { position: absolute; inset: 0 auto 0 0; background: rgba(77, 138, 74, .55); display: block; }
.zl-seg.aktuell { box-shadow: 0 0 0 2px var(--gruen-tief); }
.zl-seg.vorbei { opacity: .55; }
.zl-punkt { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #fff; border: 3px solid var(--warm); z-index: 2; }
.zl-punkt.vorbei { border-color: var(--leise); }
.zl-heute { position: absolute; top: -8px; bottom: -8px; width: 2px; margin-left: -1px; background: var(--text); border-radius: 2px; z-index: 3; }
.zl-heute::after { content: "heute"; position: absolute; top: -16px; left: 4px; font-size: 11px; font-weight: 800; color: var(--text); }
.zl-fahne { position: absolute; right: 14px; top: -14px; width: 3px; height: 36px; background: var(--gruen-tief); border-radius: 2px; }
.zl-fahne::after { content: ""; position: absolute; left: 3px; top: 0; border-left: 14px solid var(--gruen-tief); border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.zl-text { position: relative; height: 38px; margin: 0 18px 0 4px; }
.zl-lab { position: absolute; top: 0; font-size: 12.5px; line-height: 1.25; padding-left: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.zl-lab b { display: block; font-family: var(--kopf); font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.zl-lab span { color: var(--leise); }
.zl-lab.aktuell b { color: var(--gruen-tief); }
.zl-lab.klausur { right: 0; text-align: right; background: #fff; padding-left: 6px; }
.zl-legende { display: none; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--leise); }
.zl-legende i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.zl-legende .erarbeiten i { background: #c9e3bd; } .zl-legende .altklausuren i { background: #a9d39c; } .zl-legende .wiederholen i { background: #86bd73; }
.zl-legende .karten i { background: #fff; border: 2px solid var(--warm); } .zl-legende .klausur i { background: var(--gruen-tief); border-radius: 2px; }
.zl-legende .aktuell { color: var(--text); font-weight: 800; }
@media (max-width: 860px) { .zl-text { display: none; } .zl-legende { display: flex; } }
.status-zeile { margin: 4px 0 6px; gap: 14px; }
.chip.gross { font-size: 14px; padding: 6px 14px; }
.kennzahl-klein { color: var(--leise); font-size: 14px; }
.kennzahl-klein b { font-family: var(--kopf); font-size: 20px; color: var(--text); margin-right: 2px; }
.aktuelle-phase { margin-top: 14px; border-top: 1px solid var(--linie); padding-top: 12px; }
.phase-satz { margin: 4px 0 8px; font-size: 15.5px; }
.naechster-schritt { background: var(--flaeche); border-radius: 14px; padding: 10px 12px; margin-top: 10px; }
.kuenftig { margin-top: 10px; } .kuenftig summary { cursor: pointer; color: var(--leise); font-weight: 700; }
.grund { font-size: 12px; color: var(--leise); margin-top: 2px; }

/* Karten lernen */
.karten-lernen { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.kl-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.kl-deck { font-weight: 800; color: var(--leise); font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.kl-zaehler { display: flex; gap: 12px; font-family: var(--kopf); font-weight: 600; font-size: 18px; }
.kl-zaehler .neu { color: #3d6fa8; } .kl-zaehler .lernen { color: #c0573f; } .kl-zaehler .faellig { color: var(--gruen-tief); }
.kl-karte { width: 100%; min-height: 220px; border: 1px solid var(--linie); border-radius: 20px; background: #fff; box-shadow: var(--schatten); }
.kl-unten { display: flex; justify-content: center; position: sticky; bottom: 12px; }
.kl-zeigen { width: min(420px, 100%); }
.kl-taste { font-size: 11px; opacity: .65; margin-left: 8px; font-weight: 700; }
.kl-bewerten { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; }
.kl-b { flex-direction: column; gap: 2px; min-height: 64px; border-radius: 18px; white-space: normal; }
.kl-iv { font-size: 12px; font-weight: 700; color: var(--leise); }
.kl-b1 { background: #fbece8; border-color: #f2d3cb; } .kl-b2 { background: #fbf3e2; border-color: #f0e2c2; }
.kl-b3 { background: var(--gruen-hell); border-color: #cfe5c6; } .kl-b4 { background: #e7f0fa; border-color: #cddff2; }
.kl-status { text-align: center; padding: 30px 10px; }
.kl-status svg { margin: 0 auto 8px; display: block; }
@media (max-width: 860px) { .kl-b { min-height: 72px; font-size: 15px; } .kl-zeigen { min-height: 60px; } }
.mat .txt { overflow-wrap: anywhere; min-width: 0; } .lm-eintrag span { overflow-wrap: anywhere; min-width: 0; }

/* Begleiter */
.begleiter { position: fixed; right: 18px; bottom: 88px; z-index: 26; display: flex; flex-direction: column; align-items: flex-end; }
.begleiter-figur { width: 72px; height: 64px; border: 0; background: none; cursor: pointer; padding: 0; animation: schweben 4.5s ease-in-out infinite; filter: drop-shadow(0 6px 10px rgba(60,100,55,.18)); }
.begleiter-figur svg { width: 72px; height: auto; transform-origin: 50% 90%; animation: atmen 3.6s ease-in-out infinite; }
.begleiter-figur[data-zustand="denkt"] svg { animation: atmen 1.2s ease-in-out infinite; }
.begleiter-figur[data-zustand="jubel"] { animation: huepfen .6s ease-in-out 4; }
.begleiter-figur[data-zustand="schlaf"] { animation: schweben 7s ease-in-out infinite; opacity: .85; }
.begleiter-klein { position: absolute; top: -6px; right: -4px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--linie); background: #fff; font-size: 13px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .2s; color: var(--leise); }
.begleiter:hover .begleiter-klein, .begleiter.minimiert .begleiter-klein { opacity: 1; }
.begleiter.minimiert .begleiter-figur { width: 40px; height: 36px; opacity: .7; animation: none; }
.begleiter.minimiert .begleiter-figur svg { width: 40px; animation: none; }
@keyframes schweben { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes atmen { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.03, .97); } }
@keyframes huepfen { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-16px); } }
@media (prefers-reduced-motion: reduce) { .begleiter-figur, .begleiter-figur svg { animation: none !important; } }
body.lm-offen .begleiter { bottom: 18px; right: 10px; opacity: .55; z-index: 85; }
body.lm-offen .begleiter-figur svg { width: 44px; } body.lm-offen .begleiter-figur { width: 46px; height: 40px; }
.begleiter-panel { position: fixed; right: 18px; bottom: 18px; width: min(420px, calc(100vw - 32px)); height: min(640px, calc(100vh - 36px)); z-index: 88;
  background: #fff; border-radius: 24px; box-shadow: 0 20px 60px rgba(40,60,40,.22); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--linie); }
.begl-kopf { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--linie); }
.begl-kopf b { flex: 1; font-family: var(--kopf); font-size: 18px; }
.begl-liste { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.begl-n { max-width: 88%; }
.begl-n.ich { align-self: flex-end; }
.begl-n .begl-text { white-space: pre-wrap; padding: 9px 12px; border-radius: 16px; background: var(--flaeche); line-height: 1.45; overflow-wrap: anywhere; }
.begl-n.ich .begl-text { background: var(--gruen-hell); }
.begl-n.denkt .begl-text { color: var(--leise); font-style: italic; }
.begl-bild { max-width: 220px; max-height: 180px; border-radius: 12px; display: block; margin-bottom: 4px; }
.begl-vorschlag { margin-top: 6px; border: 1px solid #d6e9cf; background: #f6fbf3; border-radius: 14px; padding: 9px 11px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.begl-vorschlag .knopf { align-self: flex-start; }
.begl-leer { color: var(--leise); font-size: 14px; }
.begl-chips { display: flex; gap: 6px; overflow-x: auto; padding: 0 12px 8px; scrollbar-width: none; }
.begl-chips .chip { cursor: pointer; border: 0; flex: none; }
.begl-eingabe { display: flex; align-items: flex-end; gap: 6px; padding: 10px; border-top: 1px solid var(--linie); }
.begl-eingabe textarea { min-height: 40px; resize: none; padding: 9px 11px; }
.knopf.aufnahme { color: #c0573f; background: #fbece8; }
@media (max-width: 860px) {
  .begleiter { bottom: 150px; right: 12px; }
  .begleiter-panel { right: 0; left: 0; bottom: 0; width: 100%; height: min(78vh, 640px); border-radius: 24px 24px 0 0; }
}
.chip.pille { margin: 0 0 4px; font-size: 11.5px; padding: 2px 9px; display: inline-flex; }
.mat .txt .mat-titel { display: block; }
.lm-gruppe .abschnitt-titel { margin: 10px 0 2px; }
.vorrechen-schalter { font-weight: 700; font-size: 14px; background: #fbf6ea; padding: 8px 10px; border-radius: 12px; }
.selbstcheck { display: flex; flex-direction: column; gap: 6px; }
.aktiv-anschluss { max-width: 520px; background: var(--gruen-hell); border-radius: 14px; padding: 10px 14px; }
.stapel-saeule { width: 100%; max-width: 42px; display: flex; flex-direction: column; border-radius: 10px 10px 4px 4px; overflow: hidden; min-height: 3px; }
.stapel-saeule i { display: block; min-height: 0; border-radius: 0; }
.stapel-saeule i.aktiv, .legende-quadrat.aktiv { background: var(--gruen); }
.stapel-saeule i.passiv, .legende-quadrat.passiv { background: #cfe3c5; }
.legende-quadrat { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.zahlen.gross { font-size: 15px; gap: 18px; } .zahlen.gross b { font-family: var(--kopf); font-size: 22px; }
.zuordnung .url { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.energie { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.eingang-karte { display: flex; flex-direction: column; gap: 4px; }
.auswahl-leiste { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 10px; background: var(--flaeche); border-radius: 14px; margin-bottom: 10px; position: sticky; top: 8px; z-index: 3; }
.auswahl-karte { position: relative; display: block; border-radius: 16px; }
.auswahl-karte input { position: absolute; top: 8px; left: 8px; z-index: 2; width: 20px; height: 20px; }
.auswahl-karte.an .mat { border-color: var(--gruen-tief); box-shadow: 0 0 0 2px var(--gruen-tief); }
.reihen-liste { padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
.reihen-liste li { display: flex; align-items: center; gap: 8px; }
.reihen-liste img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.reihen-liste span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seiten-vorschau { display: flex; gap: 8px; overflow-x: auto; padding: 6px 0 10px; }
.seiten-vorschau img { height: 200px; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.12); background: #fff; }
.seiten-editor { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.seite-kachel { background: var(--flaeche); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.seite-kachel img { width: 100%; border-radius: 6px; background: #fff; transition: transform .2s; }
.seite-kachel.weg { opacity: .35; }
.begl-anhaenge { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-end; }
.begl-anhaenge img { width: 22px; height: 22px; object-fit: cover; border-radius: 5px; }
.begleiter-panel.ueber { box-shadow: 0 0 0 3px var(--gruen) inset, 0 20px 60px rgba(40,60,40,.22); }
@media (max-width: 860px) {
  .heute-kopf .zeile:first-child { flex-wrap: nowrap; }
  .heute-kopf .zeile:first-child .leise { font-size: 13.5px; white-space: nowrap; }
  .karte.leer svg.mochi { width: 90px; height: auto; }
  .leer { padding: 16px 10px; }
}

/* Stundenplan: mehr Luft, Text in Eintraegen sauber gekuerzt, auf schmalen Fenstern waagrecht scrollen */
.woche-rahmen { overflow-x: auto; }
.woche { min-width: 980px; }
.woche .kopf { white-space: nowrap; }
.woche .ev { box-sizing: border-box; display: flex; flex-direction: column; gap: 1px; box-shadow: 0 1px 2px rgba(30, 50, 30, .06); }
.woche .ev .ev-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--leise); font-size: 12px; }
.woche .ev.lernblock .ev-text { -webkit-line-clamp: 2; line-clamp: 2; }
.begl-kopf-mitte { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.begl-titel { border: 0; background: none; font-family: var(--kopf); font-weight: 600; font-size: 16px; text-align: left; cursor: pointer; padding: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.begl-pillen { display: flex; gap: 4px; flex-wrap: wrap; }
.begl-chats { border-bottom: 1px solid var(--linie); padding: 8px 12px; max-height: 50%; overflow-y: auto; }
.begl-chats .zeile input[type=search] { flex: 1; min-height: 34px; padding: 6px 10px; }
.begl-chat-eintrag { flex: 1; min-width: 0; text-align: left; border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; padding: 4px 0; }
.begl-chat-eintrag b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.begl-chat-eintrag small { color: var(--leise); }
.begl-n { position: relative; }
.begl-n .begl-menue-knopf { position: absolute; top: 0; right: -30px; opacity: .3; min-height: 26px; padding: 2px 4px; }
.begl-n.ich .begl-menue-knopf { right: auto; left: -30px; }
.begl-n:hover .begl-menue-knopf, .begl-n:focus-within .begl-menue-knopf { opacity: 1; }
@media (hover: none) { .begl-n .begl-menue-knopf { opacity: .7; } }
.begl-menue { position: absolute; z-index: 5; top: 26px; right: 0; background: #fff; border: 1px solid var(--linie); border-radius: 12px; box-shadow: var(--schatten); display: flex; flex-direction: column; min-width: 180px; overflow: hidden; }
.begl-n.ich .begl-menue { right: auto; left: 0; }
.begl-menue button { border: 0; background: none; text-align: left; padding: 9px 12px; cursor: pointer; font-weight: 600; }
.begl-menue button:hover { background: var(--flaeche); }
.begl-chats li { position: relative; }
.begl-n.fehler .begl-text { background: #fbf3e2; }
.begl-liste { padding: 12px 40px; }
@media (max-width: 860px) { .begl-liste { padding: 12px 34px; } }
.tag-knopf { cursor: pointer; } .tag-knopf:hover { background: var(--gruen-hell); }
.thema-raster { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; } @media (max-width: 860px) { .thema-raster { grid-template-columns: 1fr; } }

/* ---------- Rueckmeldung und Bewegung */
.lade-balken { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--gruen); z-index: 99; opacity: 0; pointer-events: none; }
.lade-balken.laeuft { opacity: 1; width: 70%; transition: width 1.2s cubic-bezier(.1,.7,.3,1); }
.lade-balken.fertig { opacity: 0; width: 100%; transition: width .2s ease, opacity .3s ease .15s; }
.seite-ein { animation: seiteEin .22s ease-out; }
@keyframes seiteEin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.skelett .sk { background: linear-gradient(90deg, var(--flaeche-2) 25%, #f6f9f3 50%, var(--flaeche-2) 75%); background-size: 200% 100%; animation: schimmer 1.2s linear infinite; border-radius: 10px; }
.skelett .sk-titel { height: 30px; width: 40%; margin-bottom: 22px; }
.skelett .sk-zeile { height: 14px; margin: 14px 0; } .skelett .sk-zeile.kurz { width: 55%; height: 20px; }
@keyframes schimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.knopf { transition: background .15s, transform .12s, box-shadow .15s; }
.knopf:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(60,100,55,.10); }
.knopf:active { transform: translateY(0) scale(.98); box-shadow: none; }
.knopf.laedt { position: relative; color: transparent !important; pointer-events: none; }
.knopf.laedt::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  border: 2px solid var(--gruen); border-right-color: transparent; animation: drehen .7s linear infinite; }
.knopf.haupt.laedt::after { border-color: #fff; border-right-color: transparent; }
.knopf.ok { animation: okPuls .5s ease; }
@keyframes okPuls { 0% { box-shadow: 0 0 0 0 rgba(125,184,122,.6); } 100% { box-shadow: 0 0 0 10px rgba(125,184,122,0); } }
@keyframes drehen { to { transform: rotate(360deg); } }
.karte { transition: box-shadow .2s, transform .2s, border-color .2s; }
a.karte:hover, .modulkarte:hover, .mat:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(60,90,55,.06), 0 12px 28px rgba(60,90,55,.10); }
.mat { transition: transform .18s, box-shadow .18s, border-color .18s; }
.toast { animation: toastEin .22s ease-out; }
.toast.geht { animation: toastAus .2s ease-in forwards; }
@keyframes toastEin { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toastAus { to { opacity: 0; transform: translate(-50%, 8px); } }
.haken-knopf { transition: background .18s, border-color .18s, transform .18s; }
.haken-knopf.an { animation: hakenPop .3s ease; }
@keyframes hakenPop { 0% { transform: scale(.7); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
.ablage, .ablage-schleier > div { transition: background .15s, border-color .15s, transform .15s; }
.ablage.ueber { transform: scale(1.01); box-shadow: 0 0 0 4px var(--gruen-hell); }
.schleier { animation: blendeEin .18s ease-out; } .dialog { animation: dialogEin .2s ease-out; }
@keyframes blendeEin { from { opacity: 0; } } @keyframes dialogEin { from { opacity: 0; transform: translateY(10px) scale(.98); } }
details > *:not(summary) { animation: blendeEin .2s ease-out; }
.konfetti { position: fixed; inset: 0; pointer-events: none; z-index: 97; overflow: hidden; }
.konfetti i { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 10px 0 10px 0; opacity: .9; animation: fallen 1.4s ease-in forwards; }
@keyframes fallen { to { top: 105%; transform: rotate(540deg) translateX(30px); opacity: .2; } }
/* Chat */
.begl-n.mochi.denkt .begl-text { display: inline-flex; gap: 5px; align-items: center; }
.begl-n.mochi.denkt .begl-text::before { content: ""; }
.punkte { display: inline-flex; gap: 4px; } .punkte i { width: 7px; height: 7px; border-radius: 50%; background: var(--gruen); animation: huepf 1s infinite ease-in-out; display: block; }
.punkte i:nth-child(2) { animation-delay: .15s; } .punkte i:nth-child(3) { animation-delay: .3s; }
@keyframes huepf { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-5px); opacity: 1; } }
.begl-n.strom .begl-text::after { content: ""; display: inline-block; width: 7px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: var(--gruen-tief); animation: blinken .9s steps(2) infinite; }
@keyframes blinken { 50% { opacity: 0; } }
.begl-n { animation: blendeEin .2s ease-out; }
.chip .prozent { font-variant-numeric: tabular-nums; }
/* Mikrofon */
.knopf.aufnahme { animation: mikroPuls 1.2s ease-in-out infinite; }
@keyframes mikroPuls { 0%, 100% { box-shadow: 0 0 0 0 rgba(192,87,63,.35); } 50% { box-shadow: 0 0 0 8px rgba(192,87,63,0); } }
.pegel { display: flex; align-items: center; gap: 2px; height: 26px; padding: 0 8px; }
.pegel i { width: 3px; background: #c0573f; border-radius: 2px; display: block; min-height: 3px; transition: height .08s; }
.pegel-zeit { font-variant-numeric: tabular-nums; color: var(--leise); font-size: 13px; }
.verstehen { color: var(--leise); font-size: 13.5px; display: inline-flex; gap: 6px; align-items: center; }
/* Anki im Browser */
.kl-karte { transition: opacity .18s, transform .25s; }
.kl-karte.dreht { opacity: .2; transform: rotateX(70deg); }
.kl-fortschritt { height: 5px; background: var(--flaeche-2); border-radius: 999px; overflow: hidden; }
.kl-fortschritt span { display: block; height: 100%; background: var(--gruen); transition: width .3s ease; }
.kl-blitz { animation: blitz .35s ease; } @keyframes blitz { 0% { filter: brightness(1.15); transform: scale(1.03); } 100% { filter: none; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .knopf:hover, a.karte:hover, .modulkarte:hover, .mat:hover { transform: none; }
}
.begl-anhang-leiste { display: flex; gap: 8px; overflow-x: auto; padding: 6px 12px; }
.begl-kacheln { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin-bottom: 4px; }
.anhang-kachel { position: relative; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--linie); border-radius: 12px; padding: 6px 26px 6px 6px; min-width: 150px; max-width: 220px; flex: none; }
.anhang-kachel img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; }
.anhang-symbol { width: 40px; height: 40px; border-radius: 8px; background: var(--gruen-hell); display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--gruen-tief); font-size: 9px; font-weight: 800; }
.anhang-symbol svg { width: 18px; height: 18px; }
.anhang-text { min-width: 0; display: flex; flex-direction: column; }
.anhang-text b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.anhang-text small { color: var(--leise); font-size: 11.5px; }
.anhang-kachel .chip-x { position: absolute; top: 4px; right: 4px; }
.anhang-balken { position: absolute; left: 6px; right: 6px; bottom: 3px; height: 3px; background: var(--flaeche-2); border-radius: 3px; overflow: hidden; }
.anhang-balken span { display: block; height: 100%; background: var(--gruen); transition: width .2s; }
.begl-schritte { font-size: 12.5px; color: var(--leise); margin-bottom: 4px; }
.begl-schritte .aktiv::after { content: " …"; } .begl-schritte .fertig { color: var(--gruen-tief); }
.begl-kosten { font-size: 11px; color: var(--leise); margin-top: 3px; }
.begl-modell { width: auto; min-height: 34px; padding: 4px 6px; font-size: 12.5px; flex: none; max-width: 120px; }
.begleiter-panel.gross { left: 236px; right: 0; top: 0; bottom: 0; width: auto; height: auto; border-radius: 0; border: 0; border-left: 1px solid var(--linie);
  display: grid; grid-template-columns: 300px 1fr; grid-template-rows: auto 1fr auto auto auto; }
.begleiter-panel.gross .begl-kopf { grid-column: 1 / -1; }
.begleiter-panel.gross .begl-chats { grid-column: 1; grid-row: 2 / 6; max-height: none; border-bottom: 0; border-right: 1px solid var(--linie); display: block !important; }
.begleiter-panel.gross .begl-liste, .begleiter-panel.gross .begl-chips, .begleiter-panel.gross .begl-anhang-leiste, .begleiter-panel.gross .begl-eingabe { grid-column: 2; }
.begleiter-panel.gross .begl-liste { padding: 20px max(40px, calc((100% - 820px) / 2)); }
@media (max-width: 860px) { .nur-breit { display: none; } .begleiter-panel.gross { left: 0; grid-template-columns: 1fr; } .begleiter-panel.gross .begl-chats { display: none !important; } }
