:root {
  --primary: #0705CE;
  --primary-strong: #0604A6;
  --primary-050: #ECECFB;
  --accent: #00CBFF;
  --accent-strong: #00A1D9;
  --accent-050: #E4F8FF;
  --gradient: linear-gradient(120deg, #0705CE 0%, #00A1D9 45%, #3AAEF2 72%, #6AF0EF 100%);
  --background: #F9F7F8;
  --surface: #FFFFFF;
  --surface-2: #F1EFF0;
  --notice-warm: #EECECA;
  --border: #E7E4E2;
  --text-primary: #0E1217;
  --text-secondary: #5B6270;
  --text-muted: #8A90A0;
  --text-inverse: #FFFFFF;
  --halal-certified: #15803D;
  --muslim-friendly: #57A773;
  --success: #16A34A;
  --warning: #EF532C;
  --error: #D93A1E;
  --info: #46BACE;
  --radius-card: 16px;
  --radius-button: 12px;
  --radius-chip: 999px;
  --radius-input: 12px;
  --shadow-card: 0 1px 3px rgba(2, 0, 1, 0.08);
  --shadow-sticky: 0 -2px 12px rgba(2, 0, 1, 0.10);
  --shadow-hero: 0 10px 28px rgba(14, 18, 23, 0.12);
  --font: "Plus Jakarta Sans", "Noto Sans TC", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--background);
  color: var(--text-primary);
  font-family: var(--font);
  line-height: 1.6;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 24px 16px;
  display: flex;
  justify-content: center;
  background: var(--background);
}

body.onboarding-body {
  padding: 0;
  background: var(--gradient);
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; line-height: 1.2; font-weight: 800; letter-spacing: -0.015em; }
h2 { font-size: 22px; line-height: 1.3; font-weight: 700; letter-spacing: 0; }
h3 { font-size: 18px; line-height: 1.4; font-weight: 600; letter-spacing: 0; }

.workspace {
  width: min(100%, 640px);
  display: grid;
  gap: 16px;
}

.launcher-hero,
.launcher-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.launcher-hero {
  padding: 24px;
  display: grid;
  gap: 10px;
}

.launcher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.launcher-card {
  min-height: 128px;
  padding: 16px;
  display: grid;
  align-content: space-between;
  gap: 12px;
}

.launcher-card span,
.muted { color: var(--text-secondary); }
.caption { color: var(--text-secondary); font-size: 13px; line-height: 1.5; letter-spacing: 0.01em; }

.phone {
  width: min(100%, 375px);
  min-height: 760px;
  max-height: 860px;
  margin-inline: auto;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 28px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 70px rgba(14, 18, 23, 0.16);
}

.phone.onboarding {
  width: min(100%, 640px);
  min-height: 100vh;
  max-height: none;
  border: 0;
  border-radius: 0;
  background: var(--gradient);
  box-shadow: none;
}

.topbar,
.drillbar {
  min-height: 56px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0;
}

.origin-pill,
.pill,
.chip,
.tab,
.badge,
.nav-item,
.button,
.back,
.filter {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-chip);
  background: var(--surface);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  font-weight: 700;
}

.origin-pill,
.badge {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12px;
}

.lang-control {
  position: relative;
  flex: none;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 176px;
  padding: 10px;
  display: grid;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: 0 16px 34px rgba(14, 18, 23, 0.14);
  z-index: 20;
}

.lang-option {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 10px;
  font-weight: 700;
}

.button {
  min-height: 48px;
  width: 100%;
  border-radius: var(--radius-button);
  border-color: var(--primary);
  background: var(--primary);
  color: var(--text-inverse);
  letter-spacing: 0.01em;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.button:active { transform: translateY(1px); }
.button.secondary {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--border);
}
.button.inline {
  width: auto;
  min-height: 40px;
  padding: 8px 12px;
}
.button:disabled {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text-muted);
  cursor: not-allowed;
}

.back {
  width: 40px;
  padding: 0;
  border-radius: var(--radius-chip);
}

.drill-title {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.screen {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.body {
  flex: 1;
  overflow: auto;
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 24px;
}

.body.compact { gap: 16px; }

.hero {
  background: var(--gradient);
  color: var(--text-inverse);
  border-radius: 20px;
  padding: 20px;
  display: grid;
  gap: 14px;
  box-shadow: var(--shadow-hero);
  position: relative;
  overflow: hidden;
}

/* Route motif: one restrained travel-path flourish behind the hero copy (echoes AI itinerary/route). */
.hero-route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero > :not(.hero-route) { position: relative; z-index: 1; }

.hero .caption,
.hero .muted { color: rgba(255, 255, 255, 0.82); }

.hero-search {
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: var(--radius-input);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  font-weight: 700;
}

.hero-search .icon { color: var(--primary); flex: none; }

.hero-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-weight: 700;
  padding: 0;
  outline: none;
}

.hero-input::placeholder { color: var(--text-secondary); font-weight: 700; }
.hero-input::-webkit-search-cancel-button { -webkit-appearance: none; }

.section { display: grid; gap: 12px; }
.section-head { display: flex; justify-content: space-between; gap: 12px; align-items: end; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px;
  box-shadow: var(--shadow-card);
}

/* Tactile feedback only on tappable (link) cards, not static content cards. */
a.card { transition: transform .15s ease, box-shadow .15s ease; }
@media (hover: hover) { a.card:hover { box-shadow: 0 6px 18px rgba(14, 18, 23, 0.09); } }
a.card:active { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) { a.card { transition: none; } a.card:active { transform: none; } }

.photo {
  min-height: 118px;
  border-radius: 14px;
  background: var(--primary-050);
  border: 1px solid var(--border);
  display: flex;
  align-items: end;
  padding: 12px;
  color: var(--primary);
  font-weight: 800;
}

.photo.small { min-height: 72px; }

.cards-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 156px;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.destination-card {
  min-height: 184px;
  display: grid;
  align-content: space-between;
  gap: 10px;
}

.destination-card .photo.small {
  min-height: 112px;
  position: relative;
  overflow: hidden;
  align-items: flex-end;
}

.destination-card .photo-name {
  position: relative;
  z-index: 1;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.2;
}

/* Cover photo: image + bottom scrim so the white city label stays legible. */
.destination-card.has-photo .photo.small {
  background-size: cover;
  background-position: center;
}

.destination-card.has-photo .photo.small::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14, 18, 23, 0.72), rgba(14, 18, 23, 0) 58%);
}

.destination-card.has-photo .photo-name {
  color: var(--text-inverse);
  text-shadow: 0 1px 4px rgba(14, 18, 23, 0.5);
}

/* Featured lead card: full-width large photo for editorial size-contrast vs the scroll row. */
.destination-card.feature {
  display: block;
  min-height: 0;
  gap: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.photo.feature {
  min-height: 176px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  padding: 16px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-card);
}

.photo.feature::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14, 18, 23, 0.78), rgba(14, 18, 23, 0) 62%);
}

.photo.feature .photo-name {
  position: relative;
  z-index: 1;
  color: var(--text-inverse);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 6px rgba(14, 18, 23, 0.55);
}

.photo.feature .photo-sub {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.shortcut {
  min-height: 96px;
  display: grid;
  gap: 12px;
  align-content: space-between;
  justify-items: start;
  text-align: left;
}

.shortcut strong { letter-spacing: -0.005em; }

/* Branded icon chip — tinted rounded base lifts the bare glyph into a designed quick-action. */
.shortcut-ic {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--primary-050);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(7, 5, 206, 0.06);
  transition: transform .15s ease;
}

.shortcut-ic .icon { width: 24px; height: 24px; }

@media (hover: hover) { a.shortcut:hover .shortcut-ic { transform: translateY(-1px); } }
@media (prefers-reduced-motion: reduce) { .shortcut-ic { transition: none; } }

.icon {
  width: 28px;
  height: 28px;
  color: var(--primary);
}

.chips,
.tabs,
.filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.chip,
.tab,
.filter {
  white-space: nowrap;
  background: var(--surface-2);
}

.is-active,
.is-selected {
  background: var(--primary-050);
  border-color: var(--primary);
  color: var(--primary);
}

.field,
.radio-row,
.check-row {
  min-height: 52px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: var(--surface);
  color: var(--text-primary);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

.field { appearance: none; }
.radio-list { display: grid; gap: 10px; }
.stepper { display: grid; grid-template-columns: 48px 1fr 48px; gap: 10px; align-items: center; }
.stepper strong { text-align: center; font-size: 22px; }

.bottom-nav,
.sticky-cta {
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  padding: 10px 12px;
  box-shadow: var(--shadow-sticky);
}

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.nav-item {
  min-width: 0;
  min-height: 48px;
  border-radius: 12px;
  flex-direction: column;
  font-size: 12px;
  font-weight: 700;
  padding: 6px;
}

.nav-item svg { width: 18px; height: 18px; }

.timeline {
  display: grid;
  gap: 10px;
  position: relative;
}

.timeline-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 14px;
}

.time {
  font-size: 13px;
  font-weight: 800;
  color: var(--primary);
}

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag {
  min-height: 26px;
  border-radius: var(--radius-chip);
  background: var(--surface-2);
  color: var(--text-secondary);
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
}

.badge.ai {
  background: var(--primary-050);
  color: var(--primary);
  border-color: var(--primary);
}
.badge.template {
  background: var(--surface-2);
  color: var(--text-secondary);
  border-color: var(--border);
}
.badge.certified {
  background: var(--halal-certified);
  border-color: var(--halal-certified);
  color: var(--text-inverse);
}
.badge.friendly {
  background: var(--surface);
  border-color: var(--muslim-friendly);
  color: var(--halal-certified);
}

.status-card {
  border-radius: 20px;
  padding: 18px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.status-card.warning { background: color-mix(in srgb, var(--notice-warm) 52%, var(--surface)); border-color: var(--warning); }
.status-card.success { background: color-mix(in srgb, var(--success) 10%, var(--surface)); border-color: var(--success); }
.status-card.info { background: color-mix(in srgb, var(--info) 12%, var(--surface)); border-color: var(--info); }
.status-card.unsupported { background: var(--surface-2); }
.status-kicker { color: var(--text-secondary); font-size: 13px; font-weight: 700; }

.empty {
  border: 1px dashed var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  padding: 18px;
  display: grid;
  gap: 8px;
  text-align: center;
}

.notice {
  border-radius: var(--radius-card);
  background: var(--notice-warm);
  color: var(--text-primary);
  padding: 12px;
  font-size: 13px;
  font-weight: 700;
}

.skeleton {
  overflow: hidden;
  position: relative;
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.72), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

.bar {
  height: 12px;
  border-radius: var(--radius-chip);
  background: var(--primary-050);
  overflow: hidden;
}
.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.hide { display: none !important; }
.link-text { color: var(--accent-strong); font-weight: 800; }
.error-text { color: var(--error); font-size: 13px; font-weight: 700; }

.onboarding-panel {
  min-height: 100vh;
  width: min(100%, 640px);
  margin-inline: auto;
  padding: 32px 16px;
  color: var(--text-inverse);
  display: grid;
  align-content: center;
  gap: 24px;
}

.onboarding-panel > .section > .caption {
  color: rgba(255, 255, 255, 0.82);
}

.onboarding-panel .radio-row {
  color: var(--text-primary);
  background: rgba(255,255,255,.94);
}

.onboarding-panel .is-selected {
  border-color: var(--text-inverse);
  background: var(--primary-050);
}

@media (min-width: 700px) {
  body { padding-block: 32px; }
  .phone { width: min(100%, 640px); }
  .shortcut-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards-scroll { grid-auto-columns: 184px; }
}
