/* ═══════════════════════════════════════════════════════════════════════════
   WISE ELDER — Sacred Path Design System
   ═══════════════════════════════════════════════════════════════════════════
   
   Design Philosophy: The Labyrinth as Journey
   ─────────────────────────────────────────────
   The labyrinth is humanity's oldest journey metaphor. Unlike a maze, 
   it has no dead ends—only one winding path to the center. This design 
   embodies that promise: follow the path, and you will arrive.
   
   Visual Language: Ancient Craft, Modern Refinement
   ─────────────────────────────────────────────────────
   - Warm amber wood grain echoes hand-carved wisdom traditions
   - Cream parchment backgrounds suggest aged manuscripts & sacred texts
   - Generous negative space creates sanctuary, not clutter
   - Sharp geometric edges balance organic curved paths
   - Gold accents illuminate without demanding attention
   
   Typography: Cormorant Garamond (Wisdom) + Inter (Clarity)
   ─────────────────────────────────────────────────────────
   The heading font carries centuries of typographic tradition.
   The body font ensures effortless legibility on any device.
   
   Motion: Contemplative, Never Urgent
   ────────────────────────────────────
   Every animation respects the user's time and attention.
   Transitions are slow enough to notice, fast enough to never frustrate.
   
   Accessibility: Universal Design is Sacred Design
   ─────────────────────────────────────────────────
   All color combinations exceed WCAG AA standards.
   Reduced motion preferences are honored.
   Focus states are visible and beautiful.
   
   ═══════════════════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════════════════
   CSS CUSTOM PROPERTIES — THE DESIGN TOKENS
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* ─────────────────────────────────────────────────────────────────────────
     Primary Palette — Extracted from Labyrinth Image
     ───────────────────────────────────────────────────────────────────────── */
  
  /* Amber Wood Tones — The Carved Path */
  --color-amber-deep: #8B6914;        /* Deep carved grooves */
  --color-amber-rich: #A67C00;        /* Rich wood grain */
  --color-amber-warm: #C49A3D;        /* Warm golden wood */
  --color-amber-light: #D4B366;       /* Sunlit edges */
  --color-amber-glow: #E8C97A;        /* Luminous highlights */
  
  /* Parchment Tones — The Sacred Ground */
  --color-parchment-dark: #D4C5A9;    /* Aged, shadowed */
  --color-parchment-mid: #E5D9C3;     /* Natural texture */
  --color-parchment-light: #F2EBE0;   /* Illuminated surface */
  --color-parchment-cream: #FAF6EF;   /* Purest ground */
  
  /* Shadow & Depth — Visual Hierarchy */
  --color-shadow-deep: #3D3425;       /* Deepest shadow */
  --color-shadow-mid: #5C4F3D;        /* Medium shadow */
  --color-shadow-soft: #7A6B55;       /* Soft shadow */
  --color-text-primary: #2C2416;      /* Primary text */
  --color-text-secondary: #5C4F3D;    /* Secondary text */
  --color-text-muted: #8B7D69;        /* Muted, supporting text */
  
  /* Functional Overlays — Increased for text readability */
  --overlay-dark: rgba(44, 36, 22, 0.65);
  --overlay-medium: rgba(44, 36, 22, 0.55);
  --overlay-light: rgba(44, 36, 22, 0.45);
  
  /* ─────────────────────────────────────────────────────────────────────────
     Semantic Colors
     ───────────────────────────────────────────────────────────────────────── */
  --color-success: #5D7A5D;
  --color-success-soft: rgba(93, 122, 93, 0.15);
  --color-warning: #A67C00;
  --color-warning-soft: rgba(166, 124, 0, 0.15);
  --color-error: #9A4A4A;
  --color-error-soft: rgba(154, 74, 74, 0.15);
  
  /* ─────────────────────────────────────────────────────────────────────────
     Surface & Card Treatments
     ───────────────────────────────────────────────────────────────────────── */
  --surface-glass: rgba(250, 246, 239, 0.85);
  --surface-glass-hover: rgba(250, 246, 239, 0.92);
  --surface-frosted: rgba(242, 235, 224, 0.75);
  --surface-subtle: rgba(229, 217, 195, 0.4);
  
  /* ─────────────────────────────────────────────────────────────────────────
     Borders & Visual Edges
     ───────────────────────────────────────────────────────────────────────── */
  --border-subtle: rgba(139, 105, 20, 0.12);
  --border-visible: rgba(139, 105, 20, 0.25);
  --border-strong: rgba(139, 105, 20, 0.4);
  --border-accent: var(--color-amber-warm);
  
  /* ─────────────────────────────────────────────────────────────────────────
     Shadows — Depth & Elevation
     ───────────────────────────────────────────────────────────────────────── */
  --shadow-subtle: 0 1px 3px rgba(44, 36, 22, 0.08);
  --shadow-soft: 0 4px 12px rgba(44, 36, 22, 0.10);
  --shadow-medium: 0 8px 24px rgba(44, 36, 22, 0.12);
  --shadow-deep: 0 16px 48px rgba(44, 36, 22, 0.16);
  --shadow-glow-amber: 0 0 24px rgba(196, 154, 61, 0.25);
  --shadow-inner-warmth: inset 0 0 40px rgba(196, 154, 61, 0.08);
  
  /* ─────────────────────────────────────────────────────────────────────────
     Typography
     ───────────────────────────────────────────────────────────────────────── */
  /* Typography */
  --font-heading: 'Cormorant Garamond', 'Garamond', 'Georgia', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-reading: 'Source Serif 4', 'Georgia', 'Times New Roman', serif;  /* For long text reading */
  
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.25rem;     /* 20px */
  --text-2xl: 1.5rem;     /* 24px */
  --text-3xl: 2rem;       /* 32px */
  --text-4xl: 2.5rem;     /* 40px */
  --text-5xl: 3.25rem;    /* 52px */
  
  /* ─────────────────────────────────────────────────────────────────────────
     Spacing — Generous for Sanctuary Feel
     ───────────────────────────────────────────────────────────────────────── */
  --space-1: 0.25rem;     /* 4px */
  --space-2: 0.5rem;      /* 8px */
  --space-3: 0.75rem;     /* 12px */
  --space-4: 1rem;        /* 16px */
  --space-5: 1.25rem;     /* 20px */
  --space-6: 1.5rem;      /* 24px */
  --space-8: 2rem;        /* 32px */
  --space-10: 2.5rem;     /* 40px */
  --space-12: 3rem;       /* 48px */
  --space-16: 4rem;       /* 64px */
  --space-20: 5rem;       /* 80px */
  --space-24: 6rem;       /* 96px */
  
  /* ─────────────────────────────────────────────────────────────────────────
     Border Radius — Sharp, Architectural
     ───────────────────────────────────────────────────────────────────────── */
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-full: 9999px;
  
  /* ─────────────────────────────────────────────────────────────────────────
     Transitions — Contemplative, Organic Motion
     ───────────────────────────────────────────────────────────────────────── */
  --ease-gentle: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-enter: cubic-bezier(0, 0, 0.2, 1);
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);
  
  --duration-instant: 150ms;
  --duration-fast: 250ms;
  --duration-normal: 400ms;
  --duration-slow: 600ms;
  --duration-glacial: 900ms;
  
  /* ─────────────────────────────────────────────────────────────────────────
     Layout Constraints
     ───────────────────────────────────────────────────────────────────────── */
  --max-width-content: 720px;
  --max-width-wide: 900px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   RESET & BASE STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text-primary);
  background-color: var(--color-parchment-mid);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* ═══════════════════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--color-text-primary);
}

h1 {
  font-size: var(--text-5xl);
  letter-spacing: 0.04em;
}

h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-6);
}

h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
}

p {
  margin-bottom: var(--space-4);
}

a {
  color: var(--color-amber-rich);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-gentle);
}

a:hover {
  color: var(--color-amber-deep);
}

/* Accent Text Gradient */
.text-accent {
  background: linear-gradient(135deg, var(--color-amber-deep) 0%, var(--color-amber-warm) 50%, var(--color-amber-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ═══════════════════════════════════════════════════════════════════════════
   APPLICATION SHELL
   ═══════════════════════════════════════════════════════════════════════════ */

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
}

/* ─────────────────────────────────────────────────────────────────────────
   Background Image Treatment — The Labyrinth
   ───────────────────────────────────────────────────────────────────────── */

.app::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url('./images/Labyrinth.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.app::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    160deg,
    rgba(44, 36, 22, 0.58) 0%,
    rgba(44, 36, 22, 0.52) 40%,
    rgba(44, 36, 22, 0.55) 100%
  );
  backdrop-filter: blur(1px);
}


/* ═══════════════════════════════════════════════════════════════════════════
   CONTAINER
   ═══════════════════════════════════════════════════════════════════════════ */

.container {
  width: 100%;
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: var(--space-8);
}


/* ═══════════════════════════════════════════════════════════════════════════
   HEADER — THE THRESHOLD
   ═══════════════════════════════════════════════════════════════════════════ */

.header {
  text-align: center;
  padding: var(--space-6) var(--space-8) var(--space-4);
  position: relative;
  animation: fadeInGently 1.2s var(--ease-enter) both;
}

@keyframes fadeInGently {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header__icon {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-6);
  display: inline-block;
  animation: gentlePulse 4s var(--ease-gentle) infinite;
}

@keyframes gentlePulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 8px rgba(196, 154, 61, 0.2));
  }
  50% {
    transform: scale(1.03);
    filter: drop-shadow(0 0 20px rgba(196, 154, 61, 0.35));
  }
}

.header__title {
  font-size: var(--text-5xl);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: none;
  color: #FFFFFF;  /* Pure white for maximum contrast */
  margin-bottom: var(--space-2);
  text-shadow: 
    0 2px 4px rgba(44, 36, 22, 0.4),
    0 4px 20px rgba(44, 36, 22, 0.3);
}

.header__subtitle {
  font-family: var(--font-body);
  color: #FAF6EF;  /* Parchment cream for better contrast */
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(44, 36, 22, 0.5);
}

/* Header Navigation */
.header__nav {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  margin-top: var(--space-6);
  flex-wrap: wrap;
}

.header__nav-link {
  color: #FAF6EF;  /* Parchment cream for WCAG AA contrast */
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  transition: all var(--duration-normal) var(--ease-gentle);
  text-shadow: 0 1px 3px rgba(44, 36, 22, 0.5);
}

.header__nav-link:hover {
  color: var(--color-amber-light);
  background: rgba(196, 154, 61, 0.12);
}


/* ═══════════════════════════════════════════════════════════════════════════
   LANGUAGE SWITCHER
   ═══════════════════════════════════════════════════════════════════════════ */

.lang-switcher {
  position: absolute;
  top: var(--space-6);
  right: var(--space-8);
  z-index: 50;
}

.lang-switcher__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-gentle);
  box-shadow: var(--shadow-subtle);
}

.lang-switcher__btn:hover {
  background: var(--surface-glass-hover);
  border-color: var(--border-visible);
  color: var(--color-amber-rich);
}

.lang-switcher__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  background: var(--surface-glass-hover);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  min-width: 140px;
  box-shadow: var(--shadow-medium);
  z-index: 100;
}

.lang-switcher__dropdown.open {
  display: block;
  animation: dropdownReveal var(--duration-fast) var(--ease-enter);
}

@keyframes dropdownReveal {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.lang-switcher__option {
  display: flex;
  align-items: center;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: transparent;
  border: none;
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  text-align: left;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-gentle);
}

.lang-switcher__option:hover {
  background: var(--surface-subtle);
  color: var(--color-amber-rich);
}

.lang-flag {
  width: 18px;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
}

.lang-flag-sm {
  width: 16px;
  height: auto;
  border-radius: 2px;
  margin-right: var(--space-3);
}


/* ═══════════════════════════════════════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════════════════════════════════════ */

.section {
  padding: var(--space-6) 0;
  animation: sectionReveal var(--duration-slow) var(--ease-enter) both;
}

.section--hidden {
  display: none;
}

.section__title {
  text-align: center;
  margin-bottom: var(--space-10);
  color: var(--color-parchment-cream);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 6px rgba(44, 36, 22, 0.7);
}

@keyframes sectionReveal {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   PHASE INDICATOR — THE PATH MARKERS
   ═══════════════════════════════════════════════════════════════════════════ */

.phase-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
}

.phase-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--color-parchment-dark);
  border: 1.5px solid var(--border-visible);
  transition: all var(--duration-normal) var(--ease-gentle);
}

.phase-dot--active {
  background: var(--color-amber-warm);
  border-color: var(--color-amber-warm);
  box-shadow: var(--shadow-glow-amber);
  transform: scale(1.3);
}

.phase-dot--complete {
  background: var(--color-success);
  border-color: var(--color-success);
  cursor: pointer;
}

.phase-dot--complete:hover {
  transform: scale(1.3);
  box-shadow: 0 0 8px var(--color-success);
}

.phase-dot--clickable {
  cursor: pointer;
}

.phase-dot--clickable:hover:not(.phase-dot--active) {
  transform: scale(1.2);
}


/* ═══════════════════════════════════════════════════════════════════════════
   GREETING CARD — THE ELDER'S VOICE
   ═══════════════════════════════════════════════════════════════════════════ */

.greeting {
  background: #FAF8F3;
  border: none;
  border-left: 4px solid var(--color-amber-warm);
  border-radius: var(--radius-md);
  padding: var(--space-8);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-soft);
  transition: all var(--duration-normal) var(--ease-gentle);
}

.greeting:hover {
  border-color: var(--color-amber-rich);
  box-shadow: var(--shadow-medium);
}

.greeting__text {
  font-family: var(--font-reading);
  font-size: var(--text-lg);
  font-weight: 400;
  font-style: italic;
  color: var(--color-text-primary);
  line-height: 1.85;
}

.greeting__text::before {
  content: '"';
  color: var(--color-amber-warm);
  margin-right: 0.3em;
}

.greeting__text::after {
  content: '"';
  color: var(--color-amber-warm);
  margin-left: 0.3em;
}

.greeting__signature {
  text-align: right;
  color: var(--color-amber-rich);
  margin-top: var(--space-5);
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 500;
  font-style: normal;
  letter-spacing: 0.04em;
}


/* ═══════════════════════════════════════════════════════════════════════════
   DREAM INPUT — THE INVITATION
   ═══════════════════════════════════════════════════════════════════════════ */

.dream-input {
  width: 100%;
}

.dream-input__label {
  display: block;
  color: var(--color-parchment-cream);
  margin-bottom: var(--space-5);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 4px rgba(44, 36, 22, 0.6);
}

.dream-input__textarea {
  width: 100%;
  min-height: 200px;
  padding: var(--space-6);
  background: #FFFFFF;
  border: 1px solid var(--border-visible);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-family: var(--font-reading);
  font-size: var(--text-lg);
  font-weight: 400;
  line-height: 1.8;
  resize: vertical;
  transition: all var(--duration-normal) var(--ease-gentle);
  box-shadow: var(--shadow-soft);
}

.dream-input__textarea:focus {
  outline: none;
  border-color: var(--color-amber-warm);
  box-shadow: var(--shadow-medium), 0 0 0 3px rgba(196, 154, 61, 0.1);
}

.dream-input__textarea::placeholder {
  color: var(--color-text-muted);
  font-style: italic;
}


/* ═══════════════════════════════════════════════════════════════════════════
   CHARACTER COUNTER
   ═══════════════════════════════════════════════════════════════════════════ */

.char-counter {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-1);
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.char-counter--warning {
  color: var(--color-warning);
}

.char-counter--error {
  color: var(--color-error);
  font-weight: 600;
}


/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS — CALLS TO ACTION
   ═══════════════════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-gentle);
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-amber-deep) 0%, var(--color-amber-warm) 100%);
  color: var(--color-parchment-cream);
  box-shadow: var(--shadow-soft), 0 0 0 0 rgba(196, 154, 61, 0);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium), var(--shadow-glow-amber);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--shadow-subtle);
}

.btn--secondary {
  background: transparent;
  border: 1.5px solid var(--color-amber-warm);
  color: var(--color-amber-rich);
}

.btn--secondary:hover {
  background: rgba(196, 154, 61, 0.08);
  box-shadow: var(--shadow-glow-amber);
}

.btn--outline {
  background: transparent;
  border: 1.5px solid var(--color-parchment-light);
  color: var(--color-parchment-cream);
}

.btn--outline:hover {
  background: rgba(250, 246, 239, 0.1);
  border-color: var(--color-amber-light);
  color: var(--color-amber-light);
  box-shadow: var(--shadow-glow-amber);
}

.btn--large {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-base);
}

.btn__icon {
  font-size: 1.15em;
  transition: transform var(--duration-normal) var(--ease-gentle);
}

.btn:hover .btn__icon {
  animation: iconPulse 0.6s var(--ease-gentle);
}

@keyframes iconPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   QUESTION CARDS — DEEP INQUIRY
   ═══════════════════════════════════════════════════════════════════════════ */

.questions {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.question-card {
  background: #FFFFFF;
  border: 1px solid var(--border-visible);
  border-radius: var(--radius-md);
  padding: var(--space-8);
  box-shadow: var(--shadow-soft);
  transition: all var(--duration-normal) var(--ease-gentle);
}

.question-card:hover {
  border-color: var(--border-visible);
  box-shadow: var(--shadow-medium), var(--shadow-inner-warmth);
}

.question-card__category {
  display: inline-block;
  background: rgba(166, 124, 0, 0.12);
  color: var(--color-amber-rich);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-4);
}

.question-card__label {
  display: block;
  font-family: var(--font-reading);
  color: var(--color-text-primary);
  margin-bottom: var(--space-5);
  font-size: 1.25rem;  /* 20px base */
  font-weight: 400;
  font-style: italic;
  line-height: 1.7;
}

.question-card__input {
  width: 100%;
  min-height: 120px;
  padding: var(--space-5);
  background: #FAFAFA;
  border: 1px solid var(--border-visible);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-family: var(--font-reading);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.8;
  resize: vertical;
  transition: all var(--duration-normal) var(--ease-gentle);
}

.question-card__input:focus {
  outline: none;
  border-color: var(--color-amber-warm);
  background: var(--surface-glass);
  box-shadow: 0 0 0 3px rgba(196, 154, 61, 0.1);
}


/* ═══════════════════════════════════════════════════════════════════════════
   DREAM REVIEW COLLAPSIBLE
   ═══════════════════════════════════════════════════════════════════════════ */

.dream-review {
  background: #FAF8F3;
  border: 1px solid var(--border-visible);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-8);
  overflow: hidden;
}

.dream-review__summary {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  cursor: pointer;
  color: var(--color-text-primary);
  font-size: var(--text-base);
  font-weight: 500;
  transition: all var(--duration-fast) var(--ease-gentle);
  list-style: none;
}

.dream-review__summary::-webkit-details-marker {
  display: none;
}

.dream-review__summary::after {
  content: '▾';
  margin-left: auto;
  font-size: var(--text-sm);
  color: var(--color-amber-warm);
  transition: transform var(--duration-fast) var(--ease-gentle);
}

.dream-review[open] .dream-review__summary::after {
  transform: rotate(180deg);
}

.dream-review__summary:hover {
  background: var(--surface-subtle);
  color: var(--color-amber-rich);
}

.dream-review__icon {
  font-size: 1em;
}

.dream-review__content {
  padding: var(--space-6);
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-heading);
  color: var(--color-text-secondary);
  font-style: italic;
  font-weight: 300;
  line-height: 1.8;
  max-height: 280px;
  overflow-y: auto;
  white-space: pre-wrap;
  background: var(--surface-subtle);
}


/* ═══════════════════════════════════════════════════════════════════════════
   CLOSING INVITATION
   ═══════════════════════════════════════════════════════════════════════════ */

.closing-invitation {
  margin-top: var(--space-8);
  padding: var(--space-6);
  text-align: center;
  border-radius: var(--radius-md);
  background: #FAF8F3;
  border: 1px solid var(--border-visible);
}

.closing-invitation__text {
  font-family: var(--font-reading);
  color: var(--color-text-primary);
  font-size: var(--text-base);
  font-weight: 400;
  font-style: italic;
  line-height: 1.7;
  margin: 0;
}


/* ═══════════════════════════════════════════════════════════════════════════
   ANALYSIS DISPLAY — THE REVELATION
   ═══════════════════════════════════════════════════════════════════════════ */

.analysis {
  background: #FFFFFF;
  border: 1px solid var(--border-visible);
  border-radius: var(--radius-md);
  padding: var(--space-10);
  box-shadow: var(--shadow-soft);
}

.analysis__content {
  font-family: var(--font-heading);
  font-weight: 300;
  line-height: 1.9;
  color: var(--color-text-primary);
  font-size: var(--text-lg);
}

.analysis__content h1,
.analysis__content h2,
.analysis__content h3 {
  color: var(--color-text-primary);
  margin-top: var(--space-10);
  margin-bottom: var(--space-5);
  font-weight: 400;
}

.analysis__content h1 {
  font-size: 1.5rem;  /* 24px - reduced from browser default */
}

.analysis__content h2 {
  font-size: 1.25rem;  /* 20px */
}

.analysis__content h3 {
  font-size: 1.125rem;  /* 18px */
}

.analysis__content h1:first-child,
.analysis__content h2:first-child {
  margin-top: 0;
}

.analysis__content strong {
  color: var(--color-amber-rich);
  font-weight: 500;
}

.analysis__content em {
  font-style: italic;
}

.analysis__content blockquote {
  border-left: 3px solid var(--color-amber-warm);
  padding: var(--space-5) var(--space-6);
  margin: var(--space-8) 0;
  background: rgba(166, 124, 0, 0.06);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--color-text-secondary);
  font-style: italic;
}

.analysis__content ul,
.analysis__content ol {
  margin: var(--space-5) 0;
  padding-left: var(--space-8);
}

.analysis__content li {
  margin-bottom: var(--space-3);
}

.analysis__content li::marker {
  color: var(--color-amber-warm);
}

/* Glossary Links in Analysis/Roadmap */
.glossary-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--color-amber-warm);
  text-underline-offset: 3px;
  transition: all var(--duration-fast) var(--ease-gentle);
  cursor: help;
}

.glossary-link:hover {
  color: var(--color-amber-rich);
  text-decoration-style: solid;
  background: rgba(166, 124, 0, 0.08);
  border-radius: 2px;
  padding: 0 2px;
  margin: 0 -2px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   ROADMAP PROMPT
   ═══════════════════════════════════════════════════════════════════════════ */

.roadmap-prompt {
  text-align: center;
  margin-top: var(--space-12);
  padding: var(--space-10);
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.roadmap-prompt__text {
  font-family: var(--font-heading);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
  font-size: var(--text-lg);
  font-weight: 300;
  font-style: italic;
}


/* ═══════════════════════════════════════════════════════════════════════════
   LOADING STATES
   ═══════════════════════════════════════════════════════════════════════════ */

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  padding: var(--space-16);
  color: var(--color-text-muted);
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-style: italic;
}

.loading__spinner {
  width: 36px;
  height: 36px;
  border: 2px solid var(--border-visible);
  border-top-color: var(--color-amber-warm);
  border-radius: var(--radius-full);
  animation: spinSlow 1.4s linear infinite;
}

@keyframes spinSlow {
  to {
    transform: rotate(360deg);
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */

.footer {
  text-align: center;
  padding: var(--space-12) var(--space-8);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  margin-top: auto;
  background: linear-gradient(to top, rgba(229, 217, 195, 0.7), transparent);
}

.footer__quote {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 500;
  color: #FFFFFF;  /* Pure white for better contrast */
  margin-bottom: var(--space-3);
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.5rem;
    /* 20px - Apple HIG: body text minimum 17px, we use larger for emphasis */
  line-height: 1.6;
  text-shadow: 0 2px 8px rgba(44, 36, 22, 0.85);  /* Stronger shadow for better readability */
  position: relative;
}

.footer__quote::before {
  content: '"';
  font-size: 2.5rem;
  font-style: normal;
  line-height: 1;
  vertical-align: -0.2em;
  margin-right: 0.1em;
}

.footer__quote::after {
  content: '"';
  font-size: 2.5rem;
  font-style: normal;
  line-height: 1;
  vertical-align: -0.2em;
  margin-left: 0.05em;
}

.footer p[data-i18n="footerAuthor"] {
  font-family: var(--font-heading);
  font-size: 1.0625rem;  /* 17px - Apple HIG minimum for body text */
  font-weight: 500;
  color: var(--color-parchment-cream);
  margin-bottom: var(--space-8);
  text-shadow: 0 1px 4px rgba(44, 36, 22, 0.6);
}

.footer__disclaimer {
  font-size: 0.6875rem;  /* 11px - smaller for less prominence */
  color: var(--color-parchment-mid);  /* Better contrast than parchment-dark */
  margin-top: var(--space-4);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
  text-shadow: 0 1px 3px rgba(44, 36, 22, 0.5);
}


/* ═══════════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

.toast-container {
  position: fixed;
  top: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}

.toast {
  background: var(--surface-glass-hover);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-8);
  color: var(--color-text-primary);
  font-size: var(--text-sm);
  box-shadow: var(--shadow-deep);
  pointer-events: auto;
  animation: toastSlideIn 0.4s var(--ease-enter), toastFadeOut 0.4s var(--ease-exit) 2.6s forwards;
  max-width: 90vw;
  text-align: center;
}

.toast--warning {
  border-color: var(--color-warning);
  background: var(--color-warning-soft);
}

.toast--error {
  border-color: var(--color-error);
  background: rgba(154, 74, 74, 0.95);  /* Much more opaque for better visibility */
  color: #FFFFFF;  /* White text for contrast */
  font-weight: 500;
  animation: toastSlideIn 0.4s var(--ease-enter), toastFadeOut 0.4s var(--ease-exit) 5.6s forwards;  /* Longer display time */
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastFadeOut {
  to {
    opacity: 0;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════════════════════ */

.text-center { text-align: center; }
.mt-lg { margin-top: var(--space-6); }
.mt-xl { margin-top: var(--space-8); }
.mb-lg { margin-bottom: var(--space-6); }
.mb-xl { margin-bottom: var(--space-8); }


/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════════════════════════ */

/* Tablet Portrait & Below */
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  
  .app::before {
    background-attachment: scroll;
  }
  
  .app::after {
    background: linear-gradient(
      160deg,
      rgba(44, 36, 22, 0.45) 0%,
      rgba(44, 36, 22, 0.35) 40%,
      rgba(44, 36, 22, 0.40) 100%
    );
  }
  
  .container {
    padding: var(--space-6);
  }
  
  .header {
    padding: var(--space-16) var(--space-6) var(--space-10);
  }
  
  .header__title {
    font-size: var(--text-4xl);
  }
  
  .header__icon {
    font-size: var(--text-3xl);
  }
  
  .header__nav {
    gap: var(--space-3);
    margin-top: var(--space-4);
  }
  
  .header__nav-link {
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-3);
  }
  
  .lang-switcher {
    right: var(--space-6);
    top: var(--space-4);
  }
  
  .lang-switcher__btn {
    padding: var(--space-2) var(--space-3);
  }
  
  .greeting {
    padding: var(--space-8);
  }
  
  .greeting__text {
    font-size: var(--text-lg);
  }
  
  .dream-input__textarea {
    min-height: 200px;
    padding: var(--space-6);
    font-size: var(--text-base);
  }
  
  .question-card {
    padding: var(--space-6);
  }
  
  .btn--large {
    padding: var(--space-4) var(--space-8);
    width: 100%;
    min-height: 56px;
  }
  
  .analysis {
    padding: var(--space-8);
  }
  
  .roadmap-prompt {
    padding: var(--space-8);
  }
  
  .footer {
    padding: var(--space-10) var(--space-6);
  }
}

/* Mobile */
@media (max-width: 480px) {
  .container {
    padding: var(--space-4);
  }

  .header {
    padding: var(--space-12) var(--space-4) var(--space-8);
  }

  .header__title {
    font-size: var(--text-3xl);
    letter-spacing: 0.06em;
  }

  .section__title {
    font-size: var(--text-xl);  /* 20px instead of 24px on mobile */
    margin-bottom: var(--space-8);
  }

  .greeting {
    padding: var(--space-6);
  }

  .btn--large {
    min-height: 52px;
  }

  .footer__quote {
    font-size: 1.125rem;  /* 18px on mobile for better visibility */
  }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
  .greeting__text {
    font-size: 1.25rem;
    font-weight: 500;
  }
  
  .dream-input__textarea {
    font-size: 1.125rem;
    font-weight: 500;
  }
}

/* Large Screens */
@media (min-width: 1200px) {
  .container {
    max-width: var(--max-width-wide);
  }
  
  .analysis {
    padding: var(--space-12);
  }
  
  .header {
    padding: var(--space-6) var(--space-8) var(--space-4);
  }
  
  .greeting__text {
    font-size: 1.375rem;  /* 22px for large screens */
    font-weight: 500;
  }
  
  .dream-input__textarea {
    font-size: 1.25rem;  /* 20px for large screens */
    font-weight: 500;
    min-height: 220px;
  }
  
  .question-card__label {
    font-size: 1.375rem;  /* 22px for large screens */
  }
  
  .analysis__content {
    font-size: 1.25rem;  /* 20px for large screens */
  }
  
  .dream-review__summary {
    font-size: 1.125rem;  /* 18px for large screens */
  }
  
  .dream-review__content {
    font-size: 1.125rem;  /* 18px for large screens */
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   ACCESSIBILITY
   ═══════════════════════════════════════════════════════════════════════════ */

/* Focus States */
*:focus-visible {
  outline: 2px solid var(--color-amber-warm);
  outline-offset: 2px;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(196, 154, 61, 0.3);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   HIDDEN ELEMENTS
   ═══════════════════════════════════════════════════════════════════════════ */

.music-toggle {
  display: none;
}


/* ═══════════════════════════════════════════════════════════════════════════
   ABOUT LINK & MODAL
   ═══════════════════════════════════════════════════════════════════════════ */

.footer__about-link {
  display: inline-block;
  margin-top: var(--space-6);
  color: var(--color-parchment-light);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: 0 1px 3px rgba(44, 36, 22, 0.5);
  transition: all var(--duration-normal) var(--ease-gentle);
}

.footer__about-link:hover {
  color: var(--color-amber-light);
}

.footer__separator {
  display: inline-block;
  margin: var(--space-6) var(--space-2) 0;
  color: var(--color-parchment-light);
  font-size: var(--text-xs);
  text-shadow: 0 1px 3px rgba(44, 36, 22, 0.5);
}

/* Modal */
.about-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}

.about-modal.open {
  display: flex;
  animation: modalFadeIn var(--duration-normal) var(--ease-enter);
}

.about-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(44, 36, 22, 0.75);
  backdrop-filter: blur(4px);
}

.about-modal__content {
  position: relative;
  background: var(--color-parchment-cream);
  border-radius: var(--radius-lg);
  padding: var(--space-10);
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-deep);
  text-align: center;
  animation: modalSlideUp var(--duration-normal) var(--ease-enter);
}

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

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.about-modal__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--color-text-muted);
  font-size: var(--text-2xl);
  font-weight: 300;
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-gentle);
  line-height: 1;
}

.about-modal__close:hover {
  color: var(--color-text-primary);
}

.about-modal__title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--color-text-primary);
  margin-bottom: var(--space-6);
}

.about-modal__text {
  font-family: var(--font-reading);
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}

.about-modal__text--small {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-style: italic;
}

.about-modal__support-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-6);
  padding: var(--space-3) var(--space-6);
  background: linear-gradient(135deg, var(--color-amber-deep) 0%, var(--color-amber-warm) 100%);
  color: var(--color-parchment-cream);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--duration-normal) var(--ease-gentle);
  box-shadow: var(--shadow-soft);
}

.about-modal__support-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium), var(--shadow-glow-amber);
  color: var(--color-parchment-cream);
}

.about-modal__arrow {
  transition: transform var(--duration-fast) var(--ease-gentle);
}

.about-modal__support-link:hover .about-modal__arrow {
  transform: translateX(4px);
}