/* votiime – Oberfläche auf Basis des Designsystems „Nightfall“ (Tokens 1:1 übernommen).
   Ergänzt um Glas-Flächen, weiche Schatten und Animationen im Stil moderner macOS-Apps. */
/* Schrift Urbanist (SIL OFL, web/fonts/OFL.txt) wird selbst ausgeliefert – keine Anfrage an Google Fonts */
@font-face {
  font-family: Urbanist; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/urbanist-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Urbanist; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/urbanist-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens: Dunkel (Standard) ---------- */
:root, [data-theme="nightfall"] {
  --bg: #0b0b0e; --frame: #141418; --surface: #1c1c21; --surface-raised: #26262c; --surface-inverse: #f6f6f8;
  --border: #2f2f37; --border-strong: #45454f; --grid: #2a2a31;
  --ink: #f4f4f6; --ink-muted: #9d9da8; --ink-inverse: #16161b;
  --lavender: #aba7de; --lavender-soft: #c9c6f0;
  --pink: #d92f6e; --pink-bright: #ee4d8b; --indigo: #4a3ef0; --indigo-bright: #7068ff; --blue: #1a6bec;
  --green: #1f9d5f; --green-soft: #1e3b2d; --red: #e5484d; --amber: #f2b33d; --note: #d7e5ff;
  --on-accent: #fff; --on-bright: #16161b;

  --glass: rgba(28, 28, 33, .62); --glass-strong: rgba(28, 28, 33, .86); --glass-line: rgba(255, 255, 255, .07);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px -6px rgba(0, 0, 0, .45);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, .3), 0 24px 60px -12px rgba(0, 0, 0, .6);
  --shadow-glow: 0 0 0 1px rgba(112, 104, 255, .35), 0 12px 40px -8px rgba(112, 104, 255, .45);
  --aurora-opacity: .55;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px; --space-8: 32px;
  --radius-sm: 8px; --radius-md: 16px; --radius-lg: 20px; --radius-xl: 28px; --radius-2xl: 36px; --radius-pill: 999px;
  --font-sans: Urbanist, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: dark;
}

/* ---------- Tokens: Hell ---------- */
[data-theme="daylight"] {
  --bg: #e9e9ee; --frame: #f6f6f9; --surface: #ffffff; --surface-raised: #f0f0f4; --surface-inverse: #17171c;
  --border: #e2e2e9; --border-strong: #c9c9d3; --grid: #e7e7ed;
  --ink: #16161b; --ink-muted: #5c5c68; --ink-inverse: #f4f4f6;
  --lavender: #5650ad; --lavender-soft: #d9d6f5;
  --pink: #c92a63; --pink-bright: #d92f6e; --indigo: #3d31e0; --indigo-bright: #3d31e0; --blue: #1662d8;
  --green: #17864f; --green-soft: #d6f2e3; --red: #cf3339; --amber: #e9a21f;
  --glass: rgba(255, 255, 255, .66); --glass-strong: rgba(255, 255, 255, .9); --glass-line: rgba(20, 20, 40, .07);
  --shadow-1: 0 1px 2px rgba(20, 20, 40, .06), 0 8px 24px -8px rgba(20, 20, 40, .14);
  --shadow-2: 0 2px 6px rgba(20, 20, 40, .06), 0 24px 60px -16px rgba(20, 20, 40, .22);
  --shadow-glow: 0 0 0 1px rgba(61, 49, 224, .25), 0 12px 40px -10px rgba(61, 49, 224, .35);
  --aurora-opacity: .32;
  color-scheme: light;
}

/* ---------- Grundlagen ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--frame); color: var(--ink); font: 400 15px/22px var(--font-sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
h1, h2, h3 { margin: 0; font-weight: 400; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: color-mix(in srgb, var(--indigo-bright) 40%, transparent); }
:focus-visible { outline: 2px solid var(--lavender); outline-offset: 2px; }
.muted { color: var(--ink-muted); }
.row { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: var(--space-3); }
.grow { flex: 1; min-width: 0; }

/* Typografie (Nightfall-Stile) */
.t-kpi { font-size: 72px; line-height: 72px; font-weight: 300; letter-spacing: -.02em; }
.t-welcome { font-size: clamp(34px, 5vw, 52px); line-height: 1.12; font-weight: 400; letter-spacing: -.015em; }
.t-welcome em { font-style: normal; color: var(--lavender); }
.t-brand { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.t-card-title { font-size: 24px; line-height: 30px; }
.t-lead { font-size: 18px; line-height: 26px; }
.t-label { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-muted); }
.t-caption { font-size: 12px; line-height: 16px; color: var(--ink-muted); }

/* ---------- Ambient-Hintergrund ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--frame); }
.aurora::before, .aurora::after, .aurora i {
  content: ''; position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  filter: blur(90px); opacity: var(--aurora-opacity); will-change: transform;
}
.aurora::before { background: radial-gradient(circle, var(--indigo) 0, transparent 65%); top: -25vmax; left: -15vmax; animation: drift1 28s var(--ease) infinite alternate; }
.aurora::after { background: radial-gradient(circle, var(--pink) 0, transparent 65%); bottom: -30vmax; right: -20vmax; animation: drift2 32s var(--ease) infinite alternate; }
.aurora i { background: radial-gradient(circle, var(--blue) 0, transparent 65%); top: 30%; left: 45%; width: 40vmax; height: 40vmax; opacity: calc(var(--aurora-opacity) * .6); animation: drift3 36s var(--ease) infinite alternate; }
.aurora.calm::before, .aurora.calm::after, .aurora.calm i { opacity: calc(var(--aurora-opacity) * .45); }
@keyframes drift1 { to { transform: translate(18vmax, 12vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-16vmax, -10vmax) scale(1.1); } }
@keyframes drift3 { to { transform: translate(-20vmax, 8vmax) scale(.85); } }

/* ---------- Animationen ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { opacity: 0; transform: scale(.6); } 70% { opacity: 1; transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(3px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 70%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes sheetIn { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes burst { 0% { transform: translate(0, 0) scale(1); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
@keyframes blink { 50% { opacity: 0; } }
.enter { animation: fadeUp .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
.fade { animation: fadeIn .4s var(--ease) both; }
.shake { animation: shake .45s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Icons ---------- */
.ic { display: block; flex: none; width: 20px; height: 20px; }
.ic-sm { width: 16px; height: 16px; } .ic-lg { width: 24px; height: 24px; }
.chip-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); display: grid; place-items: center; flex: none; }
.tone-indigo { background: var(--indigo); color: var(--on-accent); }
.tone-pink { background: var(--pink); color: var(--on-accent); }
.tone-blue { background: var(--blue); color: var(--on-accent); }
.tone-amber { background: var(--amber); color: var(--on-bright); }
.tone-lavender { background: var(--lavender-soft); color: var(--on-bright); }
.tone-green { background: var(--green); color: var(--on-accent); }
.tone-inverse { background: var(--surface-inverse); color: var(--ink-inverse); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: 44px; padding: 0 var(--space-5);
  border-radius: var(--radius-pill); border: 1px solid transparent; font: 500 15px/1 var(--font-sans); cursor: pointer; white-space: nowrap;
  transition: transform .18s var(--ease), background .18s, border-color .18s, box-shadow .25s, opacity .18s; user-select: none;
}
.btn:active:not(:disabled) { transform: scale(.96); }
.btn:disabled { opacity: .4; cursor: default; }
.btn-sm { height: 36px; padding: 0 var(--space-4); font-size: 14px; }
.btn-lg { height: 56px; padding: 0 var(--space-8); font-size: 17px; }
.btn-solid { background: var(--surface-inverse); color: var(--ink-inverse); box-shadow: var(--shadow-1); }
.btn-solid:hover:not(:disabled) { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.btn-accent { background: var(--indigo); color: var(--on-accent); box-shadow: var(--shadow-1); }
.btn-accent:hover:not(:disabled) { box-shadow: var(--shadow-glow); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-raised); }
.btn-quiet { background: transparent; color: var(--ink-muted); }
.btn-quiet:hover:not(:disabled) { background: var(--surface-raised); color: var(--ink); }
.btn-danger { background: transparent; color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.btn-danger:hover:not(:disabled) { background: color-mix(in srgb, var(--red) 14%, transparent); }
.btn-icon { width: 40px; height: 40px; padding: 0; background: transparent; color: var(--ink); border-color: var(--border); }
.btn-icon:hover:not(:disabled) { background: var(--surface-raised); }
.btn-icon.btn-sm { width: 32px; height: 32px; }
.btn-icon.borderless { border-color: transparent; }
.kbd { font-size: 11px; opacity: .6; padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, currentColor 12%, transparent); }

/* ---------- Eingaben ---------- */
.input, .textarea, .select {
  width: 100%; height: 48px; padding: 0 var(--space-5); border-radius: var(--radius-pill); border: 1px solid var(--border);
  background: var(--surface-raised); color: var(--ink); outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
.textarea { height: auto; min-height: 104px; padding: var(--space-4) var(--space-5); border-radius: var(--radius-lg); resize: vertical; line-height: 22px; }
.select { appearance: none; padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239d9da8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 18px; }
.input::placeholder, .textarea::placeholder { color: var(--ink-muted); }
.input:focus, .textarea:focus, .select:focus { border-color: var(--lavender); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lavender) 20%, transparent); }
.input-ghost { background: transparent; border-color: transparent; padding: 0 var(--space-3); }
.input-ghost:hover { background: var(--surface-raised); }
.field { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.field > label { font-size: 13px; font-weight: 500; color: var(--ink-muted); padding-left: var(--space-2); }
.check { display: inline-flex; align-items: center; gap: var(--space-3); cursor: pointer; user-select: none; }
.check input { appearance: none; width: 44px; height: 26px; border-radius: var(--radius-pill); background: var(--border-strong); position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; }
.check input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .25s var(--spring); }
.check input:checked { background: var(--green); }
.check input:checked::after { transform: translateX(18px); }

/* ---------- Flächen ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: var(--space-6); box-shadow: var(--shadow-1); }
.card-raised { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5); }
.glass { background: var(--glass); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px); border: 1px solid var(--glass-line); }
.tile { transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--border-strong); }

.seg { display: inline-flex; padding: var(--space-1); gap: var(--space-1); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-pill); }
.seg button { border: 0; background: transparent; color: var(--ink-muted); height: 34px; padding: 0 var(--space-4); border-radius: var(--radius-pill); cursor: pointer; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; transition: background .2s, color .2s; white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface-raised); color: var(--ink); box-shadow: inset 0 0 0 1px var(--border), var(--shadow-1); }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 var(--space-3); border-radius: var(--radius-pill); font-size: 13px; font-weight: 500; white-space: nowrap; background: var(--surface-raised); border: 1px solid var(--border); }
.badge-inverse { background: var(--surface-inverse); color: var(--ink-inverse); border-color: transparent; }
.badge-indigo { background: var(--indigo); color: var(--on-accent); border-color: transparent; }
.badge-pink { background: var(--pink); color: var(--on-accent); border-color: transparent; }
.badge-green { background: var(--green-soft); color: var(--ink); border-color: transparent; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse 1.6s infinite; flex: none; }

.toast-host { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: var(--radius-pill); background: var(--glass-strong); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid var(--glass-line); box-shadow: var(--shadow-2); font-weight: 500; animation: sheetIn .35s var(--spring) both; white-space: nowrap; }
.toast.out { opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; }
.toast .ic { color: var(--green); }
.toast.warn .ic { color: var(--amber); }

.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-3); text-align: center; color: var(--ink-muted); padding: var(--space-8); width: 100%; }
.empty .chip-icon { width: 56px; height: 56px; border-radius: 18px; background: var(--surface-raised); color: var(--ink-muted); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--ink); animation: spin .8s linear infinite; }
.waiting-dots { display: inline-flex; gap: 6px; }
.waiting-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-muted); animation: pop 1.2s var(--ease) infinite; }
.waiting-dots i:nth-child(2) { animation-delay: .15s; } .waiting-dots i:nth-child(3) { animation-delay: .3s; }

/* ==========================================================
   Beitreten (/)
   ========================================================== */
.join-page { min-height: 100vh; display: grid; place-items: center; padding: 96px var(--space-4) 120px; }
.topbar-float { position: fixed; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: var(--space-5) var(--space-6); z-index: 5; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-inverse); color: var(--ink-inverse); box-shadow: var(--shadow-1); }
.join-card { width: min(460px, 100%); padding: 40px 36px 32px; border-radius: var(--radius-2xl); box-shadow: var(--shadow-2); text-align: center; }
.join-card h1 { font-size: 32px; line-height: 38px; margin: var(--space-5) 0 var(--space-2); }
.join-badge { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto; display: grid; place-items: center; background: var(--indigo); color: var(--on-accent); box-shadow: var(--shadow-glow); }
.code-wrap { position: relative; margin: var(--space-8) 0 0; }
.code-boxes { display: grid; grid-template-columns: repeat(4, 1fr) 14px repeat(4, 1fr); gap: 8px; pointer-events: none; }
.code-box { height: 58px; border-radius: 14px; background: var(--surface-raised); border: 1px solid var(--border); display: grid; place-items: center; font-size: 26px; font-weight: 500; font-variant-numeric: tabular-nums; transition: border-color .2s, box-shadow .2s; }
.code-box.filled { border-color: var(--border-strong); animation: pop .3s var(--spring); }
.code-box.cursor { border-color: var(--lavender); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lavender) 22%, transparent); }
.code-box.cursor::after { content: ''; width: 2px; height: 26px; background: var(--lavender); border-radius: 2px; animation: blink 1s steps(1) infinite; }
.code-sep { align-self: center; justify-self: center; width: 8px; height: 2px; background: var(--border-strong); border-radius: 2px; }
.code-input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; font-size: 16px; cursor: text; caret-color: transparent; border: 0; }
.code-wrap.invalid .code-box { border-color: var(--red); }
.join-error { color: var(--red); font-size: 14px; min-height: 22px; margin: var(--space-3) 0 var(--space-4); }
.join-legal { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--ink-muted); text-align: center; width: min(560px, calc(100% - 32px)); }

/* ==========================================================
   Abstimmen (/vote)
   ========================================================== */
.vote-shell { max-width: 580px; margin: 0 auto; padding: var(--space-5) var(--space-4) 140px; min-height: 100vh; display: flex; flex-direction: column; }
.vote-head { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-8); }
.progress { height: 6px; background: var(--surface-raised); border-radius: var(--radius-pill); overflow: hidden; flex: 1; }
.progress > div { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--indigo-bright), var(--pink-bright)); transition: width .5s var(--ease); }
.vote-question { font-size: clamp(26px, 6vw, 34px); line-height: 1.2; margin-bottom: var(--space-6); }
.vote-type { display: inline-flex; align-items: center; gap: 8px; margin-bottom: var(--space-4); }

.option { position: relative; width: 100%; display: flex; align-items: center; gap: var(--space-4); min-height: 64px; padding: var(--space-3) var(--space-4); margin-bottom: var(--space-3);
  border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); color: var(--ink); text-align: left; cursor: pointer; font-size: 17px;
  box-shadow: var(--shadow-1); transition: transform .2s var(--ease), border-color .2s, background .2s, box-shadow .25s; }
.option:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.option:active { transform: scale(.985); }
.option .letter { width: 36px; height: 36px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--surface-raised); border: 1px solid var(--border); font-weight: 600; font-size: 14px; transition: background .2s, color .2s; }
.option .tick { margin-left: auto; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--border-strong); transition: background .2s, border-color .2s; color: transparent; flex: none; }
.option.sel { border-color: var(--indigo-bright); background: color-mix(in srgb, var(--indigo) 14%, var(--surface)); box-shadow: var(--shadow-glow); }
.option.sel .letter { background: var(--indigo); color: var(--on-accent); border-color: transparent; }
.option.sel .tick { background: var(--indigo); border-color: var(--indigo); color: #fff; animation: pop .35s var(--spring); }

.scale-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(44px, 1fr)); gap: 8px; }
.scale-btn { height: 56px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); font-size: 18px; font-weight: 500; cursor: pointer; box-shadow: var(--shadow-1); transition: transform .2s var(--spring), background .2s, border-color .2s; }
.scale-btn:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.scale-btn.sel { background: var(--indigo); border-color: transparent; color: #fff; transform: translateY(-2px) scale(1.06); box-shadow: var(--shadow-glow); }
.scale-labels { display: flex; justify-content: space-between; margin-top: var(--space-3); font-size: 13px; color: var(--ink-muted); }

.rank-item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4); margin-bottom: 10px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-1); }
.rank-item.moved { animation: pop .35s var(--spring); }
.rank-pos { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-inverse); color: var(--ink-inverse); font-weight: 600; flex: none; }
.rank-item span { flex: 1; font-size: 17px; }

.composer { display: flex; flex-direction: column; gap: var(--space-3); }
.char-count { align-self: flex-end; font-size: 12px; color: var(--ink-muted); margin-top: -4px; }

.vote-nav { position: fixed; left: 0; right: 0; bottom: 0; padding: var(--space-4); display: flex; justify-content: center; z-index: 5; }
.vote-nav-inner { width: min(580px, 100%); display: flex; gap: var(--space-2); padding: 8px; border-radius: var(--radius-pill); box-shadow: var(--shadow-2); }
.vote-nav-inner .btn { flex: 1; }

.done-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: var(--space-4); padding: var(--space-8) 0; }
.done-check { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; box-shadow: 0 16px 48px -10px color-mix(in srgb, var(--green) 70%, transparent); animation: pop .55s var(--spring) both; }
.done-check path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .5s .25s var(--ease) forwards; }
.sent-banner { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-radius: var(--radius-lg); background: var(--green-soft); margin: var(--space-5) 0; animation: fadeUp .4s var(--spring) both; }
.sent-banner .ic { color: var(--green); }
.locked-banner { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-5); border-radius: var(--radius-lg); background: var(--surface-raised); border: 1px solid var(--border); }
.burst { position: fixed; pointer-events: none; z-index: 200; width: 0; height: 0; }
.burst i { position: absolute; width: 8px; height: 8px; border-radius: 3px; animation: burst .8s var(--ease) forwards; }

/* ==========================================================
   Ergebnisse (Präsentator, Embed, Teilnehmer, Editor-Vorschau)
   ========================================================== */
.res { width: 100%; }
.bars { display: flex; flex-direction: column; gap: var(--space-4); width: 100%; }
.bar { display: grid; grid-template-columns: minmax(120px, 28%) 1fr auto; gap: var(--space-5); align-items: center; animation: fadeUp .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
.bar-label { font-size: 1.15em; display: flex; align-items: center; gap: 10px; min-width: 0; }
.bar-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { position: relative; height: 56px; border-radius: var(--radius-pill); background: var(--surface-raised); border: 1px solid var(--border); overflow: hidden; }
.bar-fill { position: absolute; inset: 0 auto 0 0; border-radius: inherit; transition: width .9s var(--ease); }
.bar-fill::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.18), transparent 60%); border-radius: inherit; }
.bar-val { font-size: 1.6em; font-weight: 300; font-variant-numeric: tabular-nums; min-width: 3.4em; text-align: right; line-height: 1.05; }
.bar-val .pct::after { content: ' %'; font-size: .6em; color: var(--ink-muted); }
.bar-val small { display: block; font-size: .45em; color: var(--ink-muted); font-weight: 500; line-height: 1.4; }
.bar.correct .bar-track { box-shadow: 0 0 0 2px var(--green); }
.correct-mark { color: var(--green); }

.kpi-row { display: flex; align-items: flex-end; gap: var(--space-6); flex-wrap: wrap; margin-bottom: var(--space-6); }
.kpi-big { font-size: clamp(64px, 9vw, 120px); line-height: .95; font-weight: 300; letter-spacing: -.03em; }
.kpi-sub { padding-bottom: 12px; }
.columns { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--space-3); align-items: end; height: 240px; width: 100%; }
.col { display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; animation: fadeUp .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
.col-bar { width: 100%; max-width: 72px; border-radius: 16px 16px 8px 8px; transition: height .9s var(--ease); min-height: 6px; position: relative; }
.col-bar::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.2), transparent 50%); border-radius: inherit; }
.col-n { font-size: 13px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.col-label { font-size: 16px; font-weight: 500; }

.cloud { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .15em .55em; padding: var(--space-6); line-height: 1.05; width: 100%; }
.cloud span { font-weight: 600; letter-spacing: -.02em; animation: pop .6s var(--spring) both; animation-delay: calc(var(--i, 0) * 35ms); transition: font-size .6s var(--ease); }

.cards-grid { columns: 3 240px; column-gap: var(--space-4); width: 100%; }
.answer-card { break-inside: avoid; margin-bottom: var(--space-4); padding: var(--space-5); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-1); font-size: 1.05em; position: relative; animation: pop .5s var(--spring) both; animation-delay: calc(var(--i, 0) * 40ms); }
.answer-card .tools { position: absolute; top: 8px; right: 8px; opacity: 0; transition: opacity .2s; }
.answer-card:hover .tools { opacity: 1; }

.qa-list { display: flex; flex-direction: column; gap: var(--space-3); width: 100%; }
.qa-row { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-5); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-1); animation: fadeUp .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); transition: opacity .3s; }
.qa-row.answered { opacity: .45; }
.qa-row.answered .qa-text { text-decoration: line-through; }
.qa-votes { min-width: 64px; height: 44px; padding: 0 12px; border-radius: var(--radius-pill); display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--surface-raised); border: 1px solid var(--border); font-weight: 600; font-variant-numeric: tabular-nums; flex: none; }
button.qa-votes { cursor: pointer; transition: background .2s, color .2s, transform .2s var(--spring); }
button.qa-votes:hover { background: var(--indigo); color: #fff; transform: scale(1.05); }
.qa-text { flex: 1; font-size: 1.1em; }

.quote-stage { width: 100%; display: flex; flex-direction: column; align-items: center; }
.quote-card { position: relative; width: min(980px, 100%); padding: 56px 64px 44px; border-radius: var(--radius-2xl); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-2); animation: slideIn .7s var(--ease) both; overflow: hidden; }
.quote-card::before { content: '\201C'; position: absolute; top: -36px; right: 40px; font-size: 220px; line-height: 1; color: var(--indigo-bright); opacity: .22; font-weight: 600; pointer-events: none; }
.quote-text { position: relative; font-size: clamp(22px, 3vw, 38px); line-height: 1.3; font-weight: 300; letter-spacing: -.01em; }
.quote-by { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-8); }
.avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; flex: none; }
.quote-dots { display: flex; gap: 6px; justify-content: center; margin-top: var(--space-6); }
.quote-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); transition: width .3s var(--ease), background .3s; }
.quote-dots i.on { width: 28px; border-radius: 4px; background: var(--ink); }

/* ==========================================================
   Präsentator & Embed
   ========================================================== */
.stage { min-height: 100vh; display: flex; flex-direction: column; padding: var(--space-6) clamp(24px, 4vw, 64px) 120px; }
.stage-top { display: flex; align-items: center; gap: var(--space-4); padding: 10px 14px 10px 10px; border-radius: var(--radius-xl); box-shadow: var(--shadow-1); animation: fadeUp .6s var(--ease) both; }
.stage-qr { width: 72px; height: 72px; border-radius: 14px; background: #fff; padding: 6px; flex: none; }
.stage-code { font-size: 34px; font-weight: 600; letter-spacing: .06em; font-variant-numeric: tabular-nums; line-height: 1; margin-top: 4px; }
.stage-stats { margin-left: auto; display: flex; gap: var(--space-2); flex-wrap: wrap; justify-content: flex-end; }
.stage-title { font-size: clamp(32px, 4.2vw, 60px); line-height: 1.1; letter-spacing: -.02em; margin: clamp(24px, 5vh, 56px) 0 var(--space-3); animation: fadeUp .6s var(--ease) both; }
.stage-meta { display: flex; align-items: center; gap: var(--space-3); margin-bottom: clamp(16px, 4vh, 40px); flex-wrap: wrap; }
.stage-body { flex: 1; display: flex; align-items: center; font-size: clamp(15px, 1.4vw, 20px); }
.embed .stage { padding: var(--space-6) var(--space-8); }
.embed .stage-title { margin-top: 0; }

.dock { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 8px; border-radius: 24px; box-shadow: var(--shadow-2); z-index: 20; transition: opacity .35s var(--ease), transform .35s var(--ease); max-width: calc(100vw - 24px); }
.dock.idle { opacity: 0; transform: translateX(-50%) translateY(12px); }
.dock-sep { width: 1px; height: 28px; background: var(--border); margin: 0 6px; flex: none; }
.dock-btn { position: relative; width: 44px; height: 44px; flex: none; border-radius: 14px; border: 0; background: transparent; color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: background .2s, transform .25s var(--spring); }
.dock-btn:hover:not(:disabled) { background: var(--surface-raised); transform: translateY(-3px) scale(1.08); }
.dock-btn:disabled { opacity: .35; cursor: default; }
.dock-btn.on { background: var(--surface-inverse); color: var(--ink-inverse); }
.dock-btn.warn.on { background: var(--pink); color: #fff; }
.dock-btn[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 6px 12px; border-radius: 10px; font-size: 13px; font-weight: 500; background: var(--surface-inverse); color: var(--ink-inverse); box-shadow: var(--shadow-1); pointer-events: none; animation: fadeIn .15s both; }
.dock-count { padding: 0 12px; font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; }
.slide-strip { position: fixed; right: 22px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 15; }
.slide-strip button { width: 10px; height: 10px; border-radius: 5px; border: 0; background: var(--border-strong); cursor: pointer; padding: 0; transition: height .3s var(--ease), background .3s; }
.slide-strip button.on { height: 28px; background: var(--ink); }
body.overlay, body.overlay .aurora, body.transparent, body.transparent .aurora { background: transparent; }
body.overlay .aurora::before, body.overlay .aurora::after, body.overlay .aurora i,
body.transparent .aurora::before, body.transparent .aurora::after, body.transparent .aurora i,
body.overlay .stage-top, body.overlay .dock, body.overlay .slide-strip { display: none; }

/* ==========================================================
   Editor (/admin) – App-Fenster im macOS-Stil
   ========================================================== */
.app { display: grid; grid-template-columns: 264px 1fr; height: 100vh; }
.sidebar { display: flex; flex-direction: column; gap: 2px; padding: var(--space-5) var(--space-3); border-right: 1px solid var(--glass-line); overflow-y: auto; }
.sidebar .brand { padding: 0 var(--space-3) var(--space-5); }
.side-label { font-size: 12px; font-weight: 600; color: var(--ink-muted); padding: var(--space-4) var(--space-3) 6px; }
.side-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px var(--space-3); border-radius: 12px; border: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; font-size: 14px; transition: background .15s; }
.side-item:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.side-item.on { background: color-mix(in srgb, var(--ink) 10%, transparent); font-weight: 500; }
.side-item .ic { color: var(--ink-muted); }
.side-item.on .ic { color: var(--lavender); }
.side-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-item small { color: var(--ink-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.side-foot { margin-top: auto; padding: var(--space-4) var(--space-1) 0; display: flex; flex-direction: column; gap: var(--space-3); }
.lan-card { padding: var(--space-4); border-radius: var(--radius-md); background: color-mix(in srgb, var(--ink) 5%, transparent); font-size: 13px; }
.lan-card code { display: block; margin-top: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--lavender); word-break: break-all; }

.main { overflow-y: auto; position: relative; }
.toolbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: var(--space-3); padding: 12px var(--space-6); border-bottom: 1px solid var(--glass-line); border-left: 0; border-right: 0; border-top: 0; min-height: 68px; }
.toolbar .title-input { font-size: 20px; font-weight: 600; max-width: 420px; min-width: 12em; }
.save-state { font-size: 13px; color: var(--ink-muted); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.save-state .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.save-state.saved .dot { background: var(--green); }

.home { padding: clamp(28px, 5vw, 56px) clamp(24px, 4vw, 56px) 80px; max-width: 1320px; }
.hero { display: grid; grid-template-columns: 1.35fr 1fr; gap: var(--space-5); margin: var(--space-6) 0 0; }
.hero-feature { position: relative; overflow: hidden; border-radius: var(--radius-xl); padding: var(--space-8); background: var(--indigo); color: #fff; box-shadow: var(--shadow-glow); min-height: 250px; display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-6); }
.hero-feature::after { content: ''; position: absolute; right: -90px; top: -90px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.28), transparent 70%); pointer-events: none; }
.hero-feature .btn-solid { background: #fff; color: #16161b; }
.hero-feature .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.hero-feature .btn-ghost:hover { background: rgba(255,255,255,.12); }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
.stat { padding: var(--space-6); border-radius: var(--radius-xl); display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-4); }
.stat .t-kpi { font-size: 56px; line-height: 56px; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin: 48px 0 var(--space-5); flex-wrap: wrap; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: var(--space-5); }
.pres-tile { display: flex; flex-direction: column; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-1); overflow: hidden; cursor: pointer; text-align: left; padding: 0; color: inherit; position: relative; }
.pres-thumb { position: relative; height: 150px; padding: var(--space-5); display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; background: var(--surface-raised); overflow: hidden; }
.pres-thumb .mini-bars { display: flex; flex-direction: column; gap: 7px; position: relative; }
.pres-thumb .mini-bars i { display: block; height: 10px; border-radius: 5px; transition: width .7s var(--ease); }
.pres-tile:hover .mini-bars i { width: var(--w2) !important; }
.pres-thumb .glow { position: absolute; width: 220px; height: 220px; border-radius: 50%; right: -70px; top: -90px; filter: blur(30px); opacity: .55; }
.pres-thumb .mode { position: absolute; top: 14px; left: 14px; }
.pres-body { padding: var(--space-5) var(--space-5) var(--space-3); display: flex; flex-direction: column; gap: 4px; }
.pres-title { font-size: 18px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pres-actions { display: flex; gap: 8px; padding: var(--space-2) var(--space-5) var(--space-5); align-items: center; }
.pres-actions .btn-accent { flex: 1; }
.new-tile { border: 1.5px dashed var(--border-strong); background: transparent; box-shadow: none; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 290px; color: var(--ink-muted); gap: var(--space-3); border-radius: var(--radius-xl); cursor: pointer; }
.new-tile:hover { color: var(--ink); border-color: var(--lavender); transform: translateY(-3px); }
.new-tile .plus { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-raised); transition: transform .35s var(--spring), background .2s, color .2s; }
.new-tile:hover .plus { transform: rotate(90deg) scale(1.08); background: var(--indigo); color: #fff; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: var(--space-4); }
.tpl-tile { display: flex; gap: var(--space-4); align-items: flex-start; padding: var(--space-5); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-1); cursor: pointer; text-align: left; color: inherit; }
.tpl-tile p { font-size: 13px; color: var(--ink-muted); line-height: 18px; margin-top: 4px; }

/* Folien-Editor: Leiste · Bühne · Inspektor */
.editor { display: grid; grid-template-columns: 236px 1fr 360px; min-height: calc(100vh - 68px); }
.rail { border-right: 1px solid var(--border); padding: var(--space-4) var(--space-3); display: flex; flex-direction: column; gap: 6px; overflow-y: auto; max-height: calc(100vh - 68px); position: sticky; top: 68px; }
.thumb { position: relative; display: flex; gap: 8px; padding: 8px; border-radius: var(--radius-md); background: transparent; border: 1px solid transparent; cursor: grab; text-align: left; color: inherit; transition: background .15s, border-color .15s, box-shadow .2s; animation: fadeUp .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 30ms); }
.thumb:hover { background: var(--surface-raised); }
.thumb.on { background: var(--surface); border-color: var(--border-strong); box-shadow: var(--shadow-1); }
.thumb.dragging { opacity: .35; }
.thumb.drop-target { box-shadow: 0 -3px 0 var(--lavender); }
.thumb-num { width: 18px; font-size: 12px; color: var(--ink-muted); padding-top: 4px; text-align: right; flex: none; font-variant-numeric: tabular-nums; }
.thumb-card { flex: 1; min-width: 0; aspect-ratio: 16 / 10; border-radius: 10px; background: var(--frame); border: 1px solid var(--border); padding: 8px; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; overflow: hidden; }
.thumb-card .q { font-size: 11px; line-height: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.thumb-card .chip-icon { width: 22px; height: 22px; border-radius: 6px; }
.thumb-card .chip-icon .ic { width: 13px; height: 13px; }
.add-slide { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: var(--radius-md); border: 1.5px dashed var(--border-strong); background: transparent; color: var(--ink-muted); cursor: pointer; margin: 6px 0 0 26px; transition: color .2s, border-color .2s; font-size: 14px; }
.add-slide:hover { color: var(--ink); border-color: var(--lavender); }

.canvas-wrap { padding: var(--space-8); display: flex; flex-direction: column; align-items: center; gap: var(--space-4); min-width: 0; }
.canvas { color: var(--ink); width: 100%; max-width: 900px; aspect-ratio: 16 / 9; border-radius: var(--radius-xl); background: var(--frame); border: 1px solid var(--border); box-shadow: var(--shadow-2); padding: 5% 6%; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.canvas.swap { animation: fadeUp .4s var(--ease) both; }
.canvas .c-title { font-size: clamp(18px, 2.2vw, 30px); line-height: 1.2; margin-bottom: 4%; padding-right: 120px; }
.canvas .c-title.placeholder { color: var(--ink-muted); }
.canvas .c-body { flex: 1; display: flex; align-items: center; font-size: clamp(10px, .95vw, 14px); min-height: 0; }
.canvas .c-badge { position: absolute; top: 18px; right: 18px; }
.canvas .bar-track { height: 36px; }
.canvas .bars { gap: 10px; }
.canvas .bar-val { font-size: 1.3em; }
.canvas .quote-card { padding: 28px 36px 24px; }
.canvas .quote-card::before { font-size: 130px; top: -22px; right: 24px; }
.canvas .columns { height: 150px; }
.canvas-hint { font-size: 13px; color: var(--ink-muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }

.inspector { border-left: 1px solid var(--border); padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-6); overflow-y: auto; max-height: calc(100vh - 68px); position: sticky; top: 68px; }
.insp-section { display: flex; flex-direction: column; gap: var(--space-3); }
.insp-title { font-size: 13px; font-weight: 600; color: var(--ink-muted); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.type-current { display: flex; align-items: center; gap: var(--space-3); width: 100%; padding: var(--space-3); border-radius: var(--radius-md); background: var(--surface-raised); border: 1px solid var(--border); cursor: pointer; color: inherit; text-align: left; transition: border-color .2s; }
.type-current:hover { border-color: var(--border-strong); }
.opt-row { display: flex; align-items: center; gap: 8px; animation: fadeUp .3s var(--ease) both; }
.opt-row .letter { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: none; font-size: 12px; font-weight: 600; color: #fff; }
.opt-row .input { height: 40px; padding: 0 var(--space-4); }
.correct-toggle { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--border-strong); background: transparent; display: grid; place-items: center; cursor: pointer; color: transparent; flex: none; transition: all .2s; }
.correct-toggle:hover { border-color: var(--green); }
.correct-toggle.on { background: var(--green); border-color: var(--green); color: #fff; }
.quote-edit { padding: var(--space-4); border-radius: var(--radius-md); background: var(--surface-raised); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; animation: fadeUp .3s var(--ease) both; }
.quote-edit .input { height: 40px; background: var(--surface); }
.quote-edit .textarea { min-height: 72px; background: var(--surface); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }

.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; padding: var(--space-5); animation: fadeIn .2s both; }
.sheet { width: min(780px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; border-radius: var(--radius-2xl); padding: var(--space-8); box-shadow: var(--shadow-2); animation: sheetIn .4s var(--spring) both; background: var(--glass-strong); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); border: 1px solid var(--glass-line); }
.sheet-sm { width: min(460px, 100%); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-6); }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--space-3); }
.type-tile { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); cursor: pointer; text-align: left; color: inherit; box-shadow: var(--shadow-1); animation: fadeUp .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms); }
.type-tile.on { border-color: var(--lavender); box-shadow: var(--shadow-glow); }
.type-tile .chip-icon { width: 44px; height: 44px; border-radius: 12px; }
.type-tile p { font-size: 13px; color: var(--ink-muted); line-height: 18px; }
.share-row { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px var(--space-4); border-radius: var(--radius-pill); background: var(--surface-raised); border: 1px solid var(--border); }
.share-row code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

/* ---------- Responsiv ---------- */
@media (max-width: 1220px) { .editor { grid-template-columns: 200px 1fr 320px; } }
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; height: auto; }
  .sidebar { display: none; }
  .main { overflow: visible; }
  .editor { grid-template-columns: 1fr; }
  .rail { flex-direction: row; overflow-x: auto; max-height: none; position: static; border-right: 0; border-bottom: 1px solid var(--border); }
  .thumb { min-width: 180px; }
  .add-slide { min-width: 120px; margin: 0; }
  .inspector { position: static; max-height: none; border-left: 0; border-top: 1px solid var(--border); }
  .hero { grid-template-columns: 1fr; }
  .toolbar { flex-wrap: wrap; }
  .canvas-wrap { padding: var(--space-5); }
}
@media (max-width: 640px) {
  .bar { grid-template-columns: 1fr auto; gap: var(--space-2) var(--space-3); }
  .bar-label { grid-column: 1 / -1; }
  .bar-track { height: 44px; }
  .stage-top { flex-wrap: wrap; }
  .stage-stats { margin-left: 0; }
  .quote-card { padding: 40px 28px 32px; }
  .join-card { padding: 32px 20px 24px; }
  .code-boxes { gap: 5px; grid-template-columns: repeat(4, 1fr) 8px repeat(4, 1fr); }
  .code-box { height: 50px; font-size: 22px; border-radius: 12px; }
  .canvas .c-title { padding-right: 0; }
}

/* ==========================================================
   Ergebnis-Seite für Teilnehmende (/results)
   ========================================================== */
.results-shell { max-width: 760px; margin: 0 auto; padding: var(--space-5) var(--space-4) 80px; min-height: 100vh; }
.results-hero { margin: var(--space-6) 0 0; }
.result-card { margin-top: var(--space-5); }
.compare-band { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-4); padding: 12px 14px; border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--indigo) 14%, var(--surface-raised)); border: 1px solid color-mix(in srgb, var(--indigo-bright) 40%, transparent); font-size: 15px; }
.compare-band.muted { background: var(--surface-raised); border-color: var(--border); }
.compare-label { height: 26px; padding: 0 10px; border-radius: var(--radius-pill); background: var(--indigo); color: #fff; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; }
.compare-value { font-size: 22px; font-weight: 500; }
.compare-texts { display: flex; flex-wrap: wrap; gap: 6px; }
.compare-chip { padding: 4px 10px; border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--border); }
.bar.mine .bar-track { box-shadow: 0 0 0 2px var(--surface-inverse); }
.bar.mine .bar-label::after { content: 'Du'; margin-left: 6px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--indigo); color: #fff; }
.cloud span.mine { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.col.mine .col-label { color: var(--ink); }
.col.mine .col-label::after { content: ' · Du'; color: var(--lavender); font-size: 12px; }
.col.mine .col-bar { box-shadow: 0 0 0 2px var(--surface-inverse); }

/* ==========================================================
   Auswertungen & Team (/admin)
   ========================================================== */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5); }
.dash-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--space-5); margin-top: var(--space-5); }
.session-row { display: flex; align-items: center; gap: var(--space-6); width: 100%; text-align: left; color: inherit; cursor: pointer; padding: var(--space-5) var(--space-6); }
.session-metric { display: flex; flex-direction: column; align-items: flex-end; min-width: 84px; }
.session-metric b { font-size: 24px; font-weight: 300; font-variant-numeric: tabular-nums; }
.session-metric span { font-size: 12px; color: var(--ink-muted); }
.nps-track { display: flex; height: 14px; border-radius: var(--radius-pill); overflow: hidden; background: var(--surface-raised); gap: 2px; }
.nps-track i { display: block; height: 100%; transition: width .8s var(--ease); }
.funnel-row { display: grid; grid-template-columns: 22px 1fr 54px; gap: 12px; align-items: center; font-size: 14px; }
.funnel-n { color: var(--ink-muted); font-variant-numeric: tabular-nums; text-align: right; }
.funnel-track { position: relative; height: 34px; border-radius: 12px; background: var(--surface-raised); overflow: hidden; }
.funnel-track i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--indigo), var(--indigo-bright)); border-radius: inherit; opacity: .9; transition: width .8s var(--ease); }
.funnel-track span { position: relative; display: block; padding: 0 12px; line-height: 34px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.funnel-row b { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.account { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.account .avatar { width: 36px; height: 36px; font-size: 13px; }
.account-name { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1100px) { .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .session-row { flex-wrap: wrap; gap: var(--space-4); } .session-metric { align-items: flex-start; } }

/* Mandanten-Branding */
.brand-logo { height: 30px; max-width: 140px; object-fit: contain; border-radius: 6px; }
.powered-by { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--ink-muted); margin: 32px 0 0; }
.powered-by b { font-weight: 600; color: var(--ink); }
.trial-banner { display: flex; align-items: center; gap: 12px; padding: 10px 16px; margin: 0 0 var(--space-5); border-radius: var(--radius-md); background: color-mix(in srgb, var(--amber) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--amber) 45%, transparent); font-size: 14px; }
.trial-banner.expired { background: color-mix(in srgb, var(--red) 14%, var(--surface)); border-color: color-mix(in srgb, var(--red) 45%, transparent); }
.usage-bar { height: 8px; border-radius: 999px; background: var(--surface-raised); overflow: hidden; }
.usage-bar i { display: block; height: 100%; border-radius: inherit; background: var(--indigo-bright); transition: width .6s var(--ease); }
.usage-bar.full i { background: var(--amber); }
.swatch { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); cursor: pointer; padding: 0; }
.logo-drop { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: var(--radius-lg); border: 1.5px dashed var(--border-strong); }
.logo-drop img { height: 48px; max-width: 160px; object-fit: contain; }
.org-switch { width: 100%; }
