/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --color-bg:          #faf8f5;
  --color-surface:     #ffffff;
  --color-surface-2:   #f4f0eb;
  --color-text:        #2d2b3d;
  --color-text-muted:  #7a7590;
  --color-text-light:  #a09ab8;
  --color-lavender:    #b8a9c9;
  --color-lavender-lt: #ede8f5;
  --color-lavender-md: #d4cce6;
  --color-sage:        #8aab82;
  --color-sage-lt:     #ddebd9;
  --color-sage-dk:     #6a8f62;
  --color-rose:        #c9a7a7;
  --color-rose-lt:     #f0e4e4;
  --color-gold:        #c9b07a;
  --color-gold-lt:     #f5edd8;
  --color-border:      #e8e4dd;
  --color-border-lt:   #f0ece6;

  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans:  'Lato', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  --text-xs:   0.72rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.375rem;
  --text-2xl:  1.75rem;
  --text-3xl:  2.375rem;
  --text-4xl:  3.25rem;
  --text-5xl:  4rem;

  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  --radius-sm:   4px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --radius-full: 9999px;

  --shadow-card:  0 2px 20px rgba(45, 43, 61, 0.07);
  --shadow-card2: 0 4px 32px rgba(45, 43, 61, 0.10);
  --shadow-btn:   0 4px 14px rgba(45, 43, 61, 0.18);

  --dur-fast:   150ms;
  --dur-normal: 280ms;
  --dur-slow:   480ms;
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background-color: var(--color-border);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.65;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: inherit;
}

/* ============================================================
   APP WRAPPER
   ============================================================ */
#app {
  position: relative;
  min-height: 100dvh;
  background-color: var(--color-bg);
  max-width: 480px;
  margin: 0 auto;
  box-shadow: 0 0 60px rgba(0,0,0,0.12);
  overflow: hidden;
}

/* ============================================================
   SCREEN LAYER SYSTEM
   ============================================================ */
.screen {
  position: absolute;
  inset: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-8) var(--space-5) calc(env(safe-area-inset-bottom) + var(--space-16));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;

  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
  will-change: opacity, transform;
}

.screen.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  position: relative;
}

.screen.is-exiting {
  opacity: 0;
  transform: translateY(-16px);
  pointer-events: none;
  position: absolute;
}

/* Star field background (decorative) */
.screen::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle 1.5px at 15% 20%, var(--color-lavender) 100%, transparent 0),
    radial-gradient(circle 1px at 75% 12%, var(--color-lavender) 100%, transparent 0),
    radial-gradient(circle 1px at 42% 8%, var(--color-rose) 100%, transparent 0),
    radial-gradient(circle 1.5px at 88% 35%, var(--color-lavender) 100%, transparent 0),
    radial-gradient(circle 1px at 5% 55%, var(--color-sage) 100%, transparent 0),
    radial-gradient(circle 1.5px at 60% 65%, var(--color-lavender) 100%, transparent 0),
    radial-gradient(circle 1px at 25% 78%, var(--color-rose) 100%, transparent 0),
    radial-gradient(circle 1px at 92% 80%, var(--color-sage) 100%, transparent 0),
    radial-gradient(circle 1.5px at 50% 92%, var(--color-lavender) 100%, transparent 0);
  opacity: 0.5;
  z-index: 0;
}

.screen > * {
  position: relative;
  z-index: 1;
}

/* ============================================================
   BOTANICAL DECORATIONS (corner overlays)
   ============================================================ */
.botanical-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.botanical-bg svg {
  position: absolute;
  opacity: 0.12;
}

.botanical-bg .corner-tl {
  top: -20px;
  left: -20px;
  width: 160px;
  height: 160px;
}

.botanical-bg .corner-br {
  bottom: -20px;
  right: -20px;
  width: 140px;
  height: 140px;
  transform: rotate(180deg);
}

/* ============================================================
   BOTANICAL HEADER
   ============================================================ */
.botanical-header {
  text-align: center;
  padding: var(--space-6) 0 var(--space-4);
  width: 100%;
}

.botanical-header__ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.botanical-header__ornament svg {
  width: 40px;
  height: 40px;
  opacity: 0.75;
}

.botanical-header__ornament .line {
  height: 1px;
  width: 48px;
  background: var(--color-border);
}

.botanical-header__sup {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.botanical-header__names {
  font-family: var(--font-serif);
  font-size: var(--text-5xl);
  font-weight: 300;
  line-height: 1.05;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.botanical-header__names .ampersand {
  font-style: italic;
  color: var(--color-lavender);
  display: block;
  font-size: 0.75em;
  line-height: 1;
}

.botanical-header__date {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-style: normal;
  font-weight: 600;
  color: var(--color-gold);
  margin-top: var(--space-3);
  letter-spacing: 0.02em;
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress {
  width: 100%;
  max-width: 480px;
  padding: 0 var(--space-2) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.progress__track {
  width: 100%;
  height: 3px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-lavender), var(--color-sage));
  border-radius: var(--radius-full);
  transition: width var(--dur-slow) var(--ease-out);
}

.progress__steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.progress__dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-border);
  transition: all var(--dur-normal) var(--ease-out);
}

.progress__step.is-done .progress__dot {
  background: var(--color-sage);
  transform: scale(1.1);
}

.progress__step.is-active .progress__dot {
  background: var(--color-lavender);
  transform: scale(1.4);
  box-shadow: 0 0 0 3px var(--color-lavender-lt);
}

.progress__label {
  font-size: var(--text-xs);
  color: var(--color-text-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 400;
  transition: color var(--dur-normal);
}

.progress__step.is-active .progress__label {
  color: var(--color-lavender);
}

.progress__step.is-done .progress__label {
  color: var(--color-sage-dk);
}

/* ============================================================
   SCREEN SPACER (pushes buttons to bottom)
   ============================================================ */
.screen__spacer {
  flex: 1;
  min-height: var(--space-4);
}

/* ============================================================
   CARD
   ============================================================ */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border-lt);
  padding: var(--space-6);
  width: 100%;
  max-width: 480px;
}

.card--flush {
  padding: 0;
  overflow: hidden;
}

.card + .card {
  margin-top: var(--space-4);
}

/* ============================================================
   RSVP VENUE ROWS (inside info card on RSVP screen)
   ============================================================ */
.rsvp-venue-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.rsvp-venue-text {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.rsvp-venue-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.rsvp-venue-time {
  font-size: var(--text-xs);
  color: var(--color-text);
  margin-top: 2px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 400;
  letter-spacing: 0.06em;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  padding: var(--space-4) var(--space-8);
  width: 100%;
  max-width: 480px;
  min-height: 56px;
  transition:
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    opacity var(--dur-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  position: relative;
  overflow: hidden;
}

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

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--color-text);
  color: var(--color-bg);
}

.btn--primary:hover:not(:disabled) {
  background: #1e1c2c;
  box-shadow: var(--shadow-btn);
}

.btn--secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}

.btn--secondary:hover:not(:disabled) {
  border-color: var(--color-lavender);
  background: var(--color-lavender-lt);
}

.btn--yes {
  background: var(--color-sage);
  color: #fff;
  font-size: var(--text-lg);
  letter-spacing: 0.04em;
}

.btn--yes:hover:not(:disabled) {
  background: var(--color-sage-dk);
  box-shadow: 0 4px 18px rgba(138, 171, 130, 0.4);
}

.btn--no {
  background: var(--color-rose-lt);
  color: var(--color-text);
  border: 1.5px solid var(--color-rose);
  font-size: var(--text-lg);
  letter-spacing: 0.04em;
}

.btn--no:hover:not(:disabled) {
  background: var(--color-rose);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: auto;
  padding: var(--space-2) var(--space-4);
  width: auto;
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
}

.btn--ghost:hover:not(:disabled) {
  color: var(--color-text);
}

.btn__spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: var(--radius-full);
  animation: spin 0.7s linear infinite;
  display: none;
}

.btn.is-loading .btn__spinner { display: block; }
.btn.is-loading .btn__label { opacity: 0.6; }

/* ============================================================
   LOADING SCREEN
   ============================================================ */
.loading-screen {
  justify-content: center;
  gap: var(--space-4);
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--color-lavender-lt);
  border-top-color: var(--color-lavender);
  border-radius: var(--radius-full);
  animation: spin 0.9s linear infinite;
}

.loading-text {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  font-style: italic;
}

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

/* ============================================================
   ERROR SCREEN
   ============================================================ */
.error-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: var(--color-rose-lt);
  border: 2px solid var(--color-rose);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: var(--space-8) auto var(--space-4);
}

/* ============================================================
   WELCOME SCREEN
   ============================================================ */
.welcome-greeting {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: var(--space-2);
}

.guest-name {
  font-family: var(--font-serif);
  font-size: var(--text-3xl);
  font-weight: 300;
  color: var(--color-text);
  text-align: center;
  line-height: 1.15;
  margin-bottom: var(--space-6);
}

.welcome-tagline {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-style: italic;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.5;
  margin-bottom: var(--space-6);
}

.event-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  margin-bottom: var(--space-6);
}

.event-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.06em;
}

.event-badge--lunch {
  background: var(--color-gold-lt);
  color: #7a6030;
  border: 1px solid var(--color-gold);
}

.event-badge--dinner {
  background: var(--color-lavender-lt);
  color: #4a3d6b;
  border: 1px solid var(--color-lavender);
}

.event-badge .badge-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.event-badge--lunch .badge-dot { background: var(--color-gold); }
.event-badge--dinner .badge-dot { background: var(--color-lavender); }

.divider {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-4) 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.divider__icon {
  color: var(--color-lavender);
  opacity: 0.6;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ============================================================
   RSVP SCREEN
   ============================================================ */
.rsvp-question {
  font-family: var(--font-serif);
  font-size: var(--text-3xl);
  font-weight: 300;
  line-height: 1.25;
  text-align: center;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.rsvp-subtext {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: var(--space-8);
  line-height: 1.6;
}

.rsvp-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 100%;
  max-width: 480px;
}

/* ============================================================
   DECLINE SCREEN
   ============================================================ */
.decline-illustration {
  width: 120px;
  height: 120px;
  margin: var(--space-8) auto var(--space-6);
  opacity: 0.6;
}

/* ============================================================
   COUNT SCREEN (stepper)
   ============================================================ */
.count-question {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 300;
  line-height: 1.3;
  text-align: center;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.count-hint {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: var(--space-8);
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  margin: var(--space-6) 0 var(--space-10);
}

.stepper__btn {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color var(--dur-fast),
    background var(--dur-fast),
    transform var(--dur-fast),
    opacity var(--dur-fast);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.stepper__btn:hover:not(:disabled) {
  border-color: var(--color-lavender);
  background: var(--color-lavender-lt);
}

.stepper__btn:active:not(:disabled) {
  transform: scale(0.92);
}

.stepper__btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.stepper__value {
  font-family: var(--font-serif);
  font-size: var(--text-5xl);
  font-weight: 300;
  color: var(--color-text);
  min-width: 72px;
  text-align: center;
  line-height: 1;
  transition: transform var(--dur-fast) var(--ease-spring);
}

.stepper__value.pulse {
  transform: scale(1.15);
}

.stepper__label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
  letter-spacing: 0.04em;
  margin-top: var(--space-1);
}

/* ============================================================
   ALLERGIES SCREEN
   ============================================================ */
.allergies-question {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 300;
  line-height: 1.3;
  text-align: center;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.allergies-hint {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: var(--space-6);
  line-height: 1.6;
}

.field {
  width: 100%;
  max-width: 480px;
  margin-bottom: var(--space-4);
}

.field__label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
  letter-spacing: 0.04em;
}

.field__textarea {
  width: 100%;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 300;
  color: var(--color-text);
  background: var(--color-surface);
  resize: vertical;
  min-height: 110px;
  transition: border-color var(--dur-fast);
  line-height: 1.6;
}

.field__textarea::placeholder {
  color: var(--color-text-light);
}

.field__textarea:focus {
  border-color: var(--color-lavender);
  outline: none;
  box-shadow: 0 0 0 3px var(--color-lavender-lt);
}

.field__none-link {
  display: inline-block;
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-sage-dk);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

.field__none-link:hover {
  color: var(--color-text);
}

.inline-error {
  color: #b5465a;
  font-size: var(--text-sm);
  text-align: center;
  margin-bottom: var(--space-3);
  background: #fdf0f2;
  border: 1px solid #f0c0c8;
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}

/* ============================================================
   CONFIRMED SCREEN (success)
   ============================================================ */
.success-icon {
  width: 80px;
  height: 80px;
  margin: var(--space-8) auto var(--space-6);
  display: block;
}

.check-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: stroke-draw 0.6s var(--ease-out) 0.1s forwards;
}

.check-mark {
  stroke-dasharray: 58;
  stroke-dashoffset: 58;
  animation: stroke-draw 0.4s var(--ease-out) 0.65s forwards;
}

@keyframes stroke-draw {
  to { stroke-dashoffset: 0; }
}

.confirmed-title {
  font-family: var(--font-serif);
  font-size: var(--text-3xl);
  font-weight: 300;
  text-align: center;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.confirmed-subtitle {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: var(--space-8);
}

.summary-list {
  list-style: none;
  width: 100%;
  max-width: 480px;
}

.summary-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border-lt);
  font-size: var(--text-sm);
}

.summary-list li:last-child {
  border-bottom: none;
}

.summary-icon {
  width: 18px;
  height: 18px;
  color: var(--color-lavender);
  flex-shrink: 0;
  margin-top: 2px;
}

.summary-label {
  color: var(--color-text-muted);
  flex-shrink: 0;
  width: 80px;
}

.summary-value {
  color: var(--color-text);
  font-weight: 400;
  flex: 1;
}

/* ============================================================
   DETAILS SCREEN
   ============================================================ */
.details-welcome {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 300;
  text-align: center;
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: var(--space-2);
}

.details-intro {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: var(--space-6);
  line-height: 1.65;
}

/* Event cards in details */
.event-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-lt);
  overflow: hidden;
  margin-bottom: var(--space-4);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-card);
}

.event-card__header {
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  border-bottom: 1px solid var(--color-border-lt);
}

.event-card__header--lunch {
  background: linear-gradient(135deg, var(--color-gold-lt), #fff8ee);
}

.event-card__header--dinner {
  background: linear-gradient(135deg, var(--color-lavender-lt), #f5f0ff);
}

.event-card__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.event-card__icon--lunch {
  background: var(--color-gold-lt);
  border: 1px solid var(--color-gold);
  color: #7a6030;
}

.event-card__icon--dinner {
  background: var(--color-lavender-lt);
  border: 1px solid var(--color-lavender);
  color: #4a3d6b;
}

.event-card__icon svg {
  width: 18px;
  height: 18px;
}

.event-card__title {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--color-text);
  flex: 1;
}

.event-card__time {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--color-text);
}

.event-card__body {
  padding: var(--space-4) var(--space-5);
}

.event-card__location {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.event-card__location svg {
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
  flex-shrink: 0;
  margin-top: 2px;
}

.event-card__location-text {
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.5;
}

.event-card__location-sub {
  font-size: var(--text-sm);
  color: var(--color-text);
  margin-top: 2px;
  font-weight: 400;
}

.event-card__map-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  margin-top: var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-sage-lt);
  border: 1px solid var(--color-sage);
  color: var(--color-sage-dk);
  font-size: var(--text-sm);
  font-weight: 400;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--dur-fast), color var(--dur-fast);
}

.event-card__map-link:hover {
  background: var(--color-sage);
  color: #fff;
}

/* ============================================================
   TIMELINE
   ============================================================ */
.section-title {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  width: 100%;
  max-width: 480px;
}

.timeline {
  width: 100%;
  max-width: 480px;
  padding: 0 var(--space-2);
  margin-bottom: var(--space-6);
}

.timeline__item {
  display: flex;
  gap: var(--space-4);
  padding-bottom: var(--space-5);
  position: relative;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 19px;
  top: 28px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--color-border), transparent);
}

.timeline__dot-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 40px;
}

.timeline__dot {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.timeline__dot--lunch   { background: var(--color-gold-lt);     border: 1.5px solid var(--color-gold); }
.timeline__dot--dinner  { background: var(--color-lavender-lt); border: 1.5px solid var(--color-lavender); }
.timeline__dot--neutral { background: var(--color-surface-2);   border: 1.5px solid var(--color-border); }

.timeline__content {
  padding-top: var(--space-2);
  flex: 1;
}

.timeline__time {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-base);
  color: var(--color-text-muted);
  display: block;
}

.timeline__label {
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--color-text);
  margin-top: 2px;
}

.timeline__detail {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: 2px;
  line-height: 1.5;
}

.timeline__note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-style: italic;
  text-align: center;
  margin-top: var(--space-4);
  padding: 0 var(--space-2);
  line-height: 1.6;
}

/* ============================================================
   FAQ ACCORDION
   ============================================================ */
.faq {
  width: 100%;
  max-width: 480px;
  margin-bottom: var(--space-6);
}

.faq__item {
  border-bottom: 1px solid var(--color-border-lt);
}

.faq__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--dur-fast);
}

.faq__trigger:hover {
  color: var(--color-lavender);
}

.faq__question {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 400;
  color: inherit;
  line-height: 1.4;
  flex: 1;
}

.faq__chevron {
  width: 20px;
  height: 20px;
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: transform var(--dur-normal) var(--ease-out);
}

.faq__trigger[aria-expanded="true"] .faq__chevron {
  transform: rotate(180deg);
}

.faq__panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height var(--dur-slow) var(--ease-out), opacity var(--dur-normal) var(--ease-out);
  opacity: 0;
}

.faq__panel.is-open {
  max-height: 500px;
  opacity: 1;
}

.faq__answer {
  padding: 0 0 var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ============================================================
   CONTACT FOOTER
   ============================================================ */
.contact-footer {
  text-align: center;
  padding: var(--space-6) var(--space-4);
  border-top: 1px solid var(--color-border-lt);
  margin-top: var(--space-4);
  width: 100%;
  max-width: 480px;
}

.contact-footer p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
  line-height: 1.6;
}

.contact-footer a {
  color: var(--color-sage-dk);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.signature {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-style: italic;
  font-weight: 300;
  color: var(--color-text-muted);
  text-align: center;
  margin: var(--space-8) 0 var(--space-4);
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }
.w-full { width: 100%; max-width: 480px; }
.text-center { text-align: center; }
.text-muted {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ============================================================
   RESPONSIVE: desktop centers the mobile shell
   ============================================================ */
@media (min-width: 520px) {
  /* Align switcher to app shell's right edge + 12px inset */
  #lang-switcher {
    right: calc(50vw - 228px);
  }

  body {
    background: linear-gradient(135deg, #ede8f5 0%, #ddebd9 50%, #f0e4e4 100%);
    min-height: 100dvh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: var(--space-8) var(--space-4);
  }

  #app {
    border-radius: var(--radius-xl);
    min-height: auto;
    max-height: none;
    box-shadow: 0 8px 48px rgba(45,43,61,0.18), 0 2px 12px rgba(45,43,61,0.08);
  }

  .screen {
    min-height: 680px;
  }
}

/* ============================================================
   LANGUAGE SWITCHER
   ============================================================ */
#lang-switcher {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: 12px;
  z-index: 100;
  display: flex;
  gap: 4px;
  /* Constrain to the app shell on desktop */
}

.lang-pill {
  padding: 4px 9px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  border: 1.5px solid var(--color-border);
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  line-height: 1.4;
}

.lang-pill.is-active {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

.lang-pill:hover:not(.is-active) {
  border-color: var(--color-lavender);
  color: var(--color-text);
}

.lang-pill:focus-visible {
  outline: 2px solid var(--color-lavender);
  outline-offset: 2px;
}

/* ============================================================
   EVENT TOGGLE CARDS (event-selection screen)
   ============================================================ */
.event-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  max-width: 480px;
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-xl);
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  margin-bottom: var(--space-3);
  transition:
    border-color var(--dur-normal) var(--ease-out),
    background var(--dur-normal) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-normal) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  box-shadow: var(--shadow-card);
}

.event-toggle:active {
  transform: scale(0.98);
}

.event-toggle:focus-visible {
  outline: 3px solid var(--color-lavender);
  outline-offset: 2px;
}

.event-toggle.is-selected--lunch {
  border-color: var(--color-sage);
  background: var(--color-sage-lt);
  box-shadow: 0 2px 16px rgba(138, 171, 130, 0.18);
}

.event-toggle.is-selected--dinner {
  border-color: var(--color-lavender);
  background: var(--color-lavender-lt);
  box-shadow: 0 2px 16px rgba(184, 169, 201, 0.2);
}

.event-toggle__check {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  transition:
    background var(--dur-normal) var(--ease-out),
    border-color var(--dur-normal) var(--ease-out),
    color var(--dur-normal) var(--ease-out);
  color: transparent;
}

.event-toggle__check.is-checked--lunch {
  background: var(--color-sage);
  border-color: var(--color-sage);
  color: #fff;
}

.event-toggle__check.is-checked--dinner {
  background: var(--color-lavender);
  border-color: var(--color-lavender);
  color: #fff;
}

.event-toggle__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--dur-normal), border-color var(--dur-normal);
}

.event-toggle__icon--lunch {
  background: var(--color-gold-lt);
  border: 1px solid var(--color-gold);
  color: #7a6030;
}

.event-toggle__icon--dinner {
  background: var(--color-lavender-lt);
  border: 1px solid var(--color-lavender);
  color: #4a3d6b;
}

.event-toggle__icon svg {
  width: 18px;
  height: 18px;
}

.event-toggle__text {
  flex: 1;
  min-width: 0;
}

.event-toggle__label {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--color-text);
  line-height: 1.2;
}

.event-toggle__sublabel {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
  letter-spacing: 0.02em;
}

.event-toggle__time {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.event-toggle--locked {
  pointer-events: none;
  cursor: default;
}

/* ============================================================
   REDUCE MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .screen {
    transform: none !important;
  }
}
