/* =========================================================================
   Fahrschul-App – Designsystem (hell, viel Weißraum, blaue Akzente)
   Bereiche: Plattform (Dienstleister, Blau) · .area-schule (Fahrschule, Türkis) · Schüler-App (Blau)
   ========================================================================= */
:root {
  --accent: #2563EB; --accent-600: #1D4ED8; --accent-soft: #EAF1FF; --accent-ring: rgba(37,99,235,.28);
  --ok: #15803D; --ok-soft: #E6F6EC; --warn: #B45309; --warn-soft: #FEF3DC; --bad: #C2410C; --bad-soft: #FDECE4; --red: #DC2626;
  --text: #0F172A; --text-2: #334155; --muted: #64748B; --line: #E6EAF2; --line-2: #EEF1F6;
  --bg: #F4F7FC; --card: #FFFFFF; --side: #FBFCFE;
  --r: 18px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 10px 30px -14px rgba(16,24,40,.14);
  --shadow-lg: 0 2px 4px rgba(16,24,40,.04), 0 24px 48px -20px rgba(16,24,40,.22);
  --head-h: 76px; --side-w: 256px; --nav-h: 66px;
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
body.area-schule { --accent: #0D9488; --accent-600: #0F766E; --accent-soft: #E3F5F2; --accent-ring: rgba(13,148,136,.28); }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font-size: 15.5px; line-height: 1.55; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-text, var(--accent)); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .45em; letter-spacing: -.02em; color: var(--text); }
h1 { font-size: 2rem; font-weight: 750; } h2 { font-size: 1.2rem; font-weight: 700; } h3 { font-size: 1.02rem; font-weight: 650; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); } .small { font-size: .86rem; } .tiny { font-size: .76rem; }
svg { flex: none; }

/* ---------- Kopfzeile ---------- */
.app-head { position: sticky; top: 0; z-index: 30; height: calc(var(--head-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 24px 0; display: flex; align-items: center; gap: 16px; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.app-head .brand { display: flex; align-items: center; gap: 14px; min-width: 0; text-decoration: none; color: inherit; }
.app-head .tile { width: 46px; height: 46px; border-radius: 14px; background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 18px -8px var(--accent); flex: none; }
.app-head .tile svg { width: 26px; height: 26px; }
.app-head .names { min-width: 0; }
.app-head .t1 { font-weight: 750; font-size: 1.12rem; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-head .t2 { font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-head .grow { flex: 1; }
.head-search { position: relative; width: 300px; }
.head-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; height: 18px; pointer-events: none; }
.head-search input[type=search] { width: 100%; height: 44px; min-height: 44px; border-radius: 999px; border: 1px solid transparent; background: #F1F4F9; padding: 0 16px 0 42px; font-size: .95rem; }
.head-search input[type=search]:focus { background: #fff; border-color: var(--accent); outline: 3px solid var(--accent-ring); outline-offset: 0; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: #EEF2F8; color: var(--text-2); font-weight: 750; display: grid; place-items: center; border: 0; cursor: pointer; font-size: .9rem; flex: none; }
.avatar:hover { background: #E3E9F3; }
.icon-btn { background: transparent; border: 0; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; color: var(--text-2); flex: none; }
.icon-btn:hover { background: #EEF2F8; }
.area-tag { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-600); white-space: nowrap; }

/* ---------- Seitenleiste (Verwaltung) ---------- */
.app-side { position: fixed; z-index: 25; left: 0; top: calc(var(--head-h) + env(safe-area-inset-top)); bottom: 0; width: var(--side-w); background: var(--side); border-right: 1px solid var(--line); padding: 20px 16px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.app-side .sec { font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #94A3B8; padding: 8px 14px 6px; }
.app-side a.nav { display: flex; align-items: center; gap: 14px; min-height: 46px; padding: 0 14px; border-radius: 14px; color: var(--text-2); text-decoration: none; font-weight: 550; }
.app-side a.nav svg { width: 22px; height: 22px; color: #64748B; }
.app-side a.nav:hover { background: #EEF2F8; }
.app-side a.nav.active { background: var(--accent-soft); color: var(--accent-600); font-weight: 700; }
.app-side a.nav.active svg { color: var(--accent-text, var(--accent)); }
.promo { margin-top: auto; border-radius: var(--r); background: linear-gradient(160deg, #EEF4FF, #F8FAFF); border: 1px solid #E3EBFA; padding: 16px; }
.area-schule .promo { background: linear-gradient(160deg, #E8F7F4, #F7FCFB); border-color: #D7EFEA; }
.promo .car { height: 56px; display: grid; place-items: center; color: var(--accent-text, var(--accent)); }
.promo .car svg { width: 96px; height: 56px; }
.promo b { display: block; margin-top: 6px; }
.promo a { font-weight: 700; font-size: .88rem; text-decoration: none; }
.side-back { position: fixed; inset: 0; background: rgba(15,23,42,.35); z-index: 24; display: none; }

main { padding: 32px 40px 56px; max-width: 1180px; }
body.has-side main { margin-left: var(--side-w); }
@media (max-width: 1000px) {
  .app-head { padding-left: 12px; padding-right: 12px; gap: 10px; }
  .head-search { display: none; }
  .app-side { transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  body.side-open .app-side { transform: none; }
  body.side-open .side-back { display: block; }
  body.has-side main { margin-left: 0; }
  main { padding: 22px 16px 48px; }
  h1 { font-size: 1.6rem; }
  .app-head .t2 { display: none; }
}
@media (min-width: 1001px) { .burger { display: none !important; } }

/* ---------- Schüler: Tab-Leiste ---------- */
.tabbar { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); display: flex; }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: .72rem; font-weight: 650; }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.active { color: var(--accent-text, var(--accent)); }
body.student main { padding-bottom: calc(var(--nav-h) + 32px + env(safe-area-inset-bottom)); max-width: 1000px; }
@media (min-width: 1001px) {
  .tabbar { top: calc(var(--head-h) + env(safe-area-inset-top)); bottom: 0; right: auto; width: var(--side-w); height: auto; flex-direction: column; justify-content: flex-start; padding: 20px 16px; border-top: 0; border-right: 1px solid var(--line); gap: 4px; background: var(--side); }
  .tabbar a { flex: none; flex-direction: row; justify-content: flex-start; gap: 14px; height: 46px; padding: 0 14px; border-radius: 14px; font-size: .95rem; color: var(--text-2); font-weight: 550; }
  .tabbar a.active { background: var(--accent-soft); color: var(--accent-600); font-weight: 700; }
  body.student main { margin-left: var(--side-w); padding-bottom: 56px; }
}

/* ---------- Menü (Avatar) ---------- */
.menu { position: fixed; right: 16px; top: calc(var(--head-h) + env(safe-area-inset-top) - 6px); background: #fff; color: var(--text); border-radius: 16px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); padding: 6px; min-width: 240px; z-index: 40; }
.menu button { display: block; width: 100%; text-align: left; padding: 11px 12px; border: 0; background: none; border-radius: 10px; cursor: pointer; }
.menu button:hover { background: var(--bg); }
.menu .who { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }

/* ---------- Seitenkopf, Werkzeugleiste ---------- */
.page-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head .txt { flex: 1; min-width: 240px; }
.page-head h1 { margin-bottom: 6px; }
.page-head p { color: var(--muted); font-size: 1.02rem; margin: 0; max-width: 620px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 600; text-decoration: none; margin-bottom: 10px; }
.toolbar { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.search { position: relative; flex: 1; min-width: 220px; }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 20px; height: 20px; pointer-events: none; }
.search input[type=search] { width: 100%; height: 52px; border-radius: 16px; border: 1px solid var(--line); background: #fff; padding: 0 16px 0 48px; box-shadow: 0 1px 2px rgba(16,24,40,.03); }
.filter { position: relative; }
.filter svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-2); pointer-events: none; }
.filter select { height: 52px; border-radius: 16px; border: 1px solid var(--line); background-color: #fff; padding: 0 38px 0 42px; font-weight: 650; min-width: 160px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }

/* ---------- Karten, Raster ---------- */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 22px; border: 1px solid var(--line-2); }
.card + .card, .grid + .card, .card + .grid, .grid + .grid, .stack > * + * { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid.two { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: repeat(3, 1fr); } .grid.four { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .grid.four { grid-template-columns: repeat(4, 1fr); } .grid.wide { grid-template-columns: 2fr 1fr; } }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.space { flex: 1; }

/* KPI */
.kpi { display: flex; gap: 14px; align-items: flex-start; }
.kpi .ic { width: 46px; height: 46px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text, var(--accent)); display: grid; place-items: center; flex: none; }
.kpi .ic svg { width: 24px; height: 24px; }
.kpi .ic.ok { background: var(--ok-soft); color: var(--ok); } .kpi .ic.warn { background: var(--warn-soft); color: var(--warn); } .kpi .ic.bad { background: var(--bad-soft); color: var(--bad); }
.kpi b { display: block; font-size: 1.75rem; line-height: 1.1; letter-spacing: -.02em; }
.kpi span { color: var(--muted); font-size: .86rem; }

/* Fahrschul-Karte */
.school { position: relative; display: flex; align-items: center; gap: 20px; padding: 20px 22px; border-radius: var(--r); background: #fff; box-shadow: var(--shadow); border: 1px solid var(--line-2); text-decoration: none; color: inherit; transition: transform .12s ease, box-shadow .15s ease; overflow: hidden; }
.school + .school { margin-top: 14px; }
.school::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c, var(--accent)); }
.school:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.school .pic { width: 84px; height: 84px; border-radius: 20px; background: var(--cs, var(--accent-soft)); color: var(--c, var(--accent)); display: grid; place-items: center; flex: none; }
.school .pic svg { width: 46px; height: 46px; }
.school .t { flex: 1; min-width: 0; }
.school .t b { font-size: 1.2rem; letter-spacing: -.01em; }
.school .addr { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: .93rem; margin: 3px 0 10px; }
.school .addr svg { width: 16px; height: 16px; color: var(--c, var(--accent)); }
.chev { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #F4F6FA; color: var(--text-2); flex: none; }
@media (max-width: 640px) { .school { gap: 14px; padding: 16px; } .school .pic { width: 56px; height: 56px; border-radius: 16px; } .school .pic svg { width: 30px; height: 30px; } .school .chev { display: none; } }

/* Chips & Badges */
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: .82rem; font-weight: 650; background: #F1F4F9; color: var(--text-2); border: 1px solid transparent; white-space: nowrap; }
.chip svg { width: 15px; height: 15px; }
.chip.acc { background: var(--accent-soft); color: var(--accent-600); border-color: rgba(37,99,235,.18); }
.chip.plain { background: none; padding: 0 4px; color: var(--muted); font-weight: 550; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 750; background: #F1F4F9; color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.warn { background: var(--warn-soft); color: var(--warn); } .badge.bad { background: var(--bad-soft); color: var(--bad); } .badge.acc { background: var(--accent-soft); color: var(--accent-600); }

/* Hinweisband (Reform) */
.banner { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--r); background: linear-gradient(90deg, #EAF1FF, #F3F7FF); border: 1px solid #DCE6FA; margin-top: 18px; flex-wrap: wrap; }
.area-schule .banner { background: linear-gradient(90deg, #E3F5F2, #F2FBF9); border-color: #D2EDE8; }
.banner .i { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--accent); color: var(--accent-text, var(--accent)); display: grid; place-items: center; font-weight: 800; flex: none; }
.banner .t { flex: 1; min-width: 200px; } .banner b { display: block; } .banner span { font-size: .88rem; color: var(--text-2); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 14px; border: 1px solid transparent; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .08s ease, background .15s, box-shadow .15s; box-shadow: 0 8px 18px -10px var(--accent); white-space: nowrap; }
.btn svg { width: 18px; height: 18px; }
.btn:hover { background: var(--accent-600); }
.btn:active { transform: scale(.98); }
.btn.block { width: 100%; }
.btn.ghost { background: var(--accent-soft); color: var(--accent-600); box-shadow: none; }
.btn.outline { background: #fff; color: var(--accent-600); border-color: var(--accent); box-shadow: none; min-height: 42px; padding: 0 18px; border-radius: 999px; }
.btn.light { background: #fff; color: var(--text); border-color: var(--line); box-shadow: none; }
.btn.danger { background: var(--bad-soft); color: var(--bad); box-shadow: none; }
.btn.sm { min-height: 38px; padding: 0 14px; border-radius: 11px; font-size: .9rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Fortschritt & Diagramme */
.bar { height: 8px; border-radius: 99px; background: #E9EDF4; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .4s ease; }
.bar.ok > i { background: #16A34A; }
.stack-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: #E9EDF4; }
.stack-bar i { display: block; height: 100%; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--text-2); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.c-gruen { background: #16A34A; } .c-gelb { background: #F59E0B; } .c-rot { background: #EF4444; }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 10px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.chart .col i { width: 100%; max-width: 30px; background: var(--accent); opacity: .85; border-radius: 8px 8px 4px 4px; min-height: 3px; }
.chart .col i.today { opacity: 1; }
.chart .col span { font-size: .66rem; color: var(--muted); white-space: nowrap; }
.chart .col em { font-style: normal; font-size: .7rem; color: var(--text-2); font-weight: 650; }

/* Hinweise */
.alert { padding: 12px 14px; border-radius: 12px; background: var(--warn-soft); color: #78350F; font-size: .92rem; }
.alert.bad { background: var(--bad-soft); color: #7C2D12; } .alert.ok { background: var(--ok-soft); color: #14532D; } .alert.info { background: var(--accent-soft); color: var(--accent-600); }

/* Formulare */
label.field { display: block; margin-bottom: 14px; }
label.field span { display: block; font-weight: 650; font-size: .88rem; margin-bottom: 6px; color: var(--text-2); }
input[type=text], input[type=password], input[type=number], input[type=search], input[type=email], textarea, select { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid #D5DCE7; background-color: #fff; font-size: 16px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 1px; border-color: var(--accent); }
.form-grid { display: grid; gap: 0 16px; }
@media (min-width: 700px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }

/* Tabellen & Listen */
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { text-align: left; padding: 13px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 750; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; } .table tr.click:hover td { background: #F8FAFD; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.scroll-x { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
.person { display: flex; align-items: center; gap: 12px; }
.ini { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-600); display: grid; place-items: center; font-weight: 750; font-size: .82rem; flex: none; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: #fff; box-shadow: var(--shadow); border: 1px solid var(--line-2); text-decoration: none; color: inherit; margin-bottom: 10px; }
.list-item .ic { width: 46px; height: 46px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text, var(--accent)); display: grid; place-items: center; flex: none; }
.list-item .ic.done { background: var(--ok-soft); color: var(--ok); }
.list-item .t { flex: 1; min-width: 0; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.secret { font-family: ui-monospace, Consolas, monospace; font-size: 1.05rem; background: var(--bg); padding: 10px 14px; border-radius: 10px; user-select: all; word-break: break-all; }
.article h3 { margin-top: 18px; } .article ul { padding-left: 20px; margin: 0 0 1em; } .article li { margin-bottom: 6px; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 18px 30px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline li::after { content: ""; position: absolute; left: 9px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.open::before { background: #fff; border: 2px solid var(--accent); }

/* ---------- Anmeldung ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(900px 500px at 15% -10%, #DCE8FF 0, transparent 60%), radial-gradient(700px 500px at 110% 110%, #E3F5F2 0, transparent 60%), var(--bg); }
.auth .card { width: 100%; max-width: 420px; padding: 32px; box-shadow: var(--shadow-lg); }
.auth .tile { width: 56px; height: 56px; border-radius: 16px; background: var(--accent); color: #fff; display: grid; place-items: center; margin-bottom: 18px; box-shadow: 0 10px 22px -10px var(--accent); }
.auth .tile svg { width: 30px; height: 30px; }

/* ---------- Schüler-App ---------- */
.boot { min-height: 50vh; display: grid; place-items: center; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ampel { display: flex; align-items: center; gap: 18px; }
.ampel .dot { width: 60px; height: 60px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 800; }
.ampel .dot.rot { background: #EF4444; } .ampel .dot.gelb { background: #F59E0B; } .ampel .dot.gruen { background: #16A34A; }
.stat { display: flex; flex-direction: column; } .stat b { font-size: 1.8rem; line-height: 1.1; } .stat span { color: var(--muted); font-size: .86rem; }
.topic { display: flex; align-items: center; gap: 14px; padding: 13px 4px; border-bottom: 1px solid var(--line-2); text-decoration: none; color: inherit; }
.topic:last-child { border-bottom: 0; }
.topic .nr { width: 36px; height: 36px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-600); font-weight: 800; display: grid; place-items: center; flex: none; font-size: .88rem; }
.topic .t { flex: 1; min-width: 0; } .topic .t b { display: block; font-weight: 600; font-size: .95rem; } .topic .t .bar { margin-top: 6px; }
.q-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.q-text { font-size: 1.15rem; font-weight: 650; margin-bottom: 18px; }
.opt { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; padding: 14px; margin-bottom: 10px; border-radius: 14px; border: 2px solid var(--line); background: #fff; cursor: pointer; transition: border-color .12s, background .12s; }
.opt .box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid #94A3B8; flex: none; display: grid; place-items: center; margin-top: 1px; }
.opt.sel { border-color: var(--accent); background: var(--accent-soft); }
.opt.sel .box { background: var(--accent); border-color: var(--accent); }
.opt.sel .box::after { content: ""; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 3px 3px; transform: rotate(-45deg) translate(1px,-1px); }
.opt.right { border-color: #16A34A; background: var(--ok-soft); } .opt.wrong { border-color: var(--red); background: #FEECEC; }
.opt[disabled] { cursor: default; }
.num-input { display: flex; align-items: center; gap: 10px; max-width: 260px; }
.feedback { margin-top: 16px; padding: 14px 16px; border-radius: 14px; }
.feedback.ok { background: var(--ok-soft); color: #14532D; } .feedback.bad { background: #FEECEC; color: #7F1D1D; }
.feedback b { display: block; margin-bottom: 4px; }
.qnav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.qnav button { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: .85rem; cursor: pointer; }
.qnav button.done { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-600); }
.qnav button.cur { outline: 2px solid var(--accent); }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; }
.video-ph { aspect-ratio: 16/9; border-radius: 16px; background: linear-gradient(135deg, #1E40AF, #0F2A5F); color: #fff; display: grid; place-items: center; text-align: center; padding: 16px; }
video { width: 100%; border-radius: 16px; background: #000; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 16px; }
.steps li { counter-increment: s; position: relative; padding: 10px 0 10px 44px; border-bottom: 1px dashed var(--line); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 8px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: .85rem; }
.steps li.done { color: var(--muted); text-decoration: line-through; } .steps li.done::before { background: #16A34A; content: "✓"; }

/* ---------- Dialoge ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: #fff; border-radius: 22px; padding: 26px; width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lg); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; background: var(--text); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 60; font-size: .92rem; box-shadow: var(--shadow-lg); max-width: calc(100% - 32px); }
body.student .toast { bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); }
.fade-in { animation: fade .25s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Feinschliff Handy ---------- */
.grid > * { min-width: 0; }
.grid.four { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) {
  .app-head .area-tag { display: none; }
  .app-head .tile { width: 40px; height: 40px; border-radius: 12px; }
  .app-head .tile svg { width: 22px; height: 22px; }
  .avatar { width: 40px; height: 40px; }
  .kpi { flex-direction: column; gap: 10px; }
  .kpi .ic { width: 40px; height: 40px; border-radius: 12px; }
  .kpi b { font-size: 1.45rem; }
  .card { padding: 18px; }
  .page-head .btn { width: 100%; }
  .chart .col span { display: none; }
  .chart .col em { font-size: .6rem; }
}

/* ---------- Lernpfad (Schüler) ---------- */
.path-hero { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 18px; }
.path-hero h1 { margin-bottom: 4px; }
.path-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.path-stats span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .9rem; color: var(--text-2); box-shadow: var(--shadow); }
.card.focus { border: 1px solid #F7D9A8; background: linear-gradient(180deg, #FFFBF2, #fff); }
.weak { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.weak .t { flex: 1 1 180px; min-width: 0; } .weak .t b { display: block; } .weak .bar { margin: 6px 0 4px; max-width: 260px; }
.bar.warn > i { background: #F59E0B; }
.bar.big { height: 14px; flex: 1; }
.path { max-width: 560px; margin: 8px auto 0; }
.stage { border-radius: 22px; padding: 18px 20px; color: #fff; background: linear-gradient(135deg, #2563EB, #4F46E5); box-shadow: 0 14px 30px -18px rgba(37,99,235,.8); margin-top: 26px; }
.stage.fach { background: linear-gradient(135deg, #0D9488, #0E7490); box-shadow: 0 14px 30px -18px rgba(13,148,136,.8); }
.stage.ziel { background: linear-gradient(135deg, #F59E0B, #EA580C); box-shadow: 0 14px 30px -18px rgba(234,88,12,.8); }
.stage.locked { background: #E9EDF4; color: var(--muted); box-shadow: none; }
.stage.locked h2 { color: var(--text-2); }
.stage h2 { color: #fff; margin: 2px 0 4px; }
.stage p { margin: 0; opacity: .92; font-size: .93rem; }
.stage-k { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.lcard .stage-k { color: var(--accent-600); opacity: 1; }
.stage-p { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: .85rem; font-weight: 700; }
.stage-p .bar { flex: 1; background: rgba(255,255,255,.3); } .stage-p .bar > i { background: #fff; }
.stage.locked .stage-p .bar { background: #DCE2EC; } .stage.locked .stage-p .bar > i { background: #94A3B8; }
.nodes { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 26px 0 6px; }
.node-wrap { display: flex; flex-direction: column; align-items: center; transform: translateX(var(--x)); max-width: 220px; text-align: center; }
.node { position: relative; width: 74px; height: 74px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: #fff; background: var(--accent); box-shadow: 0 6px 0 var(--accent-600); transition: transform .1s; }
.node svg { width: 32px; height: 32px; }
.node:active { transform: translateY(3px); box-shadow: 0 3px 0 var(--accent-600); }
.node.fertig { background: #16A34A; box-shadow: 0 6px 0 #15803D; }
.node.gesperrt { background: #E2E8F0; color: #94A3B8; box-shadow: 0 6px 0 #CBD5E1; cursor: not-allowed; }
.node.test.offen, .node.pruefung.offen { background: #F59E0B; box-shadow: 0 6px 0 #D97706; }
.node.test, .node.pruefung { border-radius: 24px; }
.node.offen { width: 86px; height: 86px; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100% { outline: 0 solid var(--accent-ring); } 50% { outline: 10px solid var(--accent-ring); } }
.node .go { position: absolute; top: -34px; left: 50%; transform: translateX(-50%); background: #fff; color: var(--accent-600); font-weight: 800; font-size: .8rem; padding: 4px 12px; border-radius: 10px; box-shadow: var(--shadow); white-space: nowrap; letter-spacing: .04em; text-transform: uppercase; }
.node .go::after { content: ""; position: absolute; bottom: -5px; left: 50%; margin-left: -5px; border: 5px solid transparent; border-top-color: #fff; border-bottom: 0; }
.node-l { margin-top: 10px; font-size: .85rem; line-height: 1.3; }
.node-l b { display: block; font-weight: 650; color: var(--text-2); }
.stars { color: #CBD5E1; letter-spacing: 2px; font-size: .95rem; }
.stars i { font-style: normal; } .stars i.on { color: #F59E0B; }
.stars.lg { font-size: 2rem; margin: 4px 0 6px; }

/* Lektion */
.lesson-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.lesson-foot { margin-top: 16px; }
.btn.okb { background: #16A34A; box-shadow: 0 8px 18px -10px #16A34A; } .btn.badb { background: var(--red); box-shadow: 0 8px 18px -10px var(--red); }
.role { display: inline-block; font-size: .78rem; font-weight: 800; padding: 4px 12px; border-radius: 999px; margin-bottom: 12px; background: var(--accent-soft); color: var(--accent-600); }
.role.logik { background: #F3E8FF; color: #7E22CE; } .role.aehnlich { background: #E0F2FE; color: #0369A1; } .role.wiederholung { background: var(--warn-soft); color: var(--warn); }
.badge.qnr { background: transparent; border: 1px solid var(--line); }
.q-img { margin: -4px 0 18px; text-align: center; } .q-img img { max-width: 100%; width: 320px; height: auto; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.lcard h1 { margin: 6px 0 8px; } .lcard .lead { font-size: 1.06rem; color: var(--text-2); }
.points { padding-left: 0; list-style: none; margin: 0 0 16px; }
.points li { position: relative; padding: 8px 0 8px 30px; border-top: 1px solid var(--line-2); }
.points li::before { content: ""; position: absolute; left: 6px; top: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.merk { background: var(--accent-soft); color: var(--accent-600); border-radius: 14px; padding: 12px 16px; font-weight: 700; margin-bottom: 14px; }
.merk span { display: block; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
details.anders { border: 1px dashed var(--line); border-radius: 14px; padding: 10px 14px; margin-bottom: 18px; }
details.anders summary { cursor: pointer; font-weight: 700; color: var(--accent-600); }
details.anders p { margin: 10px 0 0; color: var(--text-2); }
.anders-box { border: 2px solid #E9D5FF; background: #FBF7FF; margin-top: 16px; }
.anders-box b { color: #7E22CE; }
.result { text-align: center; } .result .big { font-size: 3.2rem; line-height: 1; margin-bottom: 8px; }
.lock-big { width: 64px; height: 64px; border-radius: 20px; background: #EEF2F8; color: var(--muted); display: grid; place-items: center; margin-bottom: 12px; } .lock-big svg { width: 32px; height: 32px; }
.stage-mini { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.stage-mini .bar { margin-bottom: 4px; }
@media (max-width: 640px) { .node-wrap { transform: translateX(calc(var(--x) * .6)); } .path-hero { align-items: flex-start; } }
.node-wrap:has(.node.offen) { margin-top: 28px; }
@media (max-width: 640px) { .weak .t { flex-basis: 100%; } .weak .btn { flex: 1; } }

/* =========================================================================
   Design 2 (08.11.2026, Leons Designempfehlung): Schüler = persönliche Lernreise
   ========================================================================= */
:root { font-family: Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --opt-line: #E2E8F2; --sel: #245CF5; --sel-soft: #EAF0FF; --right: #16A36A; --right-soft: #E7F7EF; --wrong: #D94B4B; --wrong-soft: #FDECEC; --gold: #F5B301; --gold-2: #D99A00; }

/* Kopfzeile Schüler: Stufe + Serie/XP */
.head-stat { display: flex; gap: 6px; }
.head-stat span { background: #F1F4F9; border-radius: 999px; padding: 6px 12px; font-size: .86rem; font-weight: 700; color: var(--text-2); white-space: nowrap; }
@media (max-width: 420px) { .head-stat span:last-child { display: none; } }

/* Lernziel-Karte unter der Navigation (nur Desktop) */
.goal { display: none; }
@media (min-width: 1001px) {
  .goal:not(:empty) { display: block; margin-top: auto; border-radius: 18px; background: linear-gradient(160deg, #EEF4FF, #F8FAFF); border: 1px solid #E3EBFA; padding: 16px; font-size: .9rem; }
  .goal > b { display: block; margin-bottom: 10px; color: var(--accent-600); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
  .goal-row { display: flex; gap: 12px; align-items: center; }
}

/* Fortschrittsring */
.ring { --p: 0; --rc: var(--accent); width: 96px; height: 96px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--rc) calc(var(--p) * 1%), #E9EDF4 0); }
.ring > div { width: 76%; height: 76%; border-radius: 50%; background: #fff; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.ring b { font-size: 1.35rem; font-weight: 800; } .ring span { font-size: .7rem; color: var(--muted); }
.ring.sm { width: 54px; height: 54px; } .ring.sm b { font-size: .85rem; }
.ring.bad { --rc: #EF4444; } .ring.ok { --rc: #16A34A; }

/* Dashboard */
.hello h1 { margin-bottom: 2px; } .hello p { margin: 0 0 18px; }
.dash3 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .dash3 { grid-template-columns: 1.3fr 1fr 1fr; } }
.dash3 .card + .card { margin-top: 0; }
.dcard { display: flex; flex-direction: column; gap: 6px; }
.dcard .btn { margin-top: auto; }
.dk { font-size: .74rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.dcard h3 { font-size: 1.15rem; margin: 2px 0 12px; }
.dcard.next { background: linear-gradient(150deg, #2563EB, #4F46E5); color: #fff; border: 0; }
.dcard.next .dk, .dcard.next .muted { color: rgba(255,255,255,.8); } .dcard.next h3 { color: #fff; }
.dcard.next .btn { background: #fff; color: var(--accent-600); box-shadow: none; }
.prog { display: flex; gap: 16px; align-items: center; }
.prog-t > div:first-child { font-size: 1.05rem; }
.mini-stats { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.mini-stats span { background: #F4F7FC; border-radius: 999px; padding: 3px 10px; font-size: .82rem; }
.big-n { font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--accent-text, var(--accent)); } .big-n.ok { color: #16A34A; }
.weak-card { margin-top: 16px; }
.weak-head { display: flex; gap: 18px; align-items: center; margin-bottom: 8px; }
.weak-head h2 { margin: 0 0 4px; } .weak-head p { margin: 0; }
.topic-row { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-top: 12px; }
.tr-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 10px; }
.tr-top b { font-size: 1.02rem; }
.tr-bot { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.tr-bot a { font-weight: 700; text-decoration: none; white-space: nowrap; }
.pill { font-size: .8rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; white-space: nowrap; }
.pill.bad { background: var(--wrong-soft); color: #C53030; } .pill.warn { background: #FEF0E1; color: #C2580C; } .pill.mid { background: #FEF7DC; color: #A16207; } .pill.ok { background: var(--right-soft); color: var(--right); }
.bar.bad > i { background: #EF4444; } .bar.warn > i { background: #F59E0B; } .bar.mid > i { background: #EAB308; } .bar.ok > i { background: #16A34A; }
.tip { margin-top: 14px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: #FFF5F5; border-radius: 14px; padding: 12px 14px; font-size: .92rem; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 30px 0 0; }
.sec-head h2 { margin: 0; } .sec-head a { font-weight: 700; text-decoration: none; }

/* Lernpfad: Themenwelten + verbundene Stationen */
.stage { display: flex; gap: 14px; align-items: flex-start; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 14px 30px -18px var(--c1); }
.stage.fach, .stage.ziel { background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 14px 30px -18px var(--c1); }
.stage.locked { background: #E9EDF4; box-shadow: none; }
.stage-ic { width: 46px; height: 46px; border-radius: 14px; background: rgba(255,255,255,.22); display: grid; place-items: center; flex: none; }
.stage-ic svg { width: 26px; height: 26px; }
.stage.locked .stage-ic { background: #DCE2EC; color: #94A3B8; }
.stage-b { flex: 1; min-width: 0; }
.nodes { display: block; position: relative; padding: 0; margin: 22px 0 6px; gap: 0; }
.trail { position: absolute; left: 50%; top: 0; margin-left: -200px; overflow: visible; pointer-events: none; }
.trail polyline { fill: none; stroke: var(--c1); stroke-opacity: .28; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 2 12; }
.node-wrap { position: absolute; left: 50%; width: 200px; margin-left: -100px; height: 148px; transform: translateX(var(--x)); max-width: none; }
.node-wrap:has(.node.offen) { margin-top: 0; }
.node { margin-top: 9px; background: var(--sel); box-shadow: 0 6px 0 #1A47C8; }
.node.offen { width: 86px; height: 86px; margin-top: 3px; }
.node.fertig { background: radial-gradient(circle at 35% 30%, #FFE27A, var(--gold)); box-shadow: 0 6px 0 var(--gold-2), 0 0 0 5px #FFF3C4; color: #7A4B00; }
.node.fertig svg { fill: currentColor; }
.node.gesperrt { background: #E2E8F0; color: #94A3B8; box-shadow: 0 6px 0 #CBD5E1; }
.node.test.offen, .node.pruefung.offen { background: var(--sel); box-shadow: 0 6px 0 #1A47C8; }
.node .go { top: 50%; left: calc(100% + 12px); transform: translateY(-50%); }
.node .go::after { bottom: auto; top: 50%; left: -5px; margin: -5px 0 0; border: 5px solid transparent; border-right-color: #fff; border-left: 0; }
.node-l { margin-top: 12px; }
@media (max-width: 640px) { .trail { transform: scaleX(.6); } .node .go { display: none; } }

/* Fragenbildschirm */
.lesson-top { align-items: flex-start; }
.lt-b { flex: 1; min-width: 0; }
.lt-t { display: flex; justify-content: space-between; gap: 10px; font-size: .84rem; font-weight: 700; color: var(--muted); margin: 2px 0 8px; }
.lt-t span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-t span:last-child { white-space: nowrap; color: var(--accent-600); }
.q-head { justify-content: space-between; margin-bottom: 10px; }
.multi { font-size: .78rem; font-weight: 700; color: var(--sel); background: var(--sel-soft); padding: 4px 10px; border-radius: 999px; }
.q-meta { font-size: .76rem; color: #94A3B8; font-weight: 600; }
.q-text { font-size: 1.32rem; font-weight: 750; line-height: 1.35; letter-spacing: -.01em; margin: 6px 0 18px; }
.q-img { background: #F4F7FC; border-radius: 18px; padding: 18px; margin: 0 0 18px; display: grid; place-items: center; }
.q-img img { width: auto; max-width: 100%; max-height: 280px; border: 0; border-radius: 10px; background: transparent; }
.opts { display: grid; gap: 10px; }
.opt { min-height: 60px; padding: 14px 16px; margin: 0; border-radius: 16px; border: 2px solid var(--opt-line); background: #fff; align-items: center; font-size: 1rem; transition: border-color .15s, background .15s, transform .08s; }
.opt:not([disabled]):hover { border-color: #B8C7E6; }
.opt:not([disabled]):active { transform: scale(.99); }
.opt .ot { flex: 1; }
.opt .box { width: 26px; height: 26px; border-radius: 8px; border-color: #B6C2D6; margin-top: 0; transition: background .15s, border-color .15s; }
.opt.sel { border-color: var(--sel); background: var(--sel-soft); }
.opt.sel .box { background: var(--sel); border-color: var(--sel); }
.opt.right { border-color: var(--right); background: var(--right-soft); }
.opt.right .box { border-color: var(--right); } .opt.right.sel .box { background: var(--right); }
.opt.wrong { border-color: var(--wrong); background: var(--wrong-soft); }
.opt.wrong .box { background: var(--wrong); border-color: var(--wrong); }
.opt.dim { opacity: .6; }
.opt .mark { font-weight: 800; font-size: 1.1rem; } .opt.right .mark { color: var(--right); } .opt.wrong .mark { color: var(--wrong); }
.feedback { margin-top: 18px; padding: 16px 18px; border-radius: 16px; border: 1px solid transparent; }
.feedback.ok { background: var(--right-soft); border-color: #BFE8D2; color: #0F5132; }
.feedback.bad { background: #FFF7F7; border-color: #F5C9C9; color: #4A1D1D; }
.fb-h { display: flex; align-items: center; gap: 10px; font-size: 1.08rem; margin-bottom: 6px; }
.fb-h b { margin: 0; display: inline; }
.fb-ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; flex: none; }
.feedback.ok .fb-ic { background: var(--right); } .feedback.bad .fb-ic { background: var(--wrong); }
.fb-r, .fb-w { margin: 6px 0; } .fb-r span, .fb-w span { font-weight: 800; }
.fb-e { margin: 8px 0 0; }
.feedback .merk { margin: 12px 0 10px; }
.pop { animation: pop .25s ease-out; }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.lesson-foot { position: sticky; bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom)); z-index: 5; }
.lesson-foot .btn { min-height: 56px; font-size: 1.05rem; border-radius: 16px; }
@media (min-width: 1001px) { .lesson-foot { bottom: 16px; } }
.btn.okb { background: var(--right); } .btn.badb { background: var(--wrong); }
.modal .lcard h1 { font-size: 1.5rem; }
.stars.lg i.on { display: inline-block; animation: pop .4s ease-out both; }

.opt:not([disabled]).sel:hover { border-color: var(--sel); }
.goal { font-size: .86rem; } .goal-row { align-items: flex-start; } .goal-row > div:last-child { min-width: 0; }
.stage-tog { margin-top: 12px; background: rgba(255,255,255,.22); color: #fff; border: 0; border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: .84rem; cursor: pointer; }
.stage-tog:hover { background: rgba(255,255,255,.32); }
.nodes[hidden] { display: none; }

/* Einführung beim ersten Login */
.tour { position: fixed; inset: 0; z-index: 60; }
.tour.center { background: rgba(15,23,42,.6); display: grid; place-items: center; padding: 16px; }
.tour-spot { position: fixed; border-radius: 18px; box-shadow: 0 0 0 9999px rgba(15,23,42,.6); outline: 3px solid #fff; transition: all .25s ease; pointer-events: none; }
.tour-card { position: fixed; width: min(380px, calc(100vw - 24px)); background: #fff; border-radius: 20px; padding: 20px; box-shadow: var(--shadow-lg); }
.tour.center .tour-card { position: relative; top: auto !important; left: auto !important; }
.tour-k { font-size: .74rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--accent-600); }
.tour-card h3 { font-size: 1.2rem; margin: 6px 0 8px; } .tour-card p { color: var(--text-2); margin: 0 0 14px; }
.tour-dots { display: flex; gap: 6px; margin-bottom: 14px; } .tour-dots i { width: 8px; height: 8px; border-radius: 50%; background: #DCE2EC; } .tour-dots i.on { background: var(--accent); width: 22px; border-radius: 99px; } .tour-dots i.done { background: #A8C1F5; }
.tour-btns { display: flex; justify-content: space-between; gap: 10px; }

/* =========================================================================
   Eigenes Design je Fahrschule (08.11.2026): Variablen werden in app.js (applyBrand) gesetzt
   --on-accent = Textfarbe auf der Hauptfarbe, --accent-text = lesbare Variante auf Weiß, --brand2 = Zweitfarbe
   ========================================================================= */
.btn { color: var(--on-accent, #fff); border-radius: var(--rb, 14px); }
.btn:hover { background: var(--accent-hover, var(--accent-600)); }
.btn.okb, .btn.badb { color: #fff; }
.app-head .tile, .auth .tile { color: var(--on-accent, #fff); }
.app-head .tile.logo, .auth .tile.logo { background: #fff; box-shadow: none; width: auto; min-width: 46px; padding: 3px 6px; }
.app-head .tile.logo img { display: block; max-height: 40px; max-width: 150px; }
.auth .tile.logo img { display: block; max-height: 56px; max-width: 220px; }
@media (max-width: 560px) { .app-head .tile.logo img { max-width: 110px; max-height: 34px; } .app-head .tile.logo + .names .t1 { display: none; } }
.node:not(.fertig):not(.gesperrt) { color: var(--on-accent, #fff); }
.opt.sel .box::after { border-color: var(--on-accent, #fff); }
.multi { color: var(--accent-text, var(--sel)); }
.tabbar a.active { color: var(--accent-text, var(--accent)); }
.card, .list-item, .topic-row, .opt, .modal, .tour-card, .feedback, .q-img, .stage, .weak-card { border-radius: var(--r); }
.ring b { color: var(--text); }

/* Design-Assistent / Design-Seite */
.wiz { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1100px) { .wiz { grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); } .wiz .preview-col { position: sticky; top: calc(var(--head-h) + 20px); } }
.wiz-steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.wiz-steps span { font-size: .78rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: #EEF2F8; color: var(--muted); }
.wiz-steps span.on { background: var(--accent-soft); color: var(--accent-text, var(--accent-600)); }
.wiz-steps span.done { color: var(--ok); }
.logo-drop { border: 2px dashed var(--line); border-radius: var(--r); padding: 22px; text-align: center; background: #FAFBFD; cursor: pointer; }
.logo-drop:hover { border-color: var(--accent); }
.logo-drop img { max-height: 90px; max-width: 100%; display: block; margin: 0 auto 10px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 14px; }
.swatch { width: 40px; height: 40px; border-radius: 12px; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatch.on { box-shadow: 0 0 0 3px var(--text); }
.color-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.color-row input[type=color] { width: 56px; height: 44px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.color-row input[type=text] { width: 120px; font-family: ui-monospace, monospace; text-transform: uppercase; }
.fonts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.font-card { border: 2px solid var(--line); border-radius: 14px; padding: 12px; cursor: pointer; background: #fff; text-align: left; }
.font-card b { display: block; font-size: 1.3rem; line-height: 1.2; } .font-card span { font-size: .8rem; color: var(--muted); }
.font-card.on { border-color: var(--accent); background: var(--accent-soft); }
.hint-warn { font-size: .85rem; color: var(--warn); margin-top: 6px; }
/* Vorschau (Handy) */
.pv-phone { width: 300px; max-width: 100%; margin: 0 auto; border: 10px solid #111827; border-radius: 34px; overflow: hidden; background: var(--pv-bg, #F4F7FC); box-shadow: var(--shadow-lg); font-family: var(--pv-font); }
.pv-head { display: flex; align-items: center; gap: 8px; padding: 12px; background: #fff; border-bottom: 1px solid var(--line); }
.pv-tile { min-width: 34px; height: 34px; border-radius: 10px; background: var(--pv-a); color: var(--pv-on); display: grid; place-items: center; padding: 0 4px; }
.pv-tile img { max-height: 28px; max-width: 110px; display: block; } .pv-tile.logo { background: #fff; }
.pv-tile svg { width: 20px; height: 20px; }
.pv-body { padding: 12px; display: grid; gap: 10px; }
.pv-card { background: #fff; border-radius: var(--pv-r); padding: 12px; box-shadow: var(--shadow); }
.pv-next { background: var(--pv-2); color: var(--pv-on2); border-radius: var(--pv-r); padding: 14px; }
.pv-next small { opacity: .75; } .pv-next b { display: block; margin: 4px 0 10px; }
.pv-btn { display: block; text-align: center; background: var(--pv-a); color: var(--pv-on); border-radius: var(--pv-rb); padding: 9px; font-weight: 700; font-size: .9rem; }
.pv-opt { border: 2px solid var(--pv-a); background: var(--pv-soft); border-radius: var(--pv-rb); padding: 8px 10px; font-size: .85rem; }
.pv-opt.n { border-color: var(--line); background: #fff; }
.pv-bar { height: 8px; border-radius: 99px; background: #E9EDF4; overflow: hidden; } .pv-bar i { display: block; height: 100%; width: 60%; background: var(--pv-a); }
.pv-link { color: var(--pv-text); font-weight: 700; font-size: .85rem; }
.pv-tabs { display: flex; justify-content: space-around; padding: 8px 4px; background: #fff; border-top: 1px solid var(--line); font-size: .66rem; color: var(--muted); }
.pv-tabs span.on { color: var(--pv-text); font-weight: 800; }
.setup-shell { max-width: 1180px; }

/* Elternbereich */
.kind-card .prog { align-items: center; }
.help-row { display: block; text-decoration: none; color: inherit; }
.help-row .go-l { font-weight: 700; color: var(--accent-text, var(--accent-600)); white-space: nowrap; }
.e-tiles { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 16px; }
@media (min-width: 760px) { .e-tiles { grid-template-columns: repeat(3, 1fr); } }
.e-tiles .card + .card { margin-top: 0; }
.e-tile { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; }
.e-tile .ic { width: 46px; height: 46px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text, var(--accent)); display: grid; place-items: center; }
.e-tile:hover { border-color: var(--accent); }
.e-box h2 { font-size: 1.1rem; } .e-box p { margin: 0; color: var(--text-2); }
.e-box.warn { background: #FFFBF2; border-color: #F7D9A8; }
.e-list { margin: 0; padding-left: 20px; } .e-list li { margin: 6px 0; color: var(--text-2); }
.e-steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 16px; }
.e-steps li { counter-increment: s; position: relative; padding: 10px 0 10px 44px; border-top: 1px solid var(--line-2); }
.e-steps li::before { content: counter(s); position: absolute; left: 0; top: 8px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--on-accent, #fff); display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
.e-fehler { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--line-2); } .e-fehler span { color: var(--text-2); }
.e-tips { display: grid; gap: 14px; grid-template-columns: 1fr; } @media (min-width: 760px) { .e-tips { grid-template-columns: 1fr 1fr; } }
.e-tips p { margin: 4px 0 0; color: var(--text-2); }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .92rem; } label.check input { margin-top: 4px; width: auto; min-height: 0; }

.leit { position: relative; display: grid; gap: 12px; margin-bottom: 14px; }
.leit::before { content: ""; position: absolute; left: 21px; top: 20px; bottom: 20px; width: 3px; background: var(--accent-soft); border-radius: 3px; }
.leit-step { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; text-decoration: none; color: inherit; position: relative; }
.leit-nr { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--on-accent, #fff); display: grid; place-items: center; font-weight: 800; box-shadow: 0 0 0 4px var(--bg); }
.leit-card { margin: 0; } .leit-step:hover .leit-card { border-color: var(--accent); }
label.check.kann { padding: 10px 0; border-top: 1px solid var(--line-2); }
.pill:not(.ok):not(.mid):not(.warn):not(.bad) { background: #F1F4F9; color: var(--muted); }

.e-tiles { grid-template-columns: 1fr; } @media (min-width: 760px) { .e-tiles { grid-template-columns: repeat(2, 1fr); } } @media (min-width: 1100px) { .e-tiles:not(.e-tiles-2) { grid-template-columns: repeat(4, 1fr); } .e-tiles-2 { grid-template-columns: repeat(2, 1fr); } }
.e-tile .ic.emo { font-size: 1.5rem; }
.e-method { margin-top: 16px; text-decoration: none; } .e-method .ic { flex: none; }

/* Abrechnung, Rechnung, Rechtstexte */
.lizenz { margin-top: 16px; } .lizenz.bad { border-color: #F5C9C9; background: #FFF7F7; }
.invoice { max-width: 820px; padding: 36px; font-size: .95rem; position: relative; }
.inv-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.inv-meta h1 { margin: 0 0 8px; } .inv-meta td { padding: 2px 12px 2px 0; }
.inv-to { margin: 28px 0 20px; } .inv-pos { margin: 10px 0 16px; } .inv-sum td { border-top: 2px solid var(--text); }
.inv-foot { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 10px; }
.inv-stamp { position: absolute; top: 150px; right: 40px; transform: rotate(-8deg); border: 3px solid var(--ok); color: var(--ok); font-weight: 800; padding: 4px 12px; border-radius: 8px; text-transform: uppercase; }
.inv-stamp.storniert { border-color: var(--muted); color: var(--muted); }
@media print { .app-head, .app-side, .tabbar, .no-print, .side-back { display: none !important; } body.has-side main { margin: 0 !important; padding: 0 !important; } .invoice { box-shadow: none; border: 0; max-width: none; } body { background: #fff; } }
.legal-links { margin-top: 14px; font-size: .8rem; text-align: center; color: var(--muted); } .legal-links a { color: var(--muted); }
.app-side .legal-links { text-align: left; padding: 8px 14px 0; }
.legal-wrap { align-items: flex-start; } .legal-wrap .card { max-width: 820px; }
.legal { line-height: 1.6; } .legal h1 { font-size: 1.7rem; } .legal h2 { font-size: 1.2rem; margin-top: 1.4em; } .legal h3 { font-size: 1.05rem; margin-top: 1.2em; }
textarea { width: 100%; font: inherit; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
label.check.full { grid-column: 1 / -1; }

/* Sprachen */
.lang-pick { display: flex; align-items: center; gap: 6px; justify-content: flex-end; margin: -6px 0 6px; font-size: .9rem; }
.lang-pick select { border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; font: inherit; background: #fff; }
.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 10px 0 14px; }
.q-de, .l-de, html.show-de .q-tr, html.show-de .l-tr { display: none; }
html.show-de .q-de, html.show-de .l-de { display: inline; }
.q-orig { margin-inline-start: auto; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 10px; font: inherit; font-size: .8rem; cursor: pointer; color: var(--muted); }
.q-orig:hover { color: var(--text); }
[dir=rtl] .q-de, [dir=rtl] .lang-pick select { text-align: left; }

/* ---------- Handy / App-Gefühl (08.11.) ---------- */
html { -webkit-tap-highlight-color: transparent; }
body { overscroll-behavior-y: none; }
.btn, .opt, .tabbar a, .icon-btn, .avatar, .list-item, .menu button { -webkit-user-select: none; user-select: none; touch-action: manipulation; }
.btn:active, .opt:active, .icon-btn:active, .list-item:active { transform: scale(.97); }
.tabbar a:active svg { transform: scale(.9); }
.btn, .opt, .list-item { transition: transform .08s ease, background-color .15s, border-color .15s; }
.lang-pick select { width: auto; min-height: 36px; padding: 4px 10px; font-size: .9rem; }
@media (max-width: 899px) {
  /* Lektion & Prüfung: Vollbild wie in Lern-Apps */
  body.focus .app-head, body.focus .tabbar { display: none; }
  body.focus main { padding-top: calc(12px + env(safe-area-inset-top)); padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  body.focus .lesson-foot { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); }
  body.focus main.fade-in { animation: none; transform: none; } /* Transform würde position:fixed an main binden */
  body.focus .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
  /* Anmeldung als Startbildschirm */
  .auth { place-items: start center; padding: calc(28px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)); }
  .auth .card { box-shadow: none; background: transparent; border: 0; padding: 12px 8px; }
  .auth .lang-pick { margin: 0 0 18px; }
}
/* In der Android-App: keine Textauswahl auf Flächen, Links wirken wie Tasten */
html.native body { -webkit-user-select: none; user-select: none; }
html.native input, html.native textarea, html.native .q-text, html.native .legal { -webkit-user-select: text; user-select: text; }
html.native a { -webkit-touch-callout: none; }

/* Praxis-Stand (Fahrschule) + Kind-Auswahl (Eltern) */
.px-stufen { display: grid; gap: 8px; }
.px-stufe { border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; background: #fff; }
.px-stufe summary { display: flex; align-items: center; gap: 10px; padding: 12px 0; cursor: pointer; list-style: none; }
.px-stufe summary::-webkit-details-marker { display: none; }
.px-nr { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft, #EAF1FF); color: var(--accent-text, var(--accent)); display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; }
.px-liste { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.px-liste li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); }
.px-liste li.ok { color: var(--text); }
.px-h { width: 18px; flex: none; font-weight: 700; } .px-liste li.ok .px-h { color: var(--ok); }
.kind-wahl { margin: 4px 0 12px; } .kind-wahl .chip { cursor: pointer; } .kind-wahl .chip.on { background: var(--accent); color: var(--on-accent, #fff); border-color: var(--accent); }
