@import url("../fonts/fonts.css");

/* Stillarbeit App · gleiche Farbwelt wie Planer und Website, gebaut fürs iPad (große Tippflächen) */
:root {
  --paper: #F3F1EC; --paper-2: #ECE7DE; --card: #FBFAF7; --ink: #25302B; --muted: #5E6A64; --line: #DED8CD;
  --sage: #7C9A88; --sage-deep: #4D6A5A; --sage-soft: #DDE7E0; --clay: #C6A27E; --clay-soft: #F1E6DA; --rot: #A2543F; --rot-soft: #F6E1DA;
  --display: "Cormorant Garamond", Georgia, serif; --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 18px 40px -24px rgba(37, 48, 43, .4);
  --feld: #fff; --leiste: rgba(243, 241, 236, .94);
  color-scheme: light;
}
/* Dunkel: abends am Schreibtisch. Automatisch nach Gerät oder fest über Einstellungen → Darstellung */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1B211E; --paper-2: #222A26; --card: #252E2A; --ink: #E8EAE6; --muted: #A7B2AB; --line: #3A4540;
    --sage: #8FAE9B; --sage-deep: #6E9480; --sage-soft: #2F3F36; --clay-soft: #3B3128; --rot: #E0907A; --rot-soft: #43302A;
    --feld: #1F2723; --leiste: rgba(27, 33, 30, .94); --shadow: 0 18px 40px -24px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1B211E; --paper-2: #222A26; --card: #252E2A; --ink: #E8EAE6; --muted: #A7B2AB; --line: #3A4540;
  --sage: #8FAE9B; --sage-deep: #6E9480; --sage-soft: #2F3F36; --clay-soft: #3B3128; --rot: #E0907A; --rot-soft: #43302A;
  --feld: #1F2723; --leiste: rgba(27, 33, 30, .94); --shadow: 0 18px 40px -24px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--body); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-size: 1.6rem; }
:focus-visible { outline: 2px solid var(--sage-deep); outline-offset: 2px; }

/* Kopf */
.leiste { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; padding: 10px max(16px, env(safe-area-inset-left)); padding-top: max(10px, env(safe-area-inset-top)); background: var(--leiste); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.marke { display: flex; align-items: baseline; gap: 6px; text-decoration: none; }
.marke b { font: 600 1.5rem/1 var(--display); }
.marke span { font-size: .78rem; font-weight: 600; color: #fff; background: var(--sage-deep); padding: 2px 7px; border-radius: 999px; }
#pfad { flex: 1; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
#pfad a { text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 500; color: var(--muted); white-space: nowrap; }
#pfad a[aria-current="page"] { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.zahnrad { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--muted); }
.zahnrad:hover { background: var(--card); }
@media (max-width: 600px) { .leiste { flex-wrap: wrap; row-gap: 4px; justify-content: space-between; } #pfad { order: 3; flex-basis: 100%; margin: 0 -6px; } #pfad:empty { display: none; } #pfad a { padding: 7px 12px; } }
.test-hinweis { background: var(--clay-soft); color: var(--ink); text-align: center; padding: 8px 16px; font-size: .92rem; }
.test-hinweis a { font-weight: 600; }

main { max-width: 1200px; margin: 0 auto; padding: 22px max(16px, env(safe-area-inset-left)) 120px; }
.kopf { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 20px; }
.kopf p { color: var(--muted); margin: 6px 0 0; }
.werkzeuge { display: flex; flex-wrap: wrap; gap: 8px; }

/* Knöpfe */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.knopf:hover { border-color: var(--sage); }
.knopf.haupt { background: var(--sage-deep); border-color: var(--sage-deep); color: #fff; }
.knopf.haupt:hover { background: #435D4F; }
.knopf.klein { min-height: 38px; padding: 0 14px; font-size: .9rem; }
.knopf.gefahr { color: var(--rot); }
.knopf:disabled { opacity: .5; cursor: default; }

/* Karten */
.karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.karte { display: grid; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; text-decoration: none; box-shadow: var(--shadow); }
.karte h2 { font-size: 1.7rem; }
.karte .klein { color: var(--muted); font-size: .9rem; }
.karte.neu { border-style: dashed; box-shadow: none; place-content: center; text-align: center; color: var(--sage-deep); font-weight: 600; cursor: pointer; min-height: 132px; background: transparent; }
.leer { background: var(--card); border: 1px dashed var(--line); border-radius: 18px; padding: 28px; text-align: center; color: var(--muted); }

/* Stunde: Schülerkacheln */
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.kachel { position: relative; display: grid; gap: 6px; align-content: start; min-height: 92px; padding: 14px; background: var(--card); border: 1.5px solid var(--line); border-radius: 16px; text-align: left; cursor: pointer; transition: transform .1s, border-color .15s; }
.kachel:active { transform: scale(.98); }
.kachel b { font-size: 1.05rem; }
.kachel .marken { display: flex; flex-wrap: wrap; gap: 4px; }
.kachel.fehlt { opacity: .5; }
.kachel.gezogen { border-color: var(--sage-deep); box-shadow: 0 0 0 4px var(--sage-soft); animation: puls 1s ease 2; }
@keyframes puls { 50% { transform: scale(1.04); } }
.marke-note { font-size: .82rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--sage-soft); color: var(--sage-deep); }
.marke-vermerk { font-size: .78rem; padding: 2px 8px; border-radius: 999px; background: var(--rot-soft); color: var(--rot); }

/* Notentabelle */
.tabelle-rahmen { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
table.noten { border-collapse: collapse; width: 100%; min-width: 560px; font-variant-numeric: tabular-nums; }
.noten th, .noten td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.noten th:first-child, .noten td:first-child { text-align: left; position: sticky; left: 0; background: var(--card); z-index: 1; }
.noten thead th { font-size: .82rem; color: var(--muted); font-weight: 600; vertical-align: bottom; }
.noten thead th button { all: unset; cursor: pointer; display: grid; gap: 2px; text-align: center; }
.noten thead th small { display: block; font-weight: 400; }
.noten td input { width: 58px; min-height: 40px; text-align: center; border: 1.5px solid transparent; border-radius: 10px; background: var(--paper); }
.noten td input:focus { outline: none; border-color: var(--sage-deep); background: var(--feld); }
.noten td input.falsch { border-color: var(--rot); background: var(--rot-soft); }
.noten .summe { background: color-mix(in srgb, var(--sage-soft) 45%, transparent); font-weight: 600; }
.noten .vorschlag { font-weight: 800; font-size: 1.05rem; color: var(--sage-deep); font-variant-numeric: lining-nums; }
.noten tfoot td { color: var(--muted); font-size: .85rem; border-bottom: 0; }
.noten button.zelle { all: unset; cursor: pointer; padding: 6px 10px; border-radius: 10px; }
.noten button.zelle:hover { background: var(--paper); }
.noten tfoot small { display: block; font-size: .75rem; }
.noten .schwach { color: var(--rot); }
.noten td.vorschlag.schwach { color: var(--rot); }
.noten tfoot td.schwach { background: var(--rot-soft); }
.korrektur td input { width: 52px; }
.noten td input[readonly] { cursor: default; color: var(--muted); }

/* Klassenarbeit mit Punkten */
.haken { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--paper); cursor: pointer; }
.haken input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: var(--sage-deep); }
.haken span { display: grid; gap: 2px; font-weight: 600; }
.haken small { font-weight: 400; color: var(--muted); }
.spiegel { display: grid; gap: 6px; }
.spiegel-zeile { display: grid; grid-template-columns: 34px 1fr 28px; gap: 10px; align-items: center; font-variant-numeric: lining-nums tabular-nums; }
.spiegel-zeile span { font-weight: 600; text-align: right; }
.spiegel-zeile i { height: 14px; border-radius: 7px; background: var(--sage); transform-origin: left; transform: scaleX(max(var(--anteil), .02)); }
.spiegel-zeile b { text-align: right; }
.box p.warnung { color: var(--rot); background: var(--rot-soft); padding: 10px 12px; border-radius: 12px; }
.schluessel { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 18px; max-height: 50vh; overflow: auto; }
.schluessel-zeile { display: grid; grid-template-columns: 34px auto 64px 1fr; gap: 8px; align-items: center; font-variant-numeric: lining-nums tabular-nums; font-size: .9rem; color: var(--muted); }
.schluessel-zeile b { color: var(--ink); text-align: right; }
.schluessel-zeile input { min-height: 38px; text-align: center; border: 1.5px solid var(--line); border-radius: 10px; background: var(--feld); color: var(--ink); font: inherit; }
.schluessel-zeile input[readonly] { opacity: .6; }
.hinweis { color: var(--muted); font-size: .88rem; margin-top: 12px; }

/* Sitzplan */
.sitzplan-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 18px; align-items: start; }
@media (max-width: 820px) { .sitzplan-wrap { grid-template-columns: 1fr; } }
.raum { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; overflow-x: auto; }
.tafel { text-align: center; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom: 3px solid var(--sage); padding-bottom: 6px; margin: 0 20% 16px; }
.plaetze { display: grid; gap: 8px; min-width: 480px; }
.platz { min-height: 64px; border-radius: 12px; border: 1.5px dashed var(--line); background: var(--paper); cursor: pointer; padding: 6px; font-size: .9rem; font-weight: 600; text-align: center; }
.platz.besetzt { border-style: solid; background: var(--feld); }
.platz.markiert, .offen button.markiert { border-color: var(--sage-deep); box-shadow: 0 0 0 3px var(--sage-soft); }
.offen { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: grid; gap: 6px; }
.offen h3 { font-family: var(--body); font-size: .9rem; color: var(--muted); }
.offen button { min-height: 40px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--feld); cursor: pointer; font-weight: 500; }

/* Schülerliste */
.liste { display: grid; gap: 8px; }
.zeile { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px 10px 8px 16px; }
.zeile input { flex: 1; width: 0; min-width: 0; min-height: 40px; border: 0; background: transparent; font-weight: 500; }
.zeile input:focus { outline: none; }
.feld { display: grid; gap: 6px; font-size: .9rem; font-weight: 600; }
.feld input, .feld select, .feld textarea { font-weight: 400; min-height: 46px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--feld); }
.feld textarea { min-height: 140px; resize: vertical; }
.feld small { font-weight: 400; color: var(--muted); }
.raster2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 14px; }
.raster-einstellungen { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); align-items: start; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: grid; gap: 12px; align-content: start; }
.box h2 { font-size: 1.4rem; }
.box p { margin: 0; color: var(--muted); }

/* Fenster (Bottom-Sheet auf dem Handy) */
.fenster { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border: 0; border-radius: 22px; padding: 0; background: var(--card); color: var(--ink); box-shadow: 0 40px 90px -30px rgba(37, 48, 43, .55); }
.fenster::backdrop { background: rgba(37, 48, 43, .4); }
.fenster form, .fenster > div { padding: 22px; display: grid; gap: 14px; }
.fenster .reihe { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
@media (max-width: 600px) { .fenster { margin: auto auto 0; width: 100vw; max-width: 100vw; border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom); } }
.tasten { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 8px; }
.tasten button { min-height: 58px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--feld); font-weight: 700; font-size: 1.25rem; font-variant-numeric: lining-nums; color: var(--ink); cursor: pointer; }
.tasten button:active { background: var(--sage-soft); }
.tasten button:disabled { opacity: .3; cursor: default; }
.tendenz { display: flex; gap: 8px; }
.tendenz button { flex: 1; min-height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--feld); font-weight: 600; cursor: pointer; }
.tendenz button[aria-pressed="true"] { background: var(--sage-deep); border-color: var(--sage-deep); color: #fff; }
.vermerke { display: flex; flex-wrap: wrap; gap: 8px; }
.eintraege { display: grid; gap: 6px; }
.eintrag { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 6px 6px 12px; background: var(--paper); border-radius: 10px; font-size: .92rem; }
.eintrag button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 1.3rem; cursor: pointer; }
.gruppen { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gruppe { background: var(--paper); border-radius: 12px; padding: 12px; }
.gruppe b { display: block; margin-bottom: 4px; color: var(--sage-deep); }

.meldung { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translate(-50%, calc(100% + 40px)); visibility: hidden; background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 999px; font-size: .92rem; transition: transform .25s ease, visibility .25s; z-index: 30; display: flex; gap: 14px; align-items: center; }
.meldung.zeigen { transform: translate(-50%, 0); visibility: visible; }
.meldung button { background: none; border: 0; color: var(--sage-soft); font-weight: 700; cursor: pointer; }

/* Kauf: Zustimmung zum vorzeitigen Erlöschen des Widerrufsrechts */
.zustimmung { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; line-height: 1.45; color: var(--muted); padding: 10px 12px; border-radius: 12px; border: 1.5px solid transparent; }
.zustimmung input { width: 20px; height: 20px; flex: none; margin-top: 1px; accent-color: var(--sage-deep); }
.zustimmung.warn { border-color: var(--rot); background: var(--rot-soft); }
.knopf[aria-disabled="true"] { opacity: .5; }

/* Profil */
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-bottom: 18px; }
.kennzahl { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: grid; gap: 2px; }
.kennzahl b { font-size: 1.5rem; font-variant-numeric: lining-nums tabular-nums; }
.kennzahl span { font-size: .82rem; color: var(--muted); }
.liste-tabelle { width: 100%; border-collapse: collapse; font-size: .92rem; margin-bottom: 14px; }
.liste-tabelle td { padding: 8px 6px; border-bottom: 1px solid var(--line); }
.liste-tabelle td:first-child { color: var(--muted); white-space: nowrap; width: 1%; }
.liste-tabelle .note { text-align: right; font-weight: 700; }
.name-link { color: inherit; text-decoration: none; font-weight: 600; }
.name-link:hover { text-decoration: underline; }
.hinweis-box { margin-bottom: 18px; border-color: var(--sage-deep); }

/* Drucken (auch „Als PDF sichern“): nur Inhalt, ohne Knöpfe und Leiste */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; }
  .leiste, .test-hinweis, .werkzeuge, .meldung, .hinweis, .nur-bildschirm, .fenster { display: none !important; }
  main { padding: 0; max-width: none; }
  .tabelle-rahmen, .box, .kennzahl { box-shadow: none; overflow: visible; break-inside: avoid; }
  table.noten input { border: 0; background: none; }
  table.noten td.summe, table.noten th { background: none !important; }
  .name-link { text-decoration: none; }
  textarea { border: 0; resize: none; padding: 0; min-height: 0; }
}

/* Synchronisierung */
.sync-code { display: inline-block; font: 600 1rem/1.4 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; background: var(--sage-soft); color: var(--sage-deep); padding: 4px 10px; border-radius: 8px; word-break: break-all; }
#sync-form input { min-height: 44px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 12px; font: inherit; text-transform: uppercase; }

/* Umschalter (Halbjahr, Ansicht, Darstellung) */
.umschalter { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--paper-2); border-radius: 999px; margin-bottom: 16px; }
.umschalter button, .umschalter label { border: 0; background: none; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: .9rem; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.umschalter input { position: absolute; opacity: 0; pointer-events: none; }
.umschalter button[aria-pressed="true"], .umschalter label:has(input:checked) { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.umschalter label:has(input:focus-visible) { outline: 2px solid var(--sage-deep); }
.klein-grau { font-size: .85rem; color: var(--muted); }
.eingabe { min-height: 46px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--feld); }

/* Heute auf der Startseite */
.heute { display: grid; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-bottom: 18px; box-shadow: var(--shadow); text-decoration: none; }
.heute-kopf { display: flex; justify-content: space-between; align-items: baseline; }
.heute-kopf b, .heute > b { font: 600 1.5rem/1.1 var(--display); }
.heute-kopf a { font-size: .9rem; color: var(--muted); }
.heute.leer-plan { border-style: dashed; box-shadow: none; }
.heute.leer-plan span, .heute > span { color: var(--muted); }
.heute-zeile { display: grid; grid-template-columns: 92px auto 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; text-decoration: none; border: 1.5px solid transparent; }
.heute-zeile:hover { background: var(--paper); }
.heute-zeile .zeit { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.heute-zeile b { font-size: 1.1rem; }
.heute-zeile .fach { color: var(--muted); }
.heute-zeile .status { font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--sage-soft); color: var(--sage-deep); }
.heute-zeile.jetzt { border-color: var(--sage-deep); background: var(--sage-soft); }
.heute-zeile.jetzt .status { background: var(--sage-deep); color: #fff; }
.heute-zeile.vorbei { opacity: .5; }
@media (max-width: 520px) { .heute-zeile { grid-template-columns: 70px 1fr auto; } .heute-zeile .fach { display: none; } }

/* Stundenplan */
table.plan { width: 100%; border-collapse: collapse; min-width: 560px; }
table.plan th { padding: 10px 6px; font-size: .85rem; color: var(--muted); font-weight: 600; }
table.plan th.std { text-align: left; white-space: nowrap; padding-left: 14px; }
table.plan th.std b { display: block; color: var(--ink); font-size: 1rem; }
table.plan th.std small { font-weight: 400; }
table.plan td { padding: 4px; border-top: 1px solid var(--line); }
.plan-feld { width: 100%; min-height: 58px; border-radius: 12px; border: 1.5px dashed var(--line); background: none; cursor: pointer; display: grid; place-content: center; gap: 2px; color: var(--muted); padding: 6px; }
.plan-feld.belegt { border-style: solid; background: var(--sage-soft); color: var(--ink); border-color: transparent; }
.plan-feld small { font-size: .78rem; color: var(--muted); }
.zeiten { display: grid; gap: 8px; max-height: 50vh; overflow-y: auto; }
.zeit-zeile { display: flex; align-items: center; gap: 8px; }
.zeit-zeile b { width: 28px; }
.zeit-zeile input { min-height: 42px; padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--feld); }

/* Stunde: Thema, Hausaufgabe, Sitzplan-Ansicht */
.stundenkopf { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px 6px; margin-bottom: 16px; }
.stundenkopf .letzte { margin: 0 0 10px; font-size: .92rem; color: var(--muted); }
.stundenkopf .letzte b { color: var(--ink); }
.ansicht-wahl { margin-bottom: 12px; }
.stunde-raum { margin-bottom: 14px; overflow-x: auto; }
.stunde-raum .plaetze { gap: 8px; }
.stunde-raum .kachel { min-height: 76px; padding: 10px; }
.platz-leer { min-height: 76px; border-radius: 16px; border: 1.5px dashed var(--line); opacity: .5; }
.zwischen { font: 600 1.2rem var(--display); margin: 6px 0 10px; }

/* Verlauf */
table.verlauf { width: 100%; border-collapse: collapse; }
table.verlauf th { text-align: left; padding: 10px 12px; font-size: .85rem; color: var(--muted); }
table.verlauf td { padding: 6px 8px; border-top: 1px solid var(--line); vertical-align: middle; }
table.verlauf td.datum { white-space: nowrap; padding-left: 14px; font-weight: 600; width: 1%; }
table.verlauf td.zahl { white-space: nowrap; font-size: .85rem; color: var(--muted); width: 1%; text-align: right; padding-right: 14px; }
table.verlauf input { width: 100%; min-width: 140px; min-height: 40px; border: 1.5px solid transparent; border-radius: 10px; background: transparent; padding: 6px 10px; }
table.verlauf input:hover { border-color: var(--line); }
table.verlauf input:focus { outline: none; border-color: var(--sage-deep); background: var(--feld); }
.rot { color: var(--rot); }
@media print { .umschalter, .ansicht-wahl { display: none !important; } table.verlauf input, .plan-feld { border: 0 !important; } }

/* Werkzeuge: Timer und Geräuschampel als Vollbild-Ebene */
.buehne { position: fixed; inset: 0; z-index: 50; background: var(--paper); display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) 20px 24px; overflow: auto; }
.buehne-zu { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 16px; width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.timer-wahl, .timer-lauf, .ampel { width: min(720px, 100%); display: grid; gap: 18px; justify-items: center; text-align: center; }
.timer-wahl h2 { font-size: clamp(2rem, 5vw, 3rem); margin: 0; }
.timer-wahl p { margin: 0; color: var(--muted); }
.timer-vorgaben { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; }
.timer-vorgaben button { display: grid; gap: 2px; padding: 18px 8px; border-radius: 20px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: 600 2rem/1 var(--body); font-variant-numeric: lining-nums; cursor: pointer; }
.timer-vorgaben button:hover { border-color: var(--sage-deep); }
.timer-vorgaben small { font-size: .85rem; font-weight: 400; color: var(--muted); }
.timer-eigen { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; }
.timer-eigen label, .timer-text { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: .95rem; }
.timer-text { flex-direction: column; width: 100%; }
.timer-eigen input, .timer-text input { min-height: 46px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--feld); color: var(--ink); font: inherit; }
.timer-eigen input { width: 90px; text-align: center; }
.timer-text input { width: 100%; }
.timer-titel { margin: 0; font: 600 1.1rem var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.timer-aufgabe { margin: 0; font-size: clamp(1.3rem, 3.4vw, 2.2rem); font-weight: 600; max-width: 26ch; }
.timer-ring { position: relative; width: min(64vh, 82vw, 520px); aspect-ratio: 1; display: grid; place-items: center; }
.timer-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.timer-ring circle { fill: none; stroke-width: 10; }
.ring-grund { stroke: var(--line); }
.ring-rest { stroke: var(--sage-deep); stroke-linecap: round; stroke-dasharray: 1000; transition: stroke-dashoffset .25s linear, stroke .4s; }
.timer-zeit { position: relative; font: 600 clamp(4rem, 15vmin, 9rem)/1 var(--body); font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.02em; }
.timer-knapp .ring-rest { stroke: var(--clay); }
.timer-fertig .ring-rest { stroke: var(--rot); }
.timer-fertig .timer-zeit { color: var(--rot); animation: puls 1.2s ease-in-out 3; }
@keyframes puls { 50% { transform: scale(1.06); } }
.timer-knoepfe { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.ampel-licht { display: grid; gap: 14px; padding: 18px; border-radius: 40px; background: #26302B; }
.ampel-licht i { display: block; width: min(22vh, 150px); aspect-ratio: 1; border-radius: 50%; opacity: .16; transition: opacity .3s, box-shadow .3s; }
.ampel-licht .rot { background: #E0533D; } .ampel-licht .gelb { background: #F2B53A; } .ampel-licht .gruen { background: #4FB477; }
.ampel[data-stufe] .ampel-licht i { opacity: .16; }
.buehne[data-stufe="rot"] .rot, .buehne[data-stufe="gelb"] .gelb, .buehne[data-stufe="gruen"] .gruen { opacity: 1; box-shadow: 0 0 60px currentColor; }
.buehne[data-stufe="rot"] .rot { color: #E0533D; } .buehne[data-stufe="gelb"] .gelb { color: #F2B53A; } .buehne[data-stufe="gruen"] .gruen { color: #4FB477; }
.ampel-text { margin: 0; font: 600 clamp(1.6rem, 5vw, 2.8rem)/1.2 var(--body); }
.ampel-pegel { position: relative; width: min(480px, 100%); height: 14px; border-radius: 7px; background: var(--line); overflow: hidden; }
.ampel-pegel i { position: absolute; inset: 0; background: var(--sage-deep); transform-origin: left; transform: scaleX(0); }
.ampel-pegel b { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ink); opacity: .5; }
.ampel-pegel .g1 { left: calc(var(--grenze-gelb, .45) * 100%); } .ampel-pegel .g2 { left: calc(var(--grenze-rot, .6) * 100%); }
.ampel-regler { display: flex; gap: 12px; align-items: center; color: var(--muted); }
.ampel-regler input { width: 200px; accent-color: var(--sage-deep); }
.ampel-schutz { margin: 0; font-size: .85rem; color: var(--muted); max-width: 44ch; }
.ampel-aus .ampel-licht, .ampel-aus .ampel-pegel, .ampel-aus .ampel-regler { display: none; }
@media print { .buehne { display: none; } }

/* Freier Sitzplan: Raum mit Tischen in Raum-Einheiten (1000 breit), Schrift wächst mit dem Raum (--e gleicht breite Räume aus) */
.raum-rahmen { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px; overflow-x: auto; margin-bottom: 14px; }
.raum-tipp { display: none; margin: -6px 0 14px; text-align: center; }
@media (max-width: 760px) { .raum-tipp { display: block; } .sitzraum { min-width: 640px; } }
.sitzraum { position: relative; min-width: 720px; container-type: inline-size; background-image: radial-gradient(circle, color-mix(in srgb, var(--line) 80%, transparent) 1px, transparent 1.2px); background-size: 2.5% 3.4%; border-radius: 10px; }
.tafel-balken { position: absolute; left: 25%; right: 25%; top: 0; text-align: center; font-size: calc(1.1cqw * var(--e)); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-bottom: 4px solid var(--sage); padding-bottom: .3cqw; }
.sitzraum > * { box-sizing: border-box; }
.tisch, .sitzraum .pult, .stunde-sitz .kachel, .stunde-sitz .platz-leer { position: absolute; translate: -50% -50%; }
.tisch { rotate: var(--dreh, 0deg); display: grid; place-items: center; padding: 0; border-radius: calc(.9cqw * var(--e)); border: 1.5px dashed var(--line); background: var(--paper); cursor: pointer; color: var(--ink); font: 600 max(11px, calc(1.25cqw * var(--e))) / 1.1 var(--body); }
.tisch span { rotate: calc(-1 * var(--dreh, 0deg)); white-space: nowrap; pointer-events: none; }
.tisch.besetzt { border-style: solid; background: var(--feld); box-shadow: 0 2px 6px -3px rgba(0, 0, 0, .25); }
.tisch.pult, .sitzraum .pult { border: 1.5px solid var(--sage); background: var(--sage-soft); color: var(--sage-deep); font: 600 calc(1.05cqw * var(--e)) / 1 var(--body); display: grid; place-items: center; border-radius: calc(.9cqw * var(--e)); }
.tisch.markiert { border-color: var(--sage-deep); box-shadow: 0 0 0 3px var(--sage-soft); z-index: 2; }
.sitzraum.stellen .tisch { touch-action: none; cursor: grab; }
.sitzraum.stellen .tisch.zieht { cursor: grabbing; z-index: 3; box-shadow: 0 12px 24px -10px rgba(0, 0, 0, .4); }
.sitz-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.sitz-leiste .trenner { width: 1px; height: 26px; background: var(--line); margin: 0 4px; }
.sitz-leiste .gewaehlt { font-size: .9rem; }
.stunde-sitz .kachel { min-height: 0; padding: calc(.5cqw * var(--e)) calc(.7cqw * var(--e)); gap: calc(.3cqw * var(--e)); border-radius: calc(1cqw * var(--e)); overflow: hidden; }
.stunde-sitz .kachel b { font-size: calc(1.3cqw * var(--e)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stunde-sitz .kachel .marken { gap: calc(.25cqw * var(--e)); }
.stunde-sitz .kachel .marken span { font-size: calc(.95cqw * var(--e)); padding: 0 calc(.5cqw * var(--e)); }
.stunde-sitz .platz-leer { min-height: 0; border-radius: calc(1cqw * var(--e)); }

/* Vorlagen */
.vorlagen { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.vorlage { position: relative; display: grid; gap: 2px; padding: 10px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; background: var(--feld); }
.vorlage:has(input:checked) { border-color: var(--sage-deep); box-shadow: 0 0 0 3px var(--sage-soft); }
.vorlage input { position: absolute; opacity: 0; pointer-events: none; }
.vorlage svg { width: 100%; aspect-ratio: 4 / 3; margin-bottom: 6px; background: var(--paper); border-radius: 8px; }
.vorlage small { color: var(--muted); font-size: .8rem; line-height: 1.3; }
.v-tafel { fill: var(--sage); }
.v-tisch { fill: var(--card); stroke: var(--muted); stroke-width: 4; }
.v-pult { fill: var(--sage-soft); stroke: var(--sage); stroke-width: 4; }
.vorlage-weg { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--card); color: var(--muted); font-size: 1.2rem; cursor: pointer; }

/* Beobachtungen in der Stunde und im Profil */
.beobachtung { display: grid; gap: 8px; padding-top: 4px; border-top: 1px solid var(--line); }
.beobachtung h3 { font: 600 .9rem var(--body); color: var(--muted); padding-top: 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--feld); font-size: .88rem; font-weight: 600; color: var(--ink); cursor: pointer; }
span.tag { cursor: default; min-height: 30px; }
.tag.klein { min-height: 24px; padding: 0 8px; font-size: .78rem; }
.tag.gut { border-color: color-mix(in srgb, var(--sage) 60%, var(--line)); }
.tag.achtung { border-color: color-mix(in srgb, var(--clay) 70%, var(--line)); }
.tag.gut[aria-pressed="true"], span.tag.gut { background: var(--sage-soft); color: var(--sage-deep); }
.tag.achtung[aria-pressed="true"], span.tag.achtung { background: var(--clay-soft); color: #8E5236; }
.tag[aria-pressed="true"]::before { content: "✓"; }
.fenster .notiz-zeile { display: flex; gap: 8px; padding: 0; }
.notiz.zeile input { flex: 1; width: 0; min-width: 0; min-height: 40px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--feld); color: var(--ink); font: inherit; }
.marke-gut { font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--sage-soft); color: var(--sage-deep); }
.marke-achtung { font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--clay-soft); color: #8E5236; }
.marke-notiz { font-size: .8rem; color: var(--muted); }
.beob-box { margin-top: 14px; }
.beob-box .tags { margin-bottom: 6px; }
.beob-text { margin-top: 4px; color: var(--ink); }

/* Kaufseite (ohne Lizenz) */
.kauf { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(20px, 4vw, 48px); align-items: center; margin: 8px 0 24px; }
.kauf-text { display: grid; gap: 14px; }
.kauf h1 { font-size: clamp(2.2rem, 4.5vw, 3.2rem); }
.etikett { justify-self: start; padding: 4px 12px; border-radius: 999px; background: var(--sage-soft); color: var(--sage-deep); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.kauf-einleitung { color: var(--muted); font-size: 1.08rem; margin: 0; }
.kauf-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.kauf-liste li { position: relative; padding-left: 28px; }
.kauf-liste li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--sage-soft); color: var(--sage-deep); font-size: .75rem; font-weight: 800; display: grid; place-items: center; margin-top: 2px; }
.kauf-preis { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.kauf-preis b { font-size: 2.2rem; letter-spacing: -.02em; }
.kauf-preis span { color: var(--muted); font-size: .92rem; }
.knopf.gross { min-height: 56px; padding: 0 26px; font-size: 1.05rem; }
.kauf-bild { margin: 0; padding: 2%; border-radius: 26px; background: #0E1411; box-shadow: var(--shadow); }
.kauf-bild img { width: 100%; height: auto; display: block; border-radius: 16px; }
.kauf-bild figcaption { color: #A9B8B0; font-size: .8rem; text-align: center; padding-top: 8px; }
@media (max-width: 860px) { .kauf { grid-template-columns: 1fr; } .kauf-bild { order: -1; } }
@media print { .sitz-leiste, .umschalter, .raum-tipp { display: none !important; } .raum-rahmen { overflow: visible; border: 0; } .sitzraum { min-width: 0; } }

/* Startbildschirm-Anleitung */
.install-schritte { list-style: none; padding: 0; margin: 4px 0 12px; display: grid; gap: 10px; }
.install-schritte li { display: flex; align-items: center; gap: 12px; }
.install-symbol { flex: 0 0 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--card); border: 1px solid var(--line); color: #0A84FF; font-weight: 700; }
.install-wichtig { padding: 10px 12px; border-radius: 12px; background: var(--card); }
.einfuegen-box { margin-bottom: 18px; }
