@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,560;9..144,620;9..144,680&family=IBM+Plex+Mono:wght@500&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

/* ===================================================================
   Palette — "Miami, turned up": bright sun-bleached cream + hot magenta
   + electric turquoise + marigold by day; vivid neons over tropical
   twilight indigo by night. No gloom.
   =================================================================== */
:root {
  --bg: #fff5ec;
  --bg-tint: #ffe7d5;
  --ink: #241a2e;
  --muted: #8a7189;
  --card: #ffffff;
  --border: #ffdec9;
  --border-strong: #f6c7a6;
  --accent: #ff2e88;          /* hot flamingo magenta */
  --accent-2: #00c4b4;        /* electric turquoise */
  --accent-ink: #ffffff;
  --sun: #ffb100;             /* marigold — gradients + highlights */
  --good: #12b886;
  --bad: #ff4d5e;
  --chip: #ffe3d1;
  --shadow: 0 1px 2px rgba(90, 40, 60, 0.06), 0 10px 28px -12px rgba(255, 46, 136, 0.22);
  --scrim: linear-gradient(180deg, rgba(26,10,30,0.10) 0%, rgba(26,10,30,0.42) 55%, rgba(26,10,30,0.74) 100%);

  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
}
:root:not([data-theme="light"]) { color-scheme: light dark; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a1140;
    --bg-tint: #241858;
    --ink: #f6edff;
    --muted: #bda9dc;
    --card: #241760;
    --border: #3a2882;
    --border-strong: #4e37a0;
    --accent: #ff4d9d;
    --accent-2: #2ae6d4;
    --accent-ink: #1a1140;
    --sun: #ffc44d;
    --good: #37e0a8;
    --bad: #ff6b81;
    --chip: #322074;
    --shadow: 0 1px 2px rgba(0,0,0,0.35), 0 14px 34px -14px rgba(255, 77, 157, 0.35);
    --scrim: linear-gradient(180deg, rgba(12,6,32,0.20) 0%, rgba(12,6,32,0.55) 55%, rgba(12,6,32,0.85) 100%);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1a1140; --bg-tint: #241858; --ink: #f6edff; --muted: #bda9dc;
  --card: #241760; --border: #3a2882; --border-strong: #4e37a0;
  --accent: #ff4d9d; --accent-2: #2ae6d4; --accent-ink: #1a1140; --sun: #ffc44d;
  --good: #37e0a8; --bad: #ff6b81; --chip: #322074;
  --shadow: 0 1px 2px rgba(0,0,0,0.35), 0 14px 34px -14px rgba(255, 77, 157, 0.35);
  --scrim: linear-gradient(180deg, rgba(12,6,32,0.20) 0%, rgba(12,6,32,0.55) 55%, rgba(12,6,32,0.85) 100%);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.55 var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1100px 560px at 102% -8%, color-mix(in srgb, var(--sun) 26%, transparent), transparent 60%),
    radial-gradient(900px 520px at -12% 2%, color-mix(in srgb, var(--accent-2) 20%, transparent), transparent 55%),
    radial-gradient(800px 500px at 50% 115%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
h1, h2, h3, h4 {
  font-family: var(--serif); font-weight: 560; letter-spacing: -0.015em;
  text-wrap: balance; margin: 0;
}

/* ---- top bar ---- */
.topbar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 12px 20px; position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--card) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand {
  font-family: var(--serif); font-weight: 680; font-size: 18px; letter-spacing: -0.02em;
  text-decoration: none; color: var(--ink);
}
.topnav { display: flex; gap: 2px; }
.topnav-end { justify-self: end; }
.topnav a {
  padding: 6px 12px; border-radius: 999px; text-decoration: none;
  color: var(--muted); font-size: 14px; font-weight: 500;
}
.topnav a:hover { color: var(--ink); }
.topnav a.active { background: var(--accent); color: var(--accent-ink); }

.wrap { max-width: 860px; margin: 22px auto; padding: 0 16px; }
.hero + .wrap { margin-top: 20px; }
.foot { max-width: 860px; margin: 8px auto 48px; padding: 0 16px; }

/* ---- hero (Trips) ---- */
.hero {
  position: relative; margin: 0 0 20px; border-radius: 0 0 20px 20px; overflow: hidden;
  isolation: isolate;
}
.hero-media {
  position: absolute; inset: 0; z-index: -2;
  background-image: var(--scrim), var(--hero-photo, none);
  background-size: cover, cover;
  background-position: center, center 35%;
  transform: scale(1.04);
  animation: heroDrift 26s ease-in-out infinite alternate;
}
@keyframes heroDrift { to { transform: scale(1.12) translateY(-2%); } }
.hero-inner {
  max-width: 860px; margin: 0 auto; padding: 84px 20px 22px;
  color: #fff;
}
.hero-eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 55%, #fff);
  display: flex; align-items: center; gap: 10px;
}
.hero-eyebrow::after { content: ""; height: 1px; width: 46px; background: currentColor; opacity: 0.6; }
.hero-title {
  font-family: var(--serif); font-weight: 680; font-size: clamp(2.1rem, 6vw, 3.4rem);
  line-height: 1.02; margin: 10px 0 6px; color: #fff;
  text-shadow: 0 2px 30px rgba(0,0,0,0.35);
}
.hero-sub { margin: 0; font-size: 15px; color: rgba(255,255,255,0.9); max-width: 46ch; }
.hero-form {
  margin-top: 20px; padding: 16px; border-radius: 16px;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.hero-form h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 12px; }

/* ---- cards ---- */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.card > h2:first-child, .card > h3:first-child { margin-bottom: 12px; }
.card h3 { font-size: 15px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.r { text-align: right; } .c { text-align: center; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row-between { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---- forms ---- */
input, button, select, textarea {
  font: inherit; color: var(--ink); padding: 9px 11px;
  border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
textarea { resize: vertical; width: 100%; }

.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 12px; align-items: end; }
.grid-form .f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.grid-form .f.wide, .grid-form .wide { grid-column: 1 / -1; }
.grid-form .f > span { font-size: 12px; color: var(--muted); font-weight: 600; }
.grid-form-actions { display: flex; align-items: end; }
.grid-form-actions .btn { width: 100%; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none;
  font-size: 14px; font-weight: 500; white-space: nowrap; transition: transform .08s ease;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(120deg, var(--accent), color-mix(in srgb, var(--accent) 62%, var(--sun)));
  border-color: transparent; color: #fff;
}
.btn.primary:hover { filter: brightness(1.04); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.ghost { background: none; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--chip); color: var(--ink); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); }
.btn:disabled { opacity: 0.55; cursor: default; }
.link { background: none; border: none; padding: 2px 4px; color: var(--accent); cursor: pointer; font-size: 13px; }
.icon-btn { background: none; border: none; color: var(--muted); cursor: pointer; padding: 2px 6px; border-radius: 6px; line-height: 1; }
.icon-btn:hover { background: var(--chip); color: var(--bad); }

/* ---- trip list ---- */
.trip-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.trip-card {
  position: relative; display: flex; justify-content: space-between; align-items: center;
  gap: 14px; padding: 16px 18px; background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  overflow: hidden; transition: transform .12s ease, border-color .12s ease;
}
.trip-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(var(--accent), var(--accent-2));
}
.trip-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.trip-card-main strong { font-family: var(--serif); font-weight: 560; font-size: 17px; }
.trip-card .dates { color: var(--muted); font-size: 13px; margin-top: 3px; }
.trip-card-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.badge {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, var(--card));
  color: color-mix(in srgb, var(--accent) 72%, var(--ink));
  font-size: 12px; font-weight: 600;
}

/* ---- trip header ---- */
.trip-head { position: relative; overflow: hidden; padding-top: 96px; }
.trip-head::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 150px; z-index: 0;
  background-image: linear-gradient(180deg, rgba(24,16,26,0.25), var(--card) 96%), var(--head-photo, none);
  background-size: cover; background-position: center 40%;
}
.trip-head > * { position: relative; z-index: 1; }
.back { display: inline-block; margin-bottom: 10px; font-size: 13px; text-decoration: none; color: var(--accent); }
.trip-head .back { color: #fff; }
.trip-title-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.title-input {
  flex: 1 1 auto; min-width: 0;
  font-family: var(--serif); font-size: 24px; font-weight: 620; letter-spacing: -0.02em;
  border: 1px solid transparent; background: transparent; padding: 4px 6px; color: var(--ink);
}
.title-input:hover { border-color: var(--border); }
.trip-head-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); flex-wrap: wrap;
}

/* traveler stepper (next to the trip title, and in the cost rail) */
.pax-stepper {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 2px;
  border: 1px solid var(--border-strong); border-radius: 999px; padding: 2px; background: var(--card);
}
.pax-count { font-size: 13px; font-weight: 600; padding: 0 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pax-btn {
  width: 26px; height: 26px; border-radius: 999px; border: none; background: transparent;
  color: var(--ink); font-size: 16px; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.pax-btn:hover { background: var(--chip); color: var(--accent); }
.pax-btn.sm { width: 20px; height: 20px; font-size: 13px; }

/* ---- trip layout: main column + always-on budget rail ---- */
.trip-layout {
  max-width: 1180px; margin: 22px auto; padding: 0 16px;
  display: grid; grid-template-columns: minmax(0, 1fr) 322px; gap: 22px; align-items: start;
}
.trip-main { min-width: 0; }
.cost-rail-inner {
  position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto;
  border: 1px solid var(--border); border-radius: 14px; padding: 14px 15px; background: var(--card);
  display: flex; flex-direction: column; gap: 10px;
}
.cost-rail-head { font-family: var(--serif); font-size: 16px; font-weight: 620; }
.muted.tiny, .tiny { font-size: 11px; color: var(--muted); line-height: 1.4; }

.rail-target { display: flex; flex-direction: column; gap: 4px; }
.rail-target > span:first-child { font-size: 12px; font-weight: 600; }
.rail-target-in {
  display: flex; align-items: center; gap: 4px;
  border: 1px solid var(--border-strong); border-radius: 10px; padding: 6px 10px; background: var(--bg-tint);
}
.rail-target-in > span { color: var(--muted); font-family: var(--mono); }
.rail-target-in input { border: none; background: none; font: inherit; width: 100%; padding: 0; font-variant-numeric: tabular-nums; }

.rail-expected { border-top: 1px solid var(--border); padding-top: 10px; }
.rail-expected-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-family: var(--mono); }
.cost-total { font-family: var(--mono); font-size: 24px; font-weight: 600; margin: 1px 0; font-variant-numeric: tabular-nums; }
.cost-sub { font-size: 12px; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.cost-pax { display: inline-flex; align-items: center; gap: 1px; border: 1px solid var(--border); border-radius: 999px; padding: 1px; }
.cost-pax > span { font-size: 12px; font-weight: 600; padding: 0 3px; }
.cost-meter { margin: 4px 0 2px; }
.cost-lines { list-style: none; margin: 4px 0 0; padding: 8px 0 0; border-top: 1px solid var(--border); display: grid; gap: 5px; }
.cost-lines li { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.cost-lines .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); }
.check-f { flex-direction: row !important; align-items: center; gap: 7px; }

.rail-est { border-top: 1px solid var(--border); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.rail-est .ai-out:empty { display: none; }
.rail-est .hp-result { padding: 10px; }
.rail-est .hp-result-head { flex-direction: column; gap: 2px; align-items: flex-start; }
.rail-est .ai-actions { gap: 6px; }

.rail-lines { border-top: 1px solid var(--border); padding-top: 8px; }
.rail-lines > summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--muted); list-style-position: inside; }
.rail-lines-body { margin-top: 8px; display: flex; flex-direction: column; gap: 10px; }
.rail-scroll { overflow-x: auto; }
.rail-scroll .tbl { font-size: 11px; }
.rail-scroll .tbl .mini { min-width: 44px; }
.rail-addexp { gap: 8px; }
.rail-addexp .f { flex: 1 1 100%; }

.fit-banner {
  margin: 2px 0 0; padding: 8px 10px; border-radius: 9px; font-size: 12px; line-height: 1.4;
}
.fit-banner.ok { background: color-mix(in srgb, var(--good) 16%, var(--card)); color: color-mix(in srgb, var(--good) 72%, var(--ink)); }
.fit-banner.over { background: color-mix(in srgb, var(--bad) 14%, var(--card)); color: color-mix(in srgb, var(--bad) 78%, var(--ink)); }

@media (max-width: 960px) {
  .trip-layout { grid-template-columns: 1fr; gap: 14px; }
  .cost-rail-inner { position: static; max-height: none; }
}

/* ---- tabs ---- */
.tabs { display: flex; gap: 4px; margin: 4px 0 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tabs a {
  padding: 9px 14px; text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* ---- itinerary ---- */
.day-group + .day-group { margin-top: 18px; }
.day-head {
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--accent-2); padding-bottom: 6px; border-bottom: 1px solid var(--border); margin-bottom: 4px;
}
.item-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: start; padding: 11px 0; border-bottom: 1px solid var(--border); }
.item-row:last-child { border-bottom: none; }
.item-time { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; padding-top: 2px; }
.item-main strong { font-weight: 600; }
.row-actions { display: flex; gap: 6px; }

/* ---- stats / budget ---- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 10px; }
.stat { background: var(--bg-tint); border: 1px solid var(--border); border-radius: 12px; padding: 11px 13px; }
.stat-label { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.stat-value { display: block; font-family: var(--mono); font-size: 17px; font-weight: 500; margin-top: 3px; font-variant-numeric: tabular-nums; }
.stat-value.neg, .trend.up { color: var(--bad); }
.stat-value.pos, .trend.down { color: var(--good); }
.bar { margin-top: 12px; height: 8px; background: var(--chip); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 999px; }
.bar-fill.over { background: var(--bad); }

/* ---- table ---- */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--border-strong); }
.tbl td { padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl th.r, .tbl td.r { text-align: right; }
.tbl th.c, .tbl td.c { text-align: center; }
.mini { width: 100%; padding: 6px 7px; border-color: transparent; background: transparent; border-radius: 7px; }
.mini:hover { border-color: var(--border); }
.mini.r { text-align: right; }
td .mini { font-family: var(--mono); font-variant-numeric: tabular-nums; }
input.mini[type="number"] { min-width: 64px; }
select.mini { min-width: 92px; font-family: var(--sans); }

/* ---- notes ---- */
.note-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.note { border: 1px solid var(--border); border-radius: 12px; padding: 13px; background: var(--bg-tint); }
.note-top { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.note strong { font-family: var(--serif); font-weight: 560; }
.note p { margin: 6px 0; font-size: 14px; white-space: pre-wrap; }
.note-link { font-size: 13px; word-break: break-all; }

/* ---- price watch ---- */
.watch-list { display: grid; gap: 12px; }
.watch.hit { border-color: var(--good); box-shadow: 0 0 0 1px var(--good) inset; }
.watch-head { display: flex; justify-content: space-between; align-items: start; gap: 10px; margin-bottom: 12px; }
.watch-kind {
  display: inline-block; font-size: 12px; color: var(--accent-2); font-weight: 600;
  background: color-mix(in srgb, var(--accent-2) 14%, var(--card)); padding: 2px 8px; border-radius: 999px; margin-right: 8px;
}
.watch-label { font-size: 15px; font-family: var(--serif); font-weight: 560; }
.watch-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.figure { background: var(--bg-tint); border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; }
.figure-label { display: block; font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.figure-value { display: block; font-family: var(--mono); font-size: 15px; font-weight: 500; margin-top: 3px; font-variant-numeric: tabular-nums; }
.trend { font-size: 12px; font-weight: 600; }
.trend.flat { color: var(--muted); }
.spark-wrap { margin: 12px 0 4px; color: var(--accent); }
.spark { width: 100%; height: 56px; display: block; }
.watch-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.history { margin-top: 10px; font-size: 13px; }
.history summary { cursor: pointer; color: var(--muted); }
.history ul { list-style: none; margin: 8px 0 0; padding: 0; }
.history li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; padding: 3px 0; font-family: var(--mono); font-size: 12px; }

/* ---- settings ---- */
.modes { display: grid; gap: 8px; margin-bottom: 12px; }
.mode { display: flex; gap: 10px; padding: 13px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.mode.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.mode input { margin-top: 3px; }
.mode p { margin: 4px 0 0; }
code { background: var(--chip); padding: 1px 5px; border-radius: 4px; font-size: 0.9em; font-family: var(--mono); }

/* ===================================================================
   Explore — the globe
   =================================================================== */
.explore { position: relative; overflow: hidden; }
.explore::before {
  content: ""; position: absolute; inset: 0; z-index: 0; opacity: 0.5;
  background-image: linear-gradient(180deg, color-mix(in srgb, var(--card) 55%, transparent), var(--card) 88%), var(--explore-photo, none);
  background-size: cover; background-position: center;
}
.explore > * { position: relative; z-index: 1; }
.explore-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.explore-head h2 { font-size: clamp(1.4rem, 3.5vw, 1.9rem); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--card); color: var(--muted); font-size: 13px; cursor: pointer;
}
.chip:hover { color: var(--ink); }
.chip.on { background: var(--accent-2); border-color: transparent; color: #fff; }

.explore-stage {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; align-items: stretch;
}
.globe-hold {
  position: relative; border-radius: 16px; overflow: hidden; min-height: 330px;
  background:
    radial-gradient(120% 120% at 30% 20%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 55%),
    radial-gradient(120% 120% at 80% 90%, color-mix(in srgb, var(--accent-2) 20%, transparent), transparent 55%),
    #0c0a14;
}
canvas.globe { display: block; width: 100%; height: 100%; min-height: 330px; touch-action: none; }

.globe-ctl { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.icon-round {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font-size: 16px; line-height: 1; padding: 0; cursor: pointer;
  background: color-mix(in srgb, var(--card) 78%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--border-strong); color: var(--ink);
}
.icon-round:hover { border-color: var(--accent); color: var(--accent); }

/* drop strip */
.plan-strip {
  display: flex; align-items: stretch; gap: 8px; margin-top: 14px; padding: 14px 4px 4px;
  border-top: 1px solid var(--border); overflow-x: auto; scrollbar-width: thin;
  position: sticky; bottom: 6px; z-index: 6; background: var(--card);
}
body.dragging-place .plan-strip {
  box-shadow: 0 -12px 24px -12px rgba(0,0,0,0.25); border-radius: 12px;
  outline: 1px solid var(--border);
}
.plan-strip.empty { color: var(--muted); }
.plan-strip-label {
  align-self: center; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted); white-space: nowrap; padding-right: 2px;
}
.drop-trip {
  flex: 0 0 auto; min-width: 130px; max-width: 200px; padding: 9px 12px; border-radius: 12px;
  border: 1.5px dashed var(--border-strong); background: var(--bg-tint);
  display: flex; flex-direction: column; gap: 1px; transition: border-color .12s, background .12s, transform .12s;
}
.drop-trip strong { font-size: 13px; font-family: var(--serif); font-weight: 560; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.dragging-place .drop-trip { border-color: var(--accent-2); }
.drop-trip.over { border-style: solid; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--card)); transform: translateY(-2px); }
.drop-trip.dropped { border-color: var(--good); background: color-mix(in srgb, var(--good) 14%, var(--card)); }

.drag-chip {
  position: fixed; z-index: 1000; transform: translate(12px, -50%); pointer-events: none;
  padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--accent); color: #fff; box-shadow: 0 8px 20px -6px rgba(0,0,0,0.4);
  white-space: nowrap;
}
body.dragging-place { cursor: grabbing; user-select: none; }

/* globe hover card — photo + one-line blurb for a city */
.city-card {
  position: fixed; z-index: 1200; width: 250px; pointer-events: none;
  display: none; overflow: hidden; border-radius: 12px;
  background: var(--card); border: 1px solid var(--border);
  box-shadow: 0 16px 44px -10px rgba(0,0,0,0.4);
  animation: cityCardIn 0.12s ease-out;
}
@keyframes cityCardIn { from { opacity: 0; transform: translateY(5px); } }
.city-card-img {
  display: block; width: 100%; height: 132px; object-fit: cover;
  background: var(--chip);
}
.city-card-body { padding: 10px 12px 11px; }
.city-card-body strong { display: block; font-size: 14px; margin-bottom: 3px; }
.city-card-blurb { margin: 0; font-size: 12.5px; line-height: 1.42; }
.city-card-src {
  display: block; margin-top: 6px; font-size: 10px; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--muted);
}

.add-to { margin-bottom: 16px; }
.add-to-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.add-to-list .btn { padding: 4px 10px; font-size: 12px; }

/* --- Help me plan (home) --- */
.help-plan {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(120deg, var(--accent), var(--sun), var(--accent-2)) border-box;
}
.help-plan > h3 { font-size: 17px; }
.hp-input {
  width: 100%; margin-top: 4px; min-height: 58px; font: inherit;
  border-radius: 12px; padding: 11px 13px; border: 1px solid var(--border-strong); background: var(--bg-tint);
}
.hp-row { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.hp-row select { flex: 1 1 180px; }
.hp-travelers { width: 96px; flex: 0 0 auto; }
.hp-out:empty { display: none; }
.hp-out { margin-top: 14px; }
.hp-result { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: var(--bg-tint); }
.hp-result-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.hp-result-head strong { font-family: var(--serif); font-size: 17px; }
.hp-summary { margin: 6px 0 10px; font-size: 14px; }
.hp-budget { margin: 8px 0 10px; font-size: 13px; }
.hp-budget strong { font-family: var(--mono); }
.hp-budget .muted { display: block; margin-top: 3px; }
.hp-days { list-style: none; margin: 0 0 4px; padding: 0; display: grid; gap: 6px; }
.hp-days li { display: grid; grid-template-columns: 90px 1fr; gap: 8px; font-size: 13px; align-items: baseline; }
.hp-date { font-family: var(--mono); font-size: 11px; color: var(--muted); }

.section-h { font-size: 15px; margin: 22px 0 10px; color: var(--muted); }

/* --- trip card delete --- */
.trip-card-li { position: relative; }
.trip-del {
  position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; padding: 0; line-height: 1;
  background: var(--card); border: 1px solid var(--border); color: var(--muted);
  opacity: .55; transition: opacity .12s, color .12s, border-color .12s; cursor: pointer;
}
.trip-card-li:hover .trip-del, .trip-del:hover, .trip-del:focus-visible { opacity: 1; }
.trip-del:hover { color: var(--bad); border-color: var(--bad); }

/* --- city AI highlights (Explore panel) --- */
.hl-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 4px 0 6px; }
.hl-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.hl-list li { display: flex; gap: 8px; align-items: baseline; font-size: 14px; }
.hl-tag {
  flex: 0 0 auto; font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 2px 6px; border-radius: 999px; background: var(--chip); color: var(--muted); font-weight: 600;
}
.hl-tag[data-tag="food"] { background: color-mix(in srgb, var(--sun) 24%, var(--card)); color: color-mix(in srgb, var(--sun) 65%, var(--ink)); }
.hl-tag[data-tag="nature"] { background: color-mix(in srgb, var(--good) 20%, var(--card)); color: color-mix(in srgb, var(--good) 70%, var(--ink)); }
.hl-tag[data-tag="nightlife"] { background: color-mix(in srgb, var(--accent) 18%, var(--card)); color: color-mix(in srgb, var(--accent) 70%, var(--ink)); }

/* AI planner card */
.ai-card { border-color: color-mix(in srgb, var(--accent-2) 40%, var(--border)); }
.ai-card > h3 { color: var(--accent-2); }
.ai-out:empty { display: none; }
.ai-out { margin-top: 14px; }
.ai-preview { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: var(--bg-tint); max-height: 420px; overflow-y: auto; }
.ai-preview .day-group + .day-group { margin-top: 14px; }
.ai-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ai-error { color: var(--bad); font-size: 13px; margin: 8px 0 0; }

/* --- booking links + cloud share + travel agent --- */
.book-link { font-size: 12px; padding: 4px 10px; }

.share-box { display: flex; }
.share-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.share-status { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.share-code {
  font-family: var(--mono); font-weight: 600; letter-spacing: .08em; font-size: 13px;
  background: var(--chip); color: var(--ink); padding: 3px 9px; border-radius: 8px;
}

.agent-group { margin-top: 14px; }
.agent-group:first-child { margin-top: 0; }
.agent-group > h4 {
  font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--accent-2); margin: 0 0 4px; padding-bottom: 4px; border-bottom: 1px solid var(--border);
}
.rec-row {
  display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: start;
  padding: 9px 0; border-bottom: 1px solid var(--border);
}
.rec-row:last-child { border-bottom: none; }
.rec-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 5px; }

.explore-panel {
  border: 1px solid var(--border); border-radius: 16px; padding: 18px; background: var(--card);
  display: flex; flex-direction: column;
}
.dest-empty { margin: auto; text-align: center; color: var(--muted); }
.dest-empty-mark { font-size: 34px; color: var(--accent-2); margin-bottom: 8px; }
.dest-country { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-2); }
.dest h3 { font-size: 1.5rem; margin: 4px 0 8px; }
.dest-blurb { margin: 0 0 14px; font-size: 14px; }
.dest-facts { display: grid; gap: 10px; margin: 0 0 14px; }
.dest-facts div { display: grid; grid-template-columns: 130px 1fr; gap: 8px; align-items: baseline; }
.dest-facts dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.dest-facts dd { margin: 0; font-size: 14px; font-family: var(--mono); }
.dest-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.dest-tags .tag {
  font-size: 11px; padding: 3px 8px; border-radius: 999px; text-transform: capitalize;
  background: var(--chip); color: var(--muted);
}
.dest .btn { margin-top: auto; }

/* ---- responsive ---- */
@media (max-width: 720px) {
  .explore-stage { grid-template-columns: 1fr; }
  .globe-hold { min-height: 320px; }
}
@media (max-width: 560px) {
  .item-row { grid-template-columns: 52px 1fr; }
  .item-row .row-actions { grid-column: 2; }
  .topbar { padding: 10px 12px; gap: 8px; }
  .topnav a { padding: 6px 9px; }
  .hero-inner { padding-top: 60px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-media { animation: none; }
  * { scroll-behavior: auto; }
}
