/* ─── Reset / base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #080b14;
  --panel-bg: rgba(10, 13, 22, 0.84);
  --panel-border: rgba(255,255,255,0.065);
  --surface: rgba(255,255,255,0.055);
  --surface-hover: rgba(255,255,255,0.09);
  --text: #e2e8f8;
  --text-muted: #6b7a9a;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --danger: #f87171;
  --success: #4ade80;
  --warning: #fbbf24;
  --info: #60a5fa;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --transition-fast: 0.15s ease;
  --transition-med: 0.25s ease;
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 13px;
  color: var(--text);
}

html, body, #root {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
}

/* ─── Layout ────────────────────────────────────────────────────────── */
.app-layout {
  position: relative;
  width: 100%;
  height: 100%;
}

.map-wrapper {
  position: absolute;
  inset: 0;
}

.map-container {
  width: 100%;
  height: 100%;
}

/* ─── Control panel — floating glass card ───────────────────────────── */
.control-panel {
  position: absolute;
  left: 16px;
  top: 16px;
  bottom: 16px;
  width: 300px;
  z-index: 200;
  background: var(--panel-bg);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow:
    0 32px 80px rgba(0,0,0,0.65),
    0 8px 24px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

.control-panel::-webkit-scrollbar { width: 3px; }
.control-panel::-webkit-scrollbar-track { background: transparent; }
.control-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.panel-header {
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.panel-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 60%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.panel-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-share {
  background: none;
  border: none;
  font-size: 13px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity var(--transition-fast);
  padding: 0 2px;
  line-height: 1;
}
.btn-share:hover { opacity: 1; }

.panel-section {
  padding: 14px 16px;
  border-bottom: 1px solid var(--panel-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.api-section {
  margin-top: auto;
  border-top: 1px solid var(--panel-border);
  border-bottom: none;
}

.section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* ─── Search ────────────────────────────────────────────────────────── */
.search-wrap { position: relative; }

.input-text {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 8px 10px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input-text:focus {
  border-color: rgba(59,130,246,0.5);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.08);
}

.input-text::placeholder { color: var(--text-muted); }

.search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: rgba(12,16,28,0.96);
  backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  list-style: none;
  z-index: 1000;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: 0 12px 32px rgba(0,0,0,0.6);
}

.search-dropdown li {
  padding: 8px 10px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text);
  border-bottom: 1px solid var(--panel-border);
  transition: background 0.1s;
}
.search-dropdown li:last-child { border-bottom: none; }
.search-dropdown li:hover { background: var(--surface-hover); }

.coord-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}

.coord-text {
  flex: 1;
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'SF Mono', 'Fira Code', monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  padding: 0 2px;
  line-height: 1;
  transition: color 0.15s;
  flex-shrink: 0;
}
.btn-clear:hover { color: var(--danger); }

.hint { font-size: 11px; color: var(--text-muted); font-style: italic; }

/* ─── Mode selector ─────────────────────────────────────────────────── */
.mode-selector { display: flex; gap: 6px; }

.btn-mode {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 4px;
  background: var(--surface);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-mode:hover { background: var(--surface-hover); color: var(--text); }

.btn-mode.active {
  background: rgba(59,130,246,0.12);
  border-color: rgba(59,130,246,0.4);
  color: #60a5fa;
  box-shadow: 0 0 16px rgba(59,130,246,0.12);
}
.btn-mode.active[data-mode="auto"] {
  background: linear-gradient(135deg, rgba(251,191,36,.15), rgba(249,115,22,.08));
  border-color: rgba(251,191,36,0.45);
  color: #fbbf24;
  box-shadow: 0 0 16px rgba(251,191,36,0.12);
}
.btn-mode.active[data-mode="bicycle"] {
  background: linear-gradient(135deg, rgba(34,211,238,.12), rgba(99,102,241,.08));
  border-color: rgba(34,211,238,0.4);
  color: #22d3ee;
  box-shadow: 0 0 16px rgba(34,211,238,0.12);
}
.btn-mode.active[data-mode="pedestrian"] {
  background: linear-gradient(135deg, rgba(74,222,128,.12), rgba(16,185,129,.08));
  border-color: rgba(74,222,128,0.4);
  color: #4ade80;
  box-shadow: 0 0 16px rgba(74,222,128,0.12);
}

.mode-icon { font-size: 20px; }
.mode-label { font-size: 10px; font-weight: 700; letter-spacing: 0.04em; }

/* ─── Time ranges ───────────────────────────────────────────────────── */
.time-ranges { display: flex; flex-direction: column; gap: 6px; }

.time-range-row { display: flex; align-items: center; gap: 8px; }

.range-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 6px currentColor; }

.range-input {
  width: 60px;
  background: var(--surface);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 5px 6px;
  font-size: 13px;
  text-align: center;
  outline: none;
  transition: border-color 0.15s;
}
.range-input:focus { border-color: rgba(59,130,246,0.5); }

.range-preview { flex: 1; font-size: 12px; color: var(--text-muted); }

.btn-icon {
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  width: 24px; height: 24px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.btn-icon:hover:not(:disabled) { border-color: var(--danger); color: var(--danger); }
.btn-icon:disabled { opacity: 0.3; cursor: not-allowed; }

.btn-add {
  background: none;
  border: 1px dashed var(--panel-border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  font-size: 12px;
  text-align: center;
  transition: all 0.15s;
  width: 100%;
}
.btn-add:hover { border-color: rgba(59,130,246,0.5); color: var(--accent); }

/* ─── Buttons ───────────────────────────────────────────────────────── */
.btn-primary {
  width: 100%;
  padding: 11px;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 0 24px rgba(99,102,241,0.25), 0 4px 12px rgba(0,0,0,0.3);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 0 36px rgba(99,102,241,0.45), 0 4px 16px rgba(0,0,0,0.4);
  transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 0 16px rgba(99,102,241,0.25);
}
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-secondary {
  flex: 1;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-secondary:hover { background: var(--surface-hover); border-color: rgba(59,130,246,0.3); }

.export-row { display: flex; gap: 8px; }

.btn-link {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  text-align: left;
  transition: color 0.15s;
}
.btn-link:hover { color: var(--text); }

.key-ok { color: var(--success); }

/* ─── Error ─────────────────────────────────────────────────────────── */
.error-msg {
  font-size: 12px;
  color: var(--danger);
  background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.2);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  line-height: 1.4;
}

/* ─── Legend ────────────────────────────────────────────────────────── */
.legend {
  position: absolute;
  bottom: 16px;
  left: 332px;
  background: rgba(8, 11, 20, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  pointer-events: all;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  min-width: 180px;
}

.legend-title {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: opacity var(--transition-fast);
  border-radius: var(--radius-sm);
  padding: 2px 2px;
}
.legend-item:hover { opacity: 0.8; }
.legend-item.hidden { opacity: 0.3; }

.legend-swatch {
  width: 12px; height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legend-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  min-width: 36px;
}

.legend-area {
  flex: 1;
  font-size: 10px;
  color: var(--text-muted);
  text-align: right;
}

/* ─── Splash screen ─────────────────────────────────────────────────── */
.splash {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  color: var(--text-muted);
  font-size: 14px;
}

.splash-rings {
  width: 80px; height: 80px;
  position: relative;
  margin: 0 auto;
}
.splash-ring {
  border-radius: 50%;
  border: 1.5px solid rgba(99,102,241,0.6);
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: splash-radiate 2.4s ease-out infinite;
  opacity: 0;
}
.splash-ring:nth-child(1) { animation-delay: 0s; }
.splash-ring:nth-child(2) { animation-delay: 0.6s; }
.splash-ring:nth-child(3) { animation-delay: 1.2s; }
@keyframes splash-radiate {
  0%   { width: 10px; height: 10px; opacity: 1; }
  80%  { opacity: 0.2; }
  100% { width: 80px; height: 80px; opacity: 0; }
}

.splash-error .splash-content { color: var(--danger); }
.splash-hint { font-size: 12px; color: var(--text-muted); margin-top: -8px; }

/* ─── MapLibre overrides ────────────────────────────────────────────── */
.maplibregl-ctrl-group {
  background: rgba(8,11,20,0.88) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255,255,255,0.07) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4) !important;
}
.maplibregl-ctrl-group button {
  background: transparent !important;
  color: var(--text-muted) !important;
}
.maplibregl-ctrl-group button:hover { background: var(--surface) !important; }
.maplibregl-ctrl-attrib {
  background: rgba(8,11,20,0.7) !important;
  color: var(--text-muted) !important;
  border-radius: 6px !important;
  font-size: 10px !important;
}
.maplibregl-ctrl-attrib a { color: var(--text-muted) !important; }

/* ─── Basemap switcher ──────────────────────────────────────────────── */
.basemap-switcher {
  position: absolute;
  bottom: 52px;
  right: 10px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(8,11,20,0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 3px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.basemap-btn {
  width: 28px; height: 28px;
  border: none;
  border-radius: 6px;
  background: none;
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
  opacity: 0.5;
}
.basemap-btn:hover { background: var(--surface-hover); opacity: 0.9; }
.basemap-btn.active { background: var(--surface-hover); opacity: 1; }

/* ─── Status dot ────────────────────────────────────────────────────── */
.status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.status-dot--ready { background: #4ade80; box-shadow: 0 0 8px rgba(74,222,128,.7); }
.status-dot--starting { background: #fbbf24; animation: pulse-dot 1.2s ease-in-out infinite; }
.status-dot--error { background: #f87171; box-shadow: 0 0 8px rgba(248,113,113,.5); }
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ─── Toast system ──────────────────────────────────────────────────── */
.toast-container {
  position: absolute; bottom: 20px; right: 16px; z-index: 2000;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 12px; font-weight: 500;
  backdrop-filter: blur(16px);
  border: 1px solid;
  animation: toast-enter .25s ease forwards;
  pointer-events: all;
  display: flex; align-items: center; gap: 8px;
  min-width: 160px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.toast--success { background: rgba(74,222,128,.1); border-color: rgba(74,222,128,.25); color: #4ade80; }
.toast--error   { background: rgba(248,113,113,.1); border-color: rgba(248,113,113,.25); color: #f87171; }
.toast--info    { background: rgba(59,130,246,.1); border-color: rgba(59,130,246,.25); color: #60a5fa; }
.toast-msg { flex: 1; }
.toast-close { background: none; border: none; color: inherit; cursor: pointer; opacity: 0.5; font-size: 14px; line-height: 1; padding: 0; }
.toast-close:hover { opacity: 1; }
@keyframes toast-enter { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }

/* ─── Map loading bar ───────────────────────────────────────────────── */
.map-loading-overlay {
  position: absolute; top: 0; left: 0; right: 0; z-index: 500;
  pointer-events: none;
}
.map-loading-track {
  height: 3px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.map-loading-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #6366f1, #a78bfa);
  transition: width 0.12s ease-out;
  box-shadow: 0 0 10px rgba(99,102,241,0.7);
}
.map-loading-fill--done {
  transition: width 0.18s ease-out;
  background: linear-gradient(90deg, #4ade80, #34d399);
  box-shadow: 0 0 10px rgba(74,222,128,0.7);
}
.map-loading-badge {
  position: absolute;
  top: 7px;
  transform: translateX(-50%);
  background: rgba(10,13,22,0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  letter-spacing: 0.04em;
  transition: left 0.12s ease-out, color 0.2s;
  white-space: nowrap;
}
.map-loading-badge--done { color: #4ade80 !important; border-color: rgba(74,222,128,0.25); }

/* ─── Map context menu ──────────────────────────────────────────────── */
.map-context-menu {
  position: absolute; z-index: 1500;
  background: rgba(10,13,22,0.94);
  backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0,0,0,.6);
  min-width: 210px; overflow: hidden;
}
.map-context-menu button {
  display: block; width: 100%;
  padding: 9px 14px;
  background: none; border: none;
  color: var(--text); font-size: 12px;
  text-align: left; cursor: pointer;
  transition: background .1s;
}
.map-context-menu button:hover { background: var(--surface-hover); }

/* ─── Isochrone hover popup ─────────────────────────────────────────── */
.iso-popup .maplibregl-popup-content {
  background: rgba(8,11,20,.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 12px; font-weight: 600;
  padding: 5px 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
}
.iso-popup .maplibregl-popup-tip { display: none; }

/* ─── Isochrone map labels ──────────────────────────────────────────── */
.iso-map-label {
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  border-radius: 4px;
  color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 2px 6px;
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: .3px;
  font-family: 'Inter', system-ui, sans-serif;
}

/* ─── Preset chips ──────────────────────────────────────────────────── */
.preset-chips { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.preset-chips::-webkit-scrollbar { display: none; }
.preset-chip {
  flex-shrink: 0;
  padding: 3px 9px;
  background: var(--surface);
  border: 1px solid var(--panel-border);
  border-radius: 100px;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}
.preset-chip:hover { border-color: rgba(99,102,241,0.4); color: #a78bfa; }

/* ─── History ───────────────────────────────────────────────────────── */
.history-toggle {
  background: none; border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  padding: 0; width: 100%;
  text-align: left;
  display: flex; align-items: center; justify-content: space-between;
}
.history-toggle:hover { color: var(--text); }
.history-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.history-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px;
  background: var(--surface);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-sm);
  cursor: pointer; text-align: left; width: 100%;
  transition: background .1s, border-color .1s;
}
.history-item:hover { background: var(--surface-hover); border-color: rgba(99,102,241,0.3); }
.history-icon { font-size: 14px; flex-shrink: 0; }
.history-label { flex: 1; font-size: 11px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-meta { font-size: 10px; color: var(--text-muted); flex-shrink: 0; }
.collapsible-body { max-height: 0; overflow: hidden; transition: max-height var(--transition-med), opacity var(--transition-med); opacity: 0; }
.collapsible-body.open { max-height: 500px; opacity: 1; }

/* ─── Coord copy / auto-recalc ──────────────────────────────────────── */
.btn-copy { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 14px; padding: 0 3px; transition: color var(--transition-fast); line-height: 1; flex-shrink: 0; }
.btn-copy:hover { color: var(--accent); }
.auto-recalc-toggle { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); cursor: pointer; user-select: none; }
.auto-recalc-toggle input { accent-color: #6366f1; }

/* ─── Error card ────────────────────────────────────────────────────── */
.error-card {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(248,113,113,.07);
  border: 1px solid rgba(248,113,113,.18);
  border-radius: var(--radius); padding: 10px 12px;
}
.error-icon { font-size: 15px; color: var(--danger); flex-shrink: 0; margin-top: 1px; }
.error-body { flex: 1; }
.error-title { font-size: 12px; font-weight: 600; color: var(--danger); }
.error-detail { font-size: 11px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; word-break: break-word; }
.btn-retry {
  background: none;
  border: 1px solid rgba(248,113,113,.25);
  border-radius: var(--radius-sm);
  color: var(--danger); font-size: 11px;
  padding: 4px 8px; cursor: pointer;
  flex-shrink: 0; transition: all var(--transition-fast); white-space: nowrap;
}
.btn-retry:hover { background: rgba(248,113,113,.08); }

/* ─── Legend eye toggle ─────────────────────────────────────────────── */
.legend-eye {
  background: none; border: none; color: var(--text-muted);
  font-size: 11px; cursor: pointer; margin-left: 4px;
  padding: 0 2px; line-height: 1; opacity: 0;
  transition: opacity var(--transition-fast);
  flex-shrink: 0;
}
.legend:hover .legend-eye { opacity: 0.4; }
.legend-item:hover .legend-eye { opacity: 1; }
.legend-item.hidden .legend-eye { opacity: 1; color: var(--danger); }

/* ─── Panel footer ──────────────────────────────────────────────────── */
.panel-footer {
  margin-top: auto;
  padding: 12px 16px;
  border-top: 1px solid var(--panel-border);
  flex-shrink: 0;
}

.github-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  transition: color var(--transition-fast);
  width: fit-content;
}
.github-link:hover { color: var(--text); }

/* ─── Landing page ──────────────────────────────────────────────────── */
.landing {
  position: fixed; inset: 0; z-index: 9999;
  background: #060810;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: opacity 0.42s ease, transform 0.42s ease;
}
.landing--out {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}

/* Animated blobs */
.landing-blob {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: 0.13;
  animation: blob-drift linear infinite alternate;
  pointer-events: none;
}
.landing-blob-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #3b82f6, transparent);
  top: -15%; left: -15%;
  animation-duration: 16s;
}
.landing-blob-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #8b5cf6, transparent);
  bottom: -15%; right: -15%;
  animation-duration: 20s;
  animation-delay: -7s;
}
.landing-blob-3 {
  width: 360px; height: 360px;
  background: radial-gradient(circle, #06b6d4, transparent);
  bottom: 10%; left: 15%;
  animation-duration: 12s;
  animation-delay: -3s;
}
@keyframes blob-drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(50px, 40px) scale(1.12); }
}

/* Expanding rings */
.landing-rings {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.landing-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(99,102,241,0.35);
  animation: ring-expand 5s ease-out infinite;
}
.landing-ring:nth-child(1) { animation-delay: 0s; }
.landing-ring:nth-child(2) { animation-delay: 1.25s; }
.landing-ring:nth-child(3) { animation-delay: 2.5s; }
.landing-ring:nth-child(4) { animation-delay: 3.75s; }
@keyframes ring-expand {
  0%   { width: 40px; height: 40px; opacity: 0.9; border-color: rgba(99,102,241,0.7); }
  60%  { opacity: 0.3; }
  100% { width: 700px; height: 700px; opacity: 0; border-color: rgba(99,102,241,0.05); }
}

/* Landing content */
.landing-content {
  position: relative; z-index: 1;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  gap: 20px;
}

.landing-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(107,114,154,0.8);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 100px;
  padding: 5px 14px;
}

.landing-title {
  font-size: clamp(52px, 10vw, 100px);
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 45%, #34d399 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: title-shimmer 4s ease-in-out infinite alternate;
}
@keyframes title-shimmer {
  from { background-position: 0% 50%; }
  to   { background-position: 100% 50%; }
}

.landing-sub {
  font-size: 15px;
  color: rgba(180,190,220,0.55);
  max-width: 380px;
  line-height: 1.65;
}

.landing-modes {
  display: flex; gap: 12px;
}
.landing-mode-chip {
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px; font-weight: 600;
  border: 1px solid;
}
.landing-mode-auto      { background: rgba(251,191,36,.1); border-color: rgba(251,191,36,.25); color: #fbbf24; }
.landing-mode-bike      { background: rgba(34,211,238,.1); border-color: rgba(34,211,238,.25); color: #22d3ee; }
.landing-mode-walk      { background: rgba(74,222,128,.1); border-color: rgba(74,222,128,.25); color: #4ade80; }

.landing-cta {
  margin-top: 4px;
  padding: 15px 44px;
  background: linear-gradient(135deg, #3b82f6, #6366f1 50%, #8b5cf6);
  background-size: 200% 100%;
  border: none;
  border-radius: 100px;
  color: #fff;
  font-size: 15px; font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow:
    0 0 40px rgba(99,102,241,0.45),
    0 8px 32px rgba(0,0,0,0.5);
  transition: all 0.25s;
  animation: cta-pulse 3s ease-in-out infinite;
}
.landing-cta:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow:
    0 0 60px rgba(99,102,241,0.65),
    0 12px 40px rgba(0,0,0,0.6);
  background-position: 100% 0;
}
@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 0 40px rgba(99,102,241,0.4), 0 8px 32px rgba(0,0,0,0.5); }
  50%       { box-shadow: 0 0 60px rgba(99,102,241,0.6), 0 8px 32px rgba(0,0,0,0.5); }
}
