/* =========================================================================
   umfrage.tablegray.com – Design-System
   Eigenständig, modern, mobile-first. Keine externen Fonts/CDNs (CSP-sicher).
   ========================================================================= */

:root {
    --brand:       #5b3df5;
    --brand-600:   #4a2fe0;
    --brand-700:   #3d27bd;
    --brand-soft:  #efeafe;
    --accent:      #0fb88a;
    --accent-soft: #def7ee;
    --danger:      #e03e52;
    --danger-soft: #fde7ea;
    --warn:        #d98a00;
    --warn-soft:   #fdf1d8;

    --ink:      #16151c;
    --ink-2:    #46444f;
    --ink-3:    #6e6b78;
    --line:     #e7e5ee;
    --line-2:   #efeef4;
    --surface:  #ffffff;
    --bg:       #f7f6fb;
    --bg-tint:  #f1eefb;

    --radius:    14px;
    --radius-sm: 9px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 2px rgba(22,21,28,.06), 0 1px 3px rgba(22,21,28,.05);
    --shadow:    0 4px 14px rgba(34,28,68,.08), 0 2px 6px rgba(34,28,68,.05);
    --shadow-lg: 0 18px 50px rgba(34,28,68,.16);

    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --maxw: 1140px;

    --safe-top:    env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink:     #f3f2f8;
        --ink-2:   #c4c1d0;
        --ink-3:   #918da0;
        --line:    #2b2933;
        --line-2:  #25232d;
        --surface: #1b1a22;
        --bg:      #131218;
        --bg-tint: #1d1a2b;
        --brand-soft: #241a4a;
        --accent-soft: #10342a;
        --danger-soft: #3a1f25;
        --warn-soft:  #3a2e16;
        --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
        --shadow:    0 4px 16px rgba(0,0,0,.45);
        --shadow-lg: 0 18px 50px rgba(0,0,0,.55);
    }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: clamp(1.9rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1rem; color: var(--ink-2); }
a  { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; height: auto; }
small { font-size: .82rem; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 1.1rem; }
.muted { color: var(--ink-3); }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.row-between { display: flex; gap: .6rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grow { flex: 1 1 auto; }
.hidden { display: none !important; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }

/* ---------------------------------------------------------------- Buttons */
.btn {
    --bg: var(--brand);
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 48px; padding: .7rem 1.25rem;
    font-size: 1rem; font-weight: 600; font-family: inherit;
    color: #fff; background: var(--bg); border: 1px solid transparent;
    border-radius: var(--radius-sm); cursor: pointer;
    text-decoration: none; transition: transform .06s ease, box-shadow .15s ease, background .15s ease;
    box-shadow: var(--shadow-sm); -webkit-tap-highlight-color: transparent;
}
.btn:hover { text-decoration: none; background: var(--brand-600); box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--brand-soft); outline-offset: 2px; }
.btn[disabled], .btn.is-disabled { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-lg { min-height: 54px; padding: .9rem 1.6rem; font-size: 1.06rem; }
.btn-sm { min-height: 38px; padding: .4rem .8rem; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); box-shadow: none; }
.btn-ghost:hover { background: var(--bg-tint); color: var(--ink); }
.btn-accent { --bg: var(--accent); }
.btn-accent:hover { background: #0c9c75; }
.btn-danger { --bg: var(--danger); }
.btn-danger:hover { background: #c5283b; }
.btn-soft { background: var(--brand-soft); color: var(--brand-700); box-shadow: none; }
.btn-soft:hover { background: #e4dcfd; color: var(--brand-700); }

/* ---------------------------------------------------------------- Cards */
.card {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.25rem;
}
.card-lg { padding: 1.6rem; border-radius: var(--radius-lg); }
.card + .card { margin-top: 1rem; }
/* In Grid-/Flex-Containern übernimmt gap die Abstände – der Geschwister-Abstand
   oben würde sonst nur Folgekarten verschieben (erste Karte wirkt versetzt). */
.grid-cards > .card + .card,
.kpi > .card + .card { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }

/* ---------------------------------------------------------------- Forms */
.field { margin-bottom: 1.05rem; }
.label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; color: var(--ink); }
.hint { font-size: .82rem; color: var(--ink-3); margin-top: .3rem; }
.input, .textarea, .select {
    width: 100%; font: inherit; font-size: 16px; /* >=16px verhindert iOS-Zoom */
    color: var(--ink); background: var(--surface);
    border: 1.5px solid var(--line); border-radius: var(--radius-sm);
    padding: .7rem .85rem; min-height: 48px; transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none; appearance: none;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.input:focus, .textarea:focus, .select:focus {
    outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.input.is-error, .textarea.is-error, .select.is-error { border-color: var(--danger); }
.select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236e6b78' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .7rem center; padding-right: 2.4rem;
}
.error-msg { color: var(--danger); font-size: .83rem; margin-top: .3rem; }
.checkbox, .radio { display: flex; gap: .6rem; align-items: flex-start; padding: .15rem 0; cursor: pointer; }
.checkbox input, .radio input { width: 1.25rem; height: 1.25rem; margin-top: .15rem; accent-color: var(--brand); flex: 0 0 auto; }

/* ---------------------------------------------------------------- Alerts */
.alert { border-radius: var(--radius-sm); padding: .8rem 1rem; margin-bottom: 1rem; font-size: .94rem; border: 1px solid transparent; }
.alert-success { background: var(--accent-soft); color: #0a6e52; border-color: #b6ecd9; }
.alert-error   { background: var(--danger-soft); color: #a31b2c; border-color: #f6c3ca; }
.alert-warn    { background: var(--warn-soft); color: #8a5a00; border-color: #f0d79a; }
.alert-info    { background: var(--brand-soft); color: var(--brand-700); border-color: #d8ccfb; }

/* ---------------------------------------------------------------- Badges */
.badge {
    display: inline-flex; align-items: center; gap: .35rem;
    font-size: .76rem; font-weight: 600; padding: .22rem .6rem; border-radius: 999px;
    background: var(--line-2); color: var(--ink-2); white-space: nowrap;
}
.badge-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-open    { background: var(--accent-soft); color: #0a7d5d; }
.badge-draft   { background: var(--line-2); color: var(--ink-3); }
.badge-closed  { background: var(--danger-soft); color: #a31b2c; }
.badge-scheduled { background: var(--warn-soft); color: #8a5a00; }
.badge-live    { background: #ffe8ec; color: var(--danger); }
.badge-archived{ background: var(--line-2); color: var(--ink-3); }

/* ---------------------------------------------------------------- Tables */
.table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.table th, .table td { text-align: left; padding: .7rem .6rem; border-bottom: 1px solid var(--line); }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.table tr:last-child td { border-bottom: none; }

/* ---------------------------------------------------------------- Utilities */
.pill-tabs { display: flex; gap: .3rem; background: var(--bg-tint); padding: .3rem; border-radius: 999px; overflow-x: auto; }
.pill-tabs a { flex: 0 0 auto; padding: .45rem .9rem; border-radius: 999px; font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.pill-tabs a.active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }
.divider { height: 1px; background: var(--line); margin: 1.25rem 0; border: 0; }
.kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); align-items: start; gap: .8rem; }
.kpi .card { padding: 1rem; }
.kpi .num { font-size: 1.8rem; font-weight: 800; letter-spacing: -.03em; }
.kpi .lbl { font-size: .82rem; color: var(--ink-3); }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }

/* Skip-Link für A11y */
.skip-link { position: absolute; left: -999px; top: 0; background: var(--brand); color: #fff; padding: .6rem 1rem; z-index: 200; }
.skip-link:focus { left: .5rem; top: .5rem; border-radius: 8px; }

[hidden] { display: none !important; }

/* =========================================================================
   App-Shell (eingeloggter Bereich) – mobile-first mit Bottom-Nav
   ========================================================================= */
.app { min-height: 100dvh; padding-bottom: calc(72px + var(--safe-bottom)); }
.app-top {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; gap: .8rem;
    padding: .7rem 1.1rem; padding-top: calc(.7rem + var(--safe-top));
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--line);
}
.app-top .brand { font-weight: 800; letter-spacing: -.03em; font-size: 1.1rem; color: var(--ink); display: inline-flex; align-items: center; gap: .5rem; }
/* Spaltenlayout, damit die Fußzeile am unteren Fensterrand klebt statt direkt
   unter dem Inhalt. Mobil: Viewport-Höhe minus fixierter Bottom-Nav. */
.app-content { display: flex; flex-direction: column; min-height: calc(100dvh - 72px - var(--safe-bottom)); }
.app-main { padding: 1.1rem; flex: 1 0 auto; }
.app-main .container { padding-inline: 0; }
.app-content .app-footer { margin-top: auto; }

/* Bottom-Nav (mobil) */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    display: flex; justify-content: space-around;
    padding: .35rem .4rem calc(.35rem + var(--safe-bottom));
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: saturate(1.4) blur(12px);
    border-top: 1px solid var(--line);
}
.bottom-nav a {
    flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: .35rem; font-size: .68rem; font-weight: 600; color: var(--ink-3);
    border-radius: 10px; -webkit-tap-highlight-color: transparent;
}
.bottom-nav a.active { color: var(--brand); }
.bottom-nav a svg { width: 24px; height: 24px; }
.bottom-nav a.cta { color: #fff; }
.bottom-nav a.cta .ico { background: var(--brand); color:#fff; width: 42px; height: 42px; border-radius: 14px; display:flex; align-items:center; justify-content:center; box-shadow: var(--shadow); margin-top:-14px; }

/* Sidebar (Desktop) */
.app-shell { display: block; }
@media (min-width: 920px) {
    .app { display: grid; grid-template-columns: 252px 1fr; padding-bottom: 0; }
    .bottom-nav { display: none; }
    .sidebar {
        position: sticky; top: 0; height: 100dvh; overflow-y: auto;
        display: flex; flex-direction: column;
        border-right: 1px solid var(--line); background: var(--surface); padding: 1.1rem .8rem;
    }
    .sidebar .brand { font-size: 1.2rem; padding: .4rem .6rem 1rem; display:flex; align-items:center; gap:.5rem; }
    .side-nav { display: flex; flex-direction: column; gap: 2px; }
    .side-cta { margin-top: 1rem; }
    .sidebar-foot { margin-top: auto; padding-top: 1rem; }
    .side-link { display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: .95rem; margin-bottom: 2px; }
    .side-link svg { width: 20px; height: 20px; }
    .side-link:hover { background: var(--bg-tint); text-decoration: none; }
    .side-link.active { background: var(--brand-soft); color: var(--brand-700); }
    .app-top { position: static; backdrop-filter: none; background: transparent; border: 0; padding: 1.1rem 1.4rem .2rem; }
    .app-top .menu-btn { display: none; }
    .app-content { min-width: 0; padding: 0 1.4rem; min-height: 100dvh; }
    .app-main { padding: 0 0 2rem; }
}
.sidebar { display: none; }
@media (min-width: 920px) { .sidebar { display: flex; } }

/* Logo-Mark */
.logo-mark { width: 28px; height: 28px; flex: 0 0 auto; }

/* =========================================================================
   Landing
   ========================================================================= */
.lp-nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.lp-nav .container { display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding-top: var(--safe-top); }
.lp-nav .brand { font-weight: 800; font-size: 1.25rem; display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); }
.lp-nav nav { display: none; gap: 1.4rem; }
.lp-nav nav a { color: var(--ink-2); font-weight: 600; font-size: .95rem; }
@media (min-width: 820px) { .lp-nav nav { display: flex; } }

.hero { padding: clamp(3rem, 9vw, 6rem) 0 clamp(2rem, 6vw, 4rem); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -30% -10% auto -10%; height: 520px; background: radial-gradient(60% 60% at 70% 20%, var(--brand-soft), transparent 70%), radial-gradient(50% 50% at 15% 0%, var(--accent-soft), transparent 70%); z-index: -1; }
.hero h1 { max-width: 16ch; }
.hero .lead { font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: var(--ink-2); max-width: 54ch; }
.hero .cta-row { margin-top: 1.6rem; }
.eyebrow { display: inline-flex; align-items:center; gap:.45rem; font-weight: 700; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); background: var(--brand-soft); padding: .35rem .8rem; border-radius: 999px; margin-bottom: 1.1rem; }

.section { padding: clamp(2.5rem, 7vw, 5rem) 0; }
.section h2 { max-width: 22ch; }
.section .sub { color: var(--ink-3); max-width: 56ch; margin-bottom: 2rem; }
.features { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 680px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { padding: 1.4rem; }
.feature .fico { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand); margin-bottom: .9rem; }
.feature h3 { margin-bottom: .35rem; }
.feature p { margin: 0; font-size: .95rem; }

/* Tier-Vergleich */
.tiers { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 860px) { .tiers { grid-template-columns: repeat(3, 1fr); align-items: start; } }
.tier { padding: 1.6rem; position: relative; }
.tier.featured { border-color: var(--brand); box-shadow: var(--shadow-lg); }
.tier .price { font-size: 2.2rem; font-weight: 800; letter-spacing: -.03em; }
.tier .price span { font-size: .95rem; font-weight: 500; color: var(--ink-3); }
.tier ul { list-style: none; padding: 0; margin: 1.1rem 0 1.4rem; display: grid; gap: .55rem; }
.tier li { display: flex; gap: .55rem; align-items: flex-start; font-size: .94rem; color: var(--ink-2); }
.tier li svg { flex: 0 0 auto; color: var(--accent); margin-top: 2px; }
.tier .tag { position: absolute; top: -.7rem; right: 1.2rem; background: var(--brand); color: #fff; font-size: .72rem; font-weight: 700; padding: .25rem .7rem; border-radius: 999px; }

.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { cursor: pointer; font-weight: 600; padding: 1rem 0; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--brand); font-weight: 700; font-size: 1.3rem; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { padding-bottom: 1rem; margin: 0; }

.lp-footer { border-top: 1px solid var(--line); padding: 2.5rem 0; color: var(--ink-3); font-size: .9rem; }
.lp-footer a { color: var(--ink-2); }
.cta-band { background: linear-gradient(120deg, var(--brand), var(--brand-700)); color: #fff; border-radius: var(--radius-lg); padding: clamp(2rem,5vw,3.2rem); text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.85); }
.cta-band .btn { background: #fff; color: var(--brand-700); }
.cta-band .btn:hover { background: #f1eefb; }

/* =========================================================================
   Auth-Seiten (zentriert)
   ========================================================================= */
.auth-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 1.2rem; padding-top: calc(1.2rem + var(--safe-top)); }
.auth-card { width: 100%; max-width: 430px; }
.auth-card .brand { display: flex; align-items: center; gap: .55rem; justify-content: center; font-weight: 800; font-size: 1.3rem; margin-bottom: 1.4rem; color: var(--ink); }
.auth-alt { text-align: center; margin-top: 1.2rem; font-size: .92rem; color: var(--ink-3); }
.quick-login { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px dashed var(--line); }
.quick-login .grid { display: grid; gap: .5rem; grid-template-columns: 1fr; }

/* =========================================================================
   Umfrage-Teilnahme (öffentlich) + Live
   ========================================================================= */
.take { min-height: 100dvh; padding: 1.2rem; padding-top: calc(1.2rem + var(--safe-top)); padding-bottom: calc(1.2rem + var(--safe-bottom)); }
.take-card { width: 100%; max-width: 620px; margin-inline: auto; }
.take h1 { font-size: clamp(1.5rem, 4vw, 2rem); }
.q { padding: 1.2rem 0; border-bottom: 1px solid var(--line-2); }
.q:last-child { border-bottom: 0; }
.q .q-title { font-weight: 700; font-size: 1.08rem; margin-bottom: .2rem; }
.q .q-req { color: var(--danger); }
.opt {
    display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; margin-top: .5rem;
    border: 1.5px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
    transition: border-color .12s, background .12s; -webkit-tap-highlight-color: transparent;
}
.opt:hover { border-color: var(--brand); }
.opt input { width: 1.3rem; height: 1.3rem; accent-color: var(--brand); flex: 0 0 auto; }
.opt.checked { border-color: var(--brand); background: var(--brand-soft); }
.scale-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.scale-row .opt { flex: 1 1 auto; justify-content: center; min-width: 52px; font-weight: 700; }
.yesno { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }

/* Ergebnisbalken */
.result-bar { margin: .5rem 0; }
.result-bar .rb-top { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: .25rem; }
.result-bar .rb-track { height: 12px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.result-bar .rb-fill { height: 100%; background: var(--brand); border-radius: 999px; transition: width .5s ease; }

/* Live-Steuerpult */
.live-q { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .7rem; }
.live-q.is-open { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); }
.live-dot.open { background: var(--accent); animation: pulse 1.6s infinite; }
.live-dot.closed { background: var(--danger); }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 var(--accent-soft); } 50% { box-shadow: 0 0 0 6px transparent; } }

/* QR / Teilen */
.share-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .share-grid { grid-template-columns: 280px 1fr; } }
.qr-box { text-align: center; padding: 1.2rem; }
.qr-box img, .qr-box svg { width: 220px; height: 220px; background:#fff; border-radius: 12px; padding: .6rem; }
.code-box { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; background: var(--bg-tint); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem; white-space: pre-wrap; word-break: break-all; }

/* Drag & Drop */
.drag-handle { cursor: grab; color: var(--ink-3); touch-action: none; padding: .3rem; }
.qb-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: .7rem; }
.qb-item.dragging { opacity: .5; }
.qb-item.drag-over { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* Toast */
.toast-host { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + var(--safe-bottom)); z-index: 200; display: grid; gap: .5rem; width: min(92vw, 420px); }
@media (min-width:920px){ .toast-host { bottom: 1.5rem; } }
.toast { background: var(--ink); color: #fff; padding: .8rem 1rem; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: .92rem; animation: toast-in .2s ease; }
.toast.ok { background: #0a7d5d; } .toast.err { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* Consent */
.consent { position: fixed; inset-inline: 0; bottom: 0; z-index: 150; padding: 1rem; padding-bottom: calc(1rem + var(--safe-bottom)); }
.consent .inner { max-width: 720px; margin-inline: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 1.1rem; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }

/* =========================================================================
   App-Footer (immer sichtbar, auch im Backend) + gleich große Karten
   ========================================================================= */
.app-footer {
    border-top: 1px solid var(--line);
    padding: 1rem 1.4rem;
    margin-top: 1.5rem;
    font-size: .82rem;
    color: var(--ink-3);
}
.app-footer .container { padding-inline: 0; }
.app-footer a { color: var(--ink-2); font-weight: 600; }
.app-footer .row-between { flex-wrap: wrap; }
@media (max-width: 560px) {
    .app-footer .row-between { flex-direction: column; align-items: flex-start; gap: .4rem; }
}

/* Gleich große Umfrage-Karten im Raster. */
.grid-cards { grid-auto-rows: 1fr; }
.grid-cards > .card,
.grid-cards > article.card { height: 100%; }

/* =========================================================================
   Builder: Tabs als Buttons, Antwortoptionen-Editor, Titelbilder
   ========================================================================= */
.pill-tabs button {
    flex: 0 0 auto;
    padding: .45rem .9rem;
    border: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 600;
    font-size: .9rem;
    color: var(--ink-2);
    font-family: inherit;
}
.pill-tabs button.active {
    background: var(--surface);
    color: var(--brand);
    box-shadow: var(--shadow-sm);
}

.option-rows { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .6rem; }
.option-row { display: flex; gap: .4rem; align-items: center; }
.option-row .input { flex: 1 1 auto; }
.option-row .js-option-remove { flex: 0 0 auto; line-height: 1; font-size: 1.2rem; padding: .3rem .55rem; }

.cover-thumb {
    display: block;
    max-width: 100%;
    max-height: 160px;
    border-radius: var(--radius);
    margin-bottom: .6rem;
    object-fit: cover;
}
.cover-banner {
    display: block;
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: var(--radius);
    margin: 0 0 1rem;
}

/* Hilfe-Seite */
.help-list { margin: .4rem 0 0; padding-left: 1.2rem; }
.help-list li { margin-bottom: .45rem; line-height: 1.5; }
.help-list li:last-child { margin-bottom: 0; }

/* ---- Teilnahme-Wizard (eine Frage pro Seite) ---- */
form.wizard .q { display: none; }
form.wizard .q.is-active { display: block; }
.wizard-nav { margin-top: 1.1rem; }
.wizard-progress { font-size: .85rem; color: var(--ink-3); text-align: center; margin-bottom: .4rem; }
.wizard-bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin-bottom: .8rem; }
.wizard-bar span { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 99px; transition: width .25s ease; }
.wizard-btns { display: flex; gap: .6rem; }
.wizard-btns .btn { flex: 1; }

/* ---- Datenschutzhinweis (öffentliche Teilnahme) ---- */
.privacy-note { margin-top: 1rem; font-size: .85rem; }
.privacy-note summary { cursor: pointer; color: var(--ink-3); list-style: none; display: inline-flex; align-items: center; gap: .35rem; }
.privacy-note summary::-webkit-details-marker { display: none; }
.privacy-note[open] summary { margin-bottom: .5rem; }
.privacy-body p { margin: .4rem 0; color: var(--ink-3); line-height: 1.55; }

/* ---- Auswertung: Präsentationsmodus (Beamer/Vollbild) ---- */
body.present-body { margin: 0; }
.present { display: flex; flex-direction: column; height: 100dvh; background: #0f1020; color: #fff; }
.present-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 1.1rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.present-bar-title { font-weight: 700; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.present-bar-meta { display: flex; align-items: center; gap: .7rem; font-size: .85rem; color: rgba(255,255,255,.8); white-space: nowrap; }
.present-bar .btn { color: #fff; border-color: rgba(255,255,255,.25); }
.present-stage { flex: 1 1 auto; overflow: hidden; position: relative; }
.present-track { display: flex; height: 100%; transition: transform .35s ease; }
.present-slide { flex: 0 0 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 2vh 4vw; box-sizing: border-box; }
.present-slide .result-card { background: transparent; box-shadow: none; border: 0; width: 100%; max-width: 1000px; color: #fff; }
.present-slide .result-card .row-between { justify-content: center; flex-direction: column; align-items: center; gap: .4rem; }
.present-slide .result-card h3 { font-size: clamp(1.4rem, 3.4vw, 2.6rem); margin: 0 0 .8rem; text-align: center; color: #fff; }
.present-slide .result-card .badge { font-size: 1rem; }
.present-slide .result-card .muted { color: rgba(255,255,255,.8); }
.present .rb-canvas-wrap { max-width: min(900px, 86vw) !important; width: 100%; height: 54vh; margin: 0 auto 1rem !important; }
.present .rb-chart { width: 100% !important; height: 100% !important; }
.present .rb-fallback { display: none; }
.present-slide .stack > div[style*="bg-tint"], .present-slide .result-card .stack > div { background: rgba(255,255,255,.08) !important; color: #fff; }
.present-cover { text-align: center; }
.present-cover h1 { font-size: clamp(2rem, 6vw, 4rem); margin: 0 0 1rem; }
.present-cover-desc { font-size: clamp(1rem, 2vw, 1.4rem); color: rgba(255,255,255,.85); max-width: 40ch; margin: 0 auto 1rem; }
.present-cover-meta { font-size: 1.2rem; color: rgba(255,255,255,.9); }
.present-hint { margin-top: 2rem; color: rgba(255,255,255,.55); font-size: .95rem; }
.present-nav { display: flex; align-items: center; justify-content: center; gap: 1.2rem; padding: .7rem; border-top: 1px solid rgba(255,255,255,.1); }
.present-nav .btn { min-width: 4rem; font-size: 1.1rem; }
.present-nav .btn[disabled] { opacity: .35; cursor: default; }
.present-counter { font-variant-numeric: tabular-nums; color: rgba(255,255,255,.85); min-width: 5ch; text-align: center; }

/* "powered by tablegray" in der Präsentations-Fußleiste */
.present-nav { position: relative; }
.present-brand { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: .4rem; font-size: .72rem; color: rgba(255,255,255,.55); text-decoration: none; }
.present-brand:hover { color: rgba(255,255,255,.85); }
.present-brand img { height: 16px; width: auto; display: block; }
@media (max-width: 680px) { .present-brand span { display: none; } .present-brand { right: .6rem; } }
