/* Lese-App: Stil. Eine Schrift (Andika, gebaut für Leseanfänger), Wiesen-Palette,
   die Lupe beim Wort-Antippen ist das eine auffällige Element. */
@font-face { font-family: "Andika"; src: url("/static/fonts/andika-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Andika"; src: url("/static/fonts/andika-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink: #1f2a44;
  --ink-soft: #4d5873;
  --paper: #f3f7f2;
  --page: #ffffff;
  --meadow: #3e8e6b;
  --meadow-dark: #2c6b50;
  --meadow-pale: #dcefe4;
  --rosette: #d6455d;
  --straw: #f2c14e;
  --straw-pale: #fdf1cf;
  --sky: #6ba8d6;
  --sky-pale: #e3f0fa;
  --saddle: #a8693b;
  --line: #d6dfd8;
  --radius-big: 28px;
  --radius: 16px;
  --radius-small: 10px;
  --shadow: 0 6px 0 rgba(31, 42, 68, .12);
  --reading-size: clamp(30px, 3.6vw, 46px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Andika", "Andika New Basic", "Comic Neue", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  touch-action: manipulation;
}
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 4px solid var(--sky); outline-offset: 3px; }
input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
#app { min-height: 100%; }

/* ---------- Knöpfe ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  border: 0; border-radius: 999px; padding: .7em 1.4em; font-size: 1.2rem; font-weight: 700;
  background: var(--meadow); color: #fff; box-shadow: 0 5px 0 var(--meadow-dark);
  transition: transform .08s ease, box-shadow .08s ease;
  min-height: 56px;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--meadow-dark); }
.btn.big { font-size: 1.6rem; padding: .8em 1.8em; min-height: 72px; }
.btn.soft { background: #fff; color: var(--ink); box-shadow: 0 5px 0 var(--line); border: 2px solid var(--line); }
.btn.soft:active { box-shadow: 0 1px 0 var(--line); }
.btn.red { background: var(--rosette); box-shadow: 0 5px 0 #a8303f; }
.btn.sky { background: var(--sky); box-shadow: 0 5px 0 #4a85b3; }
.btn.straw { background: var(--straw); color: var(--ink); box-shadow: 0 5px 0 #c99a2a; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn {
  width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--line); background: #fff;
  display: inline-grid; place-items: center; box-shadow: 0 4px 0 var(--line); padding: 0;
}
.icon-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.icon-btn svg { width: 34px; height: 34px; }
.icon-btn.on { background: var(--straw-pale); border-color: var(--straw); box-shadow: 0 4px 0 #e0b23e; }
.icon-btn.rec { background: var(--rosette); border-color: var(--rosette); color: #fff; box-shadow: 0 4px 0 #a8303f; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.06); } }

/* ---------- Koppeln / PIN ---------- */
.center-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.pin-card { background: #fff; border-radius: var(--radius-big); padding: 32px; width: min(420px, 100%); text-align: center; box-shadow: var(--shadow); }
.pin-card h1 { margin: 0 0 8px; font-size: 1.7rem; }
.pin-card p { color: var(--ink-soft); margin: 0 0 18px; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 14px 0 22px; }
.pin-dots span { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--ink-soft); }
.pin-dots span.full { background: var(--ink); border-color: var(--ink); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pin-pad button { height: 68px; border-radius: var(--radius); border: 2px solid var(--line); background: var(--paper); font-size: 1.6rem; font-weight: 700; }
.pin-pad button:active { background: var(--meadow-pale); }
.error-text { color: var(--rosette); min-height: 1.4em; margin-top: 10px; font-weight: 700; }

/* ---------- Kopfzeile Kinderteil ---------- */
.topbar { display: flex; align-items: center; gap: 14px; padding: 14px 20px; }
.topbar .avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--meadow-pale); overflow: hidden; flex: none; border: 3px solid #fff; box-shadow: 0 3px 0 var(--line); }
.topbar .avatar svg { width: 100%; height: 100%; }
.topbar .hello { font-size: 1.5rem; font-weight: 700; }
.topbar .spacer { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 700; border: 2px solid var(--line); }
.chip svg { width: 22px; height: 22px; }
.parent-link { opacity: .55; font-size: .95rem; background: none; border: 0; padding: 10px; }

/* ---------- Startseite ---------- */
.home { padding: 0 20px 40px; max-width: 1200px; margin: 0 auto; }
.case-file {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 0; background: #fff; border-radius: var(--radius-big);
  overflow: hidden; box-shadow: var(--shadow); border: 3px solid #fff;
}
.case-file .cover { aspect-ratio: 16 / 10; background: var(--sky-pale); position: relative; }
.case-file .cover svg { position: absolute; inset: 0; }
.case-file .info { padding: 28px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.case-file .kicker { color: var(--meadow-dark); font-weight: 700; font-size: 1.1rem; }
.case-file h2 { margin: 0; font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.15; }
.case-file .done-note { background: var(--meadow-pale); border-radius: var(--radius); padding: 12px 16px; font-weight: 700; }
.empty-case { background: #fff; border-radius: var(--radius-big); padding: 32px; box-shadow: var(--shadow); font-size: 1.3rem; }

.section-title { font-size: 1.5rem; margin: 34px 0 14px; }
.rosette-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.rosette-item { background: #fff; border: 0; border-radius: var(--radius); padding: 14px 10px 12px; text-align: center; box-shadow: 0 4px 0 var(--line); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rosette-item:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.rosette-item svg { width: 84px; height: 104px; }
.rosette-item .t { font-weight: 700; font-size: 1rem; line-height: 1.2; }
.rosette-item .s { color: var(--ink-soft); font-size: .9rem; }

/* ---------- Leseansicht ---------- */
.reader { height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; }
.reader-top { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.progress { flex: 1; height: 14px; background: #fff; border-radius: 999px; overflow: hidden; border: 2px solid var(--line); }
.progress > div { height: 100%; background: var(--meadow); border-radius: 999px; transition: width .3s ease; }
.page-wrap { min-height: 0; padding: 0 16px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; }
.picture { border-radius: var(--radius-big); overflow: hidden; background: var(--sky-pale); position: relative; min-height: 0; box-shadow: var(--shadow); }
.picture svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.text-page {
  background: var(--page); border-radius: var(--radius-big); padding: clamp(18px, 3vw, 40px); overflow-y: auto;
  box-shadow: var(--shadow); display: flex; flex-direction: column; justify-content: center; min-height: 0;
}
.text-page.adult { background: var(--straw-pale); }
.reader-badge { align-self: flex-start; font-weight: 700; border-radius: 999px; padding: 6px 14px; margin-bottom: 14px; font-size: 1rem; }
.reader-badge.child { background: var(--meadow-pale); color: var(--meadow-dark); }
.reader-badge.adult { background: #fff; color: var(--saddle); }
.story-text { font-size: var(--reading-size); line-height: 1.75; letter-spacing: .01em; word-spacing: .12em; }
.text-page.adult .story-text { font-size: calc(var(--reading-size) * .62); line-height: 1.6; }
.w { border-radius: 10px; padding: 0 .04em; cursor: pointer; transition: background .15s; }
.w:active { background: var(--sky-pale); }
.w.speaking { background: var(--straw); }
.w.focus-word { text-decoration: underline; text-decoration-color: var(--saddle); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.story-text.focus-mode .sent { opacity: .18; transition: opacity .2s; }
.story-text.focus-mode .sent.current { opacity: 1; }
.talk-box { margin-top: 20px; background: #fff; border-radius: var(--radius); padding: 14px 18px; display: flex; gap: 12px; align-items: flex-start; }
.talk-box svg { flex: none; width: 34px; height: 34px; color: var(--saddle); }
.talk-box .q { font-size: 1.15rem; }
.focus-list { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 10px; }
.focus-list button { background: #fff; border: 2px solid var(--saddle); color: var(--saddle); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 1.05rem; }
.reader-bottom { display: flex; align-items: center; gap: 12px; padding: 14px 16px 18px; }
.reader-bottom .spacer { flex: 1; }
.nav-btn { width: 84px; height: 72px; border-radius: 999px; border: 0; background: var(--meadow); color: #fff; box-shadow: 0 5px 0 var(--meadow-dark); display: grid; place-items: center; }
.nav-btn svg { width: 40px; height: 40px; }
.nav-btn.back { background: #fff; color: var(--ink); box-shadow: 0 5px 0 var(--line); border: 2px solid var(--line); }
.nav-btn:active { transform: translateY(4px); box-shadow: none; }
.nav-btn[disabled] { opacity: .3; }
.my-rec { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink-soft); }

/* ---------- Lupe (Wort antippen) ---------- */
.lens-backdrop { position: fixed; inset: 0; background: rgba(31, 42, 68, .45); display: grid; place-items: center; z-index: 50; padding: 18px; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.lens {
  background: #fff; width: min(720px, 100%); border-radius: 40px; padding: 26px 26px 22px; position: relative;
  border: 10px solid var(--saddle); box-shadow: 0 0 0 6px #fff, 0 18px 40px rgba(0,0,0,.25);
  animation: lens-in .22s cubic-bezier(.2,1.4,.4,1);
}
@keyframes lens-in { from { transform: scale(.7); opacity: 0; } }
.lens::after { /* Griff der Lupe */
  content: ""; position: absolute; width: 34px; height: 120px; background: var(--saddle); border-radius: 17px;
  right: -40px; bottom: -92px; transform: rotate(-38deg); box-shadow: inset -6px 0 0 rgba(0,0,0,.15);
}
.lens-close { position: absolute; top: 12px; right: 14px; border: 0; background: var(--paper); width: 52px; height: 52px; border-radius: 50%; font-size: 1.6rem; font-weight: 700; }
.lens-word { display: flex; justify-content: center; padding: 42px 0 10px; position: relative; }
.lw { display: inline-flex; font-size: clamp(64px, 11vw, 110px); line-height: 1; font-weight: 400; position: relative; letter-spacing: .02em; }
.lw .ch { position: relative; padding: 0 .02em 30px; display: inline-block; transition: color .15s; }
.lw .ch.lit { color: var(--rosette); }
.lw .ch.tricky-ch { color: var(--rosette); }
.sb-dot { position: absolute; bottom: 4px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--ink); transition: background .15s, transform .15s; }
.sb-line { position: absolute; bottom: 9px; height: 7px; border-radius: 4px; background: var(--ink); transition: background .15s; }
.sb-split { position: absolute; bottom: -6px; height: 26px; border: 6px solid var(--ink); border-top: 0; border-radius: 0 0 26px 26px; transition: border-color .15s; }
.sb-dot.lit, .sb-line.lit { background: var(--rosette); transform: scale(1.25); }
.sb-split.lit { border-color: var(--rosette); }
.syl-arc { position: absolute; top: -26px; height: 26px; border: 5px solid var(--sky); border-bottom: 0; border-radius: 40px 40px 0 0; transition: border-color .15s; }
.syl-arc.lit { border-color: var(--straw); }
.heart { position: absolute; top: -40px; width: 36px; height: 36px; color: var(--rosette); }
.lens-info { text-align: center; color: var(--ink-soft); font-size: 1.15rem; min-height: 1.5em; margin: 6px 0 4px; }
.lens-german { text-align: center; font-size: 1.3rem; margin: 6px 0 2px; }
.lens-german b { color: var(--meadow-dark); }
.lens-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 14px; }

/* ---------- Aufwärmen ---------- */
.warm { height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; }
.warm-card { margin: 0 auto; align-self: center; background: #fff; border-radius: var(--radius-big); padding: 28px 32px; width: min(780px, calc(100% - 32px)); text-align: center; box-shadow: var(--shadow); }
.warm-kind { font-weight: 700; display: inline-block; border-radius: 999px; padding: 6px 14px; margin-bottom: 4px; }
.warm-kind.easy { background: var(--meadow-pale); color: #2f7a52; }
.warm-kind.challenge { background: var(--sky-pale); color: #2f6c99; }
.warm-kind.tricky { background: #fbe1e5; color: var(--rosette); }
.warm-kind.review { background: var(--straw-pale); color: #8a6512; }
.warm-hint { color: var(--ink-soft); font-size: 1.15rem; }

/* ---------- Fragen / Reihenfolge / Malen ---------- */
.activity { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; }
.act-body { width: min(980px, calc(100% - 32px)); margin: 0 auto; align-self: center; }
.question { background: #fff; border-radius: var(--radius-big); padding: 26px; box-shadow: var(--shadow); }
.question h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 18px; display: flex; gap: 14px; align-items: center; }
.options { display: grid; gap: 14px; }
.option { text-align: left; background: var(--paper); border: 3px solid var(--line); border-radius: var(--radius); padding: 16px 20px; font-size: clamp(1.3rem, 2.4vw, 1.7rem); display: flex; align-items: center; gap: 14px; }
.option .speak { flex: none; }
.option.right { background: var(--meadow-pale); border-color: var(--meadow); }
.option.wrong { background: #fbe1e5; border-color: var(--rosette); }
.feedback { font-size: 1.4rem; font-weight: 700; min-height: 1.6em; margin-top: 14px; text-align: center; }
.order-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.order-card { position: relative; aspect-ratio: 16/10; border-radius: var(--radius); overflow: hidden; border: 4px solid #fff; box-shadow: 0 5px 0 var(--line); background: var(--sky-pale); padding: 0; }
.order-card svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.order-card .num { position: absolute; top: 10px; left: 10px; width: 54px; height: 54px; border-radius: 50%; background: var(--straw); font-size: 1.8rem; font-weight: 700; display: grid; place-items: center; box-shadow: 0 3px 0 #c99a2a; }
.order-card.picked { border-color: var(--straw); }
.order-card.ok { border-color: var(--meadow); }
.order-card.bad { border-color: var(--rosette); }
.draw-wrap { background: #fff; border-radius: var(--radius-big); padding: 14px; box-shadow: var(--shadow); }
.draw-wrap canvas { width: 100%; aspect-ratio: 16/10; border-radius: var(--radius); background: #fff; border: 2px dashed var(--line); touch-action: none; display: block; }
.palette { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.swatch { width: 48px; height: 48px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 0 0 2px var(--line); }
.swatch.on { box-shadow: 0 0 0 4px var(--ink); }
.size-btn { width: 54px; height: 48px; border-radius: 14px; border: 2px solid var(--line); background: #fff; display: grid; place-items: center; }
.size-btn.on { border-color: var(--ink); }
.size-btn i { display: block; border-radius: 50%; background: var(--ink); }

/* ---------- Abschluss ---------- */
.finish { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; text-align: center; padding: 24px; }
.finish h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 10px 0; }
.finish .big-rosette { width: 220px; height: 280px; animation: rosette-in 1s cubic-bezier(.2,1.5,.4,1) both; }
@keyframes rosette-in { 0% { transform: scale(.2) rotate(-30deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.stars { display: flex; gap: 12px; justify-content: center; margin: 10px 0 24px; }
.stars svg { width: 64px; height: 64px; animation: pop .4s ease both; }
.stars svg:nth-child(2) { animation-delay: .25s; }
.stars svg:nth-child(3) { animation-delay: .5s; }
@keyframes pop { from { transform: scale(0); } 60% { transform: scale(1.3); } }

/* ---------- Einrichtung (Held und Pony) ---------- */
.setup { max-width: 1000px; margin: 0 auto; padding: 24px; }
.setup h1 { font-size: 2.2rem; margin: 10px 0 18px; }
.setup-grid { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
.setup-preview { background: #fff; border-radius: var(--radius-big); box-shadow: var(--shadow); aspect-ratio: 3/4; display: grid; place-items: center; padding: 14px; }
.setup-preview svg { width: 100%; height: 100%; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 1.25rem; margin-bottom: 8px; }
.field input[type=text] { width: 100%; font-size: 1.8rem; padding: 12px 18px; border-radius: var(--radius); border: 3px solid var(--line); background: #fff; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { min-width: 56px; height: 56px; border-radius: var(--radius); border: 3px solid var(--line); background: #fff; padding: 0 14px; font-weight: 700; }
.choice.color { width: 56px; padding: 0; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 0 0 2px var(--line); }
.choice.on { border-color: var(--ink); box-shadow: 0 0 0 3px var(--ink); }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px; font-weight: 700; z-index: 80; max-width: 90vw; text-align: center; }

/* ---------- Elternbereich (Deutsch) ---------- */
.parent { max-width: 1100px; margin: 0 auto; padding: 18px 18px 60px; font-size: 1.05rem; }
.parent header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.parent header h1 { font-size: 1.6rem; margin: 0; flex: 1; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 20px; }
.tabs button { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 16px; font-weight: 700; }
.tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.panel { background: #fff; border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; border: 2px solid var(--line); }
.panel h2 { margin: 0 0 12px; font-size: 1.25rem; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat { background: var(--paper); border-radius: var(--radius-small); padding: 12px 14px; }
.stat b { display: block; font-size: 1.7rem; }
.stat span { color: var(--ink-soft); }
.cal { display: grid; grid-template-columns: repeat(15, 1fr); gap: 5px; }
.cal div { aspect-ratio: 1; border-radius: 6px; background: var(--paper); border: 1px solid var(--line); }
.cal div.l1 { background: #b8dfc9; } .cal div.l2 { background: #7cc19c; } .cal div.l3 { background: var(--meadow); }
table.t { width: 100%; border-collapse: collapse; }
table.t th, table.t td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t th { color: var(--ink-soft); font-weight: 700; font-size: .95rem; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .9rem; font-weight: 700; background: var(--paper); }
.pill.ok { background: var(--meadow-pale); color: var(--meadow-dark); }
.pill.warn { background: var(--straw-pale); color: #8a6512; }
.pill.bad { background: #fbe1e5; color: var(--rosette); }
.small-btn { border: 2px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 12px; font-weight: 700; font-size: .95rem; }
.small-btn.danger { color: var(--rosette); }
.form-row { display: grid; grid-template-columns: 240px 1fr; gap: 12px; align-items: center; margin-bottom: 14px; }
.form-row label { font-weight: 700; }
.form-row input[type=text], .form-row input[type=password], .form-row input[type=number], .form-row select { padding: 10px 12px; border-radius: 10px; border: 2px solid var(--line); background: #fff; width: 100%; }
.hint { color: var(--ink-soft); font-size: .95rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gallery figure { margin: 0; background: var(--paper); border-radius: var(--radius-small); padding: 8px; }
.gallery img { width: 100%; border-radius: 8px; background: #fff; }
.gallery figcaption { font-size: .9rem; color: var(--ink-soft); padding: 6px 2px 0; display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.sound-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.sound { background: var(--paper); border-radius: var(--radius-small); padding: 10px 12px; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.sound .k { font-weight: 700; font-size: 1.2rem; }
.story-preview { font-size: 1.1rem; line-height: 1.6; }
.story-preview p { margin: 0 0 10px; }
.story-preview .adult { background: var(--straw-pale); border-radius: 10px; padding: 8px 12px; }
.wc-decodable { color: var(--meadow-dark); } .wc-tricky { color: var(--rosette); font-weight: 700; } .wc-challenge { background: var(--sky-pale); border-radius: 4px; } .wc-name { color: var(--saddle); }

@media (max-width: 900px) and (orientation: portrait), (max-width: 720px) {
  .page-wrap { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .picture { min-height: 34vh; }
  .text-page { max-height: 48vh; }
  .case-file { grid-template-columns: 1fr; }
  .setup-grid { grid-template-columns: 1fr; }
  .setup-preview { max-width: 260px; margin: 0 auto; }
  .form-row { grid-template-columns: 1fr; }
  .order-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Stufe 2: Leseprüfung ---------- */
.w.r-ok { box-shadow: inset 0 -5px 0 #b8dfc9; }
.w.r-wrong { background: var(--straw-pale); box-shadow: inset 0 -5px 0 var(--straw); }
.w.r-skipped { outline: 3px dashed var(--straw); outline-offset: -2px; }
.weak-ch { color: var(--rosette); }
.read-result { margin-top: 18px; background: var(--straw-pale); border-radius: var(--radius); padding: 14px 16px; font-size: 1.2rem; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.read-result.good { background: var(--meadow-pale); justify-content: flex-start; font-weight: 700; }
.read-result.good svg { width: 40px; height: 40px; flex: none; }
.read-result.soft { background: var(--sky-pale); }
.read-result .rr-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.checking { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--meadow-dark); }
.checking svg { width: 30px; height: 30px; animation: sway 1s ease-in-out infinite; }
@keyframes sway { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(12deg) translateX(4px); } }
.btn.rec-on { animation: pulse 1.2s ease-in-out infinite; }
.my-rec { flex-wrap: wrap; }
/* Elternbereich: Bewertung der Aufnahmen */
.rec-card { border-top: 1px solid var(--line); padding: 14px 0; }
.rec-card:first-of-type { border-top: 0; }
.rec-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.rec-text { font-size: 1.15rem; line-height: 1.9; margin: 8px 0; }
.rw { border-radius: 6px; padding: 1px 3px; }
.rw.ok { background: #e3f3e9; } .rw.unsure { background: #fdeccc; } .rw.wrong { background: #fbd5dc; }
.rw.skipped { background: #eceff1; text-decoration: line-through; } .rw.not_read { color: #9aa3b5; }
.rw.lab-ok { outline: 2px solid var(--meadow); } .rw.lab-wrong { outline: 2px solid var(--rosette); }
.rec-text.labeling .rw { cursor: pointer; }
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; align-items: end; height: 110px; margin-top: 8px; }
.bars div { background: var(--meadow); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.bars div span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: .75rem; color: var(--ink-soft); white-space: nowrap; }
.legend-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }

/* ---------- Kleiderschrank ---------- */
.wardrobe { max-width: 1200px; margin: 0 auto; padding: 20px; display: grid; grid-template-columns: 340px 1fr; gap: 26px; align-items: start; }
.wd-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; }
.wd-preview { background: #fff; border-radius: var(--radius-big); box-shadow: var(--shadow); aspect-ratio: 3 / 4; display: flex; align-items: center; justify-content: center; padding: 18px; }
.wd-preview svg { width: 100%; height: 100%; display: block; margin: 0 auto; }
.wd-name { text-align: center; font-size: 1.6rem; font-weight: 700; }
.wd-rank { display: flex; align-items: center; justify-content: center; gap: 8px; background: #fff; border-radius: 999px; padding: 8px 16px; font-weight: 700; border: 2px solid var(--line); }
.wd-rank svg { width: 26px; height: 26px; }
.wd-rank b { color: #8a6512; }
.wd-next { text-align: center; color: var(--ink-soft); font-weight: 700; }
.wd-bar { height: 12px; background: #fff; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.wd-bar div { height: 100%; background: var(--straw); }
.wd-main h1 { font-size: 2.2rem; margin: 6px 0 14px; }
.wd-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }
.wd-tabs button { border: 3px solid var(--line); background: #fff; border-radius: 999px; padding: 10px 20px; font-weight: 700; font-size: 1.15rem; }
.wd-tabs button.on { background: var(--meadow); border-color: var(--meadow); color: #fff; }
.wd-group h3 { margin: 16px 0 8px; font-size: 1.2rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.tile { position: relative; background: #fff; border: 3px solid var(--line); border-radius: var(--radius); padding: 8px 6px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 104px; }
.tile.color { min-height: 0; aspect-ratio: 1; padding: 8px; justify-content: center; }
.tile-swatch { display: block; width: 100%; height: 100%; min-width: 40px; min-height: 40px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(0,0,0,.08); }
.tile-icon { width: 64px; height: 64px; display: grid; place-items: center; }
.tile-icon svg, .tile-icon img { width: 100%; height: 100%; display: block; }
.tile-label { font-weight: 700; font-size: .95rem; text-align: center; line-height: 1.15; }
.tile.on { border-color: var(--ink); box-shadow: 0 0 0 3px var(--ink); }
.tile.locked > .tile-icon, .tile.locked > .tile-swatch, .tile.locked > .tile-label { opacity: .35; filter: grayscale(.7); }
.tile-lock { position: absolute; left: 50%; top: 6px; transform: translateX(-50%); background: var(--ink); color: #fff; border-radius: 999px; padding: 2px 8px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.tile.color .tile-lock { top: 50%; bottom: auto; transform: translate(-50%, -50%); }
.tile-new { position: absolute; top: -8px; right: -6px; background: var(--rosette); color: #fff; border-radius: 999px; padding: 2px 8px; font-size: .75rem; font-weight: 700; }
.wd-footer { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 10px; }
.wd-main .field input[type=text] { width: 100%; font-size: 1.8rem; padding: 12px 18px; border-radius: var(--radius); border: 3px solid var(--line); background: #fff; }
.topbar .avatar { padding: 0; cursor: pointer; }
.rank-line { font-size: 1rem; color: var(--meadow-dark); }
.wardrobe-chip { cursor: pointer; position: relative; }
.dot-new { background: var(--rosette); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: .75rem; margin-left: 4px; }
.rank-up { font-size: 1.4rem; margin: 6px 0 14px; display: flex; gap: 8px; justify-content: center; align-items: center; }
.rank-up svg { width: 34px; height: 34px; }
.new-box { background: #fff; border-radius: var(--radius-big); padding: 16px 18px; margin: 0 auto 22px; max-width: 640px; box-shadow: var(--shadow); }
.unlock-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 12px 0; }
.unlock-item { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 92px; font-weight: 700; font-size: .9rem; }
.unlock-item svg, .unlock-item img { width: 64px; height: 64px; }
.unlock-item .tile-swatch { width: 54px; height: 54px; min-width: 0; min-height: 0; }
@media (max-width: 900px) {
  .wardrobe { grid-template-columns: 1fr; }
  .wd-side { position: static; }
  .wd-preview { max-width: 280px; margin: 0 auto; width: 100%; }
}

/* Leselineal: Schritt für Schritt nach unten */
.ruler-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; background: var(--straw-pale); border-radius: var(--radius); padding: 8px; }
.ruler-nav .btn { min-height: 52px; font-size: 1.1rem; padding: .5em 1em; }
.ruler-nav .rn-pos { font-weight: 700; color: var(--ink-soft); }
.story-text.focus-mode .sent.current { background: var(--straw-pale); border-radius: 12px; box-shadow: 0 0 0 6px var(--straw-pale); }

/* eigene Aufnahme anhören */
.mine { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mine .icon-btn.on { background: var(--rosette); color: #fff; }
.mine-bar { width: 160px; height: 14px; border-radius: 7px; background: var(--paper); border: 2px solid var(--saddle); overflow: hidden; cursor: pointer; }
.mine-bar div { height: 100%; width: 0; background: var(--rosette); }
.mine-label { font-weight: 700; color: var(--ink-soft); }
.btn.round { width: 64px; padding-left: 0; padding-right: 0; justify-content: center; }
.btn.round svg { width: 30px; height: 30px; }
.wd-badges { margin-top: 12px; text-align: center; }
.wd-badges-h { font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; }
.wd-badge-row { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.wd-badge { width: 26px; height: 26px; color: #d9d2c6; }
.wd-badge.on { color: #f2b342; }
.wd-badge svg { width: 100%; height: 100%; }
.wd-badge-next { font-size: .95rem; color: var(--ink-soft); margin-top: 4px; }
.wd-badge:not(.on) svg { filter: grayscale(1); opacity: .3; }
.app-ver { position: fixed; right: 10px; bottom: 6px; font-size: .8rem; color: var(--ink-soft); opacity: .7; pointer-events: none; }
.parent header .ver { font-size: .9rem; color: var(--ink-soft); margin-right: auto; margin-left: 12px; }
.ask-card { background: #fff; border-radius: 24px; padding: 24px; max-width: 520px; width: 100%; box-shadow: 0 18px 40px rgba(0,0,0,.25); }
.ask-card p { font-size: 1.15rem; margin: 0 0 18px; }
.ask-actions { display: flex; gap: 12px; justify-content: flex-end; }
button, .tile, .w, [data-a] { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
