/* ═══════════════════════════════════════════════════════════════════════════
   MythicBrand™ Oracle — Design System
   Phase 1: Tokens, fonts, globals, core components
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Fonts ──────────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Silver Editorial';
  src: url('/fonts/TheSilverEditorial-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Silver Editorial';
  src: url('/fonts/TheSilverEditorial-Italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Futura Cyrillic';
  src: url('/fonts/FuturaCyrillicBook.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Futura Cyrillic';
  src: url('/fonts/FuturaCyrillicMedium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Futura Cyrillic';
  src: url('/fonts/FuturaCyrillicDemi.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Futura Cyrillic';
  src: url('/fonts/FuturaCyrillicBold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ─── Design tokens ──────────────────────────────────────────────────────── */
:root {
  color-scheme: dark;
  /* ─── Canonical palette ────────────────────────────────────────────────── */
  --void:           #000000;  /* primary canvas */
  --ink:            #0B0A0A;  /* deep surface variant */
  --obsidian:       #1F1B1B;  /* input fills, card backgrounds */
  --smoke:          #5D5349;  /* ALL placeholder text */
  --ash:            #545150;  /* secondary borders, dividers */
  --highlight:      #E0F251;  /* chartreuse — CTAs, eyebrows, em, active */
  --tan:            #F7D1AC;  /* warm peach soft accent */
  --heading-silver: #E1E1DF;  /* typed display values, some headlines */
  --copy-grey:      #A3A39E;  /* body copy, descriptive secondary text */
  --gold:           #C9A96D;  /* eyebrow underlines, card borders, lines */

  /* ─── Semantic aliases (map to canonical palette) ─────────────────────── */
  --bg:             var(--void);
  --surface:        var(--obsidian);
  --accent:         var(--highlight);
  --accent-soft:    rgba(224, 242, 81, 0.12);
  --accent-dim:     rgba(224, 242, 81, 0.35);
  --accent-warm:    var(--tan);
  --gold-light:     #E0C48A;
  --gold-dim:       rgba(201, 169, 109, 0.3);
  --gold-glow:      rgba(201, 169, 109, 0.12);

  /* Color — text */
  --text:           #FFFFFF;
  --text-muted:     rgba(255, 255, 255, 0.6);
  --text-dim:       rgba(255, 255, 255, 0.35);

  /* Placeholders all use smoke; typed display values use heading-silver */
  --text-placeholder-form:    var(--smoke);
  --text-placeholder-display: var(--smoke);
  --text-value-display:       var(--heading-silver);

  /* Color — semantic */
  --bg-elev-1:      rgba(255, 255, 255, 0.02);
  --bg-elev-2:      rgba(255, 255, 255, 0.04);
  --border:         rgba(201, 169, 109, 0.3);
  --border-soft:    rgba(201, 169, 109, 0.15);
  --border-strong:  rgba(201, 169, 109, 0.55);
  --error:          #E88B8B;

  /* Typography */
  --font-display:   'Silver Editorial', 'Cormorant Garamond', Georgia, serif;
  --font-body:      'Futura Cyrillic', 'Futura', 'Helvetica Neue', Arial, sans-serif;

  /* Spacing scale (4px base) */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.5rem;
  --space-6:  2rem;
  --space-7:  3rem;
  --space-8:  4rem;

  /* Radii */
  --radius-sm:    4px;
  --radius-md:    10px;
  --radius-lg:    14px;
  --radius-pill:  999px;

  /* Motion */
  --ease:           cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:       cubic-bezier(0.16, 1, 0.3, 1);
  --transition:     0.35s var(--ease);
  --transition-fast: 0.18s var(--ease);
  --transition-slow: 0.6s var(--ease);

  /* Glows */
  --glow-accent:        0 0 24px rgba(224, 242, 81, 0.28);
  --glow-accent-strong: 0 0 32px rgba(224, 242, 81, 0.5), 0 0 4px rgba(224, 242, 81, 0.85);
  --glow-gold:          0 0 18px rgba(201, 169, 109, 0.18);
}

/* ─── Wide-gamut (P3) color correction ───────────────────────────────────────
   On iPhone Safari (P3 displays), sRGB hex chartreuse #E0F251 perceptually
   shifts toward yellow because the green primary on P3 is significantly more
   saturated than sRGB. We push the green channel up + red down to land back on
   chartreuse instead of yellow on wide-gamut screens.
   Gold (#C9A96D) similarly warms toward orange — we cool it slightly.
   sRGB displays are unaffected (the @media query won't match). */
@media (color-gamut: p3) {
  :root {
    --highlight: color(display-p3 0.83 0.95 0.30);  /* chartreuse, less yellow */
    --gold:      color(display-p3 0.78 0.665 0.43); /* gold, less orange */
    --accent:    color(display-p3 0.83 0.95 0.30);
  }
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button { background: none; border: none; cursor: pointer; }

a { color: inherit; text-decoration: none; }

img, svg { display: block; max-width: 100%; }

::selection { background: var(--accent); color: var(--bg); }

/* ─── Ambient background ─────────────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(201, 169, 109, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 100% 100%, rgba(224, 242, 81, 0.025) 0%, transparent 55%),
    radial-gradient(ellipse 40% 40% at 0% 80%, rgba(201, 169, 109, 0.025) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Subtle noise / star texture (procedural, no image needed) */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.4), transparent 50%),
    radial-gradient(1px 1px at 80% 10%, rgba(255,255,255,0.25), transparent 50%),
    radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,0.3), transparent 50%),
    radial-gradient(1px 1px at 65% 60%, rgba(201, 169, 109,0.35), transparent 50%),
    radial-gradient(1px 1px at 15% 90%, rgba(255,255,255,0.2), transparent 50%),
    radial-gradient(1px 1px at 90% 75%, rgba(255,255,255,0.25), transparent 50%);
  background-size: 600px 600px;
  background-repeat: repeat;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.stars { display: none; } /* legacy — replaced by body::after */

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.app {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step {
  display: none;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-5);
  flex: 1;
}
.step.active {
  display: flex;
  flex-direction: column;
  animation: fadeUp 0.5s var(--ease-out);
}

/* ─── Typography ─────────────────────────────────────────────────────────── */
.display-title,
.display-heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.005em;
  line-height: 1.08;
  color: var(--text);
  font-size: clamp(2rem, 6.5vw, 3rem);
}

.display-title em,
.display-heading em,
.display-italic {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

/* Use .brand span on a full-line accented italic word (e.g., "Blueprint") */
.display-title .brand,
.display-heading .brand {
  display: block;
  font-style: italic;
  color: var(--text);
}

.section-heading,
.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 4.5vw, 2.25rem);
  letter-spacing: 0.005em;
  line-height: 1.15;
  color: var(--text);
}
.section-heading em,
.section-title em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.nowrap-phrase {
  white-space: nowrap;
}

/* Eyebrow label (e.g., "STEP 01 — IDENTITY")
   Label text = acid green (current/active), underline = gold. */
.eyebrow,
.step-label {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
  position: relative;
  padding-bottom: var(--space-3);
}
.eyebrow::after,
.step-label::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 44px;
  height: 1px;
  background: var(--gold);
  opacity: 0.55;
}

.subtitle {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 52ch;
  margin-top: var(--space-4);
}

.body-text {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.caption {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.divider {
  width: 48px;
  height: 1px;
  background: var(--gold);
  opacity: 0.55;
  margin: var(--space-4) 0;
}
.divider-center { margin-left: auto; margin-right: auto; }

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 2rem;
  min-height: 48px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
              box-shadow var(--transition), transform var(--transition-fast),
              border-color var(--transition);
  text-decoration: none;
  box-shadow: var(--glow-accent);
  user-select: none;
  white-space: nowrap;
}

.btn:hover:not(:disabled),
.btn:focus-visible:not(:disabled) {
  background: var(--accent);
  color: var(--bg);
  box-shadow: var(--glow-accent-strong);
  outline: none;
}
.btn:active:not(:disabled) { transform: translateY(1px); }

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Primary = accent outline w/ glow (the default above).
   Kept as alias for backward compat. */
.btn-primary { /* same as .btn */ }

.btn-outline {
  border-color: var(--border-strong);
  color: var(--text);
  box-shadow: none;
}
.btn-outline:hover:not(:disabled),
.btn-outline:focus-visible:not(:disabled) {
  background: var(--gold-glow);
  color: var(--text);
  border-color: var(--gold);
  box-shadow: var(--glow-gold);
}

.btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--text-muted);
  box-shadow: none;
  font-size: 0.72rem;
  padding: 0.7rem 1rem;
  min-height: auto;
  letter-spacing: 0.18em;
}
.btn-ghost:hover:not(:disabled),
.btn-ghost:focus-visible:not(:disabled) {
  color: var(--text);
  background: transparent;
  box-shadow: none;
}

.btn-full { width: 100%; }

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ─── Forms ──────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: var(--space-5); }

.form-label {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: var(--space-3);
}
/* Underline is reserved for step eyebrows, not field labels. */

.form-input,
.form-textarea {
  width: 100%;
  background: #1A1A1A;
  border: none;
  border-radius: 6px;
  padding: 20px 24px;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  transition: background var(--transition),
              border-color var(--transition),
              box-shadow var(--transition);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.form-input:focus,
.form-textarea:focus {
  background: #1F1F1F;
  border-bottom: 1px solid var(--accent);
  box-shadow: 0 1px 0 0 rgba(224, 242, 81, 0.25);
}
.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-placeholder-form);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-body);
  font-weight: 500;
}
.form-textarea {
  background: var(--obsidian);
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
  color: #FFFFFF;
  font-family: var(--font-body);
  font-weight: 400;
}
/* Textarea placeholders stay in smoke, but render as sentence-case italic
   (unlike inputs which shout in uppercase) — multi-line boxes feel calmer. */
.form-textarea::placeholder {
  color: var(--smoke);
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-style: italic;
  font-size: 1rem;
  line-height: 1.6;
}

.form-hint {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: var(--space-2);
  line-height: 1.5;
}

/* Custom checkbox ("I don't know my exact birth time" + future uses) */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  margin-top: var(--space-4);
  cursor: pointer;
  user-select: none;
}
.checkbox-native {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
  pointer-events: none;
}
.checkbox-box {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 1.5px solid var(--gold);
  border-radius: 3px;
  background: #1A1A1A;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 180ms var(--ease-out), border-color 180ms var(--ease-out);
}
.checkbox-box .check-mark {
  width: 12px;
  height: 12px;
  color: #000;
  opacity: 0;
  transition: opacity 120ms var(--ease-out);
}
.checkbox-native:checked + .checkbox-box {
  background: var(--accent);
  border-color: var(--accent);
}
.checkbox-native:checked + .checkbox-box .check-mark {
  opacity: 1;
}
.checkbox-native:focus-visible + .checkbox-box {
  box-shadow: 0 0 0 3px rgba(224, 242, 81, 0.25);
}
.checkbox-text { line-height: 1.3; }
.time-unknown-hint { margin-top: var(--space-2); }

/* ─── Cards & containers ─────────────────────────────────────────────────── */
.card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

/* ─── City autocomplete dropdown ─────────────────────────────────────────── */
.city-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #0a0a0a;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  z-index: 50;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}
.city-dropdown.hidden { display: none; }
.city-option {
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 1px solid var(--border-soft);
  transition: background var(--transition-fast), color var(--transition-fast);
  line-height: 1.4;
}
.city-option:last-child { border-bottom: none; }
.city-option:hover,
.city-option.focused {
  background: var(--gold-glow);
  color: var(--text);
}
.city-option .city-name { color: var(--text); font-size: 0.92rem; }
.city-option .city-tz {
  font-size: 0.72rem;
  color: var(--gold);
  margin-top: 0.15rem;
  letter-spacing: 0.05em;
}

.location-confirmed {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--gold);
  margin-top: var(--space-3);
  padding: 0.5rem 0.85rem;
  background: var(--gold-glow);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.location-confirmed.hidden { display: none; }
.loc-check { font-size: 0.9rem; }

/* ─── Progress bar (top of step) ─────────────────────────────────────────── */
.progress-bar {
  width: 100%;
  max-width: 640px;
  padding: var(--space-5) var(--space-5) 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  z-index: 2;
  position: relative;
}
.progress-bar.hidden { display: none; }

.progress-step {
  flex: 1;
  height: 1px;
  background: var(--border-soft);
  border-radius: 1px;
  position: relative;
  transition: background var(--transition);
}
.progress-step.done { background: var(--gold); }
.progress-step.active {
  background: var(--border-soft);
}
/* The acid-green dot marks the active position */
.progress-step.active::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  box-shadow: var(--glow-accent-strong);
}

/* Section progress (inline in reading view, e.g. "08 / 13") */
.section-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--gold);
  text-transform: uppercase;
}
.section-progress-track {
  flex: 1;
  height: 1px;
  background: var(--border-soft);
  margin: 0 var(--space-4);
  position: relative;
}
.section-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--gold);
  transition: width 0.5s var(--ease);
}

/* ─── Animated loader SVG ────────────────────────────────────────────────── */
.loader-wrap {
  position: relative;
  width: min(320px, 80vw);
  aspect-ratio: 1;
  margin: 0 auto;
}
.loader-wrap svg,
.loader-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Whole-loader rotation (works for <img>) */
.loader-wrap img,
.loader-wrap--spin svg {
  animation: spin-slow 36s linear infinite;
}

/* Per-group animations when SVG is inlined */
.loader-wrap svg .ring-outer { transform-origin: 180px 180px; animation: spin-slow 48s linear infinite; }
.loader-wrap svg .ring-mid   { transform-origin: 180px 180px; animation: spin-reverse 38s linear infinite; }
.loader-wrap svg .planet-1   { transform-origin: 180px 180px; animation: spin-slow 22s linear infinite; }
.loader-wrap svg .planet-2   { transform-origin: 180px 180px; animation: spin-reverse 14s linear infinite; }
.loader-wrap svg .pulse-ring   { transform-origin: 180px 180px; animation: pulse-out 3.6s var(--ease-out) infinite; }
.loader-wrap svg .pulse-ring-2 { transform-origin: 180px 180px; animation: pulse-out 3.6s var(--ease-out) 1.8s infinite; }
.loader-wrap svg .center     { transform-origin: 180px 180px; animation: breathe 4s var(--ease) infinite; }

/* Slower, dimmer variant used behind share graphic */
.loader-wrap--ambient svg,
.loader-wrap--ambient img {
  opacity: 0.4;
  animation-duration: 90s;
}
.loader-wrap--ambient svg .ring-outer   { animation-duration: 120s; }
.loader-wrap--ambient svg .ring-mid     { animation-duration: 95s; }
.loader-wrap--ambient svg .planet-1     { animation-duration: 55s; }
.loader-wrap--ambient svg .planet-2     { animation-duration: 35s; }

/* Legacy spinner kept for backward compat — replaced visually below */
.oracle-spinner {
  width: 56px;
  height: 56px;
  border: 1px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin-fast 1.2s linear infinite;
  box-shadow: var(--glow-accent);
}

.oracle-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-7) var(--space-5);
  text-align: center;
}
.oracle-loading.hidden { display: none; }

.oracle-loading-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.25rem, 3.5vw, 1.6rem);
  color: var(--text);
  letter-spacing: 0.01em;
  animation: shimmer 2.4s ease-in-out infinite;
}

/* ─── Error toast ────────────────────────────────────────────────────────── */
/* Default state hides the toast completely — visibility:hidden + opacity:0 +
   pointer-events:none so it can never bleed through other layers. The old
   transform:translateY(120%) approach left a sliver visible above the
   viewport bottom (border + padding ≈ 28px tall × 120% = 34px translation,
   not enough to clear the 24px bottom anchor) — that sliver was rendering
   as a "red dev indicator" on every screen and even peeking up inside the
   share modal because the toast's z-index:1000 sits above the modal. */
.error-toast {
  position: fixed;
  bottom: var(--space-5);
  left: 50%;
  transform: translateX(-50%) translateY(calc(100% + var(--space-6)));
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  background: #150808;
  border: 1px solid var(--error);
  color: var(--error);
  padding: 0.8rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  transition: transform 0.35s var(--ease-out),
              opacity 0.25s var(--ease-out),
              visibility 0s linear 0.35s;
  z-index: 1000;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}
.error-toast.visible {
  transform: translateX(-50%) translateY(0);
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition: transform 0.35s var(--ease-out),
              opacity 0.25s var(--ease-out),
              visibility 0s;
}

/* ─── Motion ─────────────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes spin-slow {
  to { transform: rotate(360deg); }
}
@keyframes spin-reverse {
  to { transform: rotate(-360deg); }
}
@keyframes spin-fast {
  to { transform: rotate(360deg); }
}
@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%       { opacity: 1;   transform: scale(1.05); }
}
@keyframes pulse-out {
  0%   { transform: scale(0.6); opacity: 0.9; }
  80%  { transform: scale(3.4); opacity: 0; }
  100% { transform: scale(3.4); opacity: 0; }
}
@keyframes breathe {
  0%, 100% { opacity: 0.8; }
  50%       { opacity: 1; }
}
@keyframes shimmer {
  0%, 100% { opacity: 0.7; }
  50%       { opacity: 1; }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 24px rgba(224, 242, 81, 0.28); }
  50%       { box-shadow: 0 0 36px rgba(224, 242, 81, 0.5); }
}

/* ─── Accessibility ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Visually hidden but readable by assistive tech */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Utility helpers ────────────────────────────────────────────────────── */
.text-accent  { color: var(--accent); }
.text-gold    { color: var(--gold); }
.text-muted   { color: var(--text-muted); }
.text-dim     { color: var(--text-dim); }
.text-center  { text-align: center; }
.hidden       { display: none !important; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.stack-sm     { display: flex; flex-direction: column; gap: var(--space-2); }
.stack-md     { display: flex; flex-direction: column; gap: var(--space-4); }
.stack-lg     { display: flex; flex-direction: column; gap: var(--space-5); }

/* ═══════════════════════════════════════════════════════════════════════════
   Legacy component shims — kept during redesign so existing markup still
   renders while Phase 2+ restructures. Can be trimmed once HTML is updated.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Home screens (Step 1 install + Step 2 begin) ───────────────────────
   Fingerprint background applies ONLY to the home section.
   Subsequent .step sections keep pure black + ambient starfield. */
.home-screen {
  position: relative;
  min-height: 100dvh;
  max-width: 100%;
  padding: var(--space-7) var(--space-5);
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
}

.home-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)),
    url('/assets/fingerprint-bg.jpg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: var(--bg);
  z-index: 0;
  pointer-events: none;
}

.home-view {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.home-view.active {
  display: flex;
  animation: fadeUp 0.6s var(--ease-out);
}

.logo-lockup {
  width: 88%;
  max-width: 340px;
  height: auto;
  margin: 0 auto var(--space-3);
  filter: drop-shadow(0 0 24px rgba(0, 0, 0, 0.5));
}
@media (min-width: 768px) {
  .logo-lockup { max-width: 420px; }
}

.home-tagline {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;              /* 16px */
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #E1E1DF;
  margin: 0;
  line-height: 1.55;
}

.home-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  animation: fadeIn 0.6s var(--ease-out);
}
.home-success .eyebrow--plain {
  margin: 0;
  padding: 0;
  color: var(--gold);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.home-success .eyebrow--plain::after { display: none; }
.home-success .divider { margin: 0; }

.home-quote {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  line-height: 1.35;
  color: var(--text);
  letter-spacing: 0.005em;
  margin: var(--space-2) 0;
  max-width: 18ch;
}
.home-quote em {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05em;
  letter-spacing: 0.04em;
  color: #F7D1AC;
}

.home-cta {
  margin-top: var(--space-3);
  width: 100%;
}

.home-skip {
  margin-top: var(--space-3);
  opacity: 0.6;
  font-size: 0.68rem;
}

/* ─── PWA install — iOS variant (Add to Home Screen instructions) ──────── */
.install-ios {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-4);
  width: 100%;
  max-width: 360px;
  margin: var(--space-4) 0 0;
  text-align: center;
}
.install-ios[hidden] { display: none; }

.install-ios__heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 5vw, 1.875rem);
  line-height: 1.2;
  letter-spacing: 0.005em;
  color: var(--heading-silver);
  margin: 0;
}
.install-ios__heading em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--heading-silver);
}

.install-ios__sub {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--copy-grey);
  margin: 0;
  max-width: 32ch;
  align-self: center;
}

.install-ios__steps {
  list-style: none;
  padding: 0;
  margin: var(--space-2) 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.install-ios__step {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  text-align: left;
}

.install-ios__num {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  width: 1.25rem;
  text-align: center;
}

.install-ios__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--highlight);
  flex-shrink: 0;
}
.install-ios__icon svg { width: 22px; height: 22px; }

.install-ios__text {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text);
}
.install-ios__text strong {
  font-weight: 600;
  color: var(--heading-silver);
}

/* ─── PWA install — Android variant wrapper ────────────────────────────── */
.install-android {
  width: 100%;
}
.install-android[hidden] { display: none; }

/* ─── "Continue without installing →" — quiet chartreuse text link ─────── */
.install-skip {
  margin-top: var(--space-3);
  background: none;
  border: 0;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--highlight);
  cursor: pointer;
  align-self: center;
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
}
.install-skip:hover,
.install-skip:focus-visible {
  opacity: 0.78;
  outline: none;
  transform: translateX(2px);
}

.btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent);
  transition: color var(--transition);
}
.btn:hover .btn-icon,
.btn:focus-visible .btn-icon { color: var(--bg); }

/* Legacy tagline/description/symbol — retained empty so stale markup collapses */
.welcome-symbol,
.welcome-description { display: none; }
.welcome-tagline {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Chart summary blocks (legacy, to be restyled in Phase 4) */
.chart-summary { display: flex; flex-direction: column; gap: var(--space-4); margin-bottom: var(--space-5); }
.summary-block {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.summary-block-title {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-soft);
}
.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.5rem;
}
.summary-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.88rem;
  line-height: 1.5;
}
.summary-key {
  color: var(--text-dim);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  min-width: 76px;
}
.summary-val { color: var(--text); }
.summary-val.gold { color: var(--gold); }
.summary-full-row { grid-column: 1 / -1; }

.hd-tag {
  display: inline-block;
  background: var(--gold-glow);
  border: 1px solid var(--border);
  color: var(--gold);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  margin: 0.15rem 0.15rem 0 0;
}

.confirm-area {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

/* ═══════════════════════════════════════════════════════════════════════════
   READING VIEW — Phase 5b
   "A Reading For X" eyebrow → chartreuse progress row → breathing room →
   section eyebrow + title → markdown-rendered body → back/continue.
   Sticky share bar at bottom of viewport.
   ═══════════════════════════════════════════════════════════════════════════ */

#step-reading.reading-step {
  max-width: 720px;
  padding-top: clamp(1.5rem, 3.5vh, 2rem);
  padding-bottom: clamp(6rem, 12vh, 8rem); /* leave room above share bar */
}

/* "A Reading For [Name]" — quiet gold eyebrow at top */
.reading-eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.6;
  text-align: center;
  margin: 0 0 clamp(1.25rem, 3vh, 2rem);
}
.reading-eyebrow #reading-client-name:empty::before { content: ''; }

/* Progress row — chartreuse numbers + chartreuse fill + ash 30% track */
.reading-progress {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 clamp(3rem, 7vh, 4rem); /* 48-64px breathing space below */
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  color: var(--highlight);
}
.reading-progress-num {
  color: var(--highlight);
  font-variant-numeric: tabular-nums;
  min-width: 1.6ch;
  text-align: center;
}
.reading-progress-sep {
  color: var(--highlight);
  opacity: 0.75;
}
.reading-progress-track {
  flex: 1;
  height: 1px;
  background: rgba(84, 81, 80, 0.3);
  position: relative;
  margin: 0 0.4rem;
  overflow: hidden;
}
.reading-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--highlight);
  box-shadow: 0 0 8px rgba(224, 242, 81, 0.35);
  transition: width 0.5s var(--ease-out);
}
.reading-progress-sparkle {
  color: var(--highlight);
  font-size: 0.95rem;
  line-height: 1;
}

/* Reading card — no borders, no box. The page is the card now. */
.reading-card {
  position: relative;
  animation: fadeUp 0.4s var(--ease-out);
}
.reading-card.is-fading-out { animation: sectionFadeOut 300ms ease-out forwards; }
.reading-card.is-fading-in  { animation: sectionFadeIn  400ms ease-out forwards; }
@keyframes sectionFadeOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-8px); }
}
@keyframes sectionFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Previous-section link — bottom of reading view, sits BELOW Continue
   inside .continue-area. Phase 6 polish 3: moved from top to bottom so the
   primary action (Continue) sits closer to the thumb. Centered chartreuse
   text link, hidden on sections 1 and 12. */
.reading-prev-section {
  display: inline-flex;
  align-self: center;
  align-items: center;
  gap: 0.35em;
  background: none;
  border: 0;
  padding: 0.5rem 0.75rem;
  font-family: "Futura Cyrillic", var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--highlight);
  cursor: pointer;
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
}
.reading-prev-section[hidden] { display: none; }
.reading-prev-section:hover,
.reading-prev-section:focus-visible {
  opacity: 0.78;
  outline: none;
  transform: translateX(-2px);
}

/* "← Back to chamber" — returning-reader shortcut (Phase 6 polish 2).
   Sits just below .reading-back when both are visible; stands alone when
   not. Styled like the chamber's chartreuse accents so the visual rhyme
   with the chamber interior is immediate. */
.reading-back-to-chamber {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  background: none;
  border: 0;
  padding: 0.25rem 0;
  font-family: "Futura Cyrillic", var(--font-body);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--highlight);
  cursor: pointer;
  margin-bottom: var(--space-4);
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
}
.reading-back-to-chamber[hidden] { display: none; }
.reading-back-to-chamber:hover,
.reading-back-to-chamber:focus-visible {
  opacity: 0.78;
  outline: none;
  transform: translateX(-2px);
}

/* Section header — chartreuse eyebrow + gold underline + silver editorial title */
.section-eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--highlight);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid rgba(201, 169, 110, 0.3);
}
.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: normal;
  font-size: clamp(2rem, 6vw, 3.25rem); /* 32-52px */
  line-height: 1.1;
  letter-spacing: 0.005em;
  /* Reading section title in peach (was white). Pairs with the peach em
     below so "Brand Voice & Messaging Frequency" / similar split titles
     read unified instead of two-tone chartreuse + white. */
  color: var(--tan);
  margin: 0 0 var(--space-5);
}
.section-title em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  /* Peach — chartreuse stays reserved for CTAs, italic emphasis in body
     copy, and the ORACLE wordmark. */
  color: var(--tan);
}

/* ─── Markdown body ────────────────────────────────────────────────────── */
.section-content {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--copy-grey);
  max-width: 65ch;
}
.section-content p {
  /* Mobile: explicit 16px / 1.65 — comfortable iPhone reading.
     Desktop (≥768px) bumps via clamp + slightly looser line-height below. */
  font-size: 16px;
  line-height: 1.65;
  margin: 0 0 1.2em;
}
@media (min-width: 768px) {
  .section-content p {
    font-size: clamp(1rem, 2.2vw, 1.125rem); /* 16-18px */
    line-height: 1.7;
  }
}
.section-content p:last-child { margin-bottom: 0; }

.section-content strong {
  font-family: var(--font-body);
  font-weight: 600; /* Futura Demi */
  color: var(--gold);
  font-style: normal;
}
.section-content em {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  color: inherit;
}

.section-content h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: normal;
  font-size: clamp(1.375rem, 3.5vw, 1.875rem); /* 22-30px */
  line-height: 1.25;
  color: var(--heading-silver);
  margin: 2em 0 0.5em;
}

.section-content ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2em;
}
.section-content li {
  position: relative;
  padding-left: 1.5em;
  margin-bottom: 0.6em;
  font-size: 16px;
  line-height: 1.65;
  color: var(--copy-grey);
}
@media (min-width: 768px) {
  .section-content li {
    font-size: clamp(1rem, 2.2vw, 1.125rem);
    line-height: 1.7;
  }
}
.section-content li::before {
  content: '';
  position: absolute;
  left: 0.35em;
  top: 0.7em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

/* Streaming cursor while section is mid-stream */
.section-content.streaming::after {
  content: '|';
  color: var(--highlight);
  animation: blink 0.9s step-end infinite;
  margin-left: 2px;
}

/* Continue area — primary CTA below content, with optional Previous link
   stacked below it. 16px gap between Continue and Previous (Phase 6 polish 3). */
.continue-area {
  margin-top: clamp(2rem, 5vh, 3rem);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-4);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.continue-area.visible { opacity: 1; transform: translateY(0); }
.continue-area .btn-primary { width: 100%; }

/* ─── Sticky share bar ──────────────────────────────────────────────────── */
.share-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 16px 24px;
  min-height: 60px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(201, 169, 110, 0.2);
}
.share-bar.is-visible { display: flex; }
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  background: none;
  border: 0;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--highlight);
  cursor: pointer;
  transition: opacity 180ms var(--ease-out);
}
.share-btn:hover,
.share-btn:focus-visible {
  outline: none;
  opacity: 0.8;
}
.share-icon {
  width: 18px;
  height: 18px;
  color: var(--highlight);
  flex-shrink: 0;
}

/* Complete step (legacy) */
#step-complete {
  min-height: 80vh;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: var(--space-5);
  max-width: 520px;
}
.complete-symbol {
  font-size: 3rem;
  color: var(--accent);
  animation: pulse 3s ease-in-out infinite;
  filter: drop-shadow(0 0 16px rgba(224, 242, 81, 0.4));
}
.reading-id-display {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}
.reading-id-value {
  color: var(--gold);
  font-size: 0.72rem;
  word-break: break-all;
}

.full-reading { display: none; text-align: left; width: 100%; }
.full-reading.visible { display: block; }
.full-section-card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
}
.full-section-card .section-number { font-size: 0.66rem; letter-spacing: 0.25em; }
.full-section-card .section-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--text);
  margin-bottom: var(--space-4);
  border: none;
  padding: 0;
}
.full-section-card .section-content { font-size: 0.92rem; line-height: 1.8; }

/* Legacy upload zones (kept for future use) */
.charts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); margin: var(--space-5) 0; }
.upload-zone {
  position: relative;
  aspect-ratio: 3/4;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elev-1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  cursor: pointer;
  transition: all var(--transition);
  overflow: hidden;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--gold);
  background: var(--bg-elev-2);
  box-shadow: inset 0 0 20px var(--gold-glow);
}
.upload-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.upload-icon { font-size: 1.8rem; color: var(--gold); opacity: 0.7; pointer-events: none; }
.upload-label {
  font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-muted); text-align: center; padding: 0 0.5rem; pointer-events: none; line-height: 1.5;
}
.upload-preview { position: absolute; inset: 0; object-fit: cover; opacity: 0.7; pointer-events: none; }
.upload-check {
  position: absolute; top: 6px; right: 6px; width: 20px; height: 20px;
  background: var(--accent); border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  font-size: 10px; color: var(--bg);
}
.upload-zone.has-file .upload-check { display: flex; }
.upload-zone.has-file { border-style: solid; border-color: var(--border); }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .step { padding: var(--space-5) var(--space-4); }
  .section-card { padding: var(--space-5); }
  #step-welcome { padding: var(--space-6) var(--space-5); }
  .progress-bar { padding: var(--space-4) var(--space-4) 0; }
  .btn { padding: 0.85rem 1.5rem; font-size: 0.7rem; }
}

@media (max-width: 400px) {
  .btn { padding: 0.8rem 1.25rem; letter-spacing: 0.18em; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Phase 3 — Birth Data + Chart Summary components
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Segmented input — editorial typography (YYYY·MM·DD, HH:MM) ──────────── */
.segmented-input {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  width: auto;
}
.segment {
  background: transparent;
  border: none;
  border-bottom: 1.5px solid transparent;
  border-radius: 0;
  padding: 0.12em 0 0.12em;
  color: var(--text-value-display);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.25rem, 9vw, 3.25rem);
  line-height: 1.3;
  height: auto;
  overflow: visible;
  text-align: center;
  letter-spacing: 0.01em;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  transition: border-color 200ms var(--ease-out);
}
.segment-year { width: 5ch; }
.segment-month,
.segment-day,
.segment-hour,
.segment-minute { width: 3.75ch; }

.segment::placeholder {
  color: var(--text-placeholder-display);
  text-transform: none;
  letter-spacing: 0.01em;
  font-family: var(--font-display);
  font-weight: 400;
  font-style: normal;
  opacity: 1;
  transition: opacity 150ms var(--ease-out);
}
.segment:focus {
  border-bottom-color: var(--accent);
}
.segment:focus::placeholder {
  opacity: 0;
}
.segment-sep {
  color: rgba(201, 169, 109, 0.55);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.25rem, 9vw, 3.25rem);
  line-height: 1.3;
  letter-spacing: 0;
  padding: 0 0.35rem;
  user-select: none;
}
.time-sep { padding: 0 0.35rem; }

/* ─── Time picker row (segmented time + AM/PM) ────────────────────────────── */
.time-picker-row {
  display: flex;
  align-items: center;
  gap: 24px;
}
.time-picker {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
}

/* ─── Sun/Moon AM/PM toggle ───────────────────────────────────────────────── */
.ampm-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 0;
  border: none;
  margin: 0;
  background: transparent;
}
.ampm-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--ash);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 200ms var(--ease-out);
}
.ampm-btn:hover { color: rgba(224, 242, 81, 0.65); }
.ampm-btn[aria-pressed="true"] { color: var(--highlight); }
.ampm-btn:focus-visible {
  outline: 2px solid rgba(224, 242, 81, 0.45);
  outline-offset: 4px;
  border-radius: 4px;
}
.icon-ampm { display: block; }
.icon-sun  { width: 40px; height: 40px; }
.icon-moon { width: 36px; height: 36px; }

/* Active-state animations (sun rays spin slowly; moon sparkles twinkle) */
.ampm-btn[aria-pressed="true"] .sun-rays {
  transform-origin: 12px 12px;
  animation: sun-spin 12s linear infinite;
}
.ampm-btn[aria-pressed="true"] .spark-1 {
  transform-origin: 17.5px 6.7px;
  animation: twinkle 1.8s ease-in-out infinite;
}
.ampm-btn[aria-pressed="true"] .spark-2 {
  transform-origin: 20px 11px;
  animation: twinkle 2.4s ease-in-out 0.4s infinite;
}
@keyframes sun-spin { to { transform: rotate(360deg); } }
@keyframes twinkle {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(0.5); opacity: 0.3; }
}

/* ─── Disabled state when "I don't know my exact birth time" is checked ───── */
#birthtime-group.time-disabled .time-picker .segment,
#birthtime-group.time-disabled .ampm-toggle {
  opacity: 0.3;
  pointer-events: none;
}
#birthtime-group.time-disabled .time-sep { opacity: 0.3; }

/* ─── Birth Data step — generous vertical rhythm between groups ──────────── */
/* Flex-column parent (`.step.active`) prevents margin collapse → vertical
   distances below are exact between siblings. */
#step-birthdata .subtitle { margin-bottom: 0; }
#step-birthdata .form-group { margin-bottom: 0; }
#step-birthdata #birthtime-group .checkbox-label { margin-top: 1.5rem; }  /* 24px time → checkbox */
#step-birthdata #btn-calculate { margin-top: 0; }
#step-birthdata .form-label { margin-top: 0; margin-bottom: 0.75rem; }    /* 12px label → field */

.field-divider {
  display: block;
  width: 100%;
  height: 0;
  border: none;
  border-top: 1px solid rgba(84, 81, 80, 0.3);  /* --ash at 30% */
  margin: 0;
}
#step-birthdata .field-divider { margin: 1.75rem 0; }               /* 56px between date & time, time & city */
#step-birthdata .field-divider:first-of-type { margin: 1.5rem 0; }  /* 48px subtitle → first label */
#step-birthdata .field-divider:last-of-type  { margin: 2rem 0; }    /* 64px city → CTA */

/* Sparkle glyph inside buttons renders as chartreuse accent. */
.btn-sparkle {
  color: var(--highlight);
  font-size: 1em;
  line-height: 1;
  display: inline-block;
  transition: color var(--transition);
}
.btn:hover .btn-sparkle,
.btn:focus-visible .btn-sparkle { color: var(--bg); }

/* ─── Chart Summary: new cards (Astrology + Human Design) ─────────────────── */
.chart-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(201, 169, 109, 0.3);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: var(--space-4);
}
.chart-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid rgba(201, 169, 109, 0.18);
}
.chart-card-header .sparkle {
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 0;
}
.chart-grid-astrology {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 1.25rem;
}
@media (max-width: 480px) {
  .chart-grid-astrology { grid-template-columns: 1fr; }
}
.chart-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.2rem 0;
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.5;
}
.chart-row .label {
  color: var(--ash);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  min-width: 96px;
  flex-shrink: 0;
}
/* Planet glyph — muted gold editorial mark, system-font Unicode */
.chart-row .planet-glyph {
  color: rgba(201, 169, 109, 0.6); /* --gold at 60% */
  font-family: 'Apple Symbols', 'Noto Sans Symbols', 'Segoe UI Symbol', sans-serif;
  font-weight: 400;
  margin-right: 0.45em;
  display: inline-block;
  min-width: 1em;
}
.chart-row .value { color: #FFFFFF; }

.chart-row-full {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.35rem 0;
  font-family: var(--font-body);
}
.chart-row-full .label {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.chart-row-full .value {
  font-size: 0.88rem;
  color: #FFFFFF;
  line-height: 1.55;
}

.chart-section-divider {
  height: 1px;
  background: rgba(201, 169, 109, 0.12);
  margin: var(--space-3) 0;
}

.hd-pill {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 0.28rem 0.7rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  margin: 0.25rem 0.25rem 0 0;
}
.hd-channels {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.hd-channels .sep { color: rgba(201, 169, 109, 0.45); margin: 0 0.3rem; }

/* ─── Error link (secondary action on Chart Summary) ──────────────────────── */
.error-link {
  background: transparent;
  border: none;
  padding: 0.75rem 1rem;
  margin-top: 0.75rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  cursor: pointer;
  align-self: center;
  transition: color var(--transition);
}
.error-link:hover,
.error-link:focus-visible {
  color: var(--accent);
  outline: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PHASE 4 — CALCULATING SCREEN
   Full-viewport: chartreuse italic headline (top), animated gold loader
   (center), thin gold progress bar + status (bottom), chartreuse Continue
   link revealed at 100%.
   ═══════════════════════════════════════════════════════════════════════════ */

#step-calculating.calc-screen {
  max-width: none;
  width: 100%;
  padding: 0;
  min-height: 100dvh;
  justify-content: space-between;
  align-items: center;
  gap: 0;
  position: relative;
}
#step-calculating.calc-screen.active {
  animation: none;
}

/* Headline — ~15-20% from top; gentle frame for loader, not a billboard */
.calc-headline {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--highlight);
  text-align: center;
  letter-spacing: 0.005em;
  line-height: 1.15;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem); /* 28-40px */
  margin: 0;
  padding: 0 var(--space-5);
  padding-top: clamp(3rem, 16vh, 8rem);
}
.calc-headline em {
  font-style: italic;
  color: var(--highlight);
}

/* Loader — centered, 65-75vw capped at 500px */
.calc-loader {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: var(--space-4) 0;
}
.oracle-loader-svg {
  width: clamp(260px, 70vw, 500px);
  height: auto;
  display: block;
  transform-origin: center;
}

/* All animated groups rotate/scale around the SVG's geometric center (180,180
   in the 360×360 view-box). `transform-box: view-box` makes `transform-origin`
   resolve to view-box coordinates, so planets orbit around center instead of
   spinning in place. */
.oracle-loader-svg .ring-outer,
.oracle-loader-svg .ring-mid,
.oracle-loader-svg .planet-1,
.oracle-loader-svg .planet-2,
.oracle-loader-svg .pulse-ring,
.oracle-loader-svg .pulse-ring-2,
.oracle-loader-svg .center {
  transform-box: view-box;
  transform-origin: 180px 180px;
}

.oracle-loader-svg .ring-outer  { animation: calc-spin-cw  20s linear infinite; }
.oracle-loader-svg .ring-mid    { animation: calc-spin-ccw 15s linear infinite; }
.oracle-loader-svg .planet-1    { animation: calc-spin-cw  10s linear infinite; }
.oracle-loader-svg .planet-2    { animation: calc-spin-cw   6s linear infinite; }
/* Center + pulse rings: NO rotation — only scale/opacity breathing at still point */
.oracle-loader-svg .pulse-ring  { animation: calc-pulse 3s ease-in-out infinite; }
.oracle-loader-svg .pulse-ring-2{ animation: calc-pulse 3s ease-in-out infinite; animation-delay: 1.5s; }
.oracle-loader-svg .center      { animation: calc-breathe 3s ease-in-out infinite; }

@keyframes calc-spin-cw {
  from { transform: rotate(0deg);   }
  to   { transform: rotate(360deg); }
}
@keyframes calc-spin-ccw {
  from { transform: rotate(0deg);    }
  to   { transform: rotate(-360deg); }
}
@keyframes calc-pulse {
  0%, 100% { transform: scale(1);    opacity: 0.9; }
  50%      { transform: scale(1.12); opacity: 0.4; }
}
@keyframes calc-breathe {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1;   }
}

/* Footer block — progress bar + status + continue */
.calc-footer {
  width: 100%;
  max-width: 520px;
  padding: 0 var(--space-5);
  padding-bottom: clamp(2rem, 8vh, 4.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.calc-progress-track {
  width: 100%;
  height: 1px;
  background: rgba(84, 81, 80, 0.3);
  position: relative;
  overflow: hidden;
}
.calc-progress-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 0%;
  background: var(--gold);
  transition: width 120ms linear;
}

.calc-status {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--copy-grey);
  text-align: center;
  margin: 0;
}

.calc-continue {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--highlight);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.5rem 0.75rem;
  opacity: 1;
  transition: opacity 400ms ease-out, color var(--transition);
  cursor: pointer;
}
.calc-continue.is-hidden {
  opacity: 0;
  pointer-events: none;
}
.calc-continue:hover,
.calc-continue:focus-visible {
  color: var(--highlight);
  outline: none;
}
.calc-continue-arrow {
  display: inline-block;
  transition: transform var(--transition);
}
.calc-continue:hover .calc-continue-arrow,
.calc-continue:focus-visible .calc-continue-arrow {
  transform: translateX(4px);
}

@media (prefers-reduced-motion: reduce) {
  .oracle-loader-svg .ring-outer,
  .oracle-loader-svg .ring-mid,
  .oracle-loader-svg .planet-1,
  .oracle-loader-svg .planet-2 {
    animation: none;
  }
  /* Keep breathing + pulse, but subtle */
  .oracle-loader-svg .pulse-ring,
  .oracle-loader-svg .pulse-ring-2 { animation-duration: 6s; }
  .oracle-loader-svg .center       { animation-duration: 5s; }
}

/* ═══ Business Context action row ══════════════════════════════════════════
   Back (ghost) + Invoke (primary). Back is a quiet text link in copy-grey;
   Invoke is the chartreuse-outline CTA and takes the remaining width. */
.questions-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: var(--space-3);
}
.questions-actions .btn-primary { flex: 1; }
#btn-questions-back.btn-ghost {
  color: var(--copy-grey);
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-left: 0;
}
#btn-questions-back.btn-ghost:hover:not(:disabled),
#btn-questions-back.btn-ghost:focus-visible:not(:disabled) {
  color: var(--text);
  background: transparent;
}

/* ═══ Reading Calculation Loader ═══════════════════════════════════════════
   Brief atmospheric moment between Invoke and first streamed section.
   Reuses .calc-screen + .oracle-loader-svg from the chart calc screen, but
   drops the footer (no progress bar, no status, no continue link). */
#step-reading-loader.reading-loader-screen {
  justify-content: center;
  gap: clamp(2rem, 6vh, 4rem);
}
#step-reading-loader .calc-headline {
  padding-top: 0;
}
#step-reading-loader .calc-loader {
  flex: 0 1 auto;
}

/* Fade transitions between loader and reading view */
.step.is-fading-out { animation: stepFadeOut 400ms ease-out forwards; }
.step.is-fading-in  { animation: stepFadeIn  400ms ease-out forwards; }
@keyframes stepFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@keyframes stepFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ══════════════════════════════════════════════════════════════════════════
   SHARE CARD — 1080×1920 Instagram Story dimensions (Claude Design spec)
   Rendered off-screen and captured by html-to-image. All sizes in px
   (not rem/clamp) so the output is pixel-perfect regardless of root font.
   No blend modes, no backdrop-filter, no filters — depth comes from
   layered gradients, opacity-ramped SVGs, box-shadow, and low-alpha borders.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Canvas root ────────────────────────────────────────────────────────── */
.share-card {
  position: absolute;
  left: -10000px;
  top: 0;
  width: 1080px;
  height: 1920px;
  background: #000000;
  color: #E1E1DF;
  overflow: hidden;
  font-family: 'Futura Cyrillic', 'Futura PT', 'Avenir Next', sans-serif;
  /* Not display:none so html-to-image can measure layout */
  pointer-events: none;
  contain: layout paint;
}

/* ── Background Oracle-loader (bleeds above card, clipped by canvas) ────── */
.share-card__bg-loader {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  height: 1200px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 1;
  display: block;
}

/* ── Inner card frame ───────────────────────────────────────────────────── */
.share-card__card {
  position: absolute;
  top: 120px;
  left: 56px;
  right: 56px;
  bottom: 220px;
  /* Computed: 968 × 1580 */
  padding: 88px 76px;
  box-sizing: border-box;
  border: 1px solid rgba(201, 169, 109, 0.30);
  border-radius: 52px;
  background:
    radial-gradient(ellipse 120% 70% at 50% 0%, rgba(201, 169, 109, 0.20), transparent 65%),
    linear-gradient(180deg, #0A0A0A 0%, #000000 100%);
  box-shadow:
    0 70px 180px -60px rgba(0, 0, 0, 0.9),
    inset 0 2px 0 rgba(247, 209, 172, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 2;
}

/* ── Watermark Oracle-loader inside card (subtle, scoped z-index) ───────── */
.share-card__watermark {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
  width: 1040px;
  height: 1040px;
  opacity: 0.16;
  pointer-events: none;
  z-index: 1;
  display: block;
}

/* ── Wordmark (MythicBrand / ORACLE stacked lockup) ─────────────────────── */
.share-card__wordmark {
  position: relative;
  z-index: 2;
  display: block;
  /* Target total height ~240–280px. 700 × (137/373) ≈ 257px. */
  width: 700px;
  height: auto;
  margin: 0 auto;
}

/* ── Eyebrow under wordmark ─────────────────────────────────────────────── */
.share-card__eyebrow {
  position: relative;
  z-index: 2;
  margin: 56px 0 0;
  font-family: 'Futura Cyrillic', 'Futura PT', 'Avenir Next', sans-serif;
  font-weight: 400;
  font-size: 28px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #C9A96D;
  text-align: center;
  line-height: 1;
}

/* ── Flex spacer (used twice, above/below quote) ────────────────────────── */
.share-card__spacer {
  flex: 1;
}

/* ── Quote block ────────────────────────────────────────────────────────── */
.share-card__quote {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 16px;
}
.share-card__quote-mark {
  display: block;
  font-family: 'Silver Editorial', 'Cormorant Garamond', Georgia, serif;
  color: #C9A96D;
  font-size: 64px;
  line-height: 0;
  margin-bottom: 28px;
}
.share-card__quote-label {
  margin: 0 0 36px;
  font-family: 'Futura Cyrillic', 'Futura PT', 'Avenir Next', sans-serif;
  font-weight: 400;
  font-size: 34px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #E1E1DF;
  line-height: 1.1;
}
.share-card__quote-headline {
  margin: 0;
  font-family: 'Silver Editorial', 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 106px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #E0F251;
}
.share-card__quote-support {
  margin: 42px auto 0;
  max-width: 700px;
  font-family: 'Futura Cyrillic', 'Futura PT', 'Avenir Next', sans-serif;
  font-weight: 400;
  font-size: 32px;
  line-height: 1.55;
  letter-spacing: 0;
  color: #A3A39E;
}
.share-card__quote-support:empty { display: none; }

/* ── Attribution block ──────────────────────────────────────────────────── */
.share-card__attribution {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-top: 40px;
  margin-top: 52px;
  border-top: 1px solid rgba(201, 169, 109, 0.22);
}
.share-card__signature {
  margin: 0;
  font-family: 'Silver Editorial', 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: 0;
  color: #F7D1AC;
}
.share-card__handle {
  margin: 8px 0 0;
  font-family: 'Futura Cyrillic', 'Futura PT', 'Avenir Next', sans-serif;
  font-weight: 400;
  font-size: 26px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #A3A39E;
  line-height: 1;
}

/* ══════════════════════════════════════════════════════════════════════════
   SHARE MODAL — preview + 4 actions
   ══════════════════════════════════════════════════════════════════════════ */
.share-modal[hidden] { display: none !important; }
.share-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vh, 2rem);
  animation: shareModalFadeIn 240ms var(--ease-out);
}
.share-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.share-modal__panel {
  position: relative;
  width: min(520px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1rem, 2.5vh, 1.5rem);
  padding: clamp(1.25rem, 3vh, 2rem) clamp(1rem, 3vw, 1.5rem);
  color: var(--heading-silver);
}
.share-modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--copy-grey);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: color 180ms var(--ease-out), background 180ms var(--ease-out);
}
.share-modal__close:hover,
.share-modal__close:focus-visible {
  color: var(--highlight);
  background: rgba(224, 242, 81, 0.08);
  outline: none;
}
.share-modal__title {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.7;
  text-align: center;
}
.share-modal__preview-wrap {
  position: relative;
  width: min(65vw, 280px);
  aspect-ratio: 9 / 16;
  background: var(--void);
  border: 1px solid rgba(201, 169, 110, 0.2);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.share-modal__preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 320ms var(--ease-out);
}
.share-modal__preview.is-loaded { opacity: 1; }
.share-modal__loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--copy-grey);
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.share-modal__loading.is-hidden { display: none; }
.share-spinner {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(84, 81, 80, 0.3);
  border-top-color: var(--highlight);
  border-radius: 50%;
  animation: spin-fast 1s linear infinite;
}
.share-modal__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  width: 100%;
  max-width: 360px;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(201, 169, 110, 0.18);
}
.share-primary {
  width: 100%;
  /* Inherits .btn / .btn-primary chartreuse styling — single CTA matches
     the rest of the app's primary actions. */
}
.share-tag {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  color: var(--copy-grey);
}
.share-tag em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--highlight);
  font-size: 1.05em;
  letter-spacing: 0.005em;
}

@keyframes shareModalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ══════════════════════════════════════════════════════════════════════════
   SHARE TOAST — success/status notifications (separate from .error-toast)
   ══════════════════════════════════════════════════════════════════════════ */
.share-toast[hidden] { display: none; }
.share-toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0));
  z-index: 250;
  transform: translateX(-50%) translateY(120%);
  max-width: 90vw;
  padding: 16px 24px;
  background: var(--obsidian);
  border: 1px solid rgba(201, 169, 110, 0.2);
  border-radius: 8px;
  color: #FFFFFF;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.01em;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  transition: transform 400ms var(--ease-out), opacity 600ms var(--ease-out);
  opacity: 0;
  pointer-events: none;
}
.share-toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.share-toast__sparkle {
  color: var(--highlight);
  margin-right: 0.5em;
}

/* ═════════════════════════════════════════════════════════════════════════════
   PHASE 6 — Completion Moment, Chambers Library, MythicBrand Chamber Interior
   CSS mirrors DESIGN_CONVENTIONS.md Sections 7–9 exactly, with one substitution:
     "Futura PT"  →  "Futura Cyrillic"   (actual @font-face name in this app)
   Each screen is scoped under its top-level class so it never leaks. The three
   step wrappers shed the default .step layout and run full-bleed, but the
   global `.step { display: none }` / `.step.active { display: ... }`
   visibility rule still governs which screen is on stage.
   ═════════════════════════════════════════════════════════════════════════════ */

/* ─── Shared step wrapper overrides ───────────────────────────────────────── */
.step.cm-stage,
.step.library-ornate,
.step.business-chamber {
  width: 100%;
  margin: 0 auto;
  padding: 0;
  min-height: 100dvh;
}
.step.cm-stage.active,
.step.library-ornate.active,
.step.business-chamber.active {
  display: block;
}


/* ═════════════════════════════════════════════════════════════════════════
   Section 7 — Completion Moment  (.cm-stage)
   ═════════════════════════════════════════════════════════════════════════ */

/* 1 · STAGE */
.step.cm-stage {
  position: relative;
  max-width: 390px;
  min-height: 780px;
  height: 100dvh;
  background: #000000;
  color: #E1E1DF;
  font-family: "Futura Cyrillic", "Avenir Next", "Century Gothic", sans-serif;
  overflow: hidden;
}

/* 2 · AMBIENT LAYERS */
.cm-stage .cm-wash {
  position: absolute; inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 50% 38%,
      rgba(201, 169, 109, 0.18) 0%,
      rgba(201, 169, 109, 0.00) 62%),
    radial-gradient(ellipse 55% 45% at 50% 90%,
      rgba(247, 209, 172, 0.05) 0%,
      rgba(247, 209, 172, 0.00) 70%);
}

.cm-stage .cm-loader {
  position: absolute;
  top: 180px;
  left: 50%;
  transform: translateX(-50%);
  width: 520px;
  height: 520px;
  opacity: 0.18;
  z-index: 0;
  pointer-events: none;
  animation: cm-loader-fade 2200ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.cm-stage .cm-loader svg,
.cm-stage .cm-loader img { width: 100%; height: 100%; display: block; }

.cm-stage .cm-stars {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
}
.cm-stage .cm-stars circle { fill: #F7D1AC; }


/* 3 · CONTENT COLUMN */
.cm-stage .cm-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 150px 36px 200px;
  text-align: center;
  animation: cm-container-in 1800ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}


/* 4 · EYEBROW */
.cm-stage .cm-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  color: #C9A96D;
  font-family: "Futura Cyrillic", sans-serif;
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  line-height: 1;
}
.cm-stage .cm-eyebrow .cm-spark {
  color: #F7D1AC;
  font-size: 12px;
  line-height: 1;
}


/* 5 · CLOSING LINES */
.cm-stage .cm-closing {
  font-family: "Silver Editorial", "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 400;
}
.cm-stage .cm-closing-line-1 {
  color: #E1E1DF;
  font-size: 32px;
  line-height: 1.28;
  letter-spacing: -0.005em;
  text-wrap: pretty;
}
.cm-stage .cm-name { color: #F7D1AC; }
.cm-stage .cm-closing-sub {
  margin-top: 18px;
  color: #A3A39E;
  font-style: italic;
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: -0.005em;
}


/* 6 · BRAINSTORM WHISPER */
.cm-stage .cm-brainstorm {
  margin-top: 44px;
  max-width: 300px;
}
.cm-stage .cm-divider {
  height: 1px;
  width: 56px;
  margin: 0 auto 22px;
  background: linear-gradient(
    90deg,
    rgba(247, 209, 172, 0.00) 0%,
    rgba(247, 209, 172, 0.55) 50%,
    rgba(247, 209, 172, 0.00) 100%);
}
.cm-stage .cm-brainstorm-label {
  color: #C9A96D;
  font-family: "Futura Cyrillic", sans-serif;
  font-weight: 500;
  font-size: 9.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.cm-stage .cm-brainstorm-label .cm-dot {
  color: #F7D1AC;
  margin: 0 8px;
}
.cm-stage .cm-brainstorm-body {
  margin: 0;
  color: #E1E1DF;
  font-family: "Futura Cyrillic", sans-serif;
  font-weight: 400;
  font-size: 13.5px;
  line-height: 1.65;
}
.cm-stage .cm-brainstorm-body .cm-accent { color: #F7D1AC; }
.cm-stage .cm-brainstorm-body sup {
  font-size: 0.55em;
  top: -0.55em;
  position: relative;
  margin-left: 1px;
}


/* 7 · FOOTER */
.cm-stage .cm-footer {
  position: absolute;
  bottom: 62px;
  left: 0;
  right: 0;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  z-index: 3;
}

.cm-stage .cm-cta {
  width: 100%;
  background: transparent;
  color: #E0F251;
  border: 1px solid #E0F251;
  border-radius: 9999px;
  padding: 15px 22px;
  font-family: "Futura Cyrillic", sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition:
    box-shadow 240ms cubic-bezier(0.4, 0, 0.2, 1),
    transform  180ms cubic-bezier(0.4, 0, 0.2, 1);
  animation: cm-cta-glow 3600ms ease-in-out infinite;
  animation-delay: calc(5400ms + 600ms);
}
.cm-stage .cm-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(224, 242, 81, 0.28);
}
.cm-stage .cm-cta svg { stroke: #E0F251; }

.cm-stage .cm-back {
  background: transparent;
  border: none;
  color: #A3A39E;
  font-family: "Futura Cyrillic", sans-serif;
  font-weight: 400;
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 6px 10px;
  opacity: 0.85;
  transition: color 200ms ease, opacity 200ms ease;
}
.cm-stage .cm-back:hover {
  color: #F7D1AC;
  opacity: 1;
}


/* 8 · STAGGERED REVEAL
     0      cm-stage fades up + cm-loader fades to 18%
     900    cm-eyebrow
    1600    cm-closing-line-1
    2400    cm-closing-sub
    4400    cm-brainstorm
    5400    cm-cta
    5900    cm-back
    6000    cm-cta-glow begins                                                */
.cm-stage .cm-reveal {
  opacity: 0;
  transform: translateY(10px);
  animation-duration: 1600ms;
  animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1);
  animation-fill-mode: both;
  animation-name: cm-rise;
}
.cm-stage .cm-r-eyebrow { animation-delay:  900ms; }
.cm-stage .cm-r-line1   { animation-delay: 1600ms; }
.cm-stage .cm-r-line2   { animation-delay: 2400ms; }
.cm-stage .cm-r-brain   { animation-delay: 4400ms; }
.cm-stage .cm-r-cta     { animation-delay: 5400ms; }
.cm-stage .cm-r-back    { animation-delay: 5900ms; }


/* 9 · KEYFRAMES */
@keyframes cm-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0);    }
}
@keyframes cm-container-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes cm-loader-fade {
  from { opacity: 0;    }
  to   { opacity: 0.18; }
}
@keyframes cm-cta-glow {
  0%, 100% { filter: drop-shadow(0 0 0  rgba(224, 242, 81, 0.00)); }
  50%      { filter: drop-shadow(0 0 14px rgba(224, 242, 81, 0.35)); }
}


/* 10 · REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  .cm-stage .cm-content,
  .cm-stage .cm-loader,
  .cm-stage .cm-reveal,
  .cm-stage .cm-cta {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .cm-stage .cm-loader { opacity: 0.18 !important; }
}


/* ═════════════════════════════════════════════════════════════════════════
   Section 8 — Chambers Library  (.library-ornate)
   ═════════════════════════════════════════════════════════════════════════ */

/* Local tokens — scoped so they don't collide with the global Sacred Acid set. */
.library-ornate {
  --lo-void:            #050505;
  --lo-void-soft:       #0A0A0A;
  --lo-noir:            #0B0A0A;
  --lo-noir-2:          #0C0B0A;
  --lo-charcoal:        #14110D;
  --lo-oracle-gold:     #C9A96D;
  --lo-oracle-gold-dim: #8a6b3d;
  --lo-rose-gold:       #F7D1AC;
  --lo-chartreuse:      #E0F251;
  --lo-paper-white:     #E1E1DF;
  --lo-paper-body:      #C9C9C4;
  --lo-paper-muted:     #A3A39E;
  --lo-stone-muted:     #5D5349;
  --lo-ease-ritual: cubic-bezier(.4, 0, .2, 1);
}

/* PAGE */
.step.library-ornate {
  position: relative;
  max-width: 375px;
  min-height: 852px;
  background: #000;
  overflow-x: hidden;
  font-family: "Futura Cyrillic", "Futura", "Helvetica Neue", Arial, sans-serif;
  color: var(--lo-paper-white);
}

.library-ornate__ambient {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 80% 40% at 50% 12%, rgba(201,169,109,0.12), transparent 65%),
    radial-gradient(ellipse 60% 40% at 50% 92%, rgba(247,209,172,0.05), transparent 65%);
}

.library-ornate__stars { position: absolute; inset: 0; pointer-events: none; z-index: 0; }

.library-ornate__mark {
  /* Sized larger and vertically centered on the ✦ ✦ ✦ divider above the
     cards. Uses translate(-50%, -50%) so the loader's geometric center sits
     at top:254px (≈ y of the divider sparkle in the page layout). Phase 6
     polish 3. */
  position: absolute;
  top: 254px;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 680px;
  height: 680px;
  max-width: none;
  opacity: 0.30;
  pointer-events: none;
  z-index: 1;
}

/* TOP BAR */
.library-ornate__topbar {
  position: absolute; top: 0; left: 0; right: 0;
  padding: 54px 20px 14px;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 20;
  background: linear-gradient(180deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 70%, rgba(0,0,0,0) 100%);
}

.library-ornate__menu {
  width: 32px; height: 32px; background: transparent; border: none;
  cursor: pointer; padding: 0;
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
}
.library-ornate__menu > div { height: 1px; background: var(--lo-chartreuse); }
.library-ornate__menu > div:nth-child(1) { width: 18px; }
.library-ornate__menu > div:nth-child(2) { width: 14px; }
.library-ornate__menu > div:nth-child(3) { width: 18px; }

.library-ornate__wordmark {
  color: var(--lo-rose-gold);
  font-size: 10px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  font-family: "Futura Cyrillic", sans-serif;
  font-weight: 400;
}

.library-ornate__avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--lo-oracle-gold) 0%, var(--lo-oracle-gold-dim) 100%);
  border: 1px solid rgba(247,209,172,0.5);
  cursor: pointer; padding: 0;
  color: var(--lo-noir);
  font-size: 12px; font-weight: 600; letter-spacing: 0.05em;
  font-family: "Silver Editorial", serif;
  font-style: italic;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* CONTENT SHELL */
.library-ornate__body { padding: 118px 22px 40px; position: relative; z-index: 2; }

.library-ornate__meta {
  color: var(--lo-oracle-gold);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-family: "Futura Cyrillic", sans-serif;
}

.library-ornate__heading {
  font-family: "Silver Editorial", serif;
  font-size: 34px;
  line-height: 1.05;
  color: var(--lo-paper-white);
  margin: 0;
  margin-top: 22px;
}
.library-ornate__heading i { color: var(--lo-rose-gold); font-style: italic; }

.library-ornate__sub {
  color: var(--lo-paper-muted);
  font-size: 13px;
  line-height: 1.6;
  margin-top: 14px;
  margin-bottom: 6px;
}

.library-ornate__divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0 22px;
}
.library-ornate__divider-rule {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(201,169,109,0.35) 50%, transparent 100%);
}
.library-ornate__divider-glyph {
  color: var(--lo-oracle-gold);
  font-size: 9px;
}

.library-ornate__cards { display: flex; flex-direction: column; gap: 16px; }

/* CHAMBER CARD · ORNATE */
.library-ornate .chamber-card {
  position: relative;
  width: 100%;
  text-align: left;
  padding: 0;
  background: transparent;
  border: none;
  font-family: "Futura Cyrillic", sans-serif;
  color: var(--lo-paper-white);
}
.library-ornate .chamber-card--unlocked { cursor: pointer; }
.library-ornate .chamber-card--locked   { cursor: default; }

.library-ornate .chamber-card__inner {
  position: relative;
  padding: 28px 24px 26px;
  border-radius: 16px;
  overflow: hidden;
}

.library-ornate .chamber-card--unlocked .chamber-card__inner {
  background: radial-gradient(ellipse 130% 80% at 50% 0%, rgba(201,169,109,0.16), transparent 62%);
  border: 1px solid rgba(201,169,109,0.45);
  box-shadow:
    0 20px 60px -24px rgba(201,169,109,0.4),
    inset 0 1px 0 rgba(247,209,172,0.1);
}

.library-ornate .chamber-card--locked .chamber-card__inner {
  background: radial-gradient(ellipse 130% 80% at 50% 0%, rgba(247,209,172,0.05), transparent 62%);
  border: 1px solid rgba(247,209,172,0.1);
  box-shadow: inset 0 1px 0 rgba(247,209,172,0.04);
}

.library-ornate .chamber-card__stars { position: absolute; inset: 0; pointer-events: none; }

.library-ornate .chamber-card__frame {
  position: absolute; top: 10px; left: 10px; right: 10px; bottom: 10px;
  border: 1px solid rgba(247,209,172,0.07);
  border-radius: 10px;
  pointer-events: none;
}

.library-ornate .chamber-card__eyebrow {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.library-ornate .chamber-card__eyebrow-rule {
  height: 1px; flex: 0 0 22px;
}
.library-ornate .chamber-card--unlocked .chamber-card__eyebrow-rule {
  background: linear-gradient(90deg, var(--lo-oracle-gold) 0%, transparent 100%);
}
.library-ornate .chamber-card--locked .chamber-card__eyebrow-rule {
  background: rgba(247,209,172,0.15);
}
.library-ornate .chamber-card__eyebrow-label {
  font-size: 9.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}
.library-ornate .chamber-card--unlocked .chamber-card__eyebrow-label { color: var(--lo-oracle-gold); }
.library-ornate .chamber-card--locked   .chamber-card__eyebrow-label { color: rgba(247,209,172,0.4); }

.library-ornate .chamber-card__lock {
  margin-left: auto;
  color: rgba(247,209,172,0.5);
  display: inline-flex; align-items: center;
}

.library-ornate .chamber-card__titlerow {
  position: relative;
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 14px;
}

.library-ornate .chamber-card__glyph {
  width: 54px; height: 54px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  font-family: "Silver Editorial", serif;
  font-style: italic;
}
.library-ornate .chamber-card--unlocked .chamber-card__glyph {
  /* Unlocked glyph glows chartreuse (Phase 6 polish 2) — the unlocked
     chamber is the one that's "lit up", so its glyph picks up the app's
     accent color rather than the ambient oracle-gold. */
  color: var(--lo-chartreuse);
  filter: drop-shadow(0 0 12px rgba(224, 242, 81, 0.45));
}
.library-ornate .chamber-card--locked .chamber-card__glyph {
  /* Chartreuse instead of dimmed peach — locked chambers still telegraph
     the spark of the design system; the lock state is communicated via
     subtitle blur + "Sealed" CTA, not via a faded glyph. */
  color: var(--lo-chartreuse);
  opacity: 0.85;
}

.library-ornate .chamber-card__title {
  font-family: "Silver Editorial", serif;
  font-size: 28px; margin: 0; line-height: 1;
}
.library-ornate .chamber-card--unlocked .chamber-card__title { color: var(--lo-rose-gold); }
.library-ornate .chamber-card--locked   .chamber-card__title { color: rgba(247,209,172,0.55); }

.library-ornate .chamber-card__tm {
  font-family: "Futura Cyrillic", sans-serif;
  font-size: 0.36em; font-weight: 400; letter-spacing: 0.04em;
  margin-left: 2px; top: -1em; position: relative;
}
.library-ornate .chamber-card--unlocked .chamber-card__tm { color: var(--lo-oracle-gold); }
.library-ornate .chamber-card--locked   .chamber-card__tm { color: rgba(201,169,109,0.4); }

.library-ornate .chamber-card__subtitle-band {
  position: relative;
  padding: 6px 0 14px;
  border-top: 1px solid rgba(247,209,172,0.08);
  margin-bottom: 10px;
}
.library-ornate .chamber-card__subtitle {
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-top: 10px;
}
.library-ornate .chamber-card--unlocked .chamber-card__subtitle { color: var(--lo-oracle-gold); }
.library-ornate .chamber-card--locked   .chamber-card__subtitle { color: rgba(247,209,172,0.45); filter: blur(2px); }

.library-ornate .chamber-card__desc {
  position: relative;
  margin: 0;
  font-size: 13px; line-height: 1.6;
}
.library-ornate .chamber-card--unlocked .chamber-card__desc { color: var(--lo-paper-body); font-style: normal; }
.library-ornate .chamber-card--locked   .chamber-card__desc { color: rgba(201,201,196,0.4); font-style: italic; filter: blur(4px); }

.library-ornate .chamber-card__foot {
  position: relative;
  margin-top: 22px;
  display: flex; align-items: center; justify-content: space-between;
}

.library-ornate .chamber-card__cta {
  color: var(--lo-chartreuse);
  font-size: 10.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 10px;
}

.library-ornate .chamber-card__cta--locked {
  color: rgba(247,209,172,0.55);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-family: "Futura Cyrillic", sans-serif;
  display: inline-flex; align-items: center; gap: 8px;
}

.library-ornate .chamber-card__sigil {
  display: flex; gap: 4px;
  color: rgba(247,209,172,0.35);
  font-size: 8px;
  letter-spacing: 0.2em;
}

.library-ornate__whisper {
  margin-top: 40px;
  text-align: center;
  color: rgba(247,209,172,0.4);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-family: "Silver Editorial", serif;
  font-style: italic;
}


/* ═════════════════════════════════════════════════════════════════════════
   Section 9 — MythicBrand Chamber Interior  (.business-chamber)
   ═════════════════════════════════════════════════════════════════════════ */

/* Local tokens — scoped. */
.business-chamber {
  --bc-void:          #000;
  --bc-noir:          #0B0A0A;
  --bc-oracle-gold:   #C9A96D;
  --bc-rose-gold:     #F7D1AC;
  --bc-chartreuse:    #E0F251;
  --bc-paper-white:   #E1E1DF;
  --bc-paper-muted:   #A3A39E;
  --bc-stone-muted:   #5D5349;
  --bc-ease-ritual:   cubic-bezier(.4, 0, .2, 1);
}

/* PAGE */
.step.business-chamber {
  position: relative;
  max-width: 375px;
  min-height: 852px;
  background: var(--bc-void);
  overflow-x: hidden;
  font-family: "Futura Cyrillic", "Futura", "Helvetica Neue", Arial, sans-serif;
  color: var(--bc-paper-white);
  padding: 54px 24px 40px;
}

/* BACK BUTTON */
.business-chamber__back {
  position: absolute; top: 54px; left: 20px; z-index: 5;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(224,242,81,0.05);
  border: 1px solid rgba(224,242,81,0.25);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--bc-chartreuse);
}

/* HEADER */
.business-chamber__eyebrow {
  color: var(--bc-oracle-gold);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-family: "Futura Cyrillic", sans-serif;
  text-align: center;
  margin-top: 28px;
}
.business-chamber__eyebrow sup {
  font-size: 0.55em;
  top: -0.5em; position: relative;
  margin-left: 1px;
  letter-spacing: 0.04em;
}

.business-chamber__heading {
  font-family: "Silver Editorial", serif;
  font-size: 32px;
  line-height: 1.2;
  color: var(--bc-paper-white);
  margin: 0;
  margin-top: 28px;
  text-align: center;
}
.business-chamber__heading i {
  color: var(--bc-rose-gold);
  font-style: italic;
}

.business-chamber__sub {
  color: var(--bc-paper-muted);
  font-size: 14.5px;
  line-height: 1.6;
  margin-top: 14px;
  margin-bottom: 22px;
  text-align: center;
}

/* ACTION PILLS */
.business-chamber__actions {
  display: flex; gap: 10px; margin-bottom: 28px;
}
.business-chamber__action {
  flex: 1;
  background: transparent;
  color: var(--bc-chartreuse);
  border: 1px solid var(--bc-chartreuse);
  border-radius: 9999px;
  padding: 9px 12px;
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: "Futura Cyrillic", sans-serif;
  display: inline-flex;
  align-items: center; justify-content: center;
  gap: 7px;
}
.business-chamber__action .bc-action-icon {
  width: 14px;
  height: 14px;
  color: currentColor;
  flex-shrink: 0;
  /* Slight nudge so the stroke aligns optically with the uppercase label
     baseline — SVGs render with their bounding-box centered, but stroke
     density skews the perceived center upward. */
  transform: translateY(-0.5px);
}

/* ACCORDION */
.business-chamber .transmission {
  border-bottom: 1px solid rgba(201,169,109,0.2);
  padding-bottom: 0;
}

.business-chamber .transmission__head {
  width: 100%;
  background: transparent; border: none;
  padding: 20px 0;
  cursor: pointer; text-align: left;
  display: flex; align-items: center; gap: 16px;
  font-family: "Futura Cyrillic", sans-serif;
}
/* Unnamed-in-spec wrapper that stacks index/title/subtitle vertically inside
   the flex row .transmission__head. Required because the spec's
   `.transmission__index { margin-bottom: 4px }` only works if they stack. */
.business-chamber .transmission__head-text {
  flex: 1 1 auto;
  min-width: 0;
}

.business-chamber .transmission__index {
  color: var(--bc-stone-muted);
  font-size: 10px;
  letter-spacing: 0.24em;
  font-weight: 500;
  margin-bottom: 4px;
}

.business-chamber .transmission__title {
  font-family: "Silver Editorial", serif;
  font-size: 22px;
  color: var(--bc-oracle-gold);
  line-height: 1.1;
}

.business-chamber .transmission__subtitle {
  color: var(--bc-paper-muted);
  font-size: 11.5px;
  margin-top: 3px;
  letter-spacing: 0.02em;
}

.business-chamber .transmission__toggle {
  /* Chartreuse toggle (Phase 6 polish 2) — same accent as the unlocked
     glyph and the "Read full transmission →" link, so the interactive
     affordances all share one color and read as a system. */
  color: var(--bc-chartreuse);
  font-size: 20px;
  line-height: 1;
  transition: transform 300ms var(--bc-ease-ritual);
  margin-left: auto;
}
.business-chamber .transmission[data-open="true"] .transmission__toggle {
  transform: rotate(45deg);
}

.business-chamber .transmission__body-wrap {
  max-height: 0;
  overflow: hidden;
  transition: max-height 420ms var(--bc-ease-ritual);
}
.business-chamber .transmission[data-open="true"] .transmission__body-wrap {
  max-height: 600px;
}

.business-chamber .transmission__body {
  padding: 4px 0 24px;
  color: var(--bc-paper-white);
  font-size: 13.5px;
  line-height: 1.55;
}
.business-chamber .transmission__body p {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Inline "Read full transmission →" link (Phase 6 polish).
   Lives at the bottom of an open .transmission__body. Tap navigates to
   #step-reading at this section — tap-on-open of the outer accordion now
   collapses instead of navigating, so this link is the only way through. */
.business-chamber .transmission__read-more {
  display: inline-block;
  margin-top: 14px;
  font-family: "Futura Cyrillic", sans-serif;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bc-chartreuse);
  text-decoration: none;
  transition: opacity 180ms var(--bc-ease-ritual);
}
.business-chamber .transmission__read-more:hover,
.business-chamber .transmission__read-more:focus-visible {
  opacity: 0.78;
  outline: none;
}


/* ═════════════════════════════════════════════════════════════════════════
   PHASE 6 POLISH — desktop layouts (≥768px)
   On mobile these three screens live at 375–390px. On desktop the outer
   stage expands to fill the viewport (so the background washes aren't
   truncated mid-air), while the content column stays narrow and centered —
   the sacred-pause feel carries over. Single-column accordion + cards
   preserved; no grids.
   ═════════════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
  /* Completion moment — full-viewport stage, 480px content column. */
  .step.cm-stage {
    max-width: none;
    width: 100%;
    min-height: 100dvh;
    height: 100dvh;
  }
  .cm-stage .cm-content {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
  .cm-stage .cm-footer {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Chambers library — full-viewport stage, 440px body column. */
  .step.library-ornate {
    max-width: none;
    width: 100%;
    min-height: 100dvh;
  }
  .library-ornate .library-ornate__topbar {
    padding-left: calc(50% - 220px);
    padding-right: calc(50% - 220px);
  }
  .library-ornate .library-ornate__body {
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
  }
  .library-ornate .library-ornate__mark {
    /* Keep the M watermark anchored above the body column, not dead-center
       of a 1280px viewport. */
    left: 50%;
  }

  /* MythicBrand chamber interior — full-viewport stage, 520px content. */
  .step.business-chamber {
    max-width: none;
    width: 100%;
    min-height: 100dvh;
    padding-left: calc(50% - 260px);
    padding-right: calc(50% - 260px);
  }
  /* Back button hugs the content column's left edge, not the viewport edge. */
  .business-chamber .business-chamber__back {
    left: calc(50% - 260px);
  }
}


/* ═════════════════════════════════════════════════════════════════════════
   MODALS — coming-soon + share-reading (carried over; not in spec sections)
   ═════════════════════════════════════════════════════════════════════════ */
.cs-modal,
.sr-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.cs-modal[hidden],
.sr-modal[hidden] { display: none; }
.cs-modal__backdrop,
.sr-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.cs-modal__panel,
.sr-modal__panel {
  position: relative;
  max-width: 460px;
  width: 100%;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  border: 1px solid var(--gold-dim);
  border-radius: 18px;
  background:
    radial-gradient(ellipse 120% 70% at 50% 0%, rgba(201, 169, 109, 0.18), transparent 65%),
    linear-gradient(180deg, #0A0A0A 0%, var(--void) 100%);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
  color: var(--heading-silver);
  text-align: center;
}
.cs-modal__close,
.sr-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: var(--copy-grey);
  cursor: pointer;
  padding: 0.5rem;
  line-height: 0;
  transition: color var(--transition-fast);
}
.cs-modal__close:hover,
.sr-modal__close:hover { color: var(--heading-silver); }
.cs-modal__sparkle {
  color: var(--highlight);
  font-size: 1.6rem;
  line-height: 1;
  margin-bottom: 0.75rem;
  text-shadow: 0 0 18px rgba(224, 242, 81, 0.4);
}
.cs-modal__eyebrow,
.sr-modal__eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}
.cs-modal__title,
.sr-modal__title {
  margin-top: 0.6rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 4vw, 2rem);
  line-height: 1.2;
  color: var(--heading-silver);
}
.sr-modal__title em,
.cs-modal__title em {
  font-style: italic;
  color: var(--highlight);
}
.cs-modal__body,
.sr-modal__body {
  margin-top: 0.85rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--copy-grey);
}
.cs-modal__body em {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--highlight);
}

/* Share reading form */
.sr-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
  text-align: left;
}
.sr-form__label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.sr-form__input {
  padding: 0.9rem 1rem;
  border: 1px solid var(--gold-dim);
  border-radius: 10px;
  background: var(--obsidian);
  color: var(--heading-silver);
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: border-color var(--transition-fast);
}
.sr-form__input::placeholder { color: var(--smoke); }
.sr-form__input:focus {
  outline: none;
  border-color: var(--highlight);
  box-shadow: 0 0 0 3px rgba(224, 242, 81, 0.1);
}
.sr-form__submit {
  margin-top: 0.25rem;
  justify-self: stretch;
}
.sr-form__status {
  min-height: 1.1em;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--copy-grey);
  text-align: center;
}
.sr-form__status.is-success { color: var(--highlight); }
.sr-form__status.is-error   { color: var(--error); }


/* ═════════════════════════════════════════════════════════════════════════════
   PHASE 7 — Brainstorm Screen  (.brainstorm)
   DESIGN_CONVENTIONS.md Section 10a (empty) / 10b (mid) / 10c (rate-limit).
   Three states share most chrome — stage, ambient, noise, header, composer.
   Each state-specific block is scoped under its own selector.
   Substitution: "Futura PT" → "Futura Cyrillic" (the actual font-face here).
   ═════════════════════════════════════════════════════════════════════════════ */

/* Step wrapper override — full-bleed like the chamber/library steps */
.step.brainstorm {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 100dvh;
}
.step.brainstorm.active {
  /* The .brainstorm rule below uses flex column; let .active flip display
     without overriding flex direction. */
  display: flex;
}

/* ─── 1 · STAGE ────────────────────────────────────────────────────────── */
/* On mobile we lock the body (see body.brainstorm-active below) so iOS
   Safari can't accidentally scroll the page when the on-screen keyboard
   opens/closes. With body locked, .brainstorm fills the entire viewport
   via fixed positioning, and the inner .bs-thread is the only scrollable
   region — composer always pinned to the visual bottom. */
.brainstorm {
  position: relative;
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
  background: #000000;
  color: #E1E1DF;
  font-family: "Futura Cyrillic", var(--font-body), sans-serif;
  flex-direction: column;
  overflow: hidden;
}
/* Mobile (≤599px): full-viewport fixed stage, body locked. */
@media (max-width: 599px) {
  body.brainstorm-active {
    overflow: hidden;
    /* iOS Safari needs height set explicitly when overflow:hidden is on
       body, otherwise the page can still rubber-band-scroll. */
    height: 100dvh;
    position: fixed;
    width: 100%;
    inset: 0;
  }
  .step.brainstorm.active {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    height: 100dvh;
    z-index: 100;
  }
  .brainstorm {
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
  }
}
/* Desktop / tablet — fluid stage in normal flow with min-height. */
@media (min-width: 600px) {
  .brainstorm { max-width: 520px; min-height: 780px; }
}

/* ─── 2 · AMBIENT + NOISE ─────────────────────────────────────────────── */
.brainstorm .bs-ambient {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 80% 38% at 50% 8%,
      rgba(201, 169, 109, 0.14), transparent 65%),
    radial-gradient(ellipse 70% 50% at 50% 100%,
      rgba(224, 242, 81, 0.06), transparent 70%);
}
.brainstorm .bs-noise {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  opacity: 0.025;
}

/* ─── 3 · HEADER ──────────────────────────────────────────────────────── */
.brainstorm .bs-header {
  position: relative; z-index: 4;
  display: grid;
  grid-template-columns: 36px 1fr 56px;
  align-items: center;
  gap: 10px;
  padding: 50px 18px 14px;
  border-bottom: 1px solid rgba(247, 209, 172, 0.06);
  background: linear-gradient(180deg,
    rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.70) 80%, rgba(0,0,0,0) 100%);
}
.brainstorm .bs-back {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(224, 242, 81, 0.05);
  border: 1px solid rgba(224, 242, 81, 0.25);
  color: #E0F251;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.brainstorm .bs-titlebox { text-align: center; }
.brainstorm .bs-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: #C9A96D;
  font-family: "Futura Cyrillic", sans-serif;
  font-weight: 500; font-size: 10.5px;
  letter-spacing: 0.36em; text-transform: uppercase;
  line-height: 1;
}
.brainstorm .bs-eyebrow .bs-spark { color: #F7D1AC; font-size: 11px; }
.brainstorm .bs-context {
  margin-top: 5px;
  color: #A3A39E;
  font-family: "Silver Editorial", "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 12.5px;
  letter-spacing: 0.04em;
}

/* ─── 4 · THREAD WRAPPER ─────────────────────────────────────────────── */
.brainstorm .bs-thread {
  position: relative; z-index: 2;
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
}

/* ─── 5 · EMPTY STATE  (Section 10a) ─────────────────────────────────── */
.brainstorm .bs-empty {
  position: relative;
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px 16px 32px;
  text-align: center;
}
.brainstorm .bs-empty[hidden] { display: none; }

.brainstorm .bs-empty-mark {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, calc(-50% - 102px));
  pointer-events: none;
  z-index: 0;
  width: 320px; height: 320px;
  opacity: 0.45;
}
.brainstorm .bs-empty-mark img {
  width: 100%; height: 100%; display: block;
  animation: ol-rotate 60s linear infinite;
}

.brainstorm .bs-empty-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  gap: 22px;
  width: 100%;
}

.brainstorm .bs-empty-title {
  font-family: "Silver Editorial", "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 28px;
  line-height: 1.28;
  color: #E1E1DF;
  margin: 0;
  max-width: 300px;
  text-wrap: pretty;
}
.brainstorm .bs-empty-title .bs-name { color: #F7D1AC; }

.brainstorm .bs-empty-divider {
  height: 1px; width: 56px; margin: 4px auto;
  background: linear-gradient(90deg,
    transparent, rgba(247, 209, 172, 0.45), transparent);
}

.brainstorm .bs-empty-sub {
  color: #A3A39E;
  font-size: 13px;
  line-height: 1.6;
  max-width: 290px;
  margin: 0;
}

.brainstorm .bs-prompts {
  display: flex; flex-direction: column; gap: 9px;
  width: 100%;
  max-width: 320px;
}
.brainstorm .bs-prompt-chip {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(247, 209, 172, 0.16);
  border-radius: 14px;
  padding: 12px 14px;
  color: #E1E1DF;
  font-family: "Futura Cyrillic", var(--font-body);
  font-size: 14px; line-height: 1.5;
  letter-spacing: 0.005em;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 200ms cubic-bezier(.4, 0, .2, 1),
    background 200ms cubic-bezier(.4, 0, .2, 1),
    transform 200ms cubic-bezier(.4, 0, .2, 1);
}
.brainstorm .bs-prompt-chip:hover {
  border-color: rgba(224, 242, 81, 0.4);
  background: rgba(224, 242, 81, 0.04);
  transform: translateY(-1px);
}
.brainstorm .bs-prompt-chip .bs-prompt-glyph {
  color: #C9A96D;
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 5px;
}

/* ─── 6 · MID-CONVERSATION  (Section 10b) ────────────────────────────── */
.brainstorm .bs-messages {
  display: flex; flex-direction: column;
  gap: 22px;
  padding-bottom: 6px;
}
.brainstorm .bs-messages[hidden] { display: none; }

.brainstorm .bs-msg-user {
  align-self: flex-end;
  max-width: 84%;
  background: rgba(247, 209, 172, 0.06);
  border: 1px solid rgba(247, 209, 172, 0.22);
  border-radius: 16px 16px 4px 16px;
  padding: 11px 14px;
  color: #F7D1AC;
  font-family: "Futura Cyrillic", var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0.005em;
}

.brainstorm .bs-msg-oracle {
  align-self: flex-start;
  max-width: 100%;
  display: flex;
  gap: 12px;
  padding-right: 8px;
}
.brainstorm .bs-msg-oracle__avatar {
  flex-shrink: 0;
  width: 26px; height: 26px;
  margin-top: 3px;
  color: #C9A96D;
  font-family: "Silver Editorial", "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 0 8px rgba(201, 169, 109, 0.4));
}
.brainstorm .bs-msg-oracle__body {
  flex: 1;
  color: #E1E1DF;
  font-family: "Futura Cyrillic", var(--font-body), sans-serif;
  font-style: normal;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0.005em;
}
.brainstorm .bs-msg-oracle__body p { margin: 0 0 12px; }
.brainstorm .bs-msg-oracle__body p:last-child { margin-bottom: 0; }
.brainstorm .bs-msg-oracle__body strong {
  font-family: "Futura Cyrillic", var(--font-body), sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: 1em;
  color: #C9A96D;
  letter-spacing: 0.005em;
}
.brainstorm .bs-msg-oracle__body em {
  font-family: "Futura Cyrillic", var(--font-body), sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: 1em;
  color: #E0F251;
}
.brainstorm .bs-msg-oracle__greeting {
  display: block;
  margin-bottom: 4px;
  font-family: "Silver Editorial", "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 24px;
  line-height: 1.3;
  color: #E1E1DF;
}

/* Streaming caret — soft chartreuse blink at the tail of the body */
.brainstorm .bs-msg-oracle__caret {
  display: inline-block;
  width: 8px; height: 1em;
  margin-left: 2px;
  background: rgba(224, 242, 81, 0.7);
  vertical-align: -2px;
  animation: bsCaret 1s steps(2, end) infinite;
}
.brainstorm .bs-msg-oracle__cursor {
  display: inline-block;
  color: rgba(224, 242, 81, 0.7);
  letter-spacing: 0.2em;
}
@keyframes bsCaret {
  0%, 50%   { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

/* ─── 7 · ERROR MESSAGE (Phase 7 Part 9) ─────────────────────────────── */
.brainstorm .bs-msg-error {
  align-self: flex-start;
  max-width: 100%;
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(201, 169, 109, 0.30);
  border-radius: 12px;
  background: rgba(201, 169, 109, 0.04);
  opacity: 0.95;
}
.brainstorm .bs-msg-error .bs-msg-oracle__avatar {
  filter: drop-shadow(0 0 6px rgba(201, 169, 109, 0.25));
  opacity: 0.6;
}
.brainstorm .bs-msg-error__body {
  flex: 1;
  display: flex; flex-direction: column; gap: 8px;
}
.brainstorm .bs-msg-error__text {
  margin: 0;
  color: #A3A39E;
  font-family: "Futura Cyrillic", var(--font-body), sans-serif;
  font-size: 13.5px;
  line-height: 1.55;
  letter-spacing: 0.005em;
}
.brainstorm .bs-msg-error__retry {
  align-self: flex-start;
  background: transparent;
  border: none;
  padding: 0;
  color: #E0F251;
  font-family: "Futura Cyrillic", var(--font-body), sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 180ms ease;
}
.brainstorm .bs-msg-error__retry:hover { opacity: 0.7; }

/* ─── 8 · RATE-LIMIT RITUAL  (Section 10c) ───────────────────────────── */
.brainstorm .bs-limit {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 60px 28px;
  text-align: center;
  gap: 18px;
}
.brainstorm .bs-limit[hidden] { display: none; }

.brainstorm .bs-limit-spark {
  color: #F7D1AC;
  font-size: 22px;
  letter-spacing: 0.6em;
  margin-bottom: 4px;
}
.brainstorm .bs-limit-title {
  font-family: "Silver Editorial", "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 26px;
  line-height: 1.28;
  color: #E1E1DF;
  margin: 0;
  max-width: 300px;
}
.brainstorm .bs-limit-title em {
  color: #E0F251;
  font-style: italic;
}
.brainstorm .bs-limit-body {
  color: #A3A39E;
  font-size: 13px;
  line-height: 1.65;
  max-width: 280px;
  margin: 0;
}
.brainstorm .bs-limit-meta {
  margin-top: 14px;
  color: #C9A96D;
  font-family: "Futura Cyrillic", var(--font-body), sans-serif;
  font-size: 9.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

/* ─── 9 · COMPOSER ───────────────────────────────────────────────────── */
.brainstorm .bs-composer {
  position: relative; z-index: 3;
  /* Honor the iPhone home-indicator safe area; otherwise the composer
     touches the bottom of the screen on notched devices. */
  padding: 14px 16px max(22px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg,
    rgba(0,0,0,0)    0%,
    rgba(0,0,0,0.85) 28%,
    #000             60%);
}
.brainstorm .bs-composer-inner {
  display: flex; align-items: flex-end; gap: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(247, 209, 172, 0.18);
  border-radius: 22px;
  padding: 8px 8px 8px 16px;
  transition: border-color 220ms cubic-bezier(.4, 0, .2, 1);
}
.brainstorm .bs-composer-inner:focus-within {
  border-color: rgba(224, 242, 81, 0.55);
  box-shadow: 0 0 0 3px rgba(224, 242, 81, 0.06);
}
.brainstorm .bs-input {
  flex: 1; min-width: 0;
  background: transparent; border: none; outline: none; resize: none;
  color: #E1E1DF;
  font-family: "Futura Cyrillic", var(--font-body), sans-serif;
  /* MUST stay ≥ 16px on mobile — iOS Safari auto-zooms any focused input
     below 16px, which jolts the layout on first tap. Desktop (≥600px)
     drops to 14.5px in the override block below. */
  font-size: 16px;
  line-height: 1.5;
  padding: 7px 0;
  max-height: 110px;
}
.brainstorm .bs-input::placeholder {
  color: #A3A39E;
  font-style: italic;
  font-family: "Silver Editorial", "Cormorant Garamond", Georgia, serif;
  font-size: 16px;
}
.brainstorm .bs-input:disabled { cursor: not-allowed; }

.brainstorm .bs-send {
  flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 50%;
  background: #E0F251;
  border: 1px solid #E0F251;
  color: #000000;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition:
    transform 180ms cubic-bezier(.4, 0, .2, 1),
    box-shadow 220ms cubic-bezier(.4, 0, .2, 1),
    opacity 220ms cubic-bezier(.4, 0, .2, 1);
}
.brainstorm .bs-send:hover  { transform: translateY(-1px); box-shadow: 0 0 18px rgba(224, 242, 81, 0.4); }
.brainstorm .bs-send:disabled { opacity: 0.3; cursor: not-allowed; transform: none; box-shadow: none; }

.brainstorm .bs-composer-foot {
  margin-top: 10px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4px;
}
.brainstorm .bs-composer-hint {
  color: rgba(247, 209, 172, 0.4);
  font-family: "Futura Cyrillic", var(--font-body), sans-serif;
  font-size: 9px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.brainstorm .bs-composer-count {
  color: rgba(247, 209, 172, 0.35);
  font-family: "Futura Cyrillic", var(--font-body), sans-serif;
  font-size: 9px;
  letter-spacing: 0.18em;
}

/* ─── 10 · DESKTOP ───────────────────────────────────────────────────── */
@media (min-width: 600px) {
  .brainstorm .bs-header           { padding: 36px 28px 16px; }
  .brainstorm .bs-thread           { padding: 30px 36px 22px; }
  .brainstorm .bs-empty-title      { font-size: 32px; max-width: 360px; }
  .brainstorm .bs-msg-oracle__body     { font-size: 15px; line-height: 1.65; }
  .brainstorm .bs-msg-oracle__greeting { font-size: 24px; }
  .brainstorm .bs-msg-user         { font-size: 14px; line-height: 1.55; }
  .brainstorm .bs-prompt-chip      { font-size: 12.5px; line-height: 1.45; }
  .brainstorm .bs-limit            { padding: 80px 28px; }
  .brainstorm .bs-limit-title      { font-size: 30px; max-width: 360px; }
  .brainstorm .bs-composer         { padding: 18px 28px 28px; }
  .brainstorm .bs-input            { font-size: 14.5px; }
  .brainstorm .bs-input::placeholder { font-size: 14.5px; }
}

/* ─── 11 · REDUCED MOTION ────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .brainstorm .bs-prompt-chip,
  .brainstorm .bs-send,
  .brainstorm .bs-composer-inner { transition: none !important; }
  .brainstorm .bs-msg-oracle__caret { animation: none; }
  .brainstorm .bs-empty-mark img    { animation: none; }
}


/* ═════════════════════════════════════════════════════════════════════════
   Mobile polish — rounded button breathing room at iPhone widths.
   Pre-fix at 320–375px viewports, "SHARE MY READING ✦" overflowed the
   chamber action pills (0.22em letter-spacing was too aggressive in the
   ~130px content area). Tap targets bumped to ≥44px (iOS HIG).
   Desktop sizing untouched.
   ═════════════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  /* Chamber action pills — "SHARE MY READING ✦" / "BRAINSTORM" */
  .business-chamber__action {
    letter-spacing: 0.16em;
    padding: 13px 12px;     /* 13+13+9.5≈ 44px tap target */
    font-size: 10px;
  }

  /* Completion-moment primary CTA — "Continue to Your Chambers" */
  .cm-stage .cm-cta {
    letter-spacing: 0.18em;
    padding: 16px 20px;
    font-size: 12.5px;
  }

  /* Library card CTAs — "Visit ✦", locked "Sealed" */
  .library-ornate .chamber-card__cta { letter-spacing: 0.24em; }
  .library-ornate .chamber-card__cta--locked { letter-spacing: 0.22em; }

  /* ─── #4: Step bar — bigger label + breathing room above ─────────────── */
  .step-label,
  .eyebrow {
    font-size: 0.78rem;          /* was 0.72rem (~11.5px → ~12.5px) */
    letter-spacing: 0.2em;
    margin-top: 0.5rem;
    padding-top: 0.25rem;
  }

  /* ─── #5: Onboarding back/proceed row — back is icon-only on mobile,
         tighter gap so the primary CTA stays inside the viewport ──────── */
  .questions-actions {
    gap: 0.5rem;                 /* was 1rem */
  }
  #btn-questions-back.btn-ghost {
    padding: 0.7rem 0.6rem;
    font-size: 0;                /* hide "Back" label */
    letter-spacing: 0;
    flex: 0 0 auto;
  }
  #btn-questions-back.btn-ghost > span[aria-hidden="true"] {
    font-size: 1.25rem;          /* keep the ← arrow visible */
    line-height: 1;
  }

  /* ─── #6: Long button text wraps to two lines instead of overflowing ─── */
  .btn,
  .btn-primary,
  .btn-outline {
    white-space: normal;          /* was nowrap */
    line-height: 1.25;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    min-height: 52px;             /* room for two lines comfortably */
    border-radius: 26px;          /* matches the increased height */
    text-wrap: balance;           /* nicer two-line break point */
  }
  /* Slightly tighter letter-spacing on full-width CTAs at narrow widths
     so common labels still single-line whenever they fit. */
  .btn-full {
    letter-spacing: 0.18em;
  }

  /* ─── #7: Share modal full-screen on mobile ─────────────────────────── */
  .share-modal {
    padding: 0;
  }
  .share-modal__backdrop {
    background: var(--bg);        /* fully opaque — no reading bleed-through */
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .share-modal__panel {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    justify-content: center;
    padding: max(1.25rem, env(safe-area-inset-top, 0)) 1rem max(1.5rem, env(safe-area-inset-bottom, 0));
    gap: 1.25rem;
  }
  .share-modal__close {
    top: max(0.75rem, env(safe-area-inset-top, 0));
    right: 0.75rem;
  }
  .share-modal__preview-wrap {
    width: min(70vw, 280px);
  }

  /* ─── Onboarding & reading paragraph text — 18px / 1.6 (Polish issue #1).
     Form labels intentionally stay at 14px (designed). ────────────────── */
  .subtitle,
  .body-text,
  .calc-status,
  .home-tagline {
    font-size: 18px;
    line-height: 1.6;
  }
  .form-label {
    font-size: 14px;             /* designed — do not bump */
    line-height: 1.45;
  }

  /* Reading section paragraphs + lists at 18px / 1.65 */
  .section-content p,
  .section-content li {
    font-size: 18px;
    line-height: 1.65;
  }

  /* Mobile h1 / section title — 35px floor (Polish issue #1) */
  .section-heading,
  .section-title {
    font-size: clamp(2.1875rem, 7.5vw, 2.625rem);   /* 35-42px */
    line-height: 1.2;
  }
  .section-content h3 {
    font-size: clamp(1.625rem, 5vw, 2rem);          /* ~26-32px */
    line-height: 1.25;
  }
  .home-quote {
    font-size: clamp(1.85rem, 6.5vw, 2.25rem);
    line-height: 1.3;
  }
  .calc-headline {
    font-size: clamp(1.85rem, 6vw, 2.25rem);
    line-height: 1.2;
  }

  /* ─── Library + chamber descriptions — 18px ─────────────────────────── */
  .library-ornate__sub {
    font-size: 18px;
    line-height: 1.6;
  }
  .library-ornate .chamber-card__desc {
    font-size: 16px;             /* card body — slightly smaller than page copy */
    line-height: 1.55;
  }
  .library-ornate .chamber-card__subtitle {
    font-size: 15px;
    line-height: 1.4;
  }

  /* MythicBrand chamber accordion — summary + expanded body at 18px */
  .business-chamber .transmission__title {
    font-size: clamp(1.5rem, 4.5vw, 1.75rem);
    line-height: 1.25;
  }
  .business-chamber .transmission__subtitle {
    font-size: 15px;
    line-height: 1.5;
  }
  .business-chamber .transmission__body p {
    font-size: 18px;
    line-height: 1.65;
  }

  /* ─── Brainstorm chat bumps (Polish issue #1) ───────────────────────── */
  .brainstorm .bs-msg-user {
    font-size: 18px;
    line-height: 1.6;
  }
  .brainstorm .bs-msg-oracle__body {
    font-size: 18px;
    line-height: 1.65;
  }
  .brainstorm .bs-prompt-chip {
    font-size: 16px;
    line-height: 1.5;
  }

  /* ─── PWA install heading — gold + clearer copy (Polish issue #5) ──── */
  .install-ios__heading,
  .install-ios__heading em {
    color: var(--gold);
  }
}

