:root {
  --panel: rgba(255, 250, 243, 0.88);
  --panel-strong: #fffaf3;
  --text: #1f1720;
  --muted: #6d6169;
  --accent: #bf5b36;
  --accent-dark: #8d351a;
  --line: rgba(31, 23, 32, 0.1);
  --seat: #efe6d8;
  --seat-selected: #bf5b36;
  --seat-occupied: #2d262f;
  --shadow: 0 18px 40px rgba(92, 58, 36, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 208, 149, 0.55), transparent 28%),
    radial-gradient(circle at top right, rgba(191, 91, 54, 0.18), transparent 24%),
    linear-gradient(160deg, #f4ecdf 0%, #f7f1e8 45%, #efe2d3 100%);
  min-height: 100vh;
}
button, input, select { font: inherit; }
.page-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 40px; }
.hero, .journeys-panel, .booking-panel {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.hero { padding: 24px; position: relative; overflow: hidden; }
.hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -90px auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(191, 91, 54, 0.2), transparent 65%);
}
.topbar, .hero-content, .main-grid, .section-heading, .selected-journey-card, .summary-row, .hero-actions, .legend, .brand, .journey-card-top, .journey-card-bottom, .journey-meta-strip { display: flex; }
.topbar, .selected-journey-card, .summary-row, .legend, .journey-card-bottom, .journey-meta-strip { align-items: center; justify-content: space-between; }
.topbar { gap: 16px; }
.brand { align-items: center; gap: 14px; }
.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent) 0%, #de9b6d 100%);
  color: #fff8f0;
  font-weight: 700;
}
.eyebrow, .selected-label, .hero-card-label {
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.brand h1, .section-heading h3, .selected-journey-card h4, .hero-card h3 { margin: 0; }
.ghost-button, .primary-button {
  border: 0;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.ghost-button {
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.62);
  color: var(--text);
}
.primary-button {
  padding: 14px 20px;
  border-radius: 16px;
  background: var(--accent);
  color: #fff9f3;
  box-shadow: 0 10px 24px rgba(191, 91, 54, 0.24);
}
.ghost-button:hover, .primary-button:hover { transform: translateY(-1px); }
.hero-content { gap: 22px; margin-top: 32px; align-items: stretch; }
.hero-copy, .hero-card { flex: 1; }
.hero-copy h2 {
  margin: 10px 0 14px;
  max-width: 11ch;
  font-family: "Instrument Serif", serif;
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  line-height: 0.94;
  font-weight: 400;
}
.hero-text, #heroTripMeta, #selectedJourneyRoute, .hero-note, .booking-message, .journey-meta, .journey-description, .detector-result, .qr-copy { color: var(--muted); }
.hero-text, .journey-description { line-height: 1.7; }
.hero-actions { justify-content: flex-start; gap: 16px; margin-top: 24px; flex-wrap: wrap; }
.hero-card {
  align-self: flex-end;
  padding: 24px;
  border-radius: 24px;
  min-height: 240px;
  background: linear-gradient(180deg, rgba(255,248,239,0.7), rgba(255,240,228,0.92));
  border: 1px solid rgba(191,91,54,0.1);
}
.hero-pill-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.hero-pill, .price-chip, .journey-badge {
  display: inline-flex;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(191,91,54,0.1);
  color: var(--accent-dark);
  font-size: 0.92rem;
  font-weight: 500;
}
.main-grid { gap: 24px; margin-top: 24px; align-items: start; }
.journeys-panel, .booking-panel { padding: 24px; }
.journeys-panel { flex: 1.1; }
.booking-panel { flex: 0.9; position: sticky; top: 18px; }
.section-heading { flex-direction: column; gap: 8px; margin-bottom: 18px; }
.detector-card, .journey-card, .summary-card {
  border-radius: 22px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  padding: 18px;
}
.journey-list, .payment-options, .applicant-grid { display: grid; gap: 16px; }
.detector-result { min-height: 24px; margin: 12px 0 0; }
.journey-card {
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, opacity 500ms ease, filter 500ms ease;
  cursor: pointer;
}
.journey-card:hover, .journey-card.active {
  transform: translateY(-3px);
  border-color: rgba(191,91,54,0.36);
  box-shadow: 0 16px 30px rgba(92,58,36,0.08);
}
.journey-card.departing {
  opacity: 0;
  transform: translateX(42px) scale(0.95);
  filter: blur(4px);
  pointer-events: none;
}
.journey-card-top { justify-content: space-between; gap: 14px; align-items: flex-start; }
.journey-card-bottom { margin-top: 18px; }
.journey-title { margin: 8px 0 6px; font-size: 1.3rem; }
.journey-description { margin: 10px 0 0; }
.journey-meta-strip { margin-top: 18px; gap: 10px; flex-wrap: wrap; }
.journey-meta-strip span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(191,91,54,0.08);
  color: var(--accent-dark);
  font-size: 0.9rem;
}
.screen-label { margin-top: 20px; text-align: center; color: var(--muted); font-size: 0.84rem; }
.screen-curve {
  height: 22px;
  margin: 10px auto 20px;
  width: 80%;
  border-top: 4px solid rgba(191,91,54,0.28);
  border-radius: 50%;
}
.legend { gap: 12px; flex-wrap: wrap; justify-content: center; margin-bottom: 18px; color: var(--muted); font-size: 0.9rem; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend-box { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.legend-box.available, .seat { background: var(--seat); }
.legend-box.selected, .seat.selected { background: var(--seat-selected); }
.legend-box.occupied, .seat.occupied { background: var(--seat-occupied); }
.seat-map { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
.seat {
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: 12px 12px 8px 8px;
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
}
.seat.selected, .seat.occupied { color: #fff8f0; }
.seat.occupied { cursor: not-allowed; }
.payment-panel { margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.payment-title, .field-label { margin: 0 0 10px; font-size: 0.95rem; font-weight: 600; }
.payment-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fffdf9;
  cursor: pointer;
}
.payment-option.active { border-color: rgba(191,91,54,0.4); background: rgba(191,91,54,0.06); }
.payment-fields { margin-top: 14px; }
.text-field, .select-field {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fffdf9;
  color: var(--text);
}
.hidden, .qr-modal.hidden { display: none; }
.full-width { width: 100%; margin-top: 18px; }
.booking-message { min-height: 24px; margin: 14px 0 0; }
.qr-modal { position: fixed; inset: 0; display: grid; place-items: center; z-index: 20; }
.qr-backdrop { position: absolute; inset: 0; background: rgba(31,23,32,0.52); backdrop-filter: blur(6px); }
.qr-card {
  position: relative;
  z-index: 1;
  width: min(92vw, 380px);
  padding: 24px;
  border-radius: 24px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-align: center;
}
.qr-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(31,23,32,0.08);
  color: var(--text);
  cursor: pointer;
}
.qr-image {
  width: min(100%, 240px);
  height: auto;
  margin: 12px auto;
  display: block;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: white;
  padding: 10px;
}
@media (max-width: 960px) {
  .hero-content, .main-grid { flex-direction: column; }
  .booking-panel { position: static; }
}
@media (max-width: 640px) {
  .page-shell { width: min(100% - 20px, 100%); padding-top: 10px; }
  .hero, .journeys-panel, .booking-panel { border-radius: 22px; padding: 18px; }
  .topbar, .selected-journey-card, .journey-card-top, .journey-card-bottom { flex-direction: column; align-items: flex-start; }
  .hero-copy h2 { max-width: 100%; font-size: clamp(2.4rem, 16vw, 4rem); }
  .seat-map { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
