:root {
  --ink: #090f33; --muted: #5d6680; --paper: #f3f5f8; --card: #ffffff;
  --line: #d8dce5; --green: #0e8373; --green-dark: #111d4e; --lime: #00a993;
  --green-rgb: 14, 131, 115; --dark-rgb: 17, 29, 78;
  --red: #a5273f; --heading-font: Georgia, "Times New Roman", serif;
  --shadow: 0 20px 55px rgba(var(--dark-rgb), .09);
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0; min-height: 100vh; color: var(--ink);
  background: radial-gradient(circle at 8% 0%, rgba(var(--green-rgb), .10), transparent 30rem), var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 64px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -.03em; font-size: 1.35rem; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 4px; color: white; background: var(--green); font-size: 1.2rem; }
.brand-mark.has-logo { width: auto; min-width: 38px; max-width: 124px; background: transparent; }
.brand-mark img { display: block; width: auto; max-width: 120px; height: auto; max-height: 38px; object-fit: contain; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.8); font-size: .83rem; font-weight: 650; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(var(--green-rgb), .13); }
.hero { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 30px; }
.eyebrow { margin: 0 0 8px; color: var(--green); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { max-width: 750px; margin-bottom: 10px; color: var(--green-dark); font-family: var(--heading-font); font-size: clamp(2.4rem, 6vw, 4.7rem); font-weight: 500; line-height: .98; letter-spacing: -.045em; }
.subtitle { max-width: 600px; margin-bottom: 0; color: var(--muted); font-size: 1.04rem; line-height: 1.55; }
.podium-link { flex: 0 0 auto; padding: 12px 16px; border: 1px solid var(--ink); border-radius: 10px; color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 750; }
.podium-link:hover { color: white; background: var(--ink); }
.grid { display: grid; grid-template-columns: minmax(280px, .78fr) minmax(420px, 1.22fr); gap: 22px; align-items: start; }
.stack { display: grid; gap: 22px; }
.card { padding: 24px; border: 1px solid rgba(var(--dark-rgb), .10); border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.card h2 { margin-bottom: 18px; font-size: 1rem; letter-spacing: -.01em; }
label { display: block; margin-bottom: 7px; color: var(--muted); font-size: .78rem; font-weight: 750; }
textarea, input { width: 100%; border: 1px solid var(--line); border-radius: 10px; outline: none; color: var(--ink); background: #fff; }
textarea { min-height: 145px; padding: 14px; resize: vertical; line-height: 1.5; }
input { padding: 11px 13px; }
textarea:focus, input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(var(--green-rgb), .12); }
.field { margin-bottom: 15px; }
.primary-button, .answer-button { width: 100%; border: 0; border-radius: 10px; padding: 13px 16px; color: white; background: var(--green); font-weight: 800; }
.primary-button:hover, .answer-button:hover { background: var(--green-dark); }
.primary-button:disabled, .answer-button:disabled { opacity: .45; cursor: default; }
.active-card { position: relative; overflow: hidden; color: white; background: var(--green-dark); }
.active-card::after { content: "?"; position: absolute; right: -12px; bottom: -54px; color: rgba(255,255,255,.06); font-family: Georgia, serif; font-size: 14rem; line-height: 1; }
.active-card h2 { color: #bdc6df; }
.active-question { position: relative; z-index: 1; min-height: 145px; font-family: var(--heading-font); font-size: clamp(1.45rem, 3vw, 2.2rem); line-height: 1.17; }
.active-author { position: relative; z-index: 1; margin: 18px 0 22px; color: #bdc6df; font-size: .88rem; }
.active-card .answer-button { position: relative; z-index: 1; color: white; background: var(--green); }
.active-card .answer-button:hover { background: var(--lime); }
.list-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.list-header h2 { margin: 0; }
.count { min-width: 28px; padding: 5px 8px; border-radius: 999px; text-align: center; color: var(--green); background: #e1f2ef; font-size: .75rem; font-weight: 800; }
.question-list { display: grid; gap: 10px; }
.question-item { padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.question-text { margin-bottom: 7px; white-space: pre-wrap; line-height: 1.45; }
.question-meta { color: var(--muted); font-size: .76rem; }
.question-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.small-button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #f8f9fb; font-size: .76rem; font-weight: 750; }
.small-button:hover { border-color: var(--ink); }
.topbar-link { display: inline-block; text-decoration: none; }
.topbar-link[hidden] { display: none; }
.small-button.danger { color: var(--red); }
.empty { padding: 22px 12px; border: 1px dashed var(--line); border-radius: 12px; text-align: center; color: var(--muted); font-size: .88rem; }
.archive details { margin-top: 5px; }
.archive summary { cursor: pointer; color: var(--muted); font-size: .86rem; font-weight: 750; }
.archive .question-list { margin-top: 14px; }
.network-url { display: block; overflow-wrap: anywhere; margin-top: 7px; color: var(--green); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; text-decoration: none; }
.network-label { margin: 0; color: var(--green-dark); font-size: .76rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.network-label-spaced { margin-top: 21px; padding-top: 18px; border-top: 1px solid var(--line); }
.submission-control-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.submission-control-head h2 { margin-bottom: 13px; }
.submission-control .eyebrow { margin-bottom: 4px; }
.submission-control .question-meta { min-height: 34px; margin-bottom: 17px; line-height: 1.45; }
.submission-state { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; padding: 6px 9px; border-radius: 999px; color: var(--muted); background: #eef0f4; font-size: .7rem; font-weight: 800; }
.submission-state span, .submission-banner-dot { width: 7px; height: 7px; border-radius: 50%; background: #8d94a6; }
.submission-state.open { color: var(--green); background: #e1f2ef; }
.submission-state.open span, .submission-banner.open .submission-banner-dot { background: var(--green); box-shadow: 0 0 0 4px rgba(var(--green-rgb), .11); }
.submission-control .stop-button { background: var(--green-dark); }
.submission-control .stop-button:hover { background: var(--ink); }
.logout-button { padding: 7px 10px; border: 0; color: var(--muted); background: transparent; font-size: .78rem; font-weight: 700; }
.logout-button:hover { color: var(--green-dark); }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 20; max-width: 360px; padding: 13px 17px; border-radius: 10px; color: white; background: var(--ink); box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); pointer-events: none; transition: 180ms ease; }
.toast.visible { opacity: 1; transform: translateY(0); }

/* Anmeldung und öffentliche Frageseite */
.standalone-page {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(var(--green-rgb), .13), transparent 35rem),
    var(--paper);
}
.standalone-page::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  pointer-events: none;
  height: 9px;
  background: linear-gradient(90deg, var(--green) 0 38%, var(--green-dark) 38% 100%);
}
.standalone-shell { width: min(100% - 32px, 510px); margin: 0 auto; padding: clamp(34px, 7vh, 80px) 0 42px; }
.standalone-brand { display: flex; align-items: center; gap: 12px; margin-bottom: clamp(32px, 7vh, 68px); color: var(--green-dark); font-size: 1.3rem; font-weight: 850; letter-spacing: -.03em; }
.standalone-card { padding: clamp(25px, 6vw, 42px); border: 1px solid rgba(var(--dark-rgb), .1); border-radius: 14px; background: white; box-shadow: var(--shadow); }
.standalone-title { margin-bottom: 16px; color: var(--green-dark); font-size: clamp(2.35rem, 9vw, 4rem); line-height: 1.02; }
.standalone-copy { margin-bottom: 29px; color: var(--muted); line-height: 1.55; }
.standalone-link { display: block; margin-top: 22px; color: var(--green); text-align: center; text-decoration: none; font-size: .88rem; font-weight: 750; }
.form-error { margin: -4px 0 14px; padding: 10px 12px; border-left: 3px solid var(--red); color: var(--red); background: #fff4f6; font-size: .85rem; }
.ask-shell { width: min(100% - 28px, 620px); }
.ask-card textarea { min-height: 180px; font-size: 1.05rem; }
.submission-banner { display: flex; align-items: center; gap: 9px; margin: -7px 0 24px; padding: 10px 12px; border-radius: 8px; color: var(--muted); background: #f0f2f5; font-size: .78rem; font-weight: 750; }
.submission-banner.open { color: var(--green); background: #e4f3f0; }
.character-count { margin-top: 6px; color: var(--muted); text-align: right; font-size: .72rem; }
.site-footer { margin-top: 30px; color: var(--muted); text-align: center; font-size: .72rem; letter-spacing: .04em; }
.standalone-credit { margin: 22px auto 0; color: var(--muted); text-align: center; font-size: .72rem; letter-spacing: .04em; }
.closed-state { padding: 22px 0 10px; text-align: center; }
.closed-mark { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 20px; border-radius: 50%; color: white; background: var(--green-dark); font-size: 1.8rem; }
.closed-state h2 { margin-bottom: 9px; color: var(--green-dark); font-family: var(--heading-font); font-size: 1.7rem; }
.closed-state p { max-width: 340px; margin: 0 auto; color: var(--muted); line-height: 1.5; }
.success-state { padding: 18px 0 8px; text-align: center; }
.success-mark { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 22px; border-radius: 50%; color: white; background: var(--green); font-size: 1.7rem; font-weight: 900; }
.success-state h2 { margin-bottom: 9px; color: var(--green-dark); font-family: var(--heading-font); font-size: 2rem; }
.success-state p { margin-bottom: 26px; color: var(--muted); }
.another-question { padding: 11px 15px; }

/* Livestream-Seiten */
.live-shell { width: min(100% - 28px, 960px); }
.live-page [hidden] { display: none !important; }
.live-shell .standalone-brand { margin-bottom: clamp(24px, 5vh, 48px); }
.live-loading { color: var(--muted); text-align: center; }
.live-loading p { margin: 0; }
.live-heading { margin-bottom: 22px; }
.live-heading h1 { max-width: 900px; margin-bottom: 0; font-size: clamp(2.4rem, 7vw, 5.4rem); }
.live-player-card { overflow: hidden; border-radius: 14px; background: var(--green-dark); box-shadow: var(--shadow); }
.live-player { aspect-ratio: 16 / 9; }
.live-player iframe, .live-player video { display: block; width: 100%; height: 100%; border: 0; background: #000; }
.live-player-error { display: grid; place-items: center; width: 100%; height: 100%; padding: 30px; color: white; background: var(--green-dark); text-align: center; }
.live-player-placeholder { display: grid; place-items: center; align-content: center; gap: 15px; aspect-ratio: 16 / 9; padding: 30px; color: #bdc6df; text-align: center; }
.live-symbol { display: grid; place-items: center; width: 58px; height: 58px; padding-left: 4px; border: 1px solid #647197; border-radius: 50%; color: white; font-size: 1.25rem; }
.live-question-card { margin-top: 22px; }
.live-question-card h2 { margin-bottom: 9px; color: var(--green-dark); font-family: var(--heading-font); font-size: clamp(1.8rem, 5vw, 2.7rem); font-weight: 500; letter-spacing: -.03em; }
.live-closed { padding-block: clamp(42px, 8vw, 78px); text-align: center; }
.live-closed .closed-mark { margin-bottom: 25px; background: var(--green); }
.live-closed .eyebrow { margin-bottom: 10px; }
.live-closed-title { max-width: 700px; margin: 0 auto 14px; font-size: clamp(2.1rem, 7vw, 4.4rem); }
.live-closed > p:last-child { margin: 0; color: var(--muted); }

/* Geschützte Stream-Verwaltung */
.stream-admin-shell { width: min(1420px, calc(100% - 40px)); }
.stream-admin-hero { margin-bottom: 24px; }
.stream-back-link { text-decoration: none; }
.stream-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.stream-admin-card { min-width: 0; }
.stream-admin-card h2 { margin-bottom: 18px; }
.input-hint { margin: 6px 0 0; color: var(--muted); font-size: .72rem; line-height: 1.4; }
.stream-config-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.stream-config-actions button { min-height: 42px; }
.stream-toggle.stop-button { background: var(--green-dark); }
.stream-toggle.stop-button:hover { background: var(--ink); }
.stream-public-label { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.stream-questions { margin-top: 28px; padding-top: 23px; border-top: 1px solid var(--line); }
.stream-list-header { margin-bottom: 12px; }
.stream-list-header h3 { margin: 0; font-size: .95rem; }
.stream-answered { margin-top: 22px; }
.stream-answered summary { cursor: pointer; color: var(--muted); font-size: .82rem; font-weight: 750; }
.stream-answered .question-list { margin-top: 12px; }
.podium-forward-button { border-color: var(--green); color: white; background: var(--green); }
.podium-forward-button:hover { border-color: var(--green-dark); background: var(--green-dark); }
.forwarded-note { display: block; margin-top: 7px; color: var(--green); font-weight: 750; }
.stream-moderation-section { margin-top: 34px; }
.stream-moderation-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 16px; }
.stream-moderation-heading h2 { margin: 0; color: var(--green-dark); font-family: var(--heading-font); font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 500; }
.stream-moderation-heading > p { max-width: 560px; margin: 0; color: var(--muted); font-size: .85rem; line-height: 1.5; }
.stream-moderation-archive { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.stream-source { display: inline-block; margin-right: 8px; padding: 3px 7px; border-radius: 999px; color: var(--green); background: #e1f2ef; font-size: .68rem; font-weight: 800; }

/* Geschützter Layout-Editor */
.layout-admin-shell { width: min(1280px, calc(100% - 40px)); }
.layout-admin-hero { margin-bottom: 24px; }
.layout-admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .72fr); gap: 24px; align-items: start; }
.layout-color-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 18px; }
.layout-color-field { margin: 0; }
.layout-color-field > span { display: grid; grid-template-columns: 46px 1fr; gap: 8px; margin-top: 7px; }
.layout-color-field input[type="color"] { width: 46px; height: 42px; padding: 3px; cursor: pointer; }
.layout-color-field input[type="text"] { min-width: 0; text-transform: lowercase; }
.layout-heading-field { margin: 20px 0 0; }
select { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; outline: none; color: var(--ink); background: white; font: inherit; }
select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(var(--green-rgb), .12); }
.file-input { padding: 8px; }
.layout-preview-column { position: sticky; top: 24px; }
.layout-preview {
  --preview-primary: #6d4aff; --preview-dark: #17152f; --preview-accent: #14b8a6;
  --preview-paper: #f7f6fb; --preview-card: #ffffff; --preview-ink: #17152f;
  --preview-muted: #68677c; --preview-line: #dedbea; --preview-danger: #c73555;
  overflow: hidden; padding: 28px; border: 1px solid var(--preview-line); border-radius: 18px;
  color: var(--preview-ink); background: radial-gradient(circle at 0 0, color-mix(in srgb, var(--preview-primary) 14%, transparent), transparent 65%), var(--preview-paper);
  box-shadow: var(--shadow);
}
.layout-preview-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 38px; color: var(--preview-dark); font-size: 1.05rem; font-weight: 850; }
.layout-preview-brand .brand-mark { background: var(--preview-primary); }
.layout-preview-brand .brand-mark.has-logo { background: transparent; }
.layout-preview-card { padding: 28px; border: 1px solid var(--preview-line); border-radius: 13px; background: var(--preview-card); }
.layout-preview-card .eyebrow { color: var(--preview-primary); }
.layout-preview-card h2 { margin-bottom: 12px; color: var(--preview-dark); font-family: ui-sans-serif, system-ui, sans-serif; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.02; letter-spacing: -.035em; }
.layout-preview.preview-serif .layout-preview-card h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
.layout-preview-card p { color: var(--preview-muted); font-size: .86rem; line-height: 1.5; }
.layout-preview-input { margin-top: 22px; padding: 13px; border: 1px solid var(--preview-line); border-radius: 9px; color: var(--preview-muted); background: white; }
.layout-preview-button { margin-top: 10px; padding: 13px; border-radius: 9px; color: white; background: var(--preview-primary); text-align: center; font-weight: 800; }
.layout-preview-footer { margin: 20px 0 0; color: var(--preview-muted); text-align: center; font-size: .68rem; letter-spacing: .04em; }
.layout-save { margin-top: 14px; }
.layout-save-hint { text-align: center; }

/* Podiumsansicht */
.podium-page { min-height: 100vh; background: var(--green-dark); color: white; }
.podium-shell { display: grid; grid-template-rows: auto 1fr auto; min-height: 100vh; padding: clamp(22px, 4vw, 56px); }
.podium-topbar { display: flex; align-items: center; justify-content: space-between; color: #bdc6df; font-size: clamp(.72rem, 1.5vw, .95rem); font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.podium-stage { display: grid; align-content: center; width: 80vw; max-width: none; margin: 0 auto; padding: 5vh 0; }
.podium-label { display: flex; align-items: center; gap: 12px; margin-bottom: clamp(20px, 4vh, 44px); color: #39c2b2; font-size: clamp(.8rem, 1.5vw, 1rem); font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.podium-label::before { content: ""; width: 34px; height: 2px; background: #39c2b2; }
.podium-question { width: 100%; max-width: none; margin: 0; overflow-wrap: anywhere; color: white; font-family: var(--heading-font); font-size: clamp(2.8rem, 7.4vw, 7.8rem); font-weight: 400; line-height: 1.01; letter-spacing: -.045em; white-space: pre-wrap; text-wrap: balance; transition: font-size 180ms ease; }
.podium-author { margin-top: clamp(24px, 5vh, 54px); color: #bdc6df; font-size: clamp(1rem, 2vw, 1.45rem); }
.podium-empty { max-width: 780px; color: #7f8bad; font-family: var(--heading-font); font-size: clamp(2.5rem, 6vw, 6.4rem); line-height: 1.03; letter-spacing: -.04em; }
.podium-bottom { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.podium-footer-notes { display: grid; gap: 7px; }
.podium-answer { width: auto; min-width: 230px; color: white; background: var(--green); }
.podium-answer:hover { background: var(--lime); }
.podium-hint { color: #7f8bad; font-size: .78rem; }
.podium-credit { color: #647197; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; }

@media (max-width: 800px) {
  .shell { width: min(100% - 24px, 650px); padding-top: 18px; }
  .topbar { margin-bottom: 25px; }
  .hero { display: block; }
  .podium-link { display: inline-block; margin-top: 18px; }
  .grid { grid-template-columns: 1fr; }
  .active-card { order: -1; }
  .podium-stage { width: 100%; }
  .stream-admin-grid { grid-template-columns: 1fr; }
  .layout-admin-grid { grid-template-columns: 1fr; }
  .layout-preview-column { position: static; }
  .stream-moderation-heading { display: block; }
  .stream-moderation-heading > p { margin-top: 10px; }
}
@media (max-width: 600px) {
  .topbar-actions { align-items: end; flex-direction: column-reverse; gap: 3px; }
  .logout-button { padding-right: 0; }
  .standalone-shell { padding-top: 28px; }
  .standalone-brand { margin-bottom: 31px; }
  .standalone-card { padding: 24px 20px; }
  .podium-bottom { align-items: stretch; flex-direction: column-reverse; }
  .podium-answer { width: 100%; }
  .live-question-card { padding: 24px 20px; }
  .stream-config-actions { grid-template-columns: 1fr; }
  .layout-color-grid { grid-template-columns: 1fr; }
}
