/*
 * Ausbildungsplattform BAWZ Florian Deutschlandsberg
 *
 * Gestaltung nach Apples Oberflächen: Systemschrift, gruppierte Listen,
 * große Titel, Sheets von unten, Glas nur auf den festen Leisten.
 * Zuerst fürs Handy (390 px) gebaut, ab 640 px Tablet, ab 1024 px Schreibtisch.
 * Feuerwehr-Rot aus dem Kopfbanner ist der einzige Akzent, Orange (Flamme)
 * und Grün nur für Fortschritt und richtige Antworten.
 */

:root {
  color-scheme: light;

  /* Flächen */
  --bg: #f2f2f7;
  --surface: #ffffff;
  --surface-2: #f7f7fa;
  --fuellung: rgba(118, 118, 128, 0.12);
  --fuellung-2: rgba(118, 118, 128, 0.08);
  --druck: rgba(0, 0, 0, 0.06);

  /* Schrift */
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #8e8e93;
  --ink-4: #c7c7cc;

  /* Akzent — Kopfbanner des BFV Deutschlandsberg */
  --rot: #b3202b;
  --rot-dunkel: #951a23;
  --rot-hell: rgba(179, 32, 43, 0.1);
  --orange: #e0761c;
  --orange-hell: rgba(224, 118, 28, 0.12);

  /* Status */
  --gruen: #1f8a3a;
  --gruen-voll: #34c759;
  --gruen-hell: rgba(52, 199, 89, 0.14);
  --gelb: #a65f00;
  --gelb-voll: #ff9f0a;
  --gelb-hell: rgba(255, 159, 10, 0.14);
  --blau: var(--ink-2);
  --blau-hell: var(--fuellung);

  /* Linien */
  --linie: rgba(60, 60, 67, 0.16);
  --linie-stark: rgba(60, 60, 67, 0.29);

  --radius: 16px;
  --radius-s: 12px;
  --radius-l: 22px;

  /* Bewegung (Apple/Vaul-Kurven) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);

  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    sans-serif;

  --oben: env(safe-area-inset-top, 0px);
  --unten: env(safe-area-inset-bottom, 0px);
  --kopf: 44px;
  --tab: 50px;
  --rand: 16px;
  --sidebar: 264px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.47;
  letter-spacing: -0.01em;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
h4,
.btn,
.tab,
.chip,
.nav a {
  hyphens: none;
  text-wrap: balance;
}

p,
dd,
.lese-text {
  hyphens: auto;
  hyphenate-limit-chars: 18 6 5;
}

a {
  color: var(--rot);
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button,
a,
label {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid rgba(179, 32, 43, 0.4);
  outline-offset: 2px;
  border-radius: 10px;
}

img {
  max-width: 100%;
}

/* ------------------------------------------------------------------ Laden */

.app-lade,
.ladeanzeige {
  display: grid;
  place-items: center;
  min-height: 40vh;
}
.app-lade {
  min-height: 100dvh;
}
.spinner {
  display: block;
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--fuellung);
  border-top-color: var(--ink-3);
  border-radius: 50%;
  animation: dreh 0.6s linear infinite;
}
@keyframes dreh {
  to {
    transform: rotate(360deg);
  }
}

/* ----------------------------------------------------- Anmeldung & Profilwahl */

.login,
.profilwahl {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: calc(var(--oben) + 32px) 20px calc(var(--unten) + 32px);
}
.login-karte,
.profilwahl-box {
  width: 100%;
  max-width: 400px;
  text-align: center;
}
.login-marke {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: 0 auto;
  border-radius: 21px;
  background: var(--surface);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.08),
    0 1px 2px rgba(0, 0, 0, 0.06);
}
.login-marke .flamme {
  width: 50px;
  height: 50px;
}
.login-inhalt h1,
.profilwahl-titel {
  margin-top: 22px;
  font-size: 30px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.login-inhalt p.sub,
.profilwahl-text {
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 16px;
}
.login form {
  display: grid;
  gap: 16px;
  margin-top: 30px;
  text-align: left;
}
.login form .btn {
  margin-top: 6px;
}
.login-banner {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 40px auto 0;
  border-radius: 10px;
  opacity: 0.92;
}
.profilwahl-box > div:first-child {
  margin-bottom: 26px;
}

/* --------------------------------------------------------------- Gerüst */

.shell {
  min-height: 100dvh;
}

.inhalt {
  padding-top: calc(var(--oben) + var(--kopf));
  padding-bottom: calc(var(--unten) + var(--tab) + 32px);
  overflow-x: clip;
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 4px var(--rand) 0;
}

body.fokus .inhalt {
  padding-top: 0;
  padding-bottom: calc(var(--unten) + 32px);
}
body.fokus .topbar {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-100%);
}

/* Kopfleiste: durchsichtig, bis der große Titel darunter verschwindet. */
.topbar {
  position: fixed;
  z-index: 30;
  transition:
    opacity 0.25s ease,
    transform 0.35s var(--ease-sheet);
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--oben) + var(--kopf));
  padding: var(--oben) 8px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.topbar::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(247, 247, 250, 0.78);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: inset 0 -0.5px 0 var(--linie);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.topbar.kompakt::before {
  opacity: 1;
}
.topbar h1 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.2s ease,
    transform 0.25s var(--ease-out);
}
.topbar.kompakt h1 {
  opacity: 1;
  transform: none;
}
.topbar-rechts {
  justify-self: end;
  padding-right: 8px;
}
.topbar-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  border-radius: 50%;
  transition: transform 0.16s var(--ease-out);
}
.topbar-avatar:active {
  transform: scale(0.92);
}
.topbar-avatar .avatar {
  width: 32px;
  height: 32px;
  font-size: 13px;
}

/* Tab-Leiste */
.tabbar {
  position: fixed;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  height: calc(var(--tab) + var(--unten));
  padding-bottom: var(--unten);
  background: rgba(249, 249, 251, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: inset 0 0.5px 0 var(--linie);
  transition: transform 0.35s var(--ease-sheet);
}
body.fokus .tabbar {
  transform: translateY(100%);
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding-top: 2px;
  border: 0;
  background: none;
  color: #999;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0;
}
.tab svg {
  width: 25px;
  height: 25px;
  stroke-width: 1.7;
  transition: transform 0.16s var(--ease-out);
}
.tab:active svg {
  transform: scale(0.88);
}
.tab.aktiv {
  color: var(--rot);
}
.tab.aktiv svg {
  stroke-width: 2.1;
}

/* Seitenleiste (Schreibtisch) */
.sidebar {
  display: none;
}

/* Seitenwechsel: kurz einblenden, Detail schiebt sich von rechts herein */
.seite-rein {
  animation: seiteRein 0.24s var(--ease-out) backwards;
}
@keyframes seiteRein {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.schieben-rein {
  animation: schiebenRein 0.42s var(--ease-sheet) backwards;
}
@keyframes schiebenRein {
  from {
    opacity: 0;
    transform: translateX(28%);
  }
}
.schieben-zurueck {
  animation: schiebenZurueck 0.42s var(--ease-sheet) backwards;
}
@keyframes schiebenZurueck {
  from {
    opacity: 0;
    transform: translateX(-12%);
  }
}

/* ------------------------------------------------------------ Seitenkopf */

.seitenkopf {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 6px 0 22px;
}
.seitenkopf h2 {
  font-size: 34px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.seitenkopf p {
  max-width: 62ch;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.45;
}
.seitenkopf .rechts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
@media (max-width: 639px) {
  .seitenkopf .rechts .btn {
    flex: 1 1 auto;
  }
}

.zurueck-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  margin: -6px 0 0 -6px;
  padding: 0 8px 0 2px;
  border: 0;
  background: none;
  color: var(--rot);
  font-size: 17px;
  font-weight: 400;
}
.zurueck-link svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.4;
}

.abschnitt-kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 4px 8px;
}
.abschnitt-kopf h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.schnellwahl {
  display: flex;
  gap: 2px;
  margin-right: -10px;
}

.ueberzeile {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0;
}

.fussnote-text {
  margin: 14px 4px 0;
  font-size: 13px;
  color: var(--ink-3);
}

/* ---------------------------------------------------------------- Karten */

.karte {
  min-width: 0;
  background: var(--surface);
  border-radius: var(--radius);
}
.karte + .karte {
  margin-top: 14px;
}
.karte-kopf {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px 6px;
}
.karte-kopf > svg {
  color: var(--rot);
  flex-shrink: 0;
}
.karte-kopf h2 {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.karte-kopf .rechts,
.karte-kopf > .ueberzeile:last-child {
  margin-left: auto;
}
.karte-inhalt {
  padding: 16px 18px;
}

.raster {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr);
}

/* --------------------------------------------------------------- Knöpfe */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  --rand-x: 20px;
  gap: 7px;
  min-height: 44px;
  padding: 0 var(--rand-x);
  border: 0;
  border-radius: 999px;
  background: var(--fuellung);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  white-space: nowrap;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  transition:
    transform 0.16s var(--ease-out),
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}
.btn svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  stroke-width: 2;
}
/* Der Text steht genau in der Mitte, das Symbol links daneben (Sascha, 04.11.2026):
   das Symbol nimmt keinen Platz in der Mitte ein, beide Seiten bekommen gleich viel Rand dazu. */
.btn:not(.icon):has(> svg:first-child) {
  padding-inline: calc(var(--rand-x) + 26px);
}
.btn:not(.icon) > svg:first-child {
  margin-left: -26px;
}
.btn:active:not(:disabled) {
  transform: scale(0.97);
  background-color: rgba(118, 118, 128, 0.2);
}
.btn:disabled {
  opacity: 0.38;
  cursor: default;
}

.btn.primaer {
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 55%),
    var(--rot);
  box-shadow:
    inset 0 0.5px 0 rgba(255, 255, 255, 0.35),
    0 1px 2px rgba(149, 26, 35, 0.3),
    0 6px 16px -8px rgba(179, 32, 43, 0.7);
}
.btn.primaer:active:not(:disabled) {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 55%),
    var(--rot-dunkel);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.18),
    0 1px 1px rgba(149, 26, 35, 0.25);
}
.btn.still {
  background: transparent;
  color: var(--rot);
  font-weight: 500;
  padding: 0 12px;
}
.btn.still:active:not(:disabled) {
  background: var(--rot-hell);
}
.btn.gefahr {
  background: var(--rot-hell);
  color: var(--rot);
}
.btn.gefahr:active:not(:disabled) {
  background: rgba(179, 32, 43, 0.18);
}
.btn.gross {
  --rand-x: 26px;
  min-height: 52px;
  font-size: 17px;
}
.btn.klein {
  --rand-x: 14px;
  min-height: 36px;
  font-size: 15px;
}
.btn.klein::after {
  content: '';
  position: absolute;
  inset: -4px;
}
.btn.voll {
  width: 100%;
}
.btn.icon {
  width: 44px;
  padding: 0;
}
.btn.icon.klein {
  width: 36px;
}
.btn.icon.still {
  color: var(--ink);
}
.gelernt-knopf {
  background: var(--gruen-hell);
  color: var(--gruen);
}
.gelernt-knopf:active:not(:disabled) {
  background: rgba(52, 199, 89, 0.22);
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover:not(:disabled) {
    background-color: rgba(118, 118, 128, 0.17);
  }
  .btn.primaer:hover:not(:disabled) {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 55%),
      #a51d27;
  }
  .btn.still:hover:not(:disabled) {
    background: var(--rot-hell);
  }
  .btn.gefahr:hover:not(:disabled) {
    background: rgba(179, 32, 43, 0.16);
  }
}

/* -------------------------------------------------------------- Eingaben */

.feld {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.feld > label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  padding-left: 4px;
}
.feld .hilfe,
.hilfe {
  font-size: 13px;
  color: var(--ink-3);
  padding-left: 4px;
}

.eingabe {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 11px 14px;
  border: 0;
  border-radius: var(--radius-s);
  background: var(--fuellung-2);
  box-shadow: inset 0 0 0 1px transparent;
  font-size: 17px; /* unter 16 px zoomt iOS beim Antippen */
  line-height: 1.3;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition:
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}
.eingabe::placeholder {
  color: var(--ink-3);
}
.eingabe:focus {
  background: var(--surface);
  box-shadow:
    inset 0 0 0 1.5px var(--rot),
    0 0 0 4px var(--rot-hell);
}
textarea.eingabe {
  min-height: 96px;
  resize: vertical;
}
select.eingabe {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
input[type='date'].eingabe {
  min-height: 46px;
}
input[type='checkbox'] {
  accent-color: var(--rot);
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Segmentschalter */
.segment {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--anzahl), minmax(0, 1fr));
  padding: 2px;
  border-radius: 10px;
  background: var(--fuellung);
  min-height: 40px;
}
.segment-marke {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc((100% - 4px) / var(--anzahl));
  border-radius: 8px;
  background: var(--surface);
  box-shadow:
    0 3px 8px rgba(0, 0, 0, 0.12),
    0 3px 1px rgba(0, 0, 0, 0.04);
  opacity: 0;
  transition:
    transform 0.32s var(--ease-sheet),
    opacity 0.2s ease;
}
.segment.gewaehlt .segment-marke {
  opacity: 1;
}
.segment-option {
  position: relative;
  z-index: 1;
  border: 0;
  background: none;
  min-height: 36px;
  font-size: 15px;
  font-weight: 500;
  transition: transform 0.15s var(--ease-out);
}
.segment-option:active {
  transform: scale(0.94);
}
.segment-option[aria-checked='true'] {
  font-weight: 650;
}

/* ------------------------------------------------------- Kleine Anzeigen */

.abzeichen,
.wert-pille {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--fuellung);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.abzeichen.gruen,
.wert-pille.gruen {
  background: var(--gruen-hell);
  color: var(--gruen);
}
.abzeichen.gelb,
.wert-pille.gelb {
  background: var(--gelb-hell);
  color: var(--gelb);
}
.abzeichen.rot,
.wert-pille.rot {
  background: var(--rot-hell);
  color: var(--rot);
}

.balken {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: var(--fuellung);
  overflow: hidden;
}
.balken > i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  border-radius: inherit;
  background: var(--rot);
  transform-origin: left center;
  transition: transform 0.5s var(--ease-out);
}
.balken.fein {
  height: 4px;
}
.balken.gruen > i {
  background: var(--gruen-voll);
}
.balken.gelb > i {
  background: var(--gelb-voll);
}

.punkt-farbe {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--rot);
}
.punkt-farbe.gruen {
  background: var(--gruen-voll);
}
.punkt-farbe.gelb {
  background: var(--gelb-voll);
}

.hinweis {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius-s);
  background: var(--fuellung-2);
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.45;
}
.hinweis svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--ink-3);
}
.hinweis.warn {
  background: var(--orange-hell);
}
.hinweis.gut {
  background: var(--gruen-hell);
}
.test-ansicht > .hinweis {
  margin-bottom: 14px;
}

.leer {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 40px 24px;
  text-align: center;
}
.leer svg {
  width: 40px;
  height: 40px;
  color: var(--ink-4);
  margin-bottom: 6px;
  stroke-width: 1.5;
}
.leer b {
  font-size: 17px;
  font-weight: 600;
}
.leer p {
  max-width: 40ch;
  color: var(--ink-2);
  font-size: 15px;
}
.leer .btn {
  margin-top: 10px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(180deg, #a8a8ad, #86868b);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.avatar.gross {
  width: 46px;
  height: 46px;
  font-size: 17px;
}
.avatar.ausbilder {
  background: linear-gradient(180deg, #cf3a43, var(--rot));
}

.kachel-symbol {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  flex-shrink: 0;
  color: #fff;
  background: var(--rot);
}
.kachel-symbol svg {
  width: 21px;
  height: 21px;
  stroke-width: 2;
}
.kachel-symbol.orange {
  background: var(--orange);
}
.kachel-symbol.gruen {
  background: var(--gruen-voll);
}
.kachel-symbol.grau {
  background: #8e8e93;
}

/* ---------------------------------------------------- Gruppierte Listen */

.liste,
.profil-liste {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
}
.liste-zeile,
.profil-eintrag {
  --einzug: 16px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 10px 16px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
  text-align: left;
  text-decoration: none;
  transition: background-color 0.3s ease;
}
.liste-zeile + .liste-zeile::before,
.profil-eintrag + .profil-eintrag::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--einzug);
  right: 0;
  height: 0.5px;
  background: var(--linie);
}
button.liste-zeile:active,
a.liste-zeile:active,
.profil-eintrag:active {
  background: var(--druck);
  transition: none;
}
.zeile-text,
.profil-eintrag .name {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.zeile-text b,
.profil-eintrag .name b {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.zeile-text span,
.profil-eintrag .name span {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.35;
  margin-top: 1px;
}
.zeile-symbol {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--rot);
  color: #fff;
}
.zeile-symbol svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}
.liste-zeile:has(.zeile-symbol) {
  --einzug: 58px;
}
.liste-zeile:has(.avatar),
.profil-eintrag {
  --einzug: 64px;
}
.liste-zeile:has(.auswahl-kreis) {
  --einzug: 54px;
}
.zeile-wert {
  color: var(--ink-3);
  font-size: 15px;
  flex-shrink: 0;
}
.zeile-pfeil,
.profil-eintrag > svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--ink-4);
  stroke-width: 2.6;
}
.profil-zeile {
  border-radius: var(--radius);
  background: var(--surface-2);
}

/* Runder Abhakkreis wie in Erinnerungen */
.auswahl-kreis {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1.6px var(--ink-4);
  color: transparent;
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.25s var(--ease-out);
}
.auswahl-kreis svg {
  width: 15px;
  height: 15px;
  stroke-width: 3;
  transform: scale(0.6);
  transition: transform 0.3s var(--ease-out);
}
[aria-checked='true'] > .auswahl-kreis,
[aria-checked='true'] .auswahl-kreis,
.fertig > .auswahl-kreis {
  background: var(--rot);
  box-shadow: none;
  color: #fff;
}
[aria-checked='true'] > .auswahl-kreis svg,
[aria-checked='true'] .auswahl-kreis svg,
.fertig > .auswahl-kreis svg {
  transform: none;
}
button:active > .auswahl-kreis,
.haken-knopf:active .auswahl-kreis {
  transform: scale(0.88);
}
.lernweg-zeile {
  min-height: 48px;
}
.lernweg-zeile .zeile-text b {
  font-size: 16px;
}
.lernweg-zeile.fertig .zeile-text b {
  color: var(--ink-2);
}

/* Testauswahl */
.auswahl-aktion {
  position: sticky;
  bottom: calc(var(--unten) + var(--tab) + 10px);
  z-index: 5;
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  border-radius: var(--radius-l);
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.1),
    0 1px 2px rgba(0, 0, 0, 0.05);
}
.auswahl-fuss {
  text-align: center;
  font-size: 14px;
  color: var(--ink-2);
}

.fortsetzen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 8px;
}
.fortsetzen .zeile-text {
  min-width: 180px;
}
.fortsetzen-knoepfe {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

/* ---------------------------------------------------------------- Tabellen */

.tabellen-huelle {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tabelle {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.tabelle th {
  padding: 10px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  white-space: nowrap;
  border-bottom: 0.5px solid var(--linie);
}
.tabelle td {
  padding: 12px 16px;
  vertical-align: top;
  border-bottom: 0.5px solid var(--linie);
}
.tabelle tr:last-child td {
  border-bottom: 0;
}
.tabelle .rechts,
.tabelle th.rechts {
  text-align: right;
}
.tabelle td.stark {
  font-weight: 620;
}

@media (max-width: 639px) {
  /* Tabellen werden zu lesbaren Zeilen statt seitlich zu scrollen */
  .tabelle thead {
    display: none;
  }
  .tabelle,
  .tabelle tbody {
    display: block;
  }
  .tabelle tr {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 10px;
    padding: 12px 16px;
    border-bottom: 0.5px solid var(--linie);
  }
  .tabelle tr:last-child {
    border-bottom: 0;
  }
  .tabelle td {
    display: block;
    padding: 0;
    border: 0;
  }
  .tabelle td.rechts {
    margin-left: auto;
  }
  .lese-tabelle td:first-child {
    font-weight: 650;
  }
  .lese-tabelle td:nth-child(2) {
    flex: 1 1 60%;
    font-weight: 600;
  }
  .lese-tabelle td:nth-child(n + 3) {
    flex-basis: 100%;
    font-size: 15px;
    color: var(--ink-2);
  }
  .lese-tabelle td:nth-child(n + 3)::before {
    content: attr(data-label) ': ';
    color: var(--ink-3);
  }
  .lese-tabelle td.leer-zelle:nth-child(n + 3) {
    display: none;
  }
}

/* --------------------------------------------------------- Sheets & Dialoge */

.dialog-huelle {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.dialog-huelle::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.dialog-huelle.offen::before {
  opacity: var(--abdunkeln, 1);
}
.dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: calc(100dvh - var(--oben) - 10px);
  padding-bottom: var(--unten);
  border-radius: 14px 14px 0 0;
  background: var(--surface);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.12);
  transform: translateY(100%);
  transition: transform 0.5s var(--ease-sheet);
}
.dialog-huelle.offen .dialog {
  transform: none;
}
.dialog-huelle:not(.offen) .dialog {
  transition-duration: 0.32s;
}
.dialog-kopf {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 16px 60px 8px;
  touch-action: none;
  cursor: grab;
  flex-shrink: 0;
}
.dialog-griff {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 36px;
  height: 5px;
  border-radius: 3px;
  background: rgba(60, 60, 67, 0.3);
  transform: translateX(-50%);
}
.dialog-kopf h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
}
.dialog-zu {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: var(--fuellung);
  color: var(--ink-2);
  transition: transform 0.16s var(--ease-out);
}
.dialog-zu::after {
  content: '';
  position: absolute;
  inset: -7px;
}
.dialog-zu:active {
  transform: scale(0.9);
}
.dialog-zu svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.6;
}
.dialog-inhalt {
  display: grid;
  gap: 16px;
  padding: 8px var(--rand) 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.dialog-inhalt .liste,
.dialog-inhalt .profil-liste {
  background: var(--surface-2);
}
.dialog-text {
  color: var(--ink-2);
  font-size: 16px;
  text-align: center;
}
.dialog-fuss {
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  padding: 10px var(--rand) 14px;
  flex-shrink: 0;
}
.dialog-fuss .btn {
  width: 100%;
  min-height: 50px;
  font-size: 17px;
}

/* Mitteilungen von oben */
.toasts {
  position: fixed;
  z-index: 80;
  top: calc(var(--oben) + 8px);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(100%, 440px);
  padding: 12px 18px 12px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.16),
    0 1px 3px rgba(0, 0, 0, 0.08);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  pointer-events: auto;
  touch-action: none;
  opacity: 0;
  transform: translateY(calc(-100% - 20px));
  transition:
    transform 0.5s var(--ease-sheet),
    opacity 0.3s ease;
}
.toast.da {
  opacity: 1;
  transform: none;
}
.toast.weg {
  transition-duration: 0.3s;
}
.toast-symbol {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--ink-3);
  color: #fff;
}
.toast-symbol svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.6;
}
.toast.gut .toast-symbol {
  background: var(--gruen-voll);
}
.toast.fehler .toast-symbol {
  background: var(--rot);
}

/* Bildbetrachter */
.bild-lupe {
  position: fixed;
  z-index: 90;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.bild-lupe.offen {
  opacity: 1;
}
.lupe-flaeche {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: calc(var(--oben) + 56px) 8px calc(var(--unten) + 44px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.lupe-flaeche img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  user-select: none;
  -webkit-user-select: none;
  transform: scale(0.96);
  transition: transform 0.35s var(--ease-out);
}
.bild-lupe.offen .lupe-flaeche img {
  transform: none;
}
.bild-lupe.gross .lupe-flaeche {
  display: block;
  padding: 0;
}
.bild-lupe.gross .lupe-flaeche img {
  width: 260%;
  max-width: none;
  max-height: none;
  border-radius: 0;
}
.lupe-zu {
  position: fixed;
  top: calc(var(--oben) + 10px);
  right: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.lupe-zu svg {
  stroke-width: 2.6;
}
.lupe-hilfe {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--unten) + 14px);
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  pointer-events: none;
}
.bild-lupe.gross .lupe-hilfe {
  opacity: 0;
}

.lupe-hinweis {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px 4px 7px;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.62);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
}
.lupe-hinweis svg {
  width: 13px;
  height: 13px;
  stroke-width: 2.6;
}

/* --------------------------------------------------------------- Ringe */

.ring {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--rot);
}
.ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ring-spur,
.ring-wert {
  fill: none;
  stroke: currentColor;
}
.ring-spur {
  opacity: 0.16;
}
.ring-wert {
  stroke-linecap: round;
  animation: ringFuellen 1.1s var(--ease-out) backwards;
}
@keyframes ringFuellen {
  from {
    stroke-dashoffset: var(--umfang);
  }
}
.ring-text {
  position: relative;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.ring.orange,
.ringe .orange {
  color: var(--orange);
}
.ring.gruen,
.ringe .gruen {
  color: var(--gruen-voll);
}
.ring.gelb {
  color: var(--gelb-voll);
}
.ringe .rot {
  color: var(--rot);
}

/* Übersicht */
.ringe-karte {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 20px;
}
.ringe {
  flex-shrink: 0;
}
.ringe svg {
  display: block;
  transform: rotate(-90deg);
  width: 132px;
  height: 132px;
}
.ringe-legende {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.ringe-wert span {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.ringe-wert b {
  display: block;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.ringe-wert.rot b {
  color: var(--rot);
}
.ringe-wert.orange b {
  color: var(--orange);
}
.ringe-wert.gruen b {
  color: var(--gruen);
}

.start-aktionen,
.modus-raster {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.aktion-kachel,
.modus-kachel {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 128px;
  padding: 16px;
  border: 0;
  border-radius: var(--radius-l);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  transition: transform 0.18s var(--ease-out);
}
.aktion-kachel:active,
.modus-kachel:active:not(:disabled) {
  transform: scale(0.97);
}
.modus-kachel:disabled {
  opacity: 0.45;
}
.aktion-kachel .kachel-symbol,
.modus-kachel .kachel-symbol {
  margin-bottom: 10px;
}
.aktion-kachel b,
.modus-kachel b {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.aktion-kachel span:last-child,
.modus-kachel span:last-child {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.35;
}
.start-raster {
  margin-top: 6px;
}

/* Ergebnisse */
.kennzahl-reihe {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.kennzahl-kachel {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 16px 8px 14px;
}
.kennzahl-kachel + .kennzahl-kachel {
  margin-top: 0;
}
.kennzahl-kachel > span {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.grosse-zahl {
  display: grid;
  place-items: center;
  min-height: 58px;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
}
.verlauf-karte {
  margin-top: 14px;
}
.saeulen {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 120px;
  padding: 12px 18px 18px;
}
.saeule {
  position: relative;
  flex: 1;
  height: 100%;
  max-width: 34px;
  border-radius: 6px;
  background: var(--fuellung-2);
  overflow: hidden;
}
.saeule i {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: var(--rot);
  transform-origin: bottom;
  animation: saeuleRein 0.8s var(--ease-out) backwards;
}
.saeule i.gruen {
  background: var(--gruen-voll);
}
.saeule i.gelb {
  background: var(--gelb-voll);
}
@keyframes saeuleRein {
  from {
    transform: scaleY(0);
  }
}

/* ----------------------------------------------------------------- Unterlagen */

.fortschritt-zeile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  max-width: 420px;
  font-size: 14px;
  color: var(--ink-2);
}
.fortschritt-zeile .balken {
  flex: 1;
}
.unterlage {
  gap: 4px;
  padding: 0 12px 0 4px;
}
.haken-knopf {
  display: grid;
  place-items: center;
  width: 46px;
  height: 56px;
  border: 0;
  background: none;
  flex-shrink: 0;
}
.unterlage-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 62px;
  justify-content: center;
  padding: 8px 0;
  border: 0;
  background: none;
  text-align: left;
}
.unterlage-text b {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.unterlage-text span {
  font-size: 14px;
  color: var(--ink-2);
}
.unterlage.gelernt .unterlage-text b {
  color: var(--ink-2);
}
.unterlage:has(.unterlage-text:active) {
  background: var(--druck);
  transition: none;
}

.unterlage-inhalt {
  display: grid;
  gap: 18px;
}
.unterlage-inhalt > section,
.unterlage-inhalt > .lese-bild,
.unterlage-inhalt > .abschnitt-raster,
.unterlage-inhalt > .stufen-raster {
  min-width: 0;
}
.unterlage-inhalt .tabellen-huelle {
  border-radius: var(--radius);
  background: var(--surface);
}
.lese-titel {
  margin: 4px 4px 8px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.lese-text {
  max-width: 68ch;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.6;
}
.lese-bild {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
}
.lese-bild-knopf {
  position: relative;
  display: block;
  width: 100%;
  border: 0;
  background: #fff;
  cursor: zoom-in;
}
.lese-bild img {
  display: block;
  width: 100%;
  height: auto;
}
.lese-bild figcaption {
  padding: 10px 16px;
  font-size: 14px;
  color: var(--ink-2);
  box-shadow: inset 0 0.5px 0 var(--linie);
}
.lese-details {
  margin-top: 10px;
  border-radius: var(--radius);
  background: var(--surface);
}
.lese-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 0 16px;
  font-size: 16px;
  font-weight: 500;
  color: var(--rot);
  cursor: pointer;
  list-style: none;
}
.lese-details summary::-webkit-details-marker {
  display: none;
}
.lese-details summary::after {
  content: '';
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.3s var(--ease-out);
}
.lese-details[open] summary::after {
  transform: rotate(-135deg) translateY(-1px);
}
.lese-details[open] .lese-liste {
  animation: aufklappen 0.35s var(--ease-out) backwards;
}
@keyframes aufklappen {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}
.lese-liste {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 8px 12px;
  padding: 4px 16px 16px;
  font-size: 15px;
}
.lese-liste dt {
  font-weight: 650;
}
.lese-liste dd {
  color: var(--ink-2);
  line-height: 1.5;
}

.portrait-raster {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.portrait {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
}
.portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
  background: var(--surface-2);
}
.portrait figcaption {
  padding: 10px 12px 12px;
}
.portrait figcaption b {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}
.portrait figcaption span {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.35;
}
.portrait figcaption em {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-style: normal;
  color: var(--ink-3);
}

.abschnitt-raster {
  display: grid;
  gap: 12px;
}
.abschnitt-karte {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
}
.abschnitt-karte header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}
.abschnitt-karte header img {
  width: 58px;
  height: 76px;
  border-radius: 10px;
  object-fit: cover;
  object-position: top;
  flex-shrink: 0;
}
.abschnitt-karte .nummer {
  display: block;
  font-size: 13px;
  font-weight: 650;
  color: var(--rot);
}
.abschnitt-karte header b {
  display: block;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.abschnitt-karte .abi {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: var(--ink-2);
}
.abschnitt-karte ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  padding: 12px 16px;
  list-style: none;
  font-size: 15px;
  box-shadow: inset 0 0.5px 0 var(--linie);
}
.abschnitt-karte footer {
  padding: 0 16px 12px;
  font-size: 13px;
  color: var(--ink-3);
}

.stufen-raster {
  display: grid;
  gap: 12px;
}
.stufe-karte {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
}
.stufe-karte header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.stufe-nr {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--rot);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}
.stufe-karte header b {
  font-size: 18px;
  font-weight: 650;
}
.stufe-karte p {
  margin-top: 10px;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.55;
}
.stufe-spalten {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}
.stufe-spalten h4 {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-3);
}
.stufe-spalten ul {
  display: grid;
  gap: 4px;
  list-style: none;
  font-size: 15px;
}
.stufe-spalten li {
  padding-left: 14px;
  position: relative;
}
.stufe-spalten li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-4);
}

.ueben-karte {
  margin-top: 22px;
  padding: 20px;
  text-align: center;
}
.ueben-karte h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.ueben-karte p {
  margin-top: 4px;
  color: var(--ink-2);
}
.ueben-knoepfe {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

/* ----------------------------------------------------------------------- Tests */

.test-leiste {
  position: sticky;
  z-index: 20;
  top: 0;
  padding-top: calc(var(--oben) + 8px) !important;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 0 calc(var(--rand) * -1) 14px;
  padding: 8px var(--rand) 10px 8px;
  background: rgba(242, 242, 247, 0.97);
  box-shadow: inset 0 -0.5px 0 var(--linie);
}
.test-leiste-mitte {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 10px;
  min-width: 0;
}
.test-leiste-mitte b {
  grid-column: 1 / -1;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}
.test-stand {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}
.test-gruppe {
  overflow: hidden;
}
.test-gruppe + .test-gruppe {
  margin-top: 14px;
}
.test-gruppe .karte-kopf {
  padding: 18px 18px 4px;
}
.gruppen-hinweis {
  padding: 4px 18px 8px;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.45;
}
.test-karte-bild {
  position: relative;
  display: block;
  width: calc(100% - 36px);
  margin: 8px 18px 12px;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-s);
  background: #fff;
  box-shadow: inset 0 0 0 0.5px var(--linie);
  cursor: zoom-in;
}
.test-karte-bild img {
  display: block;
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
}

.test-frage {
  padding: 14px 18px 16px;
  box-shadow: inset 0 0.5px 0 var(--linie);
}
.frage-kopf {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.frage-nr {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 8px;
  background: var(--fuellung);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 650;
  flex-shrink: 0;
}
.frage-nr svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.8;
}
.frage-bild {
  width: 52px;
  height: 68px;
  border-radius: 10px;
  object-fit: cover;
  object-position: top;
  flex-shrink: 0;
  cursor: zoom-in;
}
.frage-text {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.frage-punkte {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  white-space: nowrap;
}
.frage-felder {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 10px;
}
.frage-felder > .feld {
  grid-column: 1 / -1;
}
.frage-felder > .feld.schmal {
  grid-column: auto;
}
.antwort-raster {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.frage-raster {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  box-shadow: inset 0 0.5px 0 var(--linie);
}
.test-frage.kompakt {
  padding: 12px 18px 14px;
  box-shadow: none;
}
.test-frage.kompakt .frage-kopf {
  margin-bottom: 6px;
}
.test-frage.kompakt .frage-text {
  font-size: 15px;
}
/* Bei Kartenfragen steht die Nummer schon im Text („Nr. 7", „Markierung 7") */
.test-frage.kompakt .frage-nr {
  display: none;
}
.test-frage.kompakt .frage-felder .feld > label {
  display: none;
}
.paar-liste {
  display: grid;
  gap: 8px;
}
.paar-kopf,
.paar-zeile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}
.paar-kopf span {
  padding-left: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
}
.test-ende {
  margin-top: 18px;
}

/* Auswertung */
.ergebnis-held {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 28px 20px 22px;
  text-align: center;
}
.ergebnis-held .ring {
  margin-bottom: 12px;
}
.ergebnis-held h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.ergebnis-held p {
  max-width: 44ch;
  color: var(--ink-2);
  font-size: 15px;
}
.ergebnis-held .abzeichen {
  margin-top: 6px;
}
.held-knoepfe {
  display: grid;
  gap: 10px;
  width: 100%;
  margin-top: 18px;
}
.teil-liste {
  display: grid;
  gap: 12px;
  padding: 10px 18px 18px;
}
.teil {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-items: center;
}
.teil-name {
  font-size: 15px;
  font-weight: 500;
}
.teil-wert {
  font-size: 14px;
  color: var(--ink-2);
  white-space: nowrap;
}
.teil .balken {
  grid-column: 1 / -1;
  order: 3;
}
.test-frage.auswertung .frage-nr {
  color: #fff;
  background: var(--rot);
}
.test-frage.auswertung.richtig .frage-nr {
  background: var(--gruen-voll);
}
.test-frage.auswertung.teilweise .frage-nr {
  background: var(--gelb-voll);
}
.antwort-block {
  display: grid;
  gap: 12px;
}
.antwort-label {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
}
.antwort-zeile {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.antwort {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 15px;
  overflow-wrap: break-word;
}
.antwort.gut {
  background: var(--gruen-hell);
  color: var(--gruen);
}
.antwort.schlecht {
  background: var(--rot-hell);
  color: var(--rot);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.antwort.neutral,
.antwort.leer {
  background: var(--fuellung-2);
  color: var(--ink-3);
}
.paar-liste .antwort {
  display: block;
}
.loesung {
  margin-top: 8px;
  font-size: 15px;
  color: var(--ink-2);
}
.loesung b {
  color: var(--ink);
  font-weight: 600;
}

/* ----------------------------------------------------------------- Lernquiz */

.kasten-karte {
  padding: 18px 18px 16px;
}
.kasten-kopf {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.kasten-kopf .grosse-zahl {
  display: inline;
  min-height: 0;
  font-size: 46px;
}
.kasten-text {
  margin-left: 8px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-2);
}
.kasten-sicher {
  display: grid;
  text-align: right;
}
.kasten-sicher b {
  font-size: 17px;
  font-weight: 650;
}
.kasten-sicher span {
  font-size: 13px;
  color: var(--ink-2);
}
.faecher {
  display: flex;
  gap: 2px;
  height: 10px;
  margin: 16px 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--fuellung);
}
.faecher i {
  min-width: 4px;
  flex-basis: 0;
  animation: fachRein 0.9s var(--ease-out) backwards;
  transform-origin: left;
}
@keyframes fachRein {
  from {
    transform: scaleX(0);
  }
}
.faecher .neu,
.faecher-legende .neu {
  background: #d1d1d6;
}
.faecher .f1,
.faecher-legende .f1 {
  background: var(--rot);
}
.faecher .f2 {
  background: #d9482a;
}
.faecher .f3,
.faecher-legende .f3 {
  background: var(--orange);
}
.faecher .f4 {
  background: #6cc774;
}
.faecher .f5,
.faecher-legende .f5 {
  background: var(--gruen-voll);
}
.faecher-legende {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--ink-2);
}
.faecher-legende span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.faecher-legende i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.16s var(--ease-out);
}
.chip:active {
  transform: scale(0.95);
}
.chip small {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
}
.chip[aria-pressed='true'] {
  background: var(--rot);
  color: #fff;
}
.chip[aria-pressed='true'] small {
  color: rgba(255, 255, 255, 0.75);
}

.lern-sitzung {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - var(--oben) - var(--kopf) - var(--unten) - 40px);
}

/* Karteikarten */
.kk-buehne {
  position: relative;
  width: 100%;
  max-width: 460px;
  height: min(58dvh, 470px);
  min-height: 330px;
  margin: 6px auto 34px;
}
.kk {
  position: absolute;
  inset: 0;
  perspective: 1400px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition:
    transform 0.45s var(--ease-sheet),
    opacity 0.3s ease;
}
.kk.tiefe-0 {
  z-index: 3;
  cursor: grab;
}
.kk.tiefe-1 {
  z-index: 2;
  transform: translateY(14px) scale(0.95);
  pointer-events: none;
}
.kk.tiefe-2 {
  z-index: 1;
  transform: translateY(27px) scale(0.9);
  pointer-events: none;
}
.kk.tiefe-3 {
  z-index: 0;
  opacity: 0;
  transform: translateY(38px) scale(0.86);
  pointer-events: none;
}
.kk.fliegt {
  z-index: 4;
  pointer-events: none;
}
.kk-innen {
  position: relative;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease-sheet);
}
.kk-innen.gedreht {
  transform: rotateY(180deg);
}
.kk-seite {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 26px 22px;
  overflow: hidden;
  border-radius: 24px;
  background: var(--surface);
  text-align: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 10px 30px -10px rgba(0, 0, 0, 0.16);
}
.kk.tiefe-1 .kk-seite,
.kk.tiefe-2 .kk-seite {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.kk-seite.hinten {
  transform: rotateY(180deg);
  background: linear-gradient(180deg, #fff, #fbfbfd);
}
.kk-seite .ueberzeile {
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
}
.kk-frage {
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.25;
  text-wrap: balance;
}
.kk-frage-klein {
  max-width: 32ch;
  font-size: 15px;
  color: var(--ink-3);
  line-height: 1.35;
  text-wrap: balance;
}
.kk-antwort {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--rot);
  text-wrap: balance;
}
.kk-seite.lang {
  gap: 10px;
}
.kk-seite.lang .kk-antwort {
  font-size: 19px;
  letter-spacing: -0.02em;
}
.kk-seite.lang .kk-info {
  font-size: 13px;
}
.kk-info {
  max-width: 34ch;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.45;
  white-space: pre-line;
}
.kk-marke {
  position: absolute;
  z-index: 5;
  top: 22px;
  padding: 4px 10px;
  border: 2.5px solid currentColor;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  pointer-events: none;
}
.kk-marke.ja {
  left: 20px;
  color: var(--gruen-voll);
  opacity: var(--ja, 0);
  transform: rotate(-10deg);
}
.kk-marke.nein {
  right: 20px;
  color: var(--rot);
  opacity: var(--nein, 0);
  transform: rotate(10deg);
}
.kk-knoepfe {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.kk-knopf {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 6px 18px -6px rgba(0, 0, 0, 0.18);
  transition:
    transform 0.16s var(--ease-out),
    opacity 0.2s ease;
}
.kk-knopf svg {
  width: 28px;
  height: 28px;
  stroke-width: 2.6;
}
.kk-knopf.nochmal {
  color: var(--rot);
}
.kk-knopf.gewusst {
  color: var(--gruen-voll);
}
.kk-knopf:active:not(:disabled) {
  transform: scale(0.9);
}
.kk-knopf:disabled {
  opacity: 0.35;
}
.kk-drehen {
  min-width: 150px;
  background: var(--surface);
}
.kk-hilfe {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-3);
}

.portrait-bild {
  width: 132px;
  height: 172px;
  border-radius: 16px;
  object-fit: cover;
  object-position: top;
  pointer-events: none;
}
.portrait-bild.klein {
  width: 72px;
  height: 94px;
  border-radius: 12px;
}
.ausschnitt,
.karten-bild {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: #eceef1;
  cursor: zoom-in;
}
.ausschnitt {
  aspect-ratio: 16 / 10;
  max-height: 210px;
}
.ausschnitt img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--zoom, 330%);
  max-width: none;
  pointer-events: none;
}
.ausschnitt.frage-ausschnitt {
  aspect-ratio: 1;
  max-height: none;
  margin-bottom: 10px;
  border-radius: 12px;
  box-shadow: inset 0 0 0 0.5px var(--linie);
}
.frage-ausschnitt .ausschnitt-ring {
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-width: 2px;
  opacity: 0.4;
}
.ausschnitt-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border: 2.5px solid var(--rot);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.7);
}
.karten-bild img {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  background: #fff;
}

/* Quiz */
.quiz-status {
  display: flex;
  justify-content: center;
  margin: -4px 0 12px;
}
.serie {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-3);
  font-size: 15px;
  transition: color 0.2s ease;
}
.serie svg {
  width: 17px;
  height: 17px;
}
.serie.an {
  color: var(--orange);
}
.serie.puls {
  animation: puls 0.32s var(--ease-out);
}
@keyframes puls {
  50% {
    transform: scale(1.12);
  }
}
.blitz-uhr {
  height: 4px;
  margin: -8px 0 14px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--fuellung);
}
.blitz-uhr i {
  display: block;
  height: 100%;
  background: var(--orange);
  transform-origin: left;
}
.blitz-uhr.knapp i {
  background: var(--rot);
}
.quiz-buehne,
.paare-buehne {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}
.quiz-frage {
  display: grid;
  gap: 14px;
  animation: frageRein 0.36s var(--ease-out) backwards;
}
@keyframes frageRein {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
}
.quiz-karte {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 22px 20px;
  border-radius: var(--radius-l);
  background: var(--surface);
  text-align: center;
}
.quiz-karte h3 {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.28;
}
.quiz-optionen {
  display: grid;
  gap: 10px;
}
.option {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 14px 48px 14px 18px;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.3;
  text-align: left;
  transition:
    transform 0.16s var(--ease-out),
    background-color 0.25s ease,
    color 0.25s ease,
    opacity 0.25s ease,
    box-shadow 0.25s ease;
}
.option:active:not(:disabled) {
  transform: scale(0.98);
  background: #ececf0;
}
.option:disabled {
  cursor: default;
}
.option:disabled:not(.richtig):not(.falsch) {
  opacity: 0.45;
}
.option.richtig {
  background: var(--gruen-hell);
  color: var(--gruen);
  box-shadow: inset 0 0 0 2px var(--gruen-voll);
}
.option.falsch {
  background: var(--rot-hell);
  color: var(--rot);
  box-shadow: inset 0 0 0 2px var(--rot);
  animation: schuetteln 0.36s var(--ease-out);
}
.option.richtig::after,
.option.falsch::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  border-radius: 50%;
  background: currentColor;
  -webkit-mask: var(--zeichen) center / 14px no-repeat;
  mask: var(--zeichen) center / 14px no-repeat;
}
.option.richtig::after {
  background-color: var(--gruen-voll);
  -webkit-mask: none;
  mask: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 14px;
  background-position: center;
  background-repeat: no-repeat;
  animation: zeichenRein 0.3s var(--ease-out) backwards;
}
.option.falsch::after {
  background-color: var(--rot);
  -webkit-mask: none;
  mask: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
  background-size: 13px;
  background-position: center;
  background-repeat: no-repeat;
}
@keyframes zeichenRein {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
}
@keyframes schuetteln {
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(5px);
  }
  60% {
    transform: translateX(-3px);
  }
  80% {
    transform: translateX(2px);
  }
}
.quiz-weiter {
  visibility: hidden;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.25s ease,
    transform 0.3s var(--ease-out),
    visibility 0s linear 0.25s;
}
.quiz-weiter.da {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition:
    opacity 0.25s ease,
    transform 0.3s var(--ease-out);
}

/* Paare */
.paare-zeit {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 15px;
  font-weight: 600;
}
.paare-feld {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  animation: frageRein 0.36s var(--ease-out) backwards;
}
.paare-spalte {
  display: grid;
  gap: 10px;
  align-content: start;
}
.paar-kachel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 74px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: break-word;
  transition:
    transform 0.18s var(--ease-out),
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.3s ease;
}
/* Lange Komposita („Wirtschaftsgebäudebrand") trennen statt überstehen */
.paar-kachel > span,
.option > span,
.kk-frage,
.kk-antwort,
.kk-frage-klein,
.kk-info,
.quiz-karte h3,
.antwort,
.loesung b,
.zeile-text b,
.zeile-text span,
.unterlage-text b {
  min-width: 0;
  max-width: 100%;
  hyphens: auto;
  -webkit-hyphens: auto;
  hyphenate-limit-chars: 12 5 5;
  overflow-wrap: break-word;
}
.frage-text {
  hyphens: auto;
  -webkit-hyphens: auto;
}
.paar-kachel > span {
  display: block;
  width: 100%;
}
.option > span {
  flex: 1;
}
.paar-kachel.bild {
  padding: 6px;
}
.paar-kachel.bild img {
  width: 62px;
  height: 80px;
  border-radius: 10px;
  object-fit: cover;
  object-position: top;
  pointer-events: none;
}
.paar-kachel:active {
  transform: scale(0.96);
}
.paar-kachel.gewaehlt {
  background: var(--rot-hell);
  box-shadow: inset 0 0 0 2px var(--rot);
  color: var(--rot);
}
.paar-kachel.passt {
  background: var(--gruen-hell);
  box-shadow: inset 0 0 0 2px var(--gruen-voll);
  color: var(--gruen);
  transform: scale(1.02);
}
.paar-kachel.erledigt {
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
}
.paar-kachel.daneben {
  animation: schuetteln 0.36s var(--ease-out);
  background: var(--rot-hell);
}

/* ----------------------------------------------------- Ausbildung (Ausbilder) */

.raster.auto {
  grid-template-columns: minmax(0, 1fr);
}
.zivi-karte {
  display: flex;
  flex-direction: column;
}
.zivi-karte + .zivi-karte {
  margin-top: 0;
}
.zivi-karte.abgeschlossen {
  opacity: 0.8;
}
.zivi-aktionen {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding: 12px 16px 16px;
}
ol.lernweg,
ul.lernweg {
  display: grid;
  list-style: none;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.lernweg li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 8px 14px;
  font-size: 15px;
}
.lernweg li + li {
  box-shadow: inset 0 0.5px 0 var(--linie);
}
.lernweg .punkt {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1.5px var(--ink-4);
}
.lernweg .punkt svg {
  width: 13px;
  height: 13px;
  stroke-width: 3;
}
.lernweg li.fertig .punkt {
  background: var(--rot);
  box-shadow: none;
  color: #fff;
}
.lernweg .titel {
  flex: 1;
  min-width: 0;
}
.lernweg .wert {
  color: var(--ink-3);
  font-size: 14px;
}
.lernweg li.fertig .titel {
  color: var(--ink-2);
}

/* ------------------------------------------------------------- Übungsprogramm */

.uep-kopf {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
}
.uep-kopf > .feld {
  grid-column: auto !important;
}
.personen {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.person-zeile {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
}
.person-zeile input:last-of-type {
  grid-column: 2;
}
.person-zeile .btn {
  grid-column: 3;
  grid-row: 1;
}
.person-nr {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--fuellung);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 650;
}
.personen > .btn {
  justify-self: start;
}
.beispiel {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
}
.beispiel + .beispiel {
  margin-top: 14px;
}
.beispiel-kopf {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 16px;
  box-shadow: inset 0 -0.5px 0 var(--linie);
}
.beispiel-kopf b {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.3;
}
.beispiel-nr {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--rot);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.beispiel-kopf .rechts {
  display: flex;
  flex-shrink: 0;
  gap: 0;
  margin-left: auto;
}
@media (max-width: 379px) {
  .beispiel-kopf .rechts .btn.icon.klein {
    width: 32px;
  }
}
.beispiel-koerper {
  display: grid;
  gap: 14px;
  padding: 16px;
}
.beispiel-zeile {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
}
.stichwort-info {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.45;
}
.druck-tabelle {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #000;
  font-size: 12px;
  background: #fff;
}
.druck-tabelle td {
  height: 17px;
  padding: 2px 5px;
  border: 1px solid #000;
}
.druck-tabelle td.kopf {
  background: #d99594;
  font-weight: 700;
  text-align: center;
}
.druck-tabelle td.label {
  width: 33%;
  font-weight: 700;
}
label:has(> input[type='checkbox']) {
  line-height: 1.4;
}

/* ===================================================================== Tablet */

@media (min-width: 640px) {
  :root {
    --rand: 24px;
  }
  .raster.k2,
  .raster.k4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .raster.k3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .raster.auto {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
  .raster > .karte + .karte {
    margin-top: 0;
  }
  .portrait-raster {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  }
  .abschnitt-raster {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
  .stufe-spalten {
    grid-template-columns: 1fr 1fr;
  }
  .antwort-raster {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .frage-raster {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .modus-raster {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .uep-kopf {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .uep-kopf > .feld:last-child {
    grid-column: 1 / -1 !important;
  }
  .person-zeile {
    grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1fr) 44px;
  }
  .person-zeile input:last-of-type {
    grid-column: 3;
  }
  .person-zeile .btn {
    grid-column: 4;
  }
  .beispiel-zeile {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .held-knoepfe {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
  }
  .ueben-knoepfe {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
  }
  .lese-tabelle.zweispaltig {
    column-count: 2;
    column-gap: 26px;
  }

  /* Dialoge als Karte in der Mitte */
  .dialog-huelle {
    align-items: center;
    padding: 24px;
  }
  .dialog {
    width: min(540px, 100%);
    max-height: min(86vh, 900px);
    padding-bottom: 0;
    border-radius: 20px;
    box-shadow:
      0 24px 64px rgba(0, 0, 0, 0.22),
      0 2px 8px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: scale(0.96);
    transition:
      transform 0.24s var(--ease-out),
      opacity 0.18s ease;
  }
  .dialog-huelle.offen .dialog {
    opacity: 1;
  }
  .dialog-huelle:not(.offen) .dialog {
    transition-duration: 0.16s;
  }
  .dialog.breit {
    width: min(900px, 100%);
  }
  .dialog-griff {
    display: none;
  }
  .dialog-kopf {
    cursor: default;
    touch-action: auto;
    padding-top: 14px;
  }
  .dialog-inhalt {
    padding: 8px 22px 20px;
  }
  .dialog-fuss {
    flex-direction: row;
    justify-content: flex-end;
    padding: 12px 18px 16px;
    box-shadow: inset 0 0.5px 0 var(--linie);
  }
  .dialog-fuss .btn {
    width: auto;
    min-height: 42px;
    font-size: 15px;
  }
  .dialog-text {
    text-align: left;
  }
}

/* ============================================================== Schreibtisch */

@media (min-width: 1024px) {
  :root {
    --rand: 40px;
    --kopf: 52px;
  }
  body {
    font-size: 15px;
  }
  .tabbar,
  .topbar-avatar {
    display: none;
  }
  .sidebar {
    position: fixed;
    z-index: 25;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    width: var(--sidebar);
    padding: 18px 12px 14px;
    background: #f6f6f8;
    box-shadow: inset -0.5px 0 0 var(--linie);
  }
  .sidebar-kopf {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 4px 10px 22px;
  }
  .sidebar-kopf .flamme {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
  }
  .sidebar-kopf .marke b {
    display: block;
    font-size: 15px;
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.2;
  }
  .sidebar-kopf .marke span {
    display: block;
    font-size: 12px;
    color: var(--ink-2);
  }
  .nav {
    display: grid;
    align-content: start;
    gap: 2px;
    flex: 1;
    overflow-y: auto;
  }
  .nav-gruppe {
    display: grid;
    gap: 2px;
  }
  .nav-gruppe + .nav-gruppe {
    margin-top: 16px;
  }
  .nav-titel {
    padding: 6px 10px 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-3);
  }
  .nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 0 10px;
    border-radius: 9px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 500;
    transition: background-color 0.15s ease;
  }
  .nav a:hover {
    background: rgba(0, 0, 0, 0.045);
  }
  .nav a.aktiv {
    background: var(--rot-hell);
    color: var(--rot);
  }
  .nav-symbol {
    display: grid;
    place-items: center;
    color: var(--rot);
  }
  .nav-symbol svg {
    width: 19px;
    height: 19px;
  }
  .sidebar-fuss {
    padding-top: 10px;
    box-shadow: inset 0 0.5px 0 var(--linie);
  }
  .profil-knopf {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 10px;
    background: none;
    text-align: left;
    transition: background-color 0.15s ease;
  }
  .profil-knopf:hover {
    background: rgba(0, 0, 0, 0.045);
  }
  .profil-knopf .name {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
  }
  .profil-knopf .name b {
    font-size: 14px;
    font-weight: 600;
  }
  .profil-knopf .name span {
    font-size: 12px;
    color: var(--ink-2);
  }
  .profil-knopf > svg {
    color: var(--ink-3);
  }
  .topbar {
    left: var(--sidebar);
  }
  .inhalt {
    margin-left: var(--sidebar);
    padding-bottom: 56px;
  }
  body.fokus .inhalt {
    padding-bottom: 56px;
  }
  .seitenkopf h2 {
    font-size: 40px;
  }
  .seitenkopf {
    margin-bottom: 26px;
  }
  .raster.k4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .karte {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  }
  .liste-zeile,
  .profil-eintrag,
  .zeile-text b,
  .unterlage-text b {
    font-size: 16px;
  }
  .eingabe {
    min-height: 42px;
    font-size: 15px;
    padding: 9px 13px;
  }
  .btn {
    min-height: 40px;
    font-size: 15px;
  }
  .btn.gross {
    min-height: 48px;
    font-size: 16px;
  }
  .btn.klein {
    min-height: 32px;
    font-size: 14px;
  }
  .auswahl-aktion {
    bottom: 20px;
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .auswahl-aktion .btn {
    width: auto;
  }
  .auswahl-fuss {
    text-align: left;
    padding-left: 6px;
  }
  .uep-kopf {
    grid-template-columns: 220px repeat(3, minmax(0, 1fr));
  }
  .uep-kopf > .feld:last-child {
    grid-column: span 2 !important;
  }
  .ringe-karte {
    padding: 26px;
  }
  .start-oben {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 14px;
  }
  .start-oben .start-aktionen {
    margin-top: 0;
  }
  .start-oben .aktion-kachel {
    min-height: 0;
  }
  .ringe svg {
    width: 150px;
    height: 150px;
  }
  .kk-buehne {
    height: 440px;
  }
  .lupe-flaeche img {
    max-width: min(100%, 1400px);
  }
  .bild-lupe.gross .lupe-flaeche img {
    width: 180%;
  }
}

/* ================================================== Bewegung & Transparenz */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .dialog,
  .toast,
  .kk,
  .kk-innen,
  .tabbar,
  .segment-marke {
    transition-property: opacity !important;
    transition-duration: 0.2s !important;
  }
  .kk-innen.gedreht {
    transform: rotateY(180deg);
  }
}

@media (prefers-reduced-transparency: reduce) {
  .topbar::before,
  .tabbar {
    background: #f7f7fa;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* ===================================================================== Druck */

@media print {
  .sidebar,
  .topbar,
  .tabbar,
  .toasts {
    display: none !important;
  }
  .inhalt {
    margin-left: 0;
    padding: 0;
  }
  body {
    background: #fff;
  }
}
