/* ============================================================
   Ulli ist Supi — Brand-Foundation v2 (Pack 3b)
   Stand 2026-05-12

   Was ist neu vs. Pack 3a:
   - Shadow-Tokens auf Drop+Blur umgestellt (moderner Look)
   - Border-Width Standard 4px → 3px
   - Slide-System (Welcome / Sprach-Walze / Dashboard)
   - Brand-Sprechblase als Logo, Sticker-Icons, Ulli-Figur
   - Slot-Maschine: Frame, Walze, klickbare Bedienelemente
   - Hero-Deck + Deck-Pills mit Spielkarten-Stapel-Optik
   - Leitner-Dots, Streak-Banner
   - Bouncy Spring-Animationen

   Legacy-Klassen (.lang-pill, .deck-card, .login__logo, .hero, .hero__art)
   bleiben drin, bis app.js mit Pack 3c/3d umgebaut wird.
   ============================================================ */

:root {
  /* ----------  ULLI-BRAND PALETTE  ---------- */
  --c-marine:     #0A1F4A;   /* Marineblau · Logo, Buttons, Titel */
  --c-supi-red:   #C8221B;   /* Signal-Rot · "supi!", Highlights */
  --c-hellblau:   #27A3F5;   /* Hellblau   · Sekundär, Strahlen */
  --c-action:     #7AB52E;   /* Action-Grün · "Los geht's!", Erfolg */
  --c-action-2:   #6BA025;   /* Action-Grün dunkler · hover */
  --c-sun:        #FFD93D;   /* Sonnen-Gelb · Sterne, Streak */
  --c-creme:      #F4F0EA;   /* Crème      · App-Hintergrund */
  --c-paper:      #FFFFFF;   /* Papier-Weiß · Cards */
  --c-ink:        #0A1F4A;   /* Text = Marineblau (statt Schwarz, wärmer) */
  --c-muted:      #6B6F7B;   /* Sekundärtext */

  /* ----------  Semantisch (rückwärtskompatibel)  ---------- */
  --bg:        var(--c-creme);
  --paper:     var(--c-paper);
  --primary:   var(--c-marine);
  --accent:    var(--c-sun);
  --success:   var(--c-action);
  --danger:    var(--c-supi-red);
  --info:      var(--c-hellblau);
  --text:      var(--c-ink);
  --muted:     var(--c-muted);

  /* ----------  Bold-Stil-Tokens (Drop + Blur statt 80er-Memphis)  ---------- */
  --border-w:    3px;
  --border-c:    var(--c-ink);
  --shadow:      0 4px 0 var(--c-ink), 0 8px 18px rgba(10, 31, 74, 0.18);
  --shadow-sm:   0 2px 0 var(--c-ink), 0 4px 10px rgba(10, 31, 74, 0.14);
  --shadow-lg:   0 6px 0 var(--c-ink), 0 14px 28px rgba(10, 31, 74, 0.22);
  --radius:      14px;
  --radius-lg:   18px;
  --radius-pill: 999px;

  /* ----------  Bouncy Spring (Standard-Easing)  ---------- */
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

  /* ----------  Typografie  ---------- */
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  /* Strahlen-Pattern aus Sonnengelb und Hellblau, dezent */
  background-image:
    radial-gradient(circle at 15% 8%,  rgba(255, 217, 61, 0.20), transparent 38%),
    radial-gradient(circle at 85% 92%, rgba(39, 163, 245, 0.18), transparent 38%);
}

#app { max-width: 760px; margin: 0 auto; padding: 1rem; }
.loading { text-align: center; padding: 3rem; font-size: 1.4rem; color: var(--muted); }

/* ============================================================
   Typografie
   ============================================================ */
h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; color: var(--c-marine); }
h1 { font-size: 2rem;   margin: 0 0 1rem; }
h2 { font-size: 1.4rem; margin: 1.5rem 0 0.5rem; }
h3 { font-size: 1.1rem; margin: 0 0 0.5rem; }

/* Rote Inline-Akzente für „supi!" und „heute" */
.supi { color: var(--c-supi-red); font-weight: 800; }
.red  { color: var(--c-supi-red); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.4rem;
  border: var(--border-w) solid var(--border-c);
  border-radius: var(--radius);
  background: var(--c-sun);
  font-family: inherit; font-size: 1rem; font-weight: 800; color: var(--text);
  cursor: pointer; box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-decoration: none;
}
.btn:hover  { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn:active { transform: translateY(2px);  box-shadow: var(--shadow-sm); }

.btn--primary { background: var(--c-marine);   color: var(--c-paper); }
.btn--success { background: var(--c-action);   color: var(--c-paper); }
.btn--success:hover { background: var(--c-action-2); }
.btn--danger  { background: var(--c-supi-red); color: var(--c-paper); }
.btn--info    { background: var(--c-hellblau); color: var(--c-paper); }
.btn--ghost   { background: var(--c-paper); }
.btn--small   {
  padding: .4rem .9rem; font-size: .85rem;
  box-shadow: var(--shadow-sm); border-width: 2.5px;
}

/* „Los geht's!" — der große Onboarding-CTA */
.btn--hero {
  background: var(--c-action); color: var(--c-paper);
  font-size: 1.15rem; font-weight: 900;
  padding: 1rem 2rem;
  letter-spacing: 0.5px; text-transform: uppercase;
  width: 100%;
  border-radius: 16px;
}
.btn--hero:hover { background: var(--c-action-2); }

/* ============================================================
   Inputs
   ============================================================ */
.input {
  display: block; width: 100%; padding: .8rem 1rem;
  border: 2.5px solid var(--c-ink); border-radius: 12px;
  font-family: inherit; font-size: 1rem; background: #F8F8FA;
  font-weight: 600; color: var(--c-marine);
  margin-bottom: 0;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus {
  outline: none;
  border-color: var(--c-hellblau);
  box-shadow: 0 0 0 4px rgba(39, 163, 245, 0.25);
}

/* ============================================================
   Card (Standard-Container, z.B. für Admin)
   ============================================================ */
.card {
  background: var(--paper);
  border: var(--border-w) solid var(--border-c);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

/* ============================================================
   Slide-System (Welcome / Sprach-Walze / Dashboard)
   Drei Vollbild-Screens mit Crossfade.
   ============================================================ */
.slide {
  position: fixed; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .55s ease, visibility .55s ease;
  overflow-y: auto;
  display: flex; flex-direction: column; align-items: center;
  padding: 1rem 1rem 2rem;
}
.slide.active { opacity: 1; visibility: visible; }

/* ============================================================
   Brand-Logo (Sprechblase „Ulli ist Supi!")
   Pro Slide leicht andere Größe.
   ============================================================ */
.brand-logo {
  width: 80%; max-width: 280px;
  height: auto;
  margin: 0 auto -8px;
  filter: drop-shadow(3px 3px 0 rgba(10, 31, 74, 0.10));
}
.lang-slide__brand {
  width: 50%; max-width: 200px;
  height: auto;
  margin: 0 auto .25rem;
  filter: drop-shadow(2px 2px 0 rgba(10, 31, 74, 0.10));
}
.dashboard__brand {
  width: 50%; max-width: 170px;
  height: auto;
  margin: 0 auto .5rem;
  filter: drop-shadow(2px 2px 0 rgba(10, 31, 74, 0.10));
}

/* ============================================================
   Welcome-Slide (Slide 1)
   Brand-Logo + Hero (Icons | Ulli | Icons) + Banner + Login
   ============================================================ */
.welcome {
  width: 100%; max-width: 480px;
  display: flex; flex-direction: column; align-items: center;
  gap: .75rem;
}

.welcome__hero {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 4px;
  margin-bottom: 0;
}

.icons-col {
  display: flex; flex-direction: column; gap: 10px;
  align-self: center;
}

/* Sticker-Icons (Globus, Chat, Stern, Buch, Kopfhörer, Bleistift) */
.sticker-icon {
  width: 60px; height: 60px;
  object-fit: contain;
  cursor: pointer;
  transition: transform .15s var(--ease-spring);
  filter: drop-shadow(2px 3px 0 rgba(10, 31, 74, 0.12));
}
.sticker-icon:hover  { transform: scale(1.12) rotate(-3deg); }
.sticker-icon:active { transform: scale(0.95); }

/* Ulli-Figur mittig */
.ulli-stage {
  display: flex; justify-content: center;
  flex-shrink: 1; min-width: 0;
}
.ulli-figure {
  width: 100%;
  max-width: 220px;
  height: auto;
  filter: drop-shadow(4px 4px 0 rgba(0, 0, 0, 0.10));
}

/* Banner „Spielerisch lernen. Mit Spaß. Für alle Sprachen!" */
.welcome__banner {
  background: var(--c-marine);
  color: var(--c-paper);
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 12px;
  border: 2.5px solid var(--c-ink);
  font-size: 0.95rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  max-width: 360px;
  position: relative;
  margin-top: .25rem;
}
.welcome__banner::before, .welcome__banner::after {
  content: ""; position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 0; height: 0; border: 10px solid transparent;
}
.welcome__banner::before { left: -19px;  border-right-color: var(--c-marine); }
.welcome__banner::after  { right: -19px; border-left-color:  var(--c-marine); }

/* Login-Form */
.login-form {
  background: var(--c-paper);
  border: 3px solid var(--c-ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem;
  width: 100%; max-width: 380px;
  margin-top: .5rem;
  display: flex; flex-direction: column; gap: .75rem;
}
.login__alt {
  text-align: center; margin-top: .25rem;
  font-size: .9rem; color: var(--c-muted);
  text-decoration: none; font-weight: 600;
}
.login__alt:hover { color: var(--c-marine); }

/* ============================================================
   Sprach-Walze (Slide 2) — Spielautomat
   ============================================================ */
.lang-slide { justify-content: center; }
.lang-slide h2 {
  font-size: 1.3rem; font-weight: 900;
  margin: 0 0 .75rem; text-align: center;
  color: var(--c-marine);
}

.wheel {
  width: 100%; max-width: 400px;
  margin: 0 auto 2rem;
  position: relative;
}

.wheel__machine {
  position: relative;
  width: 100%;
  aspect-ratio: 799 / 883;
  /* Floating-Effekt für die ganze Maschine */
  filter: drop-shadow(0 8px 16px rgba(10, 31, 74, 0.25));
}
.wheel__machine-frame {
  display: block;
  width: 100%; height: 100%;
  pointer-events: none;
  user-select: none;
  /* Subtiler Marquee-Lampen-Pulse */
  animation: lampPulse 2.4s ease-in-out infinite;
}

/* Display = innere Anzeige-Fläche der Maschine (pixelgenau gemessen) */
.wheel__display {
  position: absolute;
  left: 13.1%; top: 27.1%;
  width: 63%; height: 35.3%;
  overflow: hidden;
  background: linear-gradient(180deg, #FAF7F2 0%, var(--c-paper) 50%, #FAF7F2 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%);
}

.wheel__rotor {
  position: absolute;
  left: 6px; right: 6px;
  top: 50%;
  display: flex; flex-direction: column; gap: 4px;
  transition: transform .5s var(--ease-spring);
}

.wheel__item {
  width: 100%; height: 70px;
  background: var(--c-paper);
  border: 2.5px solid var(--c-ink);
  border-radius: 12px;
  box-shadow: 0 2px 0 var(--c-ink), 0 4px 10px rgba(10, 31, 74, 0.15);
  display: flex; align-items: stretch;
  position: relative;
  overflow: hidden;
  opacity: 0.55;
  transform: scale(0.92);
  transition: opacity .35s ease, transform .35s ease,
              border-color .35s ease, box-shadow .35s ease;
  user-select: none;
  flex-shrink: 0;
  cursor: pointer;
}
.wheel__item.is-current {
  opacity: 1;
  transform: scale(1);
  border-color: var(--c-supi-red);
  border-width: 3px;
  box-shadow: 0 3px 0 var(--c-supi-red), 0 8px 18px rgba(200, 34, 27, 0.25);
}
.wheel__item__label {
  width: 42%;
  display: flex; align-items: center;
  padding-left: 12px;
  font-weight: 900;
  font-size: 0.95rem;
  color: var(--c-marine);
  letter-spacing: -0.01em;
  line-height: 1.1;
  z-index: 2;
  flex-shrink: 0;
}
.wheel__item__img {
  width: 58%;
  height: 100%;
  object-fit: cover;
  object-position: 50% center;
  display: block;
  flex-shrink: 0;
}

/* Klickbare Bedienelemente auf dem Frame (transparent positioniert) */
.wheel__btn {
  position: absolute;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  outline: none;
  z-index: 5;
  border-radius: 50px;
  transition: background .12s ease, transform .12s ease;
}
.wheel__btn:active {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(0.94);
}
.wheel__btn--red    { left: 17%;   top: 67%; width: 15%; height: 7%; }
.wheel__btn--yellow { left: 36%;   top: 67%; width: 24%; height: 7%; }
.wheel__btn--green  { left: 59.5%; top: 67%; width: 15%; height: 7%; }

/* Grüner Knopf pulsiert wenn der User die Walze gedreht aber noch nicht
   bestätigt hat — visuelles "jetzt mich drücken!"-Signal */
.wheel__btn--green.is-pending {
  animation: wheelGreenPulse 1.1s ease-in-out infinite;
}
@keyframes wheelGreenPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(122, 181, 46, 0.0); }
  50%      { box-shadow: 0 0 0 12px rgba(122, 181, 46, 0.45); }
}

/* Hinweis unter der Slot-Maschine, dezent */
.wheel__hint {
  text-align: center;
  color: var(--c-muted);
  font-weight: 700;
  font-size: .82rem;
  margin: -.25rem 0 .5rem;
  letter-spacing: .01em;
}
.wheel__hint strong { color: var(--c-action); font-weight: 900; }

.wheel__lever {
  position: absolute;
  right: 0%; top: 26%;
  width: 18%; height: 18%;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  outline: none;
  z-index: 5;
  transform-origin: left center;
  transition: transform .25s var(--ease-spring);
}
.wheel__lever:active {
  transform: rotate(18deg) translateY(6px);
}

/* ============================================================
   Dashboard (Slide 3)
   Streak-Banner + Hero-Deck + Deck-Grid (Spielkarten-Stapel)
   ============================================================ */
.dashboard h2 {
  font-size: 1.05rem; font-weight: 800;
  margin: 1.5rem 0 .5rem;
  text-align: left;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  width: 100%; max-width: 480px;
  padding-left: 4px;
}
.dashboard__greeting {
  text-align: center; color: var(--c-muted);
  margin: 0 0 .25rem; font-weight: 700;
  font-size: 1rem;
}

/* Streak-Banner („⭐ 7 Tage Streak — bleib dran!") */
.streak-banner {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--c-sun);
  border: 2.5px solid var(--c-ink);
  border-radius: 999px;
  padding: 6px 14px 6px 8px;
  font-weight: 900; font-size: .9rem;
  margin: 0 auto .75rem;
  box-shadow: var(--shadow-sm);
}
.streak-banner__icon {
  width: 24px; height: 24px;
  object-fit: contain;
}

/* Hero-Deck („Heute empfohlen" oben groß, mit Stapel-Optik) */
.hero-deck {
  width: 100%; max-width: 480px;
  background: var(--c-paper);
  border: 3px solid var(--c-ink);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin: 0 auto 1.5rem;
  display: flex; align-items: center; gap: 14px;
  position: relative;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
  z-index: 1;
}
.hero-deck::before, .hero-deck::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--c-paper);
  border: 2.5px solid var(--c-ink);
  border-radius: 22px;
  z-index: -1;
  pointer-events: none;
  transition: transform .3s var(--ease-spring);
}
.hero-deck::before {
  transform: rotate(-2deg) translate(4px, 4px);
  box-shadow: 0 2px 0 var(--c-ink);
}
.hero-deck::after {
  transform: rotate(1.6deg) translate(-3px, 6px);
  box-shadow: 0 2px 0 var(--c-ink);
}
.hero-deck:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.hero-deck:hover::before { transform: rotate(-5deg) translate(-2px, 5px); }
.hero-deck:hover::after  { transform: rotate(4.5deg) translate(7px, 7px); }

.hero-deck__label {
  position: absolute; top: -10px; left: 16px;
  background: var(--c-supi-red); color: var(--c-paper);
  padding: 3px 12px 2px;
  border: 2.5px solid var(--c-ink);
  border-radius: 999px;
  font-size: .7rem; font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 0 var(--c-ink);
  z-index: 2;
}
.hero-deck__icon {
  width: 76px; height: 92px;
  background: transparent;
  border: none;
  display: flex; align-items: flex-end; justify-content: center;
  font-size: 2.6rem;
  flex-shrink: 0;
  overflow: visible;
}
.hero-deck__icon img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(3px 4px 0 rgba(10, 31, 74, 0.10));
  user-select: none;
}
.hero-deck__body { flex: 1; min-width: 0; }
.hero-deck__title {
  font-weight: 900; font-size: 1.15rem; color: var(--c-marine);
  margin: 0 0 4px; line-height: 1.15;
}
.hero-deck__meta {
  font-size: .82rem; color: var(--c-muted); font-weight: 600;
  margin-bottom: 6px;
}
.hero-deck__cta {
  background: var(--c-action); color: var(--c-paper);
  border: 2.5px solid var(--c-ink); border-radius: 999px;
  padding: 5px 14px 4px;
  font-size: .82rem; font-weight: 900;
  display: inline-block;
  box-shadow: 0 2px 0 var(--c-ink);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Deck-Grid */
.deck-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px 18px;
  width: 100%; max-width: 480px;
  padding: 12px 6px 0;
}
@media (min-width: 560px) {
  .deck-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Deck-Pills mit Spielkarten-Stapel-Optik (2 Pseudo-Karten dahinter) */
.deck-pill {
  background: var(--c-paper);
  border: 3px solid var(--c-ink); border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 12px 10px 10px;
  text-align: center;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  position: relative;
  z-index: 1;
}
.deck-pill::before, .deck-pill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--c-paper);
  border: 2px solid var(--c-ink);
  border-radius: 18px;
  z-index: -1;
  pointer-events: none;
  transition: transform .3s var(--ease-spring);
}
.deck-pill::before {
  transform: rotate(-1.8deg) translate(2px, 2px);
  box-shadow: 0 2px 0 var(--c-ink);
}
.deck-pill::after {
  transform: rotate(1.4deg) translate(-2px, 4px);
  box-shadow: 0 2px 0 var(--c-ink);
}
.deck-pill:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.deck-pill:hover::before { transform: rotate(-5deg) translate(-3px, 3px); }
.deck-pill:hover::after  { transform: rotate(5deg)  translate(5px, 6px); }

.deck-pill__icon {
  width: 60px; height: 70px;
  background: transparent;
  border: none;
  display: flex; align-items: flex-end; justify-content: center;
  font-size: 1.8rem;
  overflow: visible;
  flex-shrink: 0;
}
/* Wenn das Icon ein Image ist (Pack 3e: Kartenstapel-Höhen) */
.deck-pill__icon img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(2px 3px 0 rgba(10, 31, 74, 0.10));
  user-select: none;
}
.deck-pill__title {
  font-weight: 800; font-size: .88rem; color: var(--c-marine);
  line-height: 1.15;
}
.deck-pill__count {
  font-size: .72rem; color: var(--c-muted); font-weight: 600;
}
.deck-pill__streak {
  position: absolute; top: -10px; right: -10px;
  background: var(--c-sun);
  border: 2px solid var(--c-ink);
  border-radius: 999px;
  padding: 3px 8px 2px;
  font-size: .72rem; font-weight: 900;
  box-shadow: 0 2px 0 var(--c-ink), 0 4px 8px rgba(10, 31, 74, 0.18);
  color: var(--c-ink);
  display: flex; align-items: center; gap: 3px;
  line-height: 1;
  z-index: 2;
}

/* Leitner-Stack-Indikator (5 Punkte) */
.leitner-bar {
  display: flex; gap: 4px; margin-top: 4px;
  justify-content: center;
}
.leitner-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--c-ink);
  background: var(--c-creme);
}
.leitner-dot.filled  { background: var(--c-action); }
.leitner-dot.partial { background: var(--c-sun); }

/* ============================================================
   Header (Legacy — wird wahrscheinlich durch Slide-Brand ersetzt)
   ============================================================ */
.header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.5rem; gap: .5rem;
}
.header__title { font-size: 1.5rem; margin: 0; color: var(--c-marine); }
.header__actions { display: flex; gap: .5rem; }

/* ============================================================
   Training-Karte (Lernkarten-Ansicht)
   Wird in Pack 3f modernisiert.
   ============================================================ */
.training {
  background: var(--paper);
  border: var(--border-w) solid var(--border-c);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
}

/* aspect-ratio 1/1, transparenter Background */
.training__image {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: var(--radius);
  margin: 0 auto 1rem;
  display: block;
  background: transparent;
}

.training__bubble {
  display: inline-block;
  background: var(--paper);
  border: 3px solid var(--border-c);
  border-radius: var(--radius-pill);
  padding: .65rem 1.6rem;
  font-weight: 800; font-size: 1.4rem;
  margin: .5rem 0;
  box-shadow: var(--shadow-sm);
  color: var(--c-marine);
}

.training__article { color: var(--c-supi-red); font-weight: 800; margin-right: .25rem; }
.training__answer  { color: var(--c-marine);   font-weight: 800; }

.training__actions {
  display: flex; gap: .8rem; justify-content: center;
  margin-top: 1.5rem; flex-wrap: wrap;
}
.training__progress {
  color: var(--c-muted); font-size: .95rem; font-weight: 700;
  text-align: center;
  margin: .25rem 0 1rem;
}
.training__progress-sep { margin: 0 .4rem; opacity: .6; }
.training__progress-deck { color: var(--c-marine); font-weight: 800; }

/* ============================================================
   Training-Slide (Pack 3f) — mobile-optimiert in Pack 3j fix
   Karte mit Bild, Sprechblase, Leitner-Boxen, Buttons
   ============================================================ */
.training-slide {
  justify-content: flex-start;
  padding: .75rem 1rem 1rem;
}
.training-slide .dashboard__brand {
  max-width: 130px;
  margin: 0 auto .25rem;
}
.training-slide .training {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--c-paper);
  border: 3px solid var(--c-ink);
  border-radius: 18px;
  padding: .9rem .9rem 1.1rem;
  box-shadow: var(--shadow);
}
/* Karten-Bild: fix max 400px hoch, kein Stretchen */
.training-slide .training__image {
  width: auto;
  max-width: 100%;
  max-height: 400px;
  height: auto;
  aspect-ratio: auto;
  margin: 0 auto .5rem;
  object-fit: contain;
  display: block;
  border-radius: 12px;
}
.training-slide .training__progress {
  margin: .15rem 0 .5rem;
  font-size: .88rem;
}
.training__bubble-wrap {
  text-align: center;
  margin: .5rem 0;
}
.training__bubble {
  display: inline-block;
  background: var(--c-paper);
  border: 3px solid var(--c-ink);
  border-radius: var(--radius-pill);
  padding: .55rem 1.4rem;
  font-weight: 900; font-size: 1.4rem;
  box-shadow: var(--shadow-sm);
  color: var(--c-marine);
  animation: bounceIn .35s var(--ease-spring);
  max-width: 100%;
  line-height: 1.2;
}
.training__bubble--de { color: var(--c-muted); font-weight: 700; }
.training__note {
  color: var(--c-muted); font-size: .85rem;
  margin-top: .3rem; font-weight: 600;
}

/* Enger Viewport (< 720px Höhe): nur Bild und Logo etwas kleiner */
@media (max-height: 720px) {
  .training-slide { padding: .5rem 1rem .75rem; }
  .training-slide .dashboard__brand { max-width: 105px; margin-bottom: .1rem; }
  .training-slide .training__image { max-height: 320px; }
}

/* ============================================================
   Leitner-Boxen — 5 Mini-Stapel als Box-Status
   ============================================================ */
.leitner-boxes {
  display: flex; justify-content: center; align-items: flex-end;
  gap: 6px;
  margin: 1.25rem auto .25rem;
  padding: 0 4px;
}
.leitner-box {
  flex: 1; min-width: 0; max-width: 64px;
  height: 72px;
  display: flex; align-items: flex-end; justify-content: center;
  position: relative;
  opacity: 0.45;
  transform: scale(0.85);
  transition: opacity .25s ease, transform .25s var(--ease-spring);
}
.leitner-box img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  object-position: bottom center;
  user-select: none;
  pointer-events: none;
}
.leitner-box__num {
  position: absolute;
  top: -2px; left: 50%;
  transform: translateX(-50%);
  font-size: .68rem; font-weight: 900;
  color: var(--c-muted);
  background: var(--c-paper);
  border: 1.5px solid var(--c-ink);
  border-radius: 999px;
  padding: 1px 6px;
  line-height: 1;
}
.leitner-box.is-current {
  opacity: 1;
  transform: scale(1);
}
.leitner-box.is-current .leitner-box__num {
  background: var(--c-supi-red);
  color: var(--c-paper);
  border-color: var(--c-supi-red);
  box-shadow: 0 2px 0 var(--c-ink);
}
.leitner-boxes__caption {
  text-align: center;
  font-size: .82rem;
  color: var(--c-muted);
  font-weight: 600;
  margin-bottom: 1rem;
}
.leitner-boxes__caption strong {
  color: var(--c-supi-red);
  font-weight: 900;
}
.leitner-boxes__stats {
  margin-left: .25rem;
  opacity: .85;
}

/* ============================================================
   Lern-Animationen (Pack 3g)
   Beim Antworten fliegt ein kleiner Token von Source-Box zu Target-Box.
   ============================================================ */.leitner-flyer {
  position: fixed;
  top: 0; left: 0;
  width: 38px; height: 38px;
  margin: -19px 0 0 -19px;
  pointer-events: none;
  z-index: 1000;
  border: 3px solid var(--c-ink);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 900;
  color: var(--c-paper);
  box-shadow: 0 4px 0 var(--c-ink), 0 8px 18px rgba(10, 31, 74, 0.3);
  transition:
    left  .55s cubic-bezier(.5, -0.2, .6, 1.2),
    top   .55s cubic-bezier(.5, -0.2, .6, 1.2),
    transform .35s var(--ease-spring) .55s,
    opacity .25s ease .65s;
}
.leitner-flyer.is-correct { background: var(--c-action); }
.leitner-flyer.is-wrong   { background: var(--c-supi-red); }
.leitner-flyer.is-landed {
  transform: scale(1.4);
  opacity: 0;
}

/* Source-Box wackelt beim Loslassen */
@keyframes leitnerShakeGood {
  0%, 100% { transform: scale(1); }
  35% { transform: scale(1.08) translateY(-3px); }
  70% { transform: scale(0.95); }
}
@keyframes leitnerShakeBad {
  0%, 100% { transform: scale(1); }
  20% { transform: scale(0.94) translateX(-3px) rotate(-3deg); }
  60% { transform: scale(0.94) translateX(3px)  rotate(3deg); }
  80% { transform: scale(0.94) translateX(-2px) rotate(-1deg); }
}
.leitner-box.is-departing-good { animation: leitnerShakeGood .4s ease-out; }
.leitner-box.is-departing-bad  { animation: leitnerShakeBad  .4s ease-out; }

/* Target-Box pulsiert beim Ankommen */
@keyframes leitnerPulseGood {
  0%   { transform: scale(0.85); }
  50%  { transform: scale(1.15); filter: brightness(1.15); }
  100% { transform: scale(1);    filter: brightness(1); }
}
@keyframes leitnerPulseBad {
  0%   { transform: scale(0.85); }
  50%  { transform: scale(1.15); filter: brightness(0.9) saturate(1.3); }
  100% { transform: scale(1);    filter: brightness(1) saturate(1); }
}
.leitner-box.is-arriving-good {
  animation: leitnerPulseGood .45s var(--ease-spring);
  opacity: 1 !important;
}
.leitner-box.is-arriving-bad {
  animation: leitnerPulseBad .45s var(--ease-spring);
  opacity: 1 !important;
}

/* Buttons während Animation deaktiviert dezent darstellen */
.training__actions .btn:disabled {
  opacity: .55;
  cursor: wait;
  pointer-events: none;
}

/* ============================================================
   Badges & Stats
   ============================================================ */
.badge {
  display: inline-block; padding: .2rem .6rem;
  border-radius: var(--radius-pill);
  font-size: .85rem; font-weight: 700;
  border: 2px solid var(--c-ink);
}
.badge--ok    { background: #DCFCE7; color: var(--c-action); }
.badge--bad   { background: #FEE2E2; color: var(--c-supi-red); }
.badge--warn  { background: #FEF3C7; color: #92400E; }
.badge--admin { background: #FCE7F3; color: #831843; }
.badge--streak{ background: var(--c-sun); color: var(--c-supi-red); }

/* ============================================================
   LEGACY: alte Onboarding/Login/Decks-Klassen
   Bleiben drin, bis app.js mit Pack 3c/3d umgebaut ist.
   ============================================================ */
.login { max-width: 420px; margin: 3.5rem auto 0; text-align: center; }
.login__logo {
  display: block;
  width: 120px; height: 120px;
  margin: 0 auto 1rem;
  border-radius: 22px;
  border: 3px solid var(--c-ink);
  box-shadow: var(--shadow);
}
.login__title {
  font-size: 2.4rem; margin-bottom: .25rem;
  color: var(--c-marine); font-weight: 900; letter-spacing: -0.03em;
}
.login__title .supi { color: var(--c-supi-red); }
.login__sub { color: var(--muted); margin-bottom: 2rem; font-size: 1.05rem; }

.hero {
  max-width: 720px;
  margin: 1rem auto;
  text-align: center;
}
.hero__art { display: block; margin: 0 auto 1.5rem; }
.hero__art img {
  width: 100%; max-width: 700px; height: auto;
  border-radius: var(--radius);
  border: 3px solid var(--c-ink);
  box-shadow: var(--shadow);
  display: block; margin: 0 auto;
}
.hero__actions {
  display: flex; flex-direction: column;
  align-items: center; gap: .8rem;
  margin: 1.5rem 0 2rem;
}

.langs {
  display: flex; flex-wrap: wrap; gap: .6rem;
  justify-content: center; margin: 1.5rem 0;
}
.lang-pill {
  padding: .55rem 1.1rem; border: 2.5px solid var(--border-c);
  border-radius: var(--radius-pill);
  background: var(--paper); cursor: pointer; font-weight: 700;
  display: flex; align-items: center; gap: .4rem;
  box-shadow: var(--shadow-sm);
  transition: transform .1s ease, box-shadow .1s ease;
  color: var(--text);
}
.lang-pill:hover  { transform: translateY(-2px); box-shadow: var(--shadow); }
.lang-pill.active { background: var(--c-marine); color: var(--c-paper); }

.decks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}
.deck-card {
  background: var(--paper); padding: 1rem;
  border: var(--border-w) solid var(--border-c);
  border-radius: var(--radius);
  cursor: pointer; box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
}
.deck-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.deck-card__name {
  font-weight: 800; color: var(--c-marine);
  margin-bottom: .25rem; font-size: 1.05rem;
}
.deck-card__count { color: var(--muted); font-size: .9rem; }

/* ============================================================
   Animationen
   ============================================================ */
@keyframes bounceIn {
  0%   { transform: scale(0.85); opacity: 0; }
  60%  { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1.00); }
}
@keyframes brandBounceIn {
  0%   { transform: scale(0) rotate(-15deg); opacity: 0; }
  40%  { transform: scale(1.15) rotate(4deg); opacity: 1; }
  65%  { transform: scale(0.94) rotate(-2deg); }
  85%  { transform: scale(1.03) rotate(1deg); }
  100% { transform: scale(1) rotate(0); }
}
@keyframes brandIdle {
  0%, 88%, 100% { transform: scale(1) rotate(0); }
  92% { transform: scale(1.025) rotate(-1.2deg); }
  96% { transform: scale(0.99) rotate(0.8deg); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
@keyframes lampPulse {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.15); }
}

/* Animations-Trigger pro Slide */
.slide.active .brand-logo {
  animation: brandBounceIn 1.0s var(--ease-spring) 0.05s backwards,
             brandIdle 7s ease-in-out 2s infinite;
}
.slide.active .lang-slide__brand,
.slide.active .dashboard__brand {
  animation: brandBounceIn 0.9s var(--ease-spring) 0.1s backwards,
             brandIdle 7s ease-in-out 2s infinite;
}
.slide.active .sticker-icon {
  animation: bounceIn 0.5s var(--ease-spring) calc(0.4s + var(--i, 0) * 0.07s) backwards;
}
.slide.active .welcome__banner { animation: bounceIn 0.4s var(--ease-spring) 0.85s backwards; }
.slide.active .login-form      { animation: bounceIn 0.4s ease 0.95s backwards; }
.slide.active .ulli-figure {
  animation: bounceIn 0.6s var(--ease-spring) 0.2s backwards,
             float 3.5s ease-in-out 1s infinite;
}

/* Legacy-Animations-Helper */
@keyframes bounce-in {
  0%   { transform: scale(0.92); opacity: 0; }
  60%  { transform: scale(1.04); opacity: 1; }
  100% { transform: scale(1.00); }
}
.bounce-in { animation: bounce-in .35s var(--ease-spring); }

@keyframes hop {
  0%, 100% { transform: translateY(0); }
  30%      { transform: translateY(-8px); }
  60%      { transform: translateY(0) scale(1.02); }
}
.hop { animation: hop .5s ease-in-out; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 480px) {
  #app { padding: .75rem; }
  .training { padding: 1rem; }
  .training__bubble { font-size: 1.2rem; padding: .55rem 1.3rem; }
  .hero { margin: .25rem auto; }
  .hero__art img { max-width: 100%; }
  .login__logo { width: 100px; height: 100px; }
  .login__title { font-size: 2rem; }
}

@media (max-width: 380px) {
  .sticker-icon { width: 50px; height: 50px; }
  .ulli-figure  { max-width: 170px; }
  .brand-logo   { max-width: 240px; }
  .wheel__item  { font-size: 1.15rem; }
}

@media (max-height: 740px) {
  .welcome      { gap: .5rem; }
  .brand-logo   { max-width: 220px; }
  .ulli-figure  { max-width: 180px; }
  .sticker-icon { width: 52px; height: 52px; }
}

/* ============================================================
   Themen-Cluster (Pack 3k.1)
   Decks werden in übergeordnete Themen gruppiert. Jeder Cluster
   bekommt einen farbigen Header + die Deck-Pills darunter.
   ============================================================ */
.cluster-section {
  width: 100%;
  max-width: 760px;
  margin: 1rem auto 0;
}
.cluster-header {
  display: flex; align-items: center; gap: .6rem;
  padding: .5rem .85rem;
  margin-bottom: .6rem;
  background: var(--c-paper);
  border: 2.5px solid var(--c-ink);
  border-left: 8px solid var(--cluster-color, var(--c-marine));
  border-radius: 12px;
  box-shadow: 0 2px 0 var(--c-ink);
}
.cluster-header__icon {
  font-size: 1.4rem;
  line-height: 1;
}
.cluster-header__name {
  flex: 1;
  font-weight: 900;
  color: var(--c-marine);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.cluster-header__count {
  font-size: .75rem;
  font-weight: 800;
  color: var(--c-paper);
  background: var(--cluster-color, var(--c-marine));
  border: 2px solid var(--c-ink);
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}

/* ============================================================
   Achievement-Toast (Pack 3k.2)
   Erscheint oben mittig wenn ein Achievement freigeschaltet wird.
   Auto-hide nach 4.5s, Klick schließt sofort.
   ============================================================ */
.toast-achievement {
  position: fixed;
  top: 1rem;
  left: 50%;
  width: calc(100% - 2rem);
  max-width: 380px;
  transform: translate(-50%, -160px) scale(0.9);
  background: var(--c-paper);
  border: 3px solid var(--c-ink);
  border-radius: 16px;
  padding: .8rem 1rem;
  box-shadow: 0 6px 0 var(--c-ink), 0 12px 30px rgba(10, 31, 74, 0.35);
  display: flex; align-items: center; gap: .85rem;
  z-index: 9999;
  opacity: 0;
  cursor: pointer;
  transition:
    transform .45s var(--ease-spring),
    opacity .25s ease;
}
.toast-achievement.is-visible {
  transform: translate(-50%, 0) scale(1);
  opacity: 1;
}
.toast-achievement__icon {
  flex-shrink: 0;
  font-size: 2.2rem;
  line-height: 1;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-sun);
  border: 2.5px solid var(--c-ink);
  border-radius: 50%;
  box-shadow: 0 2px 0 var(--c-ink);
  animation: toastIconPop .5s var(--ease-spring) .15s backwards;
}
@keyframes toastIconPop {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.toast-achievement__body {
  flex: 1; min-width: 0;
}
.toast-achievement__label {
  font-size: .7rem;
  font-weight: 900;
  color: var(--c-action);
  text-transform: uppercase;
  letter-spacing: .06em;
  line-height: 1;
  margin-bottom: .2rem;
}
.toast-achievement__name {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--c-marine);
  line-height: 1.15;
}
.toast-achievement__desc {
  font-size: .82rem;
  font-weight: 600;
  color: var(--c-muted);
  margin-top: .15rem;
  line-height: 1.25;
}

/* ============================================================
   Versteckter Admin-Zugang (Pack 3j)
   Lange Druck aufs Sprechblase-Logo → öffnet /admin/
   ============================================================ */
.dashboard__brand {
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.dashboard__brand.is-pressing {
  animation: brandPress 1.5s ease-in forwards;
}
@keyframes brandPress {
  0%   { transform: scale(1); filter: drop-shadow(2px 2px 0 rgba(10,31,74,.10)); }
  100% { transform: scale(0.92); filter: drop-shadow(0 0 22px var(--c-sun)) brightness(.95); }
}
.dashboard__brand.is-activating {
  animation: brandActivate .3s ease-out;
}
@keyframes brandActivate {
  0%   { transform: scale(0.92); }
  50%  { transform: scale(1.18); filter: brightness(1.3) drop-shadow(0 0 30px var(--c-sun)); }
  100% { transform: scale(1); }
}

/* ============================================================
   Admin-Panel (Pack 3j.1) — Brand-Design für /admin/
   ============================================================ */
.admin-slide {
  align-items: center;
  padding-bottom: 4rem;
}
.admin__title {
  margin: .5rem 0 0;
  color: var(--c-marine);
  font-weight: 900; font-size: 1.6rem;
  letter-spacing: -0.02em;
  text-align: center;
}
.admin__subtitle {
  text-align: center;
  color: var(--c-muted);
  font-weight: 600;
  font-size: .92rem;
  margin: .25rem 0 1.25rem;
}
.admin__subtitle strong { color: var(--c-marine); }

.admin-card {
  width: 100%;
  max-width: 720px;
  background: var(--c-paper);
  border: 3px solid var(--c-ink);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1.25rem 1.25rem 1.5rem;
  margin: 0 auto 1.25rem;
}
.admin-card__header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .5rem;
}
.admin-card__header h3,
.admin-card details summary h3 {
  margin: 0; color: var(--c-marine);
  font-size: 1.15rem; font-weight: 900;
  display: inline-flex; align-items: center; gap: .5rem;
}
.admin-card__count {
  background: var(--c-sun);
  color: var(--c-ink);
  font-size: .82rem; font-weight: 800;
  padding: 2px 10px;
  border: 2px solid var(--c-ink);
  border-radius: 999px;
  margin-left: .25rem;
}
.admin-card__hint {
  color: var(--c-muted);
  font-size: .88rem; font-weight: 600;
  margin: 0 0 1rem;
}

.admin-card details summary {
  cursor: pointer;
  list-style: none;
  padding: .25rem 0;
  display: flex; align-items: center; justify-content: space-between;
}
.admin-card details summary::-webkit-details-marker { display: none; }
.admin-card details summary::after {
  content: "▾";
  margin-left: .5rem;
  color: var(--c-muted);
  font-size: 1rem;
  transition: transform .2s;
}
.admin-card details[open] summary::after { transform: rotate(180deg); }
.admin-card details > *:not(summary) { margin-top: 1rem; }

/* ============ User-Cards ============ */
.user-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
}
@media (min-width: 640px) {
  .user-grid { grid-template-columns: 1fr 1fr; }
}

.user-card {
  background: var(--c-creme);
  border: 2.5px solid var(--c-ink);
  border-radius: 14px;
  padding: .9rem;
  display: flex; flex-direction: column; gap: .6rem;
  box-shadow: 0 2px 0 var(--c-ink);
}
.user-card__head {
  display: flex; align-items: center; gap: .7rem;
}
.user-card__avatar {
  width: 44px; height: 44px;
  flex-shrink: 0;
  background: var(--c-marine);
  color: var(--c-paper);
  border: 2.5px solid var(--c-ink);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1rem;
  box-shadow: 0 2px 0 var(--c-ink);
}
.user-card__info { flex: 1; min-width: 0; }
.user-card__name {
  font-weight: 900; color: var(--c-marine);
  font-size: 1.02rem; line-height: 1.15;
}
.user-card__self {
  color: var(--c-muted); font-style: italic;
  font-weight: 600; font-size: .82rem;
  margin-left: .35rem;
}
.user-card__email {
  color: var(--c-muted);
  font-size: .82rem; font-weight: 600;
  word-break: break-all;
}
.user-card__meta {
  display: flex; flex-wrap: wrap; gap: .35rem;
}
.user-card__stats {
  color: var(--c-muted);
  font-size: .82rem; font-weight: 600;
  display: flex; flex-wrap: wrap; gap: .35rem;
}
.user-card__stats strong { color: var(--c-marine); font-weight: 800; }
.user-card__actions {
  display: flex; flex-wrap: wrap; gap: .35rem;
  margin-top: .25rem;
}
.user-card__actions .btn {
  font-size: .78rem;
  padding: .35rem .7rem;
}

/* ============ Admin-Tabellen (Decks, Duplikate) ============ */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.admin-table th {
  text-align: left;
  padding: .5rem .6rem;
  background: var(--c-creme);
  border-bottom: 2px solid var(--c-ink);
  font-weight: 800;
  color: var(--c-marine);
}
.admin-table td {
  padding: .55rem .6rem;
  border-top: 1.5px solid #E8E4DD;
  vertical-align: middle;
}
.admin-table tr.is-empty td { opacity: .55; }
.admin-table code {
  background: var(--c-creme);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: .82rem;
  color: var(--c-ink);
}
.admin-table .muted { color: var(--c-muted); font-weight: 600; }
.muted { color: var(--c-muted); }

