/* ──────────────────────────────────────────────
   TripTide — Premium Arctic Travel Planner
────────────────────────────────────────────── */

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

:root {
  --bg: #08090f;
  --bg-surface: #0e1019;
  --bg-elevated: #141620;
  --bg-input: #141620;
  --border: #20232f;
  --border-soft: #1a1d28;
  --text-primary: #e8eaf0;
  --text-secondary: #8b8fa8;
  --text-muted: #555870;
  --accent: #6c8cff;
  --accent-hover: #8aa4ff;
  --accent-dim: rgba(108, 140, 255, 0.12);
  --user-bg: #1f2a4a;
  --user-border: #2a3d6e;
  --ai-bg: #0e1019;
  --ai-border: #1a1d28;
  --aurora-1: #00e5cc;
  --aurora-2: #6c8cff;
  --aurora-3: #a855f7;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 2px 16px rgba(0,0,0,0.4);
  /* Spacing scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
}

/* ── Winter theme (default) ── */
body[data-theme="winter"] {
  --bg: #08090f;
  --bg-surface: #0e1019;
  --bg-elevated: #141620;
  --bg-input: #141620;
  --border: #20232f;
  --border-soft: #1a1d28;
  --accent: #6c8cff;
  --accent-hover: #8aa4ff;
  --accent-dim: rgba(108, 140, 255, 0.12);
  --user-bg: #1f2a4a;
  --user-border: #2a3d6e;
  --ai-bg: #0e1019;
  --ai-border: #1a1d28;
  --aurora-1: #00e5cc;
  --aurora-2: #6c8cff;
  --aurora-3: #a855f7;
}

/* ── Summer theme ── */
body[data-theme="summer"] {
  --bg: #ffffff;
  --bg-surface: rgba(255, 255, 255, 0.94);
  --bg-elevated: #f9f9f9;
  --bg-input: #f9f9f9;
  --border: #e5e5e5;
  --border-soft: #efefef;
  --text-primary: #1f1a16;
  --text-secondary: #6b6b6b;
  --text-muted: #999999;
  --accent: #d88714;
  --accent-hover: #e69a2a;
  --accent-dim: rgba(216, 135, 20, 0.1);
  --user-bg: #f0e8dc;
  --user-border: #dbc9a8;
  --ai-bg: #f9f9f9;
  --ai-border: #e8e8e8;
  --aurora-1: #d88714;
  --aurora-2: #ef9d43;
  --aurora-3: #f3c579;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.06);
}

/* ── Plan panel light theme ──
   Scoped to .trip-draft so the chat column stays dark (winter) or warm (summer).
   Overrides CSS variables for the entire plan surface: cards, browse panel, skeleton, buttons. */
.trip-draft.plan-light {
  --bg: #ffffff;
  --bg-surface: #ffffff;
  --bg-elevated: #f7f7f9;
  --bg-input: #f0f1f5;
  --border: #e2e4ea;
  --border-soft: #ecedf2;
  --text-primary: #1a1a2e;
  --text-secondary: #5f6578;
  --text-muted: #8f93a3;
  --accent: #6c8cff;
  --accent-hover: #5a7af0;
  --accent-dim: rgba(108, 140, 255, 0.08);
  --aurora-1: #0d8a80;
  --aurora-2: #6c8cff;
  --aurora-3: #8b5cf6;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
}

html {
  height: 100%;
  background: var(--bg);
  overflow-x: hidden;
}

body {
  min-height: 100%;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  position: relative;
  background: var(--bg);
  transition: background 0.6s ease, color 0.4s ease;
  overflow-x: hidden;
}

/* ── Shell ── */
.chat-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1048px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  transition: background 0.6s ease;
}

/* ── Hero Section ── */
.hero-section {
  position: relative;
  width: 100vw;
  left: 50%;
  margin-left: -50vw;
  height: 560px;
  overflow: hidden;
  flex-shrink: 0;
}

.hero-section.hero-hidden {
  display: none;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 24px 0;
  text-align: center;
}

.hero-tagline {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 12px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7), 0 4px 16px rgba(0, 0, 0, 0.4);
  max-width: 600px;
}

.hero-sub {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.9);
  max-width: 520px;
  line-height: 1.5;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ── New Trip button (visible in chat mode) ── */
.new-trip-btn {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  white-space: nowrap;
}

.new-trip-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  background: var(--accent-dim);
}

/* ── Wizard Section ── */
.wizard-section {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 24px 24px;
  overflow: hidden;
  transition: opacity 0.4s ease;
}

.wizard-section.wizard-hidden {
  display: none;
}

/* Aurora glow background */
.wizard-aurora-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 200px;
  background: radial-gradient(ellipse at center, rgba(108,140,255,0.14) 0%, rgba(0,229,204,0.08) 50%, transparent 70%);
  pointer-events: none;
  filter: blur(20px);
  animation: glow-pulse 5s ease-in-out infinite;
  transition: background 0.6s ease;
}

body[data-theme="summer"] .wizard-aurora-glow {
  background: radial-gradient(ellipse at center, rgba(216, 135, 20, 0.12) 0%, rgba(243, 197, 121, 0.14) 38%, transparent 72%);
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.7; transform: translateX(-50%) scaleX(1); }
  50% { opacity: 1; transform: translateX(-50%) scaleX(1.08); }
}

/* Brand */
.wizard-brand {
  text-align: center;
  margin-bottom: 32px;
  position: relative;
}

.wizard-title {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -1px;
  background: linear-gradient(135deg, var(--aurora-1) 0%, var(--aurora-2) 50%, var(--aurora-3) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 8px;
}

/* Brand tagline — premium hero tagline */
.wizard-brand-tagline {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 10px;
  opacity: 0.8;
}

.wizard-tagline {
  font-size: 15px;
  color: var(--text-secondary);
}

/* Progress indicator */
.wizard-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 36px;
}

.wizard-progress-dots {
  display: flex;
  align-items: center;
  gap: 0;
}

.wizard-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.3s ease, transform 0.3s ease;
}

.wizard-dot.active {
  background: var(--accent);
  transform: scale(1.2);
}

.wizard-dot.done {
  background: var(--aurora-1);
}

.wizard-dot-line {
  width: 32px;
  height: 2px;
  background: var(--border);
  transition: background 0.3s ease;
}

.wizard-dot-line.done {
  background: var(--aurora-1);
}

.wizard-progress-label {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Steps */
/* Aurora card background — faint aurora glow inside the wizard card */
.wizard-step {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 780px;
  animation: step-in 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  isolation: isolate;
}

/* Aurora CSS gradient — disabled for clean look */
.wizard-step::before {
  display: none;
}

.wizard-step.active {
  display: flex;
}

@keyframes step-in {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes step-in-back {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: translateX(0); }
}

.wizard-step.anim-back {
  animation: step-in-back 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-question {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 28px;
  letter-spacing: -0.3px;
}

.wizard-subtext {
  font-size: 13.5px;
  color: var(--text-muted);
  text-align: center;
  margin-top: -16px;
  margin-bottom: 20px;
}

.wizard-package-note {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-muted);
}

.wizard-back-btn {
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
  margin-bottom: 16px;
  transition: color 0.15s;
}

.wizard-back-btn:hover {
  color: var(--accent);
}

/* Destination cards */
.dest-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.dest-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 0.18s;
  width: 100%;
}

.dest-card:hover {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(108,140,255,0.1), rgba(0,229,204,0.05));
  box-shadow: 0 4px 20px rgba(108,140,255,0.15);
  transform: translateY(-2px);
}

.dest-card:active {
  transform: translateY(0);
}

.dest-card-emoji {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}

.dest-card-name {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.dest-card-desc {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.dest-cards-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.dest-card-img {
  position: relative;
  display: block;
  padding: 0;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid rgba(216, 135, 20, 0.08);
  background: var(--bg-elevated);
  box-shadow: 0 18px 38px rgba(126, 95, 48, 0.1);
}

.dest-card-photo {
  display: block;
  width: 100%;
  height: 360px;
  object-fit: cover;
  object-position: center;
}

.dest-card-img-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px 20px 18px;
  background: none;
}

.dest-card-img .dest-card-name {
  color: #fff;
  font-size: 22px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.dest-card-img .dest-card-desc {
  color: rgba(255, 255, 255, 0.95);
  font-size: 14px;
  margin-top: 6px;
  max-width: 28ch;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.dest-card-img:hover .dest-card-photo {
  transform: scale(1.03);
  transition: transform 0.3s ease;
}

/* Season cards (step 2) */
.season-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

.season-card {
  position: relative;
  display: block;
  padding: 0;
  min-height: 200px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  background: var(--bg-elevated);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.season-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 28px rgba(108, 140, 255, 0.15);
  transform: translateY(-2px);
}

.season-card:active {
  transform: translateY(0);
}

.season-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), 0 8px 28px rgba(108, 140, 255, 0.15);
}

.season-card-photo {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.season-card:hover .season-card-photo {
  transform: scale(1.04);
}

.season-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px 16px 14px;
  background: linear-gradient(to top, rgba(18, 14, 10, 0.85) 0%, rgba(18, 14, 10, 0.25) 55%, rgba(18, 14, 10, 0.02) 100%);
}

.season-card-name {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  line-height: 1.2;
}

.season-card-months {
  display: block;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 2px;
  font-weight: 500;
}

.season-card-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.season-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  white-space: nowrap;
}

/* ── Exact dates (step 2) ── */
.dates-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0 20px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.dates-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

.dates-picker-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dates-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dates-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.15s ease;
  color-scheme: dark;
}

.dates-input:focus {
  outline: none;
  border-color: var(--accent);
}

.dates-confirm-btn {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding: 14px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.dates-confirm-btn:hover:not(:disabled) {
  background: var(--accent-hover);
}

.dates-confirm-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Duration options (step 3) */
.duration-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
}

.duration-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s;
  text-align: center;
}

.duration-btn:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(108, 140, 255, 0.12);
}

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

.duration-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.duration-range {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Trip transition overlay */
.trip-transition-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.trip-transition-overlay.active {
  display: flex;
  opacity: 1;
}

.trip-transition-overlay.fade-out {
  opacity: 0;
}

.trip-transition-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 380px;
  text-align: center;
  padding: 24px;
}

.trip-transition-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: tt-spin 0.8s linear infinite;
  margin-bottom: 8px;
}

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

.trip-transition-line {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  min-height: 1.6em;
}

.trip-transition-line.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Interest chips (step 4) */
.interest-chips {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  margin-bottom: 28px;
}

.interest-group {
  width: 100%;
}

.interest-group + .interest-group {
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.interest-group-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-align: left;
  padding-left: 4px;
}

.interest-group-chips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.interest-chip {
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s ease;
  white-space: normal;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.interest-chip-title {
  display: block;
  line-height: 1.3;
}

.interest-chip-subtitle {
  display: block;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 400;
  color: var(--text-muted);
  transition: color 0.18s ease;
}

.interest-chip-meta {
  display: block;
  margin-top: 5px;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(184, 123, 32, 0.9);
  transition: color 0.18s ease;
}

.interest-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.interest-chip:hover .interest-chip-subtitle {
  color: var(--text-secondary);
}

.interest-chip:hover .interest-chip-meta {
  color: var(--accent);
}

.interest-chip.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(216, 135, 20, 0.25);
}

.interest-chip.selected .interest-chip-subtitle {
  color: rgba(255, 255, 255, 0.8);
}

.interest-chip.selected .interest-chip-meta {
  color: rgba(255, 245, 225, 0.88);
}

.interest-surprise-wrap {
  display: flex;
  justify-content: center;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.interest-surprise-wrap .interest-chip {
  border-style: dashed;
  border-color: var(--border);
  background: transparent;
  text-align: center;
  align-items: center;
  max-width: 320px;
  color: var(--text-secondary);
}

.interest-surprise-wrap .interest-chip-meta {
  color: var(--text-muted);
}

.interest-surprise-wrap .interest-chip:hover {
  border-style: solid;
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

.interest-surprise-wrap .interest-chip.selected {
  border-style: solid;
  background: var(--accent);
  color: #fff;
}

/* Start planning button */
.wizard-start-btn {
  background: linear-gradient(135deg, var(--accent), var(--aurora-1));
  border: none;
  border-radius: var(--radius-lg);
  padding: 14px 36px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  box-shadow: 0 10px 24px rgba(216, 135, 20, 0.2);
  animation: btn-appear 0.25s ease-out;
}

/* Hide the inline start button when floating CTA is active */
#step-3 .wizard-start-btn {
  display: none !important;
}

/* Inline duration pills (inside season step) */
.inline-duration {
  margin-top: 20px;
  animation: fadeSlideUp 0.25s ease-out;
}

.inline-duration-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 10px;
}

.inline-duration-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.duration-pill {
  padding: 10px 20px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
}

.duration-pill:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.duration-pill.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

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

/* Floating CTA bar — sits outside wizard-section to avoid overflow clipping */
.wizard-floating-cta {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  width: calc(100% - 48px);
  max-width: 480px;
}

.wizard-floating-cta .wizard-start-btn {
  width: 100%;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1), 0 10px 24px rgba(216, 135, 20, 0.25);
}

@keyframes btn-appear {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.wizard-start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(108,140,255,0.4);
}

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

/* Hide chat area during wizard */
.chat-area-hidden {
  display: none !important;
}

/* ── Header ── */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid transparent;
  background: transparent;
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
  transition: background 0.25s ease, border-color 0.25s ease;
  margin-bottom: -68px;
}

/* Solid header when scrolled past hero or hero hidden */
.chat-header.header-solid {
  background: rgba(255, 250, 242, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: rgba(234, 223, 206, 0.72);
  margin-bottom: 0;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-logo-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
  transition: filter 0.3s ease;
}

.header-solid .chat-logo-icon {
  filter: none;
}

.chat-logo-title {
  display: block;
  font-weight: 700;
  font-size: 17px;
  color: #fff;
  line-height: 1.2;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}

.header-solid .chat-logo-title {
  color: var(--text-primary);
  text-shadow: none;
}

.chat-logo-tagline {
  display: block;
  font-size: 9.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.3;
}

.header-solid .chat-logo-tagline {
  color: var(--text-muted);
}

.chat-logo-sub {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.02em;
}

.header-solid .chat-logo-sub {
  color: var(--text-muted);
}

/* ── Header navigation ── */
.header-nav {
  display: none;
}

@media (min-width: 1024px) {
  .header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 24px;
  }

  .header-nav-item {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    background: none;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
    letter-spacing: 0.01em;
  }

  .header-nav-item:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
  }

  .header-nav-item.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
  }

  .header-solid .header-nav-item {
    color: var(--text-muted);
  }

  .header-solid .header-nav-item:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.04);
  }

  .header-solid .header-nav-item.is-active {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.06);
  }

  /* Dim "My Trip" nav item until a plan exists */
  .header-nav-item.is-dimmed {
    opacity: 0.35;
    cursor: default;
  }

  .header-nav-item.is-dimmed:hover {
    color: rgba(255, 255, 255, 0.65);
    background: none;
  }

  .header-solid .header-nav-item.is-dimmed:hover {
    color: var(--text-muted);
    background: none;
  }
}

/* Season indicator badge */
.season-indicator {
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.04em;
  padding: 4px 12px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  white-space: nowrap;
  transition: all 0.4s ease;
}

body[data-theme="summer"] .season-indicator {
  color: rgba(255,255,255,0.9);
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.15);
  opacity: 1;
}

.header-solid .season-indicator {
  color: var(--accent);
  border-color: rgba(216, 135, 20, 0.22);
  background: rgba(216, 135, 20, 0.08);
}

body[data-theme="winter"] .season-indicator {
  color: var(--aurora-1);
  border-color: rgba(0, 229, 204, 0.3);
  background: rgba(0, 229, 204, 0.06);
  opacity: 1;
}

/* admin link only accessible via direct URL now */

/* ── Messages ── */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px 16px;
  padding-bottom: 100px;
  scroll-behavior: smooth;
}

/* Prevent empty chat from being scrollable */
.chat-messages:not(.has-messages) {
  overflow-y: hidden;
  padding-bottom: 0;
}

/* Lock page scroll on mobile empty chat */
body.mobile-no-scroll {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
  touch-action: none;
  -webkit-overflow-scrolling: auto;
}

/* ── Section divider between trip plan and chat ── */
/* Only show when chat has messages (uses .has-messages class set by JS) */
.chat-messages.has-messages::before {
  content: 'Continue planning';
  display: block;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.5;
  padding: 14px 0 16px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--border);
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* ── Desktop trip context bar ── */
.chat-context-bar {
  display: none;
}

.chat-context-bar:not(.chat-area-hidden) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 0 0 12px;
}

.chat-context-title {
  width: 100%;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.chat-context-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-context-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
}

/* ── (welcome block removed — hero section used instead) ── */

/* ── Message bubbles ── */
.message {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  max-width: 100%;
  animation: msg-in 0.2s ease-out;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.message.user {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

.message.ai .message-avatar {
  background: linear-gradient(135deg, #1a2040, #2a1a40);
  border: 1px solid var(--border);
  background-image: url('/images/logo4.png');
  background-size: 22px 22px;
  background-position: center;
  background-repeat: no-repeat;
  font-size: 0;
  color: transparent;
  overflow: hidden;
}

.message.user .message-avatar {
  background: var(--user-bg);
  border: 1px solid var(--user-border);
}

.message-body {
  max-width: calc(100% - 44px);
}

.message-bubble {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14.5px;
  line-height: 1.65;
}

.message.ai .message-bubble {
  background: var(--ai-bg);
  border: 1px solid var(--ai-border);
  border-radius: var(--radius) var(--radius) var(--radius) 4px;
  color: var(--text-primary);
}

.message.user .message-bubble {
  background: var(--user-bg);
  border: 1px solid var(--user-border);
  border-radius: var(--radius) var(--radius) 4px var(--radius);
  color: var(--text-primary);
}

.reply-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.reply-chips.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.reply-chip {
  max-width: 100%;
  min-width: 0;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font: inherit;
  font-size: 12.5px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.reply-chip:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.reply-chip:disabled {
  cursor: default;
}

.qualification-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.qualification-panel.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.qualification-slot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
}

.qualification-slot-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.qualification-slot-optional {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
}

.qualification-slot.is-optional {
  background: rgba(255, 255, 255, 0.38);
  border-style: dashed;
}

.qualification-slot-prompt {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-primary);
}

.qualification-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.qualification-option {
  max-width: 100%;
  min-width: 0;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font: inherit;
  font-size: 12.5px;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.qualification-option:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.qualification-freeform-note {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
}

/* Markdown-like rendering inside AI bubbles */
.message-bubble p {
  margin-bottom: 10px;
}

.message-bubble p:last-child {
  margin-bottom: 0;
}

.message-bubble strong {
  color: var(--text-primary);
  font-weight: 600;
}

.message-bubble ul, .message-bubble ol {
  padding-left: 20px;
  margin-bottom: 10px;
}

.message-bubble li {
  margin-bottom: 4px;
}

.message-bubble code {
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
}

.message-bubble h1, .message-bubble h2, .message-bubble h3 {
  margin-top: 12px;
  margin-bottom: 6px;
  font-weight: 600;
}

.message-bubble h1 { font-size: 17px; }
.message-bubble h2 { font-size: 16px; }
.message-bubble h3 { font-size: 15px; color: var(--accent); }

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 14px 16px;
  height: 44px;
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: dot-bounce 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* ── Input bar ── */
.chat-input-bar {
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  flex-shrink: 0;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  max-width: 1048px;
  margin: 0 auto;
}

.chat-input-wrap {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  transition: border-color 0.15s;
}

.chat-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.5;
  resize: none;
  max-height: 180px;
  overflow-y: auto;
}

.chat-input::placeholder {
  color: var(--text-muted);
}

.chat-input::-webkit-scrollbar {
  width: 3px;
}

.send-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
  opacity: 0.4;
  pointer-events: none;
}

.send-btn:not([disabled]) {
  opacity: 1;
  pointer-events: auto;
}

.send-btn:not([disabled]):hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

.send-btn:not([disabled]):active {
  transform: scale(0.97);
}

.chat-disclaimer {
  text-align: center;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ── Error state ── */
.message-error {
  color: #ff6b6b;
  font-size: 13px;
  padding: 10px 14px;
  background: rgba(255, 107, 107, 0.08);
  border: 1px solid rgba(255, 107, 107, 0.2);
  border-radius: var(--radius-sm);
}

/* ── Free-text entry (Step 1) ── */
.freetext-divider {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 20px 0 16px;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.freetext-divider span {
  padding: 0 12px;
}

.freetext-textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.55;
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  margin-bottom: 12px;
}

.freetext-textarea::placeholder {
  color: var(--text-muted);
}

.freetext-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.freetext-start-btn {
  width: 100%;
  padding: 13px 24px;
}

/* ── Sticky Trip Draft ── */
.trip-draft {
  position: sticky;
  top: 52px; /* below header */
  z-index: 8;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  flex-shrink: 0;
  transition: box-shadow 0.2s ease;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.trip-draft-collapsed {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trip-draft-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.trip-draft-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.trip-draft-cost {
  font-size: 13px;
  font-weight: 600;
  color: var(--aurora-1);
  white-space: nowrap;
  flex-shrink: 0;
}

.trip-draft-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.trip-draft-actions .trip-refine-btn {
  font-size: 11.5px;
  padding: 5px 10px;
}

.trip-draft-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.trip-draft-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 0 0;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
}

.trip-draft-toggle:hover {
  color: var(--accent);
}

#trip-draft-save {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 4px;
  margin-left: auto;
}

.trip-draft-save-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.trip-draft-save-group-pending {
  min-width: 0;
}

.trip-draft-save-group-saved {
  gap: 6px;
}

.trip-draft-save-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.trip-draft-save {
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  padding: 6px 12px;
  transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.15s;
  white-space: nowrap;
}

.trip-draft-save:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(108, 140, 255, 0.08);
}

.trip-draft-save:disabled {
  cursor: default;
  opacity: 0.7;
  transform: none;
}

.trip-draft-save-saved {
  color: var(--aurora-1);
}

.trip-draft-save-primary {
  color: var(--accent);
  border-color: rgba(108, 140, 255, 0.35);
  background: rgba(108, 140, 255, 0.12);
  font-weight: 600;
}

.trip-draft-save-primary:hover {
  color: var(--accent-hover);
  border-color: var(--accent);
  background: rgba(108, 140, 255, 0.16);
}

.trip-draft-save-secondary {
  color: var(--text-secondary);
  border-color: var(--border);
  background: var(--bg-elevated);
}

.trip-draft-save-status {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.trip-draft-save-hint {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
  text-align: right;
  max-width: 240px;
}

.trip-draft-save-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.trip-draft-chevron {
  font-size: 9px;
  line-height: 1;
}

/* Expanded state */
.trip-draft-expanded {
  margin-top: 10px;
  max-height: 50vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.trip-draft-expanded::-webkit-scrollbar {
  width: 3px;
}

.trip-draft-expanded::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.trip-draft-expanded-hidden {
  display: none;
}

.trip-draft-expanded-inner {
  overflow-x: hidden;
}

.trip-draft-expanded-inner .trip-summary-table {
  margin-bottom: 10px;
}

.trip-draft-expanded-inner .trip-summary-total {
  margin-bottom: 10px;
}

/* Booking section inside expanded draft */
.trip-draft-expanded-inner .trip-booking-section {
  margin-top: 8px;
}

.trip-panel-pages {
  display: flex;
  width: 200%;
  min-width: 0;
  transform: translateX(0);
  transition: transform 250ms ease-out;
  will-change: transform;
}

.trip-panel-pages-browse-open {
  transform: translateX(-50%);
}

.trip-panel-page {
  width: 50%;
  min-width: 50%;
  min-height: 100%;
  padding-right: 0;
  opacity: 1;
  transition: opacity 250ms ease-out, transform 250ms ease-out;
}

.trip-panel-page-itinerary {
  padding-right: 0;
  transform: translateX(0);
}

.trip-panel-page-browse {
  padding-left: 8px;
  min-width: 0;
  overflow-x: hidden;
  opacity: 0.2;
  transform: translateX(20px);
}

.trip-panel-pages-browse-open .trip-panel-page-itinerary {
  opacity: 0.22;
  transform: translateX(-20px);
  pointer-events: none;
}

.trip-panel-pages-browse-open .trip-panel-page-browse {
  opacity: 1;
  transform: translateX(0);
}

.planner-browse-shell {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  min-width: 0;
}

.planner-browse-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 0 14px;
  min-width: 0;
  background: linear-gradient(180deg, var(--bg) 85%, transparent);
}

.planner-browse-back {
  align-self: flex-start;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}

.planner-browse-back:hover {
  color: var(--text-primary);
}

.planner-browse-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.planner-browse-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.planner-browse-subtitle {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

.planner-browse-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding-bottom: 20px;
}

.planner-browse-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.planner-browse-pills::-webkit-scrollbar {
  display: none;
}

.planner-browse-pill {
  flex: 0 0 auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  cursor: pointer;
}

.planner-browse-pill-active {
  background: rgba(108, 140, 255, 0.1);
  border-color: rgba(108, 140, 255, 0.26);
  color: var(--accent);
}

.planner-browse-search-wrap {
  display: flex;
}

.planner-browse-search {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
  padding: 10px 12px;
}

.planner-browse-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.planner-browse-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg);
}

.planner-browse-state-loading {
  justify-content: flex-start;
}

.planner-browse-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(206, 136, 34, 0.18);
  border-top-color: rgba(206, 136, 34, 0.82);
  animation: planner-browse-spin 0.8s linear infinite;
  flex-shrink: 0;
}

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

.planner-browse-state-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.planner-browse-state-copy {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.planner-browse-state-action {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 9px 12px;
  cursor: pointer;
}

.planner-browse-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.planner-browse-section-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.planner-browse-preview-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.planner-browse-preview-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.planner-browse-preview-row {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.planner-browse-preview-photo {
  display: block;
  width: 80px;
  min-height: 80px;
  flex-shrink: 0;
  object-fit: cover;
  object-position: center;
}

.planner-browse-preview-photo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(108, 140, 255, 0.08), rgba(108, 140, 255, 0.03));
  color: var(--accent);
  font-size: 22px;
}

.planner-browse-preview-body {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
}

/* Curated card visual distinction */
.planner-browse-preview-card[data-browse-preview-source="curated"] {
  background: rgba(108, 140, 255, 0.03);
  border-color: rgba(108, 140, 255, 0.15);
}

.planner-browse-preview-badge {
  display: none;
}
.planner-browse-preview-card[data-browse-preview-source="curated"] .planner-browse-preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent, #6c8cff);
  margin-bottom: 2px;
}

.planner-browse-preview-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 3px;
  overflow-wrap: anywhere;
}

.planner-browse-preview-meta {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary);
  margin-bottom: 3px;
  overflow-wrap: anywhere;
}

.planner-browse-preview-price {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.planner-browse-preview-actions {
  padding-top: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.planner-browse-preview-link {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.planner-browse-preview-link:hover {
  text-decoration: underline;
}

.planner-browse-apply,
.planner-browse-load-more {
  background: rgba(108, 140, 255, 0.08);
  border: 1px solid rgba(108, 140, 255, 0.18);
  border-radius: 999px;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 9px 12px;
  cursor: pointer;
}

.planner-browse-apply:hover,
.planner-browse-load-more:hover {
  background: rgba(108, 140, 255, 0.14);
}

.planner-browse-apply:disabled,
.planner-browse-load-more:disabled {
  opacity: 0.65;
  cursor: default;
}

.planner-browse-footnote {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

/* ── Restaurant browse: filters (segmented + pills) ── */
.rbfilters {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rbseg {
  display: flex;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.rbseg::-webkit-scrollbar { display: none; }

.rbseg-option {
  flex: 1 1 auto;
  min-width: fit-content;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.rbseg-option:hover {
  color: var(--text-primary);
}

.rbseg-option.is-active {
  background: var(--bg);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 0 0 1px var(--border);
}

.rbpills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.rbpills::-webkit-scrollbar { display: none; }

.rbpill {
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  padding: 7px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.rbpill:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.rbpill.is-active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: var(--bg);
  font-weight: 600;
}

.rbsearch-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text-primary);
  font: inherit;
  font-size: 13.5px;
  padding: 11px 14px;
}

.rbsearch-input:focus {
  outline: none;
  border-color: var(--text-primary);
}

.rbsearch-input::placeholder {
  color: var(--text-muted);
}

/* ── Restaurant browse: card (text-only, flat) ── */
.rbcard {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s ease;
}

.rbcard:hover {
  border-color: var(--border);
}

.rbcard-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.rbcard-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  letter-spacing: -0.01em;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rbcard-price {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.rbcard-meta {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rbcard-reservation {
  color: var(--text-muted);
  margin-left: 4px;
}

.rbcard-note {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rbcard-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.rbcard-add {
  background: var(--text-primary);
  color: var(--bg);
  border: 1px solid var(--text-primary);
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  cursor: pointer;
  transition: opacity 0.15s ease;
  min-height: 38px;
}

.rbcard-add:hover {
  opacity: 0.88;
}

.rbcard-add:disabled {
  opacity: 0.55;
  cursor: default;
}

.rbcard-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.rbcard-link {
  font-size: 12.5px;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: border-color 0.15s ease;
}

.rbcard-link:hover {
  border-bottom-color: var(--text-primary);
}

@media (max-width: 640px) {
  .rbcard { padding: 14px; }
  .rbcard-foot { gap: 10px; }
  .rbcard-links { gap: 18px; margin-left: auto; }
}

/* Update glow animation */
@keyframes draft-update-glow {
  0% { border-color: var(--accent); box-shadow: 0 2px 16px rgba(108,140,255,0.25); }
  100% { border-color: var(--border); box-shadow: 0 2px 12px rgba(0,0,0,0.3); }
}

.trip-draft.draft-updating {
  border-bottom-color: var(--accent);
  animation: draft-update-glow 1.2s ease-out forwards;
}

/* Hide collapsed content when expanded */
.trip-draft.draft-expanded .trip-draft-collapsed .trip-draft-toggle {
  display: none;
}

.trip-draft.draft-expanded .trip-draft-expanded {
  display: block;
}

/* Chat note when summary is routed to draft */
.trip-draft-chat-note {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

/* Trip draft intro text — AI narrative above cards */
.trip-draft-intro {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-secondary);
  padding: 10px 14px;
  margin-bottom: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}

.trip-draft-intro p {
  margin: 0;
}

.trip-draft-intro p + p {
  margin-top: 8px;
}

/* ── Trip Summary Card (inside expanded draft) ── */
.trip-summary-card {
  background: #1a1d2a;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 20px 20px 16px;
  margin: 8px 0;
  box-shadow: 0 4px 24px rgba(108, 140, 255, 0.1);
}

.trip-summary-note,
.trip-summary-fallback {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 12px;
}

.trip-summary-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.2px;
}

.trip-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin-bottom: 14px;
  table-layout: fixed;
}

.trip-summary-table th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}

.trip-summary-table td {
  padding: 8px 8px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
  word-break: break-word;
}

.trip-cell-main {
  font-weight: 500;
  color: var(--text-primary);
}

.trip-cell-submeta {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-secondary);
}

.trip-summary-table tr:last-child td {
  border-bottom: none;
}

.trip-summary-table a {
  color: var(--accent);
  text-decoration: none;
}

.trip-summary-table a:hover {
  text-decoration: underline;
}

.trip-summary-total {
  font-size: 14px;
  font-weight: 600;
  color: var(--aurora-1);
  margin-bottom: 14px;
}

.trip-pricing-trust {
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 16px;
  font-style: italic;
  letter-spacing: 0.01em;
}

.trip-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  align-items: center;
}

/* Hide "Want more?" label — the action buttons are self-explanatory */
.trip-summary-actions > span:first-child {
  display: none;
}

/* Override inline styles on refinement action buttons */
.trip-summary-actions [data-summary-refine] {
  background: transparent !important;
  border: 1px solid var(--border) !important;
  border-radius: 999px !important;
  padding: 6px 12px !important;
  color: var(--text-secondary) !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.15s ease;
}

.trip-summary-actions [data-summary-refine]:hover {
  color: var(--accent) !important;
  border-color: var(--accent) !important;
  background: var(--accent-dim) !important;
}

/* Hide dot separators between action buttons */
.trip-summary-actions span[aria-hidden="true"] {
  display: none;
}

.trip-refine-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.trip-refine-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.trip-refine-btn:active {
  transform: translateY(1px);
}

.trip-plan-row .trip-row-activity-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.trip-row-activity-main {
  min-width: 0;
  flex: 1;
}

.trip-row-edit-trigger {
  flex-shrink: 0;
  border: 1px solid rgba(206, 136, 34, 0.35);
  background: rgba(206, 136, 34, 0.08);
  color: var(--accent);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.trip-row-edit-trigger:hover {
  background: rgba(206, 136, 34, 0.14);
  border-color: rgba(206, 136, 34, 0.5);
  color: #f0a949;
}

/* ── Activity details trigger (opens detail sheet) ── */
.trip-row-details-trigger {
  flex-shrink: 0;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  padding: 5px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}

.trip-row-details-trigger:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.trip-row-details-trigger .details-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  font-size: 10px;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
}

.trip-row-editor-row td {
  padding-top: 0;
  padding-bottom: 12px;
  background: rgba(206, 136, 34, 0.03);
}

.trip-row-editor {
  border: 1px solid rgba(206, 136, 34, 0.18);
  background: rgba(206, 136, 34, 0.05);
  border-radius: 12px;
  padding: 12px;
  margin-top: 4px;
}

.trip-row-editor-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.trip-row-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trip-row-edit-action {
  border: 1px solid rgba(206, 136, 34, 0.28);
  background: rgba(255, 248, 235, 0.86);
  color: #7a4c12;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.trip-row-edit-action:hover {
  background: #fff3df;
  border-color: rgba(206, 136, 34, 0.44);
  transform: translateY(-1px);
}

.trip-book-btn {
  display: block;
  width: 100%;
  background: transparent;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  padding: 11px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: none;
  letter-spacing: 0.01em;
}

.trip-book-btn:hover {
  background: var(--accent-dim);
  transform: translateY(-1px);
  box-shadow: none;
}

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

/* ══════════════════════════════════════════════
   PHASE 1 — Itinerary Card System
   New card-based layout to replace the table.
   Codex: swap renderTripPlanTableHtml() to emit
   this structure instead of <table>.
   ══════════════════════════════════════════════ */

/*
  TARGET HTML STRUCTURE (for Codex to implement in the renderer):

  <div class="itinerary-cards">

    <div class="itinerary-day-header">
      <span class="itinerary-day-badge">Day 1</span>
    </div>

    <div class="itinerary-card" data-trip-row-day-id="..." data-trip-row-item-id="..." data-trip-item-type="activity" data-activity-sheet-row="...">
      <div class="itinerary-card-row">
        <img class="itinerary-card-photo" src="..." alt="..." loading="lazy" />
        <div class="itinerary-card-body">
          <div class="itinerary-card-name">Northern Lights Chase</div>
          <div class="itinerary-card-operator">Arctic Explorer · ~3 hrs</div>
          <div class="itinerary-card-price">≈ 1 290 NOK per person</div>
          <div class="itinerary-card-actions">
            <button class="trip-row-details-trigger" type="button" data-activity-sheet-trigger="...">
              <span class="details-icon">i</span><span class="details-label"> Details</span>
            </button>
            <button class="trip-row-edit-trigger" type="button" data-trip-row-edit-trigger="...">Change</button>
          </div>
        </div>
      </div>
    </div>

    <div class="itinerary-day-header">
      <span class="itinerary-day-badge">Day 2</span>
    </div>

    ...more cards...

  </div>
*/

/* ── Section header ── */
.itinerary-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.itinerary-section-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.itinerary-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.itinerary-section-meta {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ── Card container ── */
.itinerary-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-bottom: 16px;
  position: relative;
  padding-left: 28px;
}

/* Timeline vertical connector */
.itinerary-cards::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 16px;
  bottom: 16px;
  width: 2px;
  background: var(--border);
  border-radius: 1px;
}

/* ── Day headers ── */
.itinerary-day-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  margin-top: 4px;
  position: relative;
}

.itinerary-day-header:first-child {
  margin-top: 0;
}

/* Timeline node (dot on the line) */
.itinerary-day-header::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--bg);
  z-index: 1;
}

/* Day badge pill */
.itinerary-day-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Day summary title */
.itinerary-day-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.3;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Trip day overview strip (sticky nav, desktop only) ── */
.itinerary-day-strip {
  display: none;
  position: sticky;
  top: 0;
  z-index: 5;
  gap: 8px;
  padding: 10px 0;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--bg);
  border-bottom: 1px solid var(--border-soft);
}

.itinerary-day-strip::-webkit-scrollbar {
  display: none;
}

.itinerary-day-pill {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  min-width: 120px;
  max-width: 180px;
  text-align: left;
  font: inherit;
}

.itinerary-day-pill:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
}

.itinerary-day-pill:active {
  transform: scale(0.98);
}

.itinerary-day-pill-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.itinerary-day-pill-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

/* ── Activity card ── */
.itinerary-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Horizontal row layout: square thumbnail + text side by side */
.itinerary-card-row {
  display: flex;
  align-items: stretch;
}

.itinerary-card-free-time {
  background: rgba(108, 140, 255, 0.03);
  border-style: dashed;
  cursor: default;
}

.itinerary-card[data-trip-row-updating="true"] {
  border-color: rgba(206, 136, 34, 0.42);
  box-shadow: 0 0 0 1px rgba(206, 136, 34, 0.08);
}

.itinerary-card-highlighted {
  animation: itinerary-card-highlight 1s ease-out;
}

@keyframes itinerary-card-highlight {
  0% {
    border-color: rgba(108, 140, 255, 0.7);
    box-shadow: 0 0 0 1px rgba(108, 140, 255, 0.22), 0 10px 28px rgba(108, 140, 255, 0.12);
  }
  100% {
    border-color: var(--border);
    box-shadow: none;
  }
}

.itinerary-card:hover {
  border-color: rgba(108, 140, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.itinerary-card[data-trip-row-updating="true"]:hover {
  border-color: rgba(206, 136, 34, 0.42);
  box-shadow: 0 0 0 1px rgba(206, 136, 34, 0.08);
}

.itinerary-card:active {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* ── Card photo — square thumbnail ── */
.itinerary-card-photo {
  display: block;
  width: 100px;
  min-height: 100px;
  flex-shrink: 0;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.itinerary-card-free-time-icon {
  width: 100px;
  min-height: 100px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px dashed var(--border);
  background:
    radial-gradient(circle at 50% 50%, rgba(108, 140, 255, 0.12), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
  color: var(--accent);
  font-size: 28px;
  font-weight: 500;
}

/* ── Card body (text + actions) ── */
.itinerary-card-body {
  padding: 12px 16px 12px;
  flex: 1;
  min-width: 0;
}

/* ── Activity name ── */
.itinerary-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 2px;
}

/* ── Operator + duration ── */
.itinerary-card-operator {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 1px;
}

.itinerary-card-free-time-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.itinerary-card-free-time-copy {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 6px;
  max-width: 48ch;
}

/* ── Price ── */
.itinerary-card-price {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 6px;
}

.itinerary-card-pending {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #c88b2b;
  background: rgba(206, 136, 34, 0.08);
  border: 1px solid rgba(206, 136, 34, 0.18);
  border-radius: 999px;
  padding: 7px 11px;
  margin-bottom: 10px;
}

.itinerary-card-pending-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.88;
  animation: itinerary-card-pending-pulse 1.2s ease-in-out infinite;
}

@keyframes itinerary-card-pending-pulse {
  0%, 100% {
    opacity: 0.45;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ── Actions row ── */
.itinerary-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-soft);
}

/* Reuse existing trigger styles (already defined above) */
.itinerary-card-actions .trip-row-details-trigger {
  margin: 0;
}

.itinerary-card-actions .trip-row-edit-trigger {
  margin: 0;
}

.trip-row-add-trigger {
  background: rgba(108, 140, 255, 0.08);
  border: 1px solid rgba(108, 140, 255, 0.16);
  border-radius: 999px;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  cursor: pointer;
}

.trip-row-add-trigger:hover {
  background: rgba(108, 140, 255, 0.14);
}

.itinerary-card[data-trip-row-updating="true"] .trip-row-edit-trigger {
  opacity: 0.62;
  cursor: default;
}

/* ── Inline editor block under a card ── */
.itinerary-cards > .trip-row-editor-row {
  margin-top: -4px;
  margin-bottom: 6px;
}

/* ── Supporting recommendations (restaurants, bars, cafés) ── */
.addon-section {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.addon-section .itinerary-section-header {
  margin-bottom: 8px;
}

.addon-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.addon-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border-soft);
  transition: background 0.15s ease;
  border-radius: var(--radius-sm);
}

.addon-item:last-child {
  border-bottom: none;
}

.addon-item:hover {
  background: var(--bg-elevated);
}

.addon-item-emoji {
  font-size: 18px;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.addon-item-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.addon-item-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.addon-item-meta {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.addon-item-note {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  white-space: normal;
}

.addon-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding-left: 12px;
}

.addon-item-link {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.9;
}

.addon-item-link:hover {
  text-decoration: underline;
}

.addon-item-remove {
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--border-soft);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.addon-item:hover .addon-item-remove,
.addon-item:hover .addon-item-link {
  opacity: 1;
}

.restaurant-item .addon-item-remove,
.restaurant-item .addon-item-link {
  opacity: 1;
}

.rsempty {
  padding: 14px 4px 6px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Restaurant shortlist row (text-only, refined) ── */
.rslist {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.rsrow {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 4px;
  border-top: 1px solid var(--border-soft);
}

.rsrow:first-child {
  border-top: none;
  padding-top: 6px;
}

.rsrow-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rsrow-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.rsrow-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  letter-spacing: -0.01em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rsrow-price {
  flex-shrink: 0;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.rsrow-meta {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rsrow-reservation {
  color: var(--text-muted);
  margin-left: 2px;
}

.rsrow-note {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 4px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rsrow-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 2px;
  padding-left: 4px;
}

.rsrow-link {
  font-size: 12.5px;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.rsrow-link:hover {
  color: var(--text-primary);
  border-bottom-color: var(--text-primary);
}

.rsrow-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  padding: 2px 4px;
  opacity: 0.65;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.rsrow-remove:hover {
  opacity: 1;
  color: var(--text-primary);
}

@media (max-width: 640px) {
  .rsrow {
    flex-direction: column;
    gap: 10px;
    padding: 16px 4px;
  }
  .rsrow-actions {
    padding-left: 0;
    padding-top: 0;
    gap: 18px;
    width: 100%;
  }
  .rsrow-remove {
    margin-left: auto;
  }
}

.addon-item-remove:hover {
  color: var(--text-primary);
  border-color: var(--border);
  background: var(--border-soft);
}

.optional-section {
  margin-top: 4px;
}

.stay-section {
  margin-top: 10px;
}

.addon-item-stay {
  align-items: center;
}

.addon-item-stay-placeholder {
  gap: 12px;
}

/* ══════════════════════════════════════════════
   PHASE 1 — Desktop Sticky Trip Panel
   On wide screens, chat and trip plan sit
   side-by-side. The plan sticks while chat scrolls.
   Only activates when a plan exists (Codex adds
   .has-plan to .chat-shell when plan is generated).
   Wizard stays full-width.
   ══════════════════════════════════════════════ */

@media (min-width: 1024px) {
  .chat-shell.has-plan {
    display: grid;
    grid-template-columns: 420px 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0 24px;
    width: 100%;
    max-width: 1440px;
    padding: 0 24px;
    height: 100vh;
    overflow: hidden;
  }

  .chat-shell.has-plan .chat-header {
    grid-column: 1 / -1;
    grid-row: 1;
    margin-bottom: 0;
    position: relative;
    top: auto;
    padding-left: 0;
    padding-right: 0;
  }

  /* Hero and wizard span full width */
  .chat-shell.has-plan .hero-section,
  .chat-shell.has-plan .wizard-section {
    grid-column: 1 / -1;
  }

  .chat-shell.has-plan .chat-column {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    justify-self: stretch;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 24px;
    padding-bottom: 16px;
  }

  .chat-shell.has-plan .chat-context-bar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    flex-shrink: 0;
    width: min(100%, 620px);
    padding: 4px 0 14px;
  }

  /* ── Trip Destination Hero: single destination image on left sidebar ── */
  .chat-shell.has-plan .trip-highlights {
    flex-shrink: 0;
    width: min(100%, 620px);
    padding: 0 0 12px;
  }

  .trip-destination-hero {
    border-radius: 12px;
    overflow: hidden;
  }

  .trip-destination-hero-photo {
    display: block;
    width: 100%;
    height: 160px;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
  }

  /* Hide destination hero on shorter screens to save vertical space */
  @media (max-height: 750px) {
    .chat-shell.has-plan .trip-highlights {
      display: none;
    }
  }

  /* ── Chat Module: conversation surface ── */
  .chat-shell.has-plan .chat-module {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 180px;
    width: min(100%, 620px);
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    padding: 0;
  }

  /* Messages area inside the module */
  .chat-shell.has-plan .chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 8px 2px 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.06) transparent;
  }

  /* Hide "Continue planning" divider on desktop */
  .chat-shell.has-plan .chat-messages::before {
    display: none;
  }

  /* When messages overflow, switch to normal flow so scroll works */
  .chat-shell.has-plan .chat-messages.chat-messages-scrollable {
    justify-content: flex-start;
  }

  .chat-shell.has-plan .chat-messages::-webkit-scrollbar {
    width: 4px;
  }
  .chat-shell.has-plan .chat-messages::-webkit-scrollbar-track {
    background: transparent;
  }
  .chat-shell.has-plan .chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.06);
    border-radius: 2px;
  }
  .chat-shell.has-plan .chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.12);
  }

  .chat-shell.has-plan .chat-messages.chat-messages-short {
    justify-content: flex-end;
  }

  /* Message bubbles inside the module: softer, more refined */
  .chat-shell.has-plan .message {
    gap: 8px;
  }

  .chat-shell.has-plan .message-avatar {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .chat-shell.has-plan .message-bubble {
    font-size: 13.5px;
    line-height: 1.55;
    padding: 10px 14px;
  }

  .chat-shell.has-plan .message.ai .message-bubble {
    background: var(--bg-elevated);
    border-color: var(--border);
  }

  .chat-shell.has-plan .message.user .message-bubble {
    background: var(--user-bg);
    border-color: var(--user-border);
  }

  /* Suggestion chips inside the module */
  .chat-shell.has-plan .chat-suggestions {
    flex-shrink: 0;
    padding: 2px 18px 10px;
  }

  /* Input bar: grounded at the bottom */
  .chat-shell.has-plan .chat-input-bar {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 8px 2px 0;
    border-top: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    flex-shrink: 0;
    z-index: auto;
    border-radius: 0;
  }

  /* Input field: the only bordered element — clear visual anchor */
  .chat-shell.has-plan .chat-input-wrap {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2px 4px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }

  .chat-shell.has-plan .chat-input-wrap:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
  }

  .chat-shell.has-plan .chat-input {
    background: transparent;
    border: none;
    box-shadow: none;
    font-size: 13.5px;
    padding: 8px 10px;
    min-height: 36px;
  }

  .chat-shell.has-plan .send-btn {
    width: 32px;
    height: 32px;
  }

  /* Disclaimer: very quiet inside the module */
  .chat-shell.has-plan .chat-disclaimer {
    font-size: 10px;
    opacity: 0.4;
    margin-top: 4px;
    margin-bottom: 0;
    text-align: center;
  }

  .chat-shell.has-plan .trip-draft {
    grid-column: 2;
    grid-row: 2;
    align-self: stretch;
    min-width: 0;
    position: relative;
    top: auto;
    height: 100%;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
    border-bottom: none;
    border-left: none;
    margin-left: 0;
    padding: 20px 24px;
    background: var(--bg);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.04), 0 1px 12px rgba(0, 0, 0, 0.06);
  }

  /* WebKit scrollbar styling for the plan panel */
  .chat-shell.has-plan .trip-draft::-webkit-scrollbar {
    width: 6px;
  }
  .chat-shell.has-plan .trip-draft::-webkit-scrollbar-track {
    background: transparent;
  }
  .chat-shell.has-plan .trip-draft::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 3px;
  }
  .chat-shell.has-plan .trip-draft::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.22);
  }

  .chat-shell.has-plan .trip-draft-expanded {
    max-height: none;
    overflow: visible;
  }

  /* Day overview strip only shown on desktop — mobile scrolls vertically through full-screen plan tab */
  .chat-shell.has-plan .itinerary-day-strip {
    display: flex;
  }

  /* Cards inside the plan panel get subtle contrast */
  .chat-shell.has-plan .itinerary-card {
    background: var(--bg-elevated);
  }

  /* Card photos: square thumbnails on desktop too */
  .itinerary-card-photo {
    width: 100px;
    min-height: 100px;
  }
}

/* ── Trip Loading Visual ── */
/* Clean loading experience with heading, progress bar, and checklist */

.trip-loading-visual {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 0 24px;
  animation: skeleton-fade-in 0.4s ease-out;
}

.trip-loading-visual-inline {
  margin-top: 8px;
}

.trip-loading-heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
}

/* Checklist */
.loading-checklist {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.loading-checklist-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border-soft);
  opacity: 0.35;
  transition: opacity 0.4s ease, transform 0.3s ease;
  transform: translateX(0);
}

.loading-checklist-step:last-child {
  border-bottom: none;
}

.loading-step-icon {
  font-size: 16px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.loading-step-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
}

.loading-step-status {
  font-size: 12px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

/* Active step: highlighted with pulsing dot */
.loading-step-active {
  opacity: 1;
}

.loading-step-active .loading-step-label {
  font-weight: 600;
}

.loading-step-active .loading-step-status::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: loading-dot-pulse 1.2s ease-in-out infinite;
}

@keyframes loading-dot-pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* Done step: green check */
.loading-step-done {
  opacity: 0.7;
}

.loading-step-done .loading-step-status::after {
  content: '✓';
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: #0d8a80;
}

/* Indeterminate progress track (reused) */
.skeleton-progress-track {
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  overflow: hidden;
}

.skeleton-progress-bar {
  height: 100%;
  width: 40%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(217, 159, 74, 0.7));
  animation: skeleton-indeterminate 1.8s ease-in-out infinite;
}

@keyframes skeleton-indeterminate {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

@keyframes skeleton-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* (Old skeleton card styles removed — replaced by trip-loading-visual) */

/* ── Trip Waiting Visual ── */
/* Gentle placeholder shown on desktop chat-entry while the model may be
   asking clarifying questions. Replaced by the real plan (or loading
   checklist) once plan generation begins. */

.trip-waiting-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 56px 28px;
  min-height: 260px;
  animation: skeleton-fade-in 0.4s ease-out;
}

.trip-waiting-icon {
  font-size: 26px;
  color: var(--accent);
  opacity: 0.75;
  animation: trip-waiting-pulse 2.4s ease-in-out infinite;
}

.trip-waiting-heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.trip-waiting-sub {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 320px;
}

.trip-waiting-checklist {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(100%, 360px);
  margin-top: 6px;
  text-align: left;
}

.trip-waiting-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trip-waiting-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.trip-waiting-pills,
.trip-waiting-missing {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trip-waiting-pill,
.trip-waiting-missing-item {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.2;
}

.trip-waiting-pill {
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.trip-waiting-missing-item {
  background: rgba(108, 140, 255, 0.08);
  color: var(--accent);
}

.trip-waiting-missing-item.is-optional {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-muted);
  border-style: dashed;
}

.trip-waiting-section-optional .trip-waiting-section-title {
  color: var(--text-muted);
  font-weight: 600;
}

.trip-waiting-empty {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text-muted);
}

@keyframes trip-waiting-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* ══════════════════════════════════════════════
   PHASE 1.5 — Suggestion Chips
   Contextual action buttons shown after plan
   generation to guide the user's next step.
   ══════════════════════════════════════════════ */

.chat-suggestions {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
  padding: 12px 0 4px;
}

.chat-suggestion-chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
}

.chat-suggestion-chip:hover {
  border-color: var(--accent);
  background: rgba(217, 159, 74, 0.08);
  color: var(--text-primary);
}

.chat-suggestion-chip:active {
  transform: scale(0.97);
}

@media (min-width: 1024px) {
  /* On desktop with plan visible, hide in-chat chips — nudge grid replaces them */
  .chat-shell.has-plan .chat-suggestions {
    display: none;
  }

  /* On desktop without plan, still show chips */
  .chat-suggestions:not(.chat-area-hidden) {
    display: flex;
  }
}

/* Hide on mobile to keep the view clean — chips are primarily a desktop feature */
@media (max-width: 640px) {
  .chat-suggestions {
    padding: 8px 0 4px;
  }

  .chat-suggestion-chip {
    font-size: 12px;
    padding: 6px 12px;
  }
}

/* ══════════════════════════════════════════════
   PHASE 1.5 — Planning Nudges
   Warm next-step actions between trip highlights
   and chat module on desktop. Replaces in-chat
   suggestion chips when plan is visible.
   ══════════════════════════════════════════════ */

.planning-nudges {
  display: none; /* hidden by default, shown via JS removing chat-area-hidden + desktop media query */
}

.planning-nudge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  text-align: left;
}

.planning-nudge:hover {
  border-color: var(--accent);
  background: rgba(217, 159, 74, 0.04);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.planning-nudge:active {
  transform: scale(0.98);
}

.planning-nudge-emoji {
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}

.planning-nudge-label {
  line-height: 1.3;
}

/* Desktop: show nudges as 2-col grid when plan is visible */
@media (min-width: 1024px) {
  .chat-shell.has-plan .planning-nudges:not(.chat-area-hidden) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    width: min(100%, 620px);
    padding: 0 0 14px;
    flex-shrink: 0;
    flex-grow: 0;
  }

  /* Hide old suggestion chips inside chat module when nudges are visible */
  .chat-shell.has-plan .chat-suggestions {
    display: none !important;
  }
}

/* Mobile: hide nudges entirely — keep suggestion chips in chat module on mobile */
@media (max-width: 1023px) {
  .planning-nudges {
    display: none !important;
  }
}

/* ── Booking section (expanded) ── */
.trip-booking-section {
  margin-top: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  animation: msg-in 0.2s ease-out;
}

.trip-booking-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trip-booking-group {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
}

.trip-booking-group-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.trip-booking-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  color: var(--text-primary);
}

.trip-booking-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(206, 136, 34, 0.22);
}

.trip-booking-meta {
  color: var(--text-secondary);
}

.trip-booking-link {
  flex-shrink: 0;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
}

.trip-booking-link:hover {
  background: rgba(108, 140, 255, 0.25);
}

.trip-booking-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  font-style: italic;
}

.planner-choice-message .message-body {
  max-width: min(640px, calc(100% - 44px));
}

.planner-choice-bubble {
  min-width: 280px;
}

.planner-choice-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.planner-choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.planner-choice-btn {
  border: 1px solid rgba(206, 136, 34, 0.24);
  background: #fff8ee;
  color: #8b5714;
  border-radius: 999px;
  padding: 10px 14px;
  min-height: 40px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.15;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.planner-choice-btn:hover {
  background: #fff2dc;
  border-color: rgba(206, 136, 34, 0.42);
  box-shadow: 0 4px 14px rgba(142, 89, 20, 0.08);
  transform: translateY(-1px);
}

.planner-choice-btn-selected {
  background: #f0d8b4;
  border-color: rgba(206, 136, 34, 0.48);
  color: #6a3f0a;
}

.planner-choice-bubble-complete .planner-choice-btn:not(.planner-choice-btn-selected) {
  opacity: 0.52;
}

.planner-choice-btn:disabled {
  cursor: default;
}

/* ── Links in AI messages ── */
.message-bubble a {
  color: var(--accent);
  text-decoration: none;
}

.message-bubble a:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

/* ── Mobile ── */
@media (max-width: 640px) {
  .chat-header {
    padding: 12px 14px;
  }

  .chat-messages {
    padding: 16px 14px 100px;
  }

  .chat-input-bar {
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .chat-input-bar .chat-disclaimer {
    display: none;
  }

  .hero-section {
    height: 380px;
  }

  .hero-overlay {
    padding: 0 20px 32px;
  }

  .hero-tagline {
    font-size: 26px;
  }

  .hero-sub {
    font-size: 14px;
  }

  .wizard-section {
    padding: 24px 16px 24px;
    justify-content: flex-start;
  }

  .wizard-progress {
    margin-bottom: 28px;
  }

  .wizard-question {
    font-size: 19px;
  }

  /* Destination cards → stacked on mobile */
  .dest-cards-images {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .dest-card-img {
    min-height: 180px;
  }

  .dest-card-photo {
    height: 180px;
  }

  .dest-card-img .dest-card-name {
    font-size: 20px;
  }

  .dest-card-img .dest-card-desc {
    font-size: 13px;
  }

  .season-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .season-card {
    min-height: 160px;
  }

  .season-card-photo {
    height: 160px;
  }

  .season-card-name {
    font-size: 17px;
  }

  .season-pill {
    font-size: 10px;
    padding: 2px 6px;
  }

  .dates-divider {
    margin: 18px 0 16px;
    font-size: 11px;
  }

  .dates-picker {
    gap: 10px;
  }

  .dates-input {
    padding: 11px 12px;
    font-size: 13.5px;
  }

  .dates-confirm-btn {
    padding: 12px 20px;
    font-size: 13.5px;
  }

  .planner-choice-bubble {
    min-width: 0;
  }

  .planner-choice-grid {
    gap: 8px;
  }

  .planner-choice-btn {
    width: 100%;
    justify-content: center;
  }

  .trip-plan-row .trip-row-activity-wrap {
    align-items: flex-start;
    flex-direction: column;
  }

  .trip-row-edit-trigger {
    align-self: flex-start;
  }

  .duration-options {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .duration-btn {
    padding: 16px 12px;
  }

  .duration-label {
    font-size: 14px;
  }

  .interest-group-chips {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .interest-chip {
    font-size: 12.5px;
    padding: 10px 12px;
    border-radius: 12px;
  }

  .interest-chip-subtitle {
    font-size: 10.5px;
  }

  .interest-group-title {
    font-size: 10px;
  }

  .trip-draft {
    padding: 10px 14px;
    top: 48px;
  }

  .trip-draft-title {
    font-size: 13px;
  }

  .trip-draft-cost {
    font-size: 12px;
  }

  .trip-draft-actions .trip-refine-btn {
    font-size: 11px;
    padding: 4px 8px;
  }

  #trip-draft-save {
    width: 100%;
    justify-content: flex-start;
    align-items: flex-start;
    margin-left: 0;
  }

  .trip-draft-save-group,
  .trip-draft-save-meta {
    align-items: flex-start;
  }

  .trip-draft-save-hint,
  .trip-draft-save-actions {
    text-align: left;
    justify-content: flex-start;
  }

  .trip-draft-expanded {
    max-height: 65vh;
  }

  /* ── Mobile card layout: transform table into stacked cards ── */
  .trip-summary-table {
    display: block;
    border-collapse: separate;
  }

  .trip-summary-table thead {
    display: none;
  }

  .trip-summary-table tbody {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .trip-summary-table tr {
    display: flex;
    flex-direction: column;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    position: relative;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }

  .trip-summary-table tr:active {
    border-color: var(--border);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  }

  .trip-summary-table tr:last-child td {
    border-bottom: none;
  }

  .trip-summary-table td {
    display: block;
    border-bottom: none;
    padding: 0;
  }

  /* Day label — small muted header, order 1 */
  .trip-summary-table td:nth-child(1) {
    order: 1;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 6px;
  }

  /* Activity name — bold and prominent, order 2 */
  .trip-summary-table td:nth-child(2) {
    order: 2;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
  }

  .trip-summary-table td:nth-child(2) .trip-cell-main {
    font-size: 15px;
    font-weight: 600;
  }

  /* Activity wrap — keep edit trigger inline after name */
  .trip-summary-table td:nth-child(2) .trip-row-activity-wrap {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  .trip-summary-table td:nth-child(2) .trip-row-edit-trigger {
    font-size: 11px;
    padding: 3px 10px;
  }

  .trip-summary-table td:nth-child(2) .trip-row-details-trigger {
    font-size: 10.5px;
    padding: 3px 6px;
  }

  /* Provider — subtle line, order 3 */
  .trip-summary-table td:nth-child(3) {
    order: 3;
    font-size: 12.5px;
    color: var(--text-secondary);
    margin-bottom: 2px;
  }

  .trip-summary-table td:nth-child(3) .trip-cell-main {
    font-weight: 400;
    color: var(--text-secondary);
    display: inline;
  }

  .trip-summary-table td:nth-child(3)::before {
    content: 'with ';
    color: var(--text-muted);
  }

  /* Cost — right-aligned on the day label line, order 1 (absolute) */
  .trip-summary-table td:nth-child(4) {
    position: absolute;
    top: 14px;
    right: 16px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
  }

  /* Editor row — full width, no card styling */
  .trip-row-editor-row {
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 0;
    margin-top: -6px;
    margin-bottom: 4px;
  }

  .trip-row-editor-row td {
    padding: 0 !important;
    background: transparent;
    position: static;
  }

  .trip-row-editor-row td::before {
    display: none;
  }

  /* Editor row — card style */
  .trip-row-editor-row {
    border-color: rgba(206, 136, 34, 0.25);
    background: rgba(206, 136, 34, 0.03);
  }

  .trip-row-editor-row td {
    padding: 0 !important;
    background: transparent;
  }

  .trip-row-editor-row td[colspan] {
    position: static;
  }

  /* Cost total — less dominant on mobile */
  .trip-draft-expanded-inner .trip-summary-total {
    font-size: 13px;
    text-align: left;
  }

  /* Hide duplicate cost in collapsed header when plan is expanded */
  .trip-draft.draft-expanded .trip-draft-cost {
    display: none;
  }

  .trip-summary-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }

  .trip-refine-btn {
    width: auto;
    text-align: center;
  }

  /* Hide trust copy on mobile — saves space in planning phase */
  .trip-pricing-trust {
    display: none;
  }

  /* Compact pill buttons on mobile */
  .trip-summary-actions [data-summary-refine] {
    font-size: 11.5px !important;
    padding: 5px 10px !important;
  }

  .message-bubble {
    font-size: 14px;
  }

  /* ── Phase 1: Itinerary cards — mobile overrides ── */
  .itinerary-cards {
    gap: 10px;
  }

  .itinerary-card-photo {
    width: 88px;
    min-height: 88px;
  }

  .itinerary-card-body {
    padding: 10px 12px 8px;
  }

  .itinerary-card-name {
    font-size: 14.5px;
  }

  .itinerary-card-operator {
    font-size: 12px;
  }

  .itinerary-card-price {
    font-size: 12px;
    margin-bottom: 8px;
  }

  .itinerary-card-actions {
    gap: 6px;
    padding-top: 6px;
  }

  .itinerary-card-actions .trip-row-edit-trigger {
    font-size: 11px;
    padding: 3px 10px;
  }

  .itinerary-card-actions .trip-row-details-trigger {
    font-size: 10.5px;
    padding: 3px 6px;
  }

  .itinerary-day-badge {
    font-size: 11px;
    padding: 3px 10px;
  }

  .itinerary-cards {
    padding-left: 22px;
  }

  .itinerary-cards::before {
    left: 5px;
  }

  .itinerary-day-header::before {
    left: -22px;
    width: 12px;
    height: 12px;
  }
}

/* ── Events Strip ──────────────────────────────────────────────────────── */

.events-section {
  /* Break out of the chat-shell's max-width: 860px to go full viewport width */
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  border-top: 1px solid var(--border);
  padding: 24px 32px 40px;
  background: var(--bg);
  transition: background 0.6s ease;
}

.events-section.events-hidden {
  display: none;
}

.homepage-featured-section {
  padding-bottom: 28px;
  background:
    linear-gradient(180deg, rgba(214, 141, 28, 0.08), rgba(214, 141, 28, 0) 70%),
    var(--bg);
}

.events-header {
  margin-bottom: 24px;
}

.events-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.events-header p {
  font-size: 14px;
  color: var(--text-secondary);
}

.events-strip {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  /* Hide scrollbar */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.events-strip::-webkit-scrollbar {
  display: none;
}

/* ── Event Card ─────────────────────────────────────────────────────────── */

.event-card {
  flex: 0 0 320px;
  min-width: 320px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: default;
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* ── Card photo ─────────────────────────────────────────────────────────── */

.event-card-photo-wrap {
  position: relative;
  width: 100%;
  padding-top: 55%; /* ~16:9-ish but slightly taller */
  overflow: hidden;
  background: var(--bg-surface);
}

.event-card-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.event-card:hover .event-card-photo {
  transform: scale(1.04);
}

/* ── Season badge ──────────────────────────────────────────────────────── */

.event-season-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.event-season-winter {
  background: rgba(0, 200, 200, 0.25);
  color: #00e5cc;
  border: 1px solid rgba(0, 229, 204, 0.35);
}

.event-season-summer {
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.event-season-autumn {
  background: rgba(217, 119, 6, 0.22);
  color: #fdba74;
  border: 1px solid rgba(251, 146, 60, 0.35);
}

/* ── Card body ──────────────────────────────────────────────────────────── */

.event-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
}

.event-card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.event-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.event-card-type {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
}

.event-card-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  line-height: 1.3;
}

.event-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  /* Clamp to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
}

/* ── Highlights ─────────────────────────────────────────────────────────── */

.event-card-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.event-highlight-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 3px 9px;
  white-space: nowrap;
}

/* ── Plan this trip button ──────────────────────────────────────────────── */

.event-plan-btn {
  margin-top: auto;
  padding-top: 12px;
  width: 100%;
  padding: 11px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.1s ease;
  text-align: center;
  margin-top: auto;
}

.event-plan-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

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

@media (max-width: 600px) {
  .events-section {
    padding: 28px 16px 36px;
  }

  .events-header h2 {
    font-size: 18px;
  }

  .event-card {
    flex: 0 0 280px;
    min-width: 280px;
  }
}

/* ─────────────────────────────────────────────────────
   Discovery Cards
───────────────────────────────────────────────────── */

/* Hide discovery section when wizard is hidden (chat mode active) */
.wizard-section.wizard-hidden ~ .discovery-section {
  display: none;
}
.hero-section.hero-hidden ~ .discovery-section {
  display: none;
}

.discovery-section {
  padding: 48px 24px 56px;
  max-width: 1100px;
  margin: 0 auto;
}

.discovery-section-header {
  text-align: center;
  margin-bottom: 32px;
}

.discovery-section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.discovery-section-sub {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Strip: 3-column grid on desktop, 2 on tablet/mobile */
.discovery-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Photo-based card */
.discovery-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 16px;
  border: 1px solid var(--border);
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  min-height: 240px;
  padding: 0;
  background: var(--bg-surface);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.discovery-card-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.discovery-card:hover .discovery-card-photo {
  transform: scale(1.05);
}

.discovery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

/* Gradient scrim over photo */
.discovery-card-overlay {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 56px 18px 18px;
  background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.5) 55%, transparent 100%);
  margin-top: auto;
}

.discovery-card-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-bottom: 2px;
}

.discovery-card-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}

.discovery-card-tagline {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  line-height: 1.4;
}

/* ── Backdrop ── */

.discovery-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0);
  z-index: 200;
  pointer-events: none;
  transition: background 0.25s ease;
}

.discovery-backdrop-visible {
  background: rgba(0,0,0,0.75);
  pointer-events: auto;
}

/* ── Modal ── */

.discovery-modal {
  position: fixed;
  inset: 0;
  z-index: 201;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  padding: 0;
}

@media (min-width: 640px) {
  .discovery-modal {
    align-items: center;
    padding: 24px;
  }
}

.discovery-modal-inner {
  background: var(--bg-surface);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 680px;
  max-height: 92vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  pointer-events: none;
  border: 1px solid var(--border);
}

@media (min-width: 640px) {
  .discovery-modal-inner {
    border-radius: 20px;
    transform: translateY(20px) scale(0.97);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
}

.discovery-modal-open .discovery-modal-inner {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 640px) {
  .discovery-modal-open .discovery-modal-inner {
    transform: translateY(0) scale(1);
  }
}

/* Modal header — photo background */
.discovery-modal-header {
  position: relative;
  padding: 80px 24px 28px;
  border-radius: 20px 20px 0 0;
  text-align: center;
  overflow: hidden;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.discovery-modal-header-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.discovery-modal-header-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.15) 100%);
}

.discovery-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none;
  color: rgba(255,255,255,0.9);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.discovery-modal-close:hover {
  background: rgba(0,0,0,0.55);
  color: #fff;
}

.discovery-modal-title {
  position: relative;
  z-index: 1;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.discovery-modal-tagline {
  position: relative;
  z-index: 1;
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* Modal body */
.discovery-modal-body {
  padding: 28px 24px 32px;
}

.discovery-tips-heading {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.discovery-tips {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.discovery-tip {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: var(--bg-elevated);
  border-radius: 12px;
  border: 1px solid var(--border-soft);
}

.discovery-tip-icon {
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 1px;
}

.discovery-tip-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.discovery-tip-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.discovery-tip-body {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Modal footer / CTA */
.discovery-modal-footer {
  margin-top: 28px;
  text-align: center;
}

.discovery-plan-btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--accent, #6c8cff);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  width: 100%;
  max-width: 320px;
}

.discovery-plan-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.discovery-plan-hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Freetext textarea highlight when pre-filled from discovery card */
.freetext-textarea.discovery-prefilled {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  transition: border-color 0.3s, box-shadow 0.3s;
}

/* ── Discovery responsive ── */

@media (max-width: 900px) {
  .discovery-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .discovery-section {
    padding: 32px 16px 40px;
  }

  .discovery-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .discovery-card {
    min-height: 180px;
  }

  .discovery-card-title {
    font-size: 17px;
  }

  .discovery-card-overlay {
    padding: 40px 14px 14px;
  }

  .discovery-modal-title {
    font-size: 22px;
  }

  .discovery-tip {
    padding: 14px 12px;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   Activity Detail Sheet
   Mobile: bottom sheet (slides up from bottom)
   Desktop: right side panel (slides in from right)
   ══════════════════════════════════════════════════════════════════════ */

/* ── Backdrop ── */
.activity-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 210;
  pointer-events: none;
  transition: background 0.25s ease;
}

.activity-sheet-backdrop.active {
  background: rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

/* ── Sheet container ── */
.activity-sheet {
  position: fixed;
  z-index: 211;
  pointer-events: none;
  /* Mobile: bottom sheet */
  bottom: 0;
  left: 0;
  right: 0;
  top: auto;
  display: flex;
  justify-content: center;
}

/* ── Inner panel ── */
.activity-sheet-inner {
  background: var(--bg);
  width: 100%;
  max-height: 85vh;
  border-radius: 20px 20px 0 0;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  pointer-events: none;
  border: 1px solid var(--border);
  border-bottom: none;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.activity-sheet.open .activity-sheet-inner {
  transform: translateY(0);
  pointer-events: auto;
}

/* ── Desktop: side panel ── */
@media (min-width: 900px) {
  .activity-sheet {
    top: 0;
    bottom: 0;
    left: auto;
    right: 0;
    width: 420px;
    display: flex;
    align-items: stretch;
  }

  .activity-sheet-inner {
    max-height: 100vh;
    border-radius: 0;
    border: none;
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  }

  .activity-sheet.open .activity-sheet-inner {
    transform: translateX(0);
  }

  .activity-sheet-handle {
    display: none;
  }
}

/* ── Drag handle (mobile only) ── */
.activity-sheet-handle {
  display: flex;
  justify-content: center;
  padding: 12px 0 4px;
  flex-shrink: 0;
}

.activity-sheet-handle span {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
}

/* ── Header ── */
.activity-sheet-header {
  padding: 8px 20px 16px;
  position: relative;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-soft);
}

.activity-sheet-close {
  position: absolute;
  top: 8px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-elevated);
  border-radius: 50%;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  z-index: 1;
}

.activity-sheet-close:hover {
  background: var(--border);
  color: var(--text-primary);
}

.activity-sheet-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 10px;
  padding-right: 40px;
  line-height: 1.3;
}

/* ── Meta row: provider · price · duration ── */
.activity-sheet-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.activity-sheet-meta:empty {
  display: none;
}

.activity-sheet-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.activity-sheet-meta-sep {
  color: var(--border);
  font-size: 10px;
}

.activity-sheet-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(206, 136, 34, 0.22);
}

/* ── Body ── */
.activity-sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

/* Sections — hidden by default, shown when populated */
.activity-sheet-section[hidden] {
  display: none;
}

.activity-sheet-section {
  margin-bottom: 20px;
}

.activity-sheet-section:last-child {
  margin-bottom: 0;
}

.activity-sheet-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 10px;
}

/* ── Summary ── */
.activity-sheet-summary-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  margin: 0;
}

/* ── Tags (best for / season fit) ── */
.activity-sheet-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.activity-sheet-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

/* ── Practical info (definition list) ── */
.activity-sheet-details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  font-size: 13px;
  margin: 0;
}

.activity-sheet-details dt {
  color: var(--text-muted);
  font-weight: 500;
}

.activity-sheet-details dd {
  color: var(--text-primary);
  margin: 0;
}

/* ── Why we picked it ── */
.activity-sheet-why-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
}

/* ── Local tip ── */
.activity-sheet-tip-card {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}

.activity-sheet-tip-icon {
  font-size: 16px;
  flex-shrink: 0;
  line-height: 1.4;
}

.activity-sheet-tip-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

/* ── Photo strip (future) ── */
.activity-sheet-photo-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.activity-sheet-photo-strip::-webkit-scrollbar {
  display: none;
}

.activity-sheet-photo-strip img {
  width: 160px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

/* ── Action buttons ── */
.activity-sheet-actions {
  padding: 16px 20px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.activity-sheet-action-row {
  display: flex;
  gap: 10px;
}

.activity-sheet-actions:has(.activity-sheet-action-row > [hidden]:first-child:last-child),
.activity-sheet-actions:empty,
.activity-sheet-action-row:empty {
  display: none;
}

/* Hide actions bar when both buttons are hidden */
.activity-sheet-actions:has(.activity-sheet-action-row > :only-child[hidden]) {
  display: none;
}

.activity-sheet-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.activity-sheet-btn[hidden] {
  display: none;
}

.activity-sheet-btn-secondary {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.activity-sheet-btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.activity-sheet-btn-primary {
  background: var(--accent);
  border: none;
  color: #fff;
}

.activity-sheet-btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.activity-sheet-booking-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
}

/* ── Mobile refinements ── */
@media (max-width: 640px) {
  .activity-sheet-name {
    font-size: 18px;
  }

  .activity-sheet-header {
    padding: 4px 16px 14px;
  }

  .activity-sheet-body {
    padding: 14px 16px;
  }

  .activity-sheet-actions {
    padding: 14px 16px;
  }

  .activity-sheet-action-row {
    flex-direction: column;
  }
}

/* ══════════════════════════════════════════════
   Mobile Tab Bar
   Bottom navigation for mobile. Only visible
   after plan generation (.has-plan) on viewports
   under 1024px. Desktop is completely unaffected.
   ══════════════════════════════════════════════ */

.mobile-tab-bar {
  display: none;
}

@media (max-width: 1023px) {
  .mobile-tab-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255, 250, 242, 0.96);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    justify-content: space-around;
    align-items: center;
  }

  body[data-theme="winter"] .mobile-tab-bar {
    background: rgba(14, 16, 25, 0.96);
  }

  /* Tab button */
  .mobile-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 0 2px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease;
    position: relative;
  }

  .mobile-tab-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.03em;
  }

  .mobile-tab-icon {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
  }

  /* Active tab */
  .mobile-tab.active {
    color: var(--accent);
  }

  /* Active indicator dot */
  .mobile-tab.active::after {
    content: '';
    position: absolute;
    top: 2px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
  }

  /* Dimmed tab (Trip before a plan exists) */
  .mobile-tab-dimmed {
    opacity: 0.35;
    cursor: default;
  }

  .mobile-tab-dimmed:active {
    transform: none;
  }

  /* Disabled tabs */
  .mobile-tab-disabled {
    opacity: 0.3;
    cursor: default;
  }

  .mobile-tab-disabled:active {
    transform: none;
  }

  /* ── View switching ── */

  /* Bottom padding so page content clears the tab bar */
  .chat-shell {
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }

  /* Push input bar above tab bar */
  .chat-shell .chat-input-bar {
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }

  /* Add bottom padding to messages for tab bar clearance */
  .chat-shell.has-plan .chat-messages {
    padding-bottom: calc(120px + 56px + env(safe-area-inset-bottom, 0px));
  }

  /* When Trip tab is active: hide chat, show trip full-screen */
  .chat-shell.has-plan.mobile-tab-trip .chat-column,
  .chat-shell.has-plan.mobile-tab-trip .chat-input-bar {
    display: none !important;
  }

  .chat-shell.has-plan.mobile-tab-trip .trip-draft {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: auto;
    overflow-y: visible;
    max-height: none;
    border-bottom: none;
    border-radius: 0;
    box-shadow: none;
    padding: 12px 16px calc(56px + env(safe-area-inset-bottom, 0px) + 16px);
  }

  .chat-shell.has-plan.mobile-tab-trip .trip-draft-expanded,
  .chat-shell.has-plan.mobile-tab-trip .trip-draft-expanded-hidden {
    display: block;
    max-height: none;
    overflow: visible;
  }

  .chat-shell.has-plan.mobile-tab-trip .trip-draft-toggle,
  .chat-shell.has-plan.mobile-tab-trip .trip-draft-collapsed {
    display: none;
  }

  /* When Chat tab is active: hide trip draft */
  .chat-shell.has-plan:not(.mobile-tab-trip) .trip-draft {
    display: none;
  }
}
