:root {
  color-scheme: dark;
  --green: #041615;
  --cream: #f7f5f2;
  --gold: #d6c3a3;
  --muted: rgba(247, 245, 242, 0.62);
  --muted-soft: rgba(247, 245, 242, 0.42);
  --line: rgba(214, 195, 163, 0.2);
  --line-strong: rgba(214, 195, 163, 0.42);
  --surface: rgba(247, 245, 242, 0.035);
  --surface-strong: rgba(0, 0, 0, 0.18);
  --route: #7b1e2b;
  --route-glow: rgba(123, 30, 43, 0.3);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--green);
  color: var(--cream);
  font-family: Inter, sans-serif;
}

button,
input {
  font: inherit;
}

.cv-dashboard {
  min-height: 100vh;
  padding: clamp(1.4rem, 3vw, 3rem) 2.4vw;
  background:
    radial-gradient(circle at 78% 8%, rgba(214, 195, 163, 0.11), transparent 34%),
    var(--green);
}

.cv-db-shell {
  max-width: 1560px;
  margin: 0 auto;
}

.cv-db-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: end;
  margin-bottom: 1.1rem;
}

.cv-db-kicker {
  margin-bottom: 0;
  color: var(--gold);
  font-size: clamp(0.82rem, 1.1vw, 1.02rem);
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.cv-db-title {
  margin: 0;
  font-size: clamp(3rem, 7vw, 6.8rem);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.065em;
}

.cv-db-title em {
  font-family: "Didot", "Bodoni Moda", serif;
  font-style: italic;
  font-weight: 500;
}

.cv-db-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.15vw, 1.08rem);
  font-weight: 300;
  line-height: 1.7;
}

.cv-map-section {
  display: grid;
  grid-template-columns: minmax(285px, 340px) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1rem;
}

.cv-control-card,
.cv-map-card,
.cv-db-section {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.cv-control-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}

.cv-map-card {
  position: relative;
  min-height: min(820px, 78vh);
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
  min-height: min(820px, 78vh);
  background: #0c2321;
}

.cv-map-info-block {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 450;
  display: grid;
  gap: 0.42rem;
  min-width: min(270px, calc(100% - 2rem));
  padding: 0.72rem 0.8rem;
  border: 1px solid rgba(247, 245, 242, 0.18);
  border-radius: 12px;
  background: rgba(4, 22, 21, 0.88);
  backdrop-filter: blur(14px);
  color: rgba(247, 245, 242, 0.76);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cv-scale-graphic {
  position: relative;
  width: 120px;
  padding-bottom: 0.45rem;
  color: var(--gold);
  text-align: center;
}

.cv-scale-graphic::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 8px;
  border-left: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
}

.cv-weather-overlay {
  position: fixed;
  top: 1rem;
  right: 2.4vw;
  bottom: 1rem;
  left: min(390px, calc(2.4vw + 356px));
  z-index: 470;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(247, 245, 242, 0.18);
  border-radius: 18px;
  background: rgba(4, 22, 21, 0.92);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.36);
}

.cv-weather-overlay[hidden] {
  display: none;
}

.cv-weather-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 34px;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.cv-weather-head strong {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.cv-weather-tabs {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.cv-weather-tabs button,
.cv-weather-close,
.cv-weather-tab {
  border: 1px solid rgba(214, 195, 163, 0.15);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.14);
  color: rgba(247, 245, 242, 0.76);
  cursor: pointer;
}

.cv-weather-tabs button {
  min-height: 34px;
  padding: 0 0.7rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cv-weather-tabs button.is-active,
.cv-weather-tab.is-active {
  border-color: var(--line-strong);
  background: rgba(214, 195, 163, 0.14);
  color: var(--gold);
}

.cv-weather-close {
  width: 34px;
  height: 34px;
  color: var(--gold);
  font-size: 1.2rem;
}

.cv-weather-overlay iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #0c2321;
}

.cv-weather-link {
  padding: 0.48rem 0.75rem;
  border-bottom: 1px solid rgba(214, 195, 163, 0.12);
  color: rgba(247, 245, 242, 0.52);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: right;
  text-decoration: none;
  text-transform: uppercase;
}

.cv-weather-link:hover {
  color: var(--gold);
}

.cv-db-section {
  margin-top: 1rem;
  padding: 1rem;
}

.cv-db-section-title {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.4rem 0.35rem 1rem;
}

.cv-db-section-title.compact {
  padding-bottom: 0.35rem;
}

.cv-db-section-title h2 {
  margin: 0;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.cv-db-section-title span {
  color: var(--muted-soft);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cv-search {
  display: grid;
  gap: 0.55rem;
}

.cv-search label,
.cv-layer-list h2,
.cv-mode-panel h2,
.cv-services-panel h2 {
  color: var(--muted-soft);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.cv-mode-panel {
  display: grid;
  gap: 0.65rem;
}

.cv-mode-panel h2 {
  margin: 0;
}

.cv-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.cv-mode-button {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 42px;
  border: 1px solid rgba(214, 195, 163, 0.15);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.14);
  color: rgba(247, 245, 242, 0.76);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 750;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.cv-mode-button:hover,
.cv-mode-button.is-active {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: rgba(214, 195, 163, 0.14);
  color: var(--gold);
}

.cv-mode-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  opacity: 0.92;
}

.cv-weather-tab {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  justify-content: flex-start;
  min-height: 42px;
  padding: 0 0.75rem;
  color: var(--gold);
  font-weight: 750;
}

.cv-inline-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.cv-services-panel {
  display: grid;
  gap: 0.65rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.cv-services-panel h2 {
  margin: 0;
}

.cv-service-grid {
  display: grid;
  gap: 0.55rem;
}

.cv-service-button {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  min-height: 42px;
  padding: 0 0.75rem;
  border: 1px solid rgba(214, 195, 163, 0.15);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.14);
  color: rgba(247, 245, 242, 0.76);
  cursor: pointer;
  font-weight: 750;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.cv-service-button:hover,
.cv-service-button.is-active {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: rgba(214, 195, 163, 0.14);
  color: var(--gold);
}

.cv-google-pin {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: white;
  font-size: 0.62rem;
  font-weight: 900;
}

.cv-google-pin.lodging {
  background: #4285f4;
}

.cv-google-pin.pharmacy {
  background: #db4437;
}

.cv-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 0.5rem;
}

.cv-search input,
.cv-search button,
.cv-action-button {
  height: 44px;
  border: 1px solid rgba(214, 195, 163, 0.15);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.14);
  color: var(--cream);
}

.cv-search input {
  min-width: 0;
  padding: 0 0.8rem;
}

.cv-search input::placeholder {
  color: rgba(247, 245, 242, 0.38);
}

.cv-search button,
.cv-action-button {
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.cv-search button:hover,
.cv-action-button:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: rgba(247, 245, 242, 0.045);
}

.cv-actions {
  display: grid;
  gap: 0.65rem;
}

.cv-action-button {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: flex-start;
  padding: 0 0.85rem;
  font-weight: 700;
}

.primary-action {
  border-color: rgba(214, 195, 163, 0.45);
  background: rgba(214, 195, 163, 0.16);
  color: var(--gold);
}

.cv-action-button.is-ready {
  border-color: rgba(214, 195, 163, 0.32);
  color: var(--gold);
}

.cv-layer-list {
  display: grid;
  gap: 0.65rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.cv-layer-list h2 {
  margin: 0;
}

.cv-switch-row {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  min-height: 30px;
  color: rgba(247, 245, 242, 0.76);
  font-size: 0.9rem;
}

.cv-switch-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}

.cv-metrics-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.cv-metric {
  min-height: 92px;
  border: 1px solid rgba(214, 195, 163, 0.12);
  border-radius: 16px;
  padding: 0.85rem;
  background: rgba(0, 0, 0, 0.12);
}

.cv-metric strong {
  display: block;
  color: var(--gold);
  font-size: clamp(1.45rem, 2vw, 2.2rem);
  font-weight: 650;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.cv-metric span {
  display: block;
  margin-top: 0.55rem;
  color: rgba(247, 245, 242, 0.46);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.cv-status {
  margin: auto 0 0;
  color: rgba(247, 245, 242, 0.56);
  font-size: 0.78rem;
  font-weight: 300;
  line-height: 1.55;
}

.cv-route-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.cv-route-card {
  border: 1px solid rgba(214, 195, 163, 0.15);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.12);
  transition: transform 0.28s ease, border-color 0.28s ease, background 0.28s ease;
}

.cv-route-card {
  min-height: 190px;
  padding: 1rem;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.cv-route-card:hover,
.cv-route-card.is-active {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  background: rgba(247, 245, 242, 0.045);
}

.cv-route-card.is-active {
  box-shadow: inset 0 0 0 1px rgba(214, 195, 163, 0.3);
}

.cv-route-card small {
  color: var(--gold);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cv-route-card h3 {
  margin: 0.8rem 0 0.85rem;
  font-family: "Didot", "Bodoni Moda", serif;
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1;
}

.cv-route-card p {
  margin: 0;
  color: rgba(247, 245, 242, 0.5);
  font-size: 0.76rem;
  line-height: 1.45;
}

.cv-route-data {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 1rem;
  border-top: 1px solid rgba(214, 195, 163, 0.13);
  padding-top: 0.65rem;
  color: rgba(247, 245, 242, 0.5);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cv-route-data strong {
  color: var(--gold);
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.cv-tech-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 1rem;
}

.cv-profile-card,
.cv-tech-metrics-card {
  border: 1px solid rgba(214, 195, 163, 0.15);
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.14);
}

.cv-profile-card {
  display: grid;
  align-items: center;
  padding: 0.85rem 1rem 0.75rem;
}

.cv-profile-inner {
  width: 97.5%;
  margin: 0 auto;
}

.cv-profile-wrap {
  position: relative;
  height: clamp(230px, 24vw, 310px);
  overflow: hidden;
  touch-action: pan-y;
}

.cv-profile-wrap svg {
  display: block;
  width: 100%;
  height: 100%;
}

.cv-axis-label {
  fill: rgba(247, 245, 242, 0.54);
  font-family: Inter, sans-serif;
  font-size: 3.15px;
  font-weight: 700;
}

.cv-axis-label-gold {
  fill: rgba(214, 195, 163, 0.9);
}

.cv-grid {
  stroke: rgba(247, 245, 242, 0.12);
  stroke-width: 0.34;
  vector-effect: non-scaling-stroke;
}

.cv-grid-strong {
  stroke: rgba(247, 245, 242, 0.22);
  stroke-width: 0.42;
  vector-effect: non-scaling-stroke;
}

.cv-route-area {
  fill: rgba(214, 195, 163, 0.04);
}

.cv-profile-route-line {
  animation: cvRouteDraw 1.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards 0.2s;
  fill: none;
  stroke: var(--gold);
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 0.62;
  vector-effect: non-scaling-stroke;
}

.cv-ref-dot {
  fill: #041615;
  stroke: rgba(214, 195, 163, 0.75);
  stroke-width: 0.52;
  vector-effect: non-scaling-stroke;
}

.cv-ref-dot-key {
  fill: #041615;
  stroke: var(--gold);
  stroke-width: 0.82;
  vector-effect: non-scaling-stroke;
}

.cv-hover-line {
  opacity: 0;
  stroke: rgba(247, 245, 242, 0.42);
  stroke-width: 0.42;
  vector-effect: non-scaling-stroke;
}

.cv-hover-dot {
  opacity: 0;
  fill: var(--gold);
  stroke: #041615;
  stroke-width: 0.65;
  vector-effect: non-scaling-stroke;
}

.cv-profile-wrap.is-active .cv-hover-line,
.cv-profile-wrap.is-active .cv-hover-dot {
  opacity: 1;
}

.cv-tooltip {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 165px;
  padding: 0.62rem 0.72rem;
  border: 1px solid rgba(247, 245, 242, 0.18);
  border-radius: 12px;
  background: rgba(4, 22, 21, 0.88);
  backdrop-filter: blur(14px);
  color: rgba(247, 245, 242, 0.72);
  font-size: 0.72rem;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: 0.18s ease;
}

.cv-profile-wrap.is-active .cv-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.cv-tooltip strong {
  display: block;
  margin-bottom: 0.12rem;
  color: var(--cream);
  font-size: 0.82rem;
}

.cv-tech-metrics-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  padding: 1rem;
}

.cv-tech-metric {
  min-height: 118px;
  padding: 1rem;
  border: 1px solid rgba(214, 195, 163, 0.12);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.12);
}

.cv-tech-metric strong {
  display: block;
  color: var(--gold);
  font-size: clamp(1.8rem, 2.7vw, 2.85rem);
  font-weight: 650;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.cv-tech-metric span {
  display: block;
  margin-top: 0.55rem;
  color: rgba(247, 245, 242, 0.46);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.cv-resource-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
}

.cv-resource-card {
  min-height: 160px;
  padding: 1.05rem;
  border: 1px solid rgba(214, 195, 163, 0.15);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.12);
  transition: transform 0.28s ease, border-color 0.28s ease, background 0.28s ease;
}

.cv-resource-card:hover {
  transform: translateY(-4px);
  border-color: rgba(214, 195, 163, 0.42);
  background: rgba(247, 245, 242, 0.045);
}

.cv-resource-card strong {
  display: block;
  margin-bottom: 1rem;
  color: var(--gold);
  font-size: 2.05rem;
  font-weight: 550;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.cv-resource-card span {
  display: block;
  color: rgba(247, 245, 242, 0.76);
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.14;
}

.cv-resource-card p {
  margin: 0.85rem 0 0;
  color: rgba(247, 245, 242, 0.48);
  font-size: 0.72rem;
  line-height: 1.45;
}

.cv-stage-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.65rem;
  align-items: stretch;
}

.cv-stage-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 145px;
  height: 100%;
  padding: 0.85rem;
  border: 1px solid rgba(214, 195, 163, 0.15);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.12);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.cv-stage-card:hover {
  transform: translateY(-3px);
  border-color: rgba(214, 195, 163, 0.42);
}

.cv-stage-card small {
  color: var(--gold);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cv-stage-card h3 {
  margin: 0.65rem 0 0.75rem;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.cv-stage-data {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(214, 195, 163, 0.13);
  color: rgba(247, 245, 242, 0.5);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cv-stage-data strong {
  color: var(--gold);
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.cv-db-note {
  max-width: 900px;
  margin: 1.25rem auto 0;
  color: rgba(247, 245, 242, 0.42);
  font-size: 0.78rem;
  font-weight: 300;
  line-height: 1.6;
  text-align: center;
}

@keyframes cvRouteDraw {
  to {
    stroke-dashoffset: 0;
  }
}

.marker-popup {
  display: grid;
  gap: 0.5rem;
  min-width: 190px;
}

.marker-popup button {
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: var(--green);
  color: var(--gold);
  cursor: pointer;
}

.cv-route-line {
  filter: drop-shadow(0 0 7px var(--route-glow));
}

.cv-service-marker span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid white;
  border-radius: 50% 50% 50% 0;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.34);
  color: white;
  font-size: 0.75rem;
  font-weight: 900;
  transform: rotate(-45deg);
}

.cv-service-marker span::before {
  display: block;
  transform: rotate(45deg);
}

.cv-service-marker .lodging {
  background: #4285f4;
}

.cv-service-marker .lodging {
  color: transparent;
}

.cv-service-marker .lodging::before {
  content: "H";
  color: #fff;
}

.cv-service-marker .pharmacy {
  background: #db4437;
  color: transparent;
}

.cv-service-marker .pharmacy::before {
  content: "+";
  color: #fff;
  font-size: 1rem;
}

.cv-service-marker .restaurant {
  background: #7b1e2b;
}

.cv-service-marker .restaurant img {
  width: 18px;
  height: 18px;
  transform: rotate(45deg);
}

.cv-user-location-marker {
  background: transparent;
}

.cv-user-location-marker span {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  margin: 6px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #4285f4;
  box-shadow: 0 0 0 7px rgba(66, 133, 244, 0.18), 0 8px 18px rgba(0, 0, 0, 0.32);
}

.cv-user-location-marker span::after {
  content: "";
  position: absolute;
  inset: -13px;
  border: 1px solid rgba(66, 133, 244, 0.32);
  border-radius: 50%;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: rgba(4, 22, 21, 0.95);
  color: var(--cream);
}

.leaflet-popup-content-wrapper {
  border: 1px solid rgba(247, 245, 242, 0.18);
  border-radius: 14px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

.leaflet-control-zoom {
  overflow: hidden;
  border: 1px solid rgba(214, 195, 163, 0.28) !important;
  border-radius: 14px !important;
  background: rgba(4, 22, 21, 0.88);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.leaflet-control-zoom a {
  width: 42px !important;
  height: 42px !important;
  border: 0 !important;
  background: rgba(4, 22, 21, 0.88) !important;
  color: var(--gold) !important;
  font-family: Inter, sans-serif;
  font-size: 1.35rem !important;
  font-weight: 500;
  line-height: 42px !important;
  text-shadow: none;
}

.leaflet-control-zoom a:first-child {
  border-bottom: 1px solid rgba(214, 195, 163, 0.18) !important;
}

.leaflet-control-zoom a:hover,
.leaflet-control-zoom a:focus {
  background: rgba(214, 195, 163, 0.14) !important;
  color: var(--cream) !important;
}

.leaflet-control-attribution {
  color: var(--green);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1080px) {
  .cv-db-head,
  .cv-map-section,
  .cv-tech-grid {
    grid-template-columns: 1fr;
  }

  .cv-profile-inner {
    width: 100%;
  }

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

  .cv-stage-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .cv-dashboard {
    padding: 3.2rem 1rem;
  }

  .cv-db-title {
    font-size: clamp(3rem, 15vw, 5rem);
  }

  .cv-control-card,
  .cv-map-card,
  .cv-db-section {
    border-radius: 20px;
  }

  .cv-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cv-action-button {
    justify-content: center;
    gap: 0.35rem;
    padding: 0 0.5rem;
    font-size: 0.82rem;
  }

  .cv-map-card,
  #map {
    min-height: 62vh;
  }

  .cv-weather-overlay {
    inset: 1rem;
  }

  .cv-profile-wrap {
    height: 260px;
  }

  .cv-tech-metrics-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cv-resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cv-stage-strip {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    scroll-snap-type: x mandatory;
  }

  .cv-stage-card {
    flex: 0 0 72%;
    scroll-snap-align: start;
  }

  .cv-db-note {
    text-align: left;
  }

  .cv-db-section-title {
    display: block;
  }

  .cv-db-section-title span {
    display: block;
    margin-top: 0.4rem;
  }

  .cv-route-grid {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    scroll-snap-type: x mandatory;
  }

  .cv-route-card {
    flex: 0 0 74%;
    scroll-snap-align: start;
  }
}

@media (max-width: 420px) {
  .cv-metrics-card,
  .cv-tech-metrics-card,
  .cv-resource-grid {
    grid-template-columns: 1fr;
  }

  .cv-route-card {
    flex-basis: 84%;
  }

  .cv-stage-card {
    flex-basis: 84%;
  }
}
