/* Gestaltungsidee: ein Karteikasten auf dem Schreibtisch, beschriftet mit Füllertinte */
:root {
  --bg: #e5e8e6;
  --card: #f8f8f5;
  --field: #fdfdfb;
  --text: #333c50;
  --muted: #5b6477;
  --line: #dadeda;
  --edge: #c6cdca;
  --accent: #536587;
  --accent-soft: #e3e7ee;
  --button: #536587;
  --button-deep: #43526f;
  --on-button: #f8f8f5;
  --good: #3b654c;
  --good-soft: #e0ebe1;
  --bad: #8d4d46;
  --bad-soft: #f0e3e0;
  --warm: #b5975f;
  --warm-soft: #eee7d6;
  --margin: #d3ada6;
  --ruled: #e1e6ea;
  --box: #ced4d1;
  --box-deep: #bdc5c1;
  --box-inside: #d9dedb;
  --box-text: #3f485c;
  --pile: #f8f8f5;
  --pile-line: #d3d8d5;
  /* Fächer: eine ruhige Farbfamilie, von Graublau (neu) zu Salbei (sitzt) */
  --f0: #bcc5d4;
  --f1: #b9c8d2;
  --f2: #b7cbce;
  --f3: #b6cdc7;
  --f4: #b7cdbd;
  --f5: #b9ccb2;
  --tab-text: #2c3548;
  --lift: 0 2px 0 var(--edge);
  --radius: 8px;
  --serif: "Sitka Display", "Sitka Text", "Iowan Old Style", Charter, Cambria, Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #23262c;
    --card: #2a2e35;
    --field: #262a31;
    --text: #d5d8de;
    --muted: #a0a6b1;
    --line: #393e47;
    --edge: #3d434d;
    --accent: #97a6c0;
    --accent-soft: #353c49;
    --button: #4a566c;
    --button-deep: #3a4456;
    --on-button: #e6e9ef;
    --good: #9fbfa8;
    --good-soft: #2d3a35;
    --bad: #d3a29b;
    --bad-soft: #3d3235;
    --warm: #a89170;
    --warm-soft: #37352f;
    --margin: #5f4c50;
    --ruled: #333842;
    --box: #2e333b;
    --box-deep: #383e47;
    --box-inside: #272b32;
    --box-text: #adb3be;
    --pile: #333942;
    --pile-line: #2a2f37;
    --f0: #424b5c;
    --f1: #414e5c;
    --f2: #40515a;
    --f3: #405456;
    --f4: #425650;
    --f5: #47584b;
    --tab-text: #dde0e6;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
}
h1, h2, h3, p { margin: 0; }
h1, h2, .question .word, .question .answer { font-family: var(--serif); font-weight: 700; }
h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); line-height: 1.12; text-wrap: balance; }
h2 { font-size: 1.35rem; line-height: 1.25; }
h3 { font-size: 1rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
[hidden] { display: none !important; }

/* Kopfzeile mit Registerreitern */
.top {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 20px 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  column-gap: 22px;
  position: relative;
}
.brand { display: flex; align-items: center; gap: 7px; padding-bottom: 8px; font: 700 1.55rem/1.2 var(--serif); color: var(--text); text-decoration: none; white-space: nowrap; }
.brand-mark { width: 19px; height: 19px; fill: var(--warm); }
.nav { display: flex; align-items: end; gap: 3px; }
.nav a { padding: 7px 15px 8px; border-radius: 10px 10px 0 0; background: color-mix(in srgb, var(--card) 45%, var(--bg)); text-decoration: none; color: var(--muted); font-weight: 600; font-size: .94rem; text-align: center; white-space: nowrap; }
.nav a:hover { color: var(--text); background: color-mix(in srgb, var(--card) 75%, var(--bg)); }
.nav a.active { background: var(--card); color: var(--text); padding-block: 11px 10px; }
.top-right { align-self: center; justify-self: end; display: flex; align-items: center; gap: 10px; padding-bottom: 6px; }
.avatar { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1.5px solid var(--edge); color: var(--text); font: 700 1.15rem/1 var(--serif); text-decoration: none; }
.avatar:hover { border-color: var(--accent); }
.avatar.active { background: var(--button); border-color: var(--button); color: var(--on-button); }
.avatar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.name-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.name-form label { flex: 1; min-width: 180px; }
.streak-pill { background: var(--warm-soft); border: 1.5px solid var(--warm); border-radius: var(--radius); padding: 3px 12px; font-weight: 700; white-space: nowrap; transform: rotate(2deg); }
.streak-pill.cold { background: transparent; border: 1.5px dashed var(--edge); color: var(--muted); }
.streak-pill.cold span { filter: grayscale(1); }
.top::after { content: ""; position: absolute; left: 20px; right: 20px; bottom: -3px; height: 3px; background: var(--card); }
@media (max-width: 660px) {
  .top { grid-template-columns: 1fr auto; }
  .nav { grid-column: 1 / -1; grid-row: 2; }
  .nav a { flex: 1; padding-inline: 4px; }
}

main { max-width: 760px; margin: 0 auto; padding: 22px 20px 60px; display: flex; flex-direction: column; gap: 20px; }

/* Papierbogen */
.card { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--lift); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }

/* Knöpfe & Felder */
button, input, select, textarea { font: inherit; color: inherit; }
.btn {
  border: 1.5px solid var(--edge);
  background: var(--card);
  border-radius: var(--radius);
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--lift);
  transition: transform .08s, box-shadow .08s, border-color .15s;
}
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--button); border-color: var(--button); color: var(--on-button); box-shadow: 0 3px 0 var(--button-deep); }
.btn.primary:active:not(:disabled) { transform: translateY(3px); box-shadow: none; }
.btn.big { padding: 13px 20px; font-size: 1.08rem; width: 100%; }
.btn.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.btn.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); box-shadow: none; }
.btn.icon { padding: 6px 10px; }
.btn.icon svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

input[type=text], input[type=search], select, textarea {
  width: 100%;
  background: var(--field);
  border: 1.5px solid var(--edge);
  border-radius: 6px;
  padding: 10px 12px;
}
textarea { min-height: 150px; resize: vertical; }
label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: .875rem; }
label input, label select { font-weight: 400; font-size: 1rem; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .fields { grid-template-columns: 1fr; } }

/* Auswahl */
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 600; font-size: .875rem; margin-bottom: 7px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { border: 1.5px solid var(--line); background: transparent; border-radius: 6px; padding: 6px 12px; cursor: pointer; font-size: .92rem; }
.chip:hover:not(:disabled) { border-color: var(--accent); }
.chip[aria-pressed=true] { background: var(--accent-soft); border-color: var(--accent); font-weight: 700; }
.chip:disabled { opacity: .4; cursor: not-allowed; }

/* Sprachwahl: zwei Hefte */
.lang-switch { display: flex; gap: 12px; }
.lang { flex: 1; display: flex; align-items: center; gap: 12px; padding: 10px 16px; border: 0; border-left: 10px solid var(--edge); border-radius: 3px var(--radius) var(--radius) 3px; background: color-mix(in srgb, var(--card) 55%, var(--bg)); cursor: pointer; text-align: left; }
.lang > span:last-child { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.lang[aria-pressed=true] { background: var(--card); border-left-color: var(--accent); box-shadow: var(--lift); }
.flag { font: 700 1.5rem var(--serif); color: var(--muted); }
.lang[aria-pressed=true] .flag { color: var(--accent); }
@media (max-width: 420px) { .flag { display: none; } }
.accents { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.accents .btn { min-width: 38px; font-size: 1.05rem; }

/* Startseite: Überschrift, Woche und Tagesziel liegen direkt auf dem Tisch */
.intro { display: flex; flex-direction: column; gap: 6px; }
.today-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 28px; margin-top: 10px; }
.week { display: flex; gap: 7px; }
.day { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: .75rem; color: var(--muted); }
.dot { width: 32px; height: 32px; border-radius: 6px; border: 1.5px dashed var(--muted); display: grid; place-items: center; font-size: .95rem; }
.day:not(.today) .dot:not(.on) { opacity: .45; }
.dot.on { border: 1.5px solid var(--warm); background: var(--warm-soft); transform: rotate(-4deg); }
.day.today { color: var(--text); font-weight: 700; }
.goal { flex: 1; min-width: 190px; max-width: 280px; display: flex; flex-direction: column; gap: 6px; font-size: .875rem; }
.goal .progress { flex: none; }
.goal .progress > div { background: var(--warm); }
@media (max-width: 520px) {
  .week { width: 100%; justify-content: space-between; gap: 2px; }
  .goal { max-width: none; }
}

/* Der Karteikasten */
.leitner { display: flex; flex-direction: column; }
.slots { list-style: none; margin: 0; padding: 14px 14px 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; align-items: end; height: 190px; background: var(--box-inside); border: 8px solid var(--box-deep); border-bottom: 0; border-radius: 12px 12px 0 0; }
.slot { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-width: 0; text-align: center; }
.slot-label { align-self: stretch; background: var(--slot); color: var(--tab-text); border-radius: 8px 8px 0 0; padding: 4px 2px 3px; line-height: 1.15; }
.slot-label strong { display: block; font-size: 1.4rem; line-height: 1.15; }
.slot-label span { display: block; font-size: .75rem; font-weight: 600; white-space: nowrap; }
/* Kartenstapel: je mehr Wörter, desto höher */
.slot-pile { height: calc(var(--h) * 1px); background: repeating-linear-gradient(var(--pile) 0 5px, var(--pile-line) 5px 6px); border-inline: 3px solid var(--slot); }
.slot.empty .slot-label { opacity: .7; }
.box-front { position: relative; background: var(--box); color: var(--box-text); border-radius: 0 0 12px 12px; padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 4px 0 var(--box-deep); }
.box-front p { text-align: center; font-size: .875rem; }
@media (max-width: 520px) {
  .slots { padding: 10px 6px 0; gap: 3px; border-width: 5px; }
  .slot-label span { font-size: .66rem; }
  .box-front { padding: 14px; }
}

/* Wortliste als Vokabelheft */
.word-list { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ruled); }
.word-list li { display: grid; grid-template-columns: 8px minmax(0, 1fr) minmax(0, 1.2fr) auto; align-items: stretch; column-gap: 12px; border-bottom: 1.5px solid var(--ruled); }
.word-list li > * { padding-block: 10px; }
.word-list li.none { display: block; padding-block: 12px; }
.word-list .level { background: var(--slot); padding: 0; margin-block: 8px; border-radius: 4px; }
.word-main { min-width: 0; overflow-wrap: anywhere; align-self: center; }
.word-main.term { font: 700 1.12rem/1.35 var(--serif); }
.word-main.translation { border-left: 1.5px solid var(--margin); padding-left: 12px; align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.word-list .actions { display: flex; gap: 4px; align-items: center; }
.actions .btn { box-shadow: none; border-color: transparent; background: transparent; color: var(--muted); }
.tag { font-size: .75rem; color: var(--muted); }
@media (max-width: 520px) {
  .word-list li { grid-template-columns: 6px minmax(0, 1fr) minmax(0, 1fr) auto; column-gap: 8px; }
  .word-main.translation { padding-left: 8px; }
  .word-list .actions { flex-direction: column; justify-content: center; gap: 0; }
}
.f0 { --slot: var(--f0); }
.f1 { --slot: var(--f1); }
.f2 { --slot: var(--f2); }
.f3 { --slot: var(--f3); }
.f4 { --slot: var(--f4); }
.f5 { --slot: var(--f5); }

/* Lernrunde */
.progress { flex: 1; height: 10px; background: color-mix(in srgb, var(--text) 13%, transparent); border-radius: 3px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); transition: width .3s; }
.combo { font-weight: 700; color: var(--muted); min-height: 1.5em; text-align: center; }
.question { min-height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; overflow-wrap: anywhere; }
/* Liniierte Karteikarte mit Reiter ihres Fachs, darunter der Stapel */
.card.question {
  position: relative;
  margin: 22px 0 8px;
  padding-top: 62px;
  border: 0;
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  background:
    linear-gradient(var(--margin), var(--margin)) 0 40px / 100% 2px no-repeat,
    repeating-linear-gradient(transparent 0 31px, var(--ruled) 31px 32px) 0 42px / 100% calc(100% - 52px) no-repeat,
    var(--card);
  box-shadow: 0 2px 0 var(--edge), 0 6px 0 -1px var(--card), 0 8px 0 -1px var(--edge), 0 12px 0 -3px var(--card), 0 14px 0 -3px var(--edge);
}
.card-tab { position: absolute; left: 0; bottom: 100%; background: var(--slot); color: var(--tab-text); border-radius: 8px 8px 0 0; padding: 2px 18px; font-size: .8rem; font-weight: 700; line-height: 1.5; }
.question .word { font-size: 2.8rem; line-height: 1.2; }
.question .answer { font-size: 2.2rem; line-height: 1.25; color: var(--text); }
button.question { width: 100%; cursor: pointer; }
@media (max-width: 520px) {
  .question .word { font-size: 2.2rem; }
  .question .answer { font-size: 1.8rem; }
}
.flip { animation: flip .3s ease-out; }
@keyframes flip { from { transform: rotateX(75deg); opacity: .2; } to { transform: none; opacity: 1; } }
.pop { animation: pop .3s ease-out; }
@keyframes pop { 50% { transform: scale(1.03); } }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

.options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.option { text-align: left; min-height: 62px; display: flex; gap: 10px; align-items: center; overflow-wrap: anywhere; }
.option kbd { font-family: inherit; font-size: .75rem; background: var(--accent-soft); border-radius: 4px; padding: 1px 7px; color: var(--text); }
.option:disabled { opacity: .5; cursor: default; }
.option.correct:disabled { opacity: 1; background: var(--good-soft); border-color: var(--good); }
.option.wrong:disabled { opacity: 1; background: var(--bad-soft); border-color: var(--bad); }
@media (max-width: 520px) { .options { grid-template-columns: 1fr; } }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.answer-input { text-align: center; font-size: 1.3rem !important; }

.feedback { border-radius: var(--radius); padding: 16px 18px; }
.feedback.good { background: var(--good-soft); }
.feedback.bad { background: var(--bad-soft); }
.feedback.hint { background: var(--warm-soft); }

/* Fortschritt */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); row-gap: 14px; }
.stat { padding: 0 8px; text-align: center; }
.stat + .stat { border-left: 1.5px solid var(--ruled); }
.stat strong { display: block; font-size: 1.8rem; line-height: 1.3; }
@media (max-width: 600px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
}
.bar-row { display: grid; grid-template-columns: 100px 1fr 36px; gap: 10px; align-items: center; }
/* Jahresübersicht: Spalten sind Wochen, Zeilen Wochentage */
.heat-scroll { overflow-x: auto; padding-bottom: 4px; }
.heat { display: grid; grid-template-columns: 22px repeat(53, minmax(0, 1fr)); grid-template-rows: 18px; gap: 2px; min-width: 640px; }
.heat .month { grid-row: 1; font-size: .72rem; color: var(--muted); white-space: nowrap; line-height: 1.2; }
.heat .weekday { grid-column: 1; font-size: .68rem; color: var(--muted); line-height: 1; align-self: center; height: 0; display: flex; align-items: center; }
.heat i { aspect-ratio: 1; border-radius: 2px; }
.heat-legend { display: flex; justify-content: flex-end; }
.scale { display: inline-flex; align-items: center; gap: 4px; }
.scale i { width: 11px; height: 11px; border-radius: 2px; }
.s0 { background: color-mix(in srgb, var(--text) 9%, transparent); }
.s1 { background: color-mix(in srgb, var(--good) 28%, var(--card)); }
.s2 { background: color-mix(in srgb, var(--good) 48%, var(--card)); }
.s3 { background: color-mix(in srgb, var(--good) 72%, var(--card)); }
.s4 { background: var(--good); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.badge { border: 1.5px solid var(--warm); background: var(--warm-soft); border-radius: var(--radius); padding: 12px; text-align: center; }
.badge span { font-size: 1.8rem; display: block; }
.badge.locked { background: transparent; border: 1.5px dashed var(--edge); color: var(--muted); }
.badge.locked span { filter: grayscale(1); opacity: .45; }

.big-emoji { font-size: 3.6rem; line-height: 1.1; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: var(--radius); font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; max-width: 92vw; text-align: center; z-index: 20; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
#confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 10; }
#confetti i { position: absolute; top: -14px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  #confetti { display: none; }
}

/* Ladeanzeige beim Konto-Abgleich (nur online) */
.sync-gate { position: fixed; inset: 0; z-index: 30; background: var(--bg); display: grid; place-items: center; padding: 20px; }

/* Anmeldeseite (nur online) */
.login { max-width: 420px; padding-top: 8vh; }
input[type=email], input[type=password] { width: 100%; background: var(--field); border: 1.5px solid var(--edge); border-radius: 6px; padding: 10px 12px; }

/* Überschrift mit Info-Symbol oben rechts */
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-head > h1, .card-head > h2 { min-width: 0; overflow-wrap: anywhere; }
.info { position: relative; flex: none; }
.info summary { list-style: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--edge); display: grid; place-items: center; cursor: pointer; color: var(--muted); font: italic 700 .95rem/1 var(--serif); user-select: none; }
.info summary::-webkit-details-marker { display: none; }
.info summary:hover, .info[open] summary { border-color: var(--accent); color: var(--text); }
.info-panel { position: absolute; right: 0; top: 34px; z-index: 15; width: min(300px, calc(100vw - 56px)); background: var(--field); color: var(--text); border: 1.5px solid var(--edge); border-radius: var(--radius); box-shadow: 0 10px 24px rgba(0, 0, 0, .22); padding: 12px 14px; font: 400 .875rem/1.5 "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif; text-align: left; }
.info-panel ul { margin: 6px 0 0; padding-left: 17px; display: flex; flex-direction: column; gap: 5px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--slot); margin: 0 4px 0 6px; }
.box-top { position: relative; }
.box-top > .info { position: absolute; top: 16px; right: 16px; }
.box-top .slots { padding-top: 48px; height: 214px; }
.box-top .info summary { background: var(--card); }

/* Aufklappbare Zusatzoptionen */
.more > summary { cursor: pointer; font-weight: 600; font-size: .92rem; padding: 4px 0; }
.more > summary .muted { font-weight: 400; margin-left: 6px; }
.more > summary + * { margin-top: 12px; }

.grow { flex: 1; }
.level-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; border-top: 1.5px solid var(--ruled); padding-top: 14px; }
.account { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; border-top: 1.5px solid var(--ruled); padding-top: 14px; overflow-wrap: anywhere; }
.heat i[data-action] { cursor: pointer; }

/* ===== Bewegung und Rückmeldung ===== */
/* Große Trefferflächen: schneller und sicherer zu treffen */
.chip { min-height: 42px; }
.btn { min-height: 42px; }
.btn.icon { min-width: 42px; }
.info summary { position: relative; }
.info summary::after { content: ""; position: absolute; inset: -9px; }

.chip, .option, .lang, .nav a, .avatar { transition: transform .12s ease, background-color .18s, border-color .18s, box-shadow .18s; }
.chip:active:not(:disabled), .option:active:not(:disabled), .lang:active, .avatar:active { transform: scale(.96); }
@media (hover: hover) {
  .btn:hover:not(:disabled), .option:hover:not(:disabled), .lang:hover { transform: translateY(-1px); }
  .btn:active:not(:disabled) { transform: translateY(2px); }
  .badge:not(.locked):hover { transform: rotate(-2deg) scale(1.03); }
}
.badge { transition: transform .18s ease; }

.progress > div { transition: width .6s cubic-bezier(.2, .8, .2, 1); }

/* Beim Seitenwechsel gleiten die Bereiche nacheinander herein */
.view-enter > * { animation: rise .35s ease both; }
.view-enter > :nth-child(2) { animation-delay: .04s; }
.view-enter > :nth-child(3) { animation-delay: .08s; }
.view-enter > :nth-child(4) { animation-delay: .12s; }
.view-enter > :nth-child(n+5) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; translate: 0 10px; } }
/* Die Kartenstapel wachsen in ihre Fächer */
.view-enter .slot-pile { animation: stack-up .6s .15s var(--ease) both; }
@keyframes stack-up { from { height: 0; } }
.view-enter .dot.on { animation: stamp .45s .25s ease both; }
@keyframes stamp { from { scale: 1.7; opacity: 0; } }

.streak-pill.bump { animation: bump .7s ease; }
@keyframes bump { 35% { scale: 1.3; } 65% { scale: .94; } }

/* Lernrunde */
.round-body { display: contents; }
.round-body.card-in > .question { animation: card-in .28s ease both; }
.round-body.card-in > .options > * { animation: rise .28s ease both; }
.round-body.card-in > .options > :nth-child(2) { animation-delay: .04s; }
.round-body.card-in > .options > :nth-child(3) { animation-delay: .08s; }
.round-body.card-in > .options > :nth-child(4) { animation-delay: .12s; }
@keyframes card-in { from { opacity: 0; translate: 28px 0; rotate: 1deg; } }
.option.correct { animation: pop .35s ease; }
.option.wrong { animation: shake .35s; }
.feedback { animation: rise .25s ease both; }
.combo.hot { color: var(--warm); animation: pop .4s ease; }
/* „Weiter“ füllt sich und springt dann selbst weiter */
.btn.auto { position: relative; overflow: hidden; isolation: isolate; }
.btn.auto::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(255, 255, 255, .18); transform-origin: left; animation: fill var(--wait, 1500ms) linear forwards; }
@keyframes fill { from { transform: scaleX(0); } }

.fx-layer { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 40; }
.fx-layer > i { position: absolute; width: 8px; height: 8px; margin: -4px; border-radius: 2px; animation: spark .7s cubic-bezier(.15, .7, .3, 1) forwards; }
@keyframes spark { to { translate: var(--dx) var(--dy); rotate: 200deg; scale: .3; opacity: 0; } }
.fx-float { position: absolute; translate: -50% 0; font-weight: 800; color: var(--good); background: var(--card); border-radius: 99px; padding: 2px 12px; box-shadow: 0 3px 10px rgba(0, 0, 0, .18); animation: float-up 1.1s ease-out forwards; white-space: nowrap; }
@keyframes float-up { 20% { opacity: 1; } to { translate: -50% -34px; opacity: 0; } }
.ripple-clip { position: absolute; overflow: hidden; display: block; }
.ripple-clip i { position: absolute; border-radius: 50%; background: currentColor; opacity: .18; animation: ripple .5s ease-out forwards; }
@keyframes ripple { from { transform: scale(0); } to { transform: scale(1); opacity: 0; } }

.reward-layer { position: fixed; top: 12px; left: 0; right: 0; display: flex; justify-content: center; pointer-events: none; z-index: 35; padding: 0 16px; }
.reward { pointer-events: auto; display: flex; align-items: center; gap: 12px; text-align: left; max-width: 360px; background: var(--field); color: var(--text); border: 1.5px solid var(--warm); border-radius: 14px; padding: 10px 18px 10px 14px; box-shadow: 0 10px 28px rgba(0, 0, 0, .25); cursor: pointer; animation: drop .38s var(--ease) both; }
.reward.leaving { animation: leave .22s ease forwards; }
.reward-icon { font-size: 1.9rem; line-height: 1; animation: stamp .45s .12s ease both; }
.reward small { display: block; color: var(--muted); }
@keyframes drop { from { opacity: 0; translate: 0 -40px; scale: .9; } }
@keyframes leave { to { opacity: 0; translate: 0 -20px; } }

.popup { border: 0; border-radius: 16px; background: var(--card); color: var(--text); padding: 28px 26px 22px; width: min(340px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.popup[open] { animation: popup-in .35s var(--ease) both; }
.popup::backdrop { background: rgba(15, 18, 24, .55); }
.popup-icon { font-size: 4rem; line-height: 1.1; animation: stamp .55s .2s ease both; }
@keyframes popup-in { from { opacity: 0; scale: .85; } }

.result-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.result-row > div { display: flex; flex-direction: column; align-items: center; }
.result-row strong { font-size: 1.7rem; line-height: 1.3; }
.achieved { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.achieved li { display: flex; gap: 10px; align-items: center; background: var(--warm-soft); border-radius: var(--radius); padding: 9px 14px; }
.summary.reveal .big-emoji { animation: stamp .55s ease both; }
.summary.reveal .achieved li { animation: rise .35s ease both; animation-delay: calc(.35s + var(--i) * .14s); }

.toast button { margin-left: 14px; background: transparent; border: 0; padding: 4px 6px; color: inherit; font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; }
.toast.has-action { pointer-events: auto; display: flex; align-items: center; width: max-content; }
.toast button { flex: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ===== Eigene Icons ===== */
.ic { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.26em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic .s { fill: currentColor; fill-opacity: .22; }
/* Farben sagen, worum es geht: Ocker für Erfolge, Grün für Wachstum, Tintenblau fürs Lernen */
.ic-flame, .ic-crown, .ic-bolt, .ic-star, .ic-trophy, .ic-medal, .ic-bulb, .ic-spark { color: var(--warm); }
.ic-sprout, .ic-seal, .ic-trend { color: var(--good); }
.ic-book, .ic-cards, .ic-rocket, .ic-target, .ic-pencil { color: var(--accent); }
.streak-pill.cold .ic, .badge.locked .ic { color: var(--muted); }
.streak-pill .ic { width: 1.3em; height: 1.3em; }
.dot .ic { width: 22px; height: 22px; }
.stat strong .ic { width: .95em; height: .95em; vertical-align: -.1em; }
.badge span .ic { width: 38px; height: 38px; stroke-width: 1.6; }
.bar-row .ic { margin-right: 3px; }
.hero-icon { line-height: 1; }
.hero-icon .ic { width: 78px; height: 78px; stroke-width: 1.35; }
.popup-icon .ic { width: 80px; height: 80px; stroke-width: 1.35; }
.reward-icon { display: grid; place-items: center; }
.reward-icon .ic { width: 32px; height: 32px; }
.achieved li .ic { width: 24px; height: 24px; vertical-align: middle; }
.option .ic { margin-right: 5px; }

/* ===== Lebendige Flamme ===== */
.flame { --fl-1: #d9541e; --fl-2: #f08a24; --fl-3: #f59a23; --fl-4: #ffc23d; --fl-5: #ffe27a; --fl-6: #fff6cf; --glow: rgba(240, 138, 36, .45); width: 1.5em; height: 1.95em; overflow: visible; vertical-align: -.5em; flex: none; filter: drop-shadow(0 0 4px var(--glow)); }
.flame.t1 { --fl-1: #e0782a; --fl-2: #f2a03a; }
.flame.t3 { --fl-1: #c93a18; --fl-2: #f27a1c; --glow: rgba(242, 110, 28, .6); }
.flame.t4 { --fl-1: #a81f2c; --fl-2: #ee5a1e; --fl-3: #f4781c; --fl-4: #ffb52e; --glow: rgba(235, 78, 30, .7); }
.flame.t5 { --fl-1: #26479b; --fl-2: #3f8fd8; --fl-3: #4fa9e6; --fl-4: #8fd8f2; --fl-5: #d4f6ff; --fl-6: #ffffff; --glow: rgba(70, 160, 230, .65); }
.flame.t6 { --fl-1: #432a8c; --fl-2: #8a55cc; --fl-3: #a870dc; --fl-4: #e29ad8; --fl-5: #ffe0f2; --fl-6: #ffffff; --glow: rgba(165, 105, 225, .7); }
/* aus: grau und still. wartend: sichtbar, aber gedimmt, bis der Tag gesichert ist */
.flame.t0 { --fl-1: #7d838d; --fl-2: #9aa0a8; --fl-3: #969ca5; --fl-4: #b3b8bf; --fl-5: #c4c8ce; --fl-6: #dadde1; filter: none; }
.flame.waiting { filter: grayscale(.85) opacity(.65); }
.flame g, .flame circle { transform-box: view-box; transform-origin: 32px 76px; }
.flame .fl-body { animation: fl-sway 2.6s ease-in-out infinite alternate; }
.flame .fl-outer { animation: fl-a .92s ease-in-out infinite alternate; }
.flame .fl-middle { animation: fl-b .67s ease-in-out infinite alternate; }
.flame .fl-core { animation: fl-c .49s ease-in-out infinite alternate; }
.flame .fl-left { animation: fl-b .8s -.3s ease-in-out infinite alternate; }
.flame .fl-right { animation: fl-a 1.05s -.5s ease-in-out infinite alternate; }
@keyframes fl-sway { from { transform: rotate(-1.8deg); } to { transform: rotate(1.8deg); } }
@keyframes fl-a { 0% { transform: scale(1, .96) skewX(-2deg); } 50% { transform: scale(.97, 1.05) skewX(1.500deg); } 100% { transform: scale(1.03, 1) skewX(-1deg); } }
@keyframes fl-b { 0% { transform: scale(1.02, .93) skewX(3deg); } 55% { transform: scale(.95, 1.08) skewX(-2.500deg); } 100% { transform: scale(1, .99) skewX(1deg); } }
@keyframes fl-c { 0% { transform: scale(.94, .9) skewX(-3deg); } 100% { transform: scale(1.06, 1.12) skewX(3deg); } }
.flame .fl-ember { fill: var(--fl-4); opacity: 0; animation: fl-ember 1.8s ease-out infinite; }
@keyframes fl-ember { 0% { opacity: 0; transform: translate(0, 8px) scale(1); } 18% { opacity: 1; } 70% { opacity: .85; } 100% { opacity: 0; transform: translate(var(--drift), -52px) scale(.35); } }
.flame.t0 g, .flame.waiting g, .flame.t0 circle { animation: none; }
.flame.waiting circle { display: none; }
/* kleine Flammen bleiben ruhig im Verhalten, große bekommen mehr Leuchten */
.flame.t4:not(.waiting), .flame.t5:not(.waiting), .flame.t6:not(.waiting) { animation: fl-glow 1.7s ease-in-out infinite alternate; }
.flame.waiting { animation: none; }
@keyframes fl-glow { from { filter: drop-shadow(0 0 4px var(--glow)); } to { filter: drop-shadow(0 0 11px var(--glow)); } }
.flame.big { width: 92px; height: 120px; }
.flame.huge { width: 140px; height: 184px; }
.flame.ignite { animation: ignite .8s cubic-bezier(.2, .9, .3, 1.4) both; }
@keyframes ignite { 0% { scale: .15; opacity: 0; } 60% { scale: 1.12; opacity: 1; } }

/* Kopfzeile: je höher die Stufe, desto größer und wärmer */
button.streak-pill { display: flex; align-items: center; gap: 6px; min-height: 42px; padding: 2px 12px 2px 9px; cursor: pointer; font-size: 1.05rem; transform: none; }
button.streak-pill .flame { width: 24px; height: 31px; vertical-align: 0; }
button.streak-pill.tier-2 .flame { width: 27px; height: 35px; }
button.streak-pill.tier-3 .flame { width: 30px; height: 39px; }
button.streak-pill.tier-4 .flame, button.streak-pill.tier-5 .flame, button.streak-pill.tier-6 .flame { width: 32px; height: 42px; }
button.streak-pill.tier-4:not(.cold) { box-shadow: 0 0 12px rgba(235, 78, 30, .35); }
button.streak-pill.tier-5:not(.cold) { border-color: #4f9fd8; box-shadow: 0 0 14px rgba(70, 160, 230, .45); }
button.streak-pill.tier-6:not(.cold) { border-color: #9a68d6; box-shadow: 0 0 16px rgba(165, 105, 225, .5); }
button.streak-pill:hover { translate: 0 -1px; }
.streak-pill.cold span { filter: none; }

/* Startseite */
.hero-streak { display: flex; align-items: center; gap: 18px; }
.hero-streak > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.hero-flame { flex: none; background: none; border: 0; padding: 0; cursor: pointer; transition: transform .15s; }
.hero-flame:hover { transform: scale(1.05); }
.hero-flame:active { transform: scale(.93); }
.stage-line span { color: var(--muted); margin-left: 6px; }
.stage-progress { display: flex; flex-direction: column; gap: 4px; width: 100%; max-width: 300px; }
.stage-progress .progress { flex: none; }
.stage-progress .progress > div { background: linear-gradient(90deg, #d9862a, #f0b43c); }
@media (max-width: 520px) { .flame.big { width: 70px; height: 92px; } .hero-streak { gap: 12px; } }
.dot .flame { width: 21px; height: 27px; vertical-align: 0; }
.dot.frozen { border: 1.5px solid #7fa6c4; background: color-mix(in srgb, #7fa6c4 18%, transparent); opacity: 1 !important; }
.ic-shield { color: #6f9cc0; }
.stat strong .flame { width: .95em; height: 1.25em; vertical-align: -.2em; }
.badge span .flame { width: 32px; height: 41px; }
.badge.locked .flame { filter: grayscale(1) opacity(.5); }
.badge.locked .flame g, .badge.locked .flame circle { animation: none; }
.reward-icon .flame, .achieved .flame { width: 26px; height: 34px; vertical-align: middle; }

/* Fenster zur Flamme */
.popup { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-x: hidden; }
.popup-icon { display: flex; justify-content: center; }
.popup-count { font-size: 3.6rem; font-weight: 800; line-height: 1; margin-bottom: -10px; }
.popup-week { justify-content: center; gap: 6px; }
.popup-week .dot { opacity: 1 !important; animation: stamp .35s calc(.6s + var(--i) * .08s) both; }
.popup-week .dot.on .ic { color: var(--warm); stroke-width: 3; }
.grew { background: var(--warm-soft); border-radius: var(--radius); padding: 10px; animation: rise .4s 1.2s both; }
.popup .stage-progress { max-width: none; }
.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stages li { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 1.5px dashed var(--edge); border-radius: var(--radius); padding: 10px 4px 8px; font-size: .78rem; font-weight: 600; line-height: 1.25; }
.stages li.got { border: 1.5px solid var(--warm); background: var(--warm-soft); }
.stages small { font-weight: 400; color: var(--muted); }
.stages .flame { width: 36px; height: 47px; margin-bottom: 2px; }
.freeze-line { display: flex; align-items: center; justify-content: center; gap: 6px; }

/* ===== Stärkere Rückmeldung in der Runde ===== */
.progress.round { height: 14px; border-radius: 99px; }
.progress.round > div { border-radius: 99px; position: relative; overflow: hidden; }
.progress.round > div::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); animation: shine 2.2s ease-in-out infinite; }
@keyframes shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.progress.round.hot > div { background: linear-gradient(90deg, #c8742c, #e9a93a); }
.progress.round.hot { box-shadow: 0 0 10px rgba(233, 169, 58, .5); }
.combo-badge { display: inline-flex; align-items: center; gap: 4px; background: var(--warm-soft); border: 1.5px solid var(--warm); border-radius: 99px; padding: 1px 14px; color: var(--text); animation: combo-in .4s var(--ease); }
.combo-badge.level-2 { font-size: 1.07rem; box-shadow: 0 0 10px rgba(233, 169, 58, .45); }
.combo-badge.level-3 { font-size: 1.14rem; box-shadow: 0 0 18px rgba(233, 169, 58, .7); }
@keyframes combo-in { from { scale: .6; } }
.combo { min-height: 2em; }
.combo.hot { animation: none; }
.fx-ring { position: absolute; display: block; border: 3px solid var(--good); animation: ring .65s ease-out forwards; }
@keyframes ring { to { scale: 1.12 1.5; opacity: 0; } }
.fx-float { font-size: 1.05rem; white-space: pre; }
.option.correct:disabled { box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 35%, transparent); }
.feedback.good strong { font-size: 1.15rem; }

.stars { display: flex; justify-content: center; gap: 10px; }
.stars .ic { width: 46px; height: 46px; color: var(--edge); }
.stars .lit .ic { color: #e5ad3f; filter: drop-shadow(0 0 6px rgba(229, 173, 63, .55)); }
.stars .lit .ic .s { fill-opacity: 1; }
.stars span:nth-child(2) { translate: 0 -8px; }
.summary.reveal .stars .lit { animation: star-in .55s calc(var(--i) * .22s) cubic-bezier(.2, .9, .3, 1.7) both; }
@keyframes star-in { from { scale: 0; rotate: -90deg; } }
.summary .hero-icon { display: none; }
.badge:not(.locked) { position: relative; overflow: hidden; }
.badge:not(.locked)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .22) 50%, transparent 60%); transform: translateX(-120%); pointer-events: none; }
.view-enter .badge:not(.locked)::after { animation: gleam 1s .6s ease; }
@keyframes gleam { to { transform: translateX(120%); } }

@media (prefers-reduced-motion: reduce) {
  .flame, .flame * { animation: none !important; }
  .flame .fl-ember { display: none; }
}

/* ===== Ausgewogenes Layout im Bereich „Lernen“ ===== */
/* Gleiche Abstände und gemeinsame linke und rechte Kanten */
main { gap: 16px; }

/* Sprachkarten: Inhalt mittig, beide gleich breit */
.lang-switch { display: grid; grid-template-columns: 1fr 1fr; }
.lang { justify-content: center; border-right: 10px solid transparent; }

/* Heute: oben Flamme und Stand, unten Woche und Tagesziel in zwei gleichen Hälften */
.today-card { display: flex; flex-direction: column; gap: 18px; }
.today-card .hero-streak { gap: 22px; }
.today-card .hero-flame { width: 108px; display: grid; place-items: center; }
.today-card h1 { font-size: clamp(1.45rem, 4.2vw, 2rem); }
.today-card .hero-streak > div { gap: 8px; }
.stage-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.stage-line span { margin-left: 0; }
.today-card .stage-progress { max-width: none; }
.today-card .stage-progress .progress, .today-card .goal .progress { height: 10px; }
.today-card .today-row { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; gap: 0; margin: 0; padding-top: 18px; border-top: 1.5px solid var(--ruled); }
.today-card .week { width: auto; justify-content: space-between; gap: 4px; padding-right: 22px; }
.today-card .goal { max-width: none; min-width: 0; justify-content: center; gap: 12px; padding-left: 22px; border-left: 1.5px solid var(--ruled); font-size: .92rem; }
.goal-text { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }
.dot { width: 34px; height: 34px; }
@media (max-width: 620px) {
  .today-card { padding: 18px 16px; gap: 16px; }
  .today-card .hero-streak { gap: 14px; }
  .today-card .hero-flame { width: 72px; }
  .today-card .today-row { grid-template-columns: 1fr; gap: 16px; padding-top: 16px; }
  .today-card .week { padding-right: 0; }
  .today-card .goal { padding: 14px 0 0; border-left: 0; border-top: 1.5px solid var(--ruled); }
  .dot { width: 32px; height: 32px; }
}

/* Karteikasten: Kopfzeile statt leerer Fläche, sechs gleich breite Fächer */
.box-top { background: var(--box-inside); border: 8px solid var(--box-deep); border-bottom: 0; border-radius: 12px 12px 0 0; }
.box-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px 0; }
.box-head h2 { color: var(--box-text); }
.box-top > .box-head > .info { position: relative; }
.box-top .slots { grid-template-columns: repeat(6, minmax(0, 1fr)); height: 182px; padding: 12px 14px 0; background: transparent; border: 0; border-radius: 0; }
.box-front { padding: 16px 22px 18px; }
@media (max-width: 520px) {
  .box-top { border-width: 5px; }
  .box-head { padding: 10px 10px 0; }
  .box-top .slots { padding: 10px 6px 0; }
  .box-front { padding: 14px; }
}

/* Auswahlknöpfe teilen sich jede Zeile vollständig */
.chips .chip { flex: 1 1 0; min-width: max-content; text-align: center; }

/* Breite Hauptknöpfe schließen bündig ab */
.card .row > .btn.grow { flex: 1 1 100%; }
.card .row > .btn.grow ~ .btn.ghost { margin-inline: auto; }
.card .more > summary { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.card .more > summary::before { content: "▸"; color: var(--muted); }
.card .more[open] > summary::before { content: "▾"; }
.card .more > summary .muted { margin-left: auto; text-align: right; }
.card .more > summary { list-style: none; }
.card .more > summary::-webkit-details-marker { display: none; }

/* Genau vier Möglichkeiten: auf schmalen Bildschirmen zwei mal zwei */
@media (max-width: 520px) {
  .chips:has(> :nth-child(4):last-child) { display: grid; grid-template-columns: 1fr 1fr; }
  .chips:has(> :nth-child(4):last-child) .chip { min-width: 0; }
  .card .more > summary .muted { flex-basis: 100%; margin-left: 0; padding-left: 14px; text-align: left; }
  .accents { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .accents .btn { min-width: 0; padding-inline: 0; }
}

/* ===== Flüssige Bedienung ===== */
:root { --ease: cubic-bezier(.22, 1, .36, 1); --glass: color-mix(in srgb, var(--bg) 96%, transparent); }
html { -webkit-text-size-adjust: 100%; }

/* Reaktion schon beim Drücken, ohne Tipp-Verzögerung */
a, button, summary, select, input, label { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.btn:active:not(:disabled), .chip:active:not(:disabled), .option:active:not(:disabled), .lang:active, .avatar:active, button.streak-pill:active, .nav a:active, .more > summary:active { transform: scale(.97); transition: transform .1s ease-out; }
.btn.primary:active:not(:disabled) { transform: translateY(2px) scale(.98); }

/* Schrift: große Größen enger, kleine etwas weiter */
h1 { letter-spacing: -.018em; line-height: 1.14; font-optical-sizing: auto; }
h2 { letter-spacing: -.008em; }
.popup-count, .result-row strong, .stat strong, .question .word { letter-spacing: -.02em; }
.question .answer { letter-spacing: -.012em; }
.small, .stages small, .slot-label span, .heat .month, .heat .weekday, .card-tab { letter-spacing: .008em; }

/* Kopfzeile bleibt erreichbar und wird beim Scrollen zu durchscheinendem Material */
.top { position: sticky; top: 0; z-index: 12; isolation: isolate; }
.top::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: -14px; left: calc(50% - 50vw); right: calc(50% - 50vw); background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); -webkit-mask-image: linear-gradient(#000 calc(100% - 14px), transparent); mask-image: linear-gradient(#000 calc(100% - 14px), transparent); opacity: 0; pointer-events: none; }
.top.scrolled::before { opacity: 1; }
body { overflow-x: clip; }
/* Am Handy scrollt die zweizeilige Kopfzeile nur bis zum Menü mit, das Menü bleibt stehen */
@media (max-width: 660px) { .top { top: -58px; } }

/* Schwebende Ebenen: Material, das auftaucht, statt nur einzublenden */
.info-panel, .reward, .toast { -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%); }
.info-panel { background: color-mix(in srgb, var(--field) 84%, transparent); transform-origin: calc(100% - 13px) -8px; }
.info[open] .info-panel { animation: materialize .24s var(--ease) both; }
@keyframes materialize { from { opacity: 0; transform: scale(.9); filter: blur(6px); } }
.reward { background: color-mix(in srgb, var(--field) 80%, transparent); touch-action: none; user-select: none; }
.toast { background: color-mix(in srgb, var(--text) 88%, transparent); }

/* Fenster: gedimmter Hintergrund bündelt die Aufmerksamkeit; rein und raus auf demselben Weg */
.popup::backdrop { background: rgba(15, 18, 24, .5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade-in .25s ease both; }
.popup[open] { animation: popup-in .32s var(--ease) both; }
.popup.closing { animation: popup-out .2s ease-in both; pointer-events: none; }
.popup.closing::backdrop { animation: fade-out .2s ease both; }
@keyframes popup-in { from { opacity: 0; scale: .82; } }
@keyframes popup-out { to { opacity: 0; scale: .86; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
/* Handy: Blatt von unten, am Griff oder an der Flamme wegziehbar */
.popup.sheet[open] { animation: none; margin: auto auto 0; width: 100%; max-width: 100%; max-height: calc(100dvh - 24px); border-radius: 20px 20px 0 0; padding: 0 22px calc(20px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
.popup.sheet::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 120px; background: var(--card); }
.popup.sheet[open] { overflow-x: hidden; }
.grabber { display: flex; justify-content: center; align-items: center; height: 30px; cursor: grab; }
.grabber::before { content: ""; width: 40px; height: 5px; border-radius: 99px; background: var(--edge); }
.popup.sheet .popup-icon { cursor: grab; user-select: none; }

@media (prefers-reduced-transparency: reduce) {
  .top::before { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .info-panel, .reward { background: var(--field); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .toast { background: var(--text); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .popup::backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --muted: var(--text); --line: var(--text); --edge: var(--text); }
  .top::before, .info-panel, .reward { background: var(--field); }
  .card, .leitner, .reward, .popup { outline: 1.5px solid var(--text); }
}
/* Weniger Bewegung heißt sanft überblenden, nicht ohne Rückmeldung. Steht bewusst ganz am Ende. */
@media (prefers-reduced-motion: reduce) {
  .view-enter > *, .round-body.card-in > .question, .round-body.card-in > .options > *, .feedback, .reward, .popup[open], .info[open] .info-panel, .summary.reveal .achieved li { animation: soft 200ms ease both !important; }
  .reward.leaving, .popup.closing { animation: soft-out 120ms ease both !important; }
  .top::before, .progress > div, .btn, .chip { transition: opacity .2s ease, background-color .2s ease, border-color .2s ease !important; }
}
@keyframes soft { from { opacity: 0; } }
@keyframes soft-out { to { opacity: 0; } }

/* ===== Lernmodus am Handy: nur das Nötige, alles auf einen Bildschirm ===== */
@media (max-width: 660px) {
  body.learning .top { display: none; }
  body.learning main { padding: calc(8px + env(safe-area-inset-top)) 14px calc(12px + env(safe-area-inset-bottom)); gap: 8px; }
  body.learning .combo { min-height: 1.9em; line-height: 1.5; }
  body.learning .card.question { min-height: 150px; margin: 20px 0 8px; padding: 40px 16px 14px; gap: 6px;
    background:
      linear-gradient(var(--margin), var(--margin)) 0 26px / 100% 2px no-repeat,
      repeating-linear-gradient(transparent 0 31px, var(--ruled) 31px 32px) 0 28px / 100% calc(100% - 36px) no-repeat,
      var(--card); }
  body.learning .question .word { font-size: 1.9rem; }
  body.learning .question .answer { font-size: 1.6rem; }
  body.learning .options { gap: 8px; }
  body.learning .option { min-height: 48px; padding: 8px 12px; }
  body.learning .feedback { padding: 10px 14px; line-height: 1.4; }
  body.learning .feedback.good strong { font-size: 1.02rem; }
  body.learning .feedback .btn { min-height: 34px; padding-block: 4px; }
  body.learning .btn.big { padding-block: 11px; }
  body.learning .round-body .stack { gap: 8px; }
  body.learning .answer-input { padding-block: 9px; }
  body.learning .accents { gap: 5px; }
  body.learning .accents .btn { min-height: 38px; padding-block: 4px; }
  /* Sicherheitsnetz: wird es doch länger, bleiben die Hauptknöpfe unten sichtbar */
  body.learning .round-body > [data-action=next], body.learning .round-body > .two, body.learning .round-body > .btn.primary[data-action=reveal] { position: sticky; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 6; }
  body.learning .round-body > .two { background: var(--bg); box-shadow: 0 0 0 8px var(--bg); border-radius: var(--radius); }
  body.learning .round-body > [data-action=next] { box-shadow: 0 3px 0 var(--button-deep), 0 0 0 7px var(--bg); }
}
/* Niedrige Displays oder offene Tastatur: noch flacher */
@media (max-width: 660px) and (max-height: 700px) {
  body.learning .card.question { min-height: 112px; margin-top: 18px; padding: 34px 14px 10px; }
  body.learning .question .word { font-size: 1.65rem; }
  body.learning .option { min-height: 42px; padding-block: 5px; }
  body.learning .options { gap: 6px; }
}
@media (max-width: 660px) and (max-height: 480px) {
  body.learning .card.question { min-height: 84px; padding-top: 30px; }
  body.learning .combo { display: none; }
}

/* Nach der Antwort zählen nur noch deine Wahl und die Lösung */
@media (max-width: 660px) {
  body.learning .option:disabled:not(.correct):not(.wrong) { display: none; }
}

/* ===== Die Flamme als Figur ===== */
.flame .face { fill: #3b1d10; }
.flame.t5 .face { fill: #10294f; }
.flame.t6 .face { fill: #2d1650; }
.flame .face .line { fill: none; stroke: currentColor; color: #3b1d10; stroke-width: 1.7; stroke-linecap: round; }
.flame.t5 .face .line { color: #10294f; }
.flame.t6 .face .line { color: #2d1650; }
.flame .face .cheek { fill: #e8603c; opacity: .42; }
.flame .face .shine { fill: #fff; }
.flame .face > *:not(.cheek), .flame .zzz { display: none; }
.flame.mood-happy .e-open, .flame.mood-happy .m-smile,
.flame.mood-cheer .e-joy, .flame.mood-cheer .m-open,
.flame.mood-oh .e-open, .flame.mood-oh .m-oh,
.flame.mood-nod .e-wink, .flame.mood-nod .m-smile,
.flame.mood-sleep .e-sleep, .flame.mood-sleep .m-sleep, .flame.mood-sleep .zzz { display: inline; }
.flame .blink { transform-origin: 32px 60px; animation: blink 4.2s infinite; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
.flame .zzz path { fill: none; stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; animation: zzz 2.8s ease-in-out infinite; opacity: 0; }
.flame .zzz path + path { stroke-width: 1.9; animation-delay: -1.4s; }
@keyframes zzz { 20%, 70% { opacity: .9; } 100% { opacity: 0; transform: translate(4px, -9px); } }
/* Dösen heißt ruhig und etwas matter, nicht ausgegraut */
.flame.buddy-face.waiting { filter: saturate(.72) brightness(.97); }
.flame.buddy-face.waiting g { animation: none; }
.flame.buddy-face.waiting .fl-body { animation: breathe 3.4s ease-in-out infinite; }
.flame.buddy-face.waiting .zzz path { animation: zzz 2.8s ease-in-out infinite; }
.flame.buddy-face.waiting .zzz path + path { animation-delay: -1.4s; }
@keyframes breathe { 50% { transform: scale(1.025, .955); } }

/* Begleiter auf der Abfragekarte */
.buddy { position: absolute; right: 12px; bottom: calc(100% - 30px); z-index: 2; pointer-events: none; transform-origin: 50% 100%; scale: var(--grow, 1); }
.buddy .flame { display: block; width: 46px; height: 60px; vertical-align: 0; }
.buddy.wake { animation: wake .75s var(--ease) both; }
@keyframes wake { 0% { translate: 0 16px; scale: .5 .3; opacity: 0; } 60% { translate: 0 -8px; scale: .92 1.12; opacity: 1; } }
.buddy.hop { animation: hop .6s ease both; }
@keyframes hop { 25% { translate: 0 -16px; scale: calc(var(--grow, 1) * .94) calc(var(--grow, 1) * 1.1); } 55% { translate: 0 0; scale: calc(var(--grow, 1) * 1.1) calc(var(--grow, 1) * .9); } 75% { translate: 0 -5px; } }
.buddy .flame.mood-oh { animation: startle .45s ease; }
.buddy .flame.mood-nod .fl-body { animation: nod 1.2s ease 2; }
@keyframes startle { 30% { translate: 0 -7px; } }
@keyframes nod { 30% { transform: rotate(-7deg); } 65% { transform: rotate(6deg); } }
@media (max-width: 660px) { body.learning .buddy { bottom: calc(100% - 22px); right: 8px; } body.learning .buddy .flame { width: 38px; height: 50px; } }

.summary-buddy { display: flex; justify-content: center; }
.summary-buddy .flame { width: 76px; height: 100px; }
.summary.reveal .summary-buddy { animation: hop-in .8s .3s var(--ease) both; }
@keyframes hop-in { 0% { translate: 0 30px; opacity: 0; } 60% { translate: 0 -12px; opacity: 1; } }

/* Neue Stufe: die alte Gestalt geht, die neue wächst an ihrer Stelle */
.evolve { display: grid; justify-items: center; }
.evolve > .flame { grid-area: 1 / 1; }
.evolve > .old { animation: evolve-old 1.5s ease-in forwards; }
.evolve > .new { animation: evolve-new .9s 1.35s cubic-bezier(.2, .9, .3, 1.4) both; }
@keyframes evolve-old { 0%, 45% { opacity: 1; scale: 1; filter: brightness(1); } 55% { scale: 1.06; } 65% { scale: .96; } 75% { scale: 1.1; filter: brightness(1.7); } 100% { opacity: 0; scale: .5; filter: brightness(3); } }
@keyframes evolve-new { from { opacity: 0; scale: .4; filter: brightness(2.6); } }

/* ===== Karten fliegen in den Karteikasten ===== */
.flight { position: relative; }
.slots.mini { height: 156px; padding: 34px 10px 0; gap: 6px; border-width: 5px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.slots.mini .slot-label strong { font-size: 1.15rem; }
.slots.mini .slot-pile { transition: height .25s var(--ease); }
.slots.mini .slot.landed .slot-label { animation: landed .35s ease; }
@keyframes landed { 40% { translate: 0 4px; scale: 1.08 .94; filter: brightness(1.18); } }
.flying { position: absolute; left: 0; top: 0; z-index: 3; max-width: 112px; padding: 7px 10px; background: var(--field); color: var(--text); border-top: 3px solid var(--margin); border-radius: 5px; box-shadow: 0 6px 16px rgba(0, 0, 0, .28); font: 700 .8rem/1.2 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
@media (max-width: 520px) { .slots.mini { padding-inline: 4px; gap: 3px; } }

/* Als App gestartet: Platz für Statusleiste und untere Geste lassen */
@media (display-mode: standalone) {
  .top { padding-top: calc(16px + env(safe-area-inset-top)); }
  main { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .buddy, .buddy .flame, .summary.reveal .summary-buddy, .flame .blink, .flame .zzz path { animation: none !important; }
  .flame.mood-sleep .zzz path { opacity: .8; }
  .evolve > .old { display: none; }
  .evolve > .new { animation: none !important; }
}

/* Offene Tastatur: Karte flacher, damit alles darüber Platz hat */
@media (max-width: 660px) {
  body.learning.keyboard main { gap: 6px; padding-bottom: 8px; }
  body.learning.keyboard .combo { display: none; }
  body.learning.keyboard .card.question { min-height: 82px; margin: 18px 0 6px; padding: 30px 12px 8px; gap: 2px;
    background: linear-gradient(var(--margin), var(--margin)) 0 20px / 100% 2px no-repeat, var(--card); }
  body.learning.keyboard .question .word { font-size: 1.5rem; }
  body.learning.keyboard .question p { font-size: .85rem; }
  body.learning.keyboard .accents .btn { min-height: 34px; padding-block: 2px; }
}

/* ===== Aus Foto: Warten und Vorschau ===== */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.scan-thumb { align-self: center; max-width: 100%; max-height: 220px; border-radius: var(--radius); border: 1.5px solid var(--edge); }
.scan-busy p { text-align: center; }
.scan-dots { display: inline-flex; gap: 4px; margin-right: 4px; }
.scan-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: scan-dot 1s ease-in-out infinite; }
.scan-dots i:nth-child(2) { animation-delay: .15s; }
.scan-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes scan-dot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-4px); } }
.scan-error { background: var(--bad-soft); color: var(--bad); border-radius: 6px; padding: 10px 12px; }
.scan-photo img { display: block; width: 100%; max-height: 75vh; object-fit: contain; }
.scan-list { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ruled); }
.scan-list li { display: flex; gap: 4px; border-bottom: 1.5px solid var(--ruled); padding-block: 8px; }
.scan-check { justify-content: center; align-items: center; min-width: 40px; cursor: pointer; }
.scan-check input { width: 22px; height: 22px; accent-color: var(--button); }
.scan-fields { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 6px; }
.scan-fields .tag { grid-column: 1 / -1; }
.grow-field { display: grid; min-width: 0; }
.grow-field::after, .grow-field textarea { grid-area: 1 / 1; font: inherit; line-height: 1.4; padding: 10px 12px; border: 1.5px solid transparent; white-space: pre-wrap; overflow-wrap: anywhere; }
.grow-field::after { content: attr(data-copy) " "; visibility: hidden; }
.grow-field textarea { min-height: 0; resize: none; overflow: hidden; border-color: var(--edge); }
.scan-list li.off textarea { opacity: .45; text-decoration: line-through; }
@media (max-width: 520px) { .scan-fields { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .scan-dots i { animation: none; opacity: .7; } }

/* ===== Fehler am Feld ===== */
.field-error { margin-top: 6px; background: var(--bad-soft); color: var(--bad); border-radius: 6px; padding: 7px 11px; font-size: .875rem; font-weight: 600; text-align: left; }
input[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--bad) !important; }
.fields > div { min-width: 0; }

/* ===== Wortliste: Werkzeuge, Bearbeiten, Auswahl, Vorschau ===== */
.list-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.list-tools select { flex: 1 1 140px; width: auto; }
.select-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--accent-soft); border-radius: var(--radius); padding: 10px 12px; }
.select-bar input { flex: 1 1 140px; width: auto !important; }
.select-bar .field-error { flex-basis: 100%; order: 9; }
.word-list li.editing { display: block; padding-block: 4px; }
.word-list li.editing > form { padding-block: 10px; }
.word-list li.flash { animation: row-flash 1.8s ease; }
@keyframes row-flash { 0%, 40% { background: var(--warm-soft); } }
.pick { justify-content: center; align-items: center; min-width: 42px; min-height: 42px; cursor: pointer; }
.pick input { width: 22px; height: 22px; accent-color: var(--button); }
.bulk-preview { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; border-top: 1.5px solid var(--ruled); font-size: .9rem; }
.bulk-preview li { padding: 5px 2px; border-bottom: 1.5px solid var(--ruled); overflow-wrap: anywhere; }
.bulk-preview li.bad { background: var(--bad-soft); color: var(--bad); padding-inline: 8px; }

/* ===== Lernrunde ===== */
.accents .btn.shift[aria-pressed=true] { background: var(--accent-soft); border-color: var(--accent); }
.question .retry-hint { background: var(--warm-soft); border-radius: 6px; padding: 5px 12px; font-size: .92rem; font-weight: 600; line-height: 1.4; }

/* ===== Anmeldeseite und Konto ===== */
.password-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.password-row .field-error { grid-column: 1 / -1; order: 3; }
.password-row .btn { min-height: 46px; }

/* ===== Karteikasten: jedes Fach erklärt sich beim Darüberfahren oder Antippen ===== */
.slot { position: relative; }
.slot-button { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; width: 100%; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; text-align: center; }
.slot-button .slot-label, .slot-button .slot-pile { display: block; }
.slot-button:focus-visible { outline-offset: 1px; }
.box-top .slot-tip { position: absolute; z-index: 16; left: 50%; bottom: calc(100% - 6px); transform: translateX(-50%); width: 190px; display: none; flex-direction: column; gap: 3px; background: var(--field); color: var(--text); border: 1.5px solid var(--edge); border-radius: var(--radius); box-shadow: 0 10px 24px rgba(0, 0, 0, .25); padding: 9px 11px; font-size: .84rem; line-height: 1.4; text-align: left; pointer-events: none; }
/* Randfächer: die Erklärung bleibt im Kasten */
.box-top .slot:nth-child(-n+2) .slot-tip { left: 0; transform: none; }
.box-top .slot:nth-child(n+5) .slot-tip { left: auto; right: 0; transform: none; }
.slot.open .slot-tip, .slot-button:focus-visible + .slot-tip { display: flex; }
@media (hover: hover) {
  .slot-button:hover + .slot-tip { display: flex; }
  .slot-button:hover .slot-label { filter: brightness(1.12); }
}
/* sehr schmale Handys: lange Fach-Namen etwas kleiner */
@media (max-width: 360px) { .slots .slot-label span { font-size: .56rem; letter-spacing: -.01em; } .box-top .slots { gap: 2px; padding-inline: 3px; } }

/* ===== Testplaner ===== */
.plan-card { border-top: 4px solid var(--warm); }
.plan-progress { display: flex; flex-direction: column; gap: 6px; }
.plan-progress .progress { flex: none; height: 12px; }
.plan-progress .progress { display: flex; }
.plan-progress .progress > div { background: var(--good); }
.plan-progress .progress > div.underway { background: color-mix(in srgb, var(--good) 38%, transparent); }
.plan-actions { justify-content: center; }
.plan-note { background: var(--accent-soft); border-radius: var(--radius); padding: 10px 14px; text-align: center; font-size: .92rem; }
input[type=date] { width: 100%; background: var(--field); border: 1.5px solid var(--edge); border-radius: 6px; padding: 10px 12px; color-scheme: light dark; min-height: 44px; }

/* ===== Diktat ===== */
.listen { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.listen-play { display: inline-flex; align-items: center; gap: 8px; font-size: 1.1rem; padding: 12px 20px; }
.listen-play .ic { width: 26px; height: 26px; }
.cannot-listen { display: inline-flex; align-items: center; gap: 6px; font-size: .92rem; text-decoration: underline; }
@media (max-width: 660px) { body.learning.keyboard .listen .btn, body.learning.keyboard .cannot-listen { min-height: 34px; padding-block: 3px; font-size: .9rem; } }

/* ===== Stimmenauswahl ===== */
.voice-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.voice-row label { min-width: 0; }
.voice-row select { min-height: 44px; }
.voice-row .btn { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 520px) { .voice-row { grid-template-columns: 1fr; } }

/* ===== Stimme Siwis ===== */
.siwis-box { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; align-items: flex-start; }
.siwis-progress { margin-top: 10px; font-weight: 600; }

/* ===== Nach dem Test: Pause, Archiv, Noten ===== */
.dot.paused { border: 1.5px dotted var(--muted); color: var(--muted); font-weight: 700; opacity: .7 !important; }
.chips.grades .chip { min-width: 0; }
.archive-list, .result-list { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ruled); }
.archive-list li, .result-list li { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 0; border-bottom: 1.5px solid var(--ruled); }
.archive-list li > div:first-child, .result-list li > div { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.result-list li { justify-content: flex-start; flex-wrap: nowrap; }
.grade { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font: 700 1.2rem var(--serif); background: var(--good-soft); color: var(--good); }
.grade.none { background: transparent; border: 1.5px dashed var(--edge); color: var(--muted); }

/* ===== Weitere Übungen ===== */
.extra-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.btn.extra { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; }
.btn.extra .ic { flex: none; width: 28px; height: 28px; }
.btn.extra > span { display: flex; flex-direction: column; min-width: 0; }
.btn.extra .small { font-weight: 400; }

/* Drei Felder und „Prüfen“ sollen auch über der Handytastatur Platz haben */
@media (max-width: 660px) {
  body.learning.keyboard [data-form=forms] { gap: 4px; }
  body.learning.keyboard [data-form=forms] label { gap: 1px; font-size: .78rem; }
  body.learning.keyboard [data-form=forms] .answer-input { padding-block: 4px; min-height: 36px; font-size: 1.05rem; }
  body.learning.keyboard [data-form=forms] .btn.primary { padding-block: 8px; }
}

/* Probetest: Kontrolle vor der Auswertung */
.exam-score .exam-grade { font-family: var(--serif); font-size: 1.6rem; }
.exam-list { list-style: none; margin: 0; padding: 0; }
.exam-list li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 11px 0; border-bottom: 1.5px solid var(--ruled); overflow-wrap: anywhere; }
.exam-list li:last-child { border-bottom: 0; }
.exam-list .mark { display: flex; align-items: flex-start; gap: 1px; padding-top: 2px; }
.exam-list .mark .ic { width: 20px; height: 20px; }
.exam-list li.right .mark { color: var(--good); }
.exam-list li.near .mark { color: var(--warm); }
.exam-list li.wrong .mark { color: var(--bad); }
.flip-verdict { padding: 4px 0; }

/* Zuordnen-Spiel */
.match-top { justify-content: space-between; flex-wrap: nowrap; }
.match-time { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.match-column { display: grid; grid-auto-rows: 1fr; gap: 9px; }
.tile { min-height: 62px; padding: 8px 10px; border: 1.5px solid var(--edge); border-radius: var(--radius); background: var(--card); color: var(--text); box-shadow: var(--lift); font: inherit; line-height: 1.25; cursor: pointer; overflow-wrap: anywhere; hyphens: auto; }
.tile[aria-pressed=true] { background: var(--accent-soft); border-color: var(--accent); font-weight: 700; }
.tile.wrong { background: var(--bad-soft); border-color: var(--bad); }
.tile.solved { background: var(--good-soft); border-color: transparent; color: var(--good); box-shadow: none; opacity: .45; cursor: default; }
@media (max-width: 360px) { .tile { font-size: .88rem; padding: 6px; } }
