:root {
  --bg: #070b0d;
  --bg-soft: #0c1215;
  --surface: rgba(17, 24, 28, 0.82);
  --surface-strong: rgba(22, 31, 36, 0.94);
  --surface-quiet: rgba(255, 255, 255, 0.045);
  --text: #f2f5f0;
  --muted: #8f9b9a;
  --muted-strong: #bcc7c2;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: #c7ff5a;
  --accent-strong: #e1ff8a;
  --accent-soft: rgba(199, 255, 90, 0.12);
  --ember: #ff8a4c;
  --aqua: #54d6c3;
  --danger: #ff786e;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --map-veil: rgba(5, 8, 9, 0.2);
  --radius: 30px;
  --radius-sm: 20px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  color-scheme: dark;
  background:
    linear-gradient(140deg, rgba(84, 214, 195, 0.12) 0%, transparent 30%),
    linear-gradient(20deg, rgba(255, 138, 76, 0.09) 0%, transparent 24%),
    linear-gradient(180deg, #0e1619 0%, var(--bg) 44%, #050708 100%);
}

body.phone-preview {
  height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(180deg, #0b1113 0%, #050708 100%);
}

body.phone-preview::before,
body.phone-preview .recording-phone-frame {
  display: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.026) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.62), transparent 72%);
}

.shell {
  position: relative;
  max-width: 1540px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 10px 20px 20px;
}

body.phone-preview .shell {
  position: fixed;
  inset: 0;
  display: block;
  width: 100vw;
  max-width: none;
  height: 100vh;
  min-height: 0;
  margin: 0;
  padding: 0;
  border-radius: 0;
  overflow: hidden;
  background: #070b0d;
  box-shadow: none;
  z-index: 2;
  scrollbar-width: none;
}

body.phone-preview .shell::-webkit-scrollbar {
  display: none;
}

body.phone-preview .hero {
  display: none;
}

body.phone-preview .hero .eyebrow {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.58rem;
  letter-spacing: 0.07em;
}

body.phone-preview .hero h1 {
  display: none;
}

body.phone-preview .hero p {
  display: none;
}

body.phone-preview .planner {
  position: absolute;
  left: max(8px, env(safe-area-inset-left));
  right: max(8px, env(safe-area-inset-right));
  top: max(8px, env(safe-area-inset-top));
  z-index: 680;
  gap: 5px;
  margin: 0;
  padding: 7px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 15px;
  background: rgba(7, 11, 13, 0.72);
  box-shadow: 0 14px 30px rgba(0,0,0,0.22);
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
}

body.phone-preview .planner-head,
body.phone-preview .field-help,
body.phone-preview .city-search,
body.phone-preview .locate-button,
body.phone-preview .notes-panel {
  display: none;
}

body.phone-preview .field-label,
body.phone-preview label {
  font-size: 0.56rem;
  letter-spacing: 0.05em;
}

body.phone-preview select,
body.phone-preview .city-search input {
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 9px;
  font-size: 0.72rem;
}

body.phone-preview .planner-form,
body.phone-preview .workspace,
body.phone-preview .planner-foot,
body.phone-preview .comparison-grid {
  grid-template-columns: 1fr;
}

body.phone-preview .planner-form {
  grid-template-columns: minmax(0, 1fr) minmax(108px, 0.7fr);
  gap: 4px 5px;
  align-items: end;
}

body.phone-preview .start-field,
body.phone-preview .distance-field {
  min-width: 0;
}

body.phone-preview .choice-field,
body.phone-preview .planner-actions {
  grid-column: 1 / -1;
}

body.phone-preview .choice-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

body.phone-preview #coffeeIntentChoices {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.phone-preview .choice-chip {
  min-height: 26px;
  padding: 5px 6px;
  border-radius: 9px;
  text-align: center;
  background: rgba(255,255,255,0.035);
  border-color: rgba(255,255,255,0.065);
}

body.phone-preview .choice-chip strong {
  overflow: hidden;
  font-size: 0.6rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.phone-preview .choice-chip span {
  display: none;
}

body.phone-preview .distance-field {
  gap: 3px;
}

body.phone-preview .range-value {
  font-size: 0.6rem;
}

body.phone-preview .planner-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px;
  gap: 5px;
  margin: 0;
}

body.phone-preview .planner-actions #submitBtn,
body.phone-preview .planner-actions #resetBtn {
  width: 100%;
  min-width: 0;
  flex-basis: auto;
}

body.phone-preview .planner-actions button {
  min-height: 31px;
  padding: 6px 9px;
  font-size: 0.72rem;
}

body.phone-preview .planner-foot {
  display: none;
}

body.phone-preview .status {
  min-height: 0;
  font-size: 0.68rem;
  line-height: 1.25;
}

body.phone-preview .start-point-pill,
body.phone-preview .subtle-button {
  width: 100%;
  font-size: 0.66rem;
}

body.phone-preview .comparison-panel {
  position: absolute;
  left: max(8px, env(safe-area-inset-left));
  right: max(8px, env(safe-area-inset-right));
  bottom: calc(max(8px, env(safe-area-inset-bottom)) + 124px);
  z-index: 670;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.phone-preview .comparison-header {
  display: none;
}

body.phone-preview .comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

body.phone-preview .minimal-comparison-card {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px;
  min-height: 32px;
  padding: 6px 7px;
  border-radius: 999px;
  background: rgba(7, 11, 13, 0.68);
  border-color: rgba(255,255,255,0.1);
  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body.phone-preview .minimal-comparison-card h3 {
  font-size: 0.6rem;
}

body.phone-preview .comparison-distance {
  display: none;
}

body.phone-preview .workspace {
  position: absolute;
  inset: 0;
  display: block;
  min-height: auto;
  gap: 0;
  overflow: hidden;
  margin: 0;
}

body.phone-preview .inspector {
  display: none;
}

body.phone-preview .map-card {
  position: absolute;
  inset: 0;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: #edf1ea;
  box-shadow: none;
}

body.phone-preview .map-stage,
body.phone-preview #map {
  height: 100%;
  min-height: 0;
  max-height: none;
}

body.phone-preview .map-stage {
  flex: 1 1 auto;
}

body.phone-preview #map {
  border-radius: 0;
}

body.phone-preview .map-stage::before {
  inset: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(7,11,13,0.34) 0, transparent 148px),
    linear-gradient(0deg, rgba(7,11,13,0.42) 0, transparent 220px);
}

body.phone-preview .map-stage::after {
  display: none;
}

body.phone-preview .selection-summary {
  background: rgba(8, 13, 15, 0.78);
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 16px 36px rgba(0,0,0,0.26);
}

body.phone-preview .map-header,
body.phone-preview .section-header {
  display: none;
}

body.phone-preview .floating-summary {
  left: max(8px, env(safe-area-inset-left));
  right: max(8px, env(safe-area-inset-right));
  top: auto;
  bottom: max(8px, env(safe-area-inset-bottom));
  width: auto;
  max-height: 122px;
  padding: 9px 10px;
  border-radius: 16px 16px 12px 12px;
  overflow: hidden;
}

body.phone-preview .selection-summary h2 {
  font-size: 0.78rem;
}

body.phone-preview .selection-summary p {
  font-size: 0.64rem;
}

body.phone-preview .selection-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.phone-preview .metric {
  min-height: 28px;
  padding: 5px 6px;
}

body.phone-preview .metric strong {
  font-size: 0.72rem;
}

body.phone-preview .metric span {
  font-size: 0.52rem;
}

body.phone-preview .map-empty-state {
  width: calc(100% - 20px);
  left: max(10px, env(safe-area-inset-left));
  top: calc(max(8px, env(safe-area-inset-top)) + 150px);
  padding: 10px 11px;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(34,44,48,0.12);
}

body.phone-preview .map-empty-state h2 {
  font-size: 0.88rem;
}

body.phone-preview .map-empty-state ol {
  margin-top: 8px;
  font-size: 0.68rem;
}

body.phone-preview .map-start-hint {
  left: max(10px, env(safe-area-inset-left));
  bottom: calc(max(8px, env(safe-area-inset-bottom)) + 134px);
  padding: 7px 9px;
  font-size: 0.62rem;
  background: rgba(255,255,255,0.76);
}

body.phone-preview .leaflet-control-zoom {
  margin: 0 8px 172px 0 !important;
}

body.phone-preview .leaflet-control-attribution {
  display: none;
}

body.phone-preview .cafe-name-tooltip {
  font-size: 0.58rem;
}

body.phone-preview .cafe-preview-card {
  min-width: 220px;
  grid-template-columns: 44px minmax(0, 1fr);
}

body.phone-preview .cafe-preview-thumb {
  width: 44px;
  height: 44px;
}

body.phone-preview .recording-loader {
  position: fixed;
  inset: 0;
  z-index: 960;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
}

body.phone-preview .recording-loader-card {
  width: min(100%, 330px);
  padding: 20px 18px 18px;
  border-radius: 24px;
}

body.phone-preview .recording-loader-card h2 {
  font-size: 1.4rem;
}

body.phone-preview .recording-loader-card p {
  font-size: 0.8rem;
}

body.phone-preview .recording-action-cue {
  left: max(10px, env(safe-area-inset-left));
  right: max(10px, env(safe-area-inset-right));
  bottom: calc(max(8px, env(safe-area-inset-bottom)) + 260px);
  width: auto;
  max-width: none;
  z-index: 720;
  padding: 9px 11px;
  border-radius: 14px;
}

body.phone-preview .recording-action-cue span {
  font-size: 0.66rem;
}

body.phone-preview .recording-action-cue p {
  font-size: 0.66rem;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  align-items: start;
  justify-items: start;
  padding: 2px 4px 8px;
}

.compact-hero .eyebrow {
  margin-bottom: 3px;
}

.hero h1 {
  margin: 0;
  max-width: 15ch;
  font-size: clamp(1.24rem, 1.72vw, 1.76rem);
  line-height: 1;
  letter-spacing: 0;
  font-weight: 760;
}

.hero p {
  margin: 0 0 2px;
  max-width: 42ch;
  color: var(--muted-strong);
  font-size: 0.78rem;
  line-height: 1.42;
  opacity: 0.82;
}

.surface {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.074), rgba(255,255,255,0.03)),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.planner {
  position: relative;
  z-index: 40; /* keep the city-search dropdown above the map section below */
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 7px 10px;
  margin-bottom: 10px;
  border-radius: 16px;
}

.control-strip {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.052), rgba(255,255,255,0.022)),
    rgba(7, 12, 14, 0.46);
  border: 1px solid rgba(255,255,255,0.064);
  box-shadow: 0 8px 24px rgba(0,0,0,0.16);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.planner-head,
.map-header,
.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.planner-head {
  display: flex;
  max-width: none;
  padding-right: 70px;
  align-items: center;
}

.planner-head h2,
.map-header h2,
.section-header h2 {
  margin: 0;
  font-size: 0.9rem;
  letter-spacing: 0;
}

.planner-head p,
.map-header p,
.section-header p,
.muted,
.cafes-meta,
.status,
.caveats,
label,
.notes-panel {
  color: var(--muted);
}

.planner-head p,
.map-header p,
.section-header p {
  margin: 4px 0 0;
  line-height: 1.45;
}

.control-strip .planner-head p {
  font-size: 0.72rem;
  opacity: 0.52;
}

.planner-form {
  display: grid;
  grid-template-columns: minmax(210px, 0.95fr) minmax(150px, 0.62fr) minmax(190px, 0.9fr) minmax(190px, 0.9fr) auto;
  gap: 9px;
  margin-top: 0;
  align-items: end;
}

/* Start group: preset city dropdown + German-city search + "use my location". */
.start-field {
  display: grid;
  gap: 5px;
  align-content: start;
}

.field-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.city-search {
  position: relative;
}

.city-search input {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(4, 8, 10, 0.58);
  border-radius: 12px;
  padding: 8px 10px;
  font: inherit;
  color: var(--text);
  outline: none;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.city-search input::placeholder {
  color: var(--muted);
  opacity: 0.72;
}

.city-search input:focus {
  border-color: rgba(199, 255, 90, 0.42);
  box-shadow: 0 0 0 4px rgba(199, 255, 90, 0.1);
}

.city-search-results {
  position: absolute;
  z-index: 1200;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  display: grid;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(7, 12, 14, 0.97);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  max-height: 232px;
  overflow-y: auto;
}

.city-search-result {
  width: 100%;
  min-height: 0;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
}

.city-search-result:hover:not(:disabled),
.city-search-result:focus-visible {
  background: rgba(199, 255, 90, 0.12);
  color: var(--accent-strong);
  transform: none;
  box-shadow: none;
}

.city-search-empty {
  padding: 9px 10px;
  color: var(--muted);
  font-size: 0.74rem;
}

.distance-field {
  align-self: start;
}

label {
  display: grid;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.choice-field {
  gap: 5px;
}

.choice-field select {
  display: none;
}

.choice-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.choice-chip {
  width: auto;
  min-height: 0;
  padding: 7px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.045);
  background: rgba(255,255,255,0.012);
  color: rgba(188, 199, 194, 0.62);
  box-shadow: none;
  text-align: center;
  opacity: 0.78;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, opacity 140ms ease;
}

.choice-chip strong {
  display: block;
}

.choice-chip strong {
  font-size: 0.68rem;
  color: rgba(242, 245, 240, 0.66);
  font-weight: 720;
}

.choice-chip:hover:not(:disabled) {
  transform: none;
  background: rgba(255,255,255,0.028);
  border-color: rgba(255,255,255,0.075);
  box-shadow: none;
  opacity: 0.92;
}

.choice-chip.active {
  background: linear-gradient(180deg, rgba(199,255,90,0.14), rgba(199,255,90,0.08));
  border-color: rgba(199,255,90,0.28);
  color: var(--accent-strong);
  opacity: 1;
}

.choice-chip.active strong {
  color: var(--accent-strong);
}

select,
input[type="range"],
button {
  width: 100%;
}

select {
  border: 1px solid var(--line);
  background: rgba(4, 8, 10, 0.58);
  border-radius: 12px;
  padding: 8px 10px;
  font: inherit;
  color: var(--text);
  outline: none;
}

select:focus {
  border-color: rgba(199, 255, 90, 0.42);
  box-shadow: 0 0 0 4px rgba(199, 255, 90, 0.1);
}

input[type="range"] {
  accent-color: var(--accent);
}

.range-value {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.field-help {
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 520;
  letter-spacing: 0;
  line-height: 1.4;
  text-transform: none;
  opacity: 0.46;
}

button {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  color: #12170e;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(199, 255, 90, 0.18);
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(199, 255, 90, 0.23);
}

button:disabled {
  opacity: 0.68;
  cursor: progress;
}

.planner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-top: 0;
}

.planner-actions button {
  width: auto;
}

.planner-actions #submitBtn {
  flex: 0 1 150px;
  min-width: 138px;
}

.planner-actions #resetBtn {
  flex: 0 0 86px;
}

.ghost-button {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.09);
  color: var(--muted-strong);
  box-shadow: none;
}

.subtle-button {
  width: auto;
  min-width: 0;
  padding-inline: 12px;
  font-size: 0.72rem;
}

.locate-button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: var(--accent-soft);
  border: 1px solid rgba(199, 255, 90, 0.35);
  color: var(--accent-strong);
  box-shadow: none;
  font-size: 0.82rem;
  padding-block: 9px;
}

.btn-icon {
  flex: 0 0 auto;
  display: block;
}

.locate-button:hover:not(:disabled) {
  background: rgba(199, 255, 90, 0.18);
  border-color: rgba(199, 255, 90, 0.5);
}

.locate-button:disabled {
  opacity: 0.55;
  cursor: progress;
}

.planner-foot {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 8px;
  margin-top: 1px;
  padding-top: 2px;
  border-top: 0;
  align-items: center;
}

.compact-foot {
  align-items: center;
}

.status,
.caveats {
  font-size: 0.72rem;
  line-height: 1.4;
  opacity: 0.64;
}

.notes-panel {
  min-width: 190px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  opacity: 0.68;
}

.mode-pill {
  position: absolute;
  top: 10px;
  right: 12px;
}

.start-point-pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(84,214,195,0.08);
  border: 1px solid rgba(84,214,195,0.16);
  color: #b7ebe2;
  font-size: 0.68rem;
}

.notes-panel:hover,
.notes-panel[open] {
  opacity: 1;
}

.notes-panel summary {
  cursor: pointer;
  font-weight: 680;
  font-size: 0.7rem;
  list-style: none;
}

.notes-panel summary::-webkit-details-marker { display: none; }
.notes-panel[open] summary { margin-bottom: 8px; }

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 3.35fr) minmax(238px, 286px);
  gap: 12px;
  align-items: stretch;
  min-height: calc(100vh - 132px);
}

.comparison-panel {
  margin: 0 0 10px;
  padding: 9px 10px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), rgba(84,214,195,0.04)),
    rgba(7, 12, 14, 0.46);
}

.comparison-header {
  margin-bottom: 8px;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.comparison-card {
  width: 100%;
  min-height: 0;
  display: grid;
  gap: 8px;
  padding: 9px;
  border-radius: 12px;
  text-align: left;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text);
  box-shadow: none;
}

.minimal-comparison-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.comparison-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.minimal-comparison-card h3 {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comparison-copy span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comparison-contrast {
  margin: -2px 0 0;
  color: var(--muted-strong);
  font-size: 0.72rem;
  line-height: 1.42;
}

.comparison-card.active {
  background: rgba(199,255,90,0.1);
  border-color: rgba(199,255,90,0.22);
}

.comparison-card.active .comparison-rank,
.route-card.active .route-head strong {
  color: var(--accent-strong);
}

.comparison-topline,
.comparison-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.comparison-rank,
.comparison-badge,
.comparison-distance {
  font-size: 0.68rem;
  color: var(--muted);
}

.comparison-card.active .comparison-distance {
  color: var(--accent-strong);
}

.comparison-badge {
  color: var(--accent-strong);
}

.comparison-title-row h3 {
  margin: 0;
  font-size: 0.92rem;
}

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

.comparison-signal {
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.03);
}

.comparison-signal span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.comparison-signal strong {
  display: block;
  font-size: 0.74rem;
  line-height: 1.3;
}

.comparison-signal.strong {
  border-color: rgba(199,255,90,0.24);
  background: rgba(199,255,90,0.09);
}

.comparison-signal.good {
  border-color: rgba(84,214,195,0.2);
  background: rgba(84,214,195,0.08);
}

.comparison-signal.partial {
  border-color: rgba(255,138,76,0.18);
  background: rgba(255,138,76,0.08);
}

.map-card {
  padding: 0;
  overflow: hidden;
  min-height: 100%;
  background: rgba(248, 245, 239, 0.72);
  border-color: rgba(72,86,92,0.08);
  box-shadow: 0 24px 72px rgba(34,44,48,0.18);
}

.map-header {
  min-height: 30px;
  padding: 8px 12px 4px;
  opacity: 0.74;
  align-items: center;
}

.compact-map-header h2 {
  font-size: 0.9rem;
}

.compact-map-header p {
  margin: 0;
  font-size: 0.72rem;
}

.map-header .eyebrow {
  margin: 0;
}

.map-stage {
  position: relative;
  min-height: calc(100vh - 178px);
}

.map-stage::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 350;
  pointer-events: none;
  border-radius: 0 0 26px 26px;
  background:
    linear-gradient(115deg, transparent 0 52%, rgba(240,138,62,0.05) 62%, transparent 76%),
    radial-gradient(circle at 50% 48%, transparent 0 44%, rgba(255,255,255,0.02) 76%, rgba(88,114,96,0.06) 100%),
    linear-gradient(180deg, transparent, rgba(255,255,255,0.06));
}

.map-stage::after {
  content: "";
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 28px;
  z-index: 355;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(199,255,90,0.32), rgba(84,214,195,0.22), transparent);
  opacity: 0.46;
}

#map {
  height: calc(100vh - 178px);
  min-height: 660px;
  max-height: 920px;
  border: 0;
  border-radius: 0 0 26px 26px;
  overflow: hidden;
  background: #edf1ea;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.24);
}

.leaflet-container {
  background: #edf1ea;
  font: inherit;
}

.leaflet-tile {
  filter: saturate(1.34) contrast(1.14) brightness(0.95);
  opacity: 1;
}

#map.preference-asphalt {
  background: #dedbd0;
}

#map.preference-asphalt .leaflet-tile {
  filter: saturate(1.16) contrast(1.12) brightness(0.96);
}

#map.preference-low-traffic {
  background: #e3ecd3;
}

#map.preference-low-traffic .leaflet-tile {
  filter: saturate(1.1) contrast(1.02) brightness(1.02);
}

#map.preference-nature .leaflet-tile {
  filter: saturate(1.36) contrast(1.12) brightness(0.95);
}

.leaflet-control-attribution {
  margin: 0 7px 5px 0 !important;
  padding: 2px 5px !important;
  border-radius: 999px !important;
  background: rgba(6, 10, 12, 0.28) !important;
  color: rgba(255,255,255,0.34) !important;
  font-size: 9px !important;
  opacity: 0.42;
  transition: opacity 160ms ease;
}

.leaflet-control-attribution a {
  color: rgba(225,255,138,0.5) !important;
}

.leaflet-control-attribution:hover {
  opacity: 0.82;
}

.leaflet-control-zoom {
  margin: 0 9px 48px 0 !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0,0,0,0.2) !important;
  opacity: 0.44;
  transform: scale(0.88);
  transform-origin: bottom right;
  transition: opacity 160ms ease;
}

.leaflet-control-zoom:hover {
  opacity: 0.82;
}

.leaflet-control-zoom a {
  width: 28px !important;
  height: 28px !important;
  line-height: 27px !important;
  background: rgba(7, 11, 13, 0.58) !important;
  border-bottom-color: rgba(255,255,255,0.08) !important;
  color: rgba(242,245,240,0.72) !important;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #11191d;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: 0 16px 38px rgba(0,0,0,0.42);
}

.inspector {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 0 0 0 2px;
  border-left: 1px solid rgba(255,255,255,0.05);
}

.compact-card,
.selection-summary {
  padding: 12px;
}

.alternatives-card {
  background: transparent;
  border-color: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 2px 0 0 12px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.selection-summary {
  display: grid;
  gap: 6px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), rgba(240,138,62,0.03)),
    rgba(11, 17, 19, 0.26);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 18px rgba(0,0,0,0.14);
  backdrop-filter: blur(20px) saturate(1.12);
  -webkit-backdrop-filter: blur(20px) saturate(1.12);
}

.floating-summary {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 620;
  width: min(236px, calc(100% - 32px));
  border-radius: 14px;
}

.selected-route-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.map-start-hint,
.map-stats-overlay {
  position: absolute;
  z-index: 620;
}

.map-start-hint {
  left: 16px;
  bottom: 16px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(77,92,97,0.08);
  color: #4c5b60;
  font-size: 0.68rem;
}

.map-stats-overlay {
  left: 16px;
  top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: min(280px, calc(100% - 380px));
}

.map-stat {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(7,11,13,0.72);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(14px);
}

.map-stat.lead {
  border-color: rgba(199,255,90,0.24);
}

.map-stat strong {
  display: block;
  font-size: 0.86rem;
}

.map-stat span {
  color: var(--muted);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.map-empty-state {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 620;
  width: min(360px, calc(100% - 32px));
  padding: 14px 15px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.82), rgba(223,238,220,0.88)),
    rgba(241,244,239,0.92);
}

.map-empty-state h2 {
  margin: 0;
  font-size: 1rem;
  color: #243036;
}

.map-empty-state ol {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #58676b;
  font-size: 0.78rem;
  line-height: 1.55;
}

.selection-summary h2 {
  margin: 0 0 2px;
  font-size: 0.82rem;
  letter-spacing: 0;
}

.selection-summary p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.66rem;
  line-height: 1.28;
  opacity: 0.72;
}

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

.trace-controls {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0;
}

.trace-toggle {
  width: auto;
  min-height: 28px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.09);
  color: var(--accent-strong);
  box-shadow: none;
  font-size: 0.68rem;
}

.trace-hint {
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.routes,
.cafes {
  display: grid;
  gap: 7px;
}

.section-header {
  margin-bottom: 7px;
  opacity: 0.58;
}

.section-header p {
  font-size: 0.68rem;
}

.slim-section-header {
  margin-bottom: 6px;
}

.slim-section-header p {
  opacity: 0.72;
}

.route-card,
.cafe-card {
  padding: 8px 9px;
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
}

.route-card {
  display: grid;
  gap: 0;
  align-items: center;
  opacity: 0.88;
  background: rgba(255,255,255,0.018);
  transition: border-color 160ms ease, background 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.minimal-route-card {
  padding: 0;
}

.route-pill-button {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 0;
  padding: 8px 10px;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

.route-pill-index,
.route-pill-state {
  font-size: 0.68rem;
  color: var(--muted);
}

.route-pill-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.76rem;
  font-weight: 620;
  text-align: left;
}

.route-card.active {
  opacity: 1;
  border-color: rgba(240,138,62,0.18);
  background: rgba(240,138,62,0.08);
}

.route-card:hover {
  opacity: 0.96;
  border-color: rgba(255,255,255,0.09);
  background: rgba(255,255,255,0.04);
}

.route-option-body {
  min-width: 0;
}

.route-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.route-title-block {
  min-width: 0;
}

.route-meta-row,
.cafe-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.route-head h3,
.cafe-card h3 {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0;
}

.route-head strong {
  color: var(--muted-strong);
  font-size: 0.7rem;
  white-space: nowrap;
  font-weight: 720;
}

.route-role-badge {
  flex-shrink: 0;
}

.route-chip,
.mode-pill,
.trait-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 720;
}

.route-chip,
.trait-pill {
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-size: 0.7rem;
  font-weight: 650;
}

.mode-pill {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid rgba(199,255,90,0.16);
  font-weight: 820;
}

.trait-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.metric {
  min-height: 32px;
  padding: 5px 6px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  background: rgba(4, 8, 10, 0.18);
}

.metric strong {
  display: block;
  color: var(--text);
  font-size: 0.74rem;
  line-height: 1.15;
}

.metric span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.58rem;
}

.route-note,
.cafe-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.35;
}

.route-note {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.route-mini-list,
.route-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.mini-point,
.mini-badge,
.coffee-meta {
  font-size: 0.66rem;
  line-height: 1.35;
}

.coffee-meta {
  margin-bottom: 10px;
  padding: 7px 8px;
  border-radius: 12px;
  background: rgba(84,214,195,0.06);
  border: 1px solid rgba(84,214,195,0.12);
  color: var(--muted-strong);
}

.cafes.empty-state {
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(84,214,195,0.12);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(84,214,195,0.06), rgba(255,255,255,0.018)),
    rgba(255,255,255,0.018);
}

.cafes.empty-state strong {
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.25;
}

.cafes.empty-state span {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.4;
}

.cafe-preview-popup .leaflet-popup-content-wrapper {
  background: rgba(248,248,246,0.96);
  color: #182024;
  border: 1px solid rgba(24,32,36,0.08);
}

.cafe-preview-popup .leaflet-popup-tip {
  background: rgba(248,248,246,0.96);
}

.cafe-name-tooltip {
  padding: 3px 7px;
  border: 1px solid rgba(82, 67, 48, 0.12);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.9);
  color: #3c3024;
  box-shadow: 0 8px 22px rgba(36, 32, 28, 0.12);
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.cafe-name-tooltip::before {
  display: none;
}

.cafe-preview-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-width: 255px;
}

.cafe-preview-thumb {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(240,138,62,0.22), rgba(255,255,255,0.8));
  overflow: hidden;
  font-size: 1rem;
}

.cafe-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cafe-preview-body {
  display: grid;
  gap: 3px;
}

.cafe-preview-body strong {
  font-size: 0.82rem;
}

.cafe-preview-body span {
  font-size: 0.66rem;
  color: #49555b;
}

.mini-point,
.mini-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255,255,255,0.045);
  color: var(--muted-strong);
}

.mini-badge.strong,
.mini-badge.good {
  background: rgba(199,255,90,0.12);
  color: var(--accent-strong);
}

.mini-badge.partial {
  background: rgba(255,138,76,0.12);
  color: #ffd0b6;
}

.mini-badge.neutral {
  background: rgba(84,214,195,0.08);
  color: #b7ebe2;
}

.insight-block {
  margin-top: 4px;
  padding: 8px 9px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  background: rgba(4, 8, 10, 0.18);
}

.insight-block ul {
  margin: 6px 0 0 16px;
  padding: 0;
  color: var(--muted-strong);
  font-size: 0.68rem;
}

.insight-label {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.select-route {
  width: auto;
  min-height: 30px;
  margin-top: 0;
  padding: 7px 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.075);
  color: var(--accent-strong);
  box-shadow: none;
  font-size: 0.68rem;
}

.select-route:hover:not(:disabled) {
  box-shadow: none;
}

.route-card.active .select-route {
  background: rgba(199,255,90,0.14);
  border-color: rgba(199,255,90,0.22);
  color: var(--accent-strong);
}

.cafes-meta {
  display: block;
  margin-top: 3px;
  font-size: 0.78rem;
  line-height: 1.35;
  font-weight: 520;
}

.cafe-distance-badge {
  white-space: nowrap;
}

.cafe-rail {
  margin-left: 12px;
  opacity: 0.9;
  background: rgba(255,255,255,0.018);
  border-color: rgba(255,255,255,0.045);
  border-radius: 14px;
  box-shadow: none;
}

.cafes-header {
  margin-bottom: 10px;
}

.route-marker {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.48);
  background: rgba(7, 11, 13, 0.62);
  color: #11170f;
  box-shadow: 0 0 18px rgba(199,255,90,0.16), 0 8px 18px rgba(0,0,0,0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.route-marker::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(199,255,90,0.82);
}

.route-marker.end::after {
  background: var(--ember);
  box-shadow: 0 0 16px rgba(255,138,76,0.74);
}

.route-marker.picked::after {
  background: var(--aqua);
  box-shadow: 0 0 16px rgba(84,214,195,0.74);
}

.route-marker.loop {
  width: 25px;
  height: 25px;
}

.route-marker.loop::after {
  width: 11px;
  height: 11px;
  background:
    radial-gradient(circle at 35% 35%, var(--accent) 0 36%, transparent 39%),
    radial-gradient(circle at 65% 65%, var(--ember) 0 36%, transparent 39%);
  box-shadow: 0 0 18px rgba(199,255,90,0.62), 0 0 24px rgba(255,138,76,0.32);
}

.recording-loader {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 22%, rgba(199,255,90,0.18), transparent 34%),
    rgba(5, 8, 9, 0.74);
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
}

.recording-loader-card {
  width: min(100%, 420px);
  padding: 26px 24px 22px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.045)),
    rgba(7, 11, 13, 0.92);
  box-shadow: 0 24px 70px rgba(0,0,0,0.46);
}

.recording-brand {
  display: inline-flex;
  width: auto;
  margin-bottom: 12px;
  padding: 5px 9px;
  border: 1px solid rgba(199,255,90,0.28);
  border-radius: 999px;
  color: var(--accent-strong);
  background: rgba(199,255,90,0.1);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recording-loader-card h2 {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.recording-loader-card p {
  margin: 9px 0 16px;
  color: var(--muted-strong);
  font-size: 0.92rem;
  line-height: 1.42;
}

.recording-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
}

.recording-progress span {
  display: block;
  width: 10%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--aqua));
  box-shadow: 0 0 18px rgba(199,255,90,0.42);
  transition: width 0.48s ease;
}

.recording-loader-stages {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.recording-loader-stages li {
  position: relative;
  padding-left: 19px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.recording-loader-stages li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
}

.recording-loader-stages li.active {
  color: var(--text);
}

.recording-loader-stages li.active::before {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(199,255,90,0.76);
}

.recording-action-cue {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 860;
  width: min(320px, calc(100vw - 44px));
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  background: rgba(7, 11, 13, 0.82);
  box-shadow: 0 18px 42px rgba(0,0,0,0.32);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.recording-action-cue span {
  display: block;
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recording-action-cue p {
  margin: 4px 0 0;
  color: var(--muted-strong);
  font-size: 0.78rem;
  line-height: 1.35;
}

.route-cue {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  transform: rotate(var(--cue-rotation, 0deg));
  filter: drop-shadow(0 0 10px rgba(199,255,90,0.3));
}

.route-cue::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 10px solid rgba(225,255,138,0.78);
}

.runner-head {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(7, 11, 13, 0.8);
  background:
    radial-gradient(circle at 35% 35%, #fff8cc 0 18%, transparent 20%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.92) 0 20%, var(--accent) 24%, #7dffb6 56%, rgba(84,214,195,0.92) 100%);
  box-shadow:
    0 0 0 6px rgba(199,255,90,0.12),
    0 0 18px rgba(199,255,90,0.85),
    0 0 36px rgba(84,214,195,0.42);
}

.runner-head-icon.recording-demo .runner-head {
  width: 28px;
  height: 28px;
}

.recording-demo .runner-head {
  box-shadow:
    0 0 0 8px rgba(199,255,90,0.14),
    0 0 22px rgba(199,255,90,0.95),
    0 0 42px rgba(84,214,195,0.48);
}

.demo-pulse {
  animation: demo-pulse-ring 0.85s ease-out;
}

@keyframes demo-pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(199,255,90,0.34);
    transform: translateY(0);
  }
  60% {
    box-shadow: 0 0 0 12px rgba(199,255,90,0);
    transform: translateY(-1px);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(199,255,90,0);
    transform: translateY(0);
  }
}

.runner-head::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(199,255,90,0.24);
  animation: runner-pulse 1.45s ease-out infinite;
}

@keyframes runner-pulse {
  0% {
    transform: scale(0.72);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.12);
    opacity: 0;
  }
}

.empty-state {
  min-height: 116px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(255,255,255,0.15);
  border-radius: 18px;
  background: rgba(255,255,255,0.028);
}

.hidden { display: none; }

@media (max-width: 1180px) {
  .hero,
  .workspace,
  .planner-foot {
    grid-template-columns: 1fr;
  }

  .planner,
  .planner-form {
    grid-template-columns: 1fr;
  }

  .choice-chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero h1 {
    max-width: 15ch;
  }

  #map {
    height: 66vh;
    min-height: 540px;
  }

  .map-stage {
    min-height: 540px;
  }

  .inspector {
    padding: 2px 0 0;
    border-left: 0;
  }

  .alternatives-card,
  .cafe-rail {
    margin-left: 0;
    padding-left: 10px;
  }

  .floating-summary {
    right: 14px;
    top: 14px;
    width: min(264px, calc(100% - 28px));
  }

  .notes-panel {
    min-width: 0;
  }

  .comparison-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .shell {
    padding: 14px 12px 24px;
  }

  .hero {
    gap: 6px;
    padding-bottom: 8px;
  }

  .planner,
  .compact-card,
  .selection-summary,
  .comparison-panel {
    padding: 10px;
    border-radius: 18px;
  }

  .choice-chips {
    grid-template-columns: 1fr;
  }

  .choice-chip {
    padding: 10px 12px;
  }

  .planner-head p,
  .section-header p,
  .map-header p {
    font-size: 0.72rem;
  }

  .planner-foot {
    gap: 8px;
    align-items: stretch;
  }

  .status {
    order: 1;
  }

  #startPointPill,
  #clearStartBtn,
  .notes-panel {
    order: 2;
  }

  .map-card {
    padding: 0;
    border-radius: 18px;
  }

  #map {
    min-height: 420px;
    border-radius: 0 0 18px 18px;
  }

  .map-stage {
    min-height: 420px;
  }

  .selection-summary {
    gap: 8px;
  }

  .selection-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .map-stats-overlay {
    width: min(220px, calc(100% - 28px));
    top: auto;
    bottom: 58px;
  }

  .comparison-signals {
    grid-template-columns: 1fr 1fr;
  }

  .route-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .select-route {
    width: 100%;
  }

  .planner-head,
  .map-header,
  .section-header,
  .route-head,
  .cafe-card-top {
    align-items: flex-start;
  }
}
