/* Lern! – Grundstile der App (Schriften, Seitenrahmen, Hilfsklassen).
 * Bedienelemente kommen aus astryx (eigene Dateien); Farben und Formen je
 * Altersband setzt die App als CSS-Variablen auf <html> (lern-theme). */

@font-face { font-family: "Fredoka"; src: url("assets/fonts/Fredoka.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "LilitaOne"; src: url("assets/fonts/LilitaOne.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Righteous"; src: url("assets/fonts/Righteous.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Bungee"; src: url("assets/fonts/Bungee.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Audiowide"; src: url("assets/fonts/Audiowide.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Monoton"; src: url("assets/fonts/Monoton.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Orbitron"; src: url("assets/fonts/Orbitron.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Cinzel"; src: url("assets/fonts/Cinzel.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "BlowBrush"; src: url("assets/fonts/BlowBrush.woff2") format("woff2"); font-display: swap; }
/* Ersatzschriften: nur für → ★ ♥ bzw. Emoji (werden erst geladen, wenn ein Zeichen sie braucht) */
@font-face { font-family: "LernSymbole"; src: url("assets/fonts/LernSymbole.woff2") format("woff2"); font-display: swap; unicode-range: U+2192, U+2605, U+2665; }
/* Farb-Emoji (Noto, COLRv1) wie in der Flutter-App; Browser ohne COLRv1 (Safari) überspringen die Datei
   und zeigen die Emoji des Systems. */
@font-face { font-family: "LernEmoji"; src: url("assets/fonts/LernEmoji.woff2") format("woff2") tech(color-COLRv1); font-display: swap; }

:root {
  --lern-font: "Fredoka", "LernSymbole", "LernEmoji", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  --lern-emoji: "LernEmoji", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  --lern-safe-top: env(safe-area-inset-top, 0px);
  --lern-safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--lern-bg, #FFF8EF);
  color: var(--lern-ink, #1B1B2C);
  font-family: var(--lern-font);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

body { min-height: 100dvh; }

img { max-width: 100%; }

button { font-family: inherit; }

:focus-visible { outline: 3px solid var(--lern-primary, #FF6B4A); outline-offset: 2px; }

.emoji { font-family: var(--lern-emoji); font-style: normal; line-height: 1; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Startbild, bis WebAssembly geladen ist (wird dann entfernt) */
#boot {
  position: fixed; inset: 0; display: grid; place-items: center;
  background: linear-gradient(180deg, #1B1446, #3B2A86);
}
#boot .boot-logo {
  font: 900 64px/1 "Fredoka", system-ui, sans-serif; color: #fff;
  animation: boot-pulse 1.4s ease-in-out infinite;
}
@keyframes boot-pulse { 50% { transform: scale(1.06); opacity: .85; } }

@media (prefers-reduced-motion: reduce) {
  #boot .boot-logo { animation: none; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* App-Rahmen füllt das Fenster (Inhalt oben, Footer unten), wie AppFrame in Flutter. */
html, body { height: 100%; }
.lw-frame { height: 100dvh; }
.lw-frame-content { overflow: auto; container-type: size; }
