:root {
  --ink: #231f2b;
  --muted: #6e6877;
  --paper: #fffaf3;
  --surface: #ffffff;
  --primary: #5b2a86;
  --primary-rgb: 91,42,134;
  --primary-dark: #3d195e;
  --on-primary: #ffffff;
  --accent: #f3b61f;
  --header-bg: #fffaf3;
  --header-rgb: 255,250,243;
  --on-header: #231f2b;
  --footer-bg: #24162f;
  --on-footer: #ffffff;
  --line: #e7dfeb;
  --success: #1f7a4f;
  --danger: #a52a2a;
  --radius: 18px;
  --shadow: 0 16px 38px rgba(var(--primary-rgb), .10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.6; }
a { color: var(--primary); }
img { max-width: 100%; }
button, input, textarea, select { font: inherit; }
.container { width: min(1120px, calc(100% - 36px)); margin-inline: auto; }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 10px 14px; z-index: 100; }
.skip-link:focus { left: 8px; }
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(var(--header-rgb), .94); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(var(--primary-rgb), .08); }
.nav-wrap { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--on-header); text-decoration: none; line-height: 1.15; min-width: 0; }
.brand-copy { display: grid; gap: 4px; min-width: 0; }
.brand-copy strong { overflow-wrap: anywhere; }
.brand small { color: var(--on-header); opacity: .72; font-size: .78rem; font-weight: 500; }
.brand-mark, .brand-logo-wrap { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 14px; display: grid; place-items: center; color: var(--on-primary); background: var(--primary); font-weight: 900; box-shadow: 0 8px 20px rgba(var(--primary-rgb), .25); overflow: hidden; }
.brand-logo-wrap { width: 58px; height: 52px; flex-basis: 58px; padding: 4px; background: rgba(255,255,255,.88); border: 1px solid rgba(var(--primary-rgb), .12); box-shadow: 0 8px 20px rgba(35,31,43,.10); }
.brand-logo { width: 100%; height: 100%; object-fit: contain; display: block; }
.main-nav { display: flex; align-items: center; gap: 8px; }
.main-nav a { color: var(--on-header); text-decoration: none; padding: 10px 13px; border-radius: 10px; font-weight: 700; }
.main-nav a:hover, .main-nav a.active { color: var(--on-primary); background: var(--primary); }
.menu-button { display: none; border: 0; border-radius: 10px; padding: 10px 13px; background: var(--primary); color: var(--on-primary); font-weight: 800; }
.hero { position: relative; overflow: hidden; padding: 92px 0 80px; background: radial-gradient(circle at 10% 80%, rgba(var(--primary-rgb), .16), transparent 28%); background: radial-gradient(circle at 85% 15%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 24%), radial-gradient(circle at 10% 80%, rgba(var(--primary-rgb), .16), transparent 28%); }
.hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(var(--primary-rgb), .18) 1px, transparent 1px); background-size: 26px 26px; mask-image: linear-gradient(to bottom, rgba(0,0,0,.6), transparent 75%); pointer-events: none; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.25fr .75fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: 999px; background: #fff; color: var(--primary); font-weight: 800; box-shadow: var(--shadow); }
h1, h2, h3 { line-height: 1.12; margin-top: 0; }
h1 { font-size: clamp(2.6rem, 7vw, 5.6rem); letter-spacing: -.055em; margin: 22px 0; }
h2 { font-size: clamp(1.9rem, 4vw, 3.2rem); letter-spacing: -.035em; }
.lead { font-size: clamp(1.08rem, 2vw, 1.32rem); color: var(--muted); max-width: 66ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--primary); color: var(--on-primary); text-decoration: none; font-weight: 800; cursor: pointer; }
.button:hover { background: var(--primary-dark); color: var(--on-primary); }
.button.secondary { background: #fff; color: var(--primary); border: 1px solid var(--line); }
.button.secondary:hover { background: rgba(var(--primary-rgb), .06); }
.hero-card { padding: 28px; background: rgba(255,255,255,.92); border: 1px solid #fff; border-radius: 28px; box-shadow: var(--shadow); transform: rotate(1.5deg); }
.hero-card strong { display: block; font-size: 1.25rem; }
.confetti { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.confetti span { aspect-ratio: 1; border-radius: 50% 18% 50% 18%; background: var(--primary); }
.confetti span:nth-child(2), .confetti span:nth-child(4) { background: var(--accent); }
.confetti span:nth-child(3) { background: #df4f73; }
.section { padding: 76px 0; }
.section.alt { background: #fff; }
.section-head { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 30px; }
.section-head p { max-width: 60ch; color: var(--muted); margin: 0; }
.compact-head { align-items: center; }
.compact-head h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); margin-bottom: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: 0 8px 24px rgba(35,31,43,.05); }
.card p:last-child { margin-bottom: 0; }
.icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: rgba(var(--primary-rgb), .10); color: var(--primary); font-weight: 900; margin-bottom: 20px; }
.event-list { display: grid; gap: 14px; }
.event { display: grid; grid-template-columns: 96px 1fr auto; gap: 20px; align-items: center; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.event-date { min-height: 72px; border-radius: 14px; display: grid; place-items: center; text-align: center; background: var(--primary); color: var(--on-primary); font-weight: 900; line-height: 1.05; }
.event-date strong { font-size: 1.6rem; }
.event h3 { margin-bottom: 5px; }
.event-meta { color: var(--muted); margin: 0; }
.prose { max-width: 780px; }
.prose h2 { margin-top: 2.2rem; }
.notice { padding: 18px 20px; border-left: 4px solid var(--accent); background: #fff; border-radius: 12px; }
.page-hero { padding: 62px 0 34px; }
.page-hero h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.contact-item { padding: 24px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.site-footer { padding: 48px 0 24px; background: var(--footer-bg); color: var(--on-footer); }
.site-footer a { color: var(--on-footer); text-decoration: none; }
.footer-grid { display: flex; justify-content: space-between; gap: 30px; }
.footer-grid nav { display: flex; flex-wrap: wrap; gap: 18px; align-content: flex-start; }
.footer-bottom { margin-top: 30px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); font-size: .9rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
label { font-weight: 800; }
input, textarea, select { width: 100%; border: 1px solid #cfc5d5; border-radius: 10px; padding: 11px 12px; background: #fff; color: var(--ink); }
textarea { min-height: 140px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(var(--primary-rgb), .14); border-color: var(--primary); }
small { line-height: 1.4; }
.admin-shell { min-height: 100vh; background: #f7f3f8; }
.admin-header { background: var(--footer-bg); color: var(--on-footer); }
.admin-header .container { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.admin-header a { color: var(--on-footer); }
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-nav a { padding: 8px 10px; border-radius: 9px; text-decoration: none; font-weight: 700; }
.admin-nav a:hover, .admin-nav a.active { background: var(--primary); color: var(--on-primary); }
.admin-main { padding: 38px 0 70px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f7f3f8; }
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.link-button { border: 0; background: none; color: var(--primary); text-decoration: underline; cursor: pointer; padding: 0; font: inherit; }
.link-button.danger { color: var(--danger); }
.alert { padding: 13px 15px; border-radius: 10px; margin-bottom: 20px; }
.alert.success { color: #145d3b; background: #e5f6ed; }
.alert.error { color: #7a1c1c; background: #fdeaea; }
.login-card { width: min(460px, calc(100% - 36px)); margin: 8vh auto; padding: 30px; background: #fff; border-radius: 20px; box-shadow: var(--shadow); }
.muted { color: var(--muted); }

/* Inhaltsverwaltung mit Reitern */
.content-editor { display: grid; gap: 18px; }
.tab-list { display: flex; gap: 8px; flex-wrap: wrap; padding: 7px; border: 1px solid var(--line); background: #fff; border-radius: 14px; box-shadow: 0 6px 20px rgba(35,31,43,.04); }
.tab-button { border: 0; background: transparent; color: var(--ink); padding: 10px 15px; border-radius: 10px; font-weight: 800; cursor: pointer; }
.tab-button:hover { background: rgba(var(--primary-rgb), .06); color: var(--primary); }
.tab-button.active { background: var(--primary); color: var(--on-primary); }
.js-enabled .tab-panel { display: none; }
.js-enabled .tab-panel.active { display: block; }
.tab-panel { padding: 28px; }
.panel-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; padding-bottom: 18px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 6px; }
.panel-heading p { margin: 0; }
.editor-actions { position: sticky; bottom: 16px; z-index: 8; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); box-shadow: var(--shadow); }

/* Darstellung und Logo */
.design-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr); gap: 22px; align-items: start; }
.color-grid { display: grid; gap: 18px; }
.color-field { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.color-field:last-child { border-bottom: 0; padding-bottom: 0; }
.color-control { display: grid; grid-template-columns: 58px 1fr; gap: 10px; }
.color-picker { width: 58px; height: 46px; padding: 3px; cursor: pointer; }
.theme-preview { position: sticky; top: 92px; }
.preview-browser { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); }
.preview-header { min-height: 68px; display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--header-bg); color: var(--on-header); border-bottom: 1px solid rgba(var(--primary-rgb), .10); font-size: .84rem; }
.preview-header > span:nth-child(2) { display: grid; line-height: 1.15; }
.preview-header small { color: var(--on-header); opacity: .7; }
.preview-logo { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 36px; border-radius: 10px; background: var(--primary); color: var(--on-primary); font-weight: 900; }
.preview-logo.has-image { padding: 3px; background: rgba(255,255,255,.9); }
.preview-logo img { width: 100%; height: 100%; object-fit: contain; }
.preview-nav { margin-left: auto; color: var(--on-header); font-weight: 700; font-size: .72rem; }
.preview-content { padding: 34px 26px 38px; background: var(--paper); background: radial-gradient(circle at 86% 12%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 28%); }
.preview-content h3 { margin: 14px 0 10px; font-size: 2rem; letter-spacing: -.04em; }
.preview-eyebrow { display: inline-flex; padding: 5px 9px; background: #fff; border-radius: 999px; color: var(--primary); font-size: .74rem; font-weight: 800; }
.preview-button { display: inline-flex; margin-top: 12px; padding: 9px 12px; border-radius: 9px; background: var(--primary); color: var(--on-primary); font-size: .8rem; font-weight: 800; }
.preview-footer { padding: 15px 18px; background: var(--footer-bg); color: var(--on-footer); font-size: .76rem; }
.logo-card { margin-top: 22px; }
.logo-management { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr); gap: 26px; align-items: center; }
.logo-preview-box { min-height: 180px; display: grid; place-items: center; align-content: center; gap: 12px; padding: 24px; border: 1px dashed #cfc5d5; border-radius: 16px; background: #faf8fb; text-align: center; }
.logo-preview-box img { max-width: 100%; max-height: 160px; object-fit: contain; }
.logo-preview-box .brand-mark { margin: 0 auto; }
.logo-remove-form { margin-top: 16px; }

@media (max-width: 920px) {
  .design-layout { grid-template-columns: 1fr; }
  .theme-preview { position: static; }
}
@media (max-width: 820px) {
  .menu-button { display: inline-flex; }
  .main-nav { position: absolute; top: 68px; left: 18px; right: 18px; display: none; padding: 10px; border-radius: 14px; background: #fff; box-shadow: var(--shadow); flex-direction: column; align-items: stretch; }
  .main-nav.open { display: flex; }
  .main-nav a { color: var(--ink); }
  .main-nav a:hover, .main-nav a.active { color: var(--on-primary); }
  .hero-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-card { transform: none; }
  .grid-3 { grid-template-columns: 1fr; }
  .event { grid-template-columns: 78px 1fr; }
  .event > .button { grid-column: 1 / -1; }
  .section-head, .footer-grid { align-items: flex-start; flex-direction: column; }
  .admin-header .container { align-items: flex-start; flex-direction: column; padding-block: 14px; }
  .admin-nav { width: 100%; }
  .logo-management { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .brand small { display: none; }
  .brand-logo-wrap { width: 50px; flex-basis: 50px; }
  .hero { padding: 66px 0 56px; }
  h1 { font-size: 2.65rem; }
  .section { padding: 56px 0; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .tab-list { display: grid; grid-template-columns: 1fr 1fr; }
  .tab-button { text-align: center; }
  .tab-panel { padding: 20px; }
  .editor-actions { align-items: stretch; flex-direction: column; }
  .editor-actions .button { width: 100%; }
  .preview-nav { display: none; }
}

/* Version 1.2.0: Farbschemata und Sichtbarkeitsschalter */
.theme-editor { display: grid; gap: 22px; }
.scheme-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.scheme-card { display: grid; gap: 10px; min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; }
.scheme-card:hover, .scheme-card.active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .10); }
.scheme-card strong { font-size: .88rem; }
.scheme-colors { display: grid; grid-template-columns: repeat(4, 1fr); height: 30px; overflow: hidden; border-radius: 9px; border: 1px solid rgba(35,31,43,.08); }
.scheme-colors i { display: block; background: var(--swatch); }
.auto-palette-box { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, .8fr); gap: 18px; align-items: end; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: #faf8fb; }
.base-color-control { max-width: 330px; }
.switch-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #fff; cursor: pointer; }
.switch-row input[type="checkbox"] { appearance: none; width: 46px; height: 26px; flex: 0 0 46px; margin: 1px 0 0; padding: 0; border: 0; border-radius: 999px; background: #cfc5d5; position: relative; transition: .18s ease; cursor: pointer; }
.switch-row input[type="checkbox"]::after { content: ""; position: absolute; width: 20px; height: 20px; top: 3px; left: 3px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(35,31,43,.24); transition: .18s ease; }
.switch-row input[type="checkbox"]:checked { background: var(--primary); }
.switch-row input[type="checkbox"]:checked::after { transform: translateX(20px); }
.switch-row input[type="checkbox"]:focus-visible { outline: 3px solid rgba(var(--primary-rgb), .18); outline-offset: 2px; }
.switch-row span { display: grid; gap: 3px; line-height: 1.35; }
.switch-row small { color: var(--muted); font-weight: 500; }
.compact-switch { margin-top: 5px; padding: 11px 12px; }
.compact-switch input[type="checkbox"] { width: 42px; height: 24px; flex-basis: 42px; }
.compact-switch input[type="checkbox"]::after { width: 18px; height: 18px; }
.compact-switch input[type="checkbox"]:checked::after { transform: translateX(18px); }
.theme-details { border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.theme-details summary { padding: 15px 17px; font-weight: 800; cursor: pointer; }
.theme-details[open] summary { border-bottom: 1px solid var(--line); }
.theme-details .color-grid { padding: 18px; }
.contact-empty { grid-column: 1 / -1; }

@media (max-width: 760px) {
  .scheme-grid { grid-template-columns: 1fr 1fr; }
  .auto-palette-box { grid-template-columns: 1fr; align-items: stretch; }
}
@media (max-width: 460px) {
  .scheme-grid { grid-template-columns: 1fr; }
}

/* Version 1.3.0: Seitenbaukasten */
.main-nav { flex-wrap: wrap; justify-content: flex-end; }
.preview-banner { padding: 10px 18px; background: #fff3cd; color: #694f00; text-align: center; font-weight: 800; border-bottom: 1px solid #ead58d; }
.cms-page-hero-large { padding: 92px 0 72px; background: radial-gradient(circle at 85% 15%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 25%), radial-gradient(circle at 10% 80%, rgba(var(--primary-rgb), .13), transparent 30%); }
.cms-page-hero-large .container { max-width: 900px; margin-left: max(18px, calc((100% - 1120px) / 2)); }
.cms-section-soft { background: color-mix(in srgb, var(--primary) 7%, var(--paper)); }
.cms-prose-wrap { max-width: 820px; }
.cms-prose-wrap h2, .cms-image-copy h2, .cms-callout h2 { margin-top: 16px; }
.cms-copy p:first-child { margin-top: 0; }
.cms-copy p:last-child, .cms-copy ul:last-child { margin-bottom: 0; }
.cms-copy ul { padding-left: 1.25rem; }
.cms-intro { max-width: 58ch; color: var(--muted); }
.cms-split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.cms-image-text { display: grid; grid-template-columns: minmax(260px, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.cms-image-text.image-right .cms-media { order: 2; }
.cms-media { overflow: hidden; border-radius: 24px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.cms-media img { width: 100%; min-height: 320px; height: 100%; max-height: 520px; display: block; object-fit: cover; }
.cms-image-placeholder { min-height: 320px; display: grid; place-items: center; font-size: 5rem; background: radial-gradient(circle at 70% 25%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 30%), rgba(var(--primary-rgb), .10); }
.cms-card-grid .card { height: 100%; }
.cms-callout { display: flex; align-items: center; justify-content: space-between; gap: 34px; padding: clamp(28px, 5vw, 48px); border-radius: 26px; background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow); }
.cms-callout .eyebrow { color: var(--primary); }
.cms-callout .cms-copy { max-width: 64ch; }
.cms-callout .button { flex: 0 0 auto; background: var(--accent); color: #231f2b; }

.cms-admin-hint { margin-bottom: 20px; background: color-mix(in srgb, var(--primary) 6%, #fff); }
.cms-page-settings .field { align-content: start; }
.status-badge { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 9px; border-radius: 999px; font-size: .78rem; font-weight: 800; }
.status-badge.published { background: #e5f6ed; color: #145d3b; }
.status-badge.draft { background: #eee9f1; color: #665d6d; }
.status-badge.layout { background: rgba(var(--primary-rgb), .10); color: var(--primary); }
.input-prefix { display: flex; align-items: stretch; min-width: 0; }
.input-prefix span { display: flex; align-items: center; padding: 0 10px; border: 1px solid #cfc5d5; border-right: 0; border-radius: 10px 0 0 10px; background: #f7f3f8; color: var(--muted); font-size: .82rem; white-space: nowrap; }
.input-prefix input { border-radius: 0 10px 10px 0; }
.cms-switch-stack { gap: 10px; }
.cms-section-manager { padding-top: 54px; }
.cms-section-list { display: grid; gap: 13px; }
.cms-section-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 18px; }
.cms-section-row h3 { margin: 8px 0 4px; font-size: 1.1rem; }
.cms-section-number { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; background: rgba(var(--primary-rgb), .10); color: var(--primary); font-weight: 900; }
.cms-section-actions { display: grid; gap: 10px; justify-items: end; }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--primary); font-weight: 900; cursor: pointer; }
.icon-button:hover:not(:disabled) { border-color: var(--primary); background: rgba(var(--primary-rgb), .06); }
.icon-button:disabled { opacity: .35; cursor: default; }
.cms-empty-state { text-align: center; padding: 42px; }
.cms-empty-state p { color: var(--muted); }
.layout-explainer { min-height: 48px; padding: 13px 15px; border-left: 4px solid var(--accent); border-radius: 10px; background: #faf8fb; color: var(--muted); }
.cms-upload-grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 18px; align-items: center; }
.cms-current-image { min-height: 150px; display: grid; place-items: center; overflow: hidden; border: 1px dashed #cfc5d5; border-radius: 14px; background: #faf8fb; color: var(--muted); }
.cms-current-image img { width: 100%; height: 150px; object-fit: cover; }
.cms-card-editor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cms-card-editor { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #faf8fb; }
.cms-card-editor legend { padding: 0 7px; color: var(--primary); font-weight: 900; }
.cms-card-editor textarea { min-height: 120px; }

@media (max-width: 960px) {
  .cms-card-editor-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .cms-split, .cms-image-text { grid-template-columns: 1fr; }
  .cms-image-text.image-right .cms-media { order: 0; }
  .cms-callout { align-items: flex-start; flex-direction: column; }
  .cms-section-row { grid-template-columns: 46px minmax(0, 1fr); }
  .cms-section-actions { grid-column: 1 / -1; justify-items: start; display: flex; justify-content: space-between; width: 100%; }
}
@media (max-width: 620px) {
  .cms-upload-grid { grid-template-columns: 1fr; }
  .input-prefix span { display: none; }
  .input-prefix input { border-radius: 10px; }
  .cms-section-row { grid-template-columns: 1fr; }
  .cms-section-number { display: none; }
  .cms-section-actions { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 1040px) {
  .menu-button { display: inline-flex; }
  .main-nav { position: absolute; top: 68px; left: 18px; right: 18px; display: none; padding: 10px; border-radius: 14px; background: #fff; box-shadow: var(--shadow); flex-direction: column; align-items: stretch; flex-wrap: nowrap; }
  .main-nav.open { display: flex; }
  .main-nav a { color: var(--ink); }
  .main-nav a:hover, .main-nav a.active { color: var(--on-primary); }
}

/* Version 1.4.0: vollständiger Seitenbaukasten und Backend-Sidebar */
.admin-shell { min-height: 100vh; background: #f5f2f7; }
.admin-layout { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.admin-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 16px; background: var(--footer-bg); color: var(--on-footer); z-index: 40; }
.admin-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 22px; border-bottom: 1px solid rgba(255,255,255,.14); }
.admin-brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--primary); color: var(--on-primary); font-weight: 900; }
.admin-brand > span:last-child { display: grid; gap: 2px; min-width: 0; }
.admin-brand strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-brand small { opacity: .72; }
.admin-nav { display: grid; gap: 6px; margin-top: 22px; }
.admin-nav a { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 11px; color: var(--on-footer); text-decoration: none; font-weight: 750; }
.admin-nav a span { width: 22px; text-align: center; opacity: .82; }
.admin-nav a:hover, .admin-nav a.active { background: var(--primary); color: var(--on-primary); }
.admin-sidebar-bottom { margin-top: auto; display: grid; gap: 5px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); }
.admin-sidebar-bottom a { padding: 8px 10px; color: var(--on-footer); text-decoration: none; opacity: .85; }
.admin-workspace { min-width: 0; }
.admin-topbar { min-height: 68px; display: flex; align-items: center; gap: 16px; padding: 10px clamp(18px,3vw,38px); background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.admin-topbar > div { display: grid; gap: 1px; }
.admin-topbar small { color: var(--muted); }
.admin-topbar > a { margin-left: auto; font-weight: 750; text-decoration: none; }
.admin-menu-toggle { display: none; }
.admin-main { padding: 34px 0 70px; }
.admin-container { width: min(1180px, calc(100% - 36px)); margin-inline: auto; }
.admin-page-head { align-items: flex-start; margin-bottom: 24px; }
.admin-page-head h1 { margin-top: 8px; }
.admin-page-head p { max-width: 72ch; }
.status-badge.system { background: #e9eefc; color: #324d91; }
.button.small { min-height: 36px; padding: 7px 11px; font-size: .86rem; }
.cms-page-list { display: grid; gap: 12px; }
.cms-page-row { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 16px; padding: 18px; }
.cms-page-row-main { min-width: 0; }
.cms-page-title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.cms-page-title-line h2 { margin: 0; font-size: 1.12rem; }
.cms-page-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 14px; margin-top: 8px; color: var(--muted); font-size: .88rem; }
.cms-page-row-actions, .cms-section-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.drag-handle { width: 34px; height: 42px; padding: 0; border: 0; border-radius: 9px; background: #f0ebf3; color: var(--primary); font-size: 1.25rem; font-weight: 900; cursor: grab; touch-action: none; }
.drag-handle:active { cursor: grabbing; }
.drag-handle:focus-visible { outline: 3px solid rgba(var(--primary-rgb),.18); }
.is-dragging { opacity: .45; border: 2px dashed var(--primary); }
.sort-save-status { min-height: 28px; padding: 9px 4px; color: var(--muted); font-size: .88rem; }
.page-editor-tabs .tab-panel:not(.active) { display: none; }
.block-toolbar { display: grid; gap: 16px; margin-bottom: 18px; }
.block-toolbar > div:first-child { display: grid; gap: 4px; }
.block-palette { display: flex; flex-wrap: wrap; gap: 8px; }
.block-palette a { padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-decoration: none; font-weight: 750; font-size: .86rem; }
.block-palette a:hover { border-color: var(--primary); background: rgba(var(--primary-rgb),.06); }
.cms-section-row { grid-template-columns: 34px 48px minmax(0,1fr) minmax(190px,auto); }
.cms-section-summary { min-width: 0; }
.cms-section-row.is-hidden { opacity: .72; background: #f4f1f5; border-style: dashed; }
.cms-switch-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.contact-option-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-bottom: 10px; }
.contact-option { display: grid; gap: 8px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #faf8fb; }
.cms-hero { padding: clamp(58px,8vw,94px) 0; background: radial-gradient(circle at 85% 15%, color-mix(in srgb,var(--accent) 26%,transparent),transparent 27%), radial-gradient(circle at 10% 80%,rgba(var(--primary-rgb),.12),transparent 32%), var(--paper); }
.cms-hero-simple { padding-block: clamp(48px,6vw,72px); }
.cms-hero-large { padding-block: clamp(82px,10vw,126px); }
.cms-hero-center { text-align: center; }
.cms-hero-center .cms-hero-copy { max-width: 840px; margin-inline: auto; }
.cms-hero-center .actions { justify-content: center; }
.cms-hero h1 { max-width: 18ch; margin: 12px 0 18px; font-size: clamp(2.3rem,6vw,4.8rem); line-height: .98; }
.cms-hero-center h1 { margin-inline: auto; }
.cms-hero .lead { max-width: 68ch; }
.cms-preview-hidden { position: relative; outline: 3px dashed #d39b00; outline-offset: -3px; }
.cms-hidden-label { position: absolute; z-index: 3; top: 8px; right: 8px; padding: 5px 9px; border-radius: 8px; background: #fff3cd; color: #694f00; font-size: .78rem; font-weight: 850; }
.event-copy { min-width: 0; }
.event-copy h3 { margin-top: 0; }
.cms-prose-wrap.notice { padding: 20px; max-width: none; border-left: 5px solid var(--accent); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }

@media (max-width: 980px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: fixed; left: 0; top: 0; width: min(300px,88vw); transform: translateX(-105%); transition: transform .2s ease; box-shadow: 20px 0 50px rgba(0,0,0,.2); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-menu-toggle { display: inline-flex; }
  .cms-page-row { grid-template-columns: 34px minmax(0,1fr); }
  .cms-page-row-actions { grid-column: 2; justify-content: flex-start; }
  .cms-section-row { grid-template-columns: 34px 44px minmax(0,1fr); }
  .cms-section-actions { grid-column: 2 / -1; justify-content: flex-start; }
  .cms-switch-grid { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .admin-topbar small, .admin-topbar > a { display: none; }
  .admin-container { width: min(100% - 24px,1180px); }
  .cms-page-row, .cms-section-row { grid-template-columns: 34px minmax(0,1fr); padding: 14px; }
  .cms-section-number { display: none; }
  .cms-page-row-actions, .cms-section-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .contact-option-grid { grid-template-columns: 1fr; }
  .cms-hero h1 { font-size: clamp(2.15rem,12vw,3.5rem); }
}
