@font-face { font-family: "LZ Poppins"; font-weight: 400; font-display: swap; src: url(assets/Poppins-Regular.woff) format("woff"); }
@font-face { font-family: "LZ Poppins"; font-weight: 500; font-display: swap; src: url(assets/Poppins-Medium.woff) format("woff"); }
@font-face { font-family: "LZ Poppins"; font-weight: 700; font-display: swap; src: url(assets/Poppins-Bold.woff) format("woff"); }

:root {
  --bg: #F2F6F9; --surface: #FFFFFF; --surface-2: #F7FAFC; --sunken: #EDF2F6;
  --ink: #0E1A2B; --ink-2: #475467; --ink-3: #5B6778; --line: #E2E8EF; --line-2: #D2DBE5;
  --teal: #08806A; --teal-hover: #066B58; --teal-bright: #12B08B; --teal-soft: #E2F5EF; --teal-ink: #07705C; --on-teal: #FFFFFF;
  --yellow: #FBA60A; --yellow-soft: #FFF3D6; --yellow-ink: #875600;
  --blue: #0B76E8; --blue-soft: #E6F0FD; --blue-ink: #0A58B0;
  --coral: #F2604F; --coral-soft: #FDEBE8; --coral-ink: #B1382A;
  --navy: #0B1A2C; --focus: #0B76E8;
  --shadow-1: 0 1px 2px rgba(14, 26, 43, .05), 0 1px 3px rgba(14, 26, 43, .05);
  --shadow-2: 0 18px 40px -20px rgba(14, 26, 43, .28), 0 4px 10px -4px rgba(14, 26, 43, .08);
  --shadow-btn: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 2px 0 #055646;
  --r-lg: 22px; --r: 16px; --r-sm: 11px;
  --font: "LZ Poppins", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09111C; --surface: #101A28; --surface-2: #142033; --sunken: #0C1520;
    --ink: #E9EEF5; --ink-2: #B0BBCA; --ink-3: #8C98AA; --line: #1E2A3C; --line-2: #2A394F;
    --teal: #1FB892; --teal-hover: #33C9A3; --teal-bright: #2BD3A6; --teal-soft: #0E2C26; --teal-ink: #5FE0BD; --on-teal: #04150F;
    --yellow-soft: #33270B; --yellow-ink: #FFC95A; --blue-soft: #0E2340; --blue-ink: #7DB5FF;
    --coral-soft: #3A1815; --coral-ink: #FF998B; --navy: #050B14;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3); --shadow-2: 0 20px 44px -20px rgba(0, 0, 0, .7);
    --shadow-btn: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 2px 0 #0B7A60;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15.5px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
svg.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px 80px; }
main:focus { outline: none; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--teal); color: var(--on-teal); padding: 10px 16px; border-radius: 10px; font-weight: 500; text-decoration: none; transition: top .15s; }
.skip:focus { top: 12px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.nowrap { white-space: nowrap; }
.optional { font-weight: 400; color: var(--ink-3); }
::placeholder { color: var(--ink-3); opacity: 1; }

/* ---------- Kopfzeile ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.topbar-inner { max-width: 1080px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.logo-img { display: block; flex: none; background: url(assets/icon192.webp) center / contain no-repeat; }
.brand-icon { width: 40px; height: 40px; }
.wordmark { display: block; width: 116px; height: 25px; background: var(--ink); -webkit-mask: url(assets/wordmark.png) no-repeat left center / contain; mask: url(assets/wordmark.png) no-repeat left center / contain; }
.brand-divider { width: 1.5px; height: 22px; background: var(--line-2); margin: 0 4px; }
.tool-name { font-weight: 500; font-size: 17px; color: var(--teal-ink); letter-spacing: -.01em; }
.top-nav { display: flex; gap: 4px; }
.nav-link { background: none; border: 0; color: var(--ink-2); padding: 8px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; text-decoration: none; }
.nav-link:hover { background: var(--sunken); color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding: 60px 0 30px; max-width: 800px; }
.hero h1 { font-size: clamp(2.5rem, 6.2vw, 4.3rem); line-height: 1.03; letter-spacing: -.035em; font-weight: 700; margin: 0 0 18px; }
.marker { position: relative; white-space: nowrap; color: var(--teal-ink); }
.marker::after { content: ""; position: absolute; left: -2%; right: -3%; bottom: .06em; height: .26em; z-index: -1; background: var(--yellow); opacity: .55; border-radius: .2em .5em .3em .6em; transform: rotate(-1.2deg); }
.hero-sub { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; margin: 0 0 24px; }
.badges { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 0; }
.badges li { display: flex; align-items: center; gap: 9px; font-weight: 500; padding: 0 18px; border-left: 1.5px solid var(--line-2); }
.badges li:first-child { padding-left: 0; border-left: 0; }
.badge-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--teal-soft); color: var(--teal-ink); }
.badges li:nth-child(2) .badge-ico { background: var(--blue-soft); color: var(--blue-ink); }
.badges li:nth-child(3) .badge-ico { background: var(--yellow-soft); color: var(--yellow-ink); }

/* ---------- Karten, Knöpfe ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--r-sm); border: 1.5px solid transparent; padding: 10px 16px; font-weight: 500; font-size: 15px; line-height: 1.2; white-space: nowrap; text-decoration: none; transition: background-color .15s, border-color .15s, transform .1s; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--teal); color: var(--on-teal); box-shadow: var(--shadow-btn); }
.btn-primary:hover:not(:disabled) { background: var(--teal-hover); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover:not(:disabled) { border-color: var(--teal); color: var(--teal-ink); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { background: var(--sunken); color: var(--ink); }
.btn-danger:hover:not(:disabled) { border-color: var(--coral); color: var(--coral-ink); }
.btn-lg { padding: 14px 26px; font-size: 16.5px; border-radius: 14px; }
.btn-sm { padding: 7px 12px; font-size: 14px; border-radius: 10px; gap: 6px; }
.inline-link { background: none; border: 0; padding: 0; color: var(--teal-ink); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.icon-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 0; background: transparent; color: var(--ink-2); }
.icon-btn:hover { background: var(--sunken); color: var(--ink); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 18px; }

/* ---------- Formular ---------- */
.field { display: flex; flex-direction: column; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field-label { display: block; font-weight: 500; font-size: 14px; }
.hint { display: block; color: var(--ink-3); font-size: 13px; line-height: 1.5; margin: 0; }
.input, select, textarea {
  width: 100%; background: var(--surface-2); border: 1.5px solid var(--line-2); border-radius: var(--r-sm);
  padding: 12px 14px; font-size: 16px; transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 15%, transparent); }
.input.is-bad { border-color: var(--coral); }
select { appearance: none; padding-right: 40px; font-weight: 500; }
.select-wrap { position: relative; display: block; }
.select-wrap::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
textarea { resize: vertical; min-height: 80px; }
.field-error { color: var(--coral-ink); font-size: 13.5px; font-weight: 500; margin: 0; }
.honey { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* ---------- Ersteller (Herzstück) ---------- */
.composer { padding: 28px; display: grid; gap: 22px; position: relative; }
.preview {
  border-radius: 18px; padding: 22px 24px 20px; background: var(--navy); color: #fff;
  box-shadow: 0 18px 40px -22px rgba(5, 16, 30, .7); position: relative; overflow: hidden;
}
.preview::before { content: ""; position: absolute; inset: 0; background: radial-gradient(520px 160px at 85% -20%, rgba(43, 211, 166, .28), transparent 70%); pointer-events: none; }
.preview-label { position: relative; font-size: 13px; color: rgba(255, 255, 255, .62); margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.preview-url { position: relative; margin: 0; font-size: clamp(1.35rem, 3.6vw, 2.25rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }
.preview-url .dom { color: rgba(255, 255, 255, .55); font-weight: 500; }
.preview-url .slug { color: #2BD3A6; }
.preview-url .slug.is-empty { color: rgba(255, 255, 255, .5); font-style: italic; font-weight: 500; }
.preview-url .caret { display: inline-block; width: 3px; height: .95em; margin-left: 2px; vertical-align: -.1em; background: #FBA60A; border-radius: 2px; animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.preview-target { position: relative; margin: 10px 0 0; font-size: 13.5px; color: rgba(255, 255, 255, .62); display: flex; gap: 8px; align-items: center; min-width: 0; }
.preview-target span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.slug-row { display: flex; align-items: stretch; border: 1.5px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface-2); transition: border-color .15s, box-shadow .15s, background-color .15s; }
.slug-row:focus-within { border-color: var(--teal); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 15%, transparent); }
.slug-row.is-bad { border-color: var(--coral); }
.slug-row.is-good { border-color: var(--teal); }
.slug-prefix { display: flex; align-items: center; padding: 0 4px 0 14px; color: var(--ink-3); font-weight: 500; white-space: nowrap; user-select: none; }
.slug-row input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 12px 6px; font-size: 16px; font-weight: 500; outline: none; }
.slug-row .icon-btn { margin: 4px; width: auto; padding: 0 12px; gap: 6px; display: flex; font-size: 14px; font-weight: 500; }
.slug-state { display: flex; align-items: center; gap: 8px; min-height: 22px; font-size: 13.5px; font-weight: 500; margin: 0; color: var(--ink-3); }
.slug-state.is-good { color: var(--teal-ink); }
.slug-state.is-bad { color: var(--coral-ink); }
.slug-state .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.slug-state.is-checking .dot { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { position: relative; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 8px 13px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--surface-2); font-size: 14px; font-weight: 500; cursor: pointer; }
.seg input:checked + span { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-ink); box-shadow: inset 0 0 0 1px var(--teal); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14px; color: var(--ink-2); }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--teal); flex: none; cursor: pointer; }
.check label { cursor: pointer; }
.submit-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; padding-top: 6px; border-top: 1px solid var(--line); }
.submit-row .check { flex: 1 1 320px; padding-top: 16px; }
.submit-row .btn { margin-top: 16px; }

/* ---------- Ergebnis ---------- */
.result { padding: 28px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 32px; align-items: center; margin-top: 20px; border-color: var(--teal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 12%, transparent), var(--shadow-2); animation: pop .4s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.result-kicker { display: flex; align-items: center; gap: 8px; color: var(--teal-ink); font-weight: 500; font-size: 1rem; margin: 0 0 6px; }
.result-url { font-size: clamp(1.4rem, 3.4vw, 2.1rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; margin: 0; overflow-wrap: anywhere; }
.result-url a { text-decoration: none; }
.result-url a:hover { text-decoration: underline; text-underline-offset: 4px; }
.result-meta { color: var(--ink-3); font-size: 13.5px; margin: 6px 0 0; overflow-wrap: anywhere; }
.result .row { margin-top: 18px; }
.qr-box { display: grid; justify-items: center; gap: 10px; }
.qr { width: 168px; height: 168px; padding: 10px; background: #fff; border-radius: 16px; border: 1px solid var(--line); }
.qr svg { width: 100%; height: 100%; display: block; }
.qr-dl { display: flex; gap: 6px; }

/* ---------- Meine Links ---------- */
.mine { margin-top: 28px; padding: 22px 24px; }
.mine-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.mine-head h2 { font-size: 1.15rem; margin: 0; display: flex; gap: 10px; align-items: center; }
.count { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--sunken); color: var(--ink-2); font-size: 12.5px; font-weight: 500; }
.mine-list { list-style: none; padding: 0; margin: 0; }
.mine-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.mine-item:first-child { border-top: 0; }
.mine-short { font-weight: 700; font-size: 16px; overflow-wrap: anywhere; text-decoration: none; }
.mine-short:hover { color: var(--teal-ink); }
.mine-target { color: var(--ink-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 1px 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 500; background: var(--sunken); color: var(--ink-2); }
.chip[data-tone="teal"] { background: var(--teal-soft); color: var(--teal-ink); }
.chip[data-tone="yellow"] { background: var(--yellow-soft); color: var(--yellow-ink); }
.chip[data-tone="coral"] { background: var(--coral-soft); color: var(--coral-ink); }
.chip[data-tone="blue"] { background: var(--blue-soft); color: var(--blue-ink); }
.mine-actions { display: flex; gap: 4px; }
.mine-empty { color: var(--ink-3); margin: 6px 0 0; }

/* ---------- Hinweise ---------- */
.notice { display: flex; gap: 14px; align-items: flex-start; margin-top: 28px; padding: 16px 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: 14px; }
.notice p { margin: 0; }
.notice strong { color: var(--ink); font-weight: 500; }
.notice-ico { color: var(--teal-ink); margin-top: 2px; }
.notice.is-error { border-color: var(--coral); background: var(--coral-soft); color: var(--coral-ink); }
.notice.is-error .notice-ico { color: var(--coral-ink); }
code, .mono { font-family: var(--mono); font-size: .92em; background: var(--sunken); padding: 1px 6px; border-radius: 6px; }

.footer { display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: center; justify-content: space-between; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links .inline-link { color: var(--ink-2); font-size: 13px; text-decoration-color: var(--line-2); }

/* ---------- Meldungen ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; cursor: pointer; display: flex; align-items: flex-start; gap: 10px; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow-2); font-size: 14px; animation: pop .3s ease; }
.toast .i { margin-top: 2px; color: var(--teal-ink); }
.toast.is-error .i { color: var(--coral-ink); }
.toast.is-warn .i { color: var(--yellow-ink); }
.toast p { margin: 0; }
.toast small { display: block; color: var(--ink-3); font-size: 12.5px; }

/* ---------- Dialoge ---------- */
.dlg { border: 0; padding: 0; border-radius: 24px; background: var(--surface); color: var(--ink); box-shadow: 0 40px 80px -30px rgba(5, 16, 30, .6); max-height: calc(100vh - 32px); }
.dlg::backdrop { background: rgba(9, 20, 35, .5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.dlg[open] { animation: pop .3s ease; }
.dlg-legal { width: min(760px, calc(100% - 24px)); height: min(760px, calc(100vh - 32px)); display: none; }
.dlg-legal[open] { display: flex; flex-direction: column; }
.dlg-qr { width: min(420px, calc(100% - 24px)); }
.dlg-qr .dlg-body { padding: 26px; display: grid; gap: 16px; justify-items: center; text-align: center; }
.dlg-qr .qr { width: 280px; height: 280px; }
.legal-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 8px 28px; }
.legal-head h2 { margin: 0; font-size: 1.6rem; letter-spacing: -.02em; }
.legal-tabs { display: flex; gap: 6px; padding: 6px 24px 14px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.legal-tabs button { border: 0; background: var(--sunken); color: var(--ink-2); padding: 8px 14px; border-radius: 99px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.legal-tabs button[aria-selected="true"] { background: var(--teal); color: var(--on-teal); }
.legal-body { overflow-y: auto; padding: 8px 28px 28px; }
.legal-body h3 { font-size: 1.02rem; margin: 22px 0 6px; }
.legal-body p, .legal-body li { color: var(--ink-2); font-size: 14.5px; line-height: 1.65; }
.legal-body p { margin: 0 0 10px; }
.legal-body ul { padding-left: 20px; margin: 0 0 10px; }
.fill-missing { color: var(--coral-ink); font-style: normal; font-weight: 500; }

/* ---------- Einfache Seiten (Weiterleitung, Vorschau) ---------- */
body.simple .wrap { max-width: 760px; padding-top: 48px; }
.page-card { padding: 34px; }
.page-card h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); letter-spacing: -.025em; line-height: 1.15; margin: 0 0 14px; overflow-wrap: anywhere; }
.page-card h2 { font-size: 1.15rem; margin: 0 0 4px; }
.page-card p { color: var(--ink-2); margin: 0 0 10px; }
.page-card .note { font-size: 13.5px; color: var(--ink-3); }
.target { font-family: var(--mono); font-size: 14.5px; background: var(--sunken); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 6px 0 12px; overflow-wrap: anywhere; color: var(--ink); }
.report { display: grid; gap: 14px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.report .btn { justify-self: start; }
.msg { font-weight: 500; color: var(--teal-ink); margin: 0; }

/* ---------- Verwaltung ---------- */
.admin-login { max-width: 440px; margin: 60px auto 0; padding: 30px; display: grid; gap: 16px; }
.admin-login h1 { margin: 0; font-size: 1.6rem; letter-spacing: -.02em; }
.stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 18px; }
.stat { padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); min-width: 120px; }
.stat b { display: block; font-size: 1.4rem; line-height: 1.2; }
.stat span { font-size: 12.5px; color: var(--ink-3); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.toolbar .input { max-width: 320px; padding: 9px 12px; font-size: 14.5px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs button { border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink-2); padding: 7px 13px; border-radius: 99px; font-size: 13.5px; font-weight: 500; }
.tabs button[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: var(--on-teal); }
.alist { list-style: none; margin: 0; padding: 0; }
.aitem { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding: 16px 20px; border-top: 1px solid var(--line); }
.aitem:first-child { border-top: 0; }
.aitem .reports { grid-column: 1 / -1; margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--coral-soft); color: var(--coral-ink); font-size: 13px; }
.aitem .reports li { margin-left: 16px; }
.aactions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: flex-start; }
.block-card { padding: 22px 24px; margin-top: 22px; display: grid; gap: 12px; }
.block-card textarea { font-family: var(--mono); font-size: 13.5px; min-height: 140px; }

@media (max-width: 760px) {
  .wrap { padding: 0 14px 60px; }
  .topbar-inner { padding: 10px 14px; }
  .top-nav { display: none; }
  .wordmark { width: 96px; height: 21px; }
  .brand-icon { width: 34px; height: 34px; }
  .hero { padding: 34px 0 22px; }
  .badges { gap: 10px 16px; }
  .badges li { padding: 0; border-left: 0; font-size: 14px; }
  .composer, .result { padding: 20px; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .result { grid-template-columns: minmax(0, 1fr); }
  .qr-box { justify-items: start; }
  .slug-prefix { padding-left: 12px; font-size: 14px; }
  .preview-url .dom { display: block; font-size: .62em; }
  .slug-row .icon-btn span { display: none; }
  .mine-item, .aitem { grid-template-columns: minmax(0, 1fr); }
  .aactions { justify-content: flex-start; }
  .page-card { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* ---------- Rechtsseiten und Verwaltung ---------- */
.legal-page { max-width: 820px; margin: 44px auto 0; padding: 36px 40px 30px; }
.legal-page h1 { font-size: clamp(1.8rem, 4.4vw, 2.5rem); letter-spacing: -.025em; line-height: 1.15; margin: 0 0 18px; }
.legal-page h2 { font-size: 1.08rem; margin: 26px 0 6px; }
.legal-page p, .legal-page li { color: var(--ink-2); line-height: 1.7; }
.legal-page p { margin: 0 0 10px; }
.legal-page ul { padding-left: 22px; margin: 0 0 10px; }
.legal-page .lead { font-size: 1.05rem; color: var(--ink); padding: 14px 18px; border-radius: 14px; background: var(--teal-soft); }
.legal-page .note { margin-top: 26px; font-size: 13.5px; color: var(--ink-3); }
.dlg-title { margin: 0; font-size: 1.25rem; overflow-wrap: anywhere; }
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 34px; }
.dash-title { margin: 0; font-size: 1.7rem; letter-spacing: -.02em; }
.block-title { margin: 0; font-size: 1.1rem; }
.empty-hint { margin-top: 12px; }
@media (max-width: 760px) { .legal-page { margin-top: 24px; padding: 24px 20px; } }

/* =====================================================================
   Losomat
   ===================================================================== */
.hero-compact { padding: 44px 0 24px; }
.los-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
.los-class { padding: 20px; display: grid; gap: 14px; }
.panel-title { margin: 0; font-size: 1.15rem; }
.class-row { display: flex; gap: 6px; align-items: center; }
.class-row .select-wrap { flex: 1; min-width: 0; }
.class-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.small { font-size: 13px; }
.roster-box { display: grid; gap: 6px; }
.roster-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.presence { margin: 0; font-weight: 700; }
.roster { list-style: none; margin: 0; padding: 4px; max-height: 330px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.roster li { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: 8px; }
.roster li:hover { background: var(--sunken); }
.roster input { width: 18px; height: 18px; margin: 0; accent-color: var(--teal); flex: none; cursor: pointer; }
.roster label { cursor: pointer; flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14.5px; }
.roster li.is-absent label { color: var(--ink-3); text-decoration: line-through; }
.drop-zone { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 20px 14px; border: 2px dashed var(--line-2); border-radius: 14px; background: var(--surface-2); cursor: pointer; transition: border-color .15s, background-color .15s, transform .15s; }
.drop-zone:hover, .drop-zone:focus-visible { border-color: var(--teal); background: var(--teal-soft); }
.drop-zone .drop-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--teal-soft); color: var(--teal-ink); }
.drop-zone.is-compact { padding: 12px; gap: 2px; }
.drop-zone.is-compact .drop-ico { display: none; }
body.is-dragging .drop-zone { border-color: var(--teal); background: var(--teal-soft); transform: scale(1.02); }
body.is-dragging::after { content: "Datei loslassen, um die Klassenliste einzulesen"; position: fixed; inset: 0; z-index: 600; display: grid; place-items: center; background: rgba(8, 128, 106, .88); color: #fff; font-size: 1.5rem; font-weight: 700; pointer-events: none; }
.more summary { cursor: pointer; font-weight: 500; font-size: 14px; color: var(--ink-2); padding: 4px 0; }
.more[open] { display: grid; gap: 12px; }

.los-main { padding: 0; overflow: hidden; }
.tabs-bar { display: flex; gap: 2px; padding: 8px 12px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs-bar [role="tab"] { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 11px 14px 10px; color: var(--ink-2); font-weight: 500; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; border-radius: 10px 10px 0 0; }
.tabs-bar [role="tab"]:hover { color: var(--ink); background: var(--sunken); }
.tabs-bar [role="tab"][aria-selected="true"] { color: var(--teal-ink); border-bottom-color: var(--teal); }

.stage-wrap { padding: 16px 16px 0; }
.stage { position: relative; display: flex; height: clamp(320px, 48vh, 540px); border-radius: 18px; background: #0B1A2C; color: #fff; overflow: hidden; box-shadow: 0 18px 40px -24px rgba(5, 16, 30, .8); }
.stage::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 260px at 85% -10%, rgba(43, 211, 166, .22), transparent 70%), radial-gradient(500px 240px at 0% 110%, rgba(11, 118, 232, .18), transparent 70%); pointer-events: none; }
.stage-inner { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 18px; }
.stage-idle { text-align: center; display: grid; justify-items: center; gap: 6px; max-width: 520px; }
.stage-logo { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 26px; background: rgba(255, 255, 255, .08); border: 2px solid rgba(255, 255, 255, .16); color: #FBA60A; font-size: 3rem; font-weight: 700; margin-bottom: 8px; }
.stage-title { margin: 0; font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; letter-spacing: -.02em; }
.stage-text { margin: 0; color: rgba(255, 255, 255, .72); }
.stage-names { width: 100%; height: 100%; display: grid; gap: 14px; }
.stage-names.n2 { grid-template-columns: 1fr 1fr; }
.stage-names.n3 { grid-template-columns: 1fr 1fr 1fr; }
.stage-names.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.name-box { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; overflow: hidden; border-radius: 16px; }
.stage-names:not(.n1) .name-box { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); }
.stage-name { display: block; font-weight: 700; line-height: 1.12; white-space: nowrap; letter-spacing: -.02em; text-shadow: 0 0 40px rgba(43, 211, 166, .35); }

.reels { width: 100%; height: 100%; display: grid; gap: 14px; }
.reels.n2 { grid-template-columns: 1fr 1fr; }
.reels.n3 { grid-template-columns: 1fr 1fr 1fr; }
.reels.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.reel { position: relative; overflow: hidden; min-height: 0; border-radius: 16px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent); mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent); }
.reel-strip { will-change: transform; }
.reel-item { display: flex; align-items: center; justify-content: center; overflow: hidden; }
.reel-item span { font-weight: 700; white-space: nowrap; line-height: 1.12; }

.cards { width: 100%; height: 100%; display: grid; gap: 16px; justify-items: center; align-items: center; }
.cards.n2 { grid-template-columns: 1fr 1fr; }
.cards.n3 { grid-template-columns: 1fr 1fr 1fr; }
.cards.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.flip { perspective: 1400px; width: 100%; height: 100%; max-width: 640px; min-height: 0; }
.cards.n1 .flip { width: min(640px, 92%); height: 82%; }
.flip-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.flip-face { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 18px; -webkit-backface-visibility: hidden; backface-visibility: hidden; overflow: hidden; padding: 0 14px; }
.flip-front { background: linear-gradient(135deg, #08806A, #065F4F); border: 3px solid rgba(255, 255, 255, .22); box-shadow: inset 0 0 0 10px rgba(255, 255, 255, .06); }
.flip-q { font-size: clamp(3rem, 9vw, 7rem); font-weight: 700; color: #FBA60A; }
.flip-back { background: #FFFFFF; transform: rotateY(180deg); }
.flip-back .stage-name { color: #0B1A2C; text-shadow: none; }

.wheel-box { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.wheel { display: block; border-radius: 50%; box-shadow: 0 0 0 6px rgba(255, 255, 255, .12), 0 20px 50px -20px rgba(0, 0, 0, .8); }
.wheel-pointer { position: absolute; top: 2px; left: 50%; margin-left: -15px; width: 0; height: 0; border-left: 15px solid transparent; border-right: 15px solid transparent; border-top: 30px solid #FBA60A; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .5)); }
.wheel-result { position: absolute; left: 0; right: 0; bottom: 5%; display: flex; justify-content: center; pointer-events: none; }
.wheel-result .stage-name { background: #FFFFFF; color: #0B1A2C; text-shadow: none; padding: .2em .9em; border-radius: 99px; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .6); }

.g-grid { width: 100%; max-height: 100%; overflow: auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-content: start; padding: 2px; }
.g-grid.g7 .g-card, .g-grid.g8 .g-card { padding: 9px 12px; }
.g-grid.g7 .g-card li, .g-grid.g8 .g-card li { font-size: .95rem; }
.g-card { background: #FFFFFF; color: #0B1A2C; border-radius: 14px; padding: 12px 14px; box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .7); }
.g-title { margin: 0 0 6px; font-weight: 700; color: #07705C; font-size: .95rem; }
.g-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.g-card li { font-weight: 500; font-size: 1.05rem; }
.g-card li.is-speaker { font-weight: 700; }
.speaker-tag { display: inline-block; font-size: .7rem; font-weight: 500; padding: 1px 7px; border-radius: 99px; background: #FFF3D6; color: #6B4500; vertical-align: .15em; }

.order-list { list-style: none; margin: 0; padding: 0; width: 100%; max-height: 100%; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 22px; align-content: start; counter-reset: ord; }
.order-list.is-cols { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 5px 16px; }
.order-list.is-cols li { font-size: 1rem; gap: 9px; }
.order-list.is-cols li::before { width: 26px; height: 26px; font-size: .8rem; }
.order-list li { counter-increment: ord; display: flex; align-items: center; gap: 12px; font-size: 1.15rem; font-weight: 500; min-width: 0; }
.order-list li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-list li::before { content: counter(ord); flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #FBA60A; color: #0B1A2C; font-weight: 700; font-size: .9rem; }

.timer-face { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.timer-digits { font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.timer-face .timer-digits { max-height: 70%; }
.timer-bar { width: min(560px, 80%); height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .14); overflow: hidden; flex: none; }
.timer-bar span { display: block; height: 100%; background: #2BD3A6; transform-origin: left center; transition: transform .25s linear; }
.timer-face.is-low .timer-digits { color: #FBA60A; }
.timer-face.is-low .timer-bar span { background: #FBA60A; }
.timer-face.is-end .timer-digits { color: #FF998B; animation: pulse 1s ease-in-out infinite; }

.think { position: absolute; top: 14px; right: 14px; width: 64px; height: 64px; }
.think svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.think circle { fill: none; stroke-width: 4; }
.think-bg { stroke: rgba(255, 255, 255, .15); }
.think-arc { stroke: #FBA60A; stroke-linecap: round; transition: stroke-dashoffset .2s linear; }
.think span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; color: #fff; }

.stage-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 0 16px; }
.stage-status { margin: 0; color: var(--ink-3); font-size: 14px; }
.stage-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.blackout { position: fixed; inset: 0; z-index: 700; background: #000; display: flex; align-items: flex-end; justify-content: center; cursor: pointer; }
.blackout span { color: rgba(255, 255, 255, .55); font-size: 13px; padding: 16px; }

.stage-wrap.is-beamer { position: fixed; inset: 0; z-index: 400; display: flex; flex-direction: column; padding: 2vh 2vw 0; background: #050B14; }
.stage-wrap.is-beamer .stage { flex: 1; height: auto; border-radius: 22px; }
.stage-wrap.is-beamer .stage-bar { padding: 1.4vh 0 1.6vh; }
.stage-wrap.is-beamer .stage-status { color: rgba(255, 255, 255, .72); }
.stage-wrap.is-beamer .icon-btn { color: rgba(255, 255, 255, .85); }
.stage-wrap.is-beamer .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.stage-wrap.is-beamer .btn-secondary { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .28); }
.stage-wrap.is-beamer .g-card li { font-size: clamp(1.1rem, 1.9vw, 1.8rem); }
.stage-wrap.is-beamer .g-title { font-size: clamp(.95rem, 1.3vw, 1.3rem); }
.stage-wrap.is-beamer .order-list li { font-size: clamp(1.15rem, 2vw, 2rem); }
.stage-wrap.is-beamer .stage-text { font-size: 1.2rem; }
body.beamer-open { overflow: hidden; }

.panel { padding: 4px 20px 22px; display: grid; gap: 16px; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; align-items: start; }
fieldset[disabled] .seg span { opacity: .5; cursor: not-allowed; }
.seg-btn { padding: 8px 13px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--surface-2); font-size: 14px; font-weight: 500; }
.seg-btn[aria-pressed="true"] { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-ink); box-shadow: inset 0 0 0 1px var(--teal); }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper .input { width: 84px; text-align: center; font-weight: 700; padding: 9px; }
.stepper .icon-btn { border: 1.5px solid var(--line-2); font-size: 20px; font-weight: 500; }
.pot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.pot-row .hint { font-size: 14px; }
.mini-title { margin: 0 0 6px; font-size: .95rem; }
.history { border-top: 1px solid var(--line); padding-top: 14px; }
.history-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; max-height: 160px; overflow: auto; font-size: 14px; }
.h-time { color: var(--ink-3); font-variant-numeric: tabular-nums; margin-right: 6px; }
.rules { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 8px; }
.rule-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rule-row .select-wrap { flex: 1 1 150px; min-width: 0; }
.rule-amp { font-weight: 700; color: var(--ink-3); }
.chips.rule-list { list-style: none; margin: 0; padding: 0; }
.rule-chip { padding: 3px 4px 3px 12px; font-size: 13px; }
.chip-x { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); }
.chip-x:hover { background: var(--line); color: var(--coral-ink); }
.chip-x .i { width: 14px; height: 14px; }
.timer-btns { align-self: end; }
kbd { font-family: var(--mono); font-size: .85em; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--surface); color: var(--ink); }
.notice.keys p + p { margin-top: 4px; }

.dlg-import { width: min(880px, calc(100% - 24px)); }
.dlg-form { padding: 22px 24px 24px; display: grid; gap: 14px; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.import-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; }
.import-grid textarea { min-height: 280px; font-size: 15px; line-height: 1.55; }
.import-preview { margin: 0; padding: 8px 10px 8px 40px; max-height: 280px; min-height: 120px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.import-preview li { padding: 1px 0; }
.pv-first { font-weight: 500; }
.pv-last { color: var(--ink-3); }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.qr-big { width: min(330px, 78vw); height: auto; aspect-ratio: 1; }
.print-area { display: none; }

@media (max-width: 980px) {
  .los-grid { grid-template-columns: minmax(0, 1fr); }
  .roster { max-height: 220px; }
}
@media (max-width: 760px) {
  .stage { height: 300px; }
  .stage-wrap { padding: 12px 12px 0; }
  .panel { padding: 4px 14px 18px; }
  .tabs-bar [role="tab"] span { font-size: 14px; }
  .import-grid { grid-template-columns: minmax(0, 1fr); }
  .import-grid textarea { min-height: 160px; }
  .stage-primary { flex: 1 1 100%; }
  .stage-tools { margin-left: 0; }
}
@media print {
  body * { visibility: hidden !important; }
  .print-area, .print-area * { visibility: visible !important; }
  .print-area { display: block !important; position: absolute; left: 0; top: 0; width: 100%; color: #000; font-family: var(--font); }
  .print-area h1 { font-size: 20pt; margin: 0 0 12pt; }
  .print-area section { break-inside: avoid; margin-bottom: 12pt; }
  .print-area h2 { font-size: 13pt; margin: 0 0 4pt; }
  .print-area ul { margin: 0; padding-left: 16pt; }
  .print-area li { font-size: 12pt; line-height: 1.5; }
}

/* ---------- Ziehungsarten-Auswahl ---------- */
.mode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.mode { position: relative; }
.mode input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.mode span { display: grid; justify-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface-2); text-align: center; cursor: pointer; transition: border-color .15s, background-color .15s, transform .1s; }
.mode span .i { width: 26px; height: 26px; color: var(--ink-2); }
.mode b { font-weight: 500; font-size: 13px; line-height: 1.25; }
.mode:hover span { border-color: var(--teal); }
.mode input:checked + span { border-color: var(--teal); background: var(--teal-soft); color: var(--teal-ink); box-shadow: inset 0 0 0 1px var(--teal); }
.mode input:checked + span .i { color: var(--teal-ink); }
.mode input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.role-grid { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.role-grid .check { font-size: 14px; }
.work-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.work-row .select-wrap { min-width: 150px; }
.quick-row { margin-top: 2px; }

/* ---------- Themen der Bühne ---------- */
.stage[data-theme="space"] { background: #070A1F; }
.stage[data-theme="space"]::before { background: radial-gradient(1.5px 1.5px at 10% 20%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 30% 70%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 55% 30%, #cfe 50%, transparent 51%), radial-gradient(1px 1px at 75% 85%, #fff 50%, transparent 51%), radial-gradient(2px 2px at 88% 15%, #ffd 50%, transparent 51%), radial-gradient(1px 1px at 42% 48%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 65% 60%, #fff 50%, transparent 51%), radial-gradient(500px 300px at 80% 0%, rgba(124, 77, 255, .35), transparent 70%); background-size: 260px 260px, 310px 310px, 280px 280px, 330px 330px, 360px 360px, 210px 210px, 240px 240px, 100% 100%; animation: twinkle 6s ease-in-out infinite alternate; }
@keyframes twinkle { to { opacity: .6; } }
.stage[data-theme="ocean"] { background: linear-gradient(180deg, #053B57, #032438); }
.stage[data-theme="ocean"]::before { background: radial-gradient(600px 220px at 20% 0%, rgba(43, 211, 166, .3), transparent 70%), radial-gradient(500px 260px at 100% 100%, rgba(11, 118, 232, .35), transparent 70%); }
.stage[data-theme="autumn"] { background: linear-gradient(160deg, #3A1C0B, #241006); }
.stage[data-theme="autumn"]::before { background: radial-gradient(520px 260px at 85% 0%, rgba(251, 166, 10, .35), transparent 70%), radial-gradient(420px 220px at 0% 100%, rgba(242, 96, 79, .3), transparent 70%); }
.stage[data-theme="winter"] { background: linear-gradient(180deg, #13294B, #0B1A2C); }
.stage[data-theme="winter"]::before { background-image: radial-gradient(3px 3px at 20px 30px, rgba(255, 255, 255, .9) 50%, transparent 51%), radial-gradient(2px 2px at 90px 80px, rgba(255, 255, 255, .8) 50%, transparent 51%), radial-gradient(3px 3px at 150px 140px, rgba(255, 255, 255, .7) 50%, transparent 51%), radial-gradient(2px 2px at 60px 170px, rgba(255, 255, 255, .8) 50%, transparent 51%); background-size: 200px 200px; animation: snow 14s linear infinite; }
@keyframes snow { from { background-position: 0 0; } to { background-position: 40px 400px; } }
.stage[data-theme="neon"] { background: linear-gradient(135deg, #1B0533, #0A0320); }
.stage[data-theme="neon"]::before { background: radial-gradient(520px 260px at 90% 0%, rgba(255, 46, 196, .35), transparent 70%), radial-gradient(520px 260px at 0% 100%, rgba(0, 229, 255, .3), transparent 70%); }
.stage[data-theme="neon"] .stage-name { text-shadow: 0 0 18px rgba(255, 46, 196, .7), 0 0 40px rgba(0, 229, 255, .4); }

.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
.stage-clock { position: absolute; right: 14px; bottom: 14px; z-index: 6; padding: 6px 14px; border-radius: 99px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); color: #fff; font-weight: 700; font-size: clamp(1rem, 2.2vw, 1.6rem); font-variant-numeric: tabular-nums; }
.stage-clock.is-low { background: #FBA60A; color: #0B1A2C; }
.stage-clock.is-end { background: #F2604F; color: #fff; animation: pulse 1s ease-in-out infinite; }

/* ---------- Kacheln (Scheinwerfer, Letzter bleibt) ---------- */
.tiles { width: 100%; height: 100%; display: grid; gap: 8px; align-content: stretch; }
.tile { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; overflow: hidden; border-radius: 10px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); font-weight: 700; white-space: nowrap; padding: 0 6px; transition: background-color .08s, color .08s, transform .2s, opacity .35s; }
.tile.is-lit { background: #FBA60A; color: #0B1A2C; border-color: #FBA60A; box-shadow: 0 0 30px rgba(251, 166, 10, .7); transform: scale(1.06); }
.tile.is-out { opacity: .08; transform: scale(.8); }
.tile.is-win { background: #2BD3A6; color: #0B1A2C; transform: scale(1.12); box-shadow: 0 0 40px rgba(43, 211, 166, .8); }
.tiles.is-dim .tile:not(.is-win) { opacity: .15; }

/* ---------- Wettrennen ---------- */
.race { width: 100%; height: 100%; display: grid; gap: 6px; position: relative; }
.lane { position: relative; display: grid; grid-template-columns: minmax(80px, 22%) 1fr; align-items: center; gap: 10px; min-height: 0; }
.lane-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.track { position: relative; height: 70%; min-height: 14px; border-radius: 99px; background: rgba(255, 255, 255, .07); border-right: 4px dashed rgba(255, 255, 255, .5); }
.runner { position: absolute; top: 50%; left: 0; width: var(--rs, 34px); height: var(--rs, 34px); margin-top: calc(var(--rs, 34px) / -2); border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: calc(var(--rs, 34px) * .45); color: #0B1A2C; box-shadow: 0 4px 12px rgba(0, 0, 0, .4); will-change: transform; }
.lane.is-win .lane-name { color: #2BD3A6; }

/* ---------- Lottokugeln ---------- */
.lotto-box { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.lotto-box canvas { display: block; }
.stage-names.balls .name-box { border-radius: 999px; background: #FFFFFF; border: 0; box-shadow: inset 0 -8px 0 rgba(0, 0, 0, .12), 0 16px 34px -14px rgba(0, 0, 0, .8); padding: 0 4%; }
.stage-names.balls .stage-name { color: #0B1A2C; text-shadow: none; }
.stage-names.balls.n1 .name-box { width: min(92%, 900px); height: 62%; justify-self: center; align-self: center; }

/* ---------- Rubbellos ---------- */
.scratch-box { position: relative; width: min(760px, 94%); height: 72%; border-radius: 22px; background: #FFFFFF; display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: 0 20px 44px -18px rgba(0, 0, 0, .8); }
.scratch-box .stage-name { color: #0B1A2C; text-shadow: none; }
.scratch-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; transition: opacity .5s; }
.scratch-box canvas.is-gone { opacity: 0; pointer-events: none; }

/* ---------- Buchstabenrätsel ---------- */
.letters-box { display: grid; justify-items: center; gap: 18px; width: 100%; }
.letters-q { margin: 0; color: rgba(255, 255, 255, .75); font-weight: 500; font-size: clamp(1rem, 2vw, 1.5rem); }
.letters { display: flex; flex-wrap: wrap; justify-content: center; gap: .18em; font-weight: 700; line-height: 1; }
.letter { display: grid; place-items: center; width: .82em; height: 1.15em; border-bottom: .08em solid rgba(255, 255, 255, .55); }
.letter.is-space { border-bottom-color: transparent; width: .4em; }
.letter.is-open { color: #FFFFFF; border-bottom-color: #2BD3A6; animation: pop .35s ease; }

/* ---------- Joker ---------- */
.flip-back.is-joker { background: linear-gradient(135deg, #FFE08A, #FBA60A); }
.flip-front.is-joker { background: linear-gradient(135deg, #7C4DFF, #4A1FB8); }
.joker-text { display: grid; gap: .3em; text-align: center; color: #0B1A2C; padding: 0 6%; }
.joker-text small { font-size: .38em; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #6B4500; }
.joker-text span { font-weight: 700; line-height: 1.15; }

/* ---------- Gruppen-Erweiterungen ---------- */
.g-card { position: relative; border-top: 6px solid var(--gc, #08806A); }
.g-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 6px; }
.g-head .g-title { margin: 0; }
.g-card li { cursor: pointer; border-radius: 6px; padding: 1px 4px; margin: 0 -4px; }
.g-card li:hover { background: #EEF4F2; }
.g-card li.is-picked { background: #FBA60A; color: #0B1A2C; }
.role-tag { display: inline-block; font-size: .68rem; font-weight: 500; padding: 1px 7px; border-radius: 99px; background: #E6F0FD; color: #0A58B0; margin-left: 4px; vertical-align: .15em; white-space: nowrap; }
.role-tag[data-role="speaker"] { background: #FFF3D6; color: #6B4500; }
.role-tag[data-role="time"] { background: #FDEBE8; color: #A3321F; }
.role-tag[data-role="writer"] { background: #E2F5EF; color: #07705C; }
.role-tag[data-role="lead"] { background: #EFE7FF; color: #5A2DB5; }
.score { display: flex; align-items: center; gap: 4px; }
.score b { min-width: 2ch; text-align: center; font-size: 1.15rem; color: #0B1A2C; }
.score button { width: 28px; height: 28px; border-radius: 8px; border: 1.5px solid #D2DBE5; background: #F7FAFC; color: #0B1A2C; font-weight: 700; line-height: 1; }
.score button:hover { border-color: #08806A; }
.g-card.is-lead { box-shadow: 0 0 0 3px #FBA60A, 0 10px 24px -14px rgba(0, 0, 0, .7); }
.g-card.is-lead .g-title::after { content: " ★"; color: #C97F00; }
.g-card.is-lit { box-shadow: 0 0 0 4px #FBA60A, 0 0 40px rgba(251, 166, 10, .7); transform: scale(1.03); }
.g-card.is-chosen { box-shadow: 0 0 0 5px #2BD3A6, 0 0 50px rgba(43, 211, 166, .8); transform: scale(1.05); z-index: 2; }
.g-grid.is-dim .g-card:not(.is-chosen) { opacity: .35; }
.g-card { transition: transform .15s, box-shadow .15s, opacity .3s; }
.stage-wrap.is-beamer .role-tag { font-size: clamp(.7rem, 1vw, 1rem); }
.joker-text .jt { font-size: clamp(1.6rem, 5vw, 4.2rem); }
.joker-text .js { font-size: clamp(.95rem, 2vw, 1.7rem); font-weight: 500; }

/* ---------- Timer-Darstellungen ---------- */
.timer-face.ts-ring { display: grid; place-items: center; }
.timer-face.ts-ring > * { grid-area: 1 / 1; }
.tv { display: block; height: 86%; width: auto; max-width: 100%; overflow: visible; }
.ts-pie .tv, .ts-hourglass .tv { height: 74%; }
.tv-bg { fill: none; stroke: rgba(255, 255, 255, .14); stroke-width: 14; }
.tv-arc { fill: none; stroke: #2BD3A6; stroke-width: 14; stroke-linecap: round; transition: stroke-dashoffset .25s linear, stroke .3s; }
.tv-disc { fill: rgba(255, 255, 255, .1); }
.tv-pie { fill: #2BD3A6; transition: fill .3s; }
.tv-glass { fill: rgba(255, 255, 255, .06); stroke: rgba(255, 255, 255, .75); stroke-width: 4; stroke-linejoin: round; }
.tv-cap { fill: #C9A227; }
.tv-sand { fill: #FBA60A; }
.tv-stream { stroke: #FBA60A; stroke-width: 3; stroke-dasharray: 4 5; animation: sand .4s linear infinite; }
@keyframes sand { to { stroke-dashoffset: -9; } }
.timer-face.is-low .tv-arc { stroke: #FBA60A; }
.timer-face.is-low .tv-pie { fill: #FBA60A; }
.timer-face.is-end .tv-arc, .timer-face.is-end .tv-pie { stroke: #FF998B; fill: #FF998B; }
.timer-face.is-end .tv-arc { fill: none; }
/* ---------- Bewegte Hintergründe, Branding ---------- */
.bg-layer { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.stage-inner, .think, .stage-clock { z-index: 2; }
.beamer-brand { display: none; align-items: center; gap: 8px; opacity: .8; }
.beamer-brand .logo-img { width: 30px; height: 30px; }
.beamer-brand .wordmark { width: 96px; height: 21px; background: #FFFFFF; }
.stage-wrap.is-beamer .beamer-brand { display: flex; margin-left: auto; }
.stage-wrap.is-beamer .stage-tools { margin-left: 16px; }
.back-link { margin: 0 0 18px; }
#resetAll { justify-self: start; }

/* =====================================================================
   Notenblick
   ===================================================================== */
.nb-grid { display: grid; grid-template-columns: minmax(330px, 440px) minmax(0, 1fr); gap: 20px; align-items: start; }
.nb-input { padding: 20px; display: grid; gap: 14px; }
.nb-main { position: sticky; top: 76px; }
.nb-sec { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 14px 0 0; display: grid; gap: 10px; min-width: 0; }
.nb-sec-title { font-weight: 700; font-size: 1rem; padding: 0; margin-bottom: 4px; }
details.nb-sec summary { font-weight: 700; font-size: 1rem; color: var(--ink); }
.grade-inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.grade-inputs.many { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gi { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px; padding: 6px 6px 6px 10px; border-radius: 12px; background: var(--surface-2); border: 1.5px solid var(--line-2); border-left: 6px solid var(--gc, #08806A); }
.gi label { font-weight: 700; font-size: 15px; min-width: 2.2ch; }
.gi-ctl { display: flex; align-items: center; gap: 2px; justify-content: flex-end; }
.gi input { width: 3.2em; text-align: center; font-weight: 700; padding: 6px 2px; border-radius: 8px; border: 1.5px solid var(--line-2); background: var(--surface); }
.gi button { width: 26px; height: 26px; border-radius: 8px; border: 0; background: transparent; color: var(--ink-2); font-weight: 700; font-size: 16px; }
.gi button:hover { background: var(--sunken); color: var(--ink); }
.nb-stats { margin: 0; font-weight: 500; font-size: 14px; color: var(--ink-2); }
.nb-avg-field .input { max-width: 140px; }
.teacher-hints { display: grid; gap: 8px; }
.teacher-hints:empty { display: none; }
.th { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; background: var(--yellow-soft); color: var(--yellow-ink); }
.th.is-red { background: var(--coral-soft); color: var(--coral-ink); }
.th.is-ok { background: var(--teal-soft); color: var(--teal-ink); }
.th .i { margin-top: 2px; flex: none; }
.th b { font-weight: 700; }
.task-list, .work-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.task-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px auto; gap: 6px; align-items: center; }
.task-row .input { padding: 8px 10px; font-size: 14.5px; }
.key-rows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.key-rows .gi input { width: 4em; }
.work-list li { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.work-list li.is-current { border-color: var(--teal); background: var(--teal-soft); }
.work-list .wl-meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-list .wl-meta small { color: var(--ink-3); margin-left: 6px; }
.work-list .wl-btns { display: flex; gap: 4px; flex: none; }

/* ---------- Folien ---------- */
.nb-slide { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2%; min-height: 0; text-align: center; }
.nb-kicker { margin: 0; color: #2BD3A6; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: clamp(.8rem, 1.6vw, 1.15rem); }
.nb-big { margin: 0; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; font-size: clamp(2rem, 7vw, 6rem); }
.nb-sub { margin: 0; color: rgba(255, 255, 255, .75); font-size: clamp(1rem, 2.2vw, 1.6rem); }
.nb-title { margin: 0; font-weight: 700; font-size: clamp(1.1rem, 2.6vw, 2rem); letter-spacing: -.01em; }
.nb-chart { width: 100%; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.nb-bars { flex: 1; min-height: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2%; align-items: end; padding: 0 2%; }
.nb-col { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.nb-track { width: 100%; flex: 1; display: flex; align-items: flex-end; min-height: 0; }
.nb-bar { width: 100%; border-radius: 10px 10px 4px 4px; transform-origin: bottom center; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .12); }
.nb-bar.is-masked { background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .28) 0 8px, transparent 8px 16px); opacity: .75; }
.nb-count { font-weight: 700; font-size: clamp(.9rem, 2.4vw, 2rem); font-variant-numeric: tabular-nums; white-space: nowrap; }
.nb-label { font-weight: 700; font-size: clamp(.85rem, 2vw, 1.6rem); white-space: nowrap; }
.nb-caption { margin: 0; color: rgba(255, 255, 255, .72); font-size: clamp(.85rem, 1.6vw, 1.2rem); text-align: center; }
.nb-dots { flex: 1; min-height: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2%; align-items: end; padding: 0 2%; }
.nb-dotcol { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.nb-dotstack { display: flex; flex-wrap: wrap-reverse; justify-content: center; align-content: flex-start; gap: 4px; width: 100%; }
.nb-dot { width: var(--ds, 18px); height: var(--ds, 18px); border-radius: 50%; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.nb-dot.is-masked { border: 3px dashed rgba(255, 255, 255, .7); background: transparent !important; box-shadow: none; display: grid; place-items: center; font-size: .55em; font-weight: 700; }
.nb-svg { width: 100%; flex: 1; min-height: 0; overflow: visible; }
.nb-donut-wrap { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; gap: 4%; }
.nb-donut-wrap svg { height: 100%; max-height: 100%; width: auto; aspect-ratio: 1; }
.nb-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; text-align: left; font-size: clamp(.85rem, 1.8vw, 1.4rem); font-weight: 500; }
.nb-legend li { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.nb-legend i { width: 18px; height: 18px; border-radius: 5px; flex: none; }
.nb-board { display: flex; gap: .08em; font-size: clamp(3rem, 15vw, 11rem); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.nb-board span { display: grid; place-items: center; min-width: .66em; padding: .06em .04em; border-radius: .12em; background: linear-gradient(180deg, #1C2C44 0 49%, #142338 51% 100%); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .08); }
.nb-board span.is-sep { min-width: .3em; background: none; box-shadow: none; }
.nb-delta { margin: 0; font-weight: 500; font-size: clamp(.95rem, 2vw, 1.5rem); padding: .3em .9em; border-radius: 99px; background: rgba(43, 211, 166, .16); color: #7FF0CF; }
.nb-delta.is-down { background: rgba(251, 166, 10, .16); color: #FFD27A; }
.nb-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; width: 100%; max-width: 1100px; }
.nb-fact { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: 18px; padding: 18px 16px; display: grid; gap: 6px; }
.nb-fact b { font-size: clamp(1.8rem, 4.6vw, 3.6rem); line-height: 1; color: #2BD3A6; }
.nb-fact span { color: rgba(255, 255, 255, .85); font-size: clamp(.9rem, 1.7vw, 1.3rem); }
.nb-tasks { width: 100%; max-width: 1100px; display: grid; gap: 1.6vh; }
.nb-task { display: grid; grid-template-columns: minmax(80px, 26%) 1fr auto; gap: 14px; align-items: center; font-size: clamp(.9rem, 2vw, 1.5rem); text-align: left; }
.nb-task .tn { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-task .tt { height: clamp(14px, 3.2vh, 34px); border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.nb-task .tb { height: 100%; border-radius: 99px; transform-origin: left center; }
.nb-task .tp { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 4ch; text-align: right; }
.nb-task .tag { display: inline-block; margin-left: 8px; font-size: .6em; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #2BD3A6; color: #0B1A2C; vertical-align: .2em; }
.nb-task .tag.is-hard { background: #FBA60A; }
.nb-key { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; width: 100%; max-width: 900px; }
.nb-keyc { border-radius: 16px; padding: 14px; background: rgba(255, 255, 255, .07); border-top: 6px solid var(--gc, #08806A); display: grid; gap: 4px; }
.nb-keyc b { font-size: clamp(1.6rem, 4vw, 3rem); line-height: 1; }
.nb-keyc span { color: rgba(255, 255, 255, .85); font-size: clamp(.85rem, 1.7vw, 1.25rem); }
.nb-comment { max-width: 1000px; display: grid; justify-items: center; gap: 2vh; }
.nb-cico { display: grid; place-items: center; width: clamp(56px, 9vh, 96px); height: clamp(56px, 9vh, 96px); border-radius: 26px; background: rgba(43, 211, 166, .16); color: #2BD3A6; }
.nb-cico .i { width: 55%; height: 55%; }
.nb-cico.is-trap { background: rgba(251, 166, 10, .16); color: #FBA60A; }
.nb-cico.is-tip { background: rgba(11, 118, 232, .2); color: #7DB5FF; }
.nb-ctext { margin: 0; font-size: clamp(1.15rem, 3.2vw, 2.6rem); line-height: 1.35; white-space: pre-wrap; font-weight: 500; }
.nb-trend { width: 100%; flex: 1; min-height: 0; }
@media (max-width: 1100px) { .nb-grid { grid-template-columns: minmax(0, 1fr); } .nb-main { position: static; } }
@media (max-width: 760px) { .grade-inputs, .grade-inputs.many, .key-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); } .nb-key { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
