/* =========================================================
   Lisan – Stil C, cozy (warme, ruhige Farben statt Neon)
   Alle Farben, Schriften und Formen stehen hier oben als
   Variablen. Willst du etwas ändern, änderst du es nur hier.
   ========================================================= */

:root {
  /* Farben */
  --blue: #64829E;     /* Rauchblau – Hauptfarbe */
  --mint: #A3B899;     /* Salbei – richtig, Fortschritt */
  --pink: #E2ADA4;     /* Altrosa – Streak, Quiz */
  --orange: #D3906A;
  --yellow: #E4BC63;   /* Senf – Münzen, Belohnungen */
  --purple: #8E7BAE;
  --ink: #4A3728;      /* warmes Dunkelbraun – Ränder und Text */
  --muted: #7A6252;    /* Nebentext */
  --bg: #F4ECDF;       /* Creme – Hintergrund */
  --white: #FFFAF2;
  --on-blue-soft: #E8EEF3;

  /* Schriften */
  --font-display: "Fredoka", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;

  /* Formen */
  --line: 2.5px solid var(--ink);
  --drop: 0 5px 0 var(--ink);
  --drop-sm: 0 3px 0 var(--ink);
  --r-sm: 12px;
  --r: 20px;
  --r-lg: 24px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Grundlagen ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--bg);
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

/* App-Rahmen: auf dem Handy volle Breite, am PC mittig wie ein Handy */
.app {
  position: relative;
  max-width: 480px;
  margin-inline: auto;
  min-height: 100svh;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 18px 120px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}

/* ---------- Kopfzeile ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 28px; letter-spacing: -0.01em; }
.stats { display: flex; gap: 6px; }

/* Kleine Kapseln (Streak, Münzen, Tags) */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px;
  border: var(--line); border-radius: 999px;
  box-shadow: var(--drop-sm);
  font-weight: 900; font-size: 15px;
  background: var(--white);
}
.pill svg { width: 16px; height: 16px; }
.pill--pink { background: var(--pink); }
.pill--yellow { background: var(--yellow); }
.pill--mint { background: var(--mint); }
.pill--btn { font-family: inherit; color: var(--ink); cursor: pointer; }
.pill--btn:active { transform: translateY(2px); box-shadow: none; }
.info-list { margin: 12px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.dialog__actions--one { grid-template-columns: 1fr; }
.dialog p + p { margin-top: 8px; }
.dialog p { color: var(--muted); }

/* ---------- Begrüßung ---------- */
.hello h1 { font-size: 40px; }
.hello p { margin-top: 6px; font-weight: 800; color: var(--muted); }

/* ---------- Fortschrittsbalken ---------- */
.progress {
  height: 24px; padding: 3px;
  border: var(--line); border-radius: 999px;
  background: var(--white);
}
.progress > i {
  display: block; height: 100%; width: 0;
  border-radius: 999px;
  background: var(--mint);
  box-shadow: inset 0 -4px 0 #86A07C, inset 0 3px 0 #C3D3BB;
  transition: width .8s var(--ease);
}

/* ---------- Karten ---------- */
.card {
  position: relative;
  padding: 18px;
  border: var(--line); border-radius: var(--r-lg);
  background: var(--white);
  box-shadow: 0 6px 0 var(--ink);
  display: flex; flex-direction: column; gap: 8px;
}
.card--blue { background: var(--blue); color: var(--white); }
.card--blue .eyebrow, .card--blue .meta { color: var(--on-blue-soft); }
.eyebrow { font-weight: 900; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.card h2 { font-size: 25px; font-weight: 600; }
.meta { font-size: 14px; }

/* Schräger Aufkleber oben rechts auf einer Karte */
.sticker {
  position: absolute; right: 14px; top: -14px;
  padding: 4px 12px;
  border: var(--line); border-radius: var(--r-sm);
  background: var(--yellow); color: var(--ink);
  font-weight: 900; font-size: 13px;
  box-shadow: var(--drop-sm);
  transform: rotate(5deg);
}

/* ---------- Knöpfe mit 3D-Boden ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 20px;
  border: var(--line); border-radius: 16px;
  background: var(--yellow); color: var(--ink);
  font-family: var(--font-display); font-weight: 600; font-size: 19px;
  box-shadow: var(--drop);
  transition: transform .12s ease, box-shadow .12s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn--blue { background: var(--blue); color: var(--white); }
.btn--mint { background: var(--mint); }
.btn--pink { background: var(--pink); }
.btn--white { background: var(--white); }
.btn--block { width: 100%; }

/* ---------- Lernmethoden-Kacheln ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile {
  --tilt: 0deg;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 12px 14px;
  border: var(--line); border-radius: var(--r);
  background: var(--white);
  box-shadow: var(--drop);
  text-align: left;
  transform: rotate(var(--tilt));
  transition: transform .12s ease, box-shadow .12s ease;
}
.tile:hover { transform: translateY(-2px) rotate(calc(var(--tilt) * 1.4)); }
.tile:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.tile b { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.tile small { font-weight: 900; font-size: 13px; }
.tile:nth-child(1) { --tilt: -1.5deg; background: var(--mint); }
.tile:nth-child(2) { --tilt: 1.5deg; background: var(--pink); }
.tile:nth-child(3) { --tilt: 1deg; background: var(--orange); }
.tile:nth-child(4) { --tilt: -1deg; background: var(--white); }

/* ---------- Dunkle Karte (Minigame) ---------- */
.dark-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: var(--line); border-radius: var(--r);
  background: var(--ink); color: var(--white);
  box-shadow: 0 5px 0 var(--pink);
  text-align: left;
}
.dark-row .grow { flex: 1; display: flex; flex-direction: column; }
.dark-row b { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.dark-row small { font-size: 13px; color: #D9CBBE; }
.pro-badge {
  padding: 3px 10px; border-radius: 999px;
  background: var(--mint); color: var(--ink);
  font-weight: 900; font-size: 12px;
  transform: rotate(-6deg);
}

/* ---------- Schwebende Sprechblasen ---------- */
.bubble {
  position: absolute;
  padding: 6px 12px;
  border: var(--line); border-radius: 16px 16px 16px 4px;
  background: var(--white);
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  box-shadow: var(--drop-sm);
  pointer-events: none;
  animation: bob 4s ease-in-out infinite;
}
@keyframes bob { 50% { translate: 0 -8px; } }

/* ---------- Menü unten ---------- */
.tabbar {
  position: fixed; z-index: 20;
  left: 50%; translate: -50% 0;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: min(444px, calc(100% - 36px));
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px;
  padding: 6px;
  border: var(--line); border-radius: 22px;
  background: var(--white);
  box-shadow: var(--drop);
}
.tabbar a {
  display: flex; align-items: center; justify-content: center;
  height: 44px; border-radius: 16px;
  text-decoration: none; font-weight: 800; font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tabbar a[aria-current="page"] { background: var(--blue); color: var(--white); font-weight: 900; }

/* ---------- Kleiner Hinweis unten (Toast) ---------- */
.toast {
  position: fixed; z-index: 30; left: 50%; top: 18px; translate: -50% -140%;
  padding: 10px 16px;
  border: var(--line); border-radius: 16px;
  background: var(--yellow); box-shadow: var(--drop-sm);
  font-weight: 900;
  transition: translate .4s var(--ease);
}
.toast.show { translate: -50% 0; }

/* =========================================================
   Schritt 2: Login, Profil, Admin
   ========================================================= */

/* Geschützte Seiten erst zeigen, wenn das Profil geladen ist */
body[data-protected] .app,
body[data-protected] .tabbar { opacity: 0; transition: opacity .25s ease; }
body.ready .app,
body.ready .tabbar { opacity: 1; }

.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.app--center { justify-content: center; padding-bottom: 40px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.page-title { font-size: 34px; }

/* Begrüßung auf der Login-Seite */
.hero { padding-top: 120px; }
.hero__title { font-size: 64px; letter-spacing: -0.02em; }
.hero__sub { margin-top: 4px; font-weight: 800; color: var(--muted); font-size: 17px; }

/* Umschalter Anmelden / Registrieren */
.segmented {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px; margin-bottom: 6px;
  border: var(--line); border-radius: 16px;
  background: var(--bg);
}
.segmented button {
  min-height: 42px; border: 0; border-radius: 12px;
  background: transparent; font-weight: 900; font-size: 15px;
}
.segmented button[aria-selected="true"] { background: var(--ink); color: var(--white); }

/* Eingabefelder */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 900; font-size: 14px; }
.input,
.field input {
  width: 100%; min-height: 50px; padding: 0 14px;
  border: var(--line); border-radius: 14px;
  background: var(--white); color: var(--ink);
  font: inherit; font-weight: 700; font-size: 16px;
  box-shadow: inset 0 3px 0 rgba(74, 55, 40, .06);
}
.input::placeholder,
.field input::placeholder { color: #B0A090; font-weight: 600; }
.input--code { text-transform: uppercase; letter-spacing: .08em; font-family: var(--font-mono); }

.link-btn {
  align-self: center; padding: 6px 8px; border: 0; background: none;
  font-weight: 800; font-size: 14px; color: var(--blue); text-decoration: underline;
}
.btn:disabled { opacity: .55; pointer-events: none; }
.link-btn--light { color: var(--white); }

.divider {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 13px; color: var(--muted);
}
.divider::before, .divider::after { content: ""; flex: 1; height: 2.5px; border-radius: 2px; background: var(--ink); opacity: .15; }

/* Status-Karte im Profil */
.status { display: flex; align-items: center; gap: 12px; }
.status__badge {
  flex: none; display: grid; place-items: center;
  width: 54px; height: 54px;
  border: var(--line); border-radius: 18px 18px 18px 6px;
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  box-shadow: var(--drop-sm); transform: rotate(-5deg);
}
.status__text { display: flex; flex-direction: column; min-width: 0; }
.status__text b { font-family: var(--font-display); font-weight: 600; font-size: 20px; }
.card--mint { background: var(--mint); }
.card--yellow { background: var(--yellow); }

/* Liste der Beta-Codes im Admin-Bereich */
.code-list { display: flex; flex-direction: column; gap: 10px; }
.code-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: var(--line); border-radius: 16px;
  background: var(--white); box-shadow: var(--drop-sm);
}
.code-item__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.code-item code { font-family: var(--font-mono); font-weight: 700; font-size: 15px; letter-spacing: .04em; overflow-wrap: anywhere; }
.code-item small { font-size: 13px; color: var(--muted); }
.code-item.is-used { background: #EFE6D8; box-shadow: none; }
.code-item.is-used code { text-decoration: line-through; opacity: .6; }
.icon-btn {
  flex: none; min-height: 40px; padding: 0 12px;
  border: var(--line); border-radius: 12px;
  background: var(--yellow); font-weight: 900; font-size: 13px;
  box-shadow: 0 3px 0 var(--ink);
}
.icon-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.empty { padding: 18px; text-align: center; font-weight: 800; color: var(--muted); }

/* =========================================================
   Schritt 3: Vokabeln & Units
   ========================================================= */

.section-title { font-size: 22px; }

/* Überschrift als Zurück-Knopf */
.title-back {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0; padding: 0; border: 0; background: none;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.title-back__arrow {
  color: var(--muted); font-weight: 700;
  transition: transform .15s var(--ease), color .15s ease;
}
.title-back:hover .title-back__arrow { transform: translateX(-4px); color: var(--blue); }
.back-link {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 900; font-size: 15px; text-decoration: none; color: var(--muted);
}
.back-link:hover { color: var(--blue); }

/* Sprach-Kästchen "EN", "FR" … */
.lang-badge {
  flex: none; display: inline-grid; place-items: center;
  min-width: 44px; height: 44px; padding: 0 6px;
  border: var(--line); border-radius: 14px 14px 14px 4px;
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  box-shadow: var(--drop-sm);
}

/* Sprachauswahl als Kapseln */
.chips { display: flex; flex-wrap: wrap; gap: 8px; border: 0; margin: 0; padding: 0; }
.chips legend { font-weight: 900; font-size: 14px; margin-bottom: 8px; padding: 0; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 42px; padding: 0 14px;
  border: var(--line); border-radius: 999px;
  background: var(--white); font-weight: 800; font-size: 15px;
  box-shadow: 0 3px 0 var(--ink); cursor: pointer;
  transition: transform .12s ease, background-color .12s ease;
}
.chip input:checked + span { background: var(--ink); color: var(--white); }
.chip input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 3px; }
.chip input:disabled + span { opacity: .55; cursor: not-allowed; box-shadow: none; }
.chip span:hover { transform: translateY(-1px); }
.lock { font-size: 11px; font-weight: 900; padding: 2px 6px; border-radius: 999px; background: var(--yellow); color: var(--ink); }

/* Liste der Units */
.list { display: flex; flex-direction: column; gap: 12px; }
.list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: var(--line); border-radius: var(--r);
  background: var(--white); box-shadow: var(--drop);
  text-decoration: none; color: inherit;
  transition: transform .12s ease, box-shadow .12s ease;
}
.list-item:hover { transform: translateY(-2px); }
.list-item:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.list-item__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.list-item__main b { font-family: var(--font-display); font-weight: 600; font-size: 18px; overflow-wrap: anywhere; }
.list-item__main small { font-size: 13px; color: var(--muted); }
.chevron { flex: none; font-family: var(--font-display); font-size: 24px; font-weight: 700; }

/* Kopf einer Unit */
.unit-head { display: flex; align-items: center; gap: 12px; }
.unit-head h1 { font-size: 30px; overflow-wrap: anywhere; min-width: 0; }

/* Zwei Felder nebeneinander, auf schmalen Handys untereinander */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 360px) { .pair { grid-template-columns: 1fr; } }

.textarea {
  width: 100%; min-height: 160px; padding: 12px 14px;
  border: var(--line); border-radius: 14px;
  background: var(--white); color: var(--ink);
  font: inherit; font-weight: 700; font-size: 16px; line-height: 1.5;
  resize: vertical;
}
.hint { font-size: 13px; color: var(--muted); }
.hint code { font-family: var(--font-mono); background: var(--bg); padding: 1px 6px; border-radius: 6px; }

/* Eine Vokabel in der Liste */
.word-list { display: flex; flex-direction: column; gap: 8px; }
.word-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px 10px 14px;
  border: var(--line); border-radius: 16px;
  background: var(--white);
}
.word-row__text { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.word-row__text span { overflow-wrap: anywhere; }
.word-row__term { font-weight: 900; }
.word-row__tr { color: var(--muted); }
.word-row .input { min-height: 42px; }
.mini-btn {
  flex: none; min-width: 40px; min-height: 40px; padding: 0 10px;
  border: var(--line); border-radius: 12px;
  background: var(--white); font-weight: 900; font-size: 13px;
  box-shadow: 0 3px 0 var(--ink);
}
.mini-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.mini-btn--danger { background: var(--pink); }
.mini-btn--ok { background: var(--mint); }

.danger-link {
  align-self: center; padding: 8px; border: 0; background: none;
  font-weight: 800; font-size: 14px; color: #A9584C; text-decoration: underline;
}

/* Sprache der App: Deutsch / Türkçe */
.lang-switch {
  align-self: center; display: inline-flex; gap: 4px; padding: 4px;
  border: var(--line); border-radius: 999px; background: var(--white);
  box-shadow: var(--drop-sm);
}
.lang-switch button {
  min-height: 38px; padding: 0 16px; border: 0; border-radius: 999px;
  background: transparent; font-weight: 900; font-size: 14px;
}
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.lang-switch--block { align-self: stretch; display: grid; grid-template-columns: 1fr 1fr; }

/* =========================================================
   Tarife
   ========================================================= */
.banner {
  padding: 12px 16px;
  border: var(--line); border-radius: 16px;
  background: var(--mint); font-weight: 800;
  box-shadow: var(--drop-sm);
}
.plans { display: flex; flex-direction: column; gap: 22px; }
.plan {
  position: relative;
  display: flex; flex-direction: column; gap: 10px;
  padding: 20px 18px 18px;
  border: var(--line); border-radius: var(--r-lg);
  box-shadow: 0 6px 0 var(--ink);
}
.plan--current { box-shadow: 0 6px 0 var(--ink), 0 0 0 4px var(--blue); }
.plan__name { font-size: 30px; }
.plan__price b { font-family: var(--font-display); font-weight: 700; font-size: 26px; }
.plan__price small { font-weight: 800; color: var(--muted); }
.plan__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.plan__list li { position: relative; padding-left: 28px; font-weight: 800; }
.plan__list li::before {
  content: "✓"; position: absolute; left: 0; top: 1px;
  display: grid; place-items: center; width: 20px; height: 20px;
  border-radius: 50%; background: var(--ink); color: var(--white);
  font-size: 12px; font-weight: 900;
}
.plan .btn { margin-top: 6px; }

/* =========================================================
   Fenster (z. B. „Meintest du …?“)
   ========================================================= */
.dialog {
  width: min(420px, calc(100% - 32px));
  padding: 20px;
  border: var(--line); border-radius: var(--r-lg);
  background: var(--white); color: var(--ink);
  box-shadow: 0 6px 0 var(--ink);
  font-family: var(--font-body); font-weight: 700;
}
.dialog::backdrop { background: rgba(74, 55, 40, .45); }
.dialog h2 { font-size: 24px; margin-bottom: 4px; }
.dialog__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.dialog__actions .btn { font-size: 17px; padding: 0 10px; }
.spell-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; }
.spell-list label {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; border: var(--line); border-radius: 14px; background: var(--bg);
  font-size: 17px; cursor: pointer;
}
.spell-list input { width: 20px; height: 20px; accent-color: var(--blue); }
.spell-list s { color: var(--muted); }

/* =========================================================
   Karteikarten
   ========================================================= */
.app--learn { padding-bottom: 40px; }
.learn-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.learn-count { font-family: var(--font-display); font-weight: 600; font-size: 18px; font-variant-numeric: tabular-nums; }
.learn-title { text-align: center; font-weight: 900; margin-top: -4px; overflow-wrap: anywhere; }
.progress--thin { height: 16px; }
.progress--thin > i { transition: width .35s var(--ease); }

.learn-play { display: flex; flex-direction: column; gap: 14px; }

.flashcard {
  display: block; width: 100%; height: min(58vh, 340px);
  padding: 0; border: 0; background: none; perspective: 1200px; cursor: pointer;
  transition: transform .28s ease, opacity .28s ease;
}
.flashcard__inner {
  position: relative; display: block; width: 100%; height: 100%;
  transform-style: preserve-3d; transition: transform .5s var(--ease);
}
.flashcard.is-flipped .flashcard__inner { transform: rotateY(180deg); }
.flashcard.is-leaving-right { transform: translateX(120%) rotate(12deg); opacity: 0; }
.flashcard.is-leaving-left { transform: translateX(-120%) rotate(-12deg); opacity: 0; }

.face {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 24px;
  border: var(--line); border-radius: 28px;
  box-shadow: 0 8px 0 var(--ink);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  text-align: center;
}
.face--front { background: var(--blue); color: var(--white); }
.face--back { background: var(--yellow); color: var(--ink); transform: rotateY(180deg); }
.face__lang {
  padding: 4px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .22); font-weight: 900; font-size: 13px; letter-spacing: .04em;
}
.face--back .face__lang { background: rgba(74, 55, 40, .1); }
.face__text {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(28px, 9vw, 44px); line-height: 1.1; overflow-wrap: anywhere;
}

.answer-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.answer-row .btn { min-height: 64px; font-size: 17px; line-height: 1.15; padding: 8px 10px; text-align: center; }

/* Ende der Runde */
.done { align-items: center; text-align: center; gap: 12px; padding-top: 28px; }
.done h1 { font-size: 34px; }
.done__coin { width: 84px; height: 84px; animation: coin-pop .9s var(--ease) both; }
.done__coin svg { width: 100%; height: 100%; }
.done__coins { font-family: var(--font-display); font-weight: 700; font-size: 28px; color: #A9792B; }
.done__stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.done .btn { width: 100%; }
@keyframes coin-pop {
  0% { transform: scale(.2) rotate(-40deg); opacity: 0; }
  60% { transform: scale(1.15) rotate(10deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}

/* Wiederholen-Block auf der Startseite */
.card--review { background: var(--pink); }
.card--review .meta { color: var(--ink); }

/* Passwort mit Auge */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 56px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; translate: 0 -50%;
  width: 44px; height: 40px;
  display: grid; place-items: center;
  border: 0; border-radius: 10px; background: transparent; color: var(--muted);
}
.pw-toggle:hover { color: var(--ink); background: var(--bg); }
.pw-toggle svg { width: 22px; height: 22px; }

/* Weniger Bewegung, wenn das Handy das so eingestellt hat */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =========================================================
   Quiz, Zuordnen, Schreiben
   ========================================================= */

/* Große Frage-Karte */
.prompt {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 180px; padding: 22px;
  border: var(--line); border-radius: 28px;
  box-shadow: 0 8px 0 var(--ink);
  text-align: center; color: var(--ink);
}
.prompt--pink { background: var(--pink); }
.prompt--orange { background: var(--orange); }
.prompt .face__lang { background: rgba(255, 255, 255, .45); }
.prompt__text {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(28px, 9vw, 42px); line-height: 1.1; overflow-wrap: anywhere;
}
.hint--right { color: #5E7E57; font-weight: 900; font-size: 15px; }
.hint--wrong { color: #B35A4E; font-weight: 900; font-size: 15px; }

/* Quiz-Antworten */
.options { display: flex; flex-direction: column; gap: 10px; }
.option {
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 14px;
  border: var(--line); border-radius: 16px;
  background: var(--white); box-shadow: var(--drop-sm);
  font-weight: 800; font-size: 18px; text-align: start;
  transition: transform .12s ease, background-color .15s ease;
}
.option:hover { transform: translateY(-1px); }
.option:active { transform: translateY(2px); box-shadow: none; }
.option:disabled { cursor: default; transform: none; }
.option__num {
  flex: none; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg); font-size: 14px; font-weight: 900;
}
.option--right { background: var(--mint); }
.option--wrong { background: var(--pink); animation: shake .35s ease; }
.option:disabled:not(.option--right):not(.option--wrong) { opacity: .55; }

/* Zuordnen */
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.match__col { display: flex; flex-direction: column; gap: 10px; }
.match__tile {
  min-height: 62px; padding: 8px 10px;
  border: var(--line); border-radius: 16px;
  background: var(--white); box-shadow: var(--drop-sm);
  font-weight: 800; font-size: 17px; line-height: 1.15; overflow-wrap: anywhere;
  transition: transform .12s ease, background-color .15s ease, opacity .3s ease;
}
.match__tile--term { background: #E6EBF0; }
.match__tile.is-selected { background: var(--blue); color: var(--white); transform: translateY(-2px) rotate(-1deg); }
.match__tile.is-wrong { animation: shake .35s ease; background-color: var(--pink); }
.match__tile.is-done { background: var(--mint); opacity: .45; box-shadow: none; transform: scale(.96); cursor: default; }

@keyframes shake {
  0%, 100% { translate: 0; }
  25% { translate: -6px; }
  75% { translate: 6px; }
}

/* Schreiben */
.write { display: flex; flex-direction: column; gap: 12px; }
#write-skip[hidden] + #write-check { grid-column: 1 / -1; }
.input--big { min-height: 58px; font-size: 20px; text-align: center; }
.input--right { background: #E3ECDD; }
.input--almost { background: #F6E7C1; }
.input--wrong { background: #F4DCD7; }
.input:disabled { opacity: 1; color: var(--ink); -webkit-text-fill-color: var(--ink); }
.charbar { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.charbar__key {
  min-width: 40px; height: 40px; padding: 0 8px;
  border: 2px solid var(--ink); border-radius: 10px;
  background: var(--white); box-shadow: 0 2px 0 var(--ink);
  font-weight: 800; font-size: 18px;
}
.charbar__key:active { transform: translateY(2px); box-shadow: none; }
.feedback {
  padding: 10px 14px; border: var(--line); border-radius: 14px;
  background: var(--white); font-weight: 900; text-align: center;
}
.feedback--right { background: var(--mint); }
.feedback--almost { background: var(--yellow); }
.feedback--wrong { background: var(--pink); animation: shake .35s ease; }

/* Andere Lernarten (Ende der Runde, Unit-Seite) */
.method-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.method-chip {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 40px; padding: 0 14px;
  border: var(--line); border-radius: 999px;
  box-shadow: var(--drop-sm);
  font-weight: 900; font-size: 15px; text-decoration: none;
  background: var(--white);
}
.method-chip:active { transform: translateY(2px); box-shadow: none; }
.method-chip--cards { background: var(--mint); }
.method-chip--quiz { background: var(--pink); }
.method-chip--write { background: var(--orange); }
.method-chip--match { background: var(--white); }

/* PRO-Schild auf einer Kachel */
.tile { position: relative; }
.tile .lock { position: absolute; right: 10px; top: -10px; border: 2px solid var(--ink); transform: rotate(6deg); }

/* =========================================================
   Tagesaufgaben und Truhe
   ========================================================= */
.quests { gap: 10px; }
.quest-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.quest { display: flex; align-items: center; gap: 10px; }
.quest__check {
  flex: none; display: grid; place-items: center;
  width: 28px; height: 28px; border: var(--line); border-radius: 50%;
  background: var(--white); font-weight: 900; font-size: 15px;
}
.quest.is-done .quest__check { background: var(--mint); }
.quest__body { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: center; }
.quest__body b { grid-column: 1 / -1; font-size: 15px; line-height: 1.2; }
.quest.is-done .quest__body b { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; }
.quest__bar { height: 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--bg); overflow: hidden; }
.quest__bar i { display: block; height: 100%; background: var(--mint); border-radius: 999px; transition: width .6s var(--ease); }
.quest__body small { font-size: 12px; font-weight: 900; color: var(--muted); font-variant-numeric: tabular-nums; }
.quest__reward {
  flex: none; padding: 3px 9px; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--yellow); font-weight: 900; font-size: 13px; white-space: nowrap;
}
.quest.is-done .quest__reward { background: var(--bg); }
.quest__reward--chest { cursor: pointer; box-shadow: 0 2px 0 var(--ink); animation: wiggle 1.4s ease-in-out infinite; }
.quest.is-done .quest__reward--chest { background: var(--yellow); }

.card--feedback { background: var(--white); }
.card--feedback .link-btn { color: var(--muted); }

/* Ende der Runde: geschaffte Aufgaben */
.quest-done { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.quest-done li {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 8px 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--bg);
  font-size: 14px; text-align: start;
}
.quest-done b { white-space: nowrap; color: #A9792B; }
.chest-btn { animation: wiggle 1.4s ease-in-out infinite; }

/* Truhen-Fenster */
.chest-dialog { text-align: center; overflow: hidden; }
.chest-dialog p { color: var(--muted); }
.chest {
  display: block; width: 190px; margin: 46px auto 4px; padding: 0;
  border: 0; background: none; animation: wiggle 1.2s ease-in-out infinite;
}
.chest svg { width: 100%; height: auto; overflow: visible; }
.chest__lid { transform-box: view-box; transform-origin: 18px 76px; transition: transform .55s cubic-bezier(.34, 1.56, .64, 1); }
.chest__coin { transform-box: view-box; transform: translate(0, 0); opacity: 0; }
.chest.is-open { animation: none; cursor: default; }
.chest.is-open .chest__lid { transform: rotate(-48deg); }
.chest.is-open .chest__coin { animation: coin-jump .9s cubic-bezier(.2, .8, .3, 1) var(--d) forwards; }
@keyframes coin-jump {
  0% { opacity: 1; transform: translate(0, 0); }
  60% { opacity: 1; transform: translate(var(--x), -58px); }
  100% { opacity: 1; transform: translate(var(--x), -44px); }
}
.chest__reward { font-family: var(--font-display); font-weight: 700; font-size: 30px; color: #A9792B !important; animation: coin-pop .7s var(--ease) both; margin-bottom: 12px; }
.confetti {
  position: absolute; top: 34%; width: 9px; height: 14px; border-radius: 3px;
  pointer-events: none; animation: confetti 1.3s ease-out forwards;
}
@keyframes confetti {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--x), 260px) rotate(var(--r)); opacity: 0; }
}
@keyframes wiggle {
  0%, 70%, 100% { transform: rotate(0); }
  76% { transform: rotate(-5deg); }
  84% { transform: rotate(5deg); }
  92% { transform: rotate(-3deg); }
}
@media (prefers-reduced-motion: reduce) {
  .chest, .chest-btn, .quest__reward--chest { animation: none; }
}

/* =========================================================
   Feedback
   ========================================================= */
.rating { border: 0; margin: 0 0 10px; padding: 0; border-radius: 14px; }
.rating legend { font-weight: 900; font-size: 15px; padding: 0; margin-bottom: 6px; }
.rating__row { display: flex; gap: 6px; }
.heart {
  width: 44px; height: 44px; padding: 0;
  border: 2px solid var(--ink); border-radius: 12px; background: var(--white);
  font-size: 22px; line-height: 1; color: #D9CBBE;
  transition: transform .12s ease, color .12s ease, background-color .12s ease;
}
.heart:active { transform: scale(.9); }
.heart.is-on { color: #B35A4E; background: #F4DCD7; }
.rating.is-missing .heart { border-color: #B35A4E; animation: shake .35s ease; }
.textarea {
  width: 100%; padding: 10px 14px; resize: vertical;
  border: var(--line); border-radius: 14px; background: var(--white); color: var(--ink);
  font: inherit; font-weight: 700; font-size: 16px;
}

/* Admin: Durchschnitt */
.fb-avg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fb-avg div {
  display: flex; flex-direction: column; align-items: center; padding: 10px;
  border: var(--line); border-radius: 16px; background: var(--white); box-shadow: var(--drop-sm);
}
.fb-avg b { font-family: var(--font-display); font-size: 28px; }
.fb-avg small { font-weight: 900; color: var(--muted); }
.fb-item { gap: 4px; }
#fb-form .textarea { min-height: 90px; }

/* Feedback-Popup */
.fb-popup { position: fixed; text-align: center; animation: pop-in .45s var(--ease) both; }
.fb-popup p { color: var(--muted); margin: 6px 0 14px; }
.fb-popup .link-btn { display: block; margin: 8px auto 0; color: var(--muted); }
.fb-popup__icon { font-size: 56px; line-height: 1; margin: 4px 0 8px; animation: wiggle 1.6s ease-in-out infinite; }
.fb-popup__close {
  position: absolute; z-index: 2; right: 8px; top: 8px; width: 44px; height: 44px; touch-action: manipulation; cursor: pointer;
  border: 2px solid var(--ink); border-radius: 50%; background: var(--white);
  font-weight: 900; font-size: 15px; line-height: 1;
}
@keyframes pop-in {
  0% { transform: scale(.7) rotate(-4deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* =========================================================
   Tier, Zuhause, Shop
   ========================================================= */

/* Karte auf der Startseite */
.pet-card { flex-direction: row; align-items: center; gap: 12px; text-decoration: none; background: #F6EDE0; }
.pet-card__pic { flex: none; width: 74px; }
.pet-card__pic svg { width: 100%; height: auto; display: block; }
.pet-card__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pet-card__text b { font-family: var(--font-display); font-weight: 600; font-size: 20px; overflow-wrap: anywhere; }
.pet-card__text small { font-weight: 800; color: var(--muted); }
.pet-card__arrow { font-family: var(--font-display); font-size: 34px; color: var(--muted); }

/* Tier aussuchen */
.adopt-preview { width: min(220px, 62%); margin: 0 auto; }
.adopt-preview svg { width: 100%; height: auto; display: block; animation: pop-in .4s var(--ease) both; }
.pet-choice, .fur-choice { border: 0; margin: 0 0 12px; padding: 0; }
.pet-choice legend, .fur-choice legend { font-weight: 900; font-size: 14px; margin-bottom: 8px; padding: 0; }
.pet-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pet-choice legend { grid-column: 1 / -1; }
.pet-choice__btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 6px 10px; border: var(--line); border-radius: 18px;
  background: var(--white); box-shadow: var(--drop-sm);
}
.pet-choice__btn svg { width: 100%; height: auto; }
.pet-choice__btn b { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.pet-choice__btn[aria-pressed="true"] { background: var(--mint); transform: translateY(-2px) rotate(-1deg); }
.fur-choice { display: flex; gap: 10px; flex-wrap: wrap; }
.fur-choice legend { width: 100%; }
.fur-dot { width: 40px; height: 40px; border: var(--line); border-radius: 50%; box-shadow: var(--drop-sm); }
.fur-dot[aria-pressed="true"] { outline: 3px solid var(--blue); outline-offset: 3px; }
.name-ideas { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 14px; }
.name-idea {
  padding: 4px 12px; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--bg); font-weight: 800; font-size: 14px;
}

/* Zuhause */
.home-title { font-size: 28px; overflow-wrap: anywhere; min-width: 0; }
.room-wrap { position: relative; display: flex; flex-direction: column; gap: 10px; }
.room {
  display: block; width: 100%; padding: 0; overflow: hidden;
  border: var(--line); border-radius: 24px; background: #EADCC6;
  box-shadow: 0 6px 0 var(--ink);
}
.room svg { display: block; width: 100%; height: auto; }
.room__pet-bounce { transform-box: fill-box; transform-origin: 50% 100%; }
.room__pet-bounce.is-bouncing { animation: pet-bounce .5s var(--ease); }
@keyframes pet-bounce {
  0% { transform: scale(1, 1); }
  30% { transform: scale(1.06, .92); }
  60% { transform: scale(.96, 1.06) translateY(-8px); }
  100% { transform: scale(1, 1); }
}
.pet-says {
  position: relative; align-self: center; max-width: 92%;
  padding: 10px 16px; border: var(--line); border-radius: 18px;
  background: var(--white); box-shadow: var(--drop-sm);
  font-weight: 800; text-align: center;
}
.pet-says::after {
  content: ""; position: absolute; left: 50%; bottom: -10px; width: 16px; height: 16px;
  background: var(--white); border-right: var(--line); border-bottom: var(--line);
  transform: translateX(-50%) rotate(45deg);
}

/* Shop */
.shop-preview {
  display: grid; place-items: center; padding: 8px;
  border: var(--line); border-radius: 24px; background: #F6EDE0;
  box-shadow: 0 5px 0 var(--ink);
}
.shop-preview svg { width: min(200px, 58%); height: auto; display: block; }
.shop-preview--room { padding: 0; overflow: hidden; }
.shop-preview--room svg { width: 100%; }
.shop-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding-bottom: 80px; }
.shop-item {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 6px 10px; border: var(--line); border-radius: 18px;
  background: var(--white); box-shadow: var(--drop-sm); text-align: center;
}
.shop-item__pic { width: 100%; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: var(--bg); }
.shop-item__pic svg { width: 92%; height: 92%; }
.shop-item b { font-size: 13px; line-height: 1.15; margin-top: 4px; }
.shop-item__price { font-weight: 900; font-size: 12px; color: var(--muted); }
.shop-item.is-on { background: #E3ECDD; }
.shop-item.is-selected { outline: 3px solid var(--blue); outline-offset: 2px; transform: translateY(-2px); }
.shop-item__tier { position: absolute; top: -8px; right: -4px; border: 2px solid var(--ink); transform: rotate(6deg); }
.shop-bar {
  position: fixed; z-index: 19; left: 50%; translate: -50% 0;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  width: min(444px, calc(100% - 36px));
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 16px; border: var(--line); border-radius: 18px;
  background: var(--white); box-shadow: var(--drop);
  animation: pop-in .25s var(--ease) both;
}
.shop-bar__name { flex: 1; min-width: 0; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-bar .btn { min-height: 44px; padding: 0 16px; font-size: 16px; white-space: nowrap; }

/* Admin */
.icon-btn--danger { color: #A9584C; }
.fb-item.is-read { opacity: .8; }
.fb-read { display: flex; flex-direction: column; gap: 10px; }
.fb-read summary {
  cursor: pointer; padding: 10px 14px; border: var(--line); border-radius: 14px;
  background: var(--white); font-weight: 900; box-shadow: var(--drop-sm); margin-bottom: 10px;
}
.fb-read[open] > .fb-item { margin-bottom: 10px; }

/* Garten */
.segmented--3 { grid-template-columns: repeat(3, 1fr); }
.room--garden { background: #A9C097; }
.grow-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.grow-list li { display: flex; flex-direction: column; gap: 1px; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 12px; background: #E3ECDD; }
.grow-list small { font-weight: 800; color: var(--muted); }

/* Schlafen */
.zzz text { animation: zzz 2.4s ease-in-out infinite; transform-box: fill-box; }
.zzz text:nth-child(2) { animation-delay: .4s; }
.zzz text:nth-child(3) { animation-delay: .8s; }
@keyframes zzz {
  0%, 100% { opacity: .2; transform: translateY(4px); }
  50% { opacity: 1; transform: translateY(-3px); }
}
@media (prefers-reduced-motion: reduce) { .zzz text { animation: none; } }

/* Avatar */
.me-preview { width: min(200px, 56%); margin: 0 auto; }
.me-preview svg { width: 100%; height: auto; display: block; }
.me-set { border: 0; margin: 0 0 14px; padding: 0; }
.me-set legend { font-weight: 900; font-size: 14px; margin-bottom: 8px; padding: 0; }
.dots { display: flex; flex-wrap: wrap; gap: 10px; }
.me-styles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.me-styles--eyes { grid-template-columns: repeat(3, 1fr); }
.me-style {
  padding: 4px; border: var(--line); border-radius: 16px;
  background: var(--white); box-shadow: var(--drop-sm);
}
.me-style svg { width: 100%; height: auto; display: block; }
.me-style[aria-pressed="true"] { background: var(--mint); transform: translateY(-2px); }
.me-card { gap: 6px; text-decoration: none; background: #F6EDE0; }
.me-card b { font-family: var(--font-display); font-weight: 600; font-size: 20px; }
.home-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.home-actions .btn { min-height: 54px; padding: 4px 6px; font-size: 14px; line-height: 1.15; text-align: center; }
.home-actions .btn[hidden] + .btn { grid-column: span 2; }
.segmented--4 { grid-template-columns: repeat(4, 1fr); }
.segmented--4 button { font-size: 13px; padding: 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-grid > .me-card { grid-column: 1 / -1; }

/* Bewegen und Spielen (bewegen.js) */
.room { touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.room.is-dragging { touch-action: none; cursor: grabbing; }
.mover .walker, .mover .facer { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .25s ease; }
.mover.is-walking .walker { animation: walk .42s ease-in-out infinite; }
.mover.is-running .walker { animation-duration: .26s; }
.mover.is-lifted .walker { animation: none; transform: translateY(-12px) scale(1.06); filter: drop-shadow(0 8px 0 rgba(74, 55, 40, .25)); }
.mover.is-sitting .walker { transform: translateY(-26px) scaleY(.92); }
.mover.is-resting .walker { transform: scale(1.08, .82); }
.mover.is-dancing .walker { animation: dance .5s ease-in-out infinite; }
.mover.is-throwing .walker { transform: rotate(-8deg); }
.walker.is-bouncing { animation: pet-bounce .5s var(--ease); }
@keyframes walk {
  0%, 100% { transform: translateY(0) rotate(0); }
  25% { transform: translateY(-5px) rotate(-3deg); }
  75% { transform: translateY(-5px) rotate(3deg); }
}
@keyframes dance {
  0%, 100% { transform: translateY(0) rotate(0); }
  25% { transform: translateY(-14px) rotate(-8deg); }
  50% { transform: translateY(0) rotate(0); }
  75% { transform: translateY(-14px) rotate(8deg); }
}

/* Effekte: Herzen, Noten, Ball, Tropfen, Schmetterling */
.fx-float {
  font-family: var(--font-display); font-weight: 700; font-size: 30px; text-anchor: middle;
  stroke: var(--ink); stroke-width: 1.5px; paint-order: stroke;
  transform-box: fill-box; animation: float-up 1.4s ease-out forwards; pointer-events: none;
}
.fx-heart { fill: #E2ADA4; }
.fx-note { fill: #7F9BB3; }
.fx-flower { fill: #E4BC63; font-size: 26px; }
.fx-dot { fill: #FFFAF2; font-size: 30px; }
@keyframes float-up {
  0% { opacity: 0; transform: translateY(6px) scale(.6); }
  20% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-46px) scale(1.1); }
}
.fx-ball { pointer-events: none; }
.fx-drop { animation: drop .8s ease-in forwards; transform-box: fill-box; }
@keyframes drop { to { transform: translateY(46px); opacity: 0; } }
.fx-wings { transform-box: fill-box; transform-origin: 50% 50%; animation: flap .22s ease-in-out infinite alternate; }
@keyframes flap { from { transform: scaleX(1); } to { transform: scaleX(.35); } }
@media (prefers-reduced-motion: reduce) {
  .mover.is-walking .walker, .mover.is-dancing .walker, .fx-wings { animation: none; }
}

/* Lernplan */
.plan-card { flex-direction: row; align-items: center; gap: 12px; text-decoration: none; background: var(--white); }
.plan-card--active { background: #E6EBF0; }
.plan-card__icon { flex: none; width: 54px; height: 54px; display: grid; place-items: center; font-size: 30px; border: var(--line); border-radius: 16px; background: var(--white); box-shadow: var(--drop-sm); }
.plan-hero { background: var(--blue); color: var(--white); }
.plan-hero .eyebrow { color: var(--on-blue-soft); }
.plan-hero h2 { font-size: 28px; overflow-wrap: anywhere; }
.plan-hero .meta { color: var(--on-blue-soft); }
.plan-count { display: flex; align-items: baseline; gap: 10px; margin: 4px 0; }
.plan-count b { font-family: var(--font-display); font-size: 56px; line-height: 1; }
.plan-count small { font-weight: 900; font-size: 16px; }
.plan-today h2 { font-size: 30px; }
.plan-test { background: var(--white); }
.plan-test.is-highlight { background: var(--yellow); animation: wiggle 2.4s ease-in-out infinite; }
.plan-test .btn { background: var(--mint); }
.plan-units { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.plan-units li { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.plan-preview { margin: 0; padding: 10px 14px; border: 2px solid var(--ink); border-radius: 14px; background: #E3ECDD; font-weight: 800; }
input[type="date"].input { padding: 0 12px; }

/* Extras im Shop */
.segmented--5 { grid-template-columns: repeat(5, 1fr); }
.segmented--5 button { font-size: 12px; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.extras { display: flex; flex-direction: column; gap: 14px; padding-bottom: 90px; }
.extra { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; }
.extra .btn { grid-column: 1 / -1; }
.extra__icon svg { width: 64px; height: 64px; display: block; }
.extra__body h2 { font-size: 22px; }
.extra__status { margin-top: 4px; font-weight: 900; font-size: 14px; }
.extra--freezer { background: #E6EBF0; }
.extra--boost { background: #F6EDE0; }

/* =========================================================
   Minigames
   ========================================================= */
.game-card { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; }
.game-card .btn { grid-column: 1 / -1; }
.game-card__icon svg { width: 64px; height: 64px; display: block; }
.game-card h2 { font-size: 22px; }
.game-card__info { margin-top: 4px; font-weight: 900; font-size: 14px; }
.game-card__tier { position: absolute; right: 12px; top: -10px; border: 2px solid var(--ink); transform: rotate(6deg); }
.game-card__tier--max { background: #BCAFCF; }

.game-hearts { font-size: 24px; color: #B35A4E; letter-spacing: 2px; font-weight: 900; }
.game-hearts.is-hit { animation: shake .4s ease; }
.game-score { min-width: 54px; justify-content: center; font-size: 18px; }
.game-start { align-items: center; text-align: center; gap: 10px; }
.game-start__icon svg { width: 90px; height: 90px; display: block; }
.game-start h2 { font-size: 30px; }

.game-stage {
  position: relative; height: min(62vh, 480px); overflow: hidden;
  border: var(--line); border-radius: 24px; box-shadow: 0 6px 0 var(--ink);
  -webkit-user-select: none; user-select: none; touch-action: none;
}
.game-stage.is-shake { animation: shake .35s ease; }
.game-float {
  position: absolute; z-index: 5; translate: -50% 0; pointer-events: none;
  font-family: var(--font-display); font-weight: 700; font-size: 22px; color: #A9792B;
  text-shadow: 0 2px 0 var(--white); animation: float-up .7s ease forwards;
}
@keyframes float-up { to { opacity: 0; transform: translateY(-36px); } }
.game-tip {
  position: absolute; left: 0; right: 0; top: 38%; width: max-content; margin: 0 auto;
  padding: 8px 16px; border: var(--line); border-radius: 16px; background: var(--white);
  font-weight: 900; animation: bob 2s ease-in-out infinite; pointer-events: none;
}

/* Leckerli-Fangen */
.game-stage--treats { background: linear-gradient(#F6E7C1, #E3ECDD 70%); }
.game-stage--treats::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22px; background: #A9C097; border-top: var(--line); }
.catcher { position: absolute; z-index: 2; left: 0; bottom: 6px; width: 84px; will-change: transform; }
.catcher svg, .runner svg { display: block; width: 100%; height: auto; }
.catcher.is-yum svg { animation: yum .25s ease; }
.catcher.is-ouch svg, .runner.is-ouch svg { animation: shake .35s ease; }
@keyframes yum { 50% { transform: scale(1.12, .92); } }
.drop { position: absolute; top: 0; width: 40px; height: 40px; will-change: transform; pointer-events: none; }
.drop svg { width: 100%; height: 100%; display: block; }

/* Hüpf-Lauf */
.game-stage--jump { height: min(48vh, 380px); background: linear-gradient(#C9DCE6, #EAF1EC); }
.game-stage--jump::before {
  content: ""; position: absolute; inset: 30px 0 auto; height: 60px; opacity: .9;
  background:
    radial-gradient(28px 14px at 20% 50%, #fff 98%, transparent) ,
    radial-gradient(36px 16px at 70% 30%, #fff 98%, transparent);
  animation: clouds 18s linear infinite;
}
@keyframes clouds { from { background-position: 0 0; } to { background-position: -400px 0; } }
.game-stage--jump::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40px; background: repeating-linear-gradient(90deg, #A9C097 0 30px, #9DB68B 30px 60px); border-top: var(--line); animation: ground 1s linear infinite; }
@keyframes ground { to { background-position: -60px 0; } }
.runner { position: absolute; z-index: 2; left: 26px; bottom: 36px; width: 70px; will-change: transform; }
.runner svg { animation: run .3s ease-in-out infinite alternate; transform-origin: 50% 100%; }
.runner.is-air svg { animation: none; transform: rotate(-8deg); }
@keyframes run { to { transform: translateY(-3px) rotate(2deg); } }
.obstacle { position: absolute; z-index: 1; left: 0; bottom: 38px; will-change: transform; }
.obstacle svg { display: block; width: 100%; height: auto; }

/* Bilder-Memory */
.game-stage--memory { height: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 12px; background: #E3ECDD; touch-action: manipulation; }
.mem-card {
  aspect-ratio: 1 / 1; padding: 10px; border: var(--line); border-radius: 16px;
  background: #6F8A68; box-shadow: var(--drop-sm);
  display: grid; place-items: center; transition: transform .25s ease, background-color .2s ease;
}
.mem-card::before { content: "?"; font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--white); }
.mem-card__pic { display: none; width: 80%; }
.mem-card__pic svg { width: 100%; height: auto; display: block; }
.mem-card.is-open { background: var(--white); transform: scale(1.03); }
.mem-card.is-open::before { display: none; }
.mem-card.is-open .mem-card__pic { display: block; }
.mem-card.is-found { background: var(--mint); opacity: .75; box-shadow: none; }
.mem-card.is-wrong { animation: shake .35s ease; background: #F4DCD7; }

/* Ballon-Platzen */
.game-stage--balloons { background: linear-gradient(#F1D9D2, #F6EDE0); }
.balloon {
  position: absolute; top: 0; aspect-ratio: 4 / 5; padding: 0;
  border: var(--line); border-radius: 50% 50% 46% 46% / 55% 55% 45% 45%;
  background: var(--c, var(--pink)); box-shadow: inset -8px -10px 0 rgba(74, 55, 40, .12);
  display: grid; place-items: center; will-change: transform;
}
.balloon::after { content: ""; position: absolute; left: 50%; bottom: -26px; width: 2px; height: 24px; background: var(--ink); }
.balloon--gold { background: #E4BC63; box-shadow: inset -8px -10px 0 rgba(169, 121, 43, .3), 0 0 0 4px #F6E7C1; }
.balloon--storm { background: #8F8A86; }
.balloon__face { color: var(--white); font-weight: 900; font-size: 18px; }
.balloon.is-popped { animation: pop-out .3s ease forwards; pointer-events: none; }
@keyframes pop-out { to { opacity: 0; scale: 1.4; } }

/* =========================================================
   Foto-Scan
   ========================================================= */
.segmented--3 { grid-template-columns: 1fr 1fr 1fr; }
.segmented--3 button { font-size: 14px; line-height: 1.1; padding: 4px; }
.scan__tips { display: flex; flex-direction: column; gap: 4px; padding: 10px 14px; border: 2px dashed var(--muted); border-radius: 14px; font-weight: 800; font-size: 14px; list-style: none; }
.scan__progress .bar { height: 14px; border: var(--line); border-radius: 999px; overflow: hidden; background: var(--bg); }
.scan__progress .bar span { display: block; height: 100%; width: 0; background: var(--mint); transition: width .3s ease; }
.scan__progress .meta { margin-top: 6px; text-align: center; }

/* =========================================================
   Klassen-Liga
   ========================================================= */
a.dark-row { text-decoration: none; }
.liga-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.liga-tab {
  flex: none; max-width: 60%; min-height: 40px; padding: 0 16px;
  border: var(--line); border-radius: 999px; background: var(--white);
  font-weight: 900; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.liga-tab[aria-selected="true"] { background: var(--ink); color: var(--white); }
.liga-tab--add { min-width: 44px; padding: 0; font-size: 22px; }
.liga-head h2 { font-size: 28px; }
.liga-code { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.liga-code b { font-family: var(--font-mono, monospace); font-size: 24px; letter-spacing: .12em; background: var(--white); color: var(--ink); padding: 2px 10px; border-radius: 10px; border: var(--line); }
.liga-code .btn { min-height: 40px; height: 40px; padding: 0 16px; font-size: 16px; margin-left: auto; background: var(--yellow); color: var(--ink); }
.liga-explain { font-weight: 800; font-size: 14px; }
.liga-list { list-style: none; display: flex; flex-direction: column; gap: 8px; padding: 0; }
.liga-row {
  display: grid; grid-template-columns: 34px 44px 1fr auto auto; align-items: center; gap: 8px;
  padding: 8px 12px; border: var(--line); border-radius: 18px; background: var(--white); box-shadow: var(--drop-sm);
}
.liga-row.is-me { background: #F6E7C1; }
.liga-row__place { font-family: var(--font-display); font-weight: 700; font-size: 20px; text-align: center; }
.liga-row__pic { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: #E3ECDD; border: 2px solid var(--ink); overflow: hidden; font-weight: 900; }
.liga-row__pic svg { position: absolute; left: -7px; top: -1px; width: 58px; height: 58px; }
.liga-row__name { display: flex; flex-direction: column; font-weight: 900; min-width: 0; overflow-wrap: anywhere; }
.liga-row__name small { font-size: 12px; color: var(--muted); }
.liga-row__score { font-family: var(--font-display); font-weight: 700; font-size: 17px; white-space: nowrap; }
.liga-row__remove { width: 32px; height: 32px; }
.liga-intro { align-items: center; text-align: center; }
.liga-intro__pic { font-size: 54px; line-height: 1; }

/* =========================================================
   Einführung
   ========================================================= */
.intro { gap: 14px; }
.intro__top { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.intro__dots { display: flex; gap: 8px; }
.intro__dots i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink); background: var(--white); transition: width .25s ease; }
.intro__dots i.is-on { width: 26px; border-radius: 999px; background: var(--ink); }
.intro__track { display: flex; touch-action: pan-y; }
.intro__card { flex: 1; min-height: 520px; align-items: center; text-align: center; gap: 14px; padding: 26px 22px; }
.intro__card.is-in { animation: intro-in .35s ease both; }
@keyframes intro-in { from { opacity: 0; transform: translateX(24px); } }
.intro__card h1 { font-size: 30px; line-height: 1.1; }
.intro__text { font-weight: 800; font-size: 17px; line-height: 1.45; color: var(--muted); max-width: 34ch; }
.intro__pic { width: 100%; max-width: 300px; aspect-ratio: 5 / 4; display: grid; place-items: center; border-radius: 28px; background: #E3ECDD; border: var(--line); overflow: hidden; }
.intro__pic--2 { background: #F1D9D2; }
.intro__pic--3 { background: #F6E7C1; }
.intro__pic--4 { background: #C9DCE6; }
.intro__pic--5 { background: #E8E0EE; }
.intro__pic > svg { width: 82%; height: auto; }
.intro__pets { display: flex; align-items: flex-end; justify-content: center; width: 92%; }
.intro__pets span { width: 30%; margin: 0 -2%; }
.intro__pets span.is-big { width: 40%; z-index: 1; }
.intro__pets svg, .intro__home-pet svg { width: 100%; height: auto; display: block; }
.intro__home { position: relative; width: 82%; }
.intro__home > svg { width: 100%; height: auto; display: block; }
.intro__home-pet { position: absolute; left: 34%; bottom: -2%; width: 34%; }
.intro__nav { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }

/* =========================================================
   Impressum / Datenschutz
   ========================================================= */
.legal__card { gap: 6px; }
.legal__card h2 { font-size: 19px; margin-top: 12px; }
.legal__card p, .legal__card li { font-weight: 700; line-height: 1.5; }
.legal__card ul { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.legal__card mark { background: #F6E7C1; border-radius: 4px; padding: 0 3px; }
.legal__short { padding: 12px 14px; border-radius: 14px; background: #E3ECDD; }
.legal__links { text-align: center; font-weight: 800; font-size: 14px; color: var(--muted); }
.legal__links a { color: inherit; }

/* Wer hat Lisan gemacht? */
.maker-card { flex-direction: row; align-items: center; gap: 14px; text-decoration: none; color: inherit; background: #F1D9D2; }
.maker-card__pic { flex: none; width: 58px; height: 58px; display: grid; place-items: center; font-size: 32px; border-radius: 50%; background: var(--white); border: var(--line); }
.maker-card__text { display: flex; flex-direction: column; gap: 2px; }
.maker-card__text b { font-family: var(--font-display); font-weight: 600; font-size: 19px; }
.maker-card__text small { font-weight: 800; font-size: 14px; color: var(--muted); }
.maker-card__link { margin-top: 4px; font-weight: 900; font-size: 14px; color: var(--blue); }
.done__finish { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.done .done__finish .btn { width: auto; font-size: 17px; padding: 0 8px; }

/* Shop-Update: Belohnungen, Neu-Schild, Infozeile */
.shop-item__tier--new { background: var(--mint); }
.shop-item.is-reward .shop-item__pic { filter: grayscale(.85) opacity(.55); }
.shop-item.is-reward-ready { background: #F6E7C1; animation: reward-glow 1.6s ease-in-out infinite; }
@keyframes reward-glow { 50% { box-shadow: 0 0 0 4px #E4BC63, var(--drop-sm); } }
.shop-bar__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.shop-bar__info { font-weight: 800; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-flicker { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker 1.1s ease-in-out infinite; }
@keyframes flicker { 0%, 100% { transform: scale(1, 1); } 33% { transform: scale(1.05, .92); } 66% { transform: scale(.96, 1.06); } }
.fx-leaf { font-size: 24px; }
.fx-spark { fill: #E09A5A; font-size: 22px; }
.fx-steam { fill: #FFFAF2; font-size: 24px; }
.mover.is-on-swing .walker { transform: translateY(16px); }
.mover.is-in-hammock .walker { transform: translateY(-32px); }
.mover.is-on-sofa .walker { transform: translateY(-14px); }
.mover.is-on-sofa-pet .walker { transform: translateY(-50px) scale(1.02, .94); }
.swing-on .swing-moving { visibility: hidden; }
.campfire-flame.is-off { display: none; }
.fire-on .campfire-flame.is-off { display: inline; }
.fire-on .campfire-smoke { display: none; }
.mover.is-eating .walker { animation: eat .45s ease-in-out infinite; }
@keyframes eat { 50% { transform: translateY(4px) rotate(4deg); } }
@media (prefers-reduced-motion: reduce) {
  .fx-flicker, .mover.is-eating .walker, .shop-item.is-reward-ready { animation: none; }
}
.grow-harvest { margin-top: 6px; min-height: 40px; font-size: 15px; }

/* =========================================================
   Mini-Freunde
   ========================================================= */
.minis { gap: 10px; }
.mini-goals { display: flex; flex-direction: column; gap: 8px; }
.mini-goal { display: grid; grid-template-columns: 46px 1fr; gap: 10px; align-items: center; padding: 8px 10px; border: 2px solid var(--ink); border-radius: 14px; background: #F6EDE0; }
.mini-goal__pic svg { width: 46px; height: 46px; display: block; }
.mini-goal__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mini-goal__body b { font-size: 15px; }
.mini-goal__body small { font-weight: 800; font-size: 13px; color: var(--muted); }
.mini-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mini-slot { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border: 2px solid var(--ink); border-radius: 14px; background: var(--white); font: inherit; color: inherit; }
.mini-slot.is-active { background: #E3ECDD; box-shadow: 0 0 0 3px var(--mint); }
.mini-slot__pic { width: 100%; aspect-ratio: 1; display: grid; place-items: center; }
.mini-slot__pic svg { width: 100%; height: 100%; }
.mini-slot.is-unknown { background: #EFE6D8; }
.mini-slot__q { width: 70%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: #D9CDBB; color: #FFFAF2; font-family: var(--font-display); font-size: 30px; font-weight: 700; }
.mini-slot b { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-slot small { font-size: 11px; font-weight: 800; color: var(--muted); text-align: center; line-height: 1.15; }
.mini-dialog { text-align: center; }
.mini-dialog__pic { width: 130px; height: 130px; margin: 0 auto 6px; font-size: 80px; line-height: 130px; }
.mini-dialog__pic svg { width: 100%; height: 100%; }
.mini-dialog--new .mini-dialog__pic { animation: pop-in .6s var(--ease) both; }
.mini-dialog .stack { gap: 8px; margin-top: 12px; }
.mini-home { gap: 8px; text-decoration: none; color: inherit; padding: 12px 14px; }
.mini-home.is-ready { background: #F6E7C1; animation: reward-glow 1.6s ease-in-out infinite; }
.mini-home__row { display: grid; grid-template-columns: 40px 1fr 70px; gap: 10px; align-items: center; }
.mini-home__pic { width: 40px; height: 40px; display: grid; place-items: center; font-size: 28px; }
.mini-home__pic svg { width: 40px; height: 40px; }
.mini-home__row > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.mini-home__row b { font-size: 15px; }
.mini-home__row small { font-weight: 800; font-size: 12px; color: var(--muted); }
.mini-home__bar { height: 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--bg); overflow: hidden; }
.mini-home__bar > i { display: block; height: 100%; background: var(--mint); }
.egg--wobble .egg__shell { transform-box: fill-box; transform-origin: 50% 100%; animation: egg-wobble 2.4s ease-in-out infinite; }
.egg--ready .egg__shell { transform-box: fill-box; transform-origin: 50% 100%; animation: egg-wobble .9s ease-in-out infinite; }
@keyframes egg-wobble { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-8deg); } 86% { transform: rotate(7deg); } 94% { transform: rotate(-4deg); } }
@media (prefers-reduced-motion: reduce) { .egg__shell, .mini-home.is-ready { animation: none !important; } }
