@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@400;500;600&family=Cormorant+Garamond:wght@400;500;600&family=Lora:wght@400;500;600&family=Great+Vibes&family=Sacramento&family=Parisienne&family=Dancing+Script:wght@500;700&family=Caveat:wght@500;700&family=Amatic+SC:wght@400;700&family=Montserrat:wght@400;500;600&display=swap');

:root {
  --cream: #faf6f1;
  --paper: #ffffff;
  --ink: #1f1d1a;
  --ink-2: #4a463f;
  --ink-3: #807868;
  --line: #e6dfd0;
  --line-2: #d8cfb8;
  --accent: #c8965f;
  --accent-2: #a87a45;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =====================================================================
   FRAGEBOGEN — Top-Level Layout
   ===================================================================== */
html, body {
  /* clip statt hidden: verhindert horizontales Scrollen, OHNE einen
     Scroll-Container zu etablieren. overflow-x:hidden auf html macht html
     zum Scroll-Container, was position:sticky bei Descendants killt. */
  overflow-x: clip;
  max-width: 100vw;
}
.fb-app {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  /* iOS-Safari macht in aktiven Elementen ein „Smart Resize" der Schriftgröße,
     wodurch z.B. die Beschreibung der angewählten Radio-Card plötzlich größer
     gerendert wird als die der nicht-aktiven. Hier hart auf 100 % fixieren. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
.fb-brand-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}
.fb-header {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.fb-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.fb-header-text { line-height: 1.2; }
.fb-header-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
.fb-header-sub {
  font-size: 13px;
  color: var(--ink-3);
  margin: 3px 0 0;
}

.fb-body {
  flex: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 36px;
  align-items: start;
}
.fb-app-mobile .fb-body {
  grid-template-columns: 1fr;
  padding: 16px;
  gap: 0;
}

.fb-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Aside-Spalte: muss auf volle Hoehe der Form-Spalte strecken (align-self: stretch),
   sonst hat das innere position:sticky keinen Container-Spielraum zum stickyen.
   Wichtig: NICHT `align-self: start` — das schrumpft die Spalte auf Inhaltshoehe
   und sticky funktioniert nur fuer ein paar Pixel. */
.fb-aside {
  align-self: stretch;
  position: relative; /* eigener Stacking-Context, schadet nicht */
}
.fb-aside-sticky {
  position: sticky;
  top: 80px;
  /* Hard-Cap auf Viewport-Hoehe minus Header (80px) + kleines Spacing.
     Wenn der Preview-Block hoeher waere, kriegt der Wrapper internes Scrollen
     statt aus dem Viewport zu rutschen. */
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  scrollbar-width: thin;
}
/* Subtiler WebKit-Scrollbar im Preview-Aside */
.fb-aside-sticky::-webkit-scrollbar { width: 6px; }
.fb-aside-sticky::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.18); border-radius: 3px; }
.fb-aside-sticky::-webkit-scrollbar-track { background: transparent; }

/* Section Card */
.fb-section {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.fb-section-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fffaf2 0%, var(--paper) 100%);
}
.fb-section-num {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  font-size: 13px;
  font-weight: 600;
  display: grid; place-items: center;
  flex-shrink: 0;
  font-family: 'Playfair Display', serif;
}
.fb-section-text { flex: 1; min-width: 0; }
.fb-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 19px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.fb-section-sub {
  font-size: 13px;
  color: var(--ink-3);
  margin: 3px 0 0;
  line-height: 1.45;
}
.fb-section-body { padding: 22px 24px 24px; }

/* Form fields */
.fb-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
}
.fb-stack { display: flex; flex-direction: column; gap: 18px; }

.fb-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.fb-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.01em;
}
.fb-req { color: #b04a3a; margin-left: 3px; }
.fb-hint {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.45;
}
.fb-error {
  font-size: 12px;
  color: #b04a3a;
}
.fb-input, .fb-textarea {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 10px 13px;
  border-radius: 8px;
  font-family: inherit;
  /* 16px verhindert das automatische iOS-Safari-Hereinzoomen beim Antippen.
     Alles darunter triggert „Auto-Zoom für besser-lesbare Inputs". */
  font-size: 16px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.fb-input:focus, .fb-textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(31,29,26,0.06);
}
.fb-input[type="date"] {
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
  /* iOS-Safari-Quirk: leere date-Inputs kollabieren auf eine schmalere Hoehe
     als text-Inputs. min-height fixt das passend zur Hoehe der text-Inputs
     (font 16 + padding 10+10 + border 1+1 ≈ 40 px). */
  min-height: 40px;
  display: block;
}
.fb-textarea {
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
  min-height: 90px;
}

/* Radio cards (Galerie ja/nein) */
.fb-radio-cards {
  display: grid;
  gap: 10px;
}
.fb-radio-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  background: var(--paper);
  transition: all 0.15s;
}
.fb-radio-card:hover { border-color: var(--accent); }
.fb-radio-card.active {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
  background: #fffaf2;
}
.fb-radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.fb-radio-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  flex-shrink: 0;
  margin-top: 2px;
  display: grid; place-items: center;
  background: var(--paper);
  transition: border-color 0.15s;
}
.fb-radio-card.active .fb-radio-dot { border-color: var(--ink); }
.fb-radio-dot-inner {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--ink);
  transform: scale(0);
  transition: transform 0.15s;
}
.fb-radio-card.active .fb-radio-dot-inner { transform: scale(1); }
.fb-radio-text { display: flex; flex-direction: column; gap: 4px; }
.fb-radio-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
}
.fb-radio-desc {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.45;
}

.fb-conditional {
  padding-top: 4px;
  border-top: 1px dashed var(--line);
  margin-top: 4px;
  padding-top: 16px;
  animation: fb-fade-in 0.2s ease-out;
}
@keyframes fb-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Konfigurator-Block innerhalb Section 3 */
.fb-config {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.fb-config-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fb-config-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.01em;
}

.fb-inline-preview {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px dashed var(--line);
}

/* Collapsible-Block (z.B. Schrift-Optionen) */
.fb-collapsible {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  overflow: hidden;
}
.fb-collapsible.open { background: #fffaf2; }
.fb-collapsible-head {
  width: 100%;
  /* min-width:0 erlaubt dem Flex-Container zu schrumpfen — sonst wird er
     vom min-content-size eines flex-1 Kindes (mit nowrap-text) ueber den
     Viewport gedrueckt. Wichtig fuer iPhone-Displays. */
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
  transition: background 0.15s;
  box-sizing: border-box;
}
.fb-collapsible-head:hover { background: rgba(200,150,95,0.06); }
.fb-collapsible-label { flex: 0 0 auto; }
.fb-collapsible-hint {
  /* min-width:0 + flex-shrink (default 1) — sonst schrumpft der Hint nicht
     unter seinen min-content (= volle nowrap-Text-Breite) und sprengt das
     Layout. Mit min-width:0 greift overflow:hidden + text-overflow:ellipsis
     zuverlaessig. */
  flex: 1 1 0;
  min-width: 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 480px) {
  /* Auf engem Mobile-Display den Hint ganz weg — Section-Header hat nur
     noch Label + Caret, passt garantiert. */
  .fb-collapsible-hint { display: none; }
}
.fb-collapsible-caret {
  margin-left: auto;
  display: inline-flex;
  color: var(--ink-3);
  transition: transform 0.2s ease;
}
.fb-collapsible.open .fb-collapsible-caret { transform: rotate(180deg); }
.fb-collapsible-body {
  padding: 8px 14px 16px;
  border-top: 1px solid var(--line);
}

/* Preview-Card */
.preview-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fffaf2 0%, var(--paper) 100%);
}
.preview-title {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.variant-toggle.inline {
  display: inline-flex;
  position: static;
  transform: none;
  background: var(--cream);
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: none;
  backdrop-filter: none;
}
.variant-toggle.inline button {
  padding: 5px 12px;
  font-size: 12px;
}
.preview-stage {
  position: relative;
  background-color: #f5f2ec;
  background-image:
    radial-gradient(ellipse 70% 35% at 25% 15%, rgba(168,152,136,0.4), transparent 60%),
    radial-gradient(ellipse 50% 50% at 75% 70%, rgba(168,152,136,0.3), transparent 70%),
    linear-gradient(135deg, #f5f2ec 0%, #ebe3d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 380px;
  aspect-ratio: 4 / 5;
}
.fb-app-mobile .preview-stage {
  min-height: 280px;
  aspect-ratio: auto;
  padding: 14px;
  overflow: hidden;
}
.fb-app-mobile .fb-inline-preview,
.fb-app-mobile .preview-card,
.fb-app-mobile .preview-stage,
.fb-app-mobile .layout-wrap {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.fb-app-mobile .layout-wrap { width: 100%; align-items: center; }
.fb-app-mobile .layout-paper { max-width: 100% !important; }
.preview-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--ink-3);
  background: var(--cream);
}

/* Submit row */
.fb-submit-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 4px 8px;
  align-items: flex-start;
}
.fb-submit {
  border: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  padding: 14px 28px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  letter-spacing: 0.01em;
}
.fb-submit:hover { background: #2c2924; }
.fb-submit:active { transform: scale(0.99); }
.fb-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.fb-submit-hint {
  font-size: 12px;
  color: var(--ink-3);
  margin: 0;
  line-height: 1.5;
  max-width: 540px;
}
.fb-submit-success {
  background: #f0ebe0;
  border: 1px solid #d8cfbe;
  color: var(--ink);
  padding: 16px 20px;
  border-radius: 10px;
  max-width: 540px;
}
.fb-submit-success strong {
  display: block;
  font-size: 15px;
  margin-bottom: 6px;
}
.fb-submit-success .fb-submit-hint {
  margin-top: 4px;
}

/* =====================================================================
   THANK-YOU-SEITE (Vollbild nach Submit)
   ===================================================================== */
.fb-thanks {
  min-height: 100vh;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 18px;
}
.fb-thanks-card {
  width: 100%;
  max-width: 560px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 40px 32px 32px;
  text-align: center;
  box-shadow: 0 30px 70px -30px rgba(31,29,26,0.18);
}
.fb-thanks-check {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #ebe1ce;
  color: #6b8f5a;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
}
.fb-thanks-title {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 10px;
  line-height: 1.2;
}
.fb-thanks-sub {
  font-size: 14.5px;
  color: var(--ink-2);
  margin: 0 0 22px;
  line-height: 1.55;
}
.fb-thanks-detail {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 16px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 26px;
}
.fb-thanks-detail-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.fb-thanks-detail-value {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  color: var(--ink);
}
.fb-thanks-edit {
  text-align: left;
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 18px 16px;
  margin-bottom: 22px;
}
.fb-thanks-edit-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.fb-thanks-edit-hint {
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.5;
  margin: 0 0 14px;
}
.fb-thanks-edit-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.fb-thanks-edit-btn,
.fb-thanks-copy {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.fb-thanks-edit-btn {
  background: var(--ink);
  color: var(--cream);
}
.fb-thanks-edit-btn:hover {
  background: #2c2924;
}
.fb-thanks-copy {
  background: transparent;
  color: var(--ink);
}
.fb-thanks-copy:hover {
  background: var(--cream);
}
.fb-thanks-foot {
  font-size: 12.5px;
  color: var(--ink-3);
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
@media (max-width: 540px) {
  .fb-thanks-card { padding: 32px 20px 24px; }
  .fb-thanks-title { font-size: 22px; }
  .fb-thanks-edit-btn,
  .fb-thanks-copy { flex: 1 1 100%; }
}

.fb-foot {
  padding: 12px 4px 20px;
  font-size: 11.5px;
  color: var(--ink-3);
  display: flex;
  gap: 8px;
}
.fb-foot a { color: var(--accent-2); text-decoration: none; }
.fb-foot a:hover { text-decoration: underline; }

@media (max-width: 1100px) {
  .fb-body { grid-template-columns: 1fr; }
  .fb-aside { display: none; }
}
@media (max-width: 640px) {
  .fb-grid-2 { grid-template-columns: 1fr; }
  .fb-section-body { padding: 14px 16px 16px; }
  .fb-section-head { padding: 14px 16px 12px; }
  .fb-section-title { font-size: 17px; }
  .fb-section-sub { font-size: 12px; }
  .fb-header-inner { padding: 14px 16px; }
  .fb-header-title { font-size: 18px; }
  .fb-header-sub { font-size: 11.5px; }
  .fb-label { font-size: 12px; }
  .fb-hint { font-size: 12px; line-height: 1.4; }
  .fb-radio-card { padding: 11px 13px; gap: 10px; }
  .fb-radio-title { font-size: 13px; }
  .fb-radio-desc { font-size: 12px; line-height: 1.4; }
  .fb-stack { gap: 14px; }
  .fb-config { gap: 18px; }
  /* font-size bewusst NICHT runter — 16px hält iOS-Safari vom Auto-Zoom ab. */
  .fb-input, .fb-textarea { padding: 9px 11px; }
}

/* =====================================================================
   ALTE STYLES (Sidebar/Stage) — werden weiterhin von eingebetteten
   Komponenten (FormatPicker, BackgroundPicker, FontPicker, ColorPicker)
   genutzt. Das Top-Level-Layout (.app, .sidebar, .stage) ist nicht mehr
   in Verwendung, aber die inneren Klassen bleiben aktiv.
   ===================================================================== */
#root, .app {
  display: block;
}

/* SIDEBAR */
.sidebar {
  background: var(--cream);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 24px 20px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.brand-mark {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--cream);
  display: grid; place-items: center;
}
.brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}
.brand-sub {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 4px;
}
.sections { flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.sections::-webkit-scrollbar { width: 8px; }
.sections::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }

.section { border-bottom: 1px solid var(--line); }
.section-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
  transition: background 0.15s;
}
.section-head:hover { background: rgba(200,150,95,0.05); }
.section-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  font-size: 11px;
  font-weight: 600;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.section-title { flex: 1; }
.section-chev {
  font-size: 18px;
  color: var(--ink-3);
  transition: transform 0.2s;
  font-family: serif;
}
.section-body { padding: 4px 24px 20px; }

.sidebar-foot {
  padding: 12px 24px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--ink-3);
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.sidebar-foot a { color: var(--accent-2); text-decoration: none; }
.sidebar-foot a:hover { text-decoration: underline; }

/* FORMAT PICKER — full-width cards, both variants per format */
.format-picker { display: flex; flex-direction: column; gap: 8px; }
.fmt-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 14px;
}
.fmt-card:hover { border-color: var(--accent); }
.fmt-card.active {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
  background: #fffaf2;
}
.fmt-thumbs {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}
/* Mini-Layout-Vorschau in den Format-Karten — flacher Look statt dramatischer Schatten */
.fmt-thumbs .layout-paper {
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04) !important;
  border-radius: 1px;
}
.fmt-thumbs .layout-wrap { gap: 0; }
.fmt-thumbs .layout-label { display: none; }
.fmt-label {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

/* BACKGROUND PICKER */
.bg-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.bg-tab {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11px;
  font-family: inherit;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s;
}
.bg-tab:hover { border-color: var(--accent); color: var(--ink); }
.bg-tab.active {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
@media (max-width: 600px) {
  .swatch-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 380px) {
  .swatch-grid { grid-template-columns: repeat(3, 1fr); }
}
.swatch {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 0.15s;
}
.swatch:hover { border-color: var(--accent); transform: translateY(-1px); }
.swatch.active {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink), 0 4px 12px -4px rgba(31,29,26,0.2);
}
.swatch-fill { aspect-ratio: 2 / 3; width: 100%; display: block; }
.bg-picker[data-orient="landscape"] .swatch-fill { aspect-ratio: 3 / 2; }
.swatch-name {
  display: block;
  padding: 4px 6px 5px;
  font-size: 10px;
  line-height: 1.2;
  color: var(--ink-2);
  background: var(--paper);
  border-top: 1px solid var(--line);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bg-custom { display: flex; flex-direction: column; gap: 10px; }
.bg-custom-btn {
  display: block;
  text-align: center;
  padding: 14px;
  background: var(--paper);
  border: 1.5px dashed var(--line-2);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-2);
  transition: all 0.15s;
}
.bg-custom-btn:hover {
  border-color: var(--accent);
  background: #fffaf2;
  color: var(--ink);
}
.bg-custom-preview {
  height: 100px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
}
.bg-custom-hint {
  font-size: 11px;
  color: var(--ink-3);
  text-align: center;
}
.bg-custom-btn.busy {
  pointer-events: none;
  opacity: 0.65;
}
.bg-custom-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 11px;
  background: rgba(190, 70, 50, 0.08);
  border: 1px solid rgba(190, 70, 50, 0.25);
  border-radius: 8px;
  font-size: 11.5px;
  line-height: 1.4;
  color: #8b3a2a;
}
.bg-custom-error svg { flex-shrink: 0; margin-top: 1px; }

/* SOLID CUSTOM PICKER */
.solid-custom {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.5);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.solid-custom-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}
.solid-custom-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.solid-custom-swatch {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  transition: box-shadow .15s;
}
.solid-custom-swatch.active {
  box-shadow: 0 0 0 2px var(--cream), 0 0 0 4px var(--ink-1);
}
.solid-custom-swatch input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.solid-custom-hex {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink-1);
  text-transform: uppercase;
}
.solid-custom-hex:focus {
  outline: none;
  border-color: var(--accent);
}
.solid-custom-apply {
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 8px 12px;
  background: var(--ink-1);
  color: var(--paper);
  border: 1px solid var(--ink-1);
  border-radius: 6px;
  cursor: pointer;
  transition: opacity .15s;
}
.solid-custom-apply:hover { opacity: 0.85; }

/* AI PROMPT HINT */
.ai-hint {
  margin-top: 4px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.5);
  overflow: hidden;
}
.ai-hint-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 11px;
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
  text-align: left;
}
.ai-hint-toggle:hover { color: var(--ink-1); }
.ai-hint-toggle svg:first-child { color: var(--accent); flex-shrink: 0; }
.ai-hint-body {
  padding: 0 11px 11px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}
.ai-hint-text {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ink-2);
}
.ai-hint-text strong { color: var(--ink-1); font-weight: 600; }
.ai-hint-specs {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  color: var(--ink-2);
  background: rgba(255,255,255,.55);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
}
.ai-hint-specs strong { color: var(--ink-1); font-weight: 600; }
.ai-hint-prompt-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}
.ai-hint-prompt {
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink-2);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  white-space: pre-wrap;
  max-height: 140px;
  overflow-y: auto;
}
.ai-hint-prompt-wrap {
  position: relative;
}
.ai-hint-prompt-wrap .ai-hint-prompt {
  padding-right: 36px;
}
.ai-hint-prompt-copy {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cream, #faf6f1);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s;
  padding: 0;
}
.ai-hint-prompt-copy:hover {
  border-color: var(--accent);
  color: var(--ink-1);
  background: #fffaf2;
}
.ai-hint-copy {
  align-self: flex-start;
  font: inherit;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-1);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.ai-hint-copy:hover { border-color: var(--accent); background: #fffaf2; }

/* FONT PICKER */
.font-picker { display: flex; flex-direction: column; gap: 6px; }
.font-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 0.15s;
}
.font-card:hover { border-color: var(--accent); }
.font-card.active {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
  background: #fffaf2;
}
.font-sample {
  font-size: 22px;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 4px;
}
.font-name { font-size: 11px; color: var(--ink-3); }

/* COLOR PICKER */
.color-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.color-chip {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  padding: 0;
  flex-shrink: 0;
}
.color-chip:hover { transform: scale(1.1); }
.color-chip.active { box-shadow: 0 0 0 2px var(--cream), 0 0 0 4px var(--ink); }
.color-custom {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.color-custom input[type="color"] {
  width: 32px; height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  padding: 2px;
}
.color-hex {
  flex: 1;
  border: 0;
  background: transparent;
  font-family: 'Inter', monospace;
  font-size: 13px;
  color: var(--ink);
  outline: none;
  padding: 4px;
}

/* TEXT INPUTS */
.text-inputs { display: flex; flex-direction: column; gap: 12px; }
.ti-row { display: flex; flex-direction: column; gap: 6px; }
.ti-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  font-weight: 600;
}
.ti-input {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 9px 12px;
  border-radius: 6px;
  font-family: inherit;
  /* 16px verhindert das iOS-Safari-Auto-Zoom beim Antippen (gleicher Trick
     wie bei .fb-input). */
  font-size: 16px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
}
.ti-input:focus { border-color: var(--ink); }
.ti-size {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding: 2px 2px; /* knapp, sonst muss der User mehr scrollen */
}
.ti-size-label {
  font-size: 12px;
  color: var(--ink-3);
  flex-shrink: 0;
  min-width: 78px;
}
.ti-size-slider {
  /* Slider-Element 22px hoch — Track 6px (sichtbar via ::-webkit-slider-
     runnable-track / ::-moz-range-track), Thumb 22px. Kompakt genug
     dass auf Handy nicht zu viel gescrollt werden muss, aber Thumb
     gross genug zum Treffen. */
  flex: 1;
  min-width: 0;
  height: 22px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  outline: none;
  cursor: pointer;
  touch-action: pan-x;
  margin: 0;
}
.ti-size-slider::-webkit-slider-runnable-track {
  height: 6px;
  background: var(--line);
  border-radius: 999px;
}
.ti-size-slider::-moz-range-track {
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  border: 0;
}
.ti-size-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--ink-3);
  box-shadow: 0 2px 5px rgba(0,0,0,0.22);
  cursor: pointer;
  /* Vertikal zentrieren auf den 6px-Track: (6 - 22) / 2 = -8 */
  margin-top: -8px;
}
.ti-size-slider::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--ink-3);
  box-shadow: 0 2px 5px rgba(0,0,0,0.22);
  cursor: pointer;
}
.ti-size-val {
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  min-width: 44px;
  text-align: right;
}
/* Reset-Button neben dem Wert: Doppelklick auf Slider funktioniert auf
   Mobile nicht zuverlaessig — der Button gibt einen klaren Reset-Knopf. */
.ti-size-reset {
  flex-shrink: 0;
  width: 26px; height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  -webkit-tap-highlight-color: rgba(0,0,0,0.04);
}
.ti-size-reset:hover { background: rgba(0,0,0,0.06); color: var(--ink); }
.ti-size-reset:active { background: rgba(0,0,0,0.12); }
/* Tweak-Gruppe: pro Text-Zeile eine Header + 2 Slider gestapelt — visueller
   Anker, dass die Slider zur jeweiligen Zeile gehoeren. */
.ti-tweak-group { display: flex; flex-direction: column; gap: 2px; }
.ti-tweak-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  font-weight: 600;
  margin-bottom: 2px;
}
.text-empty {
  font-size: 13px;
  color: var(--ink-3);
  font-style: italic;
  padding: 4px 0;
}

.layout-canvas.clickable { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.layout-canvas.clickable:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.45), 0 16px 32px -10px rgba(0,0,0,0.25) !important;
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 13, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lb-fade 0.18s ease-out;
}
@keyframes lb-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.lb-stage { animation: lb-pop 0.22s ease-out; }
@keyframes lb-pop {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.lb-close {
  position: absolute;
  top: 24px; right: 28px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(250,246,241,0.15);
  color: var(--cream);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s;
  display: grid; place-items: center;
  font-family: serif;
}
.lb-close:hover { background: rgba(250,246,241,0.3); }
.lb-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(250,246,241,0.6);
  font-size: 12px;
  letter-spacing: 0.04em;
}

/* STAGE-Reste (nicht mehr verwendet — Top-Level wurde durch Fragebogen ersetzt) */
.stage, .stage-bg, .stage-frame, .stage-info, .stage-disclaimer { display: none; }

.stage-frame {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

.layout-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.layout-label {
  font-size: 12px;
  color: var(--ink-2);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(250,246,241,0.9);
  padding: 4px 12px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(31,29,26,0.06);
}

.stage-info {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.stage-disclaimer {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(250,246,241,0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(31,29,26,0.08);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.01em;
  color: var(--ink-3);
  max-width: 540px;
  text-align: center;
  line-height: 1.4;
}
.stage-disclaimer svg { flex-shrink: 0; color: var(--ink-3); }
.info-card {
  background: rgba(250,246,241,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(31,29,26,0.08);
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: 0 6px 16px -8px rgba(31,29,26,0.18);
  max-width: 280px;
}
.info-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  font-weight: 600;
  margin-bottom: 4px;
}
.info-val {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.1;
}
.info-sub {
  font-size: 11px;
  color: var(--ink-2);
  margin-top: 4px;
  line-height: 1.4;
}

/* ========================================================================
   MOBILE — Bottom-Sheet-Layout (≤ 768 px)
   ======================================================================== */

/* Mobile Header — schmal, oben fixiert */
.mobile-header {
  display: none;
  position: relative;
  z-index: 5;
  padding: 12px 16px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.mobile-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mobile-brand .brand-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
}
.mobile-brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}
.mobile-brand-sub {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
}

/* Variant-Toggle (1 / 4 Fotos) — schwebt oben in der Stage */
.variant-toggle {
  display: none;
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  background: rgba(250, 246, 241, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(31, 29, 26, 0.08);
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 4px 12px -4px rgba(31, 29, 26, 0.18);
  gap: 2px;
}
.variant-toggle button {
  border: 0;
  background: transparent;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 180ms ease;
  font-family: inherit;
}
.variant-toggle button.active {
  background: var(--ink);
  color: var(--cream);
}

/* Bottom-Sheet */
.bs-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(31, 29, 26, 0.32);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
}
.bs-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 51;
  background: var(--cream);
  border-top: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -10px 40px -8px rgba(31, 29, 26, 0.18);
  display: flex;
  flex-direction: column;
  height: 78vh;
  max-height: 78vh;
  /* nicht übers Viewport hinaus */
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.bs-handle {
  padding: 8px 0 4px;
  display: flex;
  justify-content: center;
  cursor: grab;
  touch-action: none;
}
.bs-handle:active { cursor: grabbing; }
.bs-handle-bar {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--line-2);
}

.bs-tabs {
  display: flex;
  gap: 2px;
  padding: 4px 8px 8px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.bs-tabs::-webkit-scrollbar { display: none; }
.bs-tab {
  flex: 1;
  min-width: 64px;
  border: 0;
  background: transparent;
  padding: 8px 6px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--ink-3);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  transition: all 180ms ease;
}
.bs-tab.active {
  background: rgba(31, 29, 26, 0.06);
  color: var(--ink);
}
.bs-tab-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
}
.bs-tab-label {
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.bs-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px 24px;
  -webkit-overflow-scrolling: touch;
}

/* Wenn Sheet zu — verstecke Content + Backdrop, nur Tab-Bar bleibt sichtbar (peek 64px) */
.bottom-sheet:not(.open) .bs-content { display: none; }
.bottom-sheet:not(.open) .bs-handle { display: none; }
.bottom-sheet:not(.open) .bs-tabs {
  border-bottom: 0;
  padding: 12px 8px calc(12px + env(safe-area-inset-bottom, 0));
}

/* Mobile-Layout-Grid (alte Bottom-Sheet-Variante — nicht mehr aktiv genutzt,
   aber Klassen wie .variant-toggle werden noch von Komponenten referenziert) */
@media (max-width: 768px) {
  /* Kein overflow:hidden mehr — Body soll scrollen können */
  #root, .app.app-mobile {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .app-mobile .sidebar { display: none; }
  .app-mobile .mobile-header { display: block; }
  .app-mobile .variant-toggle { display: inline-flex; }

  /* Stage: voll, mit Platz für Bottom-Sheet (Peek-Höhe ~64px) */
  .app-mobile .stage {
    padding-bottom: 72px; /* Sheet-Peek */
  }
  .app-mobile .stage-frame {
    gap: 0;
    padding-top: 56px; /* Platz für Variant-Toggle */
  }
  .app-mobile .stage-disclaimer {
    bottom: 78px;
    font-size: 10px;
    padding: 6px 10px;
  }
  .app-mobile .layout-label { display: none; }

  /* Sheet-Inhalte: weniger Padding, kompakte Listen */
  .bs-content .bg-grid { gap: 8px; }
  .bs-content .font-grid { grid-template-columns: 1fr 1fr; }
}

/* Mittlere Breakpoints (Tablet) — Sidebar bleibt, aber etwas schmaler */
@media (min-width: 769px) and (max-width: 1024px) {
  #root, .app { grid-template-columns: 320px 1fr; }
}

/* =====================================================================
   Demo-Mode (?demo=1, WordPress-Embed): minimal, transparent.
   Desktop: zweispaltig wie der normale Konfigurator (Form links, Preview
   sticky rechts) — aber ohne Header/Sektion 1/3/4/Submit/Footer.
   Mobile: einspaltig + Inline-Preview (greift via .fb-app-mobile-Klasse).
   Nur additive Regeln — der normale Konfigurator bleibt unberuehrt.
   ===================================================================== */
.fb-app-demo {
  background: transparent;
  min-height: 0;
}
.fb-app-demo .fb-body {
  padding: 0;
  /* grid-template-columns + gap erbt vom .fb-body Default (zweispaltig) */
}
.fb-app-demo .fb-section { border-radius: 12px; }
/* Nummern-Badge ausblenden — im Demo gibt's keine Sektion 1/3/4, also macht
   ein "2"-Kreis vor "Druck-Format & Layout" keinen Sinn. */
.fb-app-demo .fb-section-num { display: none; }
/* Sticky-Aside im Demo:
   position:sticky funktioniert im Auto-Resize-Iframe NICHT (das Iframe selbst
   hat keinen Scroll-Container, weil es immer auf seine Inhalts-Hoehe waechst).
   Wir machen die Aside daher relativ + transform-driven — der Parent meldet
   per postMessage seine Scroll-Position, app.jsx setzt dann translateY. */
.fb-app-demo .fb-aside-sticky {
  position: relative;
  top: 0;
  max-height: none;
  overflow-y: visible;
  will-change: transform;
}

/* Mini-Lead-Form-Card (CTA am Ende der Sektion 2) */
.fb-demo-cta {
  background: var(--paper, #fff);
  border: 1px solid var(--line, #e8e2d6);
  border-radius: 14px;
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
.fb-demo-cta-head h3 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.fb-demo-cta-head p {
  font-size: 14px;
  color: var(--ink-3, #6b665a);
  margin: 0;
  line-height: 1.45;
}
.fb-demo-cta .fb-submit { align-self: flex-start; margin-top: 4px; }
.fb-demo-cta-success {
  background: #f4f8f1;
  border-color: #c8d9b8;
  color: #2f4a23;
  padding: 22px 24px;
  border-radius: 14px;
  text-align: left;
}
.fb-demo-cta-success strong { font-size: 16px; display: block; margin-bottom: 6px; }
.fb-demo-cta-success p { margin: 0; font-size: 14px; line-height: 1.45; }

/* Standort-Karte (Desktop-Demo unter Preview / Mobile-Demo am Ende) */
.fb-demo-map {
  margin-top: 14px;
  background: var(--paper, #fff);
  border: 1px solid var(--line, #e8e2d6);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
.fb-demo-map-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
  padding: 0 2px;
}
.fb-demo-map-head strong {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.fb-demo-map-head span {
  font-size: 12.5px;
  color: var(--ink-3, #6b665a);
}
