/* Fabulo Editorial Warmth — User-Frontend CSS
 * 1:1 Port aus _design-reference/fabulo/project/components/fabulo-ui.jsx
 * Light + Dark via [data-theme="dark"]
 */

/* ========== TOKENS ========== */
:root {
  --cream:         #FAF6ED;
  --cream-deep:    #F4ECDA;
  --paper-shade:   #F0EAE0;
  --ink:           #1C1917;
  --ink-soft:      #57534E;
  --ink-whisper:   #A8A29E;
  --terracotta:         #C65D3F;
  --terracotta-dark:    #8B3F25;
  --terracotta-pale:    #E8B8A6;
  --deep-teal:     #1E4344;
  --deep-teal-pale:#B8CDCE;
  --sun-yellow:    #F4C430;
  --forest:        #4A6741;
  --border:        #E7DFD3;
  --border-strong: #D4C9B4;
  --danger:        #8B3F25;

  --shadow-soft:   0 1px 2px rgba(28,25,23,0.04);
  --shadow-card:   0 1px 2px rgba(28,25,23,0.04), 0 8px 24px rgba(28,25,23,0.06);
  --shadow-lift:   0 2px 4px rgba(28,25,23,0.05), 0 12px 32px rgba(28,25,23,0.10);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "IBM Plex Sans", -apple-system, system-ui, sans-serif;
  --mono:  "IBM Plex Mono", "SF Mono", Menlo, monospace;
}

[data-theme="dark"] {
  --cream:         #1A1613;
  --cream-deep:    #241E1A;
  --paper-shade:   #2A231E;
  --ink:           #F4ECDA;
  --ink-soft:      #C9BFAE;
  --ink-whisper:   #857D6E;
  --terracotta:        #E07A5F;
  --terracotta-dark:   #C65D3F;
  --terracotta-pale:   #F4AD91;
  --border:        #3A312A;
  --border-strong: #4A3F36;
  --shadow-soft:   0 1px 2px rgba(0,0,0,0.4);
  --shadow-card:   0 1px 2px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.5);
  --shadow-lift:   0 2px 4px rgba(0,0,0,0.5), 0 12px 32px rgba(0,0,0,0.6);
}

/* ========== RESET / BASE ========== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--serif);
  font-variation-settings: "opsz" 14, "SOFT" 50;
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 300ms ease, color 300ms ease;
}
a { color: var(--terracotta); text-decoration: none; }
a:hover { color: var(--terracotta-dark); }
button { font: inherit; }

/* ========== TYPOGRAPHY UTILITIES ========== */
.display-hero {
  font-family: var(--serif);
  font-variation-settings: "opsz" 144, "wght" 500, "SOFT" 100;
  font-size: clamp(2.3rem, 6vw, 3rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
.display-section {
  font-family: var(--serif);
  font-variation-settings: "opsz" 60, "wght" 500, "SOFT" 80;
  font-size: clamp(1.6rem, 4vw, 2rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0;
}
.italic-accent {
  font-style: italic;
  font-variation-settings: "opsz" 144, "wght" 400, "SOFT" 100;
  color: var(--terracotta);
}
.body-editorial {
  font-family: var(--serif);
  font-variation-settings: "opsz" 18, "wght" 400, "SOFT" 60;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ========== COMPONENTS ========== */

/* Wordmark */
.wordmark {
  font-family: var(--serif);
  font-variation-settings: "opsz" 30, "wght" 600, "SOFT" 50;
  font-size: 22px; color: var(--ink);
  letter-spacing: -0.03em; line-height: 1;
}
.wordmark-dot { color: var(--terracotta); }

/* Eyebrow: mono + terracotta bar */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--terracotta); line-height: 1;
}
.eyebrow::before {
  content: ""; display: inline-block;
  width: 24px; height: 1px; background: var(--terracotta);
  flex-shrink: 0;
}

/* Ornament divider: line · dot · line */
.ornament {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; width: 100%;
}
.ornament::before, .ornament::after {
  content: ""; flex: 1; height: 1px; background: var(--border-strong);
}
.ornament::before { margin-right: 0; }
.ornament-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--terracotta); flex-shrink: 0;
}

/* Label / Tag */
.label {
  display: inline-block;
  background: var(--paper-shade);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 10px; font-weight: 500; line-height: 1.2;
  padding: 5px 8px;
  text-transform: uppercase; letter-spacing: 0.12em;
  border-radius: 4px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--ink); color: var(--cream);
  font-family: var(--sans);
  font-size: 15px; font-weight: 500; line-height: 1.2;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 200ms ease;
  text-decoration: none;
}
.btn:hover { background: var(--terracotta); transform: translateY(-1px); }
.btn[disabled], .btn[aria-disabled="true"] {
  background: #EDE6D5; color: var(--ink-whisper);
  cursor: not-allowed; transform: none;
}
.btn-terracotta { background: var(--terracotta); color: var(--cream); }
.btn-terracotta:hover { background: var(--terracotta-dark); color: var(--cream); }
.btn-secondary {
  background: transparent; color: var(--ink); border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: transparent; color: var(--terracotta); border-color: var(--terracotta);
  transform: none;
}
.btn-full { width: 100%; }

/* Inputs */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-family: var(--sans);
  font-size: 12px; font-weight: 500; color: var(--ink-soft);
  line-height: 1.2;
}
.field-optional {
  color: var(--ink-whisper);
  margin-left: 6px; font-weight: 400;
}
.input, .select {
  height: 48px; padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--serif);
  font-variation-settings: "opsz" 14, "wght" 400;
  font-size: 16px;
  outline: none; width: 100%;
  transition: border-color 150ms ease;
}
.input:focus, .select:focus { border-color: var(--terracotta); }
.select {
  padding-right: 40px; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' width='12' height='8'><path d='M1 1l5 5 5-5' stroke='%2357534E' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center;
  cursor: pointer;
}

/* Landing sections */
.page { min-height: 100vh; background: var(--cream); }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px 8px;
}
.topbar-link {
  font-family: var(--sans);
  color: var(--ink-soft); font-size: 13px; font-weight: 500;
  padding: 8px 0;
}
.hero { padding: 24px 24px 0; position: relative; }
.hero-ornament { margin: 20px 0 4px; height: 64px; }

.demo-card {
  margin: 28px 24px 0;
  background: var(--cream-deep);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
  position: relative;
}
.demo-card::before {
  content: ""; position: absolute; top: -1px; left: 24px;
  width: 60px; height: 4px;
  background: var(--terracotta);
  border-radius: 0 0 4px 4px;
}
.demo-card-kicker {
  font-family: var(--mono);
  font-size: 10px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.demo-card form { display: flex; flex-direction: column; gap: 12px; }
.demo-card-hint {
  font-family: var(--serif);
  font-variation-settings: "opsz" 14, "wght" 400, "SOFT" 60;
  font-style: italic;
  font-size: 13px; color: var(--ink-soft);
  text-align: center; margin-top: 4px;
}

.why-section {
  padding: 56px 24px 32px;
  background: linear-gradient(to bottom, transparent 0%, var(--cream-deep) 60%);
  margin-top: 40px;
}
.why-quote {
  font-family: var(--serif);
  font-variation-settings: "opsz" 60, "wght" 300, "SOFT" 100;
  font-style: italic;
  font-size: 22px; line-height: 1.3;
  color: var(--ink);
  margin: 20px 0;
  padding: 4px 0 4px 16px;
  border-left: 2px solid var(--terracotta);
}

.styles-row {
  padding: 32px 0 24px 24px;
  background: var(--cream-deep);
}
.styles-row-scroller {
  display: flex; gap: 14px;
  overflow-x: auto;
  padding: 6px 24px 12px 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.styles-row-scroller::-webkit-scrollbar { display: none; }
.style-card-tile {
  flex-shrink: 0; width: 200px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  scroll-snap-align: start;
}
.style-card-tile .banner {
  height: 110px;
  display: flex; align-items: center; justify-content: center;
}
.style-card-tile .body { padding: 16px 16px 18px; }
.style-card-tile .name {
  font-family: var(--serif);
  font-variation-settings: "opsz" 30, "wght" 600;
  font-size: 18px; color: var(--ink);
  margin-bottom: 6px;
}
.style-card-tile .desc {
  font-family: var(--sans);
  font-size: 12.5px; line-height: 1.45;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.style-card-tile .age {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-whisper);
}

.pricing-section { padding: 8px 24px 32px; background: var(--cream-deep); }
.pricing-card {
  background: var(--ink);
  color: var(--cream);
  border-radius: 20px;
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
}
.pricing-card-glow {
  position: absolute; top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, var(--terracotta) 0%, transparent 70%);
  opacity: 0.3;
}
.pricing-price {
  font-family: var(--serif);
  font-variation-settings: "opsz" 144, "wght" 500, "SOFT" 60;
  font-size: 56px; line-height: 1;
  letter-spacing: -0.04em;
  display: flex; align-items: baseline; gap: 6px;
  margin-bottom: 8px;
  position: relative;
}
.pricing-price .ccy {
  font-size: 22px; color: var(--terracotta-pale);
  font-variation-settings: "opsz" 30, "wght" 400;
}
.pricing-price .cents { font-size: 28px; }
.pricing-tagline {
  font-family: var(--sans);
  font-size: 13px;
  color: rgba(250, 246, 237, 0.6);
  margin-bottom: 22px;
  position: relative;
}
.pricing-features {
  list-style: none; padding: 0; margin: 0 0 22px;
  position: relative;
}
.pricing-features li {
  font-family: var(--serif);
  font-variation-settings: "opsz" 16, "wght" 400;
  font-size: 15px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(250, 246, 237, 0.1);
  display: flex; align-items: center; gap: 12px;
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features li .dot {
  color: var(--terracotta);
  font-size: 22px; line-height: 0;
  flex-shrink: 0;
}

.landing-faq {
  padding: 8px 24px 32px;
  background: var(--cream-deep);
}
.landing-faq-inner {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}
.landing-faq-q {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  color: var(--ink);
}
.landing-faq-a {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  opacity: 0.78;
  margin: 0;
}
@media (min-width: 768px) {
  .landing-faq { padding: 16px 48px 48px; }
  .landing-faq-q { font-size: 26px; margin-bottom: 12px; }
  .landing-faq-a { font-size: 17px; }
}

.footer {
  padding: 32px 24px 40px;
  background: var(--cream-deep);
  text-align: center;
  border-top: 1px solid var(--border);
}
.footer-links {
  display: flex; justify-content: center; gap: 16px;
  font-family: var(--sans);
  font-size: 12px; color: var(--ink-soft);
}
.footer-links a { color: var(--ink-soft); }

/* Demo result, inline on landing */
.demo-result {
  margin-top: 24px;
  padding: 22px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}
.demo-result h3 {
  font-family: var(--serif);
  font-variation-settings: "opsz" 60, "wght" 500, "SOFT" 80;
  font-size: 24px; line-height: 1.1;
  color: var(--ink);
  margin: 0 0 12px;
}
.demo-result p {
  font-family: var(--serif);
  font-size: 17px; line-height: 1.6;
  color: var(--ink);
  margin: 0 0 14px;
}
.demo-result-meta {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-whisper);
}
.demo-error {
  margin-top: 16px;
  padding: 14px 16px;
  border-left: 2px solid var(--danger);
  background: var(--paper-shade);
  font-family: var(--serif);
  font-size: 15px; color: var(--ink-soft);
  border-radius: 0 10px 10px 0;
}

/* ========== LIBRARY (Screen 2) ========== */
.lib-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.account-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--paper-shade);
  border: none; border-radius: 999px;
  padding: 6px 14px 6px 6px;
  font-family: var(--sans);
  font-size: 13px; color: var(--ink);
  cursor: pointer;
}
.account-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--terracotta); color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-variation-settings: "opsz" 16, "wght" 600;
  font-size: 13px;
}
.account-menu {
  position: absolute; top: 48px; right: 0; z-index: 20;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lift);
  min-width: 220px;
  overflow: hidden;
}
.account-menu .top { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.account-menu .name {
  font-family: var(--serif);
  font-variation-settings: "opsz" 18, "wght" 600;
  font-size: 15px; color: var(--ink);
}
.account-menu .email {
  font-family: var(--mono); font-size: 11px; color: var(--ink-soft);
  margin-top: 4px;
}
.account-menu a {
  display: block; padding: 12px 16px;
  font-family: var(--sans); font-size: 14px; color: var(--ink);
}
.account-menu a.danger { color: var(--terracotta-dark); border-top: 1px solid var(--border); }

.lib-greeting { padding: 28px 24px 18px; }
.lib-meta {
  font-family: var(--mono);
  font-size: 11px; color: var(--ink-soft);
  margin-top: 12px; letter-spacing: 0.05em;
  text-transform: uppercase;
}

.filter-chips {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 4px 24px 16px;
  scrollbar-width: none;
}
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 8px;
  background: var(--cream); color: var(--ink);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: all 180ms ease;
  text-decoration: none;
}
.filter-chip.active { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.filter-chip .indicator {
  width: 18px; height: 18px; border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}
.filter-chip.active .indicator { box-shadow: inset 0 0 0 1px rgba(250,246,237,0.3); }
.filter-chip .count {
  font-family: var(--mono); font-size: 11px; font-weight: 400;
  color: var(--ink-whisper); margin-left: 2px;
}
.filter-chip.active .count { color: rgba(250,246,237,0.65); }

.lib-grid {
  padding: 0 16px 32px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.story-tile {
  background: var(--cream-deep);
  border: 1px solid var(--border);
  border-radius: 16px;
  aspect-ratio: 3/4;
  overflow: hidden;
  cursor: pointer;
  display: flex; flex-direction: column;
  transition: all 200ms ease;
  text-decoration: none;
}
.story-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.story-tile .banner {
  height: 90px; display: flex; align-items: flex-end; padding: 10px;
}
.story-tile .badge {
  font-family: var(--mono);
  font-size: 9px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--cream);
  background: rgba(28, 25, 23, 0.4);
  padding: 4px 8px; border-radius: 4px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.story-tile .body {
  padding: 12px 14px 14px; flex: 1;
  display: flex; flex-direction: column; justify-content: space-between;
}
.story-tile .title {
  font-family: var(--serif);
  font-variation-settings: "opsz" 18, "wght" 600, "SOFT" 80;
  font-size: 15px; line-height: 1.2;
  color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word; hyphens: auto;
}
.story-tile .date {
  font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.05em;
  color: var(--ink-whisper);
  margin-top: 8px; text-transform: uppercase;
}

.new-story-tile {
  background: var(--cream);
  border: 1.5px dashed var(--border-strong);
  border-radius: 16px;
  aspect-ratio: 3/4;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 200ms ease;
  text-decoration: none;
}
.new-story-tile .plus-circle {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--terracotta);
  color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  font-family: var(--serif);
  font-variation-settings: "opsz" 30, "wght" 300;
  font-size: 32px; line-height: 1;
  transition: transform 220ms ease;
}
.new-story-tile:hover .plus-circle { transform: rotate(90deg); }
.new-story-tile .label-big {
  font-family: var(--serif);
  font-variation-settings: "opsz" 18, "wght" 500;
  font-size: 15px; line-height: 1.2;
  color: var(--ink);
  text-align: center;
}

.empty-state {
  margin: 0 24px 24px; padding: 24px 20px;
  background: var(--cream-deep);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: center;
}

/* ========== NEW STORY (Screen 3) ========== */
.mini-header {
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  padding: 0 12px; height: 56px;
  display: flex; align-items: center; gap: 6px;
}
.icon-btn {
  width: 40px; height: 40px; border: none; background: transparent;
  cursor: pointer; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.icon-btn.round { border-radius: 50%; background: var(--paper-shade); color: var(--ink); }

.swipe-stage {
  position: relative; height: 440px;
  margin: 0 auto; width: 100%; max-width: 360px;
  touch-action: pan-y;
}
.swipe-card {
  position: absolute; top: 0; left: 50%;
  width: 280px; height: 420px; margin-left: -140px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 260ms cubic-bezier(0.2, 0.9, 0.3, 1.15), box-shadow 200ms ease;
  user-select: none; -webkit-user-select: none;
  will-change: transform;
}
.swipe-card.active { box-shadow: 0 2px 4px rgba(28,25,23,0.05), 0 16px 40px rgba(28,25,23,0.15); cursor: grab; }
.swipe-card.dragging { transition: none; }
.swipe-card .hero {
  height: 220px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.swipe-card .content {
  padding: 20px 22px;
  display: flex; flex-direction: column; gap: 10px;
}
.swipe-card .age-eyebrow {
  font-family: var(--mono);
  font-size: 10px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--terracotta);
  display: flex; align-items: center; gap: 8px;
}
.swipe-card .age-eyebrow::before {
  content: ""; width: 16px; height: 1px; background: var(--terracotta); display: inline-block;
}
.swipe-card .name {
  font-family: var(--serif);
  font-variation-settings: "opsz" 60, "wght" 600, "SOFT" 80;
  font-size: 28px; line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.swipe-card .desc {
  font-family: var(--serif);
  font-variation-settings: "opsz" 16, "wght" 400;
  font-size: 14px; line-height: 1.5;
  color: var(--ink-soft);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

.dots { display: flex; justify-content: center; gap: 10px; padding: 8px 0 20px; }
.dots .dot {
  width: 7px; height: 7px; padding: 0; border: none;
  border-radius: 999px; background: var(--border-strong);
  cursor: pointer; transition: all 200ms ease;
}
.dots .dot.active { width: 22px; background: var(--terracotta); }

.accordion-toggle {
  width: 100%; min-height: 44px;
  background: transparent; border: none;
  padding: 10px 4px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
}
.accordion-toggle svg { transition: transform 180ms ease; }
.accordion-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.accordion-panel {
  background: var(--cream-deep);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: none;
  flex-direction: column; gap: 14px;
  margin-top: 8px;
}
.accordion-panel.open { display: flex; }

.length-group { display: flex; gap: 6px; }
.length-btn {
  flex: 1; min-height: 52px; padding: 8px;
  background: var(--cream); color: var(--ink);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--sans);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  transition: all 180ms ease;
}
.length-btn.active { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.length-btn .label { font-size: 13px; font-weight: 500; }
.length-btn .sub { font-family: var(--mono); font-size: 10px; color: var(--ink-whisper); }
.length-btn.active .sub { color: rgba(250,246,237,0.7); }

/* ========== GENERATING (Screen 4) ========== */
.gen-stage {
  position: relative; height: 420px;
  display: flex; align-items: center; justify-content: center;
  perspective: 1400px;
}
.gen-card-shadow {
  position: absolute; bottom: 30px;
  width: 180px; height: 12px;
  background: radial-gradient(ellipse, rgba(28,25,23,0.15), transparent 70%);
}
.gen-card {
  width: 260px; height: 390px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  transform-style: preserve-3d;
  animation: gen-pendulum 3s ease-in-out infinite;
}
.gen-card .hero {
  height: 200px;
  display: flex; align-items: center; justify-content: center;
}
@keyframes gen-pendulum {
  0%   { transform: scale(1) rotateY(-20deg) rotateZ(0deg); }
  50%  { transform: scale(0.92) rotateY(40deg) rotateZ(3deg); }
  100% { transform: scale(1) rotateY(-20deg) rotateZ(0deg); }
}
.gen-message {
  font-family: var(--serif);
  font-variation-settings: "opsz" 18, "wght" 400;
  font-style: italic;
  font-size: 16px; color: var(--ink);
  min-height: 24px;
  transition: opacity 200ms ease;
}
.gen-sub {
  font-family: var(--mono);
  font-size: 11px; color: var(--ink-whisper);
  margin-top: 10px; letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ========== STORY (Screen 5) ========== */
.story-canvas {
  padding: 24px 28px 48px;
  max-width: 640px; margin: 0 auto; width: 100%;
}
.story-title {
  font-family: var(--serif);
  font-variation-settings: "opsz" 144, "wght" 500, "SOFT" 100;
  font-size: 40px; line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--ink); margin: 0;
  text-wrap: balance;
}
.story-byline {
  font-family: var(--serif);
  font-variation-settings: "opsz" 16, "wght" 400, "SOFT" 80;
  font-style: italic;
  font-size: 14px; color: var(--ink-soft);
  margin: 16px 0 28px;
}
.story-body {
  font-family: var(--serif);
  font-variation-settings: "opsz" 18, "wght" 400, "SOFT" 50;
  font-size: 19px; line-height: 1.65;
  color: var(--ink);
  letter-spacing: 0.005em;
}
.story-body p { margin: 0 0 18px; }
.story-body p.first-paragraph::first-letter {
  font-family: var(--serif);
  font-variation-settings: "opsz" 144, "wght" 600, "SOFT" 100;
  font-size: 64px; line-height: 0.85;
  float: left;
  padding: 4px 10px 0 0;
  color: var(--terracotta);
}
.story-divider {
  margin-top: 32px; text-align: center;
  font-family: var(--mono);
  font-size: 14px; color: var(--ink-whisper);
  letter-spacing: 0.3em;
}
.story-meta {
  margin-top: 36px; padding: 18px 20px;
  background: var(--cream-deep);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.story-meta-row { display: flex; justify-content: space-between; align-items: center; }
.story-meta-row .label-mono {
  font-family: var(--mono);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink-soft);
}
.story-meta-row .value {
  font-family: var(--serif);
  font-variation-settings: "opsz" 14, "wght" 500;
  font-size: 14px; color: var(--ink);
}
.three-dot-menu {
  position: absolute; top: 48px; right: 12px; z-index: 30;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lift);
  min-width: 180px; overflow: hidden;
}
.three-dot-menu a {
  display: block; padding: 12px 16px;
  font-family: var(--sans); font-size: 14px; color: var(--ink);
}
.three-dot-menu a.danger { color: var(--terracotta-dark); border-top: 1px solid var(--border); }
.three-dot-menu-item {
  display: block; width: 100%; text-align: left;
  padding: 12px 16px; font-family: var(--sans); font-size: 14px;
  color: var(--ink); background: none; border: none; cursor: pointer;
}
.three-dot-menu-item:hover { background: var(--cream-deep); }
.three-dot-menu-item.danger { color: var(--terracotta-dark); }
.three-dot-menu-divider { height: 1px; background: var(--border); margin: 0; }

/* Story actions */
.story-actions { margin-top: 24px; display: flex; gap: 10px; }

/* ========================================================== */
/* RESPONSIVE EXTENSIONS                                       */
/* Additiv: Mobile-Styles oberhalb bleiben unverändert.        */
/* Breakpoint 768px teilt mobile <-> desktop (tablet == desktop). */
/* ========================================================== */

/* --- Mobile-neutrale Wrapper-Klassen (kein visueller Effekt auf Mobile) --- */

/* Landing: neue Topbar-Nav (auf Mobile versteckt) */
.topbar-nav { display: flex; align-items: center; gap: 24px; }
.topbar-nav-link {
  font-family: var(--sans);
  font-size: 14px; font-weight: 500;
  color: var(--ink-soft); text-decoration: none;
  padding: 8px 0;
  display: none; /* mobile: nur "Anmelden" sichtbar via direkten child Link */
}
/* Auf Mobile nur der letzte Link (topbar-link / Anmelden) sichtbar */
.topbar-nav .topbar-link { padding: 8px 0; }

/* Landing Hero-Grid (stacked by default) */
.hero-grid { display: block; }
.hero-sub { margin: 12px 0 0; max-width: 340px; }

/* Why-Section Inner-Wrapper */
.why-inner { display: block; }
.why-col { display: block; }
/* Mobile: why-col-quote erhält den Pull-Quote im Flow (wie bisher) */

/* Styles-Row Head/H2 */
.styles-row-head { padding-right: 24px; margin-bottom: 18px; }
.styles-row-h2 { font-size: 24px; }

/* Footer — Mobile: gestapelt zentriert (wie zuvor), locale ausgeblendet */
.footer-wordmark { margin-bottom: 14px; }
.footer-locale {
  display: none;
  font-family: var(--mono);
  font-size: 11px; color: var(--ink-whisper);
  text-transform: uppercase; letter-spacing: 0.06em;
}

/* Library — Page/Wrapper bleibt Block auf Mobile */
.lib-page { display: block; }
.lib-sidebar { display: none; } /* Mobile: Sidebar nicht vorhanden */
.lib-main { display: block; }
.lib-greet-h1 { font-size: 34px; }

/* Library — Desktop Account-Pill wide (kommt nur in Sidebar vor) */
.account-pill-wide { width: 100%; }
.account-pill-wide .account-pill-name { flex: 1; text-align: left; }

/* Library — Sidebar-Filter-Chip (Desktop-only, Markup existiert aber) */
.sidebar-filter-list { display: flex; flex-direction: column; gap: 4px; }
.sidebar-filter-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
}
.sidebar-filter-chip:hover { background: var(--paper-shade); color: var(--ink); }
.sidebar-filter-chip.active { background: var(--ink); color: var(--cream); }
.sidebar-filter-chip .indicator {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}
.sidebar-filter-chip .label { flex: 1; }
.sidebar-filter-chip .count {
  font-family: var(--mono); font-size: 11px; color: var(--ink-whisper);
}
.sidebar-filter-chip.active .count { color: rgba(250,246,237,0.6); }

/* NewStory — Mobile behavior (accordion + bottom CTA) bleibt unverändert */
.ns-page { display: flex; flex-direction: column; }
.ns-form { display: contents; }
.ns-deck { display: contents; }
.ns-heading { padding: 32px 24px 16px; text-align: center; }
.ns-h1 { font-size: 30px; }
.ns-sub {
  font-family: var(--serif);
  font-variation-settings: "opsz" 14, "wght" 400;
  font-style: italic;
  font-size: 14px; color: var(--ink-soft);
  margin-top: 8px;
}
/* Mobile: ns-sidepanel ist "contents" -> Kinder rendern als normaler Flow
   genau wie vorher (Haupt-CTA oben, dann Accordion-Toggle, dann Panel).
   Reihenfolge im DOM: eyebrow, accordion-toggle, panel, cta. Das ist ok.
   Aber wir wollen Mobile-Reihenfolge wie vor dem Port: CTA kommt zuerst,
   dann Accordion-Toggle + Panel. Also Order via Flex/Order auf Mobile. */
.ns-sidepanel { display: contents; }
.ns-sidepanel-eyebrow { display: none; } /* nur Desktop */
.ns-cta { padding: 4px 24px 0; order: 10; }
/* NewStory mobile layout: enforce order within page */
.ns-page {
  display: flex;
  flex-direction: column;
}
.ns-page .mini-header { order: 0; }
.ns-page .ns-heading { order: 1; }
.ns-page .swipe-stage { order: 2; }
.ns-page .dots { order: 3; }
.ns-page .ns-cta { order: 4; padding: 4px 24px 0; }
.ns-page .accordion-toggle { order: 5; margin: 12px 24px 0; }
.ns-page .accordion-panel { order: 6; margin: 8px 24px 32px; }

/* ========================================================== */
@media (min-width: 768px) {

  /* ---------- GLOBAL ---------- */
  body { font-size: 18px; }

  /* ---------- LANDING ---------- */
  .topbar {
    position: sticky; top: 0; z-index: 50;
    background: var(--cream);
    border-bottom: 1px solid var(--border);
    padding: 0 48px;
    height: 64px;
    justify-content: space-between;
  }
  .topbar-nav-link { display: inline-block; }

  .display-hero {
    font-size: clamp(52px, 5.5vw, 88px);
    line-height: 0.96;
    letter-spacing: -0.04em;
  }

  .hero-grid {
    max-width: 1280px; margin: 0 auto;
    padding: 80px 48px 64px;
    display: grid;
    grid-template-columns: 1fr 440px;
    gap: 64px;
    align-items: start;
  }
  .hero-grid .hero {
    padding: 0;
  }
  .hero-grid .hero-ornament {
    margin: 32px 0 8px;
    max-width: 520px;
    height: 72px;
  }
  .hero-sub {
    font-size: 20px;
    line-height: 1.5;
    max-width: 460px;
    margin-top: 24px;
  }
  .hero-grid .demo-card {
    margin: 24px 0 0;
    padding: 32px 28px;
    border-radius: 20px;
    box-shadow: var(--shadow-card);
  }

  /* Why-Section 2 Columns */
  .why-section {
    padding: 72px 48px 64px;
  }
  .why-inner {
    max-width: 960px; margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
  }
  .why-section .display-section {
    font-size: 40px;
  }
  .why-section .body-editorial {
    font-size: 18px;
    line-height: 1.6;
  }
  .why-quote {
    font-size: 26px;
    padding: 8px 0 8px 20px;
    margin-bottom: 32px;
  }

  /* Styles-Row → Grid 4 Columns */
  .styles-row {
    padding: 56px 48px;
  }
  .styles-row > .styles-row-head {
    max-width: 1280px; margin: 0 auto 32px;
    padding-right: 0;
  }
  .styles-row-h2 { font-size: 36px; }
  .styles-row-scroller {
    max-width: 1280px; margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    overflow: visible;
    padding: 0;
    scroll-snap-type: none;
  }
  .style-card-tile {
    width: auto;
    flex-shrink: 1;
  }
  .style-card-tile .banner { height: 140px; }

  /* Pricing — center, feature-list 2 cols, large price */
  .pricing-section {
    padding: 16px 48px 64px;
  }
  .pricing-card {
    max-width: 560px; margin: 0 auto;
    padding: 40px 36px;
    border-radius: 20px;
  }
  .pricing-price { font-size: 72px; }
  .pricing-price .ccy { font-size: 28px; }
  .pricing-price .cents { font-size: 36px; }
  .pricing-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 24px;
  }

  /* Footer — Inline row */
  .footer {
    padding: 32px 48px 40px;
    display: flex; justify-content: space-between; align-items: center;
    text-align: left;
    gap: 24px;
  }
  .footer-wordmark { margin-bottom: 0; }
  .footer-locale { display: block; }

  /* ---------- LIBRARY ---------- */
  .lib-page { display: flex; min-height: 100vh; }
  .lib-sidebar {
    display: flex; flex-direction: column;
    width: 260px; flex-shrink: 0;
    background: var(--cream-deep);
    border-right: 1px solid var(--border);
    position: sticky; top: 0; height: 100vh;
    overflow: hidden;
  }
  .lib-sidebar-top {
    padding: 28px 24px 20px;
    border-bottom: 1px solid var(--border);
  }
  .lib-sidebar-account {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
  }
  .lib-sidebar-filter {
    padding: 20px 20px 0;
    flex: 1;
    overflow-y: auto;
  }
  .lib-sidebar-cta {
    padding: 16px 20px 24px;
    border-top: 1px solid var(--border);
  }
  .lib-main {
    flex: 1;
    overflow-y: auto;
    padding: 48px 48px 64px;
  }
  /* Hide mobile-only header and filter-chips */
  .lib-main > .lib-header { display: none; }
  .lib-main > .filter-chips { display: none; }
  .lib-greeting { padding: 0; margin-bottom: 36px; }
  .lib-greet-h1 { font-size: 48px; }
  .lib-grid {
    padding: 0;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
  }
  .story-tile .banner { height: 100px; }
  .story-tile .title { font-size: 14px; }
  .empty-state {
    max-width: 480px;
    margin: 0;
    padding: 36px 32px;
  }

  /* ---------- NEW STORY ---------- */
  /* Layout: 2-col deck + sidepanel. The form IS the grid. */
  .ns-page {
    min-height: 100vh;
  }
  .ns-page > .mini-header {
    padding: 0 48px;
    height: 64px;
  }
  .ns-form {
    display: grid;
    grid-template-columns: 1fr 380px;
    max-width: 1100px;
    margin: 0 auto; width: 100%;
    padding: 48px 48px 64px;
    gap: 64px;
    align-items: start;
  }
  .ns-deck {
    display: flex; flex-direction: column; align-items: center;
  }
  .ns-deck > .ns-heading {
    padding: 0; text-align: left;
    align-self: flex-start;
    margin-bottom: 16px;
  }
  .ns-deck > .ns-heading > div:first-child {
    justify-content: flex-start !important;
  }
  .ns-h1 { font-size: 40px; line-height: 1.15; }
  .ns-sub { text-align: left; margin-bottom: 24px; }
  .ns-deck > .swipe-stage { margin-top: 8px; }
  .ns-deck > .dots { margin-top: 8px; padding: 8px 0 0; }

  /* Sidepanel — visible, sticky */
  .ns-sidepanel {
    display: flex !important; flex-direction: column; gap: 20px;
    background: var(--cream-deep);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 24px;
    position: sticky; top: 88px;
  }
  .ns-sidepanel-eyebrow {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--mono);
    font-size: 11px; font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.15em;
    color: var(--terracotta); line-height: 1;
  }
  .ns-sidepanel-eyebrow::before {
    content: ""; display: inline-block;
    width: 24px; height: 1px; background: var(--terracotta);
    flex-shrink: 0;
  }
  /* Accordion-Toggle auf Desktop ausblenden; Panel immer offen */
  .ns-sidepanel > .accordion-toggle { display: none; }
  .ns-sidepanel > .accordion-panel {
    display: flex !important;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    gap: 14px;
  }
  .ns-cta {
    padding: 0;
    margin-top: 4px;
  }

  /* Override mobile order on desktop — grid children ignore order, but
     explicit reset keeps things predictable */
  .ns-page .ns-heading,
  .ns-page .swipe-stage,
  .ns-page .dots,
  .ns-page .ns-cta,
  .ns-page .accordion-toggle,
  .ns-page .accordion-panel {
    order: initial;
    margin: 0;
  }
  .ns-page .accordion-panel { display: flex; }

  /* ---------- GENERATING ---------- */
  .gen-stage { height: 460px; width: 340px; margin: 0 auto; }
  .gen-card { width: 280px; height: 420px; }
  .gen-card .hero { height: 220px; }
  .gen-message { font-size: 20px; min-height: 28px; }

  /* ---------- STORY ---------- */
  .story-canvas {
    max-width: 680px;
    padding: 56px 32px 96px;
  }
  .story-title { font-size: 52px; line-height: 0.98; }
  .story-byline { font-size: 16px; margin: 20px 0 36px; }
  .story-body { font-size: 20px; line-height: 1.7; }
  .story-body p { margin: 0 0 22px; }
  .story-body p.first-paragraph::first-letter {
    font-size: 72px; line-height: 0.82;
    padding: 6px 12px 0 0;
  }
  .story-divider { font-size: 16px; margin-top: 40px; }
  .story-meta {
    padding: 18px 20px;
    margin-top: 48px;
  }
  /* Actions + Meta side-by-side */
  .story-canvas {
    /* keep column layout, but give meta/actions a grid wrapper below */
  }
  .story-actions {
    margin-top: 0;
    flex-direction: column;
    gap: 8px;
  }
}

/* ========== LEGAL PAGES ========== */
.legal-canvas {
  max-width: 720px;
}
.legal-canvas h2 {
  font-family: var(--serif);
  font-variation-settings: "opsz" 30, "wght" 600, "SOFT" 60;
  font-size: 22px; line-height: 1.2;
  color: var(--ink);
  margin: 40px 0 12px;
  letter-spacing: -0.015em;
}
.legal-canvas h3 {
  font-family: var(--serif);
  font-variation-settings: "opsz" 24, "wght" 600;
  font-size: 17px; line-height: 1.3;
  color: var(--ink);
  margin: 24px 0 8px;
}
.legal-canvas p,
.legal-canvas li {
  font-family: var(--serif);
  font-variation-settings: "opsz" 16, "wght" 400;
  font-size: 16px; line-height: 1.6;
  color: var(--ink-soft);
}
.legal-canvas p { margin: 0 0 14px; }
.legal-canvas ul,
.legal-canvas ol {
  padding-left: 22px;
  margin: 10px 0 14px;
}
.legal-canvas li { margin-bottom: 6px; }
.legal-canvas strong { color: var(--ink); font-weight: 600; }
.legal-canvas a { color: var(--terracotta); }
.legal-canvas a:hover { color: var(--terracotta-dark); }

.legal-updated {
  font-family: var(--mono);
  font-size: 11px; color: var(--ink-whisper);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin: 0 0 32px;
}

.legal-box {
  background: var(--cream-deep);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 22px;
  margin: 12px 0 18px;
  font-family: var(--serif);
  font-size: 15px; line-height: 1.5;
  color: var(--ink);
}
.legal-box strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--serif);
  font-variation-settings: "opsz" 24, "wght" 600;
  font-size: 16px;
  color: var(--ink);
}

.legal-toc {
  background: var(--cream-deep);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 0 0 40px;
}
.legal-toc-title {
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--terracotta);
  margin-bottom: 12px;
}
.legal-toc ol {
  margin: 0; padding-left: 20px;
  font-family: var(--sans);
  font-size: 14px;
}
.legal-toc li { margin-bottom: 4px; }
.legal-toc a {
  color: var(--ink-soft);
  text-decoration: none;
}
.legal-toc a:hover { color: var(--terracotta); }

/* Pricing-Fineprint */
.pricing-fineprint {
  margin-top: 18px;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.5;
  color: rgba(250, 246, 237, 0.55);
  position: relative;
  text-align: center;
}
.pricing-fineprint a { color: var(--terracotta); text-decoration: underline; }
.pricing-fineprint a:hover { color: var(--terracotta-pale); }

/* Demo-Card Intro (ersetzt Mono-Caps-Kicker) */
.demo-intro {
  font-family: var(--serif);
  font-variation-settings: 'opsz' 24, 'wght' 400, 'SOFT' 80;
  font-size: 17px;
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 18px;
}
.demo-intro em {
  font-style: italic;
  color: var(--terracotta);
  font-variation-settings: 'opsz' 24, 'wght' 400;
}

/* ========== DEMO FLOW ========== */

/* Pendel-Overlay (Vollbild) */
.pendel-overlay {
  position: fixed; inset: 0;
  background: var(--cream);
  z-index: 9999;
  display: none;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.pendel-overlay.open { display: flex; align-items: center; justify-content: center; }
.pendel-overlay-inner {
  width: 100%;
  max-width: 420px;
  padding: 48px 24px 24px;
}

/* Demo-Reader: schmaler Nav, nur Wordmark, kein Back-Link */
.demo-nav {
  padding: 18px 24px 8px;
  display: flex;
  align-items: center;
}

/* Demo-CTA-Block unter der Reader-Story */
.demo-cta {
  margin-top: 80px;
  text-align: center;
}
.demo-cta-ornament {
  margin: 0 auto 28px;
  max-width: 120px;
}
.demo-cta-eyebrow {
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--terracotta);
  margin-bottom: 20px;
}
.demo-cta-body {
  font-family: var(--serif);
  font-variation-settings: "opsz" 18, "wght" 400, "SOFT" 50;
  font-size: 18px; line-height: 1.55;
  color: var(--ink);
  margin: 0 auto 16px;
  max-width: 460px;
}
.demo-cta-btn {
  margin-top: 20px;
  min-height: 60px;
  padding: 14px 32px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1.1;
}
.demo-cta-btn-main {
  font-family: var(--sans);
  font-size: 16px; font-weight: 500;
}
.demo-cta-btn-sub {
  font-family: var(--mono);
  font-size: 12px; font-weight: 400;
  color: rgba(250, 246, 237, 0.75);
  letter-spacing: 0.05em;
}
.demo-cta-foot {
  margin-top: 16px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-whisper);
}

/* Desktop-Feinschliff */
@media (min-width: 768px) {
  .pendel-overlay-inner { max-width: 460px; }
  .demo-nav { padding: 28px 48px 8px; }
  .demo-cta { margin-top: 96px; }
  .demo-cta-body { font-size: 19px; }
  .demo-cta-btn { min-height: 64px; padding: 16px 40px; }
  .demo-cta-btn-main { font-size: 17px; }
}

/* ──────────────────────────────────────────────────────────
   Share-Modal + Sammlungen
   ────────────────────────────────────────────────────────── */
.fab-modal {
  position: fixed; inset: 0; z-index: 10000;
  display: none; align-items: center; justify-content: center;
  padding: 16px;
}
.fab-modal.open { display: flex; }
.fab-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(28, 25, 23, 0.46);
}
.fab-modal-card {
  position: relative; z-index: 1;
  background: var(--cream);
  border-radius: 18px;
  box-shadow: var(--shadow-lift);
  padding: 28px 24px;
  width: 100%; max-width: 460px;
  max-height: 90vh; overflow-y: auto;
}
.fab-modal-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; cursor: pointer;
  font-size: 24px; line-height: 1; color: var(--ink);
  opacity: 0.6;
}
.fab-modal-close:hover { opacity: 1; }
.fab-modal-title {
  font-family: var(--serif); font-variation-settings: 'opsz' 24, 'wght' 500;
  font-size: 22px; color: var(--ink); margin: 0 0 6px;
}
.fab-modal-sub {
  font-family: var(--serif); font-weight: 300; font-size: 14px;
  color: var(--ink); opacity: 0.7; margin: 0 0 18px;
}

.share-url-row {
  display: flex; gap: 8px; margin-bottom: 12px;
}
.share-url-input {
  flex: 1; min-width: 0;
  padding: 12px 14px;
  font-family: var(--mono); font-size: 13px;
  color: var(--ink);
  background: var(--cream-deep);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
}
.share-url-input:focus { border-color: var(--terracotta); }
.share-copy-btn { white-space: nowrap; padding: 12px 16px; }
.share-reset-btn {
  display: block; width: 100%;
  background: none; border: none; padding: 10px;
  font-family: var(--sans); font-size: 13px;
  color: var(--ink); opacity: 0.6;
  cursor: pointer; text-align: center;
}
.share-reset-btn:hover { opacity: 1; text-decoration: underline; }

.share-toast {
  position: absolute; bottom: 18px; left: 50%;
  transform: translateX(-50%);
  background: var(--ink); color: var(--cream);
  padding: 8px 16px; border-radius: 999px;
  font-family: var(--sans); font-size: 13px;
  opacity: 0; pointer-events: none;
  transition: opacity 180ms ease;
}
.share-toast.visible { opacity: 1; }

/* Add-to-Collection-Liste */
.coll-list {
  display: flex; flex-direction: column; gap: 2px;
  margin-bottom: 16px;
  max-height: 240px; overflow-y: auto;
}
.coll-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 10px; cursor: pointer;
  font-family: var(--serif); font-size: 15px; color: var(--ink);
}
.coll-item:hover { background: var(--cream-deep); }
.coll-item input[type="checkbox"] { cursor: pointer; }
.coll-new {
  display: flex; gap: 8px; margin-top: 8px;
}
.coll-new .share-url-input { font-family: var(--serif); font-size: 14px; }

/* Sidebar Collections (Desktop) */
.lib-sidebar-collections {
  padding: 18px 20px 0;
  border-top: 1px solid var(--border);
  margin-top: 12px;
}
.sidebar-collections-list {
  display: flex; flex-direction: column; gap: 2px;
  margin-bottom: 8px;
}
.sidebar-collection-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; border-radius: 8px;
  font-family: var(--serif); font-size: 14px; color: var(--ink);
  text-decoration: none;
}
.sidebar-collection-item:hover { background: var(--cream-deep); }
.sidebar-collection-item .count {
  font-family: var(--mono); font-size: 12px; opacity: 0.5;
}
.sidebar-collection-new {
  background: none; border: none; cursor: pointer;
  padding: 8px 10px; width: 100%; text-align: left;
  font-family: var(--serif); font-size: 14px; color: var(--ink);
  opacity: 0.7;
}
.sidebar-collection-new:hover { opacity: 1; }

/* Shared-CTA (unter public views) */
.shared-cta {
  margin-top: 56px; text-align: center;
  padding: 28px 16px;
  border-top: 1px solid var(--border);
}
.shared-cta-ornament {
  margin-bottom: 18px; opacity: 0.6;
}
.shared-cta-body {
  font-family: var(--serif); font-weight: 300; font-size: 16px;
  color: var(--ink); opacity: 0.8; margin: 0 0 18px;
}
.shared-cta-btn {
  display: inline-block; padding: 14px 28px;
  text-decoration: none;
}
.shared-cta-btn-main {
  font-family: var(--sans); font-size: 15px; font-weight: 500;
}

.public-collection-grid {
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) {
  .public-collection-grid { grid-template-columns: repeat(3, 1fr); }
  .shared-cta { margin-top: 72px; padding: 36px 16px; }
}

/* ──────────────────────────────────────────────────────────
   Cookie-Consent-Banner
   ────────────────────────────────────────────────────────── */
#consent-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 9500;
  background: var(--cream);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 32px rgba(28, 25, 23, 0.08);
  padding: 16px 20px 18px;
  transform: translateY(110%);
  transition: transform 280ms ease;
  pointer-events: none;
}
#consent-banner.open {
  transform: translateY(0);
  pointer-events: auto;
}
.consent-inner {
  max-width: 980px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 14px;
  align-items: flex-start;
}
.consent-text {
  font-family: var(--serif); font-weight: 300;
  font-size: 14px; line-height: 1.55;
  color: var(--ink); margin: 0;
}
.consent-text a { color: var(--ink); text-decoration: underline; opacity: 0.75; }
.consent-actions {
  display: flex; gap: 10px; flex-wrap: wrap; width: 100%;
}
.consent-btn { flex: 1; min-width: 140px; }
@media (min-width: 768px) {
  #consent-banner { padding: 18px 28px; }
  .consent-inner { flex-direction: row; gap: 24px; align-items: center; justify-content: space-between; }
  .consent-text { flex: 1; font-size: 15px; }
  .consent-actions { flex: 0 0 auto; width: auto; }
  .consent-btn { flex: 0 0 auto; min-width: 0; padding-left: 20px; padding-right: 20px; }
}
