/* KidsLearningPro — Grundlagen: Schriften, Farbmarken, Gerüst (D-012, 2026-10-07)
   Drei Welten teilen dieselben Bauteile; welten.css setzt nur die Marken um (html[data-welt]).
   Alles wird selbst ausgeliefert — keine fremde Schrift, kein CDN (CORE Block 1, CSP font-src 'self'). */

@font-face {
    font-family: "Lexend";
    src: url("/static/fonts/Lexend.ttf") format("truetype");
    font-weight: 100 900;
    font-display: swap;
}
@font-face {
    font-family: "Fredoka";
    src: url("/static/fonts/Fredoka.ttf") format("truetype");
    font-weight: 300 700;
    font-display: swap;
}

/* Grundmarken = Welt „Studio" (ab Klasse 5); Entdecker und Nacht überschreiben in welten.css */
:root {
    --grund: #F6F7FB;
    --flaeche: #FFFFFF;
    --flaeche-tief: #EEF0F7;
    --rand: #DDE1EC;
    --tinte: #1D2433;
    --tinte-leise: #5B6476;
    --akzent: #5B5BD6;
    --akzent-tief: #4343B8;
    --akzent-hell: #E8E8FB;
    --gut: #1F9D55;
    --gut-hell: #DDF5E7;
    --falsch: #D6334C;
    --falsch-hell: #FBE3E7;
    --gold: #F5A524;
    --gold-hell: #FFF1D6;

    --antwort-1: #E5484D;   /* Dreieck */
    --antwort-2: #2F7DF6;   /* Raute  */
    --antwort-3: #E59A0B;   /* Kreis  */
    --antwort-4: #1F9D55;   /* Quadrat */
    --antwort-5: #8E4EC6;   /* Stern  */

    --schrift-titel: "Lexend", system-ui, sans-serif;
    --schrift-text: "Lexend", system-ui, sans-serif;
    --text-groesse: 17px;
    --zeilen: 1.6;
    --ziel: 48px;              /* kleinste Tippfläche */
    --radius: 14px;
    --radius-klein: 10px;
    --schatten: 0 1px 2px rgba(29, 36, 51, .06), 0 4px 16px rgba(29, 36, 51, .06);
    --sockel: 0 3px 0 rgba(29, 36, 51, .10);
    --bewegung: 180ms;
    --rail: 96px;
    --unten: 72px;
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
/* `hidden` muss gewinnen — sonst schlägt jedes `display:` eines Bauteils die Browser-Vorgabe
   (gesehen 07.10.: „Weiter →" stand vor der Antwort schon da) */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--grund);
    color: var(--tinte);
    font-family: var(--schrift-text);
    font-size: var(--text-groesse);
    line-height: var(--zeilen);
    -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { font-family: var(--schrift-titel); line-height: 1.2; margin: 0; text-wrap: balance; }
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.3rem; font-weight: 650; }
h3 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0; }
a { color: var(--akzent-tief); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--akzent); outline-offset: 3px; border-radius: 6px; }
.leise { color: var(--tinte-leise); }
.zahl { font-variant-numeric: tabular-nums; }

/* ---------- Gerüst: Leiste links (Tablet quer), unten (schmal) ---------- */
.geruest { min-height: 100vh; }
.leiste {
    position: fixed; z-index: 20; display: flex; gap: 4px;
    background: var(--flaeche); border-color: var(--rand);
}
.leiste a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: var(--ziel); padding: 8px 4px; border-radius: var(--radius-klein);
    color: var(--tinte-leise); text-decoration: none; font-size: .78rem; font-weight: 600;
}
.leiste a .symbol { font-size: 1.5rem; line-height: 1; }
.leiste a.aktiv { color: var(--akzent-tief); background: var(--akzent-hell); }
.inhalt { padding: 24px clamp(16px, 4vw, 48px) 40px; max-width: 1100px; margin: 0 auto; }

@media (min-width: 900px) {
    .leiste { inset: 0 auto 0 0; width: var(--rail); flex-direction: column; padding: 16px 8px;
              border-right: 1px solid var(--rand); }
    .leiste .marke { font-family: var(--schrift-titel); font-weight: 700; text-align: center;
                     font-size: 1.6rem; margin-bottom: 12px; }
    .haupt { margin-left: var(--rail); }
}
@media (max-width: 899px) {
    .leiste { inset: auto 0 0 0; height: var(--unten); padding: 6px 8px; border-top: 1px solid var(--rand);
              justify-content: space-around; }
    .leiste .marke { display: none; }
    .leiste a { flex: 1; }
    .haupt { padding-bottom: var(--unten); }
}

.kopf { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.kopf h1 { flex: 1; min-width: 12ch; }
.kopf-rechts { display: flex; align-items: center; gap: 12px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important;
                             transition-duration: 1ms !important; scroll-behavior: auto !important; }
}

/* Kein Netz (api.js, 09.10.): Meldung über allem — sonst blieben die Seiten nur leer. */
#offline-hinweis { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center;
                   justify-content: center; padding: 16px; background: rgba(29, 36, 51, .6); }
#offline-hinweis .offline-karte { max-width: 360px; padding: 24px 28px; border-radius: 18px; text-align: center;
                                  background: var(--flaeche, #fff); color: var(--tinte, #1D2433); }
#offline-hinweis .offline-zeichen { font-size: 48px; line-height: 1; }
#offline-hinweis p { margin: 14px 0 18px; font-size: 20px; font-weight: 600; }
#offline-hinweis button { min-height: 48px; padding: 0 22px; border: 0; border-radius: 12px; font: inherit;
                          font-weight: 600; color: #fff; background: var(--akzent, #5B5BD6); cursor: pointer; }
