/* ==========================================================================
   IT-Sicherheitstraining – Stylesheet (ohne externe Schriften/CDNs, DSGVO-freundlich)
   ========================================================================== */
:root {
  --navy: #123a63; --navy-2: #0d2c4c; --blue: #1f6fd1; --blue-600: #185bb0; --blue-50: #eaf2fd; --blue-100: #d4e5fb;
  --ink: #1c2733; --ink-2: #3b4a5a; --muted: #5b6b7c; --line: #dde4ee; --line-2: #eef2f7;
  --bg: #f4f7fb; --card: #ffffff;
  --ok: #1a8a5a; --ok-bg: #e3f6ed; --warn: #b26b00; --warn-bg: #fff3dc; --bad: #c93636; --bad-bg: #fde8e8; --info: #2563b8; --info-bg: #e6f0fc;
  --gold: #e8aa28;
  --radius: 14px; --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(18,58,99,.06), 0 4px 16px rgba(18,58,99,.06);
  --shadow-lg: 0 10px 40px rgba(18,58,99,.14);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; color: var(--navy); }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
code { background: var(--line-2); border-radius: 5px; padding: .1em .35em; font-size: .9em; }
img, svg { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.block { display: block; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.text-bad { color: var(--bad) !important; }
.text-warn { color: var(--warn) !important; }
.text-ok { color: var(--ok) !important; }
:focus-visible { outline: 3px solid #8ab8f5; outline-offset: 2px; border-radius: 4px; }

/* ---------- Kopfzeile ---------- */
.topbar { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.topbar-inner { max-width: 1280px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.mainnav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.mainnav::-webkit-scrollbar { display: none; }
.mainnav a { color: #cfe0f5; padding: 8px 12px; border-radius: 8px; font-size: .95rem; white-space: nowrap; }
.mainnav a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.mainnav a.active { background: rgba(255,255,255,.14); color: #fff; font-weight: 600; }
.usermenu { display: flex; align-items: center; gap: 10px; }
.userchip { display: flex; align-items: center; gap: 10px; color: #fff; padding: 4px 8px; border-radius: 10px; }
.userchip:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.userchip-text { display: flex; flex-direction: column; line-height: 1.2; }
.userchip-text strong { font-size: .9rem; }
.userchip-text small { color: #a9c3e2; font-size: .75rem; }
.usermenu .btn-ghost { color: #dbe8f7; border-color: rgba(255,255,255,.25); }
.usermenu .btn-ghost:hover { background: rgba(255,255,255,.1); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #3d8bf0, #1f6fd1); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; flex-shrink: 0; }
.avatar-sm { width: 32px; height: 32px; font-size: .78rem; }

/* ---------- Layout ---------- */
main { flex: 1; }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 28px 20px 40px; }
.container.wide { max-width: 1400px; }
.footer { display: flex; gap: 12px 28px; justify-content: space-between; align-items: center; flex-wrap: wrap; padding: 14px max(20px, calc((100% - 1240px) / 2)); font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); background: #fff; }
.footer a { color: var(--muted); }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; }
.footer-brand:hover { text-decoration: none; }
.footer-brand small { font-size: .78rem; }
.footer-brand img { display: block; height: 34px; width: auto; }
.footer-links { display: flex; gap: 6px 18px; flex-wrap: wrap; align-items: center; }
.footer-version { font-variant-numeric: tabular-nums; padding: 2px 9px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); font-size: .78rem; }
@media (max-width: 560px) { .footer { justify-content: center; text-align: center; } .footer-links { justify-content: center; } }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin-bottom: 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-head p { margin: 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.page-actions form { margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; font-weight: 700; color: var(--blue); margin: 0 0 4px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.grid-2 > .card, .grid-3 > .card { margin-bottom: 0; }

/* ---------- Karten ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 20px; border: 1px solid var(--line-2); }
.card.narrow { max-width: 620px; margin-left: auto; margin-right: auto; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.card-accent { background: linear-gradient(135deg, #123a63, #1f5fa8); color: #fff; border: 0; }
.card-accent h2 { color: #fff; }
.card-ok { border-left: 5px solid var(--ok); }
.card-warn { border-left: 5px solid var(--warn); }
.danger-card h2 { color: var(--bad); }
.danger-actions { display: flex; flex-direction: column; gap: 14px; }
.danger-actions form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.danger-zone { border: 1px dashed #f1b4b4; border-radius: var(--radius-sm); padding: 10px 14px; background: #fffafa; }
.danger-zone summary { cursor: pointer; color: var(--bad); font-weight: 600; }
.danger-zone form { margin-top: 10px; }
.errorbox { padding: 48px 24px; }
.error-code { font-size: 4rem; font-weight: 800; color: var(--blue-100); line-height: 1; margin-bottom: 8px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .1s, box-shadow .15s; line-height: 1.2; }
.btn:hover { background: var(--line-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 2px 8px rgba(31,111,209,.25); }
.btn-primary:hover { background: var(--blue-600); border-color: var(--blue-600); }
.btn-ghost { background: transparent; }
.btn-link { background: none; border: 0; color: var(--blue); padding: 6px 4px; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { background: #a92c2c; }
.btn-ok { background: var(--ok-bg); border-color: #a6dfc4; color: var(--ok); }
.btn-ok:hover { background: #cdeedd; }
.btn-bad { background: var(--bad-bg); border-color: #f3b9b9; color: var(--bad); }
.btn-bad:hover { background: #fbd6d6; }
.btn-sm { padding: 6px 11px; font-size: .85rem; border-radius: 8px; }
.btn-lg { padding: 13px 24px; font-size: 1.05rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 8px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--navy); cursor: pointer; font-size: 1.2rem; }
.icon-btn:hover { background: var(--blue-50); text-decoration: none; }
.icon-btn-lg { width: 46px; height: 46px; border-radius: 50%; background: var(--blue); color: #fff; border-color: var(--blue); }
.icon-btn-lg:hover { background: var(--blue-600); }

/* ---------- Hinweise ---------- */
.flashes { max-width: 1280px; margin: 0 auto 18px; display: flex; flex-direction: column; gap: 8px; }
.bare-main .flashes { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); width: min(560px, calc(100% - 32px)); z-index: 60; }
.flash { padding: 12px 16px; border-radius: 10px; font-weight: 500; border: 1px solid transparent; transition: opacity .6s; }
.flash.fade { opacity: 0; pointer-events: none; }
.flash-ok { background: var(--ok-bg); color: #0f5e3c; border-color: #b6e4cd; }
.flash-error { background: var(--bad-bg); color: #8e1f1f; border-color: #f5c2c2; }
.flash-warn { background: var(--warn-bg); color: #7a4a00; border-color: #f4d79b; }
.hint { background: var(--blue-50); border-radius: 10px; padding: 12px 14px; font-size: .9rem; color: var(--ink-2); margin: 14px 0; }
.hint-tip { background: #f1f8f4; }
.hint-warn { background: var(--warn-bg); }
.tag { display: inline-block; font-size: .72rem; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); vertical-align: middle; }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-muted { background: var(--line-2); color: var(--muted); }

/* ---------- Formulare ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9rem; color: var(--ink-2); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input:not([type]), select, textarea {
  font: inherit; font-size: 1rem; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); width: 100%; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(31,111,209,.12); outline: none; }
textarea { resize: vertical; }
.form-row { display: flex; gap: 14px; flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.form-row > label { flex: 1 1 160px; }
.form-row > label.grow { flex: 2 1 240px; }
.form-row-center { align-items: center; justify-content: space-between; }
.form-row-center > label.check { flex: 1 1 320px; }
.form .check, label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; font-size: .9rem; }
.check input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--blue); }
.inline-form { flex-direction: row; flex-wrap: wrap; align-items: center; }
.inline-form input { max-width: 220px; }
.input-code { font-size: 1.4rem !important; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; max-width: 220px; }
.kv { display: flex; justify-content: space-between; gap: 10px; background: var(--line-2); border-radius: 10px; padding: 10px 14px; margin: 14px 0; font-size: .92rem; }
.kv span { color: var(--muted); }
.pwmeter { margin-top: -6px; }
.pwmeter-bar { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.pwmeter-bar span { display: block; height: 100%; width: 0; background: var(--bad); transition: width .25s, background .25s; }
.pwmeter-bar span.mid { background: var(--gold); }
.pwmeter-bar span.strong { background: var(--ok); }
.pwmeter-text { color: var(--muted); font-size: .8rem; }
.dropzone { border: 2px dashed var(--blue-100); background: var(--blue-50); border-radius: 12px; padding: 26px; text-align: center; cursor: pointer; }
.dropzone input { margin: 0 auto 8px; border: 0; background: transparent; }
.code { background: #0f1c2b; color: #cde3ff; padding: 14px 16px; border-radius: 10px; overflow-x: auto; font-size: .88rem; }
.secret-box { display: grid; gap: 8px; background: var(--line-2); border-radius: 10px; padding: 12px 14px; margin: 10px 0; }
.secret-box small { display: block; color: var(--muted); font-size: .75rem; }
.secret { font-size: 1.1rem; letter-spacing: .08em; cursor: copy; background: #fff; display: inline-block; padding: 4px 8px; }
.secret.copied { background: var(--ok-bg); }
.qr-box { display: block; width: fit-content; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; margin: 10px 0; }
.qr-box .qr { display: block; width: 220px; height: 220px; max-width: 100%; }
.qr-manual { margin: 6px 0 4px; font-size: .92rem; }
.qr-manual summary { cursor: pointer; color: var(--blue); }
.steps { padding-left: 20px; }
.steps li { margin-bottom: 10px; }
.list { padding-left: 20px; }
.list li { margin-bottom: 6px; }

/* ---------- Anmeldeseiten ---------- */
.bare-main { display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.auth { display: grid; grid-template-columns: 1fr 1fr; max-width: 980px; width: 100%; background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden; }
.auth-side { background: radial-gradient(circle at 20% 10%, #1f5fa8 0, #123a63 55%, #0d2c4c 100%); color: #fff; padding: 36px; display: flex; flex-direction: column; gap: 14px; }
.auth-side h2 { color: #fff; font-size: 1.45rem; margin: 6px 0 0; }
.auth-illu { width: 100%; max-width: 360px; height: auto; align-self: center; margin: 8px 0; }
.auth-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: #d6e6f8; }
.auth-points li::before { content: "✓"; color: #7cd6a8; font-weight: 800; margin-right: 10px; }
.auth-form { padding: 44px 40px; display: flex; flex-direction: column; justify-content: center; }
.auth-form h1 { font-size: 1.6rem; }
.auth-form .small { margin-top: 14px; }

/* ---------- KPIs, Fortschritt ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { background: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); border: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 4px; }
.kpi small { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.kpi strong { font-size: 1.9rem; line-height: 1.1; color: var(--navy); font-variant-numeric: tabular-nums; }
.kpi strong.kpi-sm { font-size: 1.15rem; }
.kpi .muted { font-size: .85rem; }
.progress { height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; margin-top: 4px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, #3d8bf0, var(--blue)); border-radius: 4px; transition: width .5s ease; }
.progress-sm { height: 6px; width: 90px; display: inline-block; vertical-align: middle; margin: 0 8px 0 0; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; margin: 0 -8px; padding: 0 8px; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 10px 10px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:hover { background: #fafcff; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions form { display: inline; }
.table-compact td, .table-compact th { padding: 7px 8px; }
.col-progress { white-space: nowrap; }
.col-progress small { color: var(--muted); }
.row-muted td { opacity: .55; }
.person { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.person:hover { text-decoration: none; }
.person:hover strong { color: var(--blue); }
.person small { display: block; color: var(--muted); font-size: .8rem; }
.filterbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filterbar input[type=search] { max-width: 280px; padding: 8px 12px; }
.filterbar select { max-width: 220px; padding: 8px 12px; }
.empty { text-align: center; padding: 30px 10px; color: var(--muted); }
.seg { display: flex; gap: 4px; align-items: center; color: var(--muted); }
.seg a { padding: 4px 10px; border-radius: 999px; color: var(--ink-2); }
.seg a.active { background: var(--blue-50); color: var(--blue); font-weight: 600; }
.weaklist { list-style: none; padding: 0; margin: 0; }
.weaklist li { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: .92rem; }
.weak-rate { white-space: nowrap; text-align: right; }
.weak-rate strong { color: var(--bad); }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.check-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); }
.checklist li.is-done .check-dot { background: var(--ok); border-color: var(--ok); box-shadow: inset 0 0 0 3px #fff; }
.invite-card { border: 2px solid var(--blue-100); }

/* ---------- Säulendiagramm ---------- */
.barchart { position: relative; height: 220px; padding: 8px 0 26px 30px; }
.barchart-grid { position: absolute; inset: 8px 0 26px 30px; display: flex; flex-direction: column; justify-content: space-between; }
.barchart-grid span { border-top: 1px solid var(--line-2); position: relative; height: 0; }
.barchart-grid span::before { content: attr(data-v); position: absolute; left: -30px; top: -9px; font-size: .72rem; color: var(--muted); width: 24px; text-align: right; }
.barchart-bars { position: relative; height: 100%; display: flex; align-items: flex-end; gap: 2px; }
.bar-col { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; position: relative; cursor: default; outline: none; }
.bar { width: min(28px, 70%); background: var(--blue); border-radius: 4px 4px 0 0; min-height: 0; transition: background .15s; }
.bar-col:hover .bar, .bar-col:focus .bar { background: var(--navy); }
.bar-label { position: absolute; bottom: -22px; font-size: .68rem; color: var(--muted); white-space: nowrap; }
.bar-tip { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: .78rem; padding: 6px 9px; border-radius: 7px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s; z-index: 2; text-align: center; line-height: 1.35; }
.bar-col:hover .bar-tip, .bar-col:focus .bar-tip { opacity: 1; bottom: 60%; }

/* ---------- Zertifikat prüfen ---------- */
.verify { padding: 36px 28px; margin-top: 40px; }
.verify-ok { background: var(--ok-bg); color: #0f5e3c; padding: 16px; border-radius: 12px; margin-top: 14px; }
.verify-bad { background: var(--bad-bg); color: #8e1f1f; padding: 16px; border-radius: 12px; margin-top: 14px; }

/* ==========================================================================
   Training
   ========================================================================== */
.trainer { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 22px; align-items: start; }
.trainer-nav { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 14px; position: sticky; top: 76px; border: 1px solid var(--line-2); }
.trainer-nav-head { padding: 0 6px 14px; border-bottom: 1px solid var(--line-2); margin-bottom: 10px; }
.trainer-nav-head small { display: block; margin-top: 6px; font-size: .8rem; }
.chapter-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.chapter button { width: 100%; display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 8px 8px; border-radius: 10px; cursor: pointer; font: inherit; text-align: left; color: var(--ink); }
.chapter button:hover:not(:disabled) { background: var(--blue-50); }
.chapter-ico { width: 32px; height: 32px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: var(--line-2); color: var(--navy); flex-shrink: 0; }
.chapter-title { display: flex; flex-direction: column; font-size: .9rem; font-weight: 600; line-height: 1.25; }
.chapter-title small { font-weight: 400; color: var(--muted); font-size: .75rem; }
.chapter.is-current button { background: var(--blue-50); }
.chapter.is-current .chapter-ico { background: var(--blue); color: #fff; }
.chapter.is-done .chapter-ico { background: var(--ok-bg); color: var(--ok); }
.chapter.is-locked button { opacity: .5; cursor: not-allowed; }
.trainer-tools { margin-top: 14px; padding: 12px 6px 0; border-top: 1px solid var(--line-2); }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: .9rem; font-weight: 600; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 11px; background: var(--line); position: relative; cursor: pointer; transition: background .2s; flex-shrink: 0; }
.switch input::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked { background: var(--blue); }
.switch input:checked::after { left: 19px; }

.trainer-stage { background: #fff; border-radius: 18px; box-shadow: var(--shadow); border: 1px solid var(--line-2); min-height: 600px; display: flex; flex-direction: column; overflow: hidden; scroll-margin-top: 80px; }
.stage-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 26px; border-bottom: 1px solid var(--line-2); min-height: 52px; }
.stage-crumb { font-size: .88rem; color: var(--muted); }
.stage-crumb strong { color: var(--navy); }
.slide-dots { display: flex; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: inline-block; transition: all .2s; }
.dot.is-past { background: var(--blue-100); }
.dot.is-current { background: var(--blue); width: 22px; border-radius: 5px; }
.stage-body { padding: 28px 34px; flex: 1; }
.stage-enter { animation: stageIn .35s ease; }
@keyframes stageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.stage-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 26px; border-top: 1px solid var(--line-2); background: #fbfcfe; }
.stage-hint { font-size: .86rem; color: var(--muted); text-align: center; flex: 1; }
#btn-next.is-locked { opacity: .55; box-shadow: none; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* Übersicht */
.home-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: center; background: linear-gradient(135deg, #f0f6ff, #fff); border-radius: 16px; padding: 26px 28px; border: 1px solid var(--blue-50); }
.home-hero h1 { font-size: 2rem; }
.home-hero.is-complete { background: linear-gradient(135deg, #e9f8f0, #fff); border-color: #cdeedd; }
.home-hero-art .art { width: 100%; height: auto; }
.home-sub { margin: 28px 0 12px; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.home-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; text-align: left; font: inherit; color: var(--ink); transition: border-color .15s, transform .15s, box-shadow .15s; }
.home-card:hover:not(:disabled) { border-color: var(--blue); transform: translateY(-2px); box-shadow: var(--shadow); }
.home-card strong { font-size: .98rem; line-height: 1.3; }
.home-card small { color: var(--muted); }
.home-card-num { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; margin-top: 6px; }
.home-card-ico { width: 40px; height: 40px; border-radius: 11px; background: var(--blue-50); color: var(--blue); display: inline-flex; align-items: center; justify-content: center; }
.home-card.is-done { border-color: #b6e4cd; background: #f7fcf9; }
.home-card.is-done .home-card-ico { background: var(--ok-bg); color: var(--ok); }
.home-card.is-locked { opacity: .55; cursor: not-allowed; }

/* Folien allgemein */
.slide h2 { font-size: 1.5rem; margin-bottom: 10px; }
.lead { font-size: 1.05rem; color: var(--ink-2); max-width: 820px; }
.art { display: block; width: 100%; height: auto; }
.tip { background: #fffbea; border-left: 4px solid var(--gold); padding: 10px 14px; border-radius: 0 10px 10px 0; font-size: .92rem; margin-top: 16px; }
.slide-story { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 32px; align-items: center; }
.slide-art { background: linear-gradient(180deg, #f6f9fd, #fff); border-radius: 18px; padding: 10px; }
.slide-text { font-size: 1.05rem; }
.slide-text ul { padding-left: 20px; }
.slide-text li { margin-bottom: 8px; }
.urlbox { font-family: Consolas, "Courier New", monospace; background: #f1f5f9; padding: 12px 14px; border-radius: 10px; font-size: .98rem; word-break: break-all; }
.urlbox mark { background: var(--bad-bg); color: var(--bad); font-weight: 700; padding: 1px 3px; border-radius: 4px; }

/* Clip */
.clip { max-width: 640px; margin: 6px auto 0; background: #0f2439; border-radius: 18px; padding: 14px; box-shadow: var(--shadow-lg); }
.clip-bars { display: flex; gap: 5px; margin-bottom: 12px; }
.clip-bar { flex: 1; height: 5px; padding: 0; border: 0; border-radius: 3px; background: rgba(255,255,255,.22); cursor: pointer; overflow: hidden; }
.clip-bar span { display: block; height: 100%; width: 0; background: #fff; }
.clip-bar.is-past span { width: 100%; }
.clip-bar.is-current span { animation: barFill linear forwards; }
@keyframes barFill { from { width: 0; } to { width: 100%; } }
.clip-screen { background: #fff; border-radius: 12px; overflow: hidden; aspect-ratio: 400 / 260; }
.clip-art .art { width: 100%; height: 100%; }
.clip-caption { color: #fff; font-size: 1.12rem; line-height: 1.5; min-height: 4.6em; margin: 14px 6px 8px; }
.cap-in { animation: capIn .5s ease; }
@keyframes capIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.clip-controls { display: flex; align-items: center; gap: 8px; justify-content: center; }
.clip-controls .icon-btn:not(.icon-btn-lg) { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }
.clip-count { color: #9db6d2; font-size: .85rem; margin-left: 8px; font-variant-numeric: tabular-nums; }
.clip.is-paused .art * { animation-play-state: paused !important; }

/* E-Mail-Detektiv */
.mail-wrap, .scene-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.mailmock { border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); overflow: hidden; position: relative; font-family: "Segoe UI", Arial, sans-serif; }
.mm-bar { display: flex; justify-content: space-between; padding: 8px 14px; background: #f1f5f9; font-size: .8rem; color: var(--muted); }
.mm-head { padding: 14px 18px 10px; border-bottom: 1px solid var(--line-2); position: relative; }
.mm-subject { font-size: 1.12rem; color: var(--ink); margin: 0 0 10px; }
.mm-from { display: flex; gap: 10px; align-items: center; font-size: .9rem; }
.mm-from small { display: block; color: var(--muted); }
.mm-addr { color: var(--muted); }
.mm-body { padding: 18px 22px 26px; font-size: .95rem; position: relative; }
.mm-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #4b5563; margin-bottom: 14px; }
.mm-logo { background: #0b6cbd; color: #fff; font-weight: 800; padding: 4px 8px; border-radius: 4px; font-size: .8rem; }
.mm-btn { display: inline-block; background: #0b6cbd; color: #fff !important; padding: 10px 20px; border-radius: 4px; font-weight: 600; text-decoration: none !important; }
.mm-sig { color: var(--muted); font-size: .88rem; }
.mm-status { position: absolute; left: 0; bottom: 0; background: #e5e7eb; border: 1px solid #cbd5e1; font-size: .78rem; padding: 3px 8px; border-top-right-radius: 6px; opacity: 0; transition: opacity .1s; font-family: Consolas, monospace; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-status.show { opacity: 1; }
[data-hs] { cursor: pointer; border-radius: 4px; transition: background .15s, box-shadow .15s; position: relative; }
.mailmock [data-hs]:hover { background: #fff7d6; box-shadow: 0 0 0 3px #fff7d6; }
.mailmock .mm-btn[data-hs]:hover { background: #0a5ea6; }
.hs-found { background: #ffe8e8 !important; box-shadow: 0 0 0 2px var(--bad) !important; }
.mm-btn.hs-found { background: #0b6cbd !important; box-shadow: 0 0 0 3px var(--bad) !important; }
.hs-num { position: absolute; top: -11px; left: -11px; width: 22px; height: 22px; border-radius: 50%; background: var(--bad); color: #fff; font-size: .75rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; z-index: 2; animation: pop .3s; box-shadow: 0 0 0 2px #fff; }
.hs-panel { background: #f8fafc; border-radius: 12px; padding: 14px; border: 1px solid var(--line-2); position: sticky; top: 90px; }
.hs-count { font-size: .92rem; margin-bottom: 8px; }
.hs-count strong { font-size: 1.4rem; color: var(--bad); }
.hs-list { padding-left: 20px; margin: 0 0 10px; display: flex; flex-direction: column; gap: 10px; }
.hs-item { font-size: .88rem; animation: capIn .35s ease; }
.hs-item strong { display: block; color: var(--ink); }
.hs-item span { color: var(--ink-2); }
.miss { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 2px solid var(--gray, #94a3b8); animation: miss .6s ease-out forwards; pointer-events: none; }
@keyframes miss { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }

/* Echt oder Fälschung */
.sort-progress { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.sort-progress .muted { margin-left: 8px; }
.sort-card-wrap { max-width: 640px; }
.sort-card { animation: stageIn .3s; }
.sc { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow); }
.sc-label { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.sc-from { font-size: .9rem; color: var(--ink-2); }
.sc-subj { font-weight: 700; margin: 4px 0 8px; }
.sc p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.sc-attach { display: inline-block; margin-top: 10px; background: var(--line-2); padding: 4px 10px; border-radius: 6px; font-size: .85rem; }
.sms-bubble { background: #e9e9eb; border-radius: 18px 18px 18px 4px; padding: 10px 14px; max-width: 420px; font-size: .95rem; }
.urlbar { font-family: Consolas, monospace; background: #f1f5f9; border-radius: 999px; padding: 10px 16px; font-size: .95rem; word-break: break-all; }
.sort-actions { display: flex; gap: 10px; margin-top: 14px; }
.sort-actions .btn { flex: 1; padding: 12px; }
.sort-actions .btn:disabled { opacity: .45; }
.sort-actions .btn.is-answer { opacity: 1; box-shadow: 0 0 0 3px currentColor inset; }
.sort-feedback, .chat-feedback, .q-feedback { margin-top: 14px; padding: 12px 14px; border-radius: 10px; font-size: .95rem; animation: capIn .3s; }
.sort-feedback:empty, .chat-feedback:empty, .q-feedback:empty { display: none; }
.sort-feedback .btn { margin-top: 10px; }
.fb-ok { background: var(--ok-bg); color: #0f4d33; }
.fb-bad { background: var(--bad-bg); color: #7d1d1d; }
.sort-done { text-align: center; padding: 30px; background: var(--ok-bg); border-radius: 14px; color: var(--ok); }
.sort-done h3 { color: var(--ink); margin-top: 8px; }
.sort-done p { color: var(--ink-2); }

/* Chat / Telefon / Handy */
.chat-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 28px; align-items: start; }
.device { width: 100%; max-width: 330px; border-radius: 34px; background: #111827; padding: 12px; box-shadow: var(--shadow-lg); }
.device-chat .chat-head, .device-chat .chat-body { background: #efeae2; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px; border-radius: 24px 24px 0 0; background: #075e54 !important; color: #fff; }
.chat-head small { display: block; opacity: .8; font-size: .75rem; }
.chat-head .avatar { background: #cbd5e1; color: #334155; }
.chat-body { height: 400px; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; border-radius: 0 0 24px 24px; }
.msg { max-width: 85%; padding: 8px 11px 6px; border-radius: 10px; font-size: .9rem; line-height: 1.4; animation: msgIn .25s ease; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.msg small { display: block; text-align: right; font-size: .66rem; color: #6b7280; margin-top: 2px; }
.msg-them { background: #fff; align-self: flex-start; border-top-left-radius: 2px; }
.msg-me { background: #d9fdd3; align-self: flex-end; border-top-right-radius: 2px; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.typing { display: flex; gap: 4px; padding: 12px 14px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: #9ca3af; animation: blink 1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
.device-call { background: linear-gradient(180deg, #1e3a5f, #0b1626); }
.device-call .chat-body { background: transparent; height: 330px; }
.device-call .msg-them { background: rgba(255,255,255,.12); color: #fff; }
.call-head { text-align: center; color: #fff; padding: 22px 10px 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.call-avatar { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: center; margin-bottom: 8px; animation: pulseRing 1.8s infinite; }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 rgba(124,214,168,.5); } 70% { box-shadow: 0 0 0 16px rgba(124,214,168,0); } 100% { box-shadow: 0 0 0 0 rgba(124,214,168,0); } }
.call-head small { color: #a9c3e2; }
.call-timer { color: #7cd6a8; font-variant-numeric: tabular-nums; font-size: .85rem; margin-top: 4px; }
.chat-decide { animation: capIn .4s; }
.choice-list { display: flex; flex-direction: column; gap: 10px; }
.choice { text-align: left; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font: inherit; font-size: .98rem; cursor: pointer; transition: border-color .15s, background .15s; color: var(--ink); }
.choice:hover:not(:disabled) { border-color: var(--blue); background: var(--blue-50); }
.choice.is-good { border-color: var(--ok); background: var(--ok-bg); }
.choice.is-bad { border-color: var(--bad); background: var(--bad-bg); }
.choice:disabled:not(.is-good) { opacity: .55; }

/* MFA-Sperrbildschirm */
.device-lock { background: linear-gradient(160deg, #1d2b64, #4a2c6e 60%, #0f172a); min-height: 520px; color: #fff; text-align: center; padding: 34px 14px; }
.lock-time { font-size: 3.6rem; font-weight: 300; line-height: 1; }
.lock-date { opacity: .8; margin-bottom: 40px; }
.push { background: rgba(255,255,255,.92); color: var(--ink); text-align: left; border-radius: 18px; padding: 14px; animation: pushIn .6s cubic-bezier(.2,1.3,.4,1) .4s both; transition: transform .3s, opacity .3s; }
@keyframes pushIn { from { transform: translateY(-30px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
.push-head { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); margin-bottom: 6px; }
.push-head small { margin-left: auto; }
.push p { font-size: .86rem; margin: 6px 0 12px; color: var(--ink-2); }
.push-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.push-btn { padding: 10px; border-radius: 10px; border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.push-approve { background: #e5e7eb; color: var(--ink); }
.push-deny { background: var(--bad); color: #fff; }
.push-denied { outline: 3px solid var(--ok); }
.push-approved { outline: 3px solid var(--bad); }

/* Passwort-Labor */
.pwlab { max-width: 720px; background: #f8fafc; border-radius: 16px; padding: 22px; border: 1px solid var(--line-2); }
.pwlab-input input { font-size: 1.3rem; padding: 14px 16px; font-family: Consolas, monospace; }
.pwlab-meter { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; margin: 16px 0 8px; }
.pwlab-bar { height: 14px; background: var(--line); border-radius: 7px; overflow: hidden; }
.pwlab-bar span { display: block; height: 100%; width: 0; transition: width .3s, background .3s; background: var(--bad); }
.pwlab-bar span.mid { background: var(--gold); }
.pwlab-bar span.strong { background: var(--ok); }
.pwlab-result { text-align: right; min-width: 190px; }
.pwlab-result small { display: block; color: var(--muted); font-size: .78rem; }
.pwlab-result strong { font-size: 1.2rem; }
.pwlab-notes { padding-left: 20px; color: var(--ink-2); font-size: .92rem; min-height: 1em; }
.pwlab-try { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .85rem; cursor: pointer; font-family: Consolas, monospace; }
.chip:hover { border-color: var(--blue); background: var(--blue-50); }
.chip[data-gen] { font-family: inherit; font-weight: 600; color: var(--blue); }

/* Wimmelbild */
.scene { position: relative; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); cursor: crosshair; background: #eef3f9; }
.spot { position: absolute; width: 12%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 0; background: transparent; cursor: crosshair; color: #fff; font-weight: 800; font-size: .9rem; }
.spot:focus-visible { outline: 3px dashed var(--blue); }
.spot.is-found { width: 30px; height: 30px; aspect-ratio: auto; background: var(--bad); box-shadow: 0 0 0 4px rgba(224,72,72,.3), 0 0 0 10px rgba(224,72,72,.12); animation: pop .3s; cursor: default; }

/* Merkkarten */
.rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 10px; }
.rule { display: flex; gap: 14px; background: #f8fafc; border: 1px solid var(--line-2); border-radius: 14px; padding: 16px; animation: ruleIn .45s ease both; animation-delay: var(--d); }
@keyframes ruleIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.rule-ico { width: 46px; height: 46px; border-radius: 12px; background: var(--blue-50); color: var(--blue); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rule strong { display: block; margin-bottom: 2px; color: var(--navy); }
.rule p { margin: 0; font-size: .92rem; color: var(--ink-2); }

/* Notfallkarte */
.emcard { border: 2px solid var(--bad); border-radius: 18px; overflow: hidden; max-width: 900px; }
.emcard-head { background: var(--bad); color: #fff; padding: 16px 20px; display: flex; gap: 14px; align-items: center; }
.emcard-head small { display: block; opacity: .9; }
.emcard-head strong { font-size: 1.12rem; }
.emcard-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 20px; }
.emsteps { padding-left: 0; list-style: none; counter-reset: s; margin: 0; }
.emsteps li { counter-increment: s; display: flex; gap: 10px; align-items: center; padding: 7px 0; font-weight: 600; }
.emsteps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; background: var(--bad-bg); color: var(--bad); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.emsigns { padding-left: 20px; margin: 0; }
.emsigns li { margin-bottom: 6px; font-size: .94rem; }

/* Quiz & Test */
.qcard { max-width: 760px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; box-shadow: var(--shadow); animation: stageIn .3s; }
.q-meta { font-size: .82rem; color: var(--muted); margin-bottom: 6px; }
.q-text { font-size: 1.15rem; color: var(--ink); margin-bottom: 16px; }
.q-options { display: flex; flex-direction: column; gap: 10px; }
.q-opt { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.q-opt:hover { border-color: var(--blue); background: var(--blue-50); }
.q-opt input { position: absolute; opacity: 0; pointer-events: none; }
.q-mark { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #b8c4d3; flex-shrink: 0; margin-top: 1px; transition: all .15s; }
.q-opt input[type=checkbox] + .q-mark { border-radius: 6px; }
.q-opt input:checked + .q-mark { border-color: var(--blue); background: var(--blue); box-shadow: inset 0 0 0 4px #fff; }
.q-opt input:focus-visible + .q-mark { outline: 3px solid #8ab8f5; outline-offset: 2px; }
.q-opt:has(input:checked) { border-color: var(--blue); background: var(--blue-50); }
.q-opt.is-correct { border-color: var(--ok) !important; background: var(--ok-bg) !important; }
.q-opt.is-correct input + .q-mark { border-color: var(--ok); background: var(--ok); box-shadow: inset 0 0 0 4px var(--ok-bg); }
.q-opt.is-wrong { border-color: var(--bad) !important; background: var(--bad-bg) !important; }
.q-opt.is-wrong input + .q-mark { border-color: var(--bad); background: var(--bad); box-shadow: inset 0 0 0 4px var(--bad-bg); }
.q-opt:has(input:disabled) { cursor: default; }
.q-actions { display: flex; gap: 10px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.q-actions .btn-primary { margin-left: auto; }
.test-intro { text-align: center; max-width: 560px; margin: 30px auto; color: var(--gold); }
.test-intro h2, .test-intro p { color: var(--ink); }
.test-intro h2 { color: var(--navy); font-size: 1.8rem; margin-top: 10px; }
.test-progress { max-width: 760px; margin-bottom: 14px; }
.test-result { text-align: center; padding: 26px; border-radius: 18px; max-width: 760px; }
.test-result.passed { background: linear-gradient(135deg, #e9f8f0, #fff); }
.test-result.failed { background: linear-gradient(135deg, #fff4e0, #fff); }
.test-result .btn-row { justify-content: center; }
.ring-bg { fill: none; stroke: var(--line); stroke-width: 10; }
.ring-fg { fill: none; stroke: var(--ok); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1s; }
.failed .ring-fg { stroke: var(--gold); }
.ring text { font-size: 24px; font-weight: 800; fill: var(--navy); }
.review-title { margin-top: 26px; }
.review { max-width: 760px; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.review li { padding: 10px 14px; border-radius: 10px; }
.review li.ok { background: #f3fbf7; }
.review li.bad { background: #fff5f5; }
.review li span { display: block; font-size: .9rem; margin-top: 3px; }
.rv-your { color: var(--bad); }
.rv-right { color: var(--ok); font-weight: 600; }
.rv-ex { color: var(--ink-2); }

/* Toast & Konfetti */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 100; font-weight: 600; animation: toastIn .3s ease; max-width: calc(100% - 32px); text-align: center; }
.toast-ok { background: #0f5e3c; }
.toast-warn { background: #8a5a00; }
.toast-bad { background: #9b2424; }
.toast.out { opacity: 0; transform: translate(-50%, 10px); transition: all .4s; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translateX(-50%); } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 99; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { top: 105%; transform: rotate(720deg) translateX(40px); } }

/* ---------- SVG-Animationen ---------- */
.art g[class^="a-"], .art [class*=" a-"], .art rect[class^="a-"], .art circle[class^="a-"], .art path[class^="a-"] { transform-box: fill-box; transform-origin: center; animation-delay: var(--d, 0s); animation-fill-mode: both; }
.a-pop { animation: pop .55s cubic-bezier(.2,1.4,.4,1) both; }
.a-fade { animation: fadeIn .7s ease both; }
.a-left { animation: fromLeft .7s ease both; }
.a-right { animation: fromRight .7s ease both; }
.a-rise { animation: rise .7s ease both; }
.a-drop { animation: drop .8s cubic-bezier(.3,1.3,.5,1) both; }
.a-fly { animation: fly 1s ease both; }
.a-float { animation: float 3s ease-in-out infinite; }
.a-pulse { animation: pulse 1.4s ease-in-out infinite; }
.a-shake { animation: shakeSvg .6s ease both, fadeIn .3s both; }
.a-blink { animation: blinkSvg 2.4s infinite; }
.a-swing { animation: swing 2.6s ease-in-out infinite; transform-origin: top center !important; }
.a-spin { animation: spin 3s linear infinite; transform-origin: 0 0 !important; transform-box: view-box !important; }
.a-cursor { animation: cursorMove 1.2s ease both; }
.a-ripple { animation: ripple 1s ease-out both; }
.a-grow { animation: grow 1.2s ease both; transform-origin: left center !important; }
.a-fillgreen { animation: fadeIn .3s ease both; }
.a-knob { animation: knob .3s ease both; }
.a-keymove { animation: keyMove 2.8s ease both; }
.a-unplug { animation: unplug 1s ease both; }
.a-draw { stroke-dasharray: 200; animation: draw 1.2s ease both; }
@keyframes pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fromLeft { from { transform: translateX(-40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fromRight { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes drop { from { transform: translateY(-60px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fly { from { transform: translate(-90px, 30px) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes shakeSvg { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-6deg); } 40% { transform: rotate(6deg); } 60% { transform: rotate(-4deg); } 80% { transform: rotate(4deg); } }
@keyframes blinkSvg { 0%, 90%, 100% { opacity: 1; } 95% { opacity: .1; } }
@keyframes swing { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes cursorMove { from { transform: translate(90px, 70px); opacity: 0; } 60% { transform: translate(0, 0); opacity: 1; } 80% { transform: scale(.85); } to { transform: scale(1); } }
@keyframes ripple { from { transform: scale(.2); opacity: 1; } to { transform: scale(2.4); opacity: 0; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes knob { from { transform: translateX(0); } to { transform: translateX(22px); } }
@keyframes keyMove { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 1; } 25% { transform: translate(40px, 60px); } 45% { transform: translate(130px, 60px); } 65% { transform: translate(220px, 60px); } 85%, 100% { transform: translate(310px, 60px); } }
@keyframes unplug { from { transform: translateX(0); } to { transform: translateX(26px); } }
@keyframes draw { from { stroke-dashoffset: 200; } to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Responsiv ---------- */
@media (max-width: 1100px) {
  .trainer { grid-template-columns: minmax(0, 1fr); }
  .trainer-nav { position: static; min-width: 0; }
  .chapter-list { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .chapter button { flex-direction: column; text-align: center; min-width: 96px; gap: 4px; }
  .chapter-title { font-size: .76rem; }
  .chapter-title small { display: none; }
  .mail-wrap, .scene-layout { grid-template-columns: 1fr; }
  .hs-panel { position: static; }
}
@media (max-width: 860px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { padding: 24px; }
  .auth-illu, .auth-points { display: none; }
  .auth-form { padding: 28px 22px; }
  .slide-story, .home-hero, .chat-layout { grid-template-columns: 1fr; }
  .device { margin: 0 auto; }
  .emcard-cols { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
  .userchip-text { display: none; }
  .topbar-inner { flex-wrap: wrap; gap: 10px; }
  .usermenu { margin-left: auto; }
  .mainnav { order: 3; flex-basis: 100%; }
}
@media (max-width: 560px) {
  body { font-size: 15px; }
  .container { padding: 18px 12px 30px; }
  .stage-body { padding: 18px 16px; }
  .stage-top, .stage-foot { padding: 12px 14px; }
  .card { padding: 18px 16px; }
  h1 { font-size: 1.45rem; }
  .home-hero { padding: 18px; }
  .home-hero h1 { font-size: 1.5rem; }
  .kpi strong { font-size: 1.5rem; }
  .pwlab-meter { grid-template-columns: 1fr; }
  .pwlab-result { text-align: left; }
  .clip-caption { font-size: 1rem; }
  .brand span { display: none; }
}
@media print {
  .topbar, .footer, .page-actions, .filterbar, .trainer-nav, .stage-foot { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}
