/* ==========================================================================
   Brand Studio – App-Styles
   Editor-Chrome: dunkel, neutral. Preview: gesteuert über --b-* Variablen,
   die app.js auf #preview setzt.
   ========================================================================== */

:root {
  --ui-bg: #16141d;
  --ui-bg2: #1e1b27;
  --ui-bg3: #262231;
  --ui-line: #37324a;
  --ui-text: #eceaf4;
  --ui-text2: #a49fb8;
  --ui-accent: #8b7cf6;
  --ui-accent2: #b3a8ff;
  --ui-danger: #f6707c;
  --ui-ok: #5fd39a;
  --ui-warn: #f2b95c;
  --ui-radius: 10px;
  --ui-font: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--ui-font);
  background: var(--ui-bg);
  color: var(--ui-text);
  font-size: 14px;
  line-height: 1.5;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; left: 8px; top: -48px;
  background: var(--ui-accent); color: #fff;
  padding: 10px 16px; border-radius: 8px;
  z-index: 100; transition: top .15s ease;
}
.skip-link:focus { top: 8px; }

:focus-visible {
  outline: 2px solid var(--ui-accent2);
  outline-offset: 2px;
}

/* ---------- App bar ---------- */
.appbar {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--ui-line);
  background: var(--ui-bg2);
  position: sticky; top: 0; z-index: 40;
  flex-wrap: wrap;
}
.appbar__brand { display: flex; align-items: center; gap: 8px; }
.appbar__logo { color: var(--ui-accent2); font-size: 18px; }
.appbar__name { font-weight: 800; letter-spacing: .2px; font-size: 16px; }
.appbar__beta {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px;
  background: var(--ui-bg3); color: var(--ui-accent2);
  border: 1px solid var(--ui-line);
  padding: 2px 7px; border-radius: 99px;
}
.appbar__center { flex: 1; min-width: 160px; display: flex; justify-content: center; }
.appbar__input {
  background: var(--ui-bg3); border: 1px solid var(--ui-line); color: var(--ui-text);
  border-radius: 8px; padding: 8px 12px; font: inherit; font-weight: 600;
  width: min(300px, 100%); text-align: center;
}
.appbar__input:focus { border-color: var(--ui-accent); outline: none; }
.appbar__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.iconbtn {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--ui-bg3); color: var(--ui-text); border: 1px solid var(--ui-line);
  border-radius: 8px; cursor: pointer; font-size: 15px;
}
.iconbtn:hover:not(:disabled) { border-color: var(--ui-accent); color: var(--ui-accent2); }
.iconbtn:disabled { opacity: .35; cursor: default; }
.iconbtn[aria-pressed="true"] { background: var(--ui-accent); border-color: var(--ui-accent); color: #fff; }

.btn {
  font: inherit; font-weight: 600; cursor: pointer;
  border-radius: 8px; padding: 8px 16px; border: 1px solid transparent;
}
.btn--primary { background: var(--ui-accent); color: #fff; }
.btn--primary:hover { background: var(--ui-accent2); color: #16141d; }
.btn--ghost { background: transparent; color: var(--ui-text); border-color: var(--ui-line); }
.btn--ghost:hover { border-color: var(--ui-accent); color: var(--ui-accent2); }
.btn--file { display: inline-flex; align-items: center; }

.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--ui-bg3); border: 1px solid var(--ui-line); border-radius: 12px;
  padding: 6px; width: 300px; z-index: 50;
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
}
.menu__item {
  display: block; width: 100%; text-align: left;
  background: none; border: 0; color: var(--ui-text);
  padding: 10px 12px; border-radius: 8px; cursor: pointer; font: inherit;
}
.menu__item:hover, .menu__item:focus-visible { background: var(--ui-bg2); }
.menu__item strong { display: block; }
.menu__item span { color: var(--ui-text2); font-size: 12px; }

/* ---------- Layout ---------- */
.app {
  display: grid;
  grid-template-columns: 380px 1fr;
  min-height: calc(100vh - 57px);
}

/* ---------- Editor panel ---------- */
.panel {
  display: grid; grid-template-columns: 76px 1fr;
  border-right: 1px solid var(--ui-line);
  background: var(--ui-bg2);
  min-height: 0;
}
.panel__tabs {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 8px; border-right: 1px solid var(--ui-line);
  position: sticky; top: 57px; align-self: start;
  max-height: calc(100vh - 57px); overflow-y: auto;
}
.ptab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: 0; border-radius: 10px;
  color: var(--ui-text2); font: inherit; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  padding: 9px 4px; cursor: pointer; width: 100%;
}
.ptab__icon { font-size: 15px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.ptab:hover { color: var(--ui-text); background: var(--ui-bg3); }
.ptab[aria-selected="true"] { color: var(--ui-accent2); background: var(--ui-bg3); }

.panel__panes { min-width: 0; overflow-y: auto; max-height: calc(100vh - 57px); }
.pane { padding: 18px 18px 32px; }
.pane__title {
  margin: 0 0 6px; font-size: 13px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1px; color: var(--ui-accent2);
}
.pane__subtitle {
  margin: 22px 0 6px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px; color: var(--ui-text2);
}
.pane__note { color: var(--ui-text2); font-size: 12px; margin: 4px 0 12px; }

/* Dropzone */
.dropzone {
  border: 2px dashed var(--ui-line); border-radius: 14px;
  padding: 26px 16px; text-align: center; cursor: pointer;
  display: flex; flex-direction: column; gap: 4px; align-items: center;
  color: var(--ui-text);
  transition: border-color .15s ease, background .15s ease;
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.is-over {
  border-color: var(--ui-accent); background: var(--ui-bg3);
}
.dropzone__icon { font-size: 22px; color: var(--ui-accent2); }
.dropzone__hint { color: var(--ui-text2); font-size: 12px; }

/* Vibes */
.vibes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vibe {
  border: 1px solid var(--ui-line); border-radius: 12px; overflow: hidden;
  background: var(--ui-bg3); cursor: pointer; padding: 0; text-align: left;
  color: var(--ui-text); font: inherit;
}
.vibe:hover, .vibe:focus-visible { border-color: var(--ui-accent); }
.vibe__strip { display: flex; height: 42px; }
.vibe__strip span { flex: 1; }
.vibe__meta { padding: 8px 10px; }
.vibe__meta b { display: block; font-size: 12px; }
.vibe__meta small { color: var(--ui-text2); font-size: 11px; }

/* Colors */
.color-list { display: flex; flex-direction: column; gap: 8px; }
.color-item {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center;
  background: var(--ui-bg3); border: 1px solid var(--ui-line);
  border-radius: 10px; padding: 8px 10px;
}
.color-item__swatch {
  width: 44px; height: 36px; border-radius: 8px; border: 1px solid rgba(255,255,255,.15);
  padding: 0; cursor: pointer; background: none;
}
.color-item__swatch input[type="color"] {
  width: 100%; height: 100%; border: 0; padding: 0; cursor: pointer;
  border-radius: 8px; background: none;
}
.color-item__name { font-weight: 600; display: block; }
.color-item__role { color: var(--ui-text2); font-size: 11px; display: block; }
.color-item__hex {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  background: var(--ui-bg2); border: 1px solid var(--ui-line); color: var(--ui-text);
  border-radius: 6px; padding: 6px 8px; width: 92px; font-size: 12px;
  text-transform: uppercase;
}
.color-item__hex:focus { border-color: var(--ui-accent); outline: none; }
.color-item__hex.is-invalid { border-color: var(--ui-danger); }

.chipgrid { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  background: var(--ui-bg3); border: 1px solid var(--ui-line); color: var(--ui-text);
  font: inherit; font-size: 12px; font-weight: 600;
  border-radius: 99px; padding: 7px 14px; cursor: pointer;
}
.chip:hover { border-color: var(--ui-accent); color: var(--ui-accent2); }

/* Fonts */
.fieldrow { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.fieldrow label { font-size: 12px; font-weight: 600; color: var(--ui-text2); }
.fieldrow select {
  background: var(--ui-bg3); color: var(--ui-text); border: 1px solid var(--ui-line);
  border-radius: 8px; padding: 9px 10px; font: inherit;
}
.pairings { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pairing {
  background: var(--ui-bg3); border: 1px solid var(--ui-line); border-radius: 12px;
  padding: 12px; cursor: pointer; text-align: left; color: var(--ui-text); font: inherit;
}
.pairing:hover, .pairing:focus-visible { border-color: var(--ui-accent); }
.pairing.is-active { border-color: var(--ui-accent2); background: var(--ui-bg2); }
.pairing__sample { font-size: 22px; line-height: 1.1; display: block; }
.pairing__names { display: block; font-size: 11px; color: var(--ui-text2); margin-top: 6px; }
.pairing__tag {
  display: inline-block; margin-top: 8px; font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  border: 1px solid var(--ui-line); border-radius: 99px; padding: 2px 8px;
  color: var(--ui-accent2);
}

/* Option sets */
.optionset { border: 0; padding: 0; margin: 0 0 20px; }
.optionset legend {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--ui-text2); padding: 0; margin-bottom: 8px;
}
.optiongrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.opt {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--ui-bg3); border: 1px solid var(--ui-line); border-radius: 10px;
  padding: 12px 6px 9px; cursor: pointer; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; color: var(--ui-text2);
}
.opt:hover { border-color: var(--ui-accent); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt:has(input:checked) { border-color: var(--ui-accent2); color: var(--ui-accent2); background: var(--ui-bg2); }
.opt:has(input:focus-visible) { outline: 2px solid var(--ui-accent2); outline-offset: 2px; }
.opt__demo {
  width: 40px; height: 24px; background: var(--ui-accent);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; text-transform: none; letter-spacing: 0;
}
.opt__demo--square { border-radius: 0; }
.opt__demo--slight { border-radius: 4px; }
.opt__demo--rounded { border-radius: 10px; }
.opt__demo--pill { border-radius: 99px; }
.opt__demo--softsh { border-radius: 6px; box-shadow: 0 4px 10px rgba(139,124,246,.55); }
.opt__demo--boldsh { border-radius: 6px; box-shadow: 5px 5px 0 rgba(139,124,246,.8); }
.opt__demo--w6 { font-weight: 600; background: var(--ui-bg2); border: 1px solid var(--ui-line); font-size: 14px; }
.opt__demo--w7 { font-weight: 700; background: var(--ui-bg2); border: 1px solid var(--ui-line); font-size: 14px; }
.opt__demo--w8 { font-weight: 800; background: var(--ui-bg2); border: 1px solid var(--ui-line); font-size: 14px; }
.opt__demo--btnsolid { border-radius: 6px; }
.opt__demo--btngrad { border-radius: 6px; background: linear-gradient(120deg, var(--ui-accent), #d66ba0); }
.opt__demo--btnoutline { border-radius: 6px; background: transparent; border: 2px solid var(--ui-accent); color: var(--ui-accent2); }

/* A11y report */
.a11y-report { display: flex; flex-direction: column; gap: 8px; }
.a11y-pair {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center;
  background: var(--ui-bg3); border: 1px solid var(--ui-line); border-radius: 10px; padding: 8px 10px;
}
.a11y-pair__demo {
  height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; border: 1px solid rgba(255,255,255,.12);
}
.a11y-pair__label b { display: block; font-size: 12px; }
.a11y-pair__label small { color: var(--ui-text2); font-size: 11px; }
.a11y-badge {
  font-size: 10px; font-weight: 800; letter-spacing: .5px;
  border-radius: 99px; padding: 4px 10px; text-align: center; white-space: nowrap;
}
.a11y-badge--aaa { background: rgba(95,211,154,.15); color: var(--ui-ok); border: 1px solid rgba(95,211,154,.4); }
.a11y-badge--aa { background: rgba(95,211,154,.1); color: var(--ui-ok); border: 1px solid rgba(95,211,154,.25); }
.a11y-badge--large { background: rgba(242,185,92,.12); color: var(--ui-warn); border: 1px solid rgba(242,185,92,.35); }
.a11y-badge--fail { background: rgba(246,112,124,.12); color: var(--ui-danger); border: 1px solid rgba(246,112,124,.4); }
.a11y-summary { font-size: 12px; color: var(--ui-text2); margin-bottom: 4px; }

/* ---------- Stage / Preview ---------- */
.stage { display: flex; flex-direction: column; min-width: 0; background: #0f0d15; }
.stage__bar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 10px 18px; border-bottom: 1px solid var(--ui-line);
  position: sticky; top: 57px; z-index: 30; background: #0f0d15;
}
.stage__label {
  font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--ui-text2);
}
.stage__tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.vtab {
  background: transparent; border: 1px solid var(--ui-line); color: var(--ui-text2);
  font: inherit; font-size: 12px; font-weight: 600;
  border-radius: 99px; padding: 6px 14px; cursor: pointer;
}
.vtab:hover { color: var(--ui-text); border-color: var(--ui-accent); }
.vtab[aria-selected="true"] { background: var(--ui-accent); border-color: var(--ui-accent); color: #fff; }

/* ============================================================
   PREVIEW – gesteuert über --b-* Variablen (gesetzt via JS)
   ============================================================ */
.preview {
  padding: 22px; overflow-y: auto; flex: 1;

  --b-primary: #6d28d9;
  --b-secondary: #f472b6;
  --b-accent: #f59e0b;
  --b-paper: #faf9f7;
  --b-tone: #f1ede8;
  --b-deep: #241a33;
  --b-ink: #1f1a26;
  --b-on-primary: #ffffff;
  --b-on-accent: #1f1a26;
  --b-on-deep: #f6f3f9;
  --b-radius: 12px;
  --b-radius-sm: 8px;
  --b-shadow: 0 10px 30px rgba(0,0,0,.08);
  --b-shadow-card: 0 4px 16px rgba(0,0,0,.06);
  --b-font-display: 'Fraunces', serif;
  --b-font-body: 'Inter', sans-serif;
  --b-hweight: 700;
  --b-speed: .2s;
}
.view {
  max-width: 980px; margin: 0 auto;
  font-family: var(--b-font-body);
  color: var(--b-ink);
}

/* Shared preview atoms */
.pv-h1, .pv-h2, .pv-h3 { font-family: var(--b-font-display); font-weight: var(--b-hweight); margin: 0; }
.pv-h1 { font-size: clamp(26px, 4vw, 44px); line-height: 1.08; }
.pv-h2 { font-size: clamp(20px, 3vw, 30px); line-height: 1.15; }
.pv-h3 { font-size: 17px; line-height: 1.25; }
.pv-p { margin: 0 0 12px; line-height: 1.65; font-size: 14.5px; }

.pv-btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--b-font-body); font-weight: 600; font-size: 13.5px;
  padding: 10px 20px; border-radius: var(--b-radius-sm);
  transition: transform var(--b-speed) ease, box-shadow var(--b-speed) ease, opacity var(--b-speed) ease;
  cursor: default; user-select: none;
}
.pv-btn--sm { padding: 7px 14px; font-size: 12.5px; }

/* Button fill variants – data-fill on .preview */
.preview[data-fill="solid"] .pv-btn--primary { background: var(--b-primary); color: var(--b-on-primary); }
.preview[data-fill="gradient"] .pv-btn--primary { background: linear-gradient(120deg, var(--b-primary), var(--b-secondary)); color: var(--b-on-primary); }
.preview[data-fill="outline"] .pv-btn--primary { background: transparent; color: var(--b-primary); box-shadow: inset 0 0 0 2px var(--b-primary); }

.pv-btn--secondary { background: var(--b-tone); color: var(--b-ink); }
.pv-btn--ghost { box-shadow: inset 0 0 0 1.5px var(--b-tone); color: var(--b-ink); background: transparent; }
.pv-btn--onprimary { background: var(--b-paper); color: var(--b-primary); }
.pv-btn--ghostlight { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--b-on-primary) 55%, transparent); color: var(--b-on-primary); }

/* Hover reactions – data-hover on .preview */
.preview[data-hover="lift"] .pv-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0,0,0,.18); }
.preview[data-hover="pop"] .pv-btn:hover { transform: scale(1.045); }
.preview[data-hover="none"] .pv-btn:hover { opacity: .88; }

/* --- Landing --- */
.pv-nav {
  display: flex; align-items: center; gap: 18px; justify-content: space-between;
  background: var(--b-paper); padding: 14px 22px;
  border-radius: var(--b-radius) var(--b-radius) 0 0;
  border-bottom: 1px solid var(--b-tone);
  flex-wrap: wrap;
}
.pv-logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--b-font-display); font-size: 16px; }
.pv-logo__mark {
  display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center;
  background: var(--b-primary); color: var(--b-on-primary);
  border-radius: var(--b-radius-sm); font-size: 13px;
}
.pv-nav__links { display: flex; gap: 16px; color: var(--b-ink); font-size: 13.5px; opacity: .85; }
.pv-hero {
  display: grid; grid-template-columns: 1.2fr .9fr; gap: 28px;
  background: var(--b-primary); color: var(--b-on-primary);
  padding: 44px 36px;
}
.pv-eyebrow { text-transform: uppercase; letter-spacing: 2.5px; font-size: 11px; font-weight: 700; opacity: .8; }
.pv-hero .pv-h1 { color: var(--b-on-primary); margin: 12px 0 14px; }
.pv-lead { line-height: 1.6; opacity: .92; margin: 0 0 20px; font-size: 15px; max-width: 46ch; }
.pv-hero__cta { display: flex; gap: 10px; flex-wrap: wrap; }
.pv-kit {
  background: var(--b-paper); color: var(--b-ink);
  border-radius: var(--b-radius); padding: 18px; box-shadow: var(--b-shadow);
  align-self: center;
}
.pv-kit__title {
  display: block; text-transform: uppercase; font-size: 10px; letter-spacing: 1.5px;
  font-weight: 800; color: var(--b-primary); margin-bottom: 12px;
}
.pv-kit__swatches { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.pv-swatch__c { display: block; height: 52px; border-radius: var(--b-radius-sm); border: 1px solid rgba(0,0,0,.06); }
.pv-swatch__c--primary { background: var(--b-primary); }
.pv-swatch__c--secondary { background: var(--b-secondary); }
.pv-swatch__c--accent { background: var(--b-accent); }
.pv-swatch__c--deep { background: var(--b-deep); }
.pv-swatch__meta { display: flex; justify-content: space-between; font-size: 10.5px; margin-top: 4px; color: var(--b-ink); opacity: .8; }
.pv-swatch__meta b { font-family: ui-monospace, monospace; font-weight: 600; }
.pv-kit__font { display: flex; gap: 10px; align-items: center; border-top: 1px solid var(--b-tone); padding-top: 12px; font-size: 12px; }
.pv-kit__ag {
  font-family: var(--b-font-display); font-weight: var(--b-hweight); font-size: 26px;
  background: var(--b-tone); border-radius: var(--b-radius-sm); padding: 4px 10px;
}
.pv-features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  background: var(--b-paper); padding: 30px 36px;
}
.pv-card {
  background: var(--b-tone); border-radius: var(--b-radius); padding: 18px;
  box-shadow: var(--b-shadow-card);
  transition: transform var(--b-speed) ease;
}
.preview[data-hover="lift"] .pv-card:hover { transform: translateY(-3px); }
.preview[data-hover="pop"] .pv-card:hover { transform: scale(1.02); }
.pv-card__icon {
  display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center;
  background: var(--b-accent); color: var(--b-on-accent); border-radius: var(--b-radius-sm);
  margin-bottom: 10px; font-size: 15px;
}
.pv-card h4 { font-family: var(--b-font-display); font-weight: var(--b-hweight); margin: 0 0 6px; font-size: 15px; }
.pv-card p { margin: 0; font-size: 13px; line-height: 1.55; opacity: .85; }
.pv-cta {
  background: var(--b-deep); color: var(--b-on-deep);
  padding: 36px; text-align: center;
  display: flex; flex-direction: column; gap: 16px; align-items: center;
}
.pv-cta .pv-h2 { color: var(--b-on-deep); }
.pv-footer {
  background: var(--b-paper); color: var(--b-ink);
  border-radius: 0 0 var(--b-radius) var(--b-radius);
  padding: 16px 22px; font-size: 12.5px; opacity: .9;
  border-top: 1px solid var(--b-tone);
}

/* --- Blog --- */
.pv-article {
  background: var(--b-paper); border-radius: var(--b-radius);
  padding: clamp(24px, 5vw, 56px); max-width: 760px; margin: 0 auto;
  box-shadow: var(--b-shadow-card);
}
.pv-eyebrow2 {
  text-transform: uppercase; letter-spacing: 2px; font-size: 10.5px; font-weight: 800;
  color: var(--b-primary);
}
.pv-article .pv-h1 { margin: 10px 0 8px; }
.pv-byline { font-size: 12.5px; opacity: .7; margin: 0 0 22px; }
.pv-article .pv-h3 { margin: 22px 0 8px; }
.pv-link { color: var(--b-primary); text-decoration: underline; text-underline-offset: 3px; }
.pv-quote {
  border-left: 4px solid var(--b-primary);
  background: var(--b-tone); border-radius: 0 var(--b-radius-sm) var(--b-radius-sm) 0;
  margin: 18px 0; padding: 14px 18px;
  font-family: var(--b-font-display); font-size: 16.5px; line-height: 1.45;
}

/* --- Social --- */
.pv-socialgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.pv-post {
  aspect-ratio: 1 / 1; border-radius: var(--b-radius); padding: 22px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--b-shadow-card);
}
.pv-post__brand { font-family: var(--b-font-display); font-size: 13px; opacity: .9; }
.pv-post__big { font-family: var(--b-font-display); font-weight: var(--b-hweight); font-size: clamp(18px, 2.2vw, 24px); line-height: 1.2; margin: 0; }
.pv-post__handle { font-size: 11.5px; opacity: .7; }
.pv-post__number { font-family: var(--b-font-display); font-weight: 800; font-size: 56px; line-height: 1; }
.pv-post--quote { background: var(--b-primary); color: var(--b-on-primary); }
.pv-post--stat { background: var(--b-tone); color: var(--b-ink); }
.pv-post--stat .pv-post__number { color: var(--b-primary); }
.pv-post--stat p { margin: 0; font-size: 14px; }
.pv-post--cta { background: var(--b-deep); color: var(--b-on-deep); }
.pv-post--cta .pv-btn { align-self: flex-start; }

/* --- Email --- */
.pv-email { max-width: 560px; margin: 0 auto; }
.pv-email__head {
  background: var(--b-deep); color: var(--b-on-deep);
  border-radius: var(--b-radius) var(--b-radius) 0 0;
  padding: 16px 24px; font-family: var(--b-font-display);
  display: flex; align-items: center; gap: 8px;
}
.pv-email__body {
  background: var(--b-paper); border-radius: 0 0 var(--b-radius) var(--b-radius);
  padding: 30px 28px; box-shadow: var(--b-shadow-card);
}
.pv-email__body .pv-h2 { margin-bottom: 10px; }
.pv-email__fine { font-size: 11px; opacity: .55; margin: 22px 0 0; }

/* --- UI components --- */
.pv-uigrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.pv-uicard {
  background: var(--b-paper); border-radius: var(--b-radius);
  padding: 20px; box-shadow: var(--b-shadow-card);
}
.pv-uicard .pv-h3 { margin-bottom: 14px; }
.pv-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pv-field { display: block; margin-bottom: 12px; font-size: 12px; font-weight: 600; }
.pv-field span:first-child { display: block; margin-bottom: 5px; }
.pv-input {
  display: block; background: var(--b-tone); border: 1.5px solid transparent;
  border-radius: var(--b-radius-sm); padding: 10px 12px;
  font-weight: 400; font-size: 13.5px; opacity: .85;
}
.pv-input--area { min-height: 64px; }
.pv-alert {
  border-radius: var(--b-radius-sm); padding: 10px 14px; font-size: 13px; margin-bottom: 10px;
}
.pv-alert--ok { background: color-mix(in srgb, var(--b-secondary) 18%, var(--b-paper)); border-left: 4px solid var(--b-secondary); }
.pv-alert--info { background: color-mix(in srgb, var(--b-accent) 18%, var(--b-paper)); border-left: 4px solid var(--b-accent); }
.pv-badge {
  background: var(--b-primary); color: var(--b-on-primary);
  font-size: 11px; font-weight: 700; border-radius: 99px; padding: 4px 12px;
}
.pv-badge--soft { background: var(--b-tone); color: var(--b-ink); }
.pv-badge--outline { background: transparent; color: var(--b-ink); box-shadow: inset 0 0 0 1.5px var(--b-tone); }

/* --- Eigene HTML-Seite --- */
.view--html { max-width: 1100px; }
.htmlempty {
  border: 2px dashed var(--ui-line); border-radius: 14px;
  padding: 48px 24px; text-align: center; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px; align-items: center;
  color: var(--ui-text); background: var(--ui-bg2);
  max-width: 640px; margin: 40px auto;
  font-family: var(--ui-font); font-size: 14px;
}
.htmlempty:hover, .htmlempty:focus-visible, .htmlempty.is-over {
  border-color: var(--ui-accent); background: var(--ui-bg3);
}
.htmlempty p { color: var(--ui-text2); font-size: 13px; line-height: 1.6; margin: 6px 0 0; max-width: 52ch; }
.htmlempty__note { font-size: 12px; opacity: .8; }
.htmlempty { cursor: default; }
.htmlempty__actions { margin-top: 14px; }
.urlrow { display: flex; gap: 8px; width: 100%; max-width: 440px; margin-top: 10px; }
.urlrow input {
  flex: 1; min-width: 0;
  background: var(--ui-bg3); border: 1px solid var(--ui-line); color: var(--ui-text);
  border-radius: 8px; padding: 9px 12px; font: inherit;
}
.urlrow input:focus { border-color: var(--ui-accent); outline: none; }
.urlrow .btn[disabled] { opacity: .5; cursor: wait; }

.htmltoolbar {
  background: var(--ui-bg2); border: 1px solid var(--ui-line);
  border-radius: 12px; padding: 14px 16px; margin-bottom: 14px;
  font-family: var(--ui-font); color: var(--ui-text); font-size: 14px;
}
.htmltoolbar .pane__note { margin: 10px 0 8px; }
.htmltoolbar__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.htmltoolbar__file { font-weight: 700; font-size: 13px; }
.htmltoolbar__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.htmlmap { display: flex; gap: 8px; flex-wrap: wrap; }
.map-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--ui-bg3); border: 1px solid var(--ui-line);
  border-radius: 99px; padding: 5px 8px 5px 6px;
}
.map-chip__swatch {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25); flex: none;
}
.map-chip__count { font-size: 10px; color: var(--ui-text2); }
.map-chip__arrow { color: var(--ui-text2); font-size: 11px; }
.map-chip select {
  background: var(--ui-bg2); color: var(--ui-text); border: 1px solid var(--ui-line);
  border-radius: 7px; padding: 4px 6px; font: inherit; font-size: 12px;
}

.htmlframe {
  width: 100%; height: 74vh; border: 0;
  background: #ffffff; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

/* ---------- SEO content ---------- */
.content { background: var(--ui-bg2); border-top: 1px solid var(--ui-line); }
.content__inner { max-width: 760px; margin: 0 auto; padding: 56px 24px 64px; }
.content h1 { font-size: 26px; line-height: 1.25; margin: 0 0 14px; }
.content h2 { font-size: 19px; margin: 34px 0 10px; }
.content__lead { color: var(--ui-text2); font-size: 15px; line-height: 1.7; }
.content p { line-height: 1.7; color: var(--ui-text2); }
.content strong { color: var(--ui-text); }
.content code {
  background: var(--ui-bg3); border: 1px solid var(--ui-line);
  border-radius: 5px; padding: 1px 6px; font-size: 12.5px;
}
.content__steps { padding-left: 20px; display: flex; flex-direction: column; gap: 10px; color: var(--ui-text2); line-height: 1.6; }
.content details {
  border: 1px solid var(--ui-line); border-radius: 10px;
  padding: 0 16px; margin-bottom: 10px; background: var(--ui-bg3);
}
.content summary {
  cursor: pointer; font-weight: 600; padding: 13px 0; color: var(--ui-text);
  list-style-position: inside;
}
.content details p { margin-top: 0; }

.footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 18px 24px; border-top: 1px solid var(--ui-line);
  color: var(--ui-text2); font-size: 12.5px;
}
.footer a { color: var(--ui-text2); }
.footer a:hover { color: var(--ui-accent2); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(16px);
  background: var(--ui-bg3); border: 1px solid var(--ui-accent); color: var(--ui-text);
  border-radius: 10px; padding: 10px 18px; font-weight: 600; font-size: 13px;
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
  z-index: 90; max-width: min(90vw, 480px); text-align: center;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .app { grid-template-columns: 340px 1fr; }
  .pv-hero { grid-template-columns: 1fr; }
  .pv-features { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .panel { border-right: 0; border-bottom: 1px solid var(--ui-line); }
  .panel__tabs { position: static; max-height: none; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--ui-line); }
  .ptab { width: auto; min-width: 64px; }
  .panel__panes { max-height: 46vh; }
  .stage__bar { position: static; }
  .appbar__center { order: 3; width: 100%; }
}
