:root {
  --bg: #08101a;
  --bg-2: #0c1523;
  --panel: rgba(8, 13, 22, 0.76);
  --panel-strong: rgba(10, 16, 26, 0.9);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --line-soft: rgba(255, 255, 255, 0.06);
  --text: #f7f9fc;
  --muted: rgba(247, 249, 252, 0.68);
  --accent: #dce8ff;
  --accent-soft: rgba(171, 198, 255, 0.18);
  --accent-2: #9bc0ff;
  --success: #d9f0ff;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  --shadow-tight: 0 20px 48px rgba(0, 0, 0, 0.28);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --max-width: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 12%, rgba(136, 171, 255, 0.18), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.08), transparent 18%),
    linear-gradient(180deg, #07101a 0%, #09111c 45%, #081018 100%);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

.hidden {
  display: none !important;
}

.desktop-only {
  display: none;
}

.mobile-only {
  display: block;
}

.ambient,
.light-sweep,
.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
}

.ambient {
  border-radius: 999px;
  filter: blur(110px);
  opacity: 0.58;
}

.ambient-a {
  inset: 4vh auto auto 4vw;
  width: 280px;
  height: 280px;
  background: rgba(124, 163, 255, 0.16);
  animation: driftA 18s ease-in-out infinite alternate;
}

.ambient-b {
  inset: auto 3vw 12vh auto;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.08);
  animation: driftB 22s ease-in-out infinite alternate;
}

.ambient-c {
  inset: 34vh auto auto 46vw;
  width: 240px;
  height: 240px;
  background: rgba(152, 192, 255, 0.12);
  animation: driftC 24s ease-in-out infinite alternate;
}

.light-sweep {
  background:
    radial-gradient(circle at 50% -10%, rgba(255,255,255,0.1), transparent 28%),
    linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.04) 50%, transparent 70%);
  mix-blend-mode: screen;
  opacity: 0.45;
  animation: sweep 18s linear infinite;
}

.grain {
  opacity: 0.05;
  background-image:
    linear-gradient(rgba(255,255,255,0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.12) 1px, transparent 1px);
  background-size: 3px 3px, 3px 3px;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(var(--max-width), calc(100vw - 22px));
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 0 calc(112px + env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 16px;
  flex-wrap: wrap;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 14px;
  height: 44px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(155,192,255,0.35));
  box-shadow: 0 0 32px rgba(155,192,255,0.28);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(1.14rem, 2vw, 1.34rem);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

#bookingButtonDesktop {
  display: none;
}

.primary-btn,
.ghost-btn,
.choice-card,
.style-card,
.slot-card,
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 13px 18px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.primary-btn,
.ghost-btn {
  min-height: 48px;
}

.primary-btn {
  border-color: rgba(255,255,255,0.22);
  background: linear-gradient(180deg, rgba(225,234,255,0.96), rgba(204,223,255,0.84));
  color: #09101a;
  font-weight: 700;
  box-shadow: 0 14px 32px rgba(183, 209, 255, 0.18);
}

.primary-btn:hover,
.choice-card:hover,
.style-card:hover,
.slot-card:hover,
.ghost-btn:hover,
.chip:hover {
  transform: translateY(-1px);
}

.primary-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

.ghost-btn {
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

.ghost-btn.compact {
  padding: 10px 14px;
  min-height: 40px;
}

.top-book-btn,
.floating-btn {
  padding-inline: 20px;
}

.progress-shell {
  padding: 10px 0 20px;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.muted,
.entry-note,
.progress-copy,
.modal-copy,
.field-hint,
.summary-note,
.chapter-note,
.summary-kicker {
  color: var(--muted);
}

.progress-copy {
  font-size: 0.98rem;
}

.save-status,
.helper-pill,
.metric-kicker,
.chapter-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.88);
  white-space: nowrap;
}

.progress-track {
  position: relative;
  width: 100%;
  height: 13px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
}

.progress-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  animation: progressSheen 3.8s linear infinite;
}

.progress-bar {
  position: relative;
  z-index: 1;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(170,198,255,0.72), rgba(255,255,255,0.95));
  box-shadow: 0 0 30px rgba(170,198,255,0.2);
  transition: width 420ms cubic-bezier(.2,.8,.2,1);
}

.progress-pips {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
}

.progress-pip {
  font-size: 0.74rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 220ms ease, opacity 220ms ease;
}

.progress-pip.active {
  color: rgba(255,255,255,0.9);
}

.progress-shell.milestone-pulse .progress-track {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 0 40px rgba(171,198,255,0.14);
}

.planner-shell {
  display: grid;
  grid-template-columns: 1fr;
}

.panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(11,18,29,0.78), rgba(8,13,22,0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px);
}

.panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% -8%, rgba(162,188,255,0.15), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.06), transparent 22%);
  pointer-events: none;
}

.panel-body,
.panel-footer {
  position: relative;
  z-index: 1;
}

.panel-body {
  padding: clamp(22px, 4vw, 40px);
}

.panel-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 clamp(22px, 4vw, 40px) clamp(20px, 3vw, 30px);
  flex-wrap: wrap;
}

.panel.stage-shift .stage-shell {
  animation: stageIn 380ms cubic-bezier(.2,.8,.2,1);
}

.stage-shell {
  display: grid;
  gap: 28px;
}

.chapter-banner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: rgba(255,255,255,0.04);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.chapter-banner-left {
  display: grid;
  gap: 6px;
}

.stage-head {
  display: grid;
  gap: 10px;
}

.stage-title {
  font-size: clamp(1.88rem, 4vw, 3.1rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.stage-subtitle {
  max-width: 58ch;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.08rem);
  line-height: 1.62;
}

.choice-grid,
.style-grid,
.slot-grid,
.metrics-grid,
.summary-grid,
.booking-form-grid {
  display: grid;
  gap: 14px;
}

.choice-grid.two-col,
.style-grid,
.metrics-grid,
.summary-grid,
.booking-form-grid {
  grid-template-columns: 1fr;
}

.choice-card,
.style-card,
.slot-card,
.summary-card,
.metric-card,
.summary-hero,
.booking-preview-card,
.ranked-item,
.range-shell,
.final-contact-card,
.modal-card,
.entry-card,
.internal-drawer {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.045);
  box-shadow: var(--shadow-tight);
}

.choice-card,
.style-card,
.slot-card,
.summary-card,
.metric-card,
.booking-preview-card,
.final-contact-card {
  width: 100%;
  text-align: left;
  color: var(--text);
}

.choice-card {
  padding: 18px;
  display: grid;
  gap: 10px;
}

.choice-card strong,
.style-card strong,
.metric-card strong,
.summary-card strong,
.booking-preview-card strong,
.final-contact-card strong {
  display: block;
  font-size: 1rem;
  line-height: 1.24;
}

.choice-card span,
.style-card span,
.metric-card p,
.summary-card p,
.booking-preview-card p,
.slot-card span,
.final-contact-card p {
  display: block;
  color: var(--muted);
  line-height: 1.48;
}

.choice-card.active,
.chip.active,
.style-card.active,
.slot-card.active {
  background: linear-gradient(180deg, rgba(220,232,255,0.14), rgba(255,255,255,0.06));
  border-color: rgba(255,255,255,0.28);
  box-shadow: 0 18px 40px rgba(126, 164, 255, 0.14);
}

.choice-media {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.08);
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

.style-card-copy {
  padding: 16px 18px 18px;
  display: grid;
  gap: 8px;
}

.style-preview {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}

.style-preview-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(9,16,26,0.62);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 0.73rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.style-preview-wrap {
  position: relative;
}

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

.chip {
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  padding: 12px 14px;
}

.ranked-list {
  display: grid;
  gap: 10px;
}

.ranked-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: rgba(255,255,255,0.04);
}

.rank-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  font-weight: 700;
}

.field-group,
.slider-wrap {
  display: grid;
  gap: 14px;
}

.field-label {
  display: block;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.88);
  margin-bottom: 8px;
}

.text-input,
.text-area {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  padding: 16px 16px;
  background: rgba(255,255,255,0.05);
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.text-input:focus,
.text-area:focus {
  border-color: rgba(255,255,255,0.28);
  box-shadow: 0 0 0 3px rgba(171,198,255,0.08);
}

.text-area {
  min-height: 148px;
  resize: vertical;
}

.range-shell {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
}

.range-value {
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

input[type='range'] {
  width: 100%;
  accent-color: #dce8ff;
}

.helper-row,
.summary-actions,
.entry-actions,
.drawer-actions,
.booking-hero-actions,
.booking-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.summary-actions,
.booking-actions {
  justify-content: flex-end;
}

.final-contact-grid {
  display: grid;
  gap: 14px;
}

.final-contact-card {
  padding: 18px;
}

.summary-layout {
  display: grid;
  gap: 18px;
}

.summary-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(20px, 4vw, 28px);
  background:
    radial-gradient(circle at top left, rgba(160,189,255,0.22), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
}

.summary-hero::after {
  content: '';
  position: absolute;
  inset: auto -12% -48% auto;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  filter: blur(24px);
}

.summary-hero h3 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.summary-hero p {
  max-width: 58ch;
  color: rgba(255,255,255,0.84);
  line-height: 1.56;
}

.metrics-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-card,
.summary-card,
.booking-preview-card {
  padding: 18px;
}

.metric-card p,
.summary-card p,
.booking-preview-card p {
  margin-top: 10px;
}

.metric-kicker {
  margin-bottom: 14px;
}

.summary-grid {
  grid-template-columns: 1fr;
}

.summary-card-list {
  display: grid;
  gap: 10px;
}

.summary-card-list span {
  display: block;
  color: rgba(255,255,255,0.82);
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-soft);
}

.planning-lock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.entry-overlay,
.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5, 10, 16, 0.68);
  backdrop-filter: blur(18px);
}

.entry-card,
.modal-card,
.internal-drawer {
  width: min(720px, calc(100vw - 24px));
  padding: clamp(22px, 4vw, 34px);
  background: linear-gradient(180deg, rgba(9,16,26,0.9), rgba(8,13,22,0.96));
}

.entry-card {
  text-align: left;
}

.entry-copy {
  margin-top: 14px;
  margin-bottom: 22px;
  color: rgba(255,255,255,0.84);
  line-height: 1.6;
}

.stack {
  display: grid;
}

.wide {
  width: 100%;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.booking-stage {
  align-items: stretch;
}

.modal-stage-card {
  width: min(1120px, calc(100vw - 20px));
  max-height: calc(100vh - 20px);
  overflow: auto;
  padding: 22px;
}

.modal-stage-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 6px 6px 18px;
  flex-wrap: wrap;
}

.booking-stage-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.booking-stage-main,
.booking-stage-side {
  display: grid;
  gap: 16px;
}

.booking-form-grid {
  gap: 12px;
}

.booking-preview {
  display: grid;
  gap: 14px;
}

.slot-grid {
  grid-template-columns: 1fr;
}

.slot-card {
  padding: 15px 16px;
  background: rgba(255,255,255,0.04);
}

.slot-card strong {
  display: block;
  margin-bottom: 4px;
}

.confirm-card {
  width: min(520px, calc(100vw - 22px));
}

.floating-book {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(8,13,22,0), rgba(8,13,22,0.72) 36%, rgba(8,13,22,0.94));
}

.floating-btn {
  width: 100%;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(18px);
  z-index: 60;
  min-width: min(90vw, 320px);
  max-width: 90vw;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(6,11,19,0.92);
  border: 1px solid var(--line);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
  box-shadow: var(--shadow-tight);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.internal-drawer {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 70;
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.internal-output {
  white-space: pre-wrap;
  color: rgba(255,255,255,0.84);
  line-height: 1.55;
}

@media (min-width: 720px) {
  .choice-grid.two-col,
  .style-grid,
  .slot-grid,
  .booking-form-grid,
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .summary-grid.summary-wide {
    grid-template-columns: 1.25fr 1fr;
  }
}

@media (min-width: 940px) {
  #bookingButtonDesktop {
    display: inline-flex;
  }

  .mobile-only {
    display: none;
  }

  .panel-body {
    padding: 38px;
  }

  .panel-footer {
    padding: 0 38px 28px;
  }

  .booking-stage-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
    align-items: start;
  }
}

@media (max-width: 939px) {
  .summary-actions,
  .booking-actions,
  .panel-footer .helper-row:last-child {
    width: 100%;
  }

  .summary-actions .primary-btn,
  .summary-actions .ghost-btn,
  .panel-footer .helper-row:last-child .primary-btn,
  .panel-footer .helper-row:last-child .ghost-btn,
  .booking-actions .primary-btn,
  .booking-actions .ghost-btn {
    flex: 1 1 100%;
    justify-content: center;
  }
}

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

@keyframes driftA {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(28px, 18px, 0) scale(1.1); }
}

@keyframes driftB {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-22px, -18px, 0) scale(1.08); }
}

@keyframes driftC {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(12px, -16px, 0) scale(1.12); }
}

@keyframes sweep {
  from { transform: translateX(-8%); }
  to { transform: translateX(8%); }
}

@keyframes progressSheen {
  from { transform: translateX(-100%); }
  to { transform: translateX(300%); }
}

@keyframes stageIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
