:root {
  --bg: #0a0a0c;
  --panel: rgba(14, 13, 16, .88);
  --line: rgba(255, 255, 255, .09);
  --txt: #e9e4dd;
  --dim: #9a9186;
  --faint: #6b645c;
  --ember: #ff5a1f;
  --ember-hi: #ff8a3d;
  --amber: #f5a300;
  --blood: #b81d1d;
  --font-ui: 'Barlow', system-ui, -apple-system, sans-serif;
  --font-cond: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-display: 'Anton', 'Arial Black', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--txt);
  font-family: var(--font-ui);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

#map { position: fixed; inset: 0; background: var(--bg); }

body::before {
  content: '';
  position: fixed; inset: 0;
  z-index: 3; pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

.vignette {
  position: fixed; inset: 0;
  z-index: 2; pointer-events: none;
  background: radial-gradient(130% 100% at 50% 38%, transparent 52%, rgba(0, 0, 0, .5) 100%);
}

.topbar {
  position: fixed; inset: 0 0 auto 0;
  z-index: 20;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 26px;
  background: linear-gradient(180deg, rgba(7, 7, 9, .93) 0%, rgba(7, 7, 9, .62) 62%, transparent 100%);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.brand { display: flex; align-items: center; gap: 11px; user-select: none; cursor: pointer; }

.mark { width: 42px; height: 42px; flex: none; filter: drop-shadow(0 0 10px rgba(255, 90, 31, .38)); }
.mark .shield { fill: #131317; stroke: #4d4741; stroke-width: 2; }
.mark .bolt { fill: var(--ember); }

.brand-text h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 23px;
  line-height: 1;
  letter-spacing: .045em;
  text-transform: uppercase;
  color: #f2ede6;
  text-shadow: 0 0 22px rgba(255, 70, 20, .4), 0 2px 0 rgba(0, 0, 0, .8);
}
.brand-text .tag {
  margin-top: 4px;
  font-family: var(--font-cond);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: .17em;
  color: var(--dim);
}
.tag-num { color: #c46a3a; }

.controls { display: flex; align-items: center; gap: 8px; }

.yearbox {
  position: relative;
  width: 250px;
  padding: 5px 10px 3px;
  background: rgba(18, 18, 22, .82);
  border: 1px solid var(--line);
  border-radius: 4px;
  user-select: none;
}

.yr-hist {
  display: flex; align-items: flex-end; gap: 2px;
  height: 22px;
}
.yb {
  flex: 1;
  min-height: 3px;
  background: #4a2018;
  border-radius: 1px 1px 0 0;
  transition: background .15s;
}
.yb.on { background: var(--ember); box-shadow: 0 0 6px rgba(255, 90, 31, .35); }

.yr-track { position: relative; height: 16px; margin-top: 1px; }
.yr-track::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 7px;
  height: 2px;
  background: rgba(255, 255, 255, .14);
  border-radius: 1px;
}
.yr-track input[type=range] {
  position: absolute; inset: 0;
  width: 100%;
  appearance: none; -webkit-appearance: none;
  background: none;
  pointer-events: none;
  margin: 0;
}
.yr-track input[type=range]::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none;
  width: 14px; height: 14px;
  margin-top: 1px;
  border-radius: 50%;
  background: #f2ede6;
  border: 3px solid var(--ember);
  cursor: ew-resize;
  pointer-events: auto;
  box-shadow: 0 0 8px rgba(255, 90, 31, .5);
}
.yr-track input[type=range]::-moz-range-thumb {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #f2ede6;
  border: 3px solid var(--ember);
  cursor: ew-resize;
  pointer-events: auto;
  box-shadow: 0 0 8px rgba(255, 90, 31, .5);
}
.yr-track input[type=range]::-moz-range-track { background: none; }

.yr-label {
  position: absolute;
  right: 6px; top: 4px;
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .08em;
  color: #ffb289;
  background: rgba(10, 10, 13, .82);
  border-radius: 3px;
  padding: 0 5px;
  pointer-events: none;
}

.search-wrap { position: relative; }

#search {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--txt);
  background: rgba(18, 18, 22, .82);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 11px;
  width: 200px;
  outline: none;
  transition: border-color .15s, width .2s;
}
#search::placeholder { color: var(--faint); }
#search:focus { border-color: rgba(255, 90, 31, .55); }
#search::-webkit-search-cancel-button { -webkit-appearance: none; }

.suggest {
  position: absolute; top: calc(100% + 6px); right: 0;
  min-width: 264px;
  background: var(--panel);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .6);
  z-index: 30;
}
.suggest button {
  display: flex; justify-content: space-between; align-items: baseline; gap: 18px;
  width: 100%;
  font-family: var(--font-ui);
  font-size: 13.5px;
  color: var(--txt);
  background: none; border: 0;
  padding: 9px 12px;
  cursor: pointer;
  text-align: left;
}
.suggest button:hover, .suggest button.sel { background: rgba(255, 90, 31, .12); }
.suggest .s-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest .s-nums { font-family: var(--font-cond); font-weight: 700; font-size: 14.5px; color: var(--ember-hi); flex: none; }
.suggest .s-nums i { font-style: normal; color: var(--faint); }
.suggest .s-nums em { font-style: normal; color: var(--dim); font-weight: 600; }
.suggest .s-none { padding: 10px 12px; font-size: 13px; color: var(--faint); }
.suggest .s-head {
  padding: 7px 12px 3px;
  font-family: var(--font-cond); font-weight: 700; font-size: 10.5px;
  letter-spacing: .22em; color: var(--faint);
}
.suggest .s-place .s-nums { color: var(--dim); font-weight: 600; font-size: 12.5px; }

.icon-btn {
  width: 35px; height: 35px; flex: none;
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: 17px;
  color: var(--dim);
  background: rgba(18, 18, 22, .82);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--ember-hi); border-color: rgba(255, 90, 31, .45); }
.icon-btn.lit { color: var(--ember-hi); border-color: rgba(255, 90, 31, .45); }

.locate-btn { display: inline-flex; align-items: center; justify-content: center; }
.locate-btn svg { width: 19px; height: 19px; fill: currentColor; }
.locate-btn.busy svg { animation: spin 1.1s linear infinite; }
.locate-btn.live { color: var(--ember-hi); border-color: rgba(255, 90, 31, .45); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes sheetup {
  from { transform: translateY(38%); opacity: .45; }
  to { transform: none; opacity: 1; }
}



.routebar {
  position: fixed;
  top: 74px; left: 50%;
  transform: translateX(-50%);
  z-index: 21;
  display: flex; align-items: center; gap: 7px;
  width: min(94vw, 620px);
  padding: 9px 10px;
  background: var(--panel);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 90, 31, .4);
  border-left: 3px solid var(--ember);
  border-radius: 5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55);
}
.routebar input {
  flex: 1; min-width: 0;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--txt);
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px;
  outline: none;
}
.routebar input:focus { border-color: rgba(255, 90, 31, .55); }
.rt-arrow { color: var(--ember-hi); font-size: 16px; flex: none; }
.rt-go {
  flex: none;
  font-family: var(--font-cond); font-weight: 700; font-size: 14px;
  letter-spacing: .08em; color: #ffb289;
  background: rgba(46, 15, 9, .9);
  border: 1px solid rgba(255, 90, 31, .5);
  border-radius: 4px;
  padding: 8px 13px;
  cursor: pointer;
}
.rt-go:hover { color: #ffd0b0; }
.rt-go:disabled { opacity: .6; cursor: wait; }
.rt-x {
  flex: none;
  font-size: 19px; color: var(--dim);
  background: none; border: 0; padding: 0 4px; cursor: pointer;
}
.rt-x:hover { color: var(--txt); }

.route-banner { z-index: 18; }
.routebar:not([hidden]) + .route-banner:not([hidden]) { top: 140px; }

.rt-dot {
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 3px solid #0a0a0c;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .35), 0 0 12px rgba(0, 0, 0, .6);
}
.rt-dot-a { background: var(--ember); }
.rt-dot-b { background: #e9e4dd; }

.p-sub { font-size: 13px; color: var(--dim); margin-top: 5px; line-height: 1.5; }
.p-h {
  font-family: var(--font-cond); font-weight: 700; font-size: 11px;
  letter-spacing: .22em; color: var(--ember-hi);
  margin: 16px 0 7px;
}
.hs-row {
  display: flex; align-items: baseline; gap: 10px;
  width: 100%;
  font-family: var(--font-ui); font-size: 13.5px; color: var(--txt);
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 9px 11px;
  margin: 5px 0;
  cursor: pointer;
  text-align: left;
}
.hs-row:hover { background: rgba(255, 90, 31, .12); }
.hs-mi { flex: none; font-family: var(--font-cond); font-weight: 600; color: var(--faint); font-size: 12.5px; }
.hs-road { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-nums { flex: none; font-family: var(--font-cond); font-weight: 700; font-size: 15px; color: var(--ember-hi); }
.hs-nums i { font-style: normal; color: var(--faint); }
.hs-nums em { font-style: normal; color: var(--dim); font-weight: 600; }

.road-banner {
  position: fixed;
  top: 74px; left: 50%;
  transform: translateX(-50%);
  z-index: 19;
  display: flex; align-items: stretch;
  max-width: min(92vw, 560px);
  background: var(--panel);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 90, 31, .4);
  border-left: 3px solid var(--ember);
  border-radius: 5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55), 0 0 24px rgba(255, 90, 31, .12);
}
.rb-body { display: flex; align-items: baseline; gap: 10px; padding: 9px 4px 9px 14px; min-width: 0; flex-wrap: wrap; }
.rb-name {
  font-family: var(--font-cond); font-weight: 700; font-size: 19px;
  letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rb-nums { font-family: var(--font-cond); font-weight: 700; font-size: 19px; color: var(--ember-hi); white-space: nowrap; }
.rb-nums i { font-style: normal; color: var(--faint); }
.rb-nums em { font-style: normal; color: var(--dim); }
.rb-sub { font-size: 12px; color: var(--dim); white-space: nowrap; }
.rb-clear {
  font-size: 20px; color: var(--dim);
  background: none; border: 0; border-left: 1px solid var(--line);
  padding: 0 12px; margin-left: 8px; cursor: pointer;
}
.rb-clear:hover { color: var(--txt); }

.stats {
  position: fixed;
  left: 14px; bottom: 14px;
  z-index: 15;
  padding: 9px 14px 10px;
  background: var(--panel);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ember);
  border-radius: 5px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .5);
  user-select: none;
}
.stats-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stats-kicker {
  font-family: var(--font-cond); font-weight: 600; font-size: 10.5px;
  letter-spacing: .22em; color: var(--faint);
  max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stats.pinned .stats-kicker { color: #c98a5a; }
.pin-clear {
  font-size: 17px; line-height: 1; color: var(--dim);
  background: none; border: 0; padding: 0 0 0 6px; cursor: pointer;
}
.pin-clear:hover { color: var(--txt); }

.radius-row {
  display: flex; align-items: center; gap: 5px;
  margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--line);
}
.radius-label {
  font-family: var(--font-cond); font-weight: 600; font-size: 10px;
  letter-spacing: .2em; color: var(--faint); margin-right: 3px;
}
.rchip {
  font-family: var(--font-cond); font-weight: 600; font-size: 13px;
  letter-spacing: .04em; color: var(--dim);
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line); border-radius: 3px;
  padding: 4px 8px; cursor: pointer;
  transition: color .15s, border-color .15s;
}
.rchip:hover { color: var(--txt); }
.rchip.on {
  color: #ffb289;
  background: rgba(46, 15, 9, .85);
  border-color: rgba(255, 90, 31, .45);
}
.stats-nums { font-family: var(--font-cond); font-weight: 700; line-height: 1.15; margin-top: 1px; }
.stats-nums b { font-size: 27px; color: var(--ember-hi); font-weight: 700; }
.stats-nums i { font-style: normal; font-size: 21px; color: var(--faint); padding: 0 1px; }
.stats-nums span { font-size: 21px; color: #cfc9c1; }
.stats-sub { font-size: 11px; color: var(--faint); margin-top: 1px; }
.stats-attrib { font-size: 10px; color: #4f4a44; margin-top: 5px; }
.stats-attrib a { color: #5f5952; text-decoration: none; }
.stats-attrib a:hover { color: var(--dim); }

.panel {
  position: fixed;
  top: 74px; right: 14px; bottom: 14px;
  z-index: 18;
  display: flex;
  flex-direction: column;
  width: min(350px, calc(100vw - 28px));
  background: var(--panel);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 90, 31, .35);
  border-top: 3px solid var(--ember);
  border-radius: 6px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .65), 0 0 30px rgba(255, 90, 31, .1);
}
.panel-grip {
  display: none;
  flex: none;
  width: 44px; height: 4px;
  margin: 9px auto 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .22);
}
.panel-close {
  position: absolute; top: 6px; right: 9px;
  z-index: 2;
  width: 38px; height: 38px;
  font-size: 24px; line-height: 1; color: var(--dim);
  background: none; border: 0; cursor: pointer;
}
.panel-close:hover { color: var(--txt); }
.panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px 18px 18px;
}

.p-kicker {
  font-family: var(--font-cond); font-weight: 600; font-size: 11px;
  letter-spacing: .2em; color: #c98a5a;
  padding-right: 20px;
}
.p-road {
  font-family: var(--font-cond); font-weight: 700; font-size: 24px;
  letter-spacing: .02em; line-height: 1.1;
  margin-top: 5px;
  overflow-wrap: anywhere;
}
.p-x { font-size: 13.5px; color: var(--dim); margin-top: 2px; }
.p-toll {
  margin-top: 10px;
  font-family: var(--font-cond); font-weight: 700; font-size: 17px;
  color: var(--txt);
}
.p-toll b { font-size: 30px; color: var(--ember-hi); padding-right: 3px; }
.p-toll span { font-size: 14px; font-weight: 600; color: var(--dim); }
.p-where { font-size: 13px; color: #cfc9c1; margin-top: 6px; }
.p-loading { font-size: 13px; color: var(--faint); margin-top: 16px; }

.p-h {
  font-family: var(--font-cond); font-weight: 700; font-size: 12.5px;
  letter-spacing: .2em; text-transform: uppercase; color: var(--ember-hi);
  margin: 18px 0 7px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.p-kv div { display: flex; gap: 10px; padding: 3px 0; font-size: 13px; }
.p-kv dt { flex: none; width: 118px; color: var(--faint); }
.p-kv dd { color: #d8d2ca; overflow-wrap: anywhere; }

.p-veh {
  margin: 7px 0;
  padding: 9px 11px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--line);
  border-left: 2px solid rgba(255, 90, 31, .5);
  border-radius: 4px;
}
.pv-title { font-family: var(--font-cond); font-weight: 700; font-size: 16px; letter-spacing: .02em; }
.pv-sub { font-size: 12px; color: var(--dim); margin-top: 1px; }
.pv-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.vc {
  font-family: var(--font-cond); font-weight: 600; font-size: 12px;
  letter-spacing: .04em; color: #cfc9c1;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 2px 7px;
}
.vc.bad {
  color: #ffb289;
  background: rgba(46, 15, 9, .7);
  border-color: rgba(255, 90, 31, .4);
}

.pp-head {
  font-family: var(--font-cond); font-weight: 700; font-size: 10.5px;
  letter-spacing: .22em; color: var(--faint);
  margin: 9px 0 2px;
}
.pp-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 5px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, .07);
  font-size: 13px;
}
.pp-row:last-child { border-bottom: 0; }
.pp-who { color: #d8d2ca; }
.pp-tags { color: var(--faint); text-align: right; font-size: 12px; }
.pp-row.fatal .pp-who { color: var(--txt); font-weight: 600; }
.pp-row.fatal .pp-tags { color: var(--ember-hi); }

.p-foot {
  margin-top: 16px;
  font-family: var(--font-cond); font-weight: 600; font-size: 10.5px;
  letter-spacing: .18em; color: var(--faint);
}

.modal {
  position: fixed; inset: 0;
  z-index: 40;
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
  background: rgba(4, 4, 6, .72);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.modal-card {
  position: relative;
  max-width: 560px; max-height: min(86vh, 780px);
  overflow-y: auto;
  background: #111013;
  border: 1px solid var(--line);
  border-top: 3px solid var(--ember);
  border-radius: 6px;
  padding: 26px 28px 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .7);
}
.modal-card h2 {
  font-family: var(--font-display); font-weight: 400; font-size: 30px;
  letter-spacing: .04em; text-transform: uppercase;
  text-shadow: 0 0 20px rgba(255, 70, 20, .35);
}
.modal-card h3 {
  font-family: var(--font-cond); font-weight: 700; font-size: 14px;
  letter-spacing: .2em; text-transform: uppercase; color: var(--ember-hi);
  margin: 20px 0 8px;
}
.modal-card p, .modal-card li { font-size: 14.5px; line-height: 1.55; color: #cec8c0; }
.modal-lede { margin-top: 10px; font-size: 15.5px !important; }
.modal-lede b { color: var(--ember-hi); }
.modal-card ul { list-style: none; }
.modal-card li { display: flex; align-items: center; gap: 12px; margin: 9px 0; }
.modal-card a { color: var(--ember-hi); text-decoration: none; border-bottom: 1px solid rgba(255, 138, 61, .35); }
.ember { color: var(--ember-hi); }
.modal-foot { margin-top: 18px; font-size: 12.5px !important; color: var(--dim) !important; }
.modal-coda {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--font-cond); font-weight: 600; font-size: 16px !important;
  letter-spacing: .06em; color: var(--dim) !important;
}
.modal-close {
  position: absolute; top: 10px; right: 12px;
  font-size: 26px; color: var(--dim);
  background: none; border: 0; cursor: pointer;
}
.modal-close:hover { color: var(--txt); }

.k { flex: none; display: inline-flex; align-items: center; justify-content: center; }
.k-heat {
  width: 34px; height: 20px; border-radius: 10px;
  background: radial-gradient(closest-side, #ffe0a3, #ff5a1f 45%, #7a0e0e 75%, transparent);
}
.k-state {
  width: 34px; height: 20px;
  border: 1px dashed rgba(255, 138, 61, .8);
  border-radius: 3px;
  background: rgba(255, 90, 31, .12);
}
.k-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ember); border: 2px solid rgba(0,0,0,.5); margin: 0 11px; }
.k-years {
  width: 34px; height: 20px;
  background: linear-gradient(90deg, #4a2018 0 25%, var(--ember) 25% 75%, #4a2018 75%);
  border-radius: 2px;
}

.pin {
  width: 22px; height: 22px;
  cursor: grab;
}
.pin:active { cursor: grabbing; }
.pin::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  background: var(--ember);
  border: 3px solid #0a0a0c;
  box-shadow: 0 0 0 2px rgba(255, 90, 31, .55), 0 0 18px rgba(255, 90, 31, .55);
}
.pin::after {
  content: '';
  position: absolute; inset: -9px;
  border-radius: 50%;
  border: 1px solid rgba(255, 90, 31, .5);
  animation: pinpulse 2.2s ease-out infinite;
}
@keyframes pinpulse {
  0% { transform: scale(.55); opacity: .9; }
  70% { transform: scale(1.25); opacity: 0; }
  100% { opacity: 0; }
}

.toast {
  position: fixed; left: 50%; bottom: 110px;
  transform: translateX(-50%);
  z-index: 45;
  max-width: 88vw;
  padding: 10px 16px;
  font-size: 13.5px; color: var(--txt);
  background: var(--panel);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 90, 31, .4);
  border-radius: 5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55);
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.toast.show { opacity: 1; }

.loader {
  position: fixed; inset: 0;
  z-index: 60;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px;
  background: var(--bg);
  transition: opacity .7s ease;
}
.loader.gone { opacity: 0; pointer-events: none; }
.mark.big { width: 74px; height: 74px; }
.loader-title {
  font-family: var(--font-display); font-size: clamp(30px, 7vw, 44px);
  letter-spacing: .06em; color: #f2ede6;
  text-shadow: 0 0 30px rgba(255, 70, 20, .45);
}
.road-line {
  width: min(430px, 72vw); height: 5px;
  overflow: hidden; position: relative;
  background: #17161a;
  border-radius: 3px;
}
.road-line::after {
  content: '';
  position: absolute; inset: 1px -60px 1px 0;
  background: repeating-linear-gradient(90deg, var(--amber) 0 24px, transparent 24px 56px);
  animation: drive .55s linear infinite;
}
@keyframes drive { to { transform: translateX(-56px); } }
.loader-status { font-family: var(--font-cond); font-size: 13.5px; letter-spacing: .14em; color: var(--dim); text-transform: uppercase; }
.loader-status.err { color: #ff6b5e; text-transform: none; letter-spacing: .02em; }

.maplibregl-ctrl-bottom-right { z-index: 14; }
.maplibregl-ctrl-group {
  background: rgba(18, 18, 22, .88) !important;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: none !important;
}
.maplibregl-ctrl-group button { width: 34px; height: 34px; }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--line); }
.maplibregl-ctrl button .maplibregl-ctrl-icon { filter: invert(.72); }

@media (max-width: 900px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
    padding: 10px 10px 22px;
  }
  .brand-text h1 { font-size: 20px; }
  .brand-text .tag { font-size: 10px; letter-spacing: .13em; }
  .mark { width: 36px; height: 36px; }

  .controls { width: 100%; flex-wrap: wrap; }
  .yearbox { order: 2; width: 100%; }
  .search-wrap { flex: 1; min-width: 0; }
  #search { width: 100%; font-size: 16px; }
  .suggest { left: 0; right: 0; min-width: 0; }

  .road-banner { top: auto; bottom: 160px; width: 92vw; }
  .rb-sub { display: none; }

  .stats { left: 10px; bottom: 10px; padding: 8px 12px 9px; }
  .stats-nums b { font-size: 23px; }
  .stats-nums span { font-size: 18px; }
  .stats-sub { max-width: 52vw; }
  .stats-kicker { max-width: 52vw; }


  .panel {
    top: auto; left: 0; right: 0; bottom: 0;
    width: auto;
    height: auto;
    max-height: 74vh;
    max-height: 74dvh;
    min-height: 34vh;
    z-index: 22;
    border-radius: 16px 16px 0 0;
    border-left: 0; border-right: 0; border-bottom: 0;
    background: rgba(13, 12, 15, .97);
    box-shadow: 0 -14px 44px rgba(0, 0, 0, .7);
    animation: sheetup .26s ease-out;
  }
  .panel-grip { display: block; }
  .panel-body {
    padding: 8px 18px 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    font-size: 15px;
  }
  .panel-close { top: 8px; right: 8px; }

  .modal-card { padding: 22px 18px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .road-line::after { animation: none; }
  .loader { transition: none; }
  .pin::after { animation: none; opacity: 0; }
  .locate-btn.busy svg { animation: none; }
  .panel { animation: none; }
}

@media (max-width: 760px) {
  .routebar { top: 122px; flex-wrap: wrap; }
  .routebar input { font-size: 16px; }
  .rt-arrow { display: none; }
  .routebar:not([hidden]) + .route-banner:not([hidden]) { top: auto; }
}

.set-card { max-width: 620px; }

.set-lede {
  color: var(--dim);
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 14px;
}

.set-body {
  max-height: 58vh;
  overflow-y: auto;
  padding-right: 6px;
  margin-bottom: 14px;
}

.set-body h3 {
  font-family: var(--font-cond);
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ember-hi);
  border-bottom: 1px solid var(--line);
  padding-bottom: 5px;
  margin: 18px 0 10px;
}

.set-body h3:first-child { margin-top: 0; }

.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 5px 0;
}

.set-row label {
  font-size: 13px;
  color: var(--txt);
  flex: 1 1 auto;
  min-width: 0;
}

.set-color { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.set-color input[type="color"] {
  width: 34px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: none;
  cursor: pointer;
}

.set-color input[type="range"] { width: 68px; }

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

.set-num { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }

.set-num input[type="range"] { width: 118px; }

.set-num span {
  font-family: var(--font-cond);
  font-size: 13px;
  color: var(--ember-hi);
  min-width: 36px;
  text-align: right;
}

.set-row input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--ember);
  cursor: pointer;
}

.set-row select {
  background: rgba(0, 0, 0, .35);
  color: var(--txt);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 4px 8px;
  font-family: var(--font-ui);
  font-size: 13px;
  cursor: pointer;
}

.set-out {
  width: 100%;
  height: 120px;
  margin-bottom: 12px;
  background: rgba(0, 0, 0, .45);
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px;
  resize: vertical;
}

.set-actions {
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
}

.set-btn {
  flex: 1;
  background: rgba(255, 90, 31, .12);
  color: var(--ember-hi);
  border: 1px solid rgba(255, 90, 31, .4);
  border-radius: 6px;
  padding: 9px;
  font-family: var(--font-cond);
  font-size: 13px;
  letter-spacing: .1em;
  cursor: pointer;
}

.set-btn:hover { background: rgba(255, 90, 31, .22); }

.set-reset {
  background: rgba(184, 29, 29, .12);
  color: #ff8a8a;
  border-color: rgba(184, 29, 29, .45);
}

.set-reset:hover { background: rgba(184, 29, 29, .24); }

@media (max-width: 560px) {
  .set-row { flex-wrap: wrap; gap: 6px; }
  .set-num input[type="range"] { width: 96px; }
}
