/* deinlehrmaterial.de – Stil. Schriften liegen lokal (keine Verbindung zu Google). */
@font-face { font-family: "Baloo 2"; src: url("fonts/baloo-2-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Baloo 2"; src: url("fonts/baloo-2-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Andika"; src: url("fonts/andika-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Andika"; src: url("fonts/andika-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light;
  --papier: #FFFFFF;
  --karo-grund: #F4F7FB;
  --karo-linie: #DCE5EF;
  --tinte: #1B2A3A;
  --tinte-weich: #4B5C6E;
  --blau: #2747B8;        /* Königsblau wie Füllertinte: Knöpfe und Links */
  --blau-dunkel: #1B348F;
  --rot: #D9473F;         /* Heftrand */
  --gelb: #FFE066;        /* Textmarker: zeigt, was sich geändert hat */
  --rand: 2px solid var(--tinte);
  --titel: "Baloo 2", "Arial Rounded MT Bold", system-ui, sans-serif;
  --text: "Andika", "Segoe UI", system-ui, sans-serif;
  --mass: 1.2rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--tinte);
  background-color: var(--karo-grund);
  background-image:
    linear-gradient(var(--karo-linie) 1px, transparent 1px),
    linear-gradient(90deg, var(--karo-linie) 1px, transparent 1px);
  background-size: 24px 24px;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--blau); text-underline-offset: .18em; }
a:hover { color: var(--blau-dunkel); }
:focus-visible { outline: 3px solid var(--blau); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--titel); font-weight: 800; line-height: 1.08; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.3rem; font-weight: 600; line-height: 1.25; }
p { margin: 0 0 1em; }
.huelle { width: min(1160px, 100% - 32px); margin-inline: auto; }
.schmal { max-width: 62ch; }
.leise { color: var(--tinte-weich); }
.nur-vorlesen { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Kopf */
.kopf { padding: 18px 0; }
.kopf .huelle { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--tinte); font-family: var(--titel); font-size: 1.45rem; line-height: 1; }
.logo:hover { color: var(--tinte); }
.logo img { width: 34px; height: 34px; }
.logo b { font-weight: 800; }
.logo span { font-weight: 600; }
.logo .wort { display: inline; }
.kopf nav a { font-weight: 700; text-decoration: none; }

/* Knöpfe */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 800 1.12rem/1 var(--titel); padding: .85em 1.3em .75em;
  color: #FFF; background: var(--blau); border: var(--rand); border-radius: 14px;
  box-shadow: 0 4px 0 var(--tinte); text-decoration: none; cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease;
}
.knopf:hover { color: #FFF; background: var(--blau-dunkel); }
.knopf:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--tinte); }
.knopf.hell { background: var(--papier); color: var(--tinte); }
.knopf.hell:hover { background: #EEF2FA; color: var(--tinte); }

/* Bühne: Text, Regler und das Blatt */
.buehne { padding: 28px 0 72px; }
.buehne .huelle { display: grid; gap: 28px; grid-template-columns: 1fr; }
.buehne-text p.einstieg { font-size: 1.22rem; max-width: 34ch; }
.buehne-text .aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 22px; }
.start-hinweis { margin-top: 18px; font-size: .98rem; color: var(--tinte-weich); }
@media (min-width: 940px) {
  .buehne .huelle { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); grid-template-areas: "text blatt" "regler blatt"; column-gap: 56px; align-items: start; }
  .buehne-text { grid-area: text; padding-top: 24px; }
  .regler { grid-area: regler; margin-bottom: 190px; }
  .buehne { padding-bottom: 0; }
  .blatt-ort { grid-area: blatt; position: sticky; top: 24px; }
}

.regler { background: var(--papier); border: var(--rand); border-radius: 18px; padding: 20px 20px 22px; box-shadow: 6px 6px 0 var(--karo-linie); }
.regler h2 { font-size: 1.35rem; font-weight: 600; margin-bottom: .7em; }
.regler fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.regler legend, .regler label.feldname { display: block; font-weight: 700; font-size: .95rem; margin-bottom: 6px; }
.tierwahl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tierwahl label { position: relative; cursor: pointer; }
.tierwahl input { position: absolute; opacity: 0; inset: 0; }
.tierwahl .kachel { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 6px; border: 2px solid var(--karo-linie); border-radius: 12px; background: var(--papier); font-size: .86rem; font-weight: 700; text-align: center; }
.tierwahl .kachel svg { width: 46px; height: 48px; }
.tierwahl input:checked + .kachel { border-color: var(--tinte); background: #FFF8D6; box-shadow: 0 3px 0 var(--tinte); }
.tierwahl input:focus-visible + .kachel { outline: 3px solid var(--blau); outline-offset: 2px; }
.felder { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.felder .breit { grid-column: 1 / -1; }
input[type="text"], input[type="email"], select, textarea {
  width: 100%; font: inherit; color: var(--tinte); padding: 10px 12px; background: var(--papier);
  border: 2px solid #B9C6D4; border-radius: 10px;
}
input[type="text"]:focus, input[type="email"]:focus, select:focus, textarea:focus { border-color: var(--blau); outline: none; box-shadow: 0 0 0 3px rgba(39, 71, 184, .18); }
.regler .klein { font-size: .9rem; color: var(--tinte-weich); margin: 14px 0 0; }

/* Das Arbeitsblatt */

.blatt {
  position: relative; background: var(--papier); border: 1.5px solid #C9D3DE; border-radius: 6px;
  padding: 26px 26px 22px 44px; box-shadow: 0 1px 0 #C9D3DE, 0 18px 40px -22px rgba(27, 42, 58, .45);
  transform: rotate(-1.2deg); font-family: var(--text); color: #222;
}
.blatt::before { content: ""; position: absolute; top: 0; bottom: 0; left: 28px; border-left: 2px solid var(--rot); opacity: .75; }
.blatt-kopf { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: end; font-size: .92rem; border-bottom: 2px solid #222; padding-bottom: 10px; }
.blatt-kopf .linie { display: inline-block; width: 7.5em; border-bottom: 1.5px solid #222; margin-left: 4px; }
.blatt-klasse { font-weight: 700; }
.blatt-titel { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 6px; }
.blatt-titel h3 { font-family: var(--titel); font-weight: 800; font-size: 1.7rem; margin: 0; line-height: 1.05; }
.blatt-titel small { display: block; font-family: var(--text); font-weight: 700; font-size: .9rem; color: #555; margin-top: 4px; }
.maskottchen { width: 108px; flex: none; }
.maskottchen svg { width: 108px; height: 113px; }
.blase { position: relative; display: inline-block; font-family: var(--titel); font-weight: 600; font-size: 1.12rem; line-height: 1.2; background: #FFF; border: 2px solid #222; border-radius: 16px; padding: 8px 14px 6px; margin: 2px 0 14px; }
.blase::after { content: ""; position: absolute; right: 22px; top: -11px; width: 18px; height: 18px; background: #FFF; border-left: 2px solid #222; border-top: 2px solid #222; transform: rotate(45deg); }
.aufgabe { display: grid; grid-template-columns: 28px 1fr; gap: 10px; margin: 0 0 16px; font-size: .98rem; line-height: 1.45; }
.aufgabe .nr { width: 28px; height: 28px; border: 2px solid #222; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.aufgabe p { margin: 0 0 8px; }
.ankreuzen { display: flex; gap: 22px; font-weight: 700; }
.ankreuzen span::before { content: ""; display: inline-block; width: 16px; height: 16px; border: 2px solid #222; border-radius: 3px; vertical-align: -3px; margin-right: 6px; }
.vergleiche { display: flex; flex-wrap: wrap; gap: 8px 18px; font-weight: 700; font-size: 1.08rem; }
.vergleiche span { white-space: nowrap; }
.vergleiche i { display: inline-block; width: 26px; height: 26px; border: 2px solid #222; border-radius: 6px; vertical-align: middle; margin: 0 6px; }
.schreiblinie { height: 26px; border-bottom: 1.5px solid #222; }
.blatt-fuss { display: flex; align-items: center; justify-content: flex-end; gap: 10px; border-top: 1.5px dashed #999; padding-top: 10px; font-size: .9rem; font-weight: 700; }
.stempel { width: 48px; height: 48px; border: 2px solid #222; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: #FFF; }
.stempel svg { width: 40px; height: 42px; }
[data-feld] { border-radius: 3px; transition: background-color .9s ease; }
[data-feld].neu { background-color: var(--gelb); transition: none; }
.maskottchen.neu svg { animation: ploppen .35s ease-out; }
@keyframes ploppen { 0% { transform: scale(.6); } 70% { transform: scale(1.08); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .maskottchen.neu svg { animation: none; } [data-feld] { transition: none; } }
.blatt-notiz { margin: 18px 0 0; text-align: center; font-size: .92rem; color: var(--tinte-weich); }

/* Abschnitte */
.abschnitt { padding: 72px 0; }
.abschnitt.papier { background: var(--papier); border-top: var(--rand); border-bottom: var(--rand); }
.kopfzeile { max-width: 60ch; margin-bottom: 36px; }

/* Ablauf wie im Heft: Rand mit Nummern in Rot */
.heft { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: schritt; max-width: 820px; }
.heft li { counter-increment: schritt; position: relative; display: grid; grid-template-columns: 64px 1fr; padding: 22px 0 18px; border-bottom: 1.5px solid #BCD0E6; }
.heft li:first-child { border-top: 1.5px solid #BCD0E6; }
.heft li::before { content: counter(schritt); font: 800 2.2rem/1 var(--titel); color: var(--rot); border-right: 2px solid var(--rot); padding-right: 16px; margin-right: 22px; text-align: right; align-self: stretch; }
.heft h3 { margin-bottom: .25em; }
.heft p { margin: 0; color: var(--tinte-weich); max-width: 58ch; }

/* Kuno */
.kuno { display: grid; gap: 28px; align-items: center; }
@media (min-width: 820px) { .kuno { grid-template-columns: 260px 1fr; gap: 48px; } }
.kuno-bild { width: 170px; margin-inline: auto; }
@media (min-width: 820px) { .kuno-bild { width: 230px; } }
.kuno .aktionen { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }

/* Warteliste */
.warteliste { display: grid; gap: 32px; }
@media (min-width: 900px) { .warteliste { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: start; } }
.formular { background: var(--papier); border: var(--rand); border-radius: 18px; padding: 24px; box-shadow: 8px 8px 0 var(--blau); }
.formular .feld { margin-bottom: 16px; }
.formular label.feldname, .formular legend { display: block; font-weight: 700; margin-bottom: 6px; }
.formular fieldset { border: 0; margin: 0 0 16px; padding: 0; }
.optionen { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.optionen label, .zustimmung { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.optionen input, .zustimmung input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--blau); flex: none; }
.zustimmung { font-size: .95rem; margin: 6px 0 18px; }
.pflicht { color: var(--rot); }
.honig { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.meldung { border: var(--rand); border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; background: #FFF8D6; }
.meldung.fehler { background: #FDECEA; }

/* Fragen */
.fragen { max-width: 760px; }
.fragen details { border-bottom: 1.5px solid #BCD0E6; padding: 4px 0; }
.fragen details:first-child { border-top: 1.5px solid #BCD0E6; }
.fragen summary { cursor: pointer; list-style: none; font: 600 1.2rem/1.3 var(--titel); padding: 14px 40px 12px 0; position: relative; }
.fragen summary::-webkit-details-marker { display: none; }
.fragen summary::after { content: "+"; position: absolute; right: 6px; top: 8px; font: 800 1.7rem/1 var(--titel); color: var(--blau); }
.fragen details[open] summary::after { content: "–"; }
.fragen details p { margin: 0 0 16px; max-width: 62ch; color: var(--tinte-weich); }

/* Fuß */
.fuss { padding: 36px 0 48px; font-size: .95rem; }
.fuss .huelle { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; }
.fuss nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* Rechtstexte */
.rechtstext { background: var(--papier); border: var(--rand); border-radius: 18px; padding: clamp(20px, 4vw, 44px); margin: 12px auto 56px; max-width: 820px; }
.rechtstext h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); }
.rechtstext h2 { font-size: 1.45rem; margin-top: 1.6em; }
.rechtstext h3 { font-size: 1.15rem; margin-top: 1.2em; }
.rechtstext p, .rechtstext li { max-width: 68ch; }
.rechtstext address { font-style: normal; }
