/* T4you Akademie – Apple-Look
   Hellgrauer Grund (#F5F5F7), weiße Karten mit großen Radien, Systemschrift mit
   enger Laufweite in großen Größen, durchscheinende Kopfleiste, echte Fotos.
   Lädt nach app.css und akademie.css und überschreibt deren Tokens. */

:root {
  --primary: #0071E3;
  --primary-ink: #0066CC;
  --primary-sub: #EAF3FF;
  --primary-line: #B9D7FB;
  --accent: #FF9F0A;
  --bg: #FFFFFF;
  --page: #F5F5F7;
  --surface: #F5F5F7;
  --surface-2: #E8E8ED;
  --ink: #1D1D1F;
  --text: #1D1D1F;
  --muted: #6E6E73;
  --line: rgba(0, 0, 0, .08);
  --line-strong: #D2D2D7;
  --ok: #248A3D;
  --ok-sub: #E9F7EE;
  --bad: #D70015;
  --bad-sub: #FFECEE;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04), 0 2px 8px rgba(0,0,0,.04);
  --shadow: 0 2px 6px rgba(0,0,0,.04), 0 12px 32px rgba(0,0,0,.06);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.05), 0 24px 60px rgba(0,0,0,.10);
  --spring: cubic-bezier(.22, 1, .36, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
}

body { font: 400 1.0625rem/1.47 var(--font); letter-spacing: -.011em; color: var(--text); background: var(--page); }
body.app { background: var(--page); }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); font-weight: 700; letter-spacing: -.025em; }
h1 { font-size: clamp(2.25rem, 1.3rem + 2.8vw, 3.5rem); line-height: 1.05; letter-spacing: -.035em; }
h2 { letter-spacing: -.028em; }
.lead-sm { font-size: clamp(1.1rem, 1rem + .35vw, 1.3rem); line-height: 1.42; color: var(--muted); max-width: 62ch; letter-spacing: -.016em; }
.small { font-size: .875rem; letter-spacing: -.006em; }
a { color: var(--primary-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 55%, white); outline-offset: 2px; border-radius: 8px; }

/* ---------- Kopfleiste: durchscheinendes Material ---------- */
.topbar { height: 56px; background: rgba(251, 251, 253, .78); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,.07); }
.brand strong { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; }
.brand small { color: var(--muted); }
.brand-mark { width: 32px; height: 32px; }
.topsearch { background: rgba(0,0,0,.05); border: 0; border-radius: 10px; transition: background-color .2s; }
.topsearch:focus-within { background: #fff; box-shadow: 0 0 0 3px rgba(0,113,227,.25); }
.topsearch input { background: transparent; border: 0; }
.avatar { background: linear-gradient(135deg, #0071E3, #30B0C7); color: #fff; }
@supports not (backdrop-filter: blur(1px)) { .topbar { background: #FBFBFD; } }
@media (prefers-reduced-transparency: reduce) { .topbar { background: #FBFBFD; backdrop-filter: none; } }

/* ---------- Seitenleiste ---------- */
.shell { grid-template-columns: 256px minmax(0, 1fr); min-height: calc(100vh - 56px); }
.sidebar { top: 56px; height: calc(100vh - 56px); background: transparent; border-right: 0; padding: 20px 14px; }
.sidebar a { border-radius: 10px; color: #3A3A3C; font-weight: 500; font-size: .95rem; min-height: 38px; }
.sidebar a:hover { background: rgba(0,0,0,.045); text-decoration: none; }
.sidebar a.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 600; }
.sidebar a.active .ico { color: var(--primary); }
.nav-h { color: var(--muted); font-size: .75rem; font-weight: 600; text-transform: none; letter-spacing: 0; padding: 0 12px; }
.side-note { background: #fff; border-radius: 14px; padding: 14px; font-size: .8rem; color: var(--muted); box-shadow: var(--shadow-sm); border: 0; }
.main { max-width: 1760px; width: 100%; margin-inline: auto; padding: 36px clamp(20px, 3vw, 64px) 120px; }

/* ---------- Grundbausteine ---------- */
.panel { background: #fff; border: 0; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 26px; }
.btn { border-radius: 980px; background: var(--primary); color: #fff; font-weight: 500; letter-spacing: -.01em; padding: 10px 22px; min-height: 44px;
  box-shadow: none; transition: background-color .2s, transform .12s var(--spring); }
.btn:hover { background: #0077ED; text-decoration: none; }
.btn:active { transform: scale(.97); transition-duration: 60ms; }
.btn-ghost { background: rgba(0,113,227,.08); color: var(--primary-ink); border: 0; }
.btn-ghost:hover { background: rgba(0,113,227,.14); }
.btn-sm { min-height: 36px; padding: 6px 16px; font-size: .9rem; }
.chip { background: rgba(0,0,0,.05); color: #3A3A3C; border-radius: 980px; font-size: .78rem; padding: 3px 11px; }
.chip.ok { background: var(--ok-sub); color: var(--ok); }
.chip.warn { background: #FFF4E5; color: #9A5B00; }
.flash { border-radius: 14px; border: 0; box-shadow: var(--shadow-sm); }
.line-bar { height: 6px; background: rgba(0,0,0,.07); border-radius: 99px; overflow: hidden; }
.line-bar span { background: linear-gradient(90deg, #0071E3, #30B0C7); border-radius: 99px; }
.h-sec { font-size: clamp(1.5rem, 1.2rem + .8vw, 2rem); letter-spacing: -.03em; margin: 64px 0 20px; }
.h-small { font-family: var(--font); font-size: .78rem; font-weight: 600; color: var(--muted); letter-spacing: .01em; text-transform: uppercase; margin-bottom: 10px; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.form input, .form select, .form textarea, input[type=search] { border-radius: 12px; border: 1px solid var(--line-strong); background: #fff; font: inherit; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(0,113,227,.15); outline: 0; }
.table-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 6px 4px; }
.table th { color: var(--muted); font-weight: 600; font-size: .8rem; }
.table td, .table th { border-color: var(--line); }
.mod-list { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 6px 18px; list-style: none; }
.mod-list li + li { border-top: 1px solid var(--line); }
.mod-list li > a, .mod-list li > .row { padding: 14px 4px; display: flex; justify-content: space-between; gap: 1rem; color: var(--ink); }
.mod-list li > a:hover { text-decoration: none; color: var(--primary-ink); }
.stats { border: 0; gap: 14px; }
.stat { background: #fff; border: 0; border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* ---------- Bewegung: ruhig, von selbst, nie am Cursor ---------- */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--spring), transform .7s var(--spring); transition-delay: calc(var(--i, 0) * 70ms); }
.rv.in { opacity: 1; transform: none; }
@keyframes drift { 0% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(4%, -6%, 0) scale(1.08); } 100% { transform: translate3d(0,0,0) scale(1); } }
@keyframes kenburns { from { transform: scale(1.06); } to { transform: scale(1); } }

/* ---------- Übersicht ---------- */
.hello { position: relative; isolation: isolate; overflow: hidden; border-radius: 32px; background: #fff; box-shadow: var(--shadow);
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 380px; }
.hello-text { position: relative; z-index: 1; padding: clamp(28px, 4vw, 56px); display: flex; flex-direction: column; justify-content: center; }
.hello-text::before { content: ""; position: absolute; z-index: -1; inset: -30% 10% 10% -30%;
  background: radial-gradient(closest-side, rgba(0,113,227,.13), transparent 70%), radial-gradient(closest-side at 70% 80%, rgba(48,176,199,.12), transparent 70%);
  animation: drift 28s ease-in-out infinite; }
.hello h1 { font-size: clamp(2.6rem, 1.4rem + 3.6vw, 4.6rem); margin: 0 0 10px; }
.hello .eyebrow-plain { color: var(--muted); font-size: 1.05rem; margin: 0 0 6px; }
.hello-photo { position: relative; margin: 0; min-height: 260px; }
.hello-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: kenburns 14s var(--spring) both; }
.hello-photo figcaption { position: absolute; right: 10px; bottom: 8px; font-size: .7rem; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.hello-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.tiles3 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); margin-top: 18px; }
.tile-quick { display: grid; gap: 4px; padding: 20px 22px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); color: var(--ink);
  transition: transform .35s var(--spring), box-shadow .35s var(--spring); }
.tile-quick:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.tile-quick small { color: var(--muted); font-size: .82rem; }
.tile-quick strong { font-size: 1.15rem; letter-spacing: -.02em; }
.tile-quick .go { color: var(--primary-ink); font-size: .9rem; margin-top: 6px; }
.tile-quick.due { background: linear-gradient(135deg, #FFF8EC, #fff); }

/* Bereichs- und Modulkarten mit Foto */
.photo-cards { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.pcard { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: 28px; background: #fff; box-shadow: var(--shadow-sm);
  color: var(--ink); transition: transform .45s var(--spring), box-shadow .45s var(--spring); min-width: 0; }
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); text-decoration: none; }
.pcard-img { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(135deg, #E8F1FD, #EAF7F9); }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--spring); }
.pcard:hover .pcard-img img { transform: scale(1.04); }
.pcard-img .code-badge { position: absolute; left: 16px; top: 16px; background: rgba(255,255,255,.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: var(--ink); font-weight: 700; font-size: .8rem; padding: 5px 11px; border-radius: 980px; letter-spacing: 0; }
.pcard-body { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 22px; flex: 1; }
.pcard h2, .pcard h3 { font-size: 1.3rem; margin: 0; letter-spacing: -.025em; }
.pcard p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.45; flex: 1; }
.pcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .85rem; color: var(--muted); margin-top: 6px; }
.pcard .line-bar { margin-top: 4px; }
.area-big .pcard-img { aspect-ratio: 16 / 9; }
.area-big h3 { font-size: 1.6rem; }
.area-letter { position: absolute; right: 18px; bottom: 12px; font: 800 4.5rem/1 var(--font-display); color: rgba(255,255,255,.92); letter-spacing: -.05em; text-shadow: 0 4px 24px rgba(0,0,0,.25); }

/* ---------- Kopfbild für Bereich, Modul, Lektion ---------- */
.hero-band { position: relative; overflow: hidden; border-radius: 32px; min-height: clamp(260px, 32vw, 420px); margin: 0 0 36px; display: flex; align-items: flex-end;
  background: linear-gradient(135deg, #0B3D91, #0071E3 55%, #30B0C7); color: #fff; box-shadow: var(--shadow); isolation: isolate; }
.hero-band > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; animation: kenburns 16s var(--spring) both; }
.hero-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,0) 25%, rgba(0,0,0,.62)); }
.hero-band .hero-inner { padding: clamp(24px, 4vw, 48px); max-width: 900px; }
.hero-band h1 { color: #fff; margin: 6px 0 10px; text-shadow: 0 2px 20px rgba(0,0,0,.25); }
.hero-band p { color: rgba(255,255,255,.88); margin: 0; font-size: 1.15rem; max-width: 60ch; }
.hero-band .crumbs, .hero-band .crumbs a { color: rgba(255,255,255,.85); }
.hero-band .chip { background: rgba(255,255,255,.2); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.hero-band .chip.ok { background: rgba(52,199,89,.35); }
.hero-band .chip.warn { background: rgba(255,159,10,.4); }
.hero-band .credit { position: absolute; right: 14px; top: 12px; font-size: .68rem; color: rgba(255,255,255,.8); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.segmented { display: inline-flex; gap: 2px; padding: 3px; background: rgba(0,0,0,.06); border-radius: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.segmented a { padding: 7px 16px; border-radius: 9px; color: #3A3A3C; font-weight: 500; font-size: .9rem; }
.segmented a:hover { text-decoration: none; color: var(--ink); }
.segmented a.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* Lektionsliste */
.lesson-list { gap: 10px; }
.lesson-list li { border: 0; border-radius: 18px; box-shadow: var(--shadow-sm); padding: 16px 18px; transition: transform .3s var(--spring), box-shadow .3s var(--spring); }
.lesson-list li:hover { transform: translateX(3px); box-shadow: var(--shadow); }
.lesson-list .nr { background: var(--primary-sub); color: var(--primary-ink); }
.lesson-list li.done .nr { background: #34C759; color: #fff; }
.lesson-list a strong { color: var(--ink); font-size: 1.05rem; letter-spacing: -.02em; }
.mod-grid { gap: 28px; }
.mod-side .panel { position: relative; }

/* ---------- Lektion ---------- */
.lesson-grid { grid-template-columns: 210px minmax(0, 1fr); gap: 40px; }
.toc { background: #fff; border-radius: 18px; padding: 16px 10px; box-shadow: var(--shadow-sm); }
.toc ol { border: 0; }
.toc a { border-radius: 8px; padding: 6px 10px; color: #3A3A3C; }
.toc a:hover { background: var(--surface); text-decoration: none; }
.lesson-body { max-width: 900px; }
.lesson-body > section, .lesson-body > .goals { background: #fff; border-radius: 26px; box-shadow: var(--shadow-sm); padding: clamp(22px, 3vw, 40px); margin-bottom: 22px; }
.lesson-body h2 { font-size: 1.75rem; letter-spacing: -.03em; margin-top: 0; }
.lesson-body h3 { font-size: 1.3rem; letter-spacing: -.022em; margin-top: 1.6em; }
.lesson-body section > h3:first-child { margin-top: 0; }
.prose p, .prose li { font-size: 1.0625rem; line-height: 1.6; }
.goals { background: linear-gradient(135deg, #EAF3FF, #F2FBFC) !important; }
.goals ul { padding-left: 1.1rem; }
.formel-box, .prose .formel { background: #F5F9FF; border: 0; border-left: 0; border-radius: 18px; padding: 18px 22px; font-size: 1.05rem; box-shadow: inset 0 0 0 1px rgba(0,113,227,.15); }
.prose .hinweis { background: #FFF8EC; border: 0; border-radius: 16px; padding: 14px 18px; }
.example, .exercise, .open-q { border: 0; border-radius: 18px; background: var(--surface); padding: 20px 22px; }
.result-line { background: #fff; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(52,199,89,.35); }
.exercise summary, .open-q summary { color: var(--primary-ink); list-style: none; }
.exercise summary::before, .open-q summary::before { content: "›"; display: inline-block; margin-right: 8px; transition: transform .25s var(--spring); }
details[open] > summary::before { transform: rotate(90deg); }
.prose table { background: #fff; border-radius: 14px; }
.prose th { background: #F5F5F7; }

/* Erklärgrafiken */
.figure { margin: 0 0 22px; background: #fff; border-radius: 26px; box-shadow: var(--shadow-sm); overflow: hidden; }
.figure img { width: 100%; height: auto; background: #fff; padding: clamp(10px, 2vw, 22px); }
.figure figcaption { padding: 0 24px 20px; color: var(--muted); font-size: .92rem; }
.figure-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }

/* Erklärvideos – Zwei-Klick, ohne Vorschaubild vom Anbieter */
.video-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.video { margin: 0; }
.video-consent { position: relative; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 20px; cursor: pointer; overflow: hidden; color: #fff; text-align: left;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding: 18px 20px; font: inherit;
  background: radial-gradient(120% 90% at 85% 0%, #30B0C7 0%, transparent 55%), linear-gradient(135deg, #0B3D91, #0071E3); box-shadow: var(--shadow); transition: transform .35s var(--spring), box-shadow .35s var(--spring); }
.video-consent:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.video-consent svg { position: absolute; left: 50%; top: 42%; translate: -50% -50%; width: 64px; height: 64px; padding: 18px; border-radius: 50%; fill: var(--ink);
  background: rgba(255,255,255,.9); backdrop-filter: blur(10px); box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: scale .3s var(--spring); }
.video-consent:hover svg { scale: 1.08; }
.video-consent strong { font-size: 1rem; line-height: 1.3; letter-spacing: -.015em; }
.video-consent span { font-size: .8rem; opacity: .85; }
.video-consent small { font-size: .7rem; opacity: .7; }
.video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 20px; box-shadow: var(--shadow); }
.video figcaption { font-size: .85rem; color: var(--muted); padding: 10px 4px 0; }
.video figcaption a { font-size: .85rem; }

/* Quiz */
.q { background: #fff; border: 0; border-radius: 20px; box-shadow: var(--shadow-sm); padding: 20px 22px; margin-bottom: 14px; }
.lesson-body .q { background: var(--surface); box-shadow: none; }
.opt { border-radius: 12px; border: 1px solid var(--line-strong); background: #fff; transition: border-color .2s, background-color .2s; }
.opt:hover { border-color: var(--primary); }
.opt:has(input:checked) { border-color: var(--primary); background: var(--primary-sub); }
.opt.is-right { border-color: #34C759; background: var(--ok-sub); }
.opt.is-wrong { border-color: #FF3B30; background: var(--bad-sub); }
.q-nr { background: var(--ink); color: #fff; }
.result { border-radius: 22px; border: 0; box-shadow: var(--shadow); }

/* Rechner */
.calc-list button { border: 0; border-radius: 12px; background: transparent; color: #3A3A3C; }
.calc-list button:hover { background: rgba(0,0,0,.045); }
.calc-list button.active { background: #fff; box-shadow: var(--shadow-sm); color: var(--ink); }
.calc-panel { border-radius: 26px; }

/* Einstieg */
.entry-plain { background: var(--page); }
.login-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr); min-height: 100vh; background: var(--page); }
.login-photo { position: relative; margin: 14px; border-radius: 32px; overflow: hidden; background: linear-gradient(135deg, #0B3D91, #0071E3 60%, #30B0C7); isolation: isolate; }
.login-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; animation: kenburns 18s var(--spring) both; }
.login-photo::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.05) 30%, rgba(0,0,0,.65)); }
.login-photo .login-claim { position: absolute; left: clamp(24px, 4vw, 56px); right: clamp(24px, 4vw, 56px); bottom: clamp(24px, 4vw, 56px); color: #fff; }
.login-claim h1 { color: #fff; font-size: clamp(2.6rem, 1.2rem + 3.6vw, 4.8rem); margin: 0 0 14px; }
.login-claim p { color: rgba(255,255,255,.88); font-size: 1.2rem; max-width: 46ch; margin: 0; }
.login-claim .credit { font-size: .7rem; opacity: .7; margin-top: 18px; }
.login-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 5vw, 72px); gap: 28px; }
.login-panel h2 { font-size: 2rem; margin: 0; }
.login-panel .form { background: #fff; border-radius: 26px; box-shadow: var(--shadow); padding: 28px; display: grid; gap: 14px; }
.login-panel .btn { width: 100%; min-height: 48px; font-size: 1rem; }
.login-areas { display: grid; gap: 10px; list-style: none; padding: 0; margin: 0; }
.login-areas li { display: flex; gap: 12px; align-items: center; font-size: .92rem; color: var(--muted); }
.login-areas strong { color: var(--ink); display: block; }
@media (max-width: 900px) { .login-split { grid-template-columns: 1fr; } .login-photo { min-height: 360px; } }

/* Bereichs-Abzeichen in Apple-Farben */
.area-A { background: linear-gradient(135deg, #0071E3, #409CFF); }
.area-B { background: linear-gradient(135deg, #248A3D, #34C759); }
.area-C { background: linear-gradient(135deg, #C93400, #FF9F0A); }
.area-badge { border-radius: 12px; }

/* Bildnachweise */
.credits-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.credits-grid figure { margin: 0; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-sm); }
.credits-grid img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.credits-grid figcaption { padding: 12px 16px; font-size: .82rem; color: var(--muted); }

@media (max-width: 960px) {
  .hello { grid-template-columns: 1fr; }
  .hello-photo { min-height: 220px; order: -1; }
  .lesson-grid { grid-template-columns: 1fr; }
  .toc { position: static; }
}
@media (max-width: 760px) {
  .main { padding: 20px 16px 90px; }
  .hero-band, .hello { border-radius: 24px; }
  .lesson-body > section { border-radius: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .hello-text::before, .hero-band > img, .hello-photo img, .login-photo img { animation: none; }
  .pcard, .pcard-img img, .tile-quick, .lesson-list li, .video-consent { transition: none; }
}
@media print {
  body, body.app { background: #fff; }
  .lesson-body > section { box-shadow: none; padding: 0; }
  .hero-band { min-height: 0; color: #000; background: none; box-shadow: none; }
  .hero-band > img, .hero-band::after, .video-grid { display: none; }
  .hero-band h1, .hero-band p { color: #000; text-shadow: none; }
}
.hero-band .inline-actions .btn-ghost { background: rgba(255,255,255,.2); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.hero-band .inline-actions .btn-ghost:hover { background: rgba(255,255,255,.32); }
.hero-band .inline-actions { margin-top: 18px; }
.lesson-body > .figure-grid { margin-bottom: 22px; }

/* ---------- Mobilfunk-Bausteine ---------- */
.terms { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); margin: 0; }
.terms > div { background: var(--surface); border-radius: 14px; padding: 12px 14px; }
.terms dt { font-weight: 650; color: var(--ink); }
.terms dd { margin: 4px 0 0; color: #3A3A3C; font-size: .95rem; }
.tree { margin-bottom: 18px; }
.tree h3 { margin-top: 0; }
.tree-steps { list-style: none; counter-reset: st; padding: 0; margin: 0; display: grid; gap: 10px; }
.tree-steps > li { counter-increment: st; position: relative; background: var(--surface); border-radius: 16px; padding: 14px 16px 14px 52px; }
.tree-steps > li::before { content: counter(st); position: absolute; left: 14px; top: 14px; width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff;
  display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.tree-check { margin: 0 0 8px; font-weight: 600; color: var(--ink); }
.tree-branches { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.tree-branches p { margin: 0; background: #fff; border-radius: 12px; padding: 8px 12px; font-size: .92rem; }
.tree-branches span { display: inline-block; font-size: .72rem; font-weight: 700; border-radius: 980px; padding: 1px 8px; margin-right: 8px; }
.tree-branches .ok span { background: var(--ok-sub); color: var(--ok); }
.tree-branches .notok span { background: #FFF4E5; color: #9A5B00; }
.scenario, .cq { background: var(--surface); border-radius: 16px; padding: 14px 18px; margin-bottom: 10px; }
.scenario summary, .cq summary { cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; }
.scenario summary::before, .cq summary::before { content: "›"; display: inline-block; margin-right: 8px; color: var(--primary); transition: transform .25s var(--spring); }
.avoid li::marker { content: "✕  "; color: var(--bad); }
.merke-box { background: linear-gradient(135deg, #FFF8EC, #fff) !important; }
.merke-box li::marker { content: "★  "; color: var(--accent); }
.checklist-print { list-style: none; padding: 0; }
.checklist-print li { padding: 8px 0 8px 32px; position: relative; border-bottom: 1px solid var(--line); }
.checklist-print li::before { content: ""; position: absolute; left: 0; top: 10px; width: 18px; height: 18px; border: 2px solid var(--line-strong); border-radius: 6px; }
.facts-table td { vertical-align: top; }
.fact-pruefen td { background: #FFFBF2; }
.fact-abgelaufen td { background: #FFF1F2; color: var(--muted); }
.chip.bad { background: var(--bad-sub); color: var(--bad); }
.glossary { margin: 0; columns: 2 420px; column-gap: 40px; }
.gl-letter { font-size: 1.4rem; margin: 20px 0 8px; break-after: avoid; color: var(--primary); }
.gl-item { break-inside: avoid; padding: 8px 0; border-bottom: 1px solid var(--line); }
.gl-item dt { font-weight: 650; }
.gl-item dd { margin: 2px 0 0; color: #3A3A3C; font-size: .95rem; }
.bigsearch { display: flex; flex-wrap: wrap; gap: 8px; }
.bigsearch input[type=search] { flex: 1 1 280px; }
.bigsearch select { border-radius: 12px; border: 1px solid var(--line-strong); padding: 0 10px; min-height: 44px; background: #fff; }
@media print { #checkliste .btn { display: none; } .checklist-print li::before { border-color: #000; } }

/* ---------- Berichtsheft: Erfassungsstand Mo–Sa ---------- */
.day-overview p { margin: 0 0 12px; }
.day-overview .gap { color: var(--bad); font-weight: 600; }
.day-dots { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.day-dots a { display: grid; gap: 2px; text-align: center; padding: 10px 6px; border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none; }
.day-dots span { font-weight: 700; }
.day-dots small { color: var(--muted); font-size: .75rem; }
.day-dots em { font-style: normal; font-size: .72rem; }
.day-dots .st-erfasst a { background: var(--ok-sub); }
.day-dots .st-erfasst em { color: var(--ok); }
.day-dots .st-fehlt a { background: var(--bad-sub); box-shadow: inset 0 0 0 1.5px rgba(215,0,21,.35); }
.day-dots .st-fehlt em { color: var(--bad); font-weight: 700; }
.day.st-fehlt { box-shadow: inset 0 0 0 2px rgba(215,0,21,.35); }
.day.st-erfasst { box-shadow: inset 0 0 0 2px rgba(52,199,89,.35); }
.day-state { display: block; font-style: normal; font-size: .75rem; color: var(--muted); }
.st-fehlt .day-state { color: var(--bad); font-weight: 700; }
.st-erfasst .day-state { color: var(--ok); }
.day-leer .day-body { opacity: .85; }
@media (max-width: 640px) { .day-dots { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Probeprüfung */
.sim-card .btn { margin-top: 10px; align-self: flex-start; }
.sim-result { margin: 18px 0; }
.sim-grade { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.sim-grade .grade { font: 800 2.6rem/1 var(--font-display); letter-spacing: -.03em; color: var(--primary); }
.sim-grade strong { font-size: 1.3rem; }
.sim-grade small { color: var(--muted); }
/* Unterweisungen / Ausbildungsplan */
.brief-card.st-faellig, .brief-card.st-offen { box-shadow: inset 0 0 0 2px rgba(215,0,21,.25), var(--shadow-sm); }
.plan-items { list-style: none; padding: 0; margin: 8px 0 0; }
.plan-items li { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.plan-items li.done .pl-text { color: var(--muted); }
.plan-items .ok { color: var(--ok); }
.pl-form { display: flex; gap: 6px; align-items: center; }
.pl-form input { max-width: 160px; min-height: 36px; border-radius: 10px; border: 1px solid var(--line-strong); padding: 0 8px; }
@media (max-width: 700px) { .plan-items li { grid-template-columns: 24px minmax(0,1fr); } .pl-form { grid-column: 2; } }
.gl-tr { display: inline-block; margin-left: 8px; font-weight: 500; color: var(--primary-ink); background: var(--primary-sub); border-radius: 8px; padding: 0 8px; unicode-bidi: isolate; }
.area-M { background: linear-gradient(135deg, #0071E3, #30B0C7); }
.area-V { background: linear-gradient(135deg, #AF52DE, #FF2D55); }
.area-S { background: linear-gradient(135deg, #5856D6, #0A84FF); }
.area-I { background: linear-gradient(135deg, #1D1D1F, #636366); }
.area-P { background: linear-gradient(135deg, #30B0C7, #34C759); }

/* ---------- Handy & Tablet (überschreibt die Desktop-Werte dieser Datei) ---------- */
h1, h2, h3 { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .topbar { height: 56px; padding: 0 12px; gap: 8px; }
  .brand span { display: block; }
  .brand small { display: none; }
  .sidebar { position: fixed; z-index: 25; top: 56px; left: 0; width: min(320px, 86vw); height: calc(100dvh - 56px);
    background: #F5F5F7; padding: 16px 12px 32px; box-shadow: 24px 0 60px -24px rgba(0,0,0,.35); overflow-y: auto; -webkit-overflow-scrolling: touch; }
  body.menu-open::after { inset: 56px 0 0; }
  .main { max-width: none; width: auto; margin: 0; padding: 18px 14px 96px; }
  h1 { font-size: clamp(1.85rem, 1.2rem + 3.4vw, 2.6rem); }
  .h-sec { margin: 40px 0 14px; font-size: 1.45rem; }
  .hello { grid-template-columns: minmax(0, 1fr); border-radius: 24px; min-height: 0; }
  .hello-photo { order: -1; min-height: 190px; }
  .hello-text { padding: 22px 20px 24px; }
  .hello h1 { font-size: clamp(2rem, 1.3rem + 4vw, 2.8rem); }
  .hello-actions .btn { flex: 1 1 100%; }
  .hero-band { min-height: 0; border-radius: 22px; margin-bottom: 22px; }
  .hero-band .hero-inner { padding: 72px 18px 20px; max-width: none; }
  .hero-band h1 { font-size: clamp(1.7rem, 1.1rem + 4vw, 2.4rem); }
  .hero-band p { font-size: 1rem; }
  .hero-band .credit { display: none; }
  .photo-cards { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .area-big .pcard-img { aspect-ratio: 16 / 8; }
  .tiles3 { grid-template-columns: minmax(0, 1fr); }
  .lesson-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .toc { position: static; padding: 12px; }
  .toc ol { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .toc li { flex: none; }
  .lesson-body > section, .lesson-body > .goals { padding: 20px 16px; border-radius: 20px; }
  .prose p, .prose li { font-size: 1rem; }
  .mod-grid { grid-template-columns: minmax(0, 1fr); }
  .segmented { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .segmented a { flex: none; }
  .head-row { flex-wrap: wrap; gap: 10px; }
  .row-btns .btn, .done-row .btn { flex: 1 1 auto; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .calc-app { grid-template-columns: minmax(0, 1fr); }
  .calc-list { display: flex; overflow-x: auto; gap: 6px; }
  .calc-list button { flex: none; }
  .day header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .day-type { display: flex; flex-wrap: wrap; gap: 6px; }
  .day-body { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .q { padding: 16px 14px; }
  .opt { padding: 12px; min-height: 48px; }
  .login-split { grid-template-columns: minmax(0, 1fr); }
  .login-photo { margin: 10px; min-height: 300px; border-radius: 24px; }
  .login-claim h1 { font-size: clamp(2rem, 1.2rem + 5vw, 2.8rem); }
  .login-panel { padding: 22px 16px 40px; }
}
@media (max-width: 420px) {
  .stats { grid-template-columns: minmax(0, 1fr); }
  .hero-band .hero-meta .chip:nth-child(n+3) { display: none; }
}
