/* r we lost — design tokens + base styles */

:root {
  --bg: #FAF4EC;
  --bg-2: #F3EADB;
  --ink: #171211;
  --ink-soft: #5C4B46;
  --ink-line: #1A1310;

  --coral: #F2686C;
  --peach: #F7A59E;
  --teal: #8AD0C0;
  --mint: #B1DDC6;
  --pink: #FF6FA0;
  --butter: #F5D871;

  --accent: var(--pink);

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-pill: 999px;

  --shadow-card: 4px 4px 0 var(--ink-line);
  --shadow-sticker: 2px 2px 0 var(--ink-line);

  --font-display: "Panchang", "Cabinet Grotesk", serif;
  --font-body: "Cabinet Grotesk", "Helvetica Neue", sans-serif;
  --font-mono: "Xanh Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }

/* ---------- App shell ---------- */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Top nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  border-bottom: 1.5px solid var(--ink-line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 30;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}
.nav-logo .qmark {
  color: var(--accent);
  display: inline-block;
  transform: rotate(8deg) translateY(2px);
  font-size: 28px;
}
.nav-steps {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nav-step {
  padding: 6px 10px;
  border: 1.5px solid var(--ink-line);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ink-soft);
}
.nav-step.active {
  background: var(--ink-line);
  color: var(--bg);
}
.nav-step.done {
  background: var(--mint);
  color: var(--ink-line);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.nav-right .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* ---------- Ticker tape ---------- */
.ticker {
  background: var(--ink-line);
  color: var(--bg);
  border-top: 1.5px solid var(--ink-line);
  border-bottom: 1.5px solid var(--ink-line);
  overflow: hidden;
  position: relative;
  padding: 12px 0;
}
.ticker-track {
  display: flex;
  gap: 36px;
  white-space: nowrap;
  animation: ticker 32s linear infinite;
  width: max-content;
}
.ticker-item {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 36px;
}
.ticker-item .star {
  color: var(--accent);
  font-size: 18px;
}
@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: 1.5px solid var(--ink-line);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: var(--shadow-card);
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink-line);
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0px 0px 0 var(--ink-line);
}
.btn.primary {
  background: var(--accent);
  color: var(--ink-line);
}
.btn.dark {
  background: var(--ink-line);
  color: var(--bg);
}
.btn.ghost {
  box-shadow: none;
  background: transparent;
}
.btn.ghost:hover {
  background: var(--bg-2);
  transform: none;
  box-shadow: none;
}
.btn.sm {
  padding: 8px 14px;
  font-size: 14px;
}

.icon-btn {
  width: 38px; height: 38px;
  border: 1.5px solid var(--ink-line);
  border-radius: 50%;
  background: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.icon-btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink-line); }

/* ---------- Mono label ---------- */
.mono {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- Sticker / chip ---------- */
.sticker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1.5px solid var(--ink-line);
  border-radius: var(--r-pill);
  background: var(--bg);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: -0.005em;
  box-shadow: var(--shadow-sticker);
  white-space: nowrap;
}
.sticker.coral { background: var(--coral); }
.sticker.peach { background: var(--peach); }
.sticker.teal { background: var(--teal); }
.sticker.mint { background: var(--mint); }
.sticker.pink { background: var(--pink); color: var(--ink-line); }
.sticker.butter { background: var(--butter); }
.sticker.dark { background: var(--ink-line); color: var(--bg); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: var(--bg-2);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid rgba(23, 18, 17, 0.15);
}

/* ---------- Wavy underline ---------- */
.squiggle {
  display: block;
  width: 100%;
  height: 12px;
  color: var(--accent);
}

/* ---------- Container ---------- */
.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  width: 100%;
}

/* ---------- Landing ---------- */
.landing {
  position: relative;
  padding: 60px 0 80px;
  overflow: hidden;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(72px, 14vw, 220px);
  line-height: 0.86;
  letter-spacing: -0.045em;
  margin: 0;
  color: var(--ink-line);
}
.hero-title .stretchy {
  display: inline-block;
  transform: scaleX(1.04);
  transform-origin: left;
}
.hero-title .lost {
  position: relative;
  display: inline-block;
  color: var(--accent);
  transform: rotate(-3deg);
}
.hero-title .qm {
  display: inline-block;
  transform: translateY(-0.1em) rotate(14deg);
  color: var(--ink-line);
}
.hero-sub {
  font-family: var(--font-body);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.35;
  max-width: 560px;
  color: var(--ink);
  margin: 28px 0 0;
}
.hero-sub b { font-weight: 700; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: start;
  margin-top: 40px;
  position: relative;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 36px;
}

.hero-preview {
  position: relative;
  min-height: 540px;
}
.float-card {
  position: absolute;
  background: var(--bg);
  border: 1.5px solid var(--ink-line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
  font-family: var(--font-body);
}

.metric-card {
  border: 1.5px solid var(--ink-line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  background: var(--bg);
  display: flex;
  align-items: center;
  gap: 12px;
}
.metric-card .num {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}

.features {
  margin-top: 96px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature {
  border: 1.5px solid var(--ink-line);
  border-radius: var(--r-md);
  padding: 24px;
  background: var(--bg);
  position: relative;
}
.feature .num {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink-line);
  margin-bottom: 8px;
}
.feature h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.02em;
  margin: 6px 0 8px;
}
.feature p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.5;
}
.feature.f1 { background: var(--mint); }
.feature.f2 { background: var(--peach); }
.feature.f3 { background: var(--bg); }

/* ---------- Input screen ---------- */
.input-screen {
  padding: 48px 0 100px;
}
.input-h {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
  gap: 24px;
  flex-wrap: wrap;
}
.input-h h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 80px);
  letter-spacing: -0.035em;
  line-height: 0.92;
  margin: 0;
}
.input-h h1 .accent { color: var(--accent); }

.q-block {
  border: 1.5px solid var(--ink-line);
  border-radius: var(--r-lg);
  background: var(--bg);
  padding: 28px 28px 24px;
  margin-bottom: 18px;
  position: relative;
}
.q-block .q-num {
  position: absolute;
  top: -14px;
  left: 22px;
  background: var(--ink-line);
  color: var(--bg);
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-radius: var(--r-pill);
}
.q-block h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 32px;
  letter-spacing: -0.025em;
  margin: 0 0 6px;
}
.q-block .q-hint {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 0 0 18px;
}

.field-input {
  width: 100%;
  border: 1.5px solid var(--ink-line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  font-size: 16px;
  background: var(--bg);
  color: var(--ink);
  outline: none;
  font-family: var(--font-body);
}
.field-input:focus {
  background: var(--bg-2);
  box-shadow: 3px 3px 0 var(--ink-line);
  transform: translate(-1px, -1px);
}
.field-input::placeholder { color: var(--ink-soft); opacity: 0.6; }

.dates-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}
.field-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.places-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.place-chip {
  position: relative;
  border: 1.5px solid var(--ink-line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: pop 0.3s cubic-bezier(.5, 1.6, .5, 1);
}
@keyframes pop {
  0% { transform: scale(0.6) rotate(-4deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.place-chip .name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.place-chip .neigh {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.place-chip .tags { display: flex; gap: 4px; flex-wrap: wrap; }
.place-chip .x {
  position: absolute;
  top: 8px; right: 8px;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-line);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
}
.place-chip .x:hover { background: var(--coral); }

.events-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.event-row {
  display: grid;
  grid-template-columns: 110px 1fr 90px auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1.5px solid var(--ink-line);
  border-radius: var(--r-md);
  background: var(--bg-2);
}
.event-row .field-input {
  padding: 8px 10px;
  font-size: 14px;
  background: var(--bg);
}

.input-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  gap: 18px;
  flex-wrap: wrap;
}

/* ---------- Itinerary ---------- */
.itin-screen {
  padding: 36px 0 100px;
}
.itin-h {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.itin-title-block h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 7vw, 96px);
  letter-spacing: -0.035em;
  line-height: 0.92;
  margin: 0;
}
.itin-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.day-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 20px;
  border-bottom: 1.5px solid var(--ink-line);
}
.day-tab {
  flex: 0 0 auto;
  padding: 10px 16px;
  border: 1.5px solid var(--ink-line);
  border-radius: var(--r-md) var(--r-md) 0 0;
  background: var(--bg);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  text-align: left;
  margin-bottom: -1.5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 100px;
}
.day-tab .d-num { font-family: var(--font-mono); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; color: var(--ink-soft); }
.day-tab.active {
  background: var(--accent);
  color: var(--ink-line);
}
.day-tab.active .d-num { color: var(--ink-line); }

.itin-grid {
  display: grid;
  /* minmax(0, 1fr): the day card must shrink to its column even though the timeline strip
     inside it has a fixed minimum width (it scrolls instead). Without this the card grows to
     fit the strip and pushes the sidebar off the right edge of the screen. */
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.day-card {
  border: 1.5px solid var(--ink-line);
  border-radius: var(--r-lg);
  background: var(--bg);
  padding: 28px;
  position: relative;
  min-width: 0;
}
.sidebar { min-width: 0; }
.day-card-h {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.day-card-h > div:first-child { min-width: 0; }
.day-card-h h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0 0 6px;
  overflow-wrap: anywhere;
}
/* timeline strip: scrolls sideways on narrow screens — fade hints that there's more */
.tl-wrap { position: relative; }
.tl-wrap::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 6px; width: 48px; pointer-events: none;
  background: linear-gradient(to right, rgba(250,244,236,0), var(--bg) 85%);
  opacity: 0; transition: opacity 0.2s;
}
.tl-wrap.can-scroll::after { opacity: 1; }
.day-card-h .subtitle {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-soft);
}

.stops {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
.stop {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px dashed rgba(23, 18, 17, 0.2);
  position: relative;
}
.stop:first-child { border-top: 0; padding-top: 4px; }
.stop-time {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}
.stop-time .time { color: var(--ink); font-weight: 700; }
.stop-pin {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  border: 1.5px solid var(--ink-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-line);
}
.stop.fixed .stop-pin { background: var(--ink-line); color: var(--bg); }
.stop.meal .stop-pin { background: var(--butter); }
.stop.coffee .stop-pin { background: var(--peach); }
.stop.bar .stop-pin { background: var(--pink); }
.stop.museum .stop-pin { background: var(--mint); }
.stop.view .stop-pin { background: var(--teal); }
.stop.stay { opacity: 0.7; border-style: dashed; }

.stop-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stop-body .where {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}
.stop-body .where .pin-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  background: var(--accent);
  border: 1.5px solid var(--ink-line);
  border-radius: 50%;
  font-size: 11px;
  font-family: var(--font-mono);
  margin-right: 8px;
  vertical-align: middle;
}
.stop-body .note {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.45;
}
.stop-body .note em {
  font-style: normal;
  background: var(--butter);
  padding: 0 4px;
  margin: 0 -2px;
}
.stop-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.transit {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 16px;
  padding: 6px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.transit .walk-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 8px;
}
.transit .walk-bar .line {
  flex: 0 0 auto;
  width: 14px;
  border-bottom: 1.5px dotted var(--ink-soft);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 100px;
}
.side-card {
  border: 1.5px solid var(--ink-line);
  border-radius: var(--r-md);
  padding: 18px;
  background: var(--bg);
}
.side-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
}
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(23, 18, 17, 0.2);
  font-size: 14px;
}
.stat-row:last-child { border-bottom: 0; }
.stat-row .v { font-family: var(--font-display); font-weight: 600; font-size: 18px; }

.vibe-card {
  background: var(--accent);
  border: 1.5px solid var(--ink-line);
  border-radius: var(--r-md);
  padding: 18px;
  color: var(--ink-line);
}
.vibe-card .label {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.vibe-card .vibe {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* ---------- Map screen ---------- */
.map-screen {
  height: calc(100vh - 70px);
  display: grid;
  grid-template-columns: 340px 1fr;
  grid-template-rows: 1fr;
  overflow: hidden;
}
.map-side {
  border-right: 1.5px solid var(--ink-line);
  background: var(--bg);
  overflow-y: auto;
  padding: 24px;
}
.map-side h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  letter-spacing: -0.025em;
  margin: 0 0 6px;
  line-height: 1;
}
.map-day-pick {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 14px 0 18px;
}
.map-day-pick button {
  border: 1.5px solid var(--ink-line);
  border-radius: var(--r-pill);
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--bg);
  cursor: pointer;
}
.map-day-pick button.on { background: var(--ink-line); color: var(--bg); }

.map-stop-list { display: flex; flex-direction: column; gap: 4px; }
.map-stop {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 8px;
  border-radius: var(--r-md);
  cursor: pointer;
  border: 1.5px solid transparent;
}
.map-stop:hover { background: var(--bg-2); }
.map-stop.active {
  background: var(--bg-2);
  border-color: var(--ink-line);
}
.map-stop .pin {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  border: 1.5px solid var(--ink-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
}
.map-stop .info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.map-stop .name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-stop .neigh {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.map-stop .when {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}

.map-canvas {
  position: relative;
  background: var(--bg-2);
  overflow: hidden;
  min-height: 0;
}
.map-pin {
  position: absolute;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--ink-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink-line);
  transform: translate(-50%, -100%);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 2px 2px 0 var(--ink-line);
}
.map-pin::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--ink-line);
}
.map-pin:hover {
  transform: translate(-50%, -100%) scale(1.12);
}
.map-pin.active {
  background: var(--pink);
  z-index: 5;
  transform: translate(-50%, -100%) scale(1.18);
}
.map-pin.fixed { background: var(--ink-line); color: var(--bg); }
.map-pin.fixed::after { border-top-color: var(--ink-line); }

.map-popup {
  position: absolute;
  background: var(--bg);
  border: 1.5px solid var(--ink-line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-card);
  font-family: var(--font-body);
  min-width: 200px;
  transform: translate(-50%, calc(-100% - 50px));
  z-index: 10;
  pointer-events: none;
}
.map-popup .name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin-bottom: 4px;
}
.map-popup .neigh {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.map-legend {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: var(--bg);
  border: 1.5px solid var(--ink-line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-card);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.map-legend .row { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.map-legend .swatch {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--ink-line);
}

.map-compass {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--ink-line);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
}

/* ---------- Loading state ---------- */
.brewing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  gap: 18px;
}
.brewing .blob {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 72px;
  line-height: 1;
  letter-spacing: -0.035em;
}
.brewing .blob .a { color: var(--accent); display: inline-block; animation: hop 0.8s ease-in-out infinite alternate; }
@keyframes hop {
  from { transform: translateY(0); }
  to { transform: translateY(-12px); }
}
.brewing .step {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- Google Maps pins ---------- */
.rwl-pin-wrap {
  background: transparent !important;
  border: none !important;
  overflow: visible !important;
}
.rwl-pin {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid #1A1310;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Panchang", serif;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 2px 2px 0 #1A1310;
  cursor: pointer;
  transition: transform 0.15s ease;
  position: relative;
}
.rwl-pin-tail {
  position: absolute;
  bottom: -8px; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid #1A1310;
  pointer-events: none;
}

/* ---------- City input ---------- */
.city-ac-wrap {
  width: 100%;
  position: relative;
}
.city-text-input {
  width: 100%;
  padding: 16px 20px;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  background: var(--bg);
  border: 2px solid var(--ink-line);
  border-radius: var(--r-lg);
  outline: none;
  box-sizing: border-box;
}
.city-text-input:focus {
  border-color: var(--accent);
  box-shadow: 3px 3px 0 var(--ink-line);
}
.city-text-input::placeholder {
  color: var(--ink-soft);
  font-weight: 400;
}
.city-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg);
  border: 1.5px solid var(--ink-line);
  border-radius: var(--r-md);
  box-shadow: 4px 4px 0 var(--ink-line);
  z-index: 100;
  overflow: hidden;
}
.city-dropdown-item {
  padding: 12px 18px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  border-top: 1px solid var(--bg-2);
}
.city-dropdown-item:first-child { border-top: none; }
.city-dropdown-item:hover { background: var(--bg-2); }

/* ---------- Google Places Autocomplete dropdown ---------- */
.pac-container {
  background: var(--bg);
  border: 1.5px solid var(--ink-line);
  border-radius: var(--r-md);
  box-shadow: 4px 4px 0 var(--ink-line);
  font-family: var(--font-body);
  margin-top: 4px;
}
.pac-item {
  padding: 10px 14px;
  font-size: 14px;
  color: var(--ink);
  border-top: 1px solid var(--bg-2);
  cursor: pointer;
}
.pac-item:first-child { border-top: none; }
.pac-item:hover, .pac-item-selected { background: var(--bg-2) !important; }
.pac-item-query { font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.pac-icon { display: none; }
.pac-logo::after { display: none; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .nav { padding: 14px 18px; }
  .nav-steps { display: none; }
  .page { padding: 0 18px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-preview { display: none; }
  .features { grid-template-columns: 1fr; margin-top: 56px; }
  .itin-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .map-screen { grid-template-columns: 1fr; height: auto; }
  .map-side { border-right: 0; border-bottom: 1.5px solid var(--ink-line); max-height: 40vh; }
  .map-canvas { height: 60vh; }
  /* compact legend on phones so it doesn't eat the map */
  .map-legend { bottom: 28px; right: 12px; left: 12px; padding: 8px 10px; display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: center; font-size: 11px; }
  .map-legend > div:first-child { display: none; }
  .map-legend .row { padding: 1px 0; }
  .map-compass { width: 44px; height: 44px; top: 12px; right: 12px; }
  .dates-row { grid-template-columns: 1fr; }
  .event-row { grid-template-columns: 1fr; }
  .day-card { padding: 20px 16px; }
  .day-card-h h2 { font-size: 30px; }
  .stop, .transit { grid-template-columns: 64px 1fr; gap: 10px; }
  .stop-body .where { font-size: 19px; }
  .itin-h { align-items: flex-start; }
}

/* ---------- Stop row controls: ↑/↓ for touch & keyboard, × skip ---------- */
.stop-move { display: none; gap: 2px; margin-top: 2px; }
.stop-move button {
  width: 24px; height: 22px; padding: 0;
  border: 1.5px solid var(--ink-line); border-radius: 6px;
  background: var(--bg); color: var(--ink); font-size: 12px; line-height: 1; cursor: pointer;
}
.stop-move button:hover { background: var(--accent); }
.stop:hover .stop-move, .stop:focus-within .stop-move { display: inline-flex; }
.stop-skip {
  margin-left: 10px; padding: 2px 8px; vertical-align: middle;
  border: 1px solid rgba(23, 18, 17, 0.25); border-radius: var(--r-pill);
  background: transparent; color: var(--ink-soft);
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  opacity: 0; transition: opacity 0.15s ease; cursor: pointer;
}
.stop:hover .stop-skip, .stop:focus-within .stop-skip { opacity: 1; }
.stop-skip:hover { background: var(--coral); color: #fff; border-color: var(--coral); }
/* no hover on touch screens — controls always visible, drag handle hidden */
@media (hover: none) {
  .stop-move { display: inline-flex; }
  .stop-skip { opacity: 1; }
  .stop-grip { display: none; }
}
.rwl-pin-stay { font-size: 18px; }

/* day-at-a-glance timeline blocks: little lift on hover */
.tl-block:hover {
  transform: translateY(-2px);
  box-shadow: 2.5px 2.5px 0 var(--ink-line);
  z-index: 6 !important;
}
