:root {
  --bg: #04060b;
  --panel: rgba(9, 12, 20, 0.72);
  --panel-solid: #0b0f19;
  --line: rgba(255, 236, 214, 0.09);
  --line-strong: rgba(255, 236, 214, 0.18);
  --ink: #f4ede3;
  --muted: #8c909c;
  --faint: #5b6070;
  --amber: #ffb347;
  --orange: #ff7a1a;
  --ember: #b8420c;
  --hot: #fff3dc;
  --gold: #ffd45e;
  --ink-stroke: #05070c;
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --ui: "Inter", system-ui, sans-serif;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 14px;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

#map { position: fixed; inset: 0; }
.maplibregl-canvas { outline: none; }
.maplibregl-ctrl-attrib { background: rgba(4, 6, 11, 0.6) !important; }
.maplibregl-ctrl-attrib a, .maplibregl-ctrl-attrib-button { color: var(--faint) !important; filter: invert(0.6); }

.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 70% at 45% 50%, transparent 55%, rgba(2, 3, 6, 0.75) 100%),
    linear-gradient(180deg, rgba(2, 3, 6, 0.55) 0%, transparent 18%, transparent 85%, rgba(2, 3, 6, 0.6) 100%);
}

/* ---- brand ---- */
.brand {
  position: fixed;
  top: 26px;
  left: 30px;
  display: flex;
  align-items: center;
  gap: 14px;
  pointer-events: none;
}
.brand h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  font-size: 34px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 0.9;
}
.brand p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; letter-spacing: 0.02em; }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--amber);
  position: relative;
  box-shadow: 0 0 18px rgba(255, 140, 40, 0.45), inset 0 0 10px rgba(255, 140, 40, 0.3);
  overflow: hidden;
}
.brand-mark::before {
  content: "";
  position: absolute;
  inset: 0;
  background: conic-gradient(from 0deg, rgba(255, 179, 71, 0.75), transparent 28%);
  animation: sweep 3.2s linear infinite;
}
.brand-mark span {
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: var(--hot);
  box-shadow: 0 0 8px var(--amber);
}
@keyframes sweep { to { transform: rotate(360deg); } }

/* ---- composer ---- */
.composer {
  position: fixed;
  top: 92px;
  left: 30px;
  width: 400px;
  padding: 18px 18px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.composer-label {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.artist-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.artist-field:focus-within { border-color: rgba(255, 179, 71, 0.6); box-shadow: 0 0 0 3px rgba(255, 140, 40, 0.12); }
.chips { display: contents; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px 5px 10px;
  border-radius: 999px;
  background: rgba(255, 140, 40, 0.14);
  border: 1px solid rgba(255, 179, 71, 0.35);
  color: var(--hot);
  font-size: 13px;
  font-weight: 500;
}
.chip button {
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}
#artist-input {
  flex: 1;
  min-width: 140px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  padding: 6px 4px;
}
#artist-input::placeholder { color: var(--faint); }

.composer-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.dates {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.dates select {
  background: transparent;
  color: var(--ink);
  border: 0;
  font: inherit;
  font-size: 14px;
  outline: 0;
  cursor: pointer;
}
.dates option { background: var(--panel-solid); }
.region-pill {
  white-space: nowrap;
  height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
}
.scan-btn {
  min-width: 132px;
  justify-content: center;
  margin-left: auto;
  white-space: nowrap;
  height: 38px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffe08a, #e9b440);
  color: #1a0d02;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(233, 180, 64, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}
.scan-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(233, 180, 64, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.scan-btn:disabled { opacity: 0.6; cursor: progress; transform: none; }
.scan-btn-dot { width: 7px; height: 7px; border-radius: 50%; background: #2a1302; }
.scan-btn.is-busy .scan-btn-dot { animation: blink 0.8s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.2; } }

.examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--faint);
}
.examples button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.examples button:disabled { opacity: 0.45; cursor: default; }
.examples button:hover { color: var(--hot); border-color: rgba(255, 179, 71, 0.45); background: rgba(255, 140, 40, 0.08); }

/* ---- side panel ---- */
.panel {
  position: fixed;
  top: 26px;
  right: 26px;
  bottom: 26px;
  width: 410px;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
/* ---- panel: tabs ---- */
.panel-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 14px 0;
  border-bottom: 1px solid var(--line);
}
.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 10px 10px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.tab:hover:not(:disabled) { color: var(--ink); }
.tab.is-active { color: var(--hot); border-bottom-color: var(--amber); }
.tab:disabled { color: var(--faint); opacity: 0.5; cursor: default; }
.run-badge {
  margin-left: auto;
  margin-bottom: 8px;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--amber);
  border: 1px solid rgba(255, 179, 71, 0.35);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}
.run-badge::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6be38a;
  margin-right: 6px;
  vertical-align: 1px;
  box-shadow: 0 0 8px #6be38a;
}
.run-badge.is-replay::before { background: var(--amber); box-shadow: 0 0 8px var(--amber); }

.tab-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tab-body[hidden] { display: none; }

/* ---- trace ---- */
.trace { list-style: none; margin: 0; padding: 10px 14px 16px; overflow-x: hidden; overflow-y: auto; flex: 1; }
.ti-body { min-width: 0; }
.trace-empty { color: var(--muted); line-height: 1.6; padding: 8px 4px; font-size: 13.5px; }
.trace-empty strong { display: block; color: var(--ink); font-family: var(--display); font-size: 17px; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 6px; }
.trace-item {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.trace-item.is-in { opacity: 1; transform: none; }
.trace-item.is-thought { grid-template-columns: 22px 1fr; border-bottom: 0; padding-bottom: 2px; }
.thought { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; font-style: italic; }
.ti-icon {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1px solid var(--line-strong);
  position: relative;
  margin-top: 1px;
}
.ti-icon::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--faint); }
.ti-agent { border-radius: 50%; border-color: rgba(255, 179, 71, 0.35); }
.ti-agent::after { inset: 8px; background: var(--amber); }
.is-running .ti-icon { border-color: rgba(255, 179, 71, 0.7); box-shadow: 0 0 12px rgba(255, 140, 40, 0.35); }
.is-running .ti-icon::after { background: var(--amber); animation: blink 0.9s ease-in-out infinite; }
.is-done .ti-icon::after { background: var(--hot); }
.is-failed .ti-icon { border-color: rgba(255, 92, 60, 0.6); }
.is-failed .ti-icon::after { background: #ff5c3c; }
.ti-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ti-label { font-weight: 600; font-size: 13.5px; }
.ti-head code { font-size: 10.5px; color: var(--faint); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
.ti-ms { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; padding-top: 2px; }
.args { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.arg {
  font-size: 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.arg b { color: var(--faint); font-weight: 500; margin-right: 3px; }
.ti-progress { list-style: none; margin: 6px 0 0; padding: 0; }
.ti-progress li { font-size: 12px; color: var(--muted); padding: 2px 0 2px 12px; position: relative; }
.ti-progress li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 4px; height: 4px; border-radius: 50%; background: var(--amber); }
.ti-summary { font-size: 12.5px; color: var(--ink); margin-top: 6px; line-height: 1.45; }
.ti-summary:empty { display: none; }
.ti-summary em { color: var(--faint); }
.mini-bars { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.mini-bars li { display: grid; grid-template-columns: 96px 1fr 26px; gap: 8px; align-items: center; font-size: 11.5px; color: var(--muted); }
.mini-bars i { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--ember), var(--amber), var(--hot)); }
.mini-bars b { color: var(--hot); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.pchips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 6px; }
.pchips span { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); width: 52px; }
.pchips em {
  font-style: normal;
  font-size: 11.5px;
  color: var(--ink);
  background: rgba(255, 140, 40, 0.08);
  border: 1px solid rgba(255, 179, 71, 0.2);
  padding: 2px 7px;
  border-radius: 999px;
}
.trace-stats {
  display: flex;
  justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
}
.trace-stats[hidden] { display: none; }
.trace-stats b { color: var(--hot); font-weight: 600; margin-right: 3px; }

/* ---- tour ---- */
.tour-scroll { overflow-y: auto; flex: 1; min-height: 0; }
.tour-head { padding: 16px 20px 6px; }
.tour-head h2 { margin: 0; font-family: var(--display); font-weight: 900; font-size: 30px; text-transform: uppercase; letter-spacing: 0.03em; }
.tour-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.proxy-note {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 179, 71, 0.35);
  background: rgba(255, 140, 40, 0.08);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.5;
}
.proxy-note b { color: var(--amber); }
.audience { margin: 10px 20px 4px; padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.02); }
.audience-head { display: flex; justify-content: space-between; align-items: center; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.src { font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.src-qloo { color: #ffd59a; background: rgba(255, 179, 71, 0.12); border: 1px solid rgba(255, 179, 71, 0.3); }
.src-agent { color: #bfe3ff; background: rgba(120, 190, 255, 0.1); border: 1px solid rgba(120, 190, 255, 0.28); }

.tour-list { list-style: none; margin: 0; padding: 4px 12px; overflow-x: hidden; }
.tour-stop {
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateX(14px);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tour-stop.is-visible { opacity: 1; transform: none; }
.tour-stop-btn {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  width: 100%;
  padding: 12px 8px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
}
.tour-stop-btn:hover { background: rgba(255, 140, 40, 0.06); }
.tour-stop-num { font-family: var(--display); font-weight: 900; font-size: 24px; color: var(--amber); line-height: 1; }
.tour-stop-main { display: flex; flex-direction: column; min-width: 0; }
.tour-stop-city { font-family: var(--display); font-weight: 800; font-size: 19px; text-transform: uppercase; letter-spacing: 0.03em; line-height: 1.05; }
.tour-stop-meta { color: var(--muted); font-size: 12px; margin-top: 3px; }
.tour-stop-why { color: var(--ink); opacity: 0.85; font-size: 12.5px; margin-top: 6px; line-height: 1.45; }
.is-pending .tour-stop-why { color: var(--faint); font-style: italic; }
.tour-stop-score { text-align: right; font-variant-numeric: tabular-nums; }
.tour-stop-score strong { display: block; font-size: 20px; font-weight: 600; color: var(--hot); line-height: 1; }
.tour-stop-score span { font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; }
.footnote { margin: 14px 20px 18px; font-size: 11px; line-height: 1.5; color: var(--faint); }
.tour-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}
.tour-actions #tour-total { margin-right: auto; color: var(--ink); }
.ghost-btn {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  padding: 7px 11px;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.ghost-btn:hover { border-color: rgba(255, 179, 71, 0.5); background: rgba(255, 140, 40, 0.08); }

/* ---- city card ---- */
.cc-scroll { overflow-y: auto; flex: 1; min-height: 0; padding: 14px 20px 20px; }
.back-btn { border: 0; background: none; color: var(--amber); font: inherit; font-size: 12.5px; cursor: pointer; padding: 0; }
.back-btn:hover { color: var(--hot); }
.cc-head { margin: 10px 0 14px; }
.cc-order { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.cc-head h2 { margin: 2px 0 12px; font-family: var(--display); font-weight: 900; font-size: 34px; text-transform: uppercase; letter-spacing: 0.02em; line-height: 0.95; }
.cc-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cc-metrics div { border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; background: rgba(255, 255, 255, 0.02); }
.cc-metrics strong { display: block; font-size: 22px; font-weight: 600; color: var(--hot); font-variant-numeric: tabular-nums; }
.cc-metrics span { font-size: 10.5px; color: var(--muted); }
.cc-block { margin-top: 16px; }
.cc-label { display: flex; justify-content: space-between; align-items: center; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 8px; }
.cc-why { margin: 0; font-size: 14px; line-height: 1.55; }
.cc-collab { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.cc-collab b { color: var(--ink); font-weight: 600; margin-right: 4px; }
.cc-note { margin: 8px 0 0; font-size: 11px; color: var(--faint); line-height: 1.45; }
.hotspots { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hotspots button {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 140, 40, 0.06);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.hotspots button:hover { background: rgba(255, 140, 40, 0.12); }
.hotspots button.is-active { border-color: rgba(255, 179, 71, 0.6); background: rgba(255, 140, 40, 0.16); }
.hs-rank { font-family: var(--display); font-weight: 900; color: var(--amber); }
.hs-name { font-weight: 500; }
.hs-val { color: var(--hot); font-variant-numeric: tabular-nums; font-weight: 600; }
.venues, .spots { list-style: none; margin: 0; padding: 0; }
.venues li { display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 8px; border-bottom: 1px solid var(--line); transition: background 0.4s; border-radius: 6px; }
.venues li.is-flash { background: rgba(255, 140, 40, 0.14); }
.venues button[data-venue] { border: 0; background: none; color: inherit; font: inherit; text-align: left; padding: 9px 2px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.v-name { font-weight: 600; font-size: 13.5px; }
.v-name em { font-style: normal; font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: #1a0d02; background: var(--amber); border-radius: 4px; padding: 1px 5px; margin-left: 6px; vertical-align: 2px; }
.v-meta { font-size: 11.5px; color: var(--muted); }
.v-addr { font-size: 11px; color: var(--faint); }
.v-aff { padding-top: 10px; font-size: 13px; color: var(--hot); font-variant-numeric: tabular-nums; }
.v-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: -2px 0 10px 2px; font-size: 11.5px; }
.v-actions a { color: #9fd0ff; text-decoration: none; }
.v-actions a:hover { text-decoration: underline; }
.draft-btn { margin-left: auto; padding: 4px 9px; font-size: 11.5px; }
.draft { grid-column: 1 / -1; margin: 0 0 12px; display: grid; gap: 6px; }
.draft[hidden] { display: none; }
.draft-head { display: flex; justify-content: space-between; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.draft-subject, .draft-body {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  line-height: 1.5;
  padding: 8px 10px;
  resize: vertical;
}
.draft-subject:focus, .draft-body:focus { outline: none; border-color: rgba(255, 179, 71, 0.6); }
.draft-copy { justify-self: start; }
.spots li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 2px; border-bottom: 1px solid var(--line); font-size: 13px; }
.spots small { color: var(--faint); font-size: 11px; text-align: right; }

/* ---- map labels ---- */
.stop-label {
  border: 0;
  background: none;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9), 0 0 2px rgba(0, 0, 0, 0.9);
}
.stop-label.is-hidden { visibility: hidden; }
/* MapLibre owns the marker's transform, so the reveal animates the children. */
.stop-label > * {
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform: translateX(-6px);
}
.stop-label.is-left { flex-direction: row-reverse; text-align: right; }
.stop-label.is-left > * { transform: translateX(6px); }
.stop-label.is-visible > * { opacity: 1; transform: none; }
.stop-label:hover .stop-name { color: #fff; }
.stop-num {
  font-family: var(--display);
  font-weight: 900;
  font-size: 13px;
  color: #1a0d02;
  background: var(--gold);
  border-radius: 5px;
  padding: 2px 5px 1px;
  box-shadow: 0 0 0 1.5px var(--ink-stroke);
  text-shadow: none;
}
.stop-text { display: flex; flex-direction: column; line-height: 1; }
.stop-name { font-family: var(--display); font-weight: 800; font-size: 18px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gold); -webkit-text-stroke: 3px var(--ink-stroke); paint-order: stroke fill; }
.stop-meta { font-size: 10.5px; color: #f2efe8; margin-top: 3px; letter-spacing: 0.04em; -webkit-text-stroke: 2.5px var(--ink-stroke); paint-order: stroke fill; }

.hotspot-label, .venue-pin, .spot-pin { opacity: 0; transition: opacity 0.6s ease 0.9s; }
.hotspot-label.is-visible, .venue-pin.is-visible, .spot-pin.is-visible { opacity: 1; }
.hotspot-label {
  display: flex;
  gap: 6px;
  align-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  -webkit-text-stroke: 3px var(--ink-stroke);
  paint-order: stroke fill;
  white-space: nowrap;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}
.hotspot-label:hover { color: #fff; }
.hotspot-label.is-collapsed { visibility: hidden; }
/* Neighbourhood names are the point of the city view: keep them above venue pins and their tooltips. */
.maplibregl-marker.hotspot-label { z-index: 3; }
.maplibregl-marker.venue-pin, .maplibregl-marker.spot-pin { z-index: 2; }

/* ---- scrollbars ---- */
.trace, .tour-scroll, .cc-scroll, .draft-body {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 179, 71, 0.32) transparent;
}
.trace::-webkit-scrollbar, .tour-scroll::-webkit-scrollbar, .cc-scroll::-webkit-scrollbar, .draft-body::-webkit-scrollbar { width: 8px; }
.trace::-webkit-scrollbar-track, .tour-scroll::-webkit-scrollbar-track, .cc-scroll::-webkit-scrollbar-track, .draft-body::-webkit-scrollbar-track { background: transparent; }
.trace::-webkit-scrollbar-thumb, .tour-scroll::-webkit-scrollbar-thumb, .cc-scroll::-webkit-scrollbar-thumb, .draft-body::-webkit-scrollbar-thumb {
  background: rgba(255, 179, 71, 0.28);
  border: 2px solid transparent;
  border-radius: 8px;
  background-clip: padding-box;
}
.trace::-webkit-scrollbar-thumb:hover, .tour-scroll::-webkit-scrollbar-thumb:hover, .cc-scroll::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 179, 71, 0.5); }
.hotspot-rank { color: var(--ink-stroke); background: var(--gold); -webkit-text-stroke: 0; border-radius: 4px; padding: 1px 4px; font-size: 12px; text-shadow: none; }
.venue-pin {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  color: var(--ink);
}
.venue-pin i {
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  background: #0b0f19;
  border: 2px solid #9fd0ff;
  box-shadow: 0 0 10px rgba(140, 200, 255, 0.5);
}
.venue-pin span {
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(8, 11, 18, 0.82);
  border: 1px solid rgba(140, 200, 255, 0.25);
  padding: 2px 6px;
  border-radius: 5px;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.venue-pin:not(.is-picked):not(.is-active):not(:hover) span { display: none; }
.venue-pin.is-picked i { border-color: var(--amber); box-shadow: 0 0 12px rgba(255, 179, 71, 0.8); }
.venue-pin.is-picked span { border-color: rgba(255, 179, 71, 0.5); }
.venue-pin.is-active i { background: #9fd0ff; }
.spot-pin { width: 7px; height: 7px; border-radius: 50%; background: #cfe8ff; box-shadow: 0 0 8px rgba(140, 200, 255, 0.7); }

/* ---- autocomplete ---- */
.composer { z-index: 3; }
.suggest {
  list-style: none;
  margin: 6px 0 0;
  padding: 4px;
  background: var(--panel-solid);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 5;
}
.suggest li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 13.5px; }
.suggest li small { color: var(--faint); font-size: 11.5px; }
.suggest li:hover, .suggest li.is-active { background: rgba(255, 140, 40, 0.12); }

/* ---- legend, badge, toast ---- */
.legend {
  position: fixed;
  left: 30px;
  bottom: 44px;
  width: 210px;
  font-size: 10.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.legend-ramp {
  margin-top: 8px;
  height: 6px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(60,30,14,0.5), #784020, #aa5c2c, #cd8042, #ebaa68);
  box-shadow: 0 0 14px rgba(255, 122, 26, 0.25);
}
.legend-scale { display: flex; justify-content: space-between; margin-top: 6px; color: var(--faint); letter-spacing: 0.06em; }

.mode-badge {
  position: fixed;
  left: 50%;
  top: 22px;
  transform: translateX(-50%);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px dashed rgba(255, 179, 71, 0.6);
  color: var(--amber);
  background: rgba(20, 10, 2, 0.6);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--panel-solid);
  border: 1px solid rgba(255, 122, 26, 0.45);
  color: var(--ink);
  font-size: 13px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

/* ---- small screens ---- */
/* Laptop widths: slimmer side panels leave the route more room. */
@media (min-width: 861px) and (max-width: 1400px) {
  .composer { width: 360px; }
  .panel { width: 360px; }
}

@media (max-width: 860px) {
  .brand { top: 16px; left: 16px; }
  .brand h1 { font-size: 26px; }
  .brand p { display: none; }
  .composer { top: 66px; left: 16px; right: 16px; width: auto; padding: 14px; }
  .composer-label { font-size: 18px; }
  .tour-scroll { display: flex; flex-direction: column; }
  .tour-scroll .audience { order: 3; }
  .tour-scroll .footnote { order: 4; }
  .examples button, .tab, .ghost-btn { min-height: 40px; }
  #artist-input { min-height: 36px; }
  .tour-actions { padding: 8px 12px; }
  /* Once a tour is running, the form shrinks so the map gets the room. */
  .has-run .composer-label, .has-run .examples { display: none; }
  .has-run .composer { padding: 10px; }
  .has-run .composer-row { margin-top: 8px; }
  .region-pill { display: none; }
  .panel { top: auto; left: 16px; right: 16px; bottom: 16px; width: auto; height: 42vh; }
  .run-badge { display: none; }
  .tab { font-size: 16px; }
  .hotspot-label { font-size: 13px; }
  .legend { display: none; }
  .mode-badge { top: auto; bottom: calc(42vh + 26px); }
  .stop-meta { display: none; }
  .stop-name { font-size: 14px; }
}
