/* Sutura – Prototyp im Apple-Stil: eine Akzentfarbe, Systemschrift, gruppierte Listen, Materialien */
:root {
  --bg: #f2f2f7;
  --surface: #ffffff;
  --fill: rgba(120, 120, 128, .12);
  --fill-2: rgba(120, 120, 128, .2);
  --ink: #000000;
  --ink-2: rgba(60, 60, 67, .6);
  --ink-3: rgba(60, 60, 67, .3);
  --sep: rgba(60, 60, 67, .29);
  --tint: #0b7285;
  --tint-ink: #ffffff;
  --ok: #248a3d;
  --bad: #d70015;
  --priv: #c93400;
  --bar: rgba(249, 249, 249, .78);
  --scrim: rgba(0, 0, 0, .25);
  --r: 12px;
  --ease: cubic-bezier(.25, .1, .25, 1);
  --gutter: 20px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000; --surface: #1c1c1e; --fill: rgba(120, 120, 128, .24); --fill-2: rgba(120, 120, 128, .36);
    --ink: #ffffff; --ink-2: rgba(235, 235, 245, .6); --ink-3: rgba(235, 235, 245, .3); --sep: rgba(84, 84, 88, .65);
    --tint: #4fc1d3; --tint-ink: #001f25; --ok: #30d158; --bad: #ff453a; --priv: #ff9f0a;
    --bar: rgba(29, 29, 31, .78); --scrim: rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font: 100%/1.4 system-ui, -apple-system, "Helvetica Neue", sans-serif; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-size: 17px; letter-spacing: -.022em;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}
body.vollbild { padding-bottom: 24px; }
a { color: var(--tint); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
h1 { font-size: 34px; line-height: 41px; letter-spacing: .011em; font-weight: 700; margin: 0; }
h2 { font-size: 17px; line-height: 22px; font-weight: 600; margin: 0; letter-spacing: -.022em; }
h3 { font-size: 13px; line-height: 18px; font-weight: 400; letter-spacing: -.004em; text-transform: uppercase; color: var(--ink-2); margin: 28px 16px 7px; }
p { margin: 0 0 12px; }
.muted { color: var(--ink-2); }
.small { font-size: 15px; letter-spacing: -.016em; }
.center { text-align: center; justify-content: center; }
.tint { color: var(--tint); }
.priv { color: var(--priv); }
code { font: 13px ui-monospace, "SF Mono", Menlo, monospace; background: var(--fill); padding: 1px 5px; border-radius: 5px; }

/* Leisten (nur Desktop oben, Handy unten) */
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; padding: 10px 24px;
  background: var(--bar); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 .5px 0 var(--sep);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; color: var(--ink); }
.logo {
  width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; font-size: 14px; font-weight: 700; color: #fff;
  background: linear-gradient(170deg, #1592a6, #0a5764);
}
.logo.gross { width: 72px; height: 72px; font-size: 36px; border-radius: 16px; margin: 0 auto 18px; box-shadow: 0 8px 24px rgba(11, 114, 133, .25); }
.mainnav { display: flex; gap: 4px; flex: 1; }
.mainnav a { color: var(--ink-2); padding: 5px 11px; border-radius: 7px; font-size: 15px; transition: color .15s, background .15s; }
.mainnav a:hover { color: var(--ink); }
.mainnav a.active { color: var(--ink); background: var(--fill); font-weight: 500; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: linear-gradient(170deg, #a1a1a6, #7c7c80); color: #fff; font-size: 14px; font-weight: 600; letter-spacing: 0;
  transition: transform .12s var(--ease), opacity .12s;
}
.avatar:active { transform: scale(.92); opacity: .8; transition-duration: 0s; }
.topbar .avatar { width: 30px; height: 30px; font-size: 13px; margin-left: auto; }

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; display: flex;
  padding: 7px 2px calc(2px + env(safe-area-inset-bottom));
  background: var(--bar); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 -.5px 0 var(--sep);
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: #8e8e93; font-size: 10px; font-weight: 500; letter-spacing: .01em; min-width: 0; }
.tabbar a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.active { color: var(--tint); }
.tabbar a.active svg { stroke-width: 2.1; }
.tabbar a:active svg { transform: scale(.9); }
.nur-mobil { display: grid; }
@media (max-width: 859px) { .topbar { display: none !important; } }
@media (min-width: 860px) {
  .tabbar { display: none !important; }
  .nur-mobil { display: none !important; }
  body { padding-bottom: 40px; }
}

/* Seite */
.app { max-width: 680px; margin: 0 auto; padding: 0 var(--gutter) 24px; }
.seitenkopf { padding: 12px 0 14px; }
@media (min-width: 860px) { .seitenkopf { padding-top: 32px; } }
.seitenkopf .ueber { font-size: 13px; font-weight: 600; letter-spacing: -.004em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 2px; }
.titelzeile { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.titelzeile .avatar { margin-bottom: 4px; }
.zurueck { display: inline-block; font-size: 17px; margin: 0 0 10px -2px; }
.seitenkopf h1 { font-size: 34px; line-height: 1.12; }
.fussnote { font-size: 13px; line-height: 18px; color: var(--ink-2); letter-spacing: -.004em; margin: 7px 16px 0; }
.fussnote.oben { margin: -4px 0 6px; font-size: 15px; line-height: 20px; }

/* Gruppen */
.card { background: var(--surface); border-radius: var(--r); padding: 16px; margin: 0 0 12px; }
.list { padding: 0; overflow: hidden; }
.list + .fussnote { margin-top: -5px; }
.zeile-link {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 11px 16px; text-align: left;
  color: var(--ink); position: relative; transition: background .2s var(--ease);
}
button.zeile-link:active, a.zeile-link:active { background: var(--fill-2); transition-duration: 0s; }
a.zeile-link::after, button.zeile-link[data-wahl]::after {
  content: ""; margin-left: 2px; flex: none; width: 7px; height: 7px; border: solid var(--ink-3); border-width: 2px 2px 0 0; transform: rotate(45deg);
}
.zeile-link + .zeile-link::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; border-top: .5px solid var(--sep); }
.zeile-link > span:first-child { flex: 1; min-width: 0; }
.zeile-link .t { display: block; }
.zeile-link .d { display: block; color: var(--ink-2); font-size: 15px; letter-spacing: -.016em; margin-top: 1px; line-height: 1.3; }
.zeile-link .wert { color: var(--ink-2); flex: none; text-align: right; max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zeile-link.warn { color: var(--bad); }
.zeile-link.aktion { justify-content: center; color: var(--tint); }
.zeile-link.aktion > span { text-align: center; flex: none; }
.zeile-link.erledigt { opacity: .45; }
.haken { color: var(--tint); flex: none; display: grid; }
.haken svg { width: 20px; height: 20px; stroke-width: 2.2; }
.eingebettet { background: var(--fill); }
@media (prefers-color-scheme: dark) { .eingebettet { background: #2c2c2e; } }

/* Formularzeilen */
.form { padding: 0; }
.form .zeile { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 16px; position: relative; }
.form .zeile + .zeile::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; border-top: .5px solid var(--sep); }
.form .zeile > span { flex: none; min-width: 96px; }
.form input[type=text], .form input[type=email], .form input[type=date], .form select {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: 11px 0; text-align: right; color: var(--ink-2); outline: none; font-size: 17px;
}
.form input::placeholder { color: var(--ink-3); }
.form .schalter { justify-content: space-between; }
input[role=switch] {
  appearance: none; -webkit-appearance: none; width: 51px; height: 31px; border-radius: 16px; background: var(--fill-2); position: relative; flex: none; cursor: pointer;
  transition: background .25s var(--ease);
}
input[role=switch]::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.16); transition: transform .25s var(--ease);
}
input[role=switch]:checked { background: #34c759; }
input[role=switch]:checked::after { transform: translateX(20px); }
textarea {
  display: block; width: 100%; min-height: 132px; border: 0; border-radius: var(--r); background: var(--surface); padding: 12px 16px;
  font-size: 17px; line-height: 1.4; resize: vertical; outline: none; margin: 0 0 12px;
}
.sheet textarea { background: var(--fill); }
textarea::placeholder { color: var(--ink-3); }

/* Knöpfe */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 14px; min-height: 50px; padding: 0 20px;
  background: var(--fill); color: var(--tint); font-size: 17px; font-weight: 600;
  transition: transform .15s var(--ease), opacity .15s;
}
.btn:active { transform: scale(.97); opacity: .7; transition-duration: 0s; }
.btn.primary { background: var(--tint); color: var(--tint-ink); }
.btn.ghost { background: transparent; }
.btn.block { display: flex; width: 100%; }
.btn.small { min-height: 30px; padding: 0 14px; border-radius: 999px; font-size: 15px; font-weight: 500; }
.btn.small svg { width: 14px; height: 14px; }
.btn.toggle { color: var(--ink-2); font-weight: 500; padding: 0 16px; }
.btn.toggle[aria-pressed="true"] { color: var(--priv); background: color-mix(in srgb, var(--priv) 14%, transparent); }
.btn[disabled] { opacity: .3; pointer-events: none; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.nowrap { flex-wrap: nowrap; }
.grow { flex: 1; }
.unten {
  position: sticky; bottom: calc(83px + env(safe-area-inset-bottom)); z-index: 5; margin: 20px calc(-1 * var(--gutter)) 0; padding: 18px var(--gutter) 8px;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 0%, transparent), var(--bg) 38%);
}
body.vollbild .unten { bottom: 0; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
@media (min-width: 860px) { .unten { bottom: 0; padding-bottom: 20px; } }

/* Segmentierte Steuerung */
.seg { display: inline-flex; background: var(--fill); border-radius: 9px; padding: 2px; }
.seg.voll { display: flex; width: 100%; }
.seg.voll button { flex: 1; }
.seg button { padding: 6px 18px; border-radius: 7px; font-size: 13px; font-weight: 500; letter-spacing: -.004em; color: var(--ink); transition: background .2s var(--ease); }
.seg button[aria-pressed="true"] { background: var(--surface); font-weight: 600; box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 3px 1px rgba(0,0,0,.04); }
@media (prefers-color-scheme: dark) { .seg button[aria-pressed="true"] { background: #636366; } }
.seg + .fussnote { margin-bottom: 20px; }

/* Heute */
.held { text-align: center; padding: 26px 20px 20px; }
.held-zahl { font-size: 64px; line-height: 1; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.held-zahl span { display: block; font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: uppercase; color: var(--ink-2); margin-top: 6px; }
.held p { color: var(--ink-2); margin: 12px 0 18px; font-size: 15px; }
.kennzahlen { display: grid; grid-template-columns: repeat(3, 1fr); padding: 14px 0; }
.kennzahlen > div { text-align: center; position: relative; }
.kennzahlen > div + div::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; border-left: .5px solid var(--sep); }
.kennzahlen b { display: block; font-size: 22px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kennzahlen span { font-size: 12px; color: var(--ink-2); letter-spacing: 0; }

/* Runde */
.werkzeug { display: flex; align-items: center; gap: 12px; padding: 12px 0 18px; position: sticky; top: 0; z-index: 6; background: var(--bg); }
.rund { width: 32px; height: 32px; border-radius: 50%; background: var(--fill); color: var(--ink-2); display: grid; place-items: center; flex: none; transition: transform .12s var(--ease); }
.rund:active { transform: scale(.9); transition-duration: 0s; }
.rund svg { width: 16px; height: 16px; stroke-width: 2.3; }
.zaehler { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; flex: none; }
.progress { flex: 1; height: 4px; background: var(--fill); border-radius: 2px; overflow: hidden; }
.progress > div { height: 100%; background: var(--tint); border-radius: 2px; transition: width .4s var(--ease); }
.meta { font-size: 13px; color: var(--ink-2); letter-spacing: -.004em; margin-bottom: 8px; }
.stem { font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -.026em; margin: 0 0 22px; }
.stem.klein { font-size: 17px; line-height: 22px; margin: 4px 0 10px; }
.opts { display: grid; gap: 10px; }
.opt {
  display: flex; gap: 14px; align-items: flex-start; width: 100%; text-align: left; padding: 14px 16px; min-height: 52px;
  background: var(--surface); border-radius: var(--r); line-height: 1.32; box-shadow: inset 0 0 0 2px transparent;
  -webkit-user-select: text; user-select: text;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), opacity .25s var(--ease), background .2s var(--ease);
}
.opt:active:not([disabled]) { transform: scale(.98); transition-duration: 0s; }
.opt .k {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; margin-top: -1px;
  box-shadow: inset 0 0 0 1.5px var(--ink-3); font-size: 13px; font-weight: 600; color: var(--ink-2); letter-spacing: 0;
  transition: background .2s var(--ease), color .2s, box-shadow .2s;
}
.opt.sel { box-shadow: inset 0 0 0 2px var(--tint); }
.opt.sel .k { background: var(--tint); color: var(--tint-ink); box-shadow: none; }
.opt.right { box-shadow: inset 0 0 0 2px var(--ok); }
.opt.right .k { background: var(--ok); color: #fff; box-shadow: none; }
.opt.wrong { box-shadow: inset 0 0 0 2px var(--bad); }
.opt.wrong .k { background: var(--bad); color: #fff; box-shadow: none; }
.opt.aus { opacity: .45; }
.opt[disabled] { cursor: default; }
.reveal { animation: reveal .4s var(--ease) both; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.verdict { font-size: 20px; font-weight: 700; letter-spacing: -.02em; margin: 26px 0 8px; }
.verdict.ok { color: var(--ok); } .verdict.bad { color: var(--bad); }
.explain { line-height: 1.45; }
.explain.small { font-size: 15px; color: var(--ink-2); }
.antwortpaar { display: grid; gap: 4px; font-size: 15px; margin: 0 0 10px; }
.antwortpaar .bad { color: var(--bad); } .antwortpaar .bad::before { content: "✕  "; }
.antwortpaar .ok { color: var(--ok); } .antwortpaar .ok::before { content: "✓  "; }
details.quelle { margin: 14px 0 0; font-size: 13px; line-height: 18px; color: var(--ink-2); }
details.quelle summary { cursor: pointer; color: var(--tint); font-size: 15px; list-style: none; display: inline-flex; align-items: center; gap: 4px; }
details.quelle summary::-webkit-details-marker { display: none; }
details.quelle summary::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-2px); transition: transform .2s var(--ease); }
details.quelle[open] summary::after { transform: rotate(225deg) translateY(-1px); }
details.quelle > div { margin-top: 8px; word-break: break-word; }

/* Lesen */
.reader { margin: 18px 0 0; }
.reader p { font-size: 19px; line-height: 1.55; letter-spacing: -.02em; margin: 0 0 1.05em; }
@media (min-width: 860px) { .reader p { font-size: 20px; } }
.vignette { margin: 0; line-height: 1.45; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; position: relative; line-height: 1.38; cursor: pointer; }
.check + .check::before { content: ""; position: absolute; top: 0; right: 0; left: 50px; border-top: .5px solid var(--sep); }
.check input {
  appearance: none; -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; margin: 0; flex: none; cursor: pointer;
  box-shadow: inset 0 0 0 1.5px var(--ink-3); transition: background .2s var(--ease), box-shadow .2s;
  background-position: center; background-repeat: no-repeat;
}
.check input:checked {
  background-color: var(--tint); box-shadow: 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E"); background-size: 14px;
}

/* Lernstand */
.stapel { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--fill); margin-top: 6px; }
.stapel i { display: block; height: 100%; }
.stapel i.fest, .legende i.fest { background: var(--tint); }
.stapel i.lernend, .legende i.lernend { background: color-mix(in srgb, var(--tint) 38%, transparent); }
.legende i.neu { background: var(--fill-2); }
.legende { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin-bottom: 4px; }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.card > .fussnote { margin: 10px 0 0; }
.zeile-link.thema .voll { flex: 1; }
.zeile-link.thema .stapel { height: 4px; margin-top: 7px; }
.zeile-link.thema .wert { min-width: 48px; font-variant-numeric: tabular-nums; }
.vorschau { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; align-items: end; height: 84px; }
.vorschau div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.vorschau i { display: block; width: 100%; max-width: 16px; border-radius: 3px; background: var(--tint); }
.vorschau div:first-child i { background: var(--priv); }
.vorschau i.null, .vorschau div:first-child i.null { background: var(--fill-2); }
.vorschau span { font-size: 10px; color: var(--ink-2); height: 12px; }

/* Auswertung */
.verteilung { display: flex; gap: 4px; margin-top: 5px; }
.cell { font-size: 12px; padding: 1px 6px; border-radius: 5px; background: var(--fill); color: var(--ink-2); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.cell.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.cell.bad { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }

/* Anmeldung */
.login { max-width: 380px; margin: 0 auto; padding-top: 9vh; text-align: center; }
.login.breit { max-width: 560px; text-align: left; padding-top: 2vh; }
.login > h1 { margin-bottom: 6px; }
.login > p.muted { margin-bottom: 28px; }
.login .form { text-align: left; }
.login .btn.block { margin-bottom: 12px; }
.demo { margin: 36px 0 12px; display: grid; gap: 10px; }
.prosa p { margin: 0 0 14px; line-height: 1.42; }
.prosa p:last-child { margin: 0; }

/* Sheet */
.sheet-backdrop { position: fixed; inset: 0; background: var(--scrim); z-index: 30; opacity: 0; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; max-width: 600px; margin: 0 auto;
  background: var(--bg); border-radius: 14px 14px 0 0; padding: 6px 16px calc(20px + env(safe-area-inset-bottom));
  max-height: 90vh; overflow: auto; transform: translateY(100%); will-change: transform; touch-action: none; overscroll-behavior: contain;
  box-shadow: 0 -1px 0 var(--sep), 0 -12px 40px rgba(0,0,0,.12);
}
@media (prefers-color-scheme: dark) { .sheet { background: #1c1c1e; } }
.sheet textarea, .sheet input, .sheet select { touch-action: auto; }
.grabber { width: 36px; height: 5px; border-radius: 3px; background: var(--ink-3); margin: 0 auto 10px; }
.sheet-kopf { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin: 0 0 16px; min-height: 34px; }
.sheet-kopf h2 { text-align: center; }
.sheet-kopf > :first-child { justify-self: start; }
.sheet-kopf > :last-child { justify-self: end; }
.sheet h3 { margin-top: 20px; }
.sheet .card { margin-bottom: 10px; }
.sheet > .btn.block { margin-top: 4px; }

/* Hinweis */
.toast {
  position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); z-index: 40;
  background: var(--bar); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  color: var(--ink); padding: 12px 20px; border-radius: 999px; font-size: 15px; font-weight: 500; white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0,0,0,.14), 0 0 0 .5px var(--sep);
  animation: toast 2.2s var(--ease) both;
}
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 12px) scale(.96); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 0) scale(.98); } }

/* Barrierefreiheit */
@media (prefers-reduced-motion: reduce) {
  *, .reveal, .toast { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .topbar, .tabbar, .toast { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --sep: rgba(0,0,0,.6); --ink-2: rgba(0,0,0,.8); }
  .card, .opt, .btn { box-shadow: inset 0 0 0 1px var(--sep); }
}

.fussnote + .card, .fussnote + h3 + .card { margin-top: 16px; }

/* Lernkarten */
.nur-mobil-block { display: block; }
@media (min-width: 860px) { .nur-mobil-block { display: none !important; } }
.lk { perspective: 1400px; cursor: pointer; outline: none; -webkit-user-select: none; user-select: none; }
.lk-innen { display: grid; transition: transform .5s cubic-bezier(.3, .7, .2, 1); transform-style: preserve-3d; }
.lk:active .lk-innen { transform: scale(.985); transition-duration: .1s; }
.lk.gedreht .lk-innen { transform: rotateY(180deg); }
.lk.gedreht:active .lk-innen { transform: rotateY(180deg) scale(.985); }
.lk.sofort .lk-innen { transition: none; }
.lk-seite {
  grid-area: 1 / 1; background: var(--surface); border-radius: 18px; padding: 22px 20px 20px; min-height: 260px;
  display: flex; flex-direction: column; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
}
.lk-seite.hinten { transform: rotateY(180deg); }
.lk:focus-visible .lk-seite { box-shadow: 0 0 0 3px color-mix(in srgb, var(--tint) 45%, transparent); }
.lk-label { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: -.004em; color: var(--ink-2); margin-bottom: 10px; }
.hinten .lk-label { color: var(--tint); }
.lk-text { font-size: 21px; line-height: 1.38; letter-spacing: -.024em; margin: 0; }
.vorne .lk-text { font-weight: 600; font-size: 22px; flex: 1; }
.lk-frage { font-size: 15px; line-height: 1.35; color: var(--ink-2); margin: 0 0 14px; padding-bottom: 12px; border-bottom: .5px solid var(--sep); }
.lk-hinweis { display: inline-flex; align-items: center; gap: 6px; align-self: center; margin-top: 22px; font-size: 13px; color: var(--ink-2); }
.lk-hinweis svg { width: 15px; height: 15px; }
.card .lk-text { font-size: 17px; }
.bewerten { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bewerten .btn { flex-direction: column; gap: 1px; min-height: 62px; padding: 6px 4px; font-size: 15px; position: relative; }
.bewerten .btn small { font-size: 12px; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.bewerten kbd { display: none; }
@media (hover: hover) and (min-width: 860px) {
  .bewerten kbd { display: block; position: absolute; top: 6px; right: 8px; font: 11px ui-monospace, Menlo, monospace; color: var(--ink-3); }
}
.bw-nicht { color: var(--bad); background: color-mix(in srgb, var(--bad) 11%, transparent); }
.bw-unsicher { color: var(--priv); background: color-mix(in srgb, var(--priv) 12%, transparent); }
.bw-gewusst { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, transparent); }
.btn.toggle svg { width: 14px; height: 14px; }
.btn.toggle#hoeren[aria-pressed="true"] { color: var(--tint); background: color-mix(in srgb, var(--tint) 14%, transparent); }
@media (prefers-reduced-motion: reduce) {
  .lk-innen { transform: none !important; }
  .lk-seite.hinten { transform: none; opacity: 0; transition: opacity .2s; }
  .lk.gedreht .lk-seite.hinten { opacity: 1; }
  .lk.gedreht .lk-seite.vorne { opacity: 0; }
}
.lk-liste p { margin: 0 0 6px; }
.lk-liste ul, .lk-liste ol { margin: 0 0 6px; padding-left: 1.25em; }
.lk-liste li { margin: 0 0 5px; padding-left: 2px; }
.lk-liste li::marker { color: var(--tint); }
.lk-seite .lk-liste { font-size: 19px; }

/* Notiz, Nachfrage, Änderungswunsch */
.aktionen-block { margin: 16px 0 0; }
.aktionen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pille { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 36px; padding: 0 6px; white-space: nowrap; border-radius: 999px; background: var(--fill); color: var(--tint); font-size: 15px; font-weight: 500; transition: transform .12s var(--ease), opacity .12s; }
.pille:active { transform: scale(.95); opacity: .7; transition-duration: 0s; }
.pille svg { width: 16px; height: 16px; }
button.notiz { display: block; width: 100%; text-align: left; margin: 0 0 10px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, #ffcc00 16%, var(--surface)); box-shadow: inset 3px 0 0 #e0a800; font-size: 15px; line-height: 1.4; }
button.notiz .lk-label { margin-bottom: 4px; color: #a37a00; }
button.notiz p { margin: 0 0 4px; } button.notiz ul, button.notiz ol { margin: 0; padding-left: 1.2em; }
.warn-text { color: var(--bad); }
.zeile-link.erledigt .t { color: var(--ink-2); text-decoration: line-through; }

/* Mehr dazu (Ausklapptext auf der Rückseite) */
details.mehr { margin: 14px 0 0; padding-top: 10px; border-top: .5px solid var(--sep); cursor: default; }
details.mehr summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; color: var(--tint); font-size: 15px; font-weight: 500; cursor: pointer; }
details.mehr summary::-webkit-details-marker { display: none; }
details.mehr summary svg { width: 17px; height: 17px; }
details.mehr summary::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-2px); transition: transform .2s var(--ease); margin-left: 2px; }
details.mehr[open] summary::after { transform: rotate(225deg) translateY(-1px); }
details.mehr .lk-liste { margin-top: 10px; font-size: 15px; line-height: 1.42; color: var(--ink); }
details.mehr[open] .lk-liste { animation: reveal .3s var(--ease) both; }
.lk-seite details.mehr .lk-liste { font-size: 15px; }

/* Stand und Schwierigkeit */
.fussnote.stand { margin: 12px 0 0; }
.stufe { font-weight: 600; }
.stufe.leicht { color: var(--ok); }
.stufe.mittel { color: var(--priv); }
.stufe.schwer { color: var(--bad); }
.kennzahlen.vier { grid-template-columns: repeat(4, 1fr); }
.kennzahlen.vier span { display: block; line-height: 1.2; padding: 0 2px; }

/* Schwierigkeits-Etikett */
.etikett { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; padding: 1px 9px 1px 3px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 0; line-height: 20px; }
.etikett svg { width: 20px; height: 20px; flex: none; }
.etikett .knochen { fill: none; stroke: currentColor; stroke-opacity: .45; stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; }
.etikett .bruch { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.etikett.leicht { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, transparent); }
.etikett.mittel { color: var(--priv); background: color-mix(in srgb, var(--priv) 13%, transparent); }
.etikett.schwer { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.meta .etikett { margin-left: 4px; }

/* Quellen weichen ab */
.abweichung { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--priv) 9%, transparent); box-shadow: inset 3px 0 0 var(--priv); }
.abweichung .lk-label { display: flex; align-items: center; gap: 6px; color: var(--priv); margin-bottom: 6px; }
.abweichung .lk-label svg { width: 16px; height: 16px; }
.abweichung .lk-liste { font-size: 15px; line-height: 1.42; }
.lk-seite .abweichung .lk-liste { font-size: 15px; }
