/* Lern-App · ein Rahmen, drei Modi. Schriften liegen lokal (keine Google-Server). */
@font-face { font-family: Fredoka; src: url(../assets/fonts/fredoka-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: Fredoka; src: url(../assets/fonts/fredoka-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: Fredoka; src: url(../assets/fonts/fredoka-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url(../assets/fonts/dm-sans-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url(../assets/fonts/dm-sans-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url(../assets/fonts/dm-sans-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url(../assets/fonts/dm-sans-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: Poppins; src: url(../assets/fonts/poppins-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: Poppins; src: url(../assets/fonts/poppins-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url(../assets/fonts/instrument-serif-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url(../assets/fonts/instrument-serif-latin-400-italic.woff2) format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }

/* ---------- Tokens: Erwachsen, Eltern, Lehrkraft (magnetic habits hell) ---------- */
:root, .app {
  --paper: #f4f7fc; --paper2: #e8eef9; --card: #ffffff;
  --ink: #17203a; --ink2: #414c69; --ink3: #5c6680;
  --line: #d8e0ee; --line2: #7a85a0; --link: #28427f;
  --btn: #1b2950; --btn-ink: #f6f2ea; --focus: #3a6ce0;
  --bolt: #f1c74a; --bolt-line: #9a7414;
  --hint: #fff6d8; --hint-line: #f1d27a; --accent: #7c5d08;
  --ok: #2d5a4b; --okbg: #e6f2ec;
  --sh: 0 1px 0 rgba(23,32,58,.04), 0 10px 24px -16px rgba(23,32,58,.35);
  --r: 22px; --r-s: 14px; --tap: 44px;
  --f-head: 'Instrument Serif', Georgia, serif; --f-ui: Poppins, 'DM Sans', system-ui, sans-serif; --f-body: 'DM Sans', system-ui, sans-serif;
  --fs: 16px; --gap: 16px;
  --m-motivation: #3c4d73; --m-clarity: #284e3f; --m-inspiration: #56354b; --m-gratitude: #61704c; --m-friendship: #376870; --m-joy: #955c45; --m-love: #874246; --m-calm: #7b6a7f;
}
.app[data-theme="dunkel"] {
  --paper: #121827; --paper2: #192132; --card: #1e273a;
  --ink: #eee8dc; --ink2: #d3d6dd; --ink3: #bcc0c9;
  --line: #2d3750; --line2: #6b7590; --link: #b3c1e6;
  --btn: #f1c74a; --btn-ink: #141a28; --focus: #f1c74a;
  --hint: #2a2a1e; --hint-line: #8a7a3a; --accent: #f1c74a;
  --ok: #9fd3bd; --okbg: #1e322a;
  --sh: 0 0 0 1px #2d3750, 0 12px 24px -18px rgba(0,0,0,.6);
  --m-motivation: #4e6087; --m-clarity: #436a5a; --m-inspiration: #77546b; --m-gratitude: #61704c; --m-friendship: #376870; --m-joy: #955c45; --m-love: #8e484c; --m-calm: #7b6a7f;
}
/* Jugendlich: Poppins oben, dichter */
.app[data-modus="jugend"] { --f-head: Poppins, 'DM Sans', sans-serif; --tap: 48px; }
/* Kind: little champions, Kreidefarben, große Flächen */
.app[data-modus="kind"] {
  --paper: #fcf9f2; --paper2: #f3ecdd; --card: #ffffff;
  --ink: #22293d; --ink2: #4a5368; --ink3: #5e6577;
  --line: #e7e0d1; --line2: #847c6b; --link: #2c3a63;
  --btn: #22293d; --btn-ink: #fcf9f2; --focus: #3a6ce0;
  --hint: #e9eef9; --hint-line: #b7c4e6; --accent: #2c3a63;
  --ok: #2d5a4b; --okbg: #e6f2ec;
  --sh: inset 0 0 0 1px #e7e0d1, inset 0 -5px 0 rgba(34,41,61,.08), 0 10px 18px -14px rgba(34,41,61,.45);
  --r: 26px; --tap: 64px; --fs: 18px;
  --f-head: Fredoka, 'DM Sans', sans-serif; --f-ui: Fredoka, 'DM Sans', sans-serif;
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #f4f7fc; }
.app { min-height: 100vh; min-height: 100dvh; background: var(--paper); color: var(--ink); font-family: var(--f-body); font-size: var(--fs); line-height: 1.5; -webkit-font-smoothing: antialiased; }
.app[data-modus="kind"] { background: var(--paper); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--link); }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 10px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--btn); color: var(--btn-ink); padding: 10px 16px; border-radius: 999px; }
.skip:focus { top: 12px; }
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.h1 { font-family: var(--f-head); font-size: clamp(34px, 6vw, 48px); line-height: 1.05; }
.app[data-modus="kind"] .h1 { font-weight: 600; font-size: clamp(28px, 6vw, 34px); line-height: 1.15; }
.app[data-modus="jugend"] .h1 { font-weight: 600; font-size: clamp(24px, 5vw, 30px); line-height: 1.2; }
.h2 { font-family: var(--f-ui); font-weight: 600; font-size: 20px; line-height: 1.3; }
.app[data-modus="kind"] .h2 { font-size: 22px; }
.h3 { font-family: var(--f-ui); font-weight: 600; font-size: 17px; line-height: 1.3; }
.lead { font-size: 1.06em; color: var(--ink2); }
.small { font-size: 14px; color: var(--ink2); }
.tiny { font-size: 13px; color: var(--ink3); }
.muted { color: var(--ink2); }
.label { font-family: Poppins, 'DM Sans', sans-serif; font-weight: 600; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); }
.app[data-modus="kind"] .label { font-family: Fredoka, sans-serif; letter-spacing: .04em; text-transform: none; font-size: 15px; color: var(--ink2); }
.stack { display: flex; flex-direction: column; gap: var(--gap); }
.stack-s { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }

/* ---------- Rahmen ---------- */
.frame { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.app[data-modus="kind"] .top { border-bottom: 0; }
.top .title { font-family: var(--f-ui); font-weight: 600; font-size: 17px; }
.main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 20px 16px 120px; display: flex; flex-direction: column; gap: 20px; }
.main.wide { max-width: 1120px; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 8px 10px; padding-bottom: max(8px, env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); }
.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; border-radius: 16px; color: var(--ink2); text-decoration: none; font-family: var(--f-ui); font-weight: 600; font-size: 13px; }
.tabs a svg { width: 26px; height: 26px; }
.tabs a[aria-current="page"] { color: var(--ink); background: var(--paper2); }
.app[data-modus="kind"] .tabs { padding: 10px 12px; padding-bottom: max(10px, env(safe-area-inset-bottom)); box-shadow: 0 -10px 24px -18px rgba(34,41,61,.5); border-top: 0; }
.app[data-modus="kind"] .tabs a { min-height: 68px; font-size: 16px; }
.app[data-modus="kind"] .tabs a svg { width: 30px; height: 30px; }
.app[data-modus="kind"] .tabs a[aria-current="page"] { background: #22293d; color: #fcf9f2; box-shadow: inset 0 -4px 0 rgba(0,0,0,.3); }
@media (min-width: 1000px) {
  .has-rail .tabs { top: 0; bottom: 0; right: auto; width: 104px; grid-auto-flow: row; grid-auto-rows: 84px; align-content: start; padding: 88px 10px 10px; border-top: 0; border-right: 1px solid var(--line); }
  .has-rail .frame { padding-left: 104px; }
  .has-rail .main { padding-bottom: 48px; }
}

/* ---------- Bausteine ---------- */
.card { background: var(--card); border-radius: var(--r); padding: 18px; box-shadow: var(--sh); border: 1px solid var(--line); }
.app[data-modus="kind"] .card { border: 0; }
.app[data-theme="dunkel"] .card { border-color: var(--line); }
.card.flat { box-shadow: none; }
.card.tint { background: var(--paper2); box-shadow: none; border-color: transparent; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: var(--tap); padding: 0 22px; border: 0; border-radius: 999px; background: var(--btn); color: var(--btn-ink); font-family: var(--f-ui); font-weight: 600; font-size: 16px; text-decoration: none; transition: transform 140ms cubic-bezier(.23,1,.32,1); box-shadow: 0 10px 18px -14px rgba(23,32,58,.6); }
.btn:active { transform: scale(.97); }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--link); box-shadow: inset 0 0 0 1.5px var(--line2); }
.btn.quiet { background: var(--paper2); color: var(--ink); box-shadow: none; }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn .bolt { width: 14px; height: 22px; }
.app[data-modus="kind"] .btn { font-size: 20px; padding: 0 26px; box-shadow: inset 0 -5px 0 rgba(0,0,0,.32), 0 12px 20px -14px rgba(34,41,61,.7); }
.app[data-modus="kind"] .btn:active { transform: translateY(3px); box-shadow: inset 0 -2px 0 rgba(0,0,0,.32); }
.app[data-modus="kind"] .btn.ghost { background: #fff; color: #22293d; box-shadow: inset 0 0 0 2px #847c6b, inset 0 -5px 0 rgba(34,41,61,.1); }
.app[data-modus="kind"] .btn.quiet { background: #fff; box-shadow: inset 0 0 0 1px #e7e0d1, inset 0 -5px 0 rgba(34,41,61,.08); }
.link { background: none; border: 0; padding: 0; color: var(--link); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; min-height: 32px; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); min-width: 44px; min-height: 44px; border-radius: 999px; border: 0; background: var(--paper2); color: var(--ink); }
.app[data-modus="kind"] .iconbtn { width: 52px; height: 52px; background: #fff; box-shadow: inset 0 0 0 1px #e7e0d1, inset 0 -4px 0 rgba(34,41,61,.08); }
.iconbtn svg { width: 22px; height: 22px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line2); background: var(--card); color: var(--ink); font-weight: 500; font-size: 15px; }
.chip[aria-pressed="true"] { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.app[data-modus="kind"] .chip { min-height: 52px; font-family: Fredoka, sans-serif; font-weight: 600; font-size: 18px; border-width: 2px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--paper2); color: var(--ink2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill.ok { background: var(--okbg); color: var(--ok); }
.pill.hint { background: var(--hint); color: var(--accent); }
.pill.line { background: transparent; box-shadow: inset 0 0 0 1px var(--line2); }
.hintbox { background: var(--hint); border: 1px solid var(--hint-line); border-radius: var(--r-s); padding: 12px 14px; color: var(--ink); }
.hintbox b { color: var(--accent); }
.okbox { background: var(--okbg); border-radius: var(--r-s); padding: 12px 14px; color: var(--ok); font-weight: 600; }
.note { border-left: 3px solid var(--line2); padding: 2px 0 2px 12px; color: var(--ink2); font-size: 14px; }
.proto { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 6px; background: repeating-linear-gradient(135deg, var(--paper2), var(--paper2) 6px, transparent 6px, transparent 12px); border: 1px dashed var(--line2); color: var(--ink2); font-size: 12px; font-weight: 600; }
.mark { background: linear-gradient(transparent 55%, rgba(241,199,74,.55) 55%); padding: 0 2px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-weight: 600; font-size: 15px; }
.input, .select, .textarea { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line2); background: var(--card); color: var(--ink); }
.textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.app[data-modus="kind"] .input { min-height: 60px; font-size: 22px; border-width: 2px; border-radius: 18px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 14px; background: var(--paper2); }
.check input { width: 24px; height: 24px; margin: 2px 0 0; flex: none; accent-color: var(--btn); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; padding: 8px 14px 8px 16px; border-radius: 16px; border: 0; background: var(--paper2); color: var(--ink); text-align: left; }
.app[data-modus="kind"] .switch { background: #fff; box-shadow: inset 0 0 0 1px #e7e0d1, inset 0 -5px 0 rgba(34,41,61,.08); min-height: 64px; font-family: Fredoka, sans-serif; font-weight: 600; font-size: 18px; border-radius: 22px; }
.switch .track { position: relative; flex: none; width: 52px; height: 30px; border-radius: 999px; background: var(--line2); transition: background 160ms; }
.switch .track::after { content: ''; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 999px; background: #fff; transition: transform 160ms cubic-bezier(.23,1,.32,1); }
.switch[aria-checked="true"] .track { background: var(--ok); }
.app[data-theme="dunkel"] .switch[aria-checked="true"] .track { background: #4f9a80; }
.switch[aria-checked="true"] .track::after { transform: translateX(22px); }
.seg { display: inline-grid; grid-auto-flow: column; gap: 4px; padding: 4px; border-radius: 999px; background: var(--paper2); }
.seg button { min-height: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--ink2); font-weight: 600; font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(23,32,58,.15); }
.list { display: flex; flex-direction: column; }
.list > * + * { border-top: 1px solid var(--line); }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 0; min-height: 56px; }
.li.btnlike { width: 100%; border: 0; background: none; text-align: left; color: inherit; padding: 12px 4px; }
.dot { width: 10px; height: 10px; border-radius: 999px; flex: none; background: var(--line2); }
.dot.ok { background: var(--ok); }
.dot.hint { background: #d8a92c; }
.bar { height: 10px; border-radius: 999px; background: var(--paper2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--ok); }
.empty { padding: 22px; border-radius: var(--r); border: 1.5px dashed var(--line2); color: var(--ink2); text-align: center; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-family: Poppins, sans-serif; font-weight: 600; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
code, .mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 13px; }

/* ---------- Kind: Welt-Bühne, Kacheln, Blitzi, Figur ---------- */
.stage { position: relative; overflow: hidden; border-radius: 30px; padding: 22px; min-height: 196px; background: var(--w, #7cc7a6); color: var(--wink, #22293d); box-shadow: inset 0 -10px 0 rgba(0,0,0,.12), inset 0 2px 0 rgba(255,255,255,.3), 0 18px 28px -18px rgba(34,41,61,.6); }
.stage > svg.pat { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage .say { position: relative; z-index: 1; max-width: 62%; display: flex; flex-direction: column; gap: 6px; }
.stage .say .h1 { font-size: clamp(26px, 6vw, 32px); }
.stage .blitzi { position: absolute; right: 10px; bottom: -6px; width: 112px; height: auto; z-index: 1; filter: drop-shadow(0 8px 6px rgba(34,41,61,.25)); }
.stage .bubble { display: inline-block; align-self: flex-start; padding: 6px 14px; border-radius: 999px; background: rgba(252,249,242,.92); color: #22293d; font-family: Fredoka, sans-serif; font-weight: 600; font-size: 16px; }
.tile { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; min-height: 148px; padding: 16px 18px; border: 0; border-radius: 26px; text-align: left; background: linear-gradient(180deg, rgba(255,255,255,.34), rgba(255,255,255,0) 60%), var(--t, #7fb7e6); color: #22293d; font-family: Fredoka, sans-serif; box-shadow: inset 0 -6px 0 rgba(34,41,61,.16), 0 12px 22px -14px rgba(34,41,61,.55); transition: transform 140ms cubic-bezier(.23,1,.32,1); text-decoration: none; }
.tile:active { transform: translateY(3px); box-shadow: inset 0 -3px 0 rgba(34,41,61,.16); }
.tile .t1 { font-weight: 600; font-size: 22px; line-height: 1.15; position: relative; }
.tile .t2 { font-family: 'DM Sans', sans-serif; font-weight: 500; font-size: 16px; position: relative; }
.tile svg.ic { position: absolute; right: 12px; top: 12px; width: 56px; height: 56px; opacity: .9; }
.tile.dark { color: #fcf9f2; }
.app:not([data-modus="kind"]) .tile { font-family: var(--f-ui); color: #fff; background: var(--t, var(--m-motivation)); min-height: 120px; border-radius: 20px; box-shadow: 0 12px 22px -16px rgba(23,32,58,.6); }
.app:not([data-modus="kind"]) .tile .t1 { font-size: 18px; }
.app:not([data-modus="kind"]) .tile .t2 { font-size: 14px; color: rgba(255,255,255,.9); }
.fig { filter: drop-shadow(0 7px 5px rgba(34,41,61,.25)); overflow: visible; }
.opt { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 96px; padding: 10px; border: 0; border-radius: 22px; background: #fff; box-shadow: inset 0 0 0 1px #e7e0d1, inset 0 -5px 0 rgba(34,41,61,.08), 0 10px 18px -14px rgba(34,41,61,.45); color: #22293d; font-family: Fredoka, sans-serif; font-weight: 600; font-size: 15px; }
.opt[aria-pressed="true"] { box-shadow: inset 0 0 0 4px #22293d, inset 0 -5px 0 rgba(34,41,61,.1), 0 10px 18px -14px rgba(34,41,61,.5); }
.opt .new { position: absolute; top: 6px; right: 8px; padding: 1px 8px; border-radius: 999px; background: #22293d; color: #fcf9f2; font-size: 12px; }
.gift { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 84px; border-radius: 18px; background: #fcf9f2; box-shadow: inset 0 0 0 1px #e7e0d1; font-family: Fredoka, sans-serif; font-weight: 600; font-size: 13px; }

/* ---------- Lernen ---------- */
.session { display: flex; flex-direction: column; gap: 18px; }
.progress { display: flex; gap: 6px; }
.progress i { flex: 1; height: 10px; border-radius: 999px; background: var(--paper2); }
.app[data-modus="kind"] .progress i { height: 12px; background: #efe6d3; }
.progress i.done { background: var(--ok); }
.progress i.now { background: var(--line2); }
.qcard { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 220px; padding: 28px 22px; border-radius: 30px; background: var(--card); box-shadow: var(--sh); border: 1px solid var(--line); text-align: center; }
.app[data-modus="kind"] .qcard { border: 0; min-height: 250px; background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,0) 60%), var(--w, #fff); }
.qcard .q { font-family: var(--f-ui); font-weight: 600; font-size: clamp(26px, 6vw, 40px); line-height: 1.2; text-wrap: balance; }
.qcard .q.long { font-size: clamp(20px, 4.6vw, 26px); }
.app[data-modus="erwachsen"] .qcard .q { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: clamp(34px, 6vw, 44px); line-height: 1.1; }
.app[data-modus="erwachsen"] .qcard .q.long { font-family: var(--f-body); font-weight: 500; font-size: 22px; line-height: 1.35; }
.qcard .a { font-size: 20px; color: var(--ink2); }
.qcard .ctx { position: absolute; top: 14px; left: 18px; }
.qcard .speak { position: absolute; top: 10px; right: 10px; }
.answers { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.ans { min-height: var(--tap); padding: 12px 16px; border-radius: 20px; border: 0; background: var(--card); color: var(--ink); box-shadow: var(--sh); font-family: var(--f-ui); font-weight: 600; font-size: 20px; border: 1px solid var(--line); }
.app[data-modus="kind"] .ans { min-height: 84px; font-size: 30px; border: 0; }
.ans[data-s="ok"] { background: var(--okbg); color: var(--ok); box-shadow: inset 0 0 0 3px var(--ok); }
.ans[data-s="was"] { background: var(--hint); color: var(--ink); box-shadow: inset 0 0 0 2px var(--hint-line); }
.ans[data-s="off"] { opacity: .5; }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 360px; width: 100%; margin: 0 auto; }
.pad button { min-height: 64px; border: 0; border-radius: 20px; background: var(--card); color: var(--ink); box-shadow: var(--sh); font-family: var(--f-ui); font-weight: 600; font-size: 28px; }
.typed { min-height: 64px; display: flex; align-items: center; justify-content: center; font-family: var(--f-ui); font-weight: 600; font-size: 40px; letter-spacing: .04em; }
.rate { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rate button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 72px; border-radius: 20px; border: 0; background: var(--card); color: var(--ink); box-shadow: var(--sh); font-family: var(--f-ui); font-weight: 600; font-size: 17px; border: 1px solid var(--line); }
.rate button small { font-family: var(--f-body); font-weight: 400; font-size: 13px; color: var(--ink2); }
.feedback { border-radius: 20px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.feedback.ok { background: var(--okbg); color: var(--ok); }
.feedback.hint { background: var(--hint); border: 1px solid var(--hint-line); }
.feedback .big { font-family: var(--f-ui); font-weight: 600; font-size: 20px; }
.flip { perspective: 1200px; }
.flipped .qcard { animation: flipin 260ms cubic-bezier(.23,1,.32,1); }
@keyframes flipin { from { transform: rotateY(-70deg); opacity: .3; } to { transform: none; opacity: 1; } }
.pop { animation: pop 240ms cubic-bezier(.23,1,.32,1); }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Dialog, Toast ---------- */
.veil { position: fixed; inset: 0; z-index: 40; background: rgba(20,26,40,.5); display: flex; align-items: flex-end; justify-content: center; padding: 16px; animation: fade 200ms ease-out; }
@media (min-width: 640px) { .veil { align-items: center; } }
.sheet { width: 100%; max-width: 460px; max-height: 92vh; overflow: auto; background: var(--card); color: var(--ink); border-radius: 26px; padding: 22px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); animation: rise 260ms cubic-bezier(.23,1,.32,1); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
.toast { position: fixed; left: 50%; bottom: 96px; z-index: 45; transform: translateX(-50%); max-width: min(92vw, 440px); padding: 12px 18px; border-radius: 16px; background: #17203a; color: #f6f2ea; font-weight: 500; box-shadow: 0 16px 30px -16px rgba(0,0,0,.6); animation: rise 220ms cubic-bezier(.23,1,.32,1); }
.pinrow { display: flex; justify-content: center; gap: 14px; }
.pinrow i { width: 18px; height: 18px; border-radius: 999px; box-shadow: inset 0 0 0 2px var(--ink); }
.pinrow i.on { background: var(--ink); }

/* ---------- Start und Modus-Auswahl ---------- */
.who { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.who button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 12px; border-radius: 24px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--sh); color: var(--ink); }
.who .av { width: 84px; height: 84px; border-radius: 999px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.who .nm { font-family: Poppins, sans-serif; font-weight: 600; font-size: 18px; }
.years { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.years button { min-height: 52px; border-radius: 14px; border: 1.5px solid var(--line2); background: var(--card); font-weight: 600; font-size: 17px; }
.years button[aria-pressed="true"] { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }

/* ---------- Lehrkraft: Band und Weg ---------- */
.band { position: relative; overflow: hidden; border-radius: 26px; padding: 22px; background: #4e6087; color: #f6f2ea; }
.band svg.contour { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .25; }
.band > * { position: relative; }
.path { display: flex; align-items: center; gap: 0; overflow-x: auto; padding: 10px 2px 4px; }
.path .st { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 92px; text-align: center; font-size: 13px; font-weight: 600; }
.path .st i { width: 22px; height: 22px; border-radius: 999px; background: #f6f2ea; box-shadow: 0 0 0 4px rgba(246,242,234,.25); }
.path .st.test i { background: #f1c74a; }
.path .ln { flex: 1; min-width: 18px; height: 3px; background: rgba(246,242,234,.5); margin-top: -22px; }
.station { display: grid; grid-template-columns: 32px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--paper2); }
.station .n { width: 32px; height: 32px; border-radius: 999px; background: var(--card); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.station.off { opacity: .5; }
.station.off .t { text-decoration: line-through; }
.results td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.letter { background: #fff; color: #17203a; border-radius: 12px; padding: 28px; border: 1px solid #d8e0ee; font-family: 'DM Sans', sans-serif; }
.letter h2 { font-family: 'Instrument Serif', serif; font-size: 36px; line-height: 1.1; margin-bottom: 12px; }
.codebig { font-family: ui-monospace, Menlo, monospace; font-size: 34px; letter-spacing: .2em; font-weight: 700; padding: 10px 16px; border-radius: 12px; background: #f4f7fc; display: inline-block; }

/* ---------- Kalender ---------- */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal span { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--paper2); font-size: 13px; color: var(--ink2); }
.cal span.on { background: var(--ok); color: #fff; font-weight: 700; }
.app[data-theme="dunkel"] .cal span.on { background: #4f9a80; color: #121827; }
.cal span.head { background: none; font-weight: 700; font-size: 12px; color: var(--ink3); aspect-ratio: auto; }
.cal span.today { box-shadow: inset 0 0 0 2px var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
@media print {
  body * { visibility: hidden; }
  .print-only, .print-only * { visibility: visible; }
  .print-only { position: absolute; inset: 0; padding: 0; }
  .letter { border: 0; }
}
.app[data-theme="dunkel"] .btn .bolt path { fill: var(--btn-ink); }
.app[data-theme="dunkel"] .tile { box-shadow: 0 0 0 1px rgba(255,255,255,.06); }
.stage .say .h1 { color: inherit; }

.i { width: 22px; height: 22px; flex: none; }
.who .av .i { width: 34px; height: 34px; }
h1[tabindex="-1"]:focus { outline: none; }
.tile svg.ic { position: static; width: 40px; height: 40px; margin-bottom: auto; opacity: .8; }
.app:not([data-modus="kind"]) .tile svg.ic { display: none; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 760px) { .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pill { white-space: normal; max-width: 100%; }
.station .iconbtn { width: 38px; height: 38px; min-width: 38px; min-height: 38px; }
@media (max-width: 560px) { .station { grid-template-columns: 32px minmax(0, 1fr); } .station .ctl { grid-column: 2; } }

@media (min-width: 700px) {
  .app[data-modus="kind"] .main { max-width: 680px; }
  .app[data-modus="kind"] .tabs { left: 50%; right: auto; width: 680px; transform: translateX(-50%); bottom: 12px; border-radius: 26px; }
}
