:root {
  --bg: #f7f5f0;
  --text: #1f2a2e;
  --text2: #4b5a5f;
  --muted: #7a878b;
  --accent: #2f6f6a;
  --accent-soft: #e3efed;
  --border: #d9d5cc;
  --surface: #ffffff;
  --fehler: #a33a2a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main, footer { max-width: 680px; margin: 0 auto; padding-inline: 20px; }
main { padding-block: 56px 32px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 13px; color: var(--muted); margin: 0; }
h1 { font-size: clamp(34px, 7vw, 52px); line-height: 1.1; margin: 10px 0 14px; }
h1 em { font-style: italic; color: var(--accent); }
.meta { color: var(--text2); margin: 0; }
h2 { font-size: 26px; line-height: 1.25; margin: 56px 0 14px; }
p { margin: 0 0 14px; }
a { color: var(--accent); }
.kasten { background: var(--accent-soft); border-radius: 10px; padding: 16px 18px; margin: 20px 0; }
.kasten strong { display: block; margin-bottom: 4px; }
dl.liste { margin: 16px 0; }
dl.liste dt { font-weight: 600; }
dl.liste dd { margin: 0 0 12px; color: var(--text2); }
ol.ablauf { padding-left: 22px; color: var(--text2); }
ol.ablauf li { margin-bottom: 8px; }
details { border-top: 1px solid var(--border); padding: 12px 0; }
details:last-of-type { border-bottom: 1px solid var(--border); }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 8px 0 0; color: var(--text2); }

/* Formular */
.form-grid { display: grid; gap: 20px; margin-top: 20px; }
.feld { display: grid; gap: 6px; }
.feld label { font-weight: 600; }
.noetig { color: var(--muted); font-weight: 400; }
.hinweis { color: var(--muted); font-size: 14px; }
input[type=text], input[type=email], select {
  font: inherit; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface); color: var(--text); width: 100%;
}
input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.wahl-gruppe { font-weight: 600; margin: 8px 0 -8px; }
.wahl { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; }
.wahl input { margin-top: 5px; width: 18px; height: 18px; flex: none; }
.wahl-text { display: block; }
.wahl-desc { display: block; color: var(--muted); font-size: 14px; }
.wahl-gesperrt { opacity: .45; cursor: not-allowed; }
.form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
button[type=submit] {
  font: inherit; font-weight: 600; padding: 12px 26px; border: 0; border-radius: 999px;
  background: var(--accent); color: #fff; cursor: pointer;
}
button[disabled] { opacity: .6; cursor: default; }
.form-status { margin: 0; padding: 12px 14px; border-radius: 8px; }
.form-status-ok { background: var(--accent-soft); }
.form-status-fehler { background: #f6e1dd; color: var(--fehler); }
.form-status-laeuft { color: var(--muted); }

footer { padding-block: 32px 48px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--border); }
footer a { color: var(--muted); margin-right: 16px; }
.recht h2 { font-size: 20px; margin-top: 32px; }

/* Seminar: Kartentypen */
ul.typen { list-style: none; padding: 0; margin: 0; }
ul.typen li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
ul.typen .zahl { color: var(--muted); font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #172022; --text: #e8ecea; --text2: #c2cbc8; --muted: #8f9b98;
    --accent: #6fb5ad; --accent-soft: #22383a; --border: #2e3b3d; --surface: #1e292b; --fehler: #f0a090;
  }
  .form-status-fehler { background: #3a2420; }
}

/* Seminar: Lernen */
.knopf {
  font: inherit; font-weight: 600; padding: 12px 26px; border: 0; border-radius: 999px;
  background: var(--accent); color: #fff; cursor: pointer;
}
.leise { font: inherit; font-size: 15px; background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; }
.lernkopf { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; }
ul.typen li.spaeter { color: var(--muted); }
.karte { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px 18px; margin-bottom: 20px; }
.karte .aufgabe { font-weight: 700; font-size: 20px; margin: 0; }
.karte .hinweis { margin: 2px 0 14px; }
.karte .frage { margin: 0 0 16px; }
.gitter { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.kachel {
  font: inherit; font-size: 15px; font-weight: 600; line-height: 1.35; text-align: center;
  padding: 10px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg); color: var(--text);
  cursor: pointer; overflow-wrap: break-word; hyphens: manual;
}
.kachel.gewaehlt { border: 2px solid var(--accent); }
.kachel.gefunden { cursor: default; opacity: .9; border-width: 2px; }
.kachel.falsch { border: 2px solid var(--fehler); animation: wackeln .2s ease-in-out; }
@keyframes wackeln { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .kachel.falsch { animation: none; } }
.geschafft { font-weight: 700; margin: 16px 0 0; }
/* Paarfarben wie die App (Blau, Grün, Orange, Lila, Cyan, Rot-Orange, Gelb-Grün) */
.farbe-0 { --f: hsl(209 75% 50%); } .farbe-1 { --f: hsl(126 50% 38%); } .farbe-2 { --f: hsl(36 90% 45%); }
.farbe-3 { --f: hsl(281 55% 55%); } .farbe-4 { --f: hsl(187 70% 38%); } .farbe-5 { --f: hsl(18 80% 50%); }
.farbe-6 { --f: hsl(76 60% 38%); }
.kachel.gefunden { border-color: var(--f); color: var(--f); background: color-mix(in srgb, var(--f) 13%, var(--bg)); }

/* Lernseite im Tablet-Rahmen, nur auf großen Bildschirmen. Am Handy bleibt alles wie oben. */
@media (min-width: 900px) and (min-height: 640px) {
  body.lernseite {
    --buehne: #e6e1d6;
    min-height: 100vh; display: flex; flex-direction: column; align-items: center;
    background: radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--buehne) 60%, #fff), var(--buehne));
  }
  .tablet {
    position: relative; margin: 32px auto 0; padding: 18px; border-radius: 46px;
    background: linear-gradient(145deg, #2a3033, #111415 55%);
    box-shadow: 0 0 0 1.5px #3a4245, 0 40px 80px -30px rgba(20, 30, 32, .55), 0 12px 24px -12px rgba(20, 30, 32, .35);
  }
  .tablet::before {
    content: ""; position: absolute; top: 7px; left: 50%; width: 6px; height: 6px; border-radius: 50%;
    transform: translateX(-50%); background: #2f383b; box-shadow: inset 0 0 0 1.5px #1b2022;
  }
  .bildschirm {
    width: 640px; height: min(900px, calc(100vh - 140px)); overflow-y: auto; overscroll-behavior: contain;
    border-radius: 30px; background: var(--bg); scrollbar-width: thin;
  }
  .bildschirm main { max-width: none; padding: 34px 32px 28px; }
  .bildschirm h1 { font-size: 38px; }
  .bildschirm h2 { font-size: 22px; margin-top: 36px; }
  body.lernseite footer { border-top: 0; padding-block: 14px 20px; text-align: center; }
  body.lernseite footer a { margin: 0 8px; }
}
@media (min-width: 900px) and (min-height: 640px) and (prefers-color-scheme: dark) {
  body.lernseite { --buehne: #0d1314; }
  .tablet { background: linear-gradient(145deg, #353d40, #0b0e0f 55%); box-shadow: 0 0 0 1.5px #4a5357, 0 40px 80px -30px rgba(0, 0, 0, .8); }
}
