:root {
  --brand: #6491af;
  --brand-dark: #315b75;
  --brand-soft: #eaf2f7;
  --ink: #20303a;
  --muted: #66757f;
  --surface: #ffffff;
  --page: #f3f6f8;
  --line: #d9e1e6;
  --success: #2f7d54;
  --warning: #a66b00;
  --danger: #a43e3e;
  --gold: #f7df8b;
  --silver: #dfe5ea;
  --bronze: #e2b58c;
  --shadow: 0 14px 34px rgba(40, 70, 90, 0.12);
  --radius: 18px;
  --sticky-header-height: 148px;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--page); }

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(100, 145, 175, 0.18), transparent 34rem),
    var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a { color: var(--brand-dark); }

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(217, 225, 230, 0.9);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 22px rgba(40, 70, 90, 0.08);
  backdrop-filter: blur(12px);
}

.header-brand-row,
.header-navigation-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.75rem, 3vw, 2.5rem);
  padding-inline: clamp(1rem, 4vw, 3rem);
}

.header-brand-row {
  min-height: 96px;
  padding-top: 0.65rem;
  padding-bottom: 0.55rem;
}

.header-navigation-row {
  min-height: 48px;
  padding-top: 0.35rem;
  padding-bottom: 0.45rem;
  border-top: 1px solid rgba(217, 225, 230, 0.72);
  background: rgba(243, 246, 248, 0.82);
}

.brand-logo-link {
  flex: 0 1 260px;
  min-width: 0;
  display: block;
  border-radius: 8px;
  text-decoration: none;
}

.brand-logo-link:focus-visible,
.main-nav a:focus-visible,
.footer-domain:focus-visible {
  outline: 3px solid rgba(100, 145, 175, 0.35);
  outline-offset: 3px;
}

.brand-logo-image {
  display: block;
  width: min(100%, 250px);
  height: auto;
}

.brand-logo-mobile { display: none; }

.brand-claim-panel {
  flex: 0 1 350px;
  width: min(36vw, 350px);
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.brand-claim-image {
  display: block;
  width: 100%;
  height: auto;
}

.event-label {
  min-width: 0;
  overflow: hidden;
  color: var(--brand-dark);
  font-size: 0.92rem;
  font-weight: 780;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-nav {
  min-width: 0;
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: thin;
}
.main-nav a {
  flex: 0 0 auto;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 680;
  text-decoration: none;
  white-space: nowrap;
}
.main-nav a:hover { background: var(--brand-soft); }

.app-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: clamp(1.5rem, 4vw, 3.5rem) auto;
  flex: 1;
}

.panel {
  padding: clamp(1.15rem, 4vw, 2.2rem);
  border: 1px solid rgba(217, 225, 230, 0.9);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.panel + .panel { margin-top: 1.25rem; }
.panel.compact { padding: 1.15rem; }
.panel.soft { background: var(--brand-soft); box-shadow: none; }
.panel.warning { border-color: #efd69b; background: #fff8e7; box-shadow: none; }
.panel.success { border-color: #b7dbc8; background: #f1fbf5; box-shadow: none; }
.panel.danger { border-color: #efc6c6; background: #fff4f4; box-shadow: none; }

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: clamp(1rem, 4vw, 2.5rem);
  align-items: center;
}
.hero h1, .page-title { margin: 0 0 0.65rem; font-size: clamp(2rem, 6vw, 3.6rem); line-height: 1.04; }
.hero p { margin: 0 0 1.3rem; color: var(--muted); font-size: 1.08rem; }
.hero-badge {
  min-height: 220px;
  display: grid;
  place-items: center;
  border-radius: calc(var(--radius) - 4px);
  background: linear-gradient(145deg, var(--brand), var(--brand-dark));
  color: white;
  text-align: center;
}
.hero-badge strong { display: block; font-size: clamp(3rem, 10vw, 6rem); line-height: 1; }
.hero-badge span { font-weight: 700; letter-spacing: 0.03em; }

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lead { margin-top: 0; color: var(--muted); font-size: 1.05rem; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.no-margin { margin: 0; }

.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.auto { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.challenge-card {
  position: relative;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}
.challenge-card h2, .challenge-card h3 { margin: 0.35rem 0 0.4rem; }
.challenge-card p { margin: 0 0 1rem; color: var(--muted); }
.challenge-card .button { margin-top: auto; align-self: flex-start; }
.challenge-icon { font-size: 2rem; line-height: 1; }
.challenge-status {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 750;
}
.challenge-status.done { background: #e5f5ec; color: var(--success); }

.button-row { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 46px;
  padding: 0.7rem 1rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--brand-dark);
  color: white;
  font-weight: 750;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(49, 91, 117, 0.18); }
.button.secondary { border-color: var(--line); background: white; color: var(--ink); }
.button.soft { background: var(--brand-soft); color: var(--brand-dark); }
.button.success { background: var(--success); }
.button.warning { background: var(--warning); }
.button.danger { background: var(--danger); }
.button.ghost { border-color: transparent; background: transparent; color: var(--brand-dark); }
.button.large { min-height: 54px; padding: 0.9rem 1.25rem; font-size: 1.05rem; }
.button.full { width: 100%; }
.button[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.field { display: grid; gap: 0.4rem; }
.field.full { grid-column: 1 / -1; }
.field label, .field-label { font-weight: 720; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.85rem;
  border: 1px solid #c9d4da;
  border-radius: 11px;
  background: white;
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 3px solid rgba(100, 145, 175, 0.18);
  border-color: var(--brand);
}
.help { margin: 0; color: var(--muted); font-size: 0.84rem; }
.checkbox-row { display: flex; align-items: flex-start; gap: 0.65rem; }
.checkbox-row input { width: 1.1rem; height: 1.1rem; margin-top: 0.22rem; }

.segmented { display: flex; gap: 0.4rem; padding: 0.3rem; border-radius: 13px; background: var(--brand-soft); }
.segmented button {
  flex: 1;
  padding: 0.65rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--brand-dark);
  font-weight: 750;
}
.segmented button.active { background: white; box-shadow: 0 4px 12px rgba(49, 91, 117, 0.12); }

.score-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
}
.total-score {
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  border: 12px solid var(--brand-soft);
  border-radius: 50%;
  color: var(--brand-dark);
  text-align: center;
}
.total-score strong { display: block; font-size: 2.5rem; line-height: 1; }
.total-score span { font-size: 0.8rem; font-weight: 700; }
.score-list { display: grid; gap: 0.75rem; margin-top: 1.25rem; }
.score-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.score-line strong { display: block; }
.score-line span { color: var(--muted); font-size: 0.88rem; }
.score-points { color: var(--brand-dark); font-size: 1.35rem; font-weight: 850; }

.timer-box, .counter-box {
  padding: clamp(1.25rem, 5vw, 2.5rem);
  border-radius: 18px;
  background: var(--brand-soft);
  text-align: center;
}
.timer-display, .counter-display {
  display: block;
  margin: 0.5rem 0 1rem;
  color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
  font-size: clamp(3.2rem, 15vw, 7rem);
  font-weight: 900;
  line-height: 1;
}
.counter-tap { min-height: 92px; font-size: 1.35rem; }

.score-preview {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: white;
  color: var(--brand-dark);
  font-weight: 800;
}

.quiz-header {
  position: sticky;
  top: var(--sticky-header-height);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
}
.quiz-timer { font-variant-numeric: tabular-nums; font-size: 1.25rem; font-weight: 850; color: var(--brand-dark); }
.question-card { padding: 1.2rem; border: 1px solid var(--line); border-radius: 15px; background: white; }
.question-card + .question-card { margin-top: 1rem; }
.question-card h3 { margin: 0 0 0.85rem; font-size: 1.05rem; }
.options { display: grid; gap: 0.55rem; }
.option {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
}
.option:hover { border-color: var(--brand); background: var(--brand-soft); }
.option input { margin-top: 0.25rem; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; }
.stat {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}
.stat span { display: block; color: var(--muted); font-size: 0.82rem; }
.stat strong { display: block; margin-top: 0.15rem; font-size: 1.55rem; }

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; min-width: 1080px; background: white; }
th, td { padding: 0.75rem 0.8rem; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { position: sticky; top: 0; background: #edf3f6; color: var(--brand-dark); font-size: 0.79rem; letter-spacing: 0.02em; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.rank-1 { background: var(--gold); }
tbody tr.rank-2 { background: var(--silver); }
tbody tr.rank-3 { background: var(--bronze); }
td.number, th.number { text-align: right; font-variant-numeric: tabular-nums; }
.status-pill {
  display: inline-flex;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 0.76rem;
  font-weight: 750;
}
.status-pill.success { background: #e5f5ec; color: var(--success); }
.status-pill.warning { background: #fff0c9; color: var(--warning); }

.qr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.qr-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  text-align: center;
  break-inside: avoid;
}
.qr-card h3 { margin: 0 0 0.3rem; }
.qr-card p { min-height: 2.6rem; margin: 0 0 0.8rem; color: var(--muted); font-size: 0.88rem; }
.qr-canvas { min-height: 210px; display: grid; place-items: center; }
.qr-canvas img, .qr-canvas canvas { max-width: 100%; height: auto !important; }
.url-box { margin-top: 0.75rem; padding: 0.5rem; border-radius: 8px; background: var(--page); font-size: 0.72rem; word-break: break-all; }

.code-badge {
  display: inline-flex;
  padding: 0.45rem 0.7rem;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 800;
}

.loading-panel { min-height: 260px; display: grid; place-items: center; align-content: center; text-align: center; }
.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid var(--brand-soft);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  z-index: 50;
  max-width: calc(100% - 2rem);
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: #17262f;
  color: white;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 15px);
  transition: 0.2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); }

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem clamp(1rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}
.site-footer > :last-child { text-align: right; }
.footer-domain {
  color: var(--brand-dark);
  font-weight: 760;
  text-decoration: none;
}
.footer-domain:hover { text-decoration: underline; }

hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
.hidden { display: none !important; }
.center { text-align: center; }

@media (max-width: 820px) {
  .header-brand-row, .header-navigation-row { padding-inline: 1rem; }
  .brand-logo-link { flex-basis: 235px; }
  .brand-claim-panel { width: min(40vw, 315px); }
  .event-label { font-size: 0.84rem; }
  .main-nav { max-width: 68vw; }
  .hero, .grid.two, .grid.three, .score-hero, .form-grid { grid-template-columns: 1fr; }
  .score-hero { text-align: center; }
  .total-score { margin: 0 auto; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  :root { --sticky-header-height: 94px; }
  .header-brand-row {
    min-height: 50px;
    gap: 0.55rem;
    padding: 0.45rem 0.75rem 0.35rem;
  }
  .header-navigation-row {
    min-height: 44px;
    gap: 0.5rem;
    padding: 0.3rem 0.75rem 0.4rem;
  }
  .brand-logo-link {
    flex: 0 1 auto;
    width: min(43vw, 145px);
  }
  .brand-logo-desktop { display: none; }
  .brand-logo-mobile {
    display: block;
    width: 100%;
  }
  .brand-claim-panel {
    flex: 0 1 auto;
    width: min(47vw, 160px);
    padding: 0;
    border-radius: 0;
  }
  .event-label {
    max-width: 34vw;
    font-size: 0.72rem;
  }
  .main-nav { max-width: 66vw; }
  .main-nav a { padding: 0.4rem 0.52rem; font-size: 0.76rem; }
}

@media (max-width: 520px) {
  .app-shell { width: min(100% - 1rem, 1120px); margin-top: 0.8rem; }
  .panel { border-radius: 14px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .button-row .button { flex: 1 1 100%; }
  .site-footer {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    text-align: center;
  }
  .site-footer > :last-child { text-align: center; }
}

@media print {
  .site-header, .site-footer, .no-print, .toast { display: none !important; }
  body { background: white; }
  .app-shell { width: 100%; margin: 0; }
  .panel { border: 0; box-shadow: none; padding: 0; }
  .qr-grid { grid-template-columns: repeat(2, 1fr); }
  .qr-card { page-break-inside: avoid; }
}

/* --------------------------------------------------------------------------
   Öffentliche Vorschaltseite und Direktlink-Sperre
   -------------------------------------------------------------------------- */
.challenge-shell {
  display: none;
  min-height: 100vh;
  flex-direction: column;
}

html[data-entry="challenge"] .challenge-shell { display: flex; }
html[data-entry="challenge"] .public-landing { display: none; }
html[data-entry="public"] .challenge-shell { display: none; }

.public-landing {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: clamp(1.25rem, 5vw, 4rem);
  background:
    radial-gradient(circle at 12% 0%, rgba(100, 145, 175, 0.18), transparent 34rem),
    #f7f9fa;
}

.public-landing-card {
  width: min(980px, 100%);
  padding: clamp(1.5rem, 5vw, 3.5rem);
  border: 1px solid rgba(217, 225, 230, 0.92);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.public-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1.5rem, 6vw, 5rem);
}

.public-brand-logo {
  display: block;
  width: min(48%, 390px);
  height: auto;
}

.public-brand-claim {
  display: block;
  width: min(42%, 330px);
  height: auto;
}

.public-landing-divider {
  height: 2px;
  margin: clamp(1.5rem, 4vw, 2.75rem) 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), rgba(100, 145, 175, 0.08));
}

.public-landing-copy {
  max-width: 720px;
}

.public-landing-copy h1 {
  margin: 0 0 0.75rem;
  color: var(--ink);
  font-size: clamp(2.25rem, 7vw, 4.4rem);
  line-height: 1;
}

.public-landing-copy p:last-child {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.18rem);
}

.public-landing-footer {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

@media (max-width: 680px) {
  .public-landing { justify-content: flex-start; padding-top: 2rem; }
  .public-brand-row { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .public-brand-logo { width: min(100%, 360px); }
  .public-brand-claim { width: min(86%, 300px); align-self: flex-end; }
  .public-landing-card { border-radius: 18px; }
}

@media print {
  .public-landing { display: none !important; }
}

/* --------------------------------------------------------------------------
   Wissens-Challenge: Admin-Fragenverwaltung
   -------------------------------------------------------------------------- */
.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.admin-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.3rem;
  border-radius: 13px;
  background: var(--brand-soft);
}

.admin-tabs button {
  min-height: 42px;
  padding: 0.55rem 0.85rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--brand-dark);
  font-weight: 760;
}

.admin-tabs button.active {
  background: white;
  box-shadow: 0 4px 12px rgba(49, 91, 117, 0.12);
}

.readiness-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--page);
}

.readiness-box strong { color: var(--brand-dark); }
.readiness-box.ready { border-color: #b7dbc8; background: #f1fbf5; }
.readiness-box.warning { border-color: #efd69b; background: #fff8e7; }

.question-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 1.25rem;
  align-items: start;
}

.question-list {
  display: grid;
  gap: 0.7rem;
}

.question-admin-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: start;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
}

.question-order {
  min-width: 2.1rem;
  display: grid;
  place-items: center;
  padding: 0.35rem;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 850;
}

.question-admin-copy h3 {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
  line-height: 1.35;
}

.question-admin-copy ol {
  margin: 0;
  padding-left: 1.3rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.question-admin-copy li.correct {
  color: var(--success);
  font-weight: 780;
}

.question-admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.button.small-button {
  min-height: 36px;
  padding: 0.45rem 0.65rem;
  border-radius: 9px;
  font-size: 0.82rem;
}

.editor-panel {
  position: sticky;
  top: calc(var(--sticky-header-height) + 1rem);
}

.editor-panel textarea { min-height: 96px; resize: vertical; }
.answer-grid { display: grid; gap: 0.7rem; }
.answer-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.6rem;
  align-items: center;
}
.answer-row input[type="radio"] { width: 1.15rem; height: 1.15rem; }

.inline-fields {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 0.8rem;
}

.notice-box {
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--warning);
  border-radius: 0 12px 12px 0;
  background: #fff8e7;
  color: #694900;
}

.result-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}
.result-summary > div {
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--page);
}
.result-summary span { display: block; color: var(--muted); font-size: 0.8rem; }
.result-summary strong { display: block; margin-top: 0.15rem; font-size: 1.25rem; }

@media (max-width: 900px) {
  .question-admin-grid { grid-template-columns: 1fr; }
  .editor-panel { position: static; }
}

@media (max-width: 620px) {
  .question-admin-item { grid-template-columns: auto minmax(0, 1fr); }
  .question-admin-actions { grid-column: 1 / -1; justify-content: stretch; }
  .question-admin-actions .button { flex: 1; }
  .inline-fields { grid-template-columns: 1fr; }
  .result-summary { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   QR-Wissensparcours - Einzelne Fragenstationen
   -------------------------------------------------------------------------- */
.question-single-panel {
  max-width: 860px;
  margin-inline: auto;
}

.question-single-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.question-single-header h1 { margin-bottom: 0; }

.progress-chip {
  flex: 0 0 auto;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
}

.question-card-single h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  line-height: 1.35;
}

.question-progress-wrap {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.question-progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.question-progress-item {
  min-height: 108px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.15rem;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  text-align: center;
}

.question-progress-item span,
.question-progress-item small {
  color: var(--muted);
  font-size: 0.78rem;
}

.question-progress-item strong {
  font-size: 1.8rem;
  line-height: 1;
  color: var(--brand-dark);
}

.question-progress-item.done {
  border-color: #8bc49b;
  background: #edf8f0;
}

.question-progress-item.done strong { color: #256c38; }
.question-progress-item.open { border-style: dashed; }

.success-note {
  border-color: #9fceb0;
  background: #edf8f0;
  color: #245f35;
}

.question-admin-item.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(100, 145, 175, 0.12);
}

.question-qr-card h3 {
  font-size: 1.2rem;
  color: var(--brand-dark);
}

@media (max-width: 640px) {
  .question-single-header {
    display: grid;
  }

  .progress-chip {
    justify-self: start;
  }

  .question-progress-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media print {
  .question-qr-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --------------------------------------------------------------------------
   LANDOLT Live Suite – Status, Punktekarte und dynamische Einstellungen
   -------------------------------------------------------------------------- */
.status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 14px;
  background: #fff;
}
.status-banner > div { display: grid; gap: 0.1rem; }
.status-banner strong { font-size: 0.95rem; }
.status-banner span { color: var(--muted); font-size: 0.84rem; }
.status-banner.draft { border-left-color: #7c8790; background: #f7f8f9; }
.status-banner.approved { border-left-color: var(--brand); background: #f2f8fb; }
.status-banner.live { border-left-color: var(--success); background: #f1fbf5; }
.status-banner.closed { border-left-color: var(--danger); background: #fff4f4; }

.status-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #edf1f3;
  color: #43525b;
  font-size: 0.78rem;
  font-weight: 800;
}
.status-chip.draft { background: #e9edef; color: #4c5961; }
.status-chip.approved { background: #e3f1f8; color: var(--brand-dark); }
.status-chip.live { background: #e1f4e9; color: var(--success); }
.status-chip.closed { background: #f7e4e4; color: var(--danger); }
.status-chip.demo { background: #fff0c9; color: #775000; }

.admin-status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin: 0.8rem 0 1.25rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.status-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}
.status-step {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  text-align: left;
}
.status-step strong { font-size: 1rem; }
.status-step span { color: var(--muted); font-size: 0.82rem; }
.status-step.active { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(100,145,175,.12); }
.status-step[disabled] { cursor: default; opacity: .72; }

.lock-banner {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  border-left: 4px solid var(--warning);
  border-radius: 0 12px 12px 0;
  background: #fff8e7;
  color: #6e4a00;
}
.form-locked { opacity: 0.82; }
.section-heading {
  margin-top: 0.4rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}
.section-heading h3 { margin: 0; color: var(--brand-dark); }

.scorecard-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem;
}
.scorecard-header h1 { margin: 0 0 0.55rem; }
.score-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.score-row strong { display: block; }
.score-row span { color: var(--muted); font-size: .88rem; }
.score-value { color: var(--brand-dark); font-size: 1.3rem; font-weight: 850; }
.large-code { font-size: 1.1rem; letter-spacing: .08em; }
.result-points { color: var(--brand-dark); font-size: clamp(4rem, 14vw, 8rem); font-weight: 900; line-height: 1; }

.input-display {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--page);
  color: var(--brand-dark);
  font-weight: 850;
}
.progress-summary {
  display: flex;
  align-items: baseline;
  gap: .7rem;
  margin: 1rem 0;
  padding: .9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--brand-soft);
}
.progress-summary strong { color: var(--brand-dark); font-size: 2rem; }
.progress-summary span { color: var(--muted); }

.quiz-header .timer-chip,
.timer-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .4rem .65rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}
.question-stack { display: grid; gap: 1rem; }
.option-list { display: grid; gap: .6rem; }
.option-row {
  display: grid;
  grid-template-columns: auto auto minmax(0,1fr);
  align-items: start;
  gap: .65rem;
  padding: .8rem .9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}
.option-row:hover { border-color: var(--brand); background: var(--brand-soft); }
.option-row input { margin-top: .25rem; }
.option-letter {
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: .82rem;
  font-weight: 850;
}
.sticky-submit {
  position: sticky;
  bottom: .75rem;
  z-index: 8;
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  padding: .75rem;
  border: 1px solid rgba(217,225,230,.9);
  border-radius: 14px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 26px rgba(40,70,90,.12);
  backdrop-filter: blur(10px);
}

.required { color: var(--danger); }
.key { color: var(--brand-dark); font-weight: 800; }

@media (max-width: 900px) {
  .status-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .scorecard-header { grid-template-columns: 1fr; text-align: center; }
  .status-flow { grid-template-columns: 1fr; }
  .status-step { min-height: 0; }
}

@media print {
  .status-banner { display: none !important; }
  .rule-print .challenge-card { break-inside: avoid; }
}

/* Zweisprachige Teilnehmeroberflaeche DE / FR */
.fr-sub {
  display: block;
  margin-top: .18rem;
  font-size: .88em;
  line-height: 1.35;
  font-weight: 400;
  font-style: italic;
  color: #5c6d77;
}
.fr-note {
  display: block;
  margin-top: .3rem;
  font-size: .9em;
  line-height: 1.45;
  font-style: italic;
  color: #5c6d77;
}
.privacy-box {
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: #f4f7f9;
  border: 1px solid #d7e1e7;
}
.privacy-box p { margin: 0 0 .55rem; }
.privacy-box p:last-child { margin-bottom: 0; }
.bilingual-admin .answer-pair {
  display: grid;
  gap: .35rem;
  margin-bottom: .7rem;
}
.fr-admin-input { margin-left: 2.3rem; }
@media (max-width: 640px) {
  .fr-admin-input { margin-left: 0; }
}
