html, body {
  margin: 0;
  height: 100%;
  background: #0d1114;
  font-family: Outfit, system-ui, sans-serif;
  color: #f5f6f8;
}
#map-next {
  width: 100vw;
  height: 100vh;
}
.map-next-toolbar {
  position: absolute;
  z-index: 2;
  top: 16px;
  left: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}
.map-next-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
}
.map-next-customize-host {
  display: block;
  pointer-events: auto;
}
.map-next-bar a.map-next-bar__link {
  background: rgba(24, 28, 32, 0.92);
  color: #f5f6f8;
  text-decoration: none;
  border: 1px solid #282d33;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  -webkit-user-drag: none;
  user-drag: none;
}
.map-next-bar a.map-next-bar__link.is-active {
  border-color: #e59524;
}
.map-next-bar__back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.map-next-bar__back-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.9;
}
.map-next-bar__back:hover {
  border-color: #3d4654;
}
.map-next-bar__sep {
  width: 1px;
  height: 22px;
  margin: 0 2px;
  background: #3a424d;
  flex-shrink: 0;
}
.map-next-customize {
  position: relative;
  display: inline-block;
}
.map-next-customize__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 12px 0 10px;
  background: rgba(24, 28, 32, 0.94);
  color: #e8eaed;
  border: 1px solid #282d33;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease,
    color 0.15s ease;
}
.map-next-customize__svg-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.map-next-customize__toggle-label {
  letter-spacing: 0.02em;
}
.map-next-customize__toggle:hover {
  border-color: #e59524;
  color: #f5f6f8;
  box-shadow:
    0 0 14px rgba(229, 149, 36, 0.28),
    0 2px 10px rgba(0, 0, 0, 0.25);
}
.map-next-customize__toggle:hover .map-next-customize__svg-icon {
  color: #e59524;
}
.map-next-customize__toggle:active {
  transform: scale(0.98);
}
.map-next-customize.is-open .map-next-customize__toggle {
  border-color: #e59524;
  color: #f5f6f8;
  box-shadow:
    0 0 16px rgba(229, 149, 36, 0.35),
    0 0 0 1px rgba(229, 149, 36, 0.4);
}
.map-next-customize.is-open .map-next-customize__toggle .map-next-customize__svg-icon {
  color: #e59524;
}
.map-next-customize__panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 12;
  width: min(408px, calc(100vw - 32px));
  padding: 0;
  background: rgba(14, 18, 22, 0.97);
  border: 1px solid #2e353d;
  border-radius: 14px;
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
  overflow: hidden;
}
.map-next-customize__panel[hidden] {
  display: none !important;
}
.map-next-customize__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
}
.map-next-customize__header-icon {
  display: flex;
  color: #e59524;
  line-height: 0;
}
.map-next-customize__header-icon .map-next-customize__svg-icon {
  width: 17px;
  height: 17px;
}
.map-next-customize__header-title {
  font-size: 14px;
  font-weight: 600;
  color: #f0f2f5;
  letter-spacing: 0.01em;
}
.map-next-customize__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0 10px;
  margin-top: 8px;
}
.map-next-customize__tab {
  padding: 8px 10px;
  margin: 0;
  border: none;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: #8f97a3;
  font-size: 10px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.map-next-customize__tab:hover {
  color: #c5cbd3;
}
.map-next-customize__tab.is-active {
  color: #f5f6f8;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 -2px 0 #e59524;
}
.map-next-customize__pane {
  padding: 10px 12px 12px;
}
.map-next-customize__pane[hidden] {
  display: none !important;
}
.map-next-customize__themes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.map-next-customize__theme-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  padding: 7px 6px 6px;
  background: rgba(18, 22, 26, 0.9);
  border: 1px solid #2a3139;
  border-radius: 9px;
  color: #d8dde4;
  font-size: 10px;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.map-next-customize__theme-card:hover {
  border-color: #3d4654;
}
.map-next-customize__theme-card.is-active {
  border-color: #e59524;
  box-shadow: 0 0 0 1px rgba(229, 149, 36, 0.45);
}
.map-next-customize__theme-check {
  position: absolute;
  top: 4px;
  right: 5px;
  width: 14px;
  height: 14px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e59524;
  color: #0d1114;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}
.map-next-customize__theme-card.is-active .map-next-customize__theme-check {
  display: flex;
}
.map-next-customize__theme-swatches {
  display: flex;
  gap: 4px;
  justify-content: center;
}
.map-next-customize__theme-swatch {
  width: 100%;
  max-width: 36px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  flex: 1;
}
.map-next-customize__theme-name {
  line-height: 1.15;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-next-customize__layers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.map-next-customize__layer-pill {
  padding: 7px 8px;
  border-radius: 999px;
  border: 1px solid #2a3139;
  background: rgba(18, 22, 26, 0.85);
  color: #9aa3ad;
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
  text-align: center;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}
.map-next-customize__layer-pill:hover {
  border-color: #3d4654;
  color: #d8dde4;
}
.map-next-customize__layer-pill.is-on {
  border-color: #e59524;
  background: rgba(229, 149, 36, 0.12);
  color: #f5f6f8;
  box-shadow: 0 0 0 1px rgba(229, 149, 36, 0.25);
}
@media (max-width: 440px) {
  .map-next-customize__themes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.map-next-brand {
  position: fixed;
  z-index: 2;
  left: 10px;
  right: auto;
  bottom: 10px;
  display: block;
  line-height: 0;
  opacity: 0.92;
  transition: opacity 0.15s ease;
  pointer-events: auto;
}
.map-next-brand:hover {
  opacity: 1;
}
/* Source asset 780×206; ~22% scale ≈ 170×45px, capped for small viewports */
.map-next-brand__img {
  display: block;
  width: auto;
  height: clamp(40px, 4.2vh, 52px);
  max-width: min(200px, 48vw);
  object-fit: contain;
  object-position: left bottom;
}
.map-next-driver-panel {
  position: fixed;
  z-index: 1305;
  top: 16px;
  right: 16px;
  width: min(300px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  background: rgba(24, 28, 32, 0.94);
  border: 1px solid #282d33;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
  box-sizing: border-box;
  overflow: hidden;
}
.map-next-driver-panel.is-hidden {
  display: none;
}
.mn-popup-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #282d33;
}
.mn-popup-title {
  color: #8f97a3;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.mn-popup-close {
  width: 26px;
  height: 26px;
  border: 1px solid #282d33;
  border-radius: 7px;
  background: #12161a;
  color: #8f97a3;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.mn-popup-close:hover {
  color: #E59524;
  border-color: #E59524;
}
.mn-popup-body {
  max-height: min(42vh, 420px);
  overflow-y: auto;
  padding: 12px 14px 14px;
  font-size: 13px;
  line-height: 1.45;
}
.mn-popup-header {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #282d33;
}
.mn-popup-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #E59524;
  text-decoration: none;
  display: inline-block;
}
a.mn-popup-name:hover {
  color: #F2B236;
  text-decoration: underline;
}
.mn-popup-row {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.5rem;
}
.mn-popup-k {
  color: #8f97a3;
  font-size: 12px;
}
.mn-popup-v,
.mn-popup-link {
  color: #f5f6f8;
  font-size: 13px;
}
.mn-popup-link {
  font-weight: 600;
  text-decoration: none;
  color: #F2B236;
}
.mn-popup-link:hover {
  text-decoration: underline;
}
.mn-popup-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #E59524;
  background: rgba(229, 149, 36, 0.12);
  border: 1px solid rgba(229, 149, 36, 0.28);
}
.mn-popup-muted {
  margin-top: 4px;
}
.mn-popup-city {
  color: #8f97a3;
  font-size: 12px;
}
.mn-popup-speed {
  margin-top: 8px;
}
.mn-popup-speed-val {
  color: #E59524;
  font-weight: 700;
}
.mn-popup-route .mn-popup-v {
  font-size: 12px;
  color: #c5cbd3;
}
.map-next-driver {
  width: 16px;
  height: 16px;
  position: absolute;
  top: 0;
  left: 0;
  line-height: 0;
  font-size: 0;
  cursor: pointer;
  pointer-events: auto;
}
.map-next-driver-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #f59e0b;
  box-sizing: border-box;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
}
#map-next .maplibregl-marker {
  background: none !important;
  border: none !important;
}
.map-next-missing {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}
.map-next-missing a {
  color: #e59524;
}
.map-next-missing pre {
  text-align: left;
  background: #111;
  padding: 12px 16px;
  border-radius: 8px;
  overflow: auto;
}
