:root {
  --bg: #dff1fb;
  --panel: #ffffff;
  --panel-soft: #f7fbff;
  --ink: #081a38;
  --muted: #61708a;
  --line: #d7e2ef;
  --brand: #0b63bd;
  --brand-2: #22a4d8;
  --brand-3: #063963;
  --success: #27885d;
  --danger: #b6493c;
  --shadow: 0 18px 52px rgba(5, 49, 92, 0.16);
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

html[data-theme="dark"] {
  --bg: #061421;
  --panel: #0f2235;
  --panel-soft: #132b42;
  --ink: #f1f7ff;
  --muted: #b3c6da;
  --line: #2a435d;
  --brand: #6bb6ff;
  --brand-2: #6ee7f2;
  --brand-3: #03101c;
  --success: #7ee0ac;
  --danger: #ff9b8f;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
  color-scheme: dark;
}

html,
body,
.home-screen,
.app-shell,
.site-footer,
button,
canvas,
svg,
img {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

input,
textarea {
  -webkit-user-select: text;
  user-select: text;
}

img,
svg,
canvas {
  -webkit-user-drag: none;
  user-drag: none;
}

@media print {
  body > * {
    display: none !important;
  }

  body::before {
    display: block;
    padding: 40px;
    color: #081a38;
    content: "Terrasis content is protected for online use.";
    font: 700 18px/1.4 system-ui, sans-serif;
  }
}

/* Critical Leaflet fallback: keeps map panes and tiles positioned even if the CDN CSS is unavailable. */
.leaflet-container {
  position: relative;
  overflow: hidden;
  background: #dfe7eb;
  outline-offset: 1px;
  touch-action: pan-x pan-y;
}

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
  position: absolute;
  left: 0;
  top: 0;
}

.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
  user-select: none;
  -webkit-user-drag: none;
}

.leaflet-tile {
  border: 0;
  filter: inherit;
  visibility: hidden;
}

.leaflet-tile-loaded {
  visibility: inherit;
}

.leaflet-pane {
  z-index: 400;
}

.leaflet-tile-pane {
  z-index: 200;
}

.leaflet-overlay-pane {
  z-index: 400;
}

.leaflet-shadow-pane {
  z-index: 500;
}

.leaflet-marker-pane {
  z-index: 600;
}

.leaflet-tooltip-pane {
  z-index: 650;
}

.leaflet-popup-pane {
  z-index: 700;
}

.leaflet-control {
  position: relative;
  z-index: 800;
  pointer-events: auto;
}

.leaflet-top,
.leaflet-bottom {
  position: absolute;
  z-index: 1000;
  pointer-events: none;
}

.leaflet-top {
  top: 0;
}

.leaflet-right {
  right: 0;
}

.leaflet-bottom {
  bottom: 0;
}

.leaflet-left {
  left: 0;
}

.leaflet-control-attribution {
  margin: 0 2px 2px 0 !important;
  padding: 1px 4px !important;
  border-radius: 4px 0 0 0;
  background: rgba(255, 255, 255, 0.78) !important;
  color: #4b647b;
  font-size: 8px !important;
  line-height: 1.05 !important;
  white-space: nowrap;
}

.leaflet-control-attribution a {
  color: #294c6e;
  font-size: inherit;
}

.leaflet-control-zoom {
  margin: 18px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(5, 49, 92, 0.18);
}

.leaflet-control-zoom a {
  display: block;
  width: 42px;
  height: 42px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--brand);
  line-height: 42px;
  text-align: center;
  text-decoration: none;
  font-weight: 650;
}

.leaflet-control-zoom a:first-child {
  border-radius: 6px 6px 0 0;
}

.leaflet-control-zoom a:last-child {
  border-bottom: 0;
  border-radius: 0 0 6px 6px;
}

.leaflet-interactive {
  cursor: pointer;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow: auto;
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.7), rgba(219, 241, 252, 0.9)),
    url("assets/terrasis-dashboard-theme.png") left center / cover fixed;
  color: var(--ink);
}

html[data-theme="dark"] body {
  background:
    linear-gradient(120deg, rgba(3, 10, 18, 0.92), rgba(5, 20, 34, 0.94)),
    url("assets/terrasis-dashboard-theme.png") left center / cover fixed;
  color: var(--ink);
}

body.auth-open {
  overflow: hidden;
}

body.terrain-3d-open {
  overflow: hidden;
}

body.terrain-3d-open::before {
  position: fixed;
  inset: 0;
  z-index: 3190;
  background: rgba(2, 16, 30, 0.46);
  backdrop-filter: blur(5px);
  content: "";
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

button,
input {
  font: inherit;
}

h1,
h2,
h3,
strong,
b,
th {
  font-weight: 650;
}

[hidden] {
  display: none !important;
}

button {
  cursor: pointer;
}

.theme-toggle {
  display: inline-grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  color: var(--brand);
  box-shadow: 0 12px 26px rgba(7, 95, 198, 0.12);
}

.theme-toggle svg {
  grid-area: 1 / 1;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

html[data-theme="light"] .theme-icon-sun,
html[data-theme="dark"] .theme-icon-moon {
  opacity: 0;
  transform: rotate(-40deg) scale(0.72);
}

html[data-theme="light"] .theme-icon-moon,
html[data-theme="dark"] .theme-icon-sun {
  opacity: 1;
  transform: rotate(0) scale(1);
}

.home-screen {
  min-height: 100vh;
  padding: 38px 54px;
  background:
    radial-gradient(circle at 82% 24%, rgba(120, 188, 239, 0.22), transparent 35%),
    linear-gradient(135deg, #ffffff 0%, #f8fbff 48%, #e9f5ff 100%);
  color: #061735;
  overflow: hidden;
}

html[data-theme="dark"] .home-screen {
  background:
    radial-gradient(circle at 78% 24%, rgba(53, 132, 195, 0.16), transparent 34%),
    linear-gradient(135deg, #071624 0%, #0b1d2e 54%, #0f263b 100%);
  color: var(--ink);
}

html[data-theme="dark"] .home-brand strong,
html[data-theme="dark"] .home-copy h1,
html[data-theme="dark"] .home-links a,
html[data-theme="dark"] .home-links button,
html[data-theme="dark"] .home-features strong,
html[data-theme="dark"] .brand-title,
html[data-theme="dark"] .brand h1,
html[data-theme="dark"] .workspace h2,
html[data-theme="dark"] .workspace h3,
html[data-theme="dark"] .map-control-dock strong,
html[data-theme="dark"] .map-control-dock button span,
html[data-theme="dark"] .panel-title,
html[data-theme="dark"] .terrain-readout strong,
html[data-theme="dark"] .terrain-boundary strong,
html[data-theme="dark"] th {
  color: var(--ink);
}

html[data-theme="dark"] .home-brand span,
html[data-theme="dark"] .home-copy p,
html[data-theme="dark"] .home-features span,
html[data-theme="dark"] .home-stats span,
html[data-theme="dark"] .footer-brand-block span,
html[data-theme="dark"] .footer-actions span,
html[data-theme="dark"] .footer-metric span,
html[data-theme="dark"] .analysis-dialog-heading small,
html[data-theme="dark"] .analysis-report-panel span,
html[data-theme="dark"] .analysis-report-panel dt,
html[data-theme="dark"] .analysis-report-panel ul,
html[data-theme="dark"] .brand p,
html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .field span,
html[data-theme="dark"] .metrics span,
html[data-theme="dark"] #selectionStatus,
html[data-theme="dark"] .measure-result,
html[data-theme="dark"] td {
  color: var(--muted);
}

html[data-theme="dark"] .home-copy h1 span,
html[data-theme="dark"] .home-stats strong,
html[data-theme="dark"] .footer-metric strong,
html[data-theme="dark"] .analysis-dialog-heading h2,
html[data-theme="dark"] .analysis-report-panel strong,
html[data-theme="dark"] .analysis-report-panel dd,
html[data-theme="dark"] .workspace-nav button.active,
html[data-theme="dark"] .home-links a.active,
html[data-theme="dark"] .home-links button.active {
  color: var(--brand);
}

html[data-theme="dark"] .home-visual img {
  border-radius: 18px;
  background: #0b1d2e;
  box-shadow: 0 0 0 1px rgba(107, 182, 255, 0.18), 0 28px 54px rgba(0, 0, 0, 0.34);
  filter: brightness(0.82) saturate(0.94);
}

.home-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 34px;
  max-width: 1540px;
  margin: 0 auto;
}

.home-brand {
  display: inline-block;
  align-items: center;
  text-decoration: none;
}

.home-brand-logo {
  display: block;
  width: clamp(196px, 20vw, 278px);
  height: auto;
  object-fit: contain;
}

.home-brand-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.home-brand-icon img,
.brand-mark img,
.auth-logo-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.home-brand strong {
  display: block;
  color: #0c3a6f;
  font-size: 2.55rem;
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: 0;
}

.home-brand span {
  color: #173862;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.home-links {
  display: flex;
  justify-content: center;
  gap: 28px;
}

.home-links a,
.home-links button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #0a1731;
  font-weight: 650;
  text-decoration: none;
}

.home-links a.active,
.home-links button.active {
  border-color: #0b63bd;
}

.home-actions,
.home-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.home-login-button,
.home-primary-button,
.home-secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 14px;
  padding: 0 24px;
  font-weight: 650;
  text-decoration: none;
}

.home-login-button {
  border: 1px solid #bfd6f2;
  background: #fff;
  color: #0b63bd;
}

.home-primary-button {
  border: 0;
  background: linear-gradient(135deg, #0b63bd, #0f77d4);
  color: #fff;
  box-shadow: 0 14px 28px rgba(11, 99, 189, 0.24);
}

.home-secondary-button {
  border: 1px solid #0b63bd;
  background: rgba(255, 255, 255, 0.82);
  color: #0b63bd;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(420px, 0.86fr) minmax(520px, 1.14fr);
  align-items: center;
  gap: 22px;
  max-width: 1540px;
  min-height: calc(100vh - 132px);
  margin: 0 auto;
}

.home-copy h1 {
  max-width: 720px;
  margin: 0;
  color: #061735;
  font-size: clamp(2.35rem, 3.7vw, 3.6rem);
  font-weight: 650;
  line-height: 1.16;
  letter-spacing: 0;
}

.home-copy h1 span {
  display: block;
  color: #0b63bd;
}

.home-copy p {
  max-width: 610px;
  margin: 24px 0 30px;
  color: #40506a;
  font-size: 1.14rem;
  line-height: 1.55;
}

.home-features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  max-width: 730px;
  margin-top: 50px;
}

.home-features div {
  display: grid;
  gap: 7px;
}

.home-features strong {
  color: #061735;
  font-size: 0.94rem;
}

.home-features span {
  color: #40506a;
  font-size: 0.86rem;
  line-height: 1.45;
}

.home-stats {
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) repeat(4, minmax(70px, 1fr));
  align-items: center;
  gap: 12px;
  max-width: 100%;
  margin-top: 58px;
  padding: 20px 22px;
  border: 1px solid rgba(195, 216, 237, 0.75);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 60px rgba(21, 90, 148, 0.13);
}

.home-stats div {
  display: grid;
  gap: 4px;
  justify-items: center;
  min-width: 0;
  border-left: 1px solid #d7e2ef;
}

.home-stats strong {
  color: #0b63bd;
  font-size: 1.45rem;
}

.home-stats span {
  color: #40506a;
  font-size: 0.9rem;
}

.home-visual {
  position: relative;
  min-height: 650px;
}

.home-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 28px 44px rgba(13, 69, 112, 0.22));
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(420px, 1.8fr) auto;
  align-items: center;
  gap: 18px;
  width: min(1280px, calc(100vw - 64px));
  margin: 0 auto 36px;
  padding: 16px 18px;
  border: 1px solid rgba(190, 215, 237, 0.84);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 20px 56px rgba(5, 49, 92, 0.13);
  backdrop-filter: blur(14px);
}

.footer-brand-block,
.footer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand-block {
  display: grid;
  gap: 4px;
}

.footer-brand-logo {
  display: block;
  width: min(208px, 100%);
  height: auto;
  object-fit: contain;
  object-position: left center;
}

.brand-logo-dark {
  display: none;
}

html[data-theme="dark"] .brand-logo-light {
  display: none;
}

html[data-theme="dark"] .brand-logo-dark {
  display: block;
}

.footer-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
}

.footer-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer-brand-block strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
}

.footer-brand-block span,
.footer-actions span,
.footer-metric span {
  color: #5a6982;
  font-size: 0.82rem;
}

.footer-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(74px, 1fr));
  gap: 10px;
}

.footer-metric {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #dbe7f3;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f5fbff);
}

.footer-metric strong {
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: #0b63bd;
  font-size: 1.2rem;
  line-height: 1.15;
}

.footer-metric small {
  color: #6a7890;
  font-size: 0.78rem;
  font-weight: 650;
}

.rating-metric strong {
  color: #d9892b;
}

.footer-rating-stars {
  display: block;
  margin-top: 3px;
  color: #d9892b;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
}

.footer-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.footer-actions button,
.feedback-submit-row button {
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #0d83dd, #075fc6);
  color: #ffffff;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(7, 95, 198, 0.24);
}

.footer-actions button {
  padding: 10px 16px;
}

.footer-actions a {
  border: 1px solid #d9e7f4;
  border-radius: 10px;
  background: #f7fbff;
  padding: 9px 12px;
  color: #385471;
  font-size: 0.74rem;
  font-weight: 750;
  text-decoration: none;
}

.feedback-submit-row button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.feedback-panel {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(5, 24, 48, 0.42);
  backdrop-filter: blur(8px);
}

.feedback-panel[hidden] {
  display: none;
}

.analysis-dialog-panel {
  position: fixed;
  inset: 0;
  z-index: 5100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4, 18, 36, 0.58);
  backdrop-filter: blur(10px);
}

.analysis-dialog-panel[hidden] {
  display: none;
}

.feedback-card {
  position: relative;
  width: min(520px, 100%);
  border: 1px solid rgba(193, 216, 238, 0.95);
  border-radius: 20px;
  background:
    radial-gradient(circle at 90% 10%, rgba(34, 164, 216, 0.14), transparent 36%),
    #ffffff;
  box-shadow: 0 28px 80px rgba(2, 31, 62, 0.28);
  padding: 28px;
}

.analysis-dialog-card {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(900px, 100%);
  max-height: min(90vh, 820px);
  overflow: auto;
  overflow-anchor: none;
  border: 1px solid rgba(193, 216, 238, 0.95);
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 176, 46, 0.18), transparent 30%),
    radial-gradient(circle at 6% 0%, rgba(11, 99, 189, 0.16), transparent 34%),
    #ffffff;
  box-shadow: 0 32px 90px rgba(2, 31, 62, 0.34);
  padding: 26px;
}

.analysis-dialog-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding-right: 44px;
}

.analysis-dialog-heading > span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(11, 99, 189, 0.14), rgba(255, 176, 46, 0.16));
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.analysis-dialog-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.45rem, 3vw, 2.1rem);
}

.analysis-dialog-heading small,
.analysis-report-panel span {
  color: #5b6a84;
  font-size: 0.9rem;
  line-height: 1.45;
}

.analysis-access-note {
  border: 1px solid rgba(255, 176, 46, 0.32);
  border-radius: 14px;
  background: rgba(255, 176, 46, 0.12);
  color: #63440a;
  padding: 10px 12px;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.45;
}

.analysis-parameter-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.analysis-parameter-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 750;
}

.analysis-field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.analysis-field-heading > span {
  min-width: 0;
}

.analysis-pick-button {
  flex: 0 0 auto;
  border: 1px solid rgba(11, 99, 189, 0.28);
  border-radius: 999px;
  background: rgba(11, 99, 189, 0.08);
  color: var(--brand);
  cursor: pointer;
  font-size: 0.64rem;
  font-weight: 850;
  padding: 4px 8px;
}

.analysis-parameter-form input,
.analysis-parameter-form select,
.analysis-parameter-form textarea {
  width: 100%;
  border: 1px solid #d7e2ef;
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  outline: none;
  padding: 10px 12px;
}

.analysis-parameter-form textarea,
.analysis-parameter-form label.wide {
  grid-column: 1 / -1;
}

.analysis-parameter-form input:focus,
.analysis-parameter-form select:focus,
.analysis-parameter-form textarea:focus {
  border-color: #0b63bd;
  box-shadow: 0 0 0 4px rgba(11, 99, 189, 0.12);
}

.analysis-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.analysis-dialog-actions button {
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  padding: 11px 14px;
}

.analysis-primary-action {
  border: 0;
  background: linear-gradient(135deg, #0d83dd, #075fc6);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(7, 95, 198, 0.24);
}

.analysis-run-action {
  background: linear-gradient(135deg, #0b9d72, #087a8c);
}

.analysis-secondary-action {
  border: 1px solid #c9dced;
  background: rgba(247, 251, 255, 0.92);
  color: var(--ink);
}

.analysis-dialog-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.54;
}

.analysis-progress {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(11, 99, 189, 0.18);
  border-radius: 14px;
  background: rgba(235, 246, 255, 0.82);
  padding: 10px 12px;
}

.analysis-progress[hidden] {
  display: none;
}

.analysis-progress span {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.analysis-progress div {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: rgba(11, 99, 189, 0.12);
}

.analysis-progress i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0b9d72, #20b7ff, #ffb02e);
  transition: width 180ms ease;
}

.analysis-report-panel {
  display: grid;
  gap: 10px;
  min-height: 96px;
  border: 1px solid #dbe7f3;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(247, 251, 255, 0.94), rgba(255, 255, 255, 0.92));
  padding: 14px;
}

.analysis-report-panel strong {
  color: var(--ink);
}

.analysis-report-panel dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.analysis-report-panel div {
  border: 1px solid rgba(201, 220, 237, 0.78);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  padding: 9px 10px;
}

.analysis-report-panel dt {
  color: #60708a;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.analysis-report-panel dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 850;
}

.analysis-report-panel ul {
  margin: 0;
  padding-left: 18px;
  color: #34445c;
  font-size: 0.88rem;
  line-height: 1.5;
}

.analysis-point-marker {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d83dd, #075fc6);
  box-shadow: 0 10px 22px rgba(3, 36, 72, 0.28);
  color: #ffffff;
}

.analysis-point-marker span {
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.analysis-point-marker.marker-rf {
  background: linear-gradient(135deg, #0b9d72, #087a8c);
}

.analysis-point-marker.marker-los {
  background: linear-gradient(135deg, #ff9d2e, #c24a2c);
}

.analysis-point-marker.marker-bi {
  background: linear-gradient(135deg, #7357ff, #0d83dd);
}

.analysis-point-marker.marker-flight {
  background: linear-gradient(135deg, #111827, #0d83dd);
}

.leaflet-container.analysis-picking {
  cursor: crosshair;
}

.feedback-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #d7e2ef;
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
}

.feedback-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.feedback-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.75rem;
}

.feedback-heading span,
.feedback-submit-row span {
  color: #5b6a84;
  font-size: 0.92rem;
}

.navigation-privacy-card {
  display: grid;
  gap: 14px;
  width: min(650px, 100%);
  max-height: min(92vh, 760px);
  overflow: auto;
}

.navigation-privacy-card .feedback-heading {
  margin-bottom: 0;
  padding-right: 36px;
}

.navigation-privacy-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px 12px 12px 29px;
  border: 1px solid #d8e8e0;
  border-radius: 14px;
  background: #f2fbf6;
  color: #294c43;
  font-size: 0.83rem;
  line-height: 1.45;
}

.navigation-consent-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #d5e4f2;
  border-radius: 12px;
  padding: 11px 12px;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 650;
}

.navigation-consent-check input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #087c69;
}

.navigation-privacy-status {
  color: #55708b;
  font-size: 0.82rem;
  font-weight: 650;
}

.navigation-privacy-status.error {
  color: #a32d28;
}

.navigation-privacy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.navigation-privacy-actions button {
  min-height: 42px;
  border: 1px solid #d5e4f2;
  border-radius: 11px;
  background: #f1f8ff;
  padding: 10px 14px;
  color: #0b559e;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.navigation-privacy-actions .directions-primary {
  border-color: #087c69;
  background: linear-gradient(135deg, #08967b, #0877ae);
  color: #fff;
}

.navigation-privacy-actions .navigation-delete-data {
  border-color: rgba(196, 48, 45, 0.3);
  background: #fff4f3;
  color: #a32d28;
}

.feedback-form,
.feedback-form label {
  display: grid;
  gap: 10px;
}

.feedback-form label span {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 650;
}

.feedback-form textarea,
.feedback-form input {
  width: 100%;
  border: 1px solid #d7e2ef;
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  outline: none;
  padding: 12px 14px;
}

.feedback-form textarea:focus,
.feedback-form input:focus {
  border-color: #0b63bd;
  box-shadow: 0 0 0 4px rgba(11, 99, 189, 0.12);
}

.star-picker {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.star-picker button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #d7e2ef;
  border-radius: 12px;
  background: #f7fbff;
  color: #9aa9bb;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.star-picker button.active {
  border-color: rgba(217, 137, 43, 0.42);
  background: #fff7ea;
  color: #d9892b;
  box-shadow: 0 10px 22px rgba(217, 137, 43, 0.18);
}

.feedback-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.feedback-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 4px;
}

.feedback-submit-row button {
  flex: 0 0 auto;
  padding: 12px 16px;
}

.app-shell {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  width: min(1680px, calc(100vw - 28px));
  height: calc(100vh - 28px);
  min-height: 0;
  margin: 14px auto;
  border: 1px solid rgba(190, 215, 237, 0.82);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 24px 70px rgba(4, 43, 82, 0.2);
  backdrop-filter: blur(12px);
  transition: grid-template-columns 180ms ease, width 180ms ease, height 180ms ease, margin 180ms ease, border-radius 180ms ease;
}

body.left-menu-collapsed .app-shell,
body.map-maximized .app-shell {
  grid-template-columns: 0 minmax(0, 1fr);
}

body.left-menu-collapsed .sidebar,
body.map-maximized .sidebar {
  min-width: 0;
  width: 0;
  padding-right: 0;
  padding-left: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

body.map-maximized .app-shell {
  width: 100vw;
  height: 100vh;
  height: 100svh;
  margin: 0;
  border: 0;
  border-radius: 0;
}

body.map-maximized .workspace {
  grid-template-rows: 0 minmax(0, 1fr) 0;
}

body.map-maximized .topbar,
body.map-maximized .data-dock {
  min-height: 0;
  height: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

body.map-maximized .map-stage {
  border: 0;
  border-radius: 0;
}

body.map-maximized:not(.left-menu-collapsed) .sidebar {
  position: fixed;
  top: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 1700;
  width: min(322px, calc(100vw - 28px));
  height: auto;
  padding: 14px 10px;
  border-radius: 18px;
  opacity: 1;
  pointer-events: auto;
  box-shadow: 0 24px 64px rgba(5, 49, 92, 0.28);
}

html[data-theme="dark"] .app-shell,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .home-stats,
html[data-theme="dark"] .footer-metric,
html[data-theme="dark"] .metrics div,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .plans-panel,
html[data-theme="dark"] .data-dock,
html[data-theme="dark"] .map-control-dock,
html[data-theme="dark"] .feedback-card,
html[data-theme="dark"] .analysis-dialog-card,
html[data-theme="dark"] .analysis-report-panel,
html[data-theme="dark"] .analysis-report-panel div,
html[data-theme="dark"] .analysis-progress,
html[data-theme="dark"] .account-view,
html[data-theme="dark"] .terrain-boundary,
html[data-theme="dark"] .terrain-readout,
html[data-theme="dark"] .weather-alert {
  border-color: var(--line);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .sidebar {
  background: linear-gradient(180deg, #061c31, #03101c);
}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] th,
html[data-theme="dark"] .sidebar .panel {
  background: color-mix(in srgb, var(--panel) 96%, transparent);
}

html[data-theme="dark"] .home-login-button,
html[data-theme="dark"] .home-secondary-button,
html[data-theme="dark"] .secondary-button,
html[data-theme="dark"] .icon-button,
html[data-theme="dark"] .tool-button,
html[data-theme="dark"] .layer-delete,
html[data-theme="dark"] .drawing-actions button,
html[data-theme="dark"] .terrain-boundary-actions button,
html[data-theme="dark"] .auth-close-button,
html[data-theme="dark"] .auth-logout-button,
html[data-theme="dark"] .auth-social button,
html[data-theme="dark"] .segmented,
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .analysis-secondary-action,
html[data-theme="dark"] .analysis-pick-button {
  border-color: var(--line);
  background: var(--panel-soft);
  color: var(--ink);
}

html[data-theme="dark"] .primary-button,
html[data-theme="dark"] .home-primary-button,
html[data-theme="dark"] .search-box button,
html[data-theme="dark"] .auth-form button,
html[data-theme="dark"] .plan-card button,
html[data-theme="dark"] .footer-actions button,
html[data-theme="dark"] .feedback-submit-row button,
html[data-theme="dark"] .terrain-output-button {
  background: linear-gradient(135deg, #1e8bff, #1262ca);
  color: #ffffff;
}

html[data-theme="dark"] .footer-actions a {
  border-color: var(--line);
  background: var(--panel-soft);
  color: var(--ink);
}

html[data-theme="dark"] .navigation-privacy-list,
html[data-theme="dark"] .navigation-consent-check {
  border-color: rgba(120, 171, 219, 0.24);
  background: rgba(107, 182, 255, 0.08);
  color: #dbefff;
}

html[data-theme="dark"] .navigation-privacy-status {
  color: #b5cfe7;
}

html[data-theme="dark"] .navigation-privacy-actions button {
  border-color: rgba(120, 171, 219, 0.3);
  background: rgba(107, 182, 255, 0.14);
  color: #dbefff;
}

html[data-theme="dark"] .navigation-privacy-actions .directions-primary {
  border-color: #0a8d78;
  background: linear-gradient(135deg, #0a8d78, #137dda);
  color: #ffffff;
}

html[data-theme="dark"] .navigation-privacy-actions .navigation-delete-data {
  border-color: rgba(255, 127, 121, 0.34);
  background: rgba(255, 127, 121, 0.12);
  color: #ffd3cf;
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .search-box input,
html[data-theme="dark"] .feedback-form input,
html[data-theme="dark"] .feedback-form textarea,
html[data-theme="dark"] .analysis-parameter-form input,
html[data-theme="dark"] .analysis-parameter-form select,
html[data-theme="dark"] .analysis-parameter-form textarea,
html[data-theme="dark"] .auth-form input,
html[data-theme="dark"] .field input,
html[data-theme="dark"] .robot-form input,
html[data-theme="dark"] .robot-form select {
  border-color: var(--line);
  background: #081928;
  color: var(--ink);
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #8ba7bf;
}

html[data-theme="dark"] .segmented button,
html[data-theme="dark"] .workspace-nav button,
html[data-theme="dark"] .basemap button {
  color: var(--muted);
}

html[data-theme="dark"] .segmented button.active,
html[data-theme="dark"] .basemap button.active {
  background: #0b3152;
  color: var(--ink);
}

html[data-theme="dark"] .leaflet-control-zoom a,
html[data-theme="dark"] .coordinate-box {
  border-color: var(--line);
  background: var(--panel);
  color: var(--brand);
}

html[data-theme="dark"] .leaflet-control-attribution {
  background: rgba(8, 19, 27, 0.76) !important;
  color: #9ebbd1;
}

html[data-theme="dark"] .leaflet-control-attribution a {
  color: #b8d8f3;
}

html[data-theme="dark"] .map-overlay,
html[data-theme="dark"] .sun-map-status {
  border-color: rgba(120, 171, 219, 0.38);
  background: rgba(8, 19, 27, 0.94);
  color: #eaf4ff;
}

html[data-theme="dark"] .layer-row,
html[data-theme="dark"] .operation-layer-row {
  border-color: rgba(120, 171, 219, 0.32);
  background: rgba(9, 29, 47, 0.96);
  color: #eef7ff;
}

html[data-theme="dark"] .operation-layer-row {
  background: rgba(11, 42, 66, 0.96);
}

html[data-theme="dark"] .layer-meta strong {
  color: #f4f9ff;
}

html[data-theme="dark"] .layer-meta span {
  color: #b8cce0;
}

html[data-theme="dark"] .layer-delete {
  border-color: rgba(120, 171, 219, 0.32);
  background: #102a44;
  color: #ffd5d1;
}

html[data-theme="dark"] .premium-analysis-panel {
  background:
    linear-gradient(155deg, rgba(8, 31, 50, 0.96), rgba(34, 28, 10, 0.78)),
    var(--panel);
}

html[data-theme="dark"] .premium-badge {
  border-color: rgba(255, 195, 77, 0.34);
  background: rgba(255, 195, 77, 0.12);
  color: #ffd98a;
}

html[data-theme="dark"] .premium-feature-card {
  border-color: rgba(120, 171, 219, 0.3);
  background: rgba(8, 25, 40, 0.88);
  color: #f1f7ff;
}

html[data-theme="dark"] .premium-feature-card small,
html[data-theme="dark"] .premium-analysis-copy {
  color: #b3c6da;
}

html[data-theme="dark"] .premium-feature-card span {
  background: rgba(107, 182, 255, 0.14);
  color: #8fcaff;
}

html[data-theme="dark"] .premium-analysis-status {
  background: rgba(255, 195, 77, 0.1);
  color: #ffe4a6;
}

.sidebar {
  height: 100%;
  border-right: 0;
  background: linear-gradient(180deg, #063963, #042a4b);
  padding: 14px 10px;
  overflow: auto;
  transition: width 180ms ease, opacity 180ms ease, padding 180ms ease, transform 180ms ease;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 4px 20px;
  color: #ffffff;
}

.workspace-brand-logo {
  display: block;
  width: min(100%, 278px);
  height: auto;
  padding: 5px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.98);
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-size: 1.45rem;
  font-weight: 650;
}

.brand-title,
.brand h1,
.brand p,
.workspace h2,
.workspace h3,
.eyebrow {
  margin: 0;
}

.brand-title,
.brand h1 {
  display: block;
  color: #ffffff;
  font-size: 1.45rem;
  font-weight: 750;
  line-height: 1;
}

.brand-title span,
.brand h1 span {
  color: var(--brand-2);
  font-size: 0.8rem;
  margin-left: 2px;
  vertical-align: top;
}

.brand p,
.eyebrow,
.panel-title,
.field span,
.metrics span,
#selectionStatus,
.measure-result,
td {
  color: var(--muted);
}

.panel {
  border: 1px solid rgba(212, 226, 240, 0.78);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 10px 26px rgba(0, 31, 61, 0.12);
}

.panel-title,
.dock-header,
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-title {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.sidebar .panel {
  box-shadow: none;
  background: rgba(255, 255, 255, 0.98);
}

.icon-button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.field {
  display: grid;
  gap: 7px;
  font-size: 0.86rem;
}

.field input,
.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.field input {
  min-height: 40px;
  padding: 8px 10px;
}

.field input:focus,
.search-box input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 110, 105, 0.14);
}

.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.metrics div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f7faf9;
}

.metrics strong {
  display: block;
  font-size: 1.35rem;
}

.account-view {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7fbff;
}

.plans-panel {
  position: fixed;
  right: 18px;
  z-index: 2500;
  width: min(360px, calc(100vw - 28px));
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.2);
}

.auth-panel {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 3000;
  width: auto;
  min-height: 100vh;
  padding: 28px;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.92), rgba(216, 239, 252, 0.82)),
    url("assets/terrasis-dashboard-theme.png") center / cover fixed;
  box-shadow: none;
}

.auth-panel.open {
  display: grid;
  place-items: center;
}

.plans-panel {
  top: 410px;
  display: none;
  max-height: calc(100vh - 430px);
  overflow: auto;
}

.plans-panel.open:not([hidden]) {
  display: block;
}

.account-view strong {
  font-size: 0.9rem;
}

.account-view span,
.auth-status,
.plan-card span,
.plan-card li {
  color: var(--muted);
  font-size: 0.78rem;
}

.auth-modal {
  display: grid;
  grid-template-columns: minmax(390px, 480px) minmax(520px, 760px);
  width: min(1280px, calc(100vw - 56px));
  min-height: min(820px, calc(100vh - 56px));
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 28px 80px rgba(5, 49, 92, 0.22);
}

.auth-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 50px 42px 34px;
  background: rgba(255, 255, 255, 0.97);
}

.auth-close-button,
.auth-logout-button {
  border: 1px solid #c9d9ec;
  border-radius: 12px;
  background: #fff;
  color: #0a2348;
  font-weight: 650;
  cursor: pointer;
}

.auth-close-button {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
}

.auth-logo {
  display: grid;
  align-items: center;
  justify-content: center;
  color: #062d63;
  text-align: left;
}

.auth-brand-logo {
  display: block;
  width: min(100%, 470px);
  height: auto;
  margin: 0 auto;
}

.auth-logo-mark {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.auth-logo strong {
  display: block;
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  line-height: 0.95;
}

.auth-logo span {
  display: block;
  margin-top: 8px;
  color: #0b63bd;
  font-weight: 650;
}

.auth-heading {
  text-align: center;
}

.auth-heading h2 {
  margin: 0;
  color: #071a38;
  font-size: 1.8rem;
}

.auth-heading p {
  margin: 8px 0 0;
  color: #61708a;
  font-size: 1rem;
}

.auth-tabs {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 0;
}

.auth-tabs button:last-child {
  grid-column: auto;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 0;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: #16294a;
  font-size: 0.92rem;
  font-weight: 650;
}

.auth-form input {
  min-height: 54px;
  border: 1px solid #d5e0ee;
  border-radius: 12px;
  padding: 12px 16px;
  color: #071a38;
  font: inherit;
  font-weight: 650;
  outline: none;
}

.auth-form input:focus {
  border-color: #0b63bd;
  box-shadow: 0 0 0 4px rgba(11, 99, 189, 0.12);
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #263a5a;
  font-size: 0.9rem;
}

.auth-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: inherit;
}

.auth-options input {
  width: 18px;
  height: 18px;
  min-height: 0;
  accent-color: #0b63bd;
}

.auth-options button,
.auth-switch-copy button {
  border: 0;
  background: transparent;
  color: #0b63bd;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.auth-form button,
.plan-card button {
  min-height: 54px;
  border: 0;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(11, 99, 189, 0.24);
}

.auth-form .auth-options button {
  min-height: auto;
  border-radius: 0;
  background: transparent;
  color: #0b63bd;
  box-shadow: none;
  font-weight: 650;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  color: #61708a;
  font-size: 0.88rem;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  background: #d7e2ef;
  content: "";
}

.auth-social {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-social button {
  min-height: 50px;
  border: 1px solid #d5e0ee;
  border-radius: 12px;
  background: #fff;
  color: #152643;
  font-weight: 650;
  cursor: pointer;
}

.auth-switch-copy {
  margin: 0;
  color: #263a5a;
  text-align: center;
}

.auth-status {
  min-height: 22px;
  margin-top: 0;
  text-align: center;
}

.auth-status.error {
  color: #9f2d25;
}

.auth-logout-button {
  min-height: 42px;
}

.auth-visual-panel {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: 100%;
  padding: 56px 52px 34px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(237, 248, 255, 0.78) 0%, rgba(237, 248, 255, 0.18) 42%, rgba(237, 248, 255, 0) 72%),
    url("assets/terrasis-auth-scene.webp") center right / cover;
}

.auth-scene-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
}

.auth-visual-panel::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(90deg, rgba(237, 248, 255, 0.86) 0%, rgba(237, 248, 255, 0.28) 44%, rgba(237, 248, 255, 0.02) 100%);
  content: "";
}

.auth-visual-copy {
  position: relative;
  z-index: 1;
  max-width: 460px;
}

.auth-visual-copy h3 {
  margin: 0;
  color: #071a38;
  font-size: clamp(2.1rem, 4vw, 3.35rem);
  line-height: 1.08;
}

.auth-visual-copy p {
  margin: 18px 0 0;
  color: #152b50;
  font-size: 1.18rem;
  line-height: 1.55;
}

.auth-floating-icons {
  position: absolute;
  z-index: 1;
  right: 28px;
  top: 36%;
  display: grid;
  gap: 14px;
}

.auth-floating-icons span {
  display: grid;
  min-width: 72px;
  min-height: 56px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #0b63bd;
  font-size: 0.75rem;
  font-weight: 650;
  box-shadow: 0 14px 32px rgba(6, 42, 78, 0.16);
}

.auth-benefits {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 48px rgba(6, 42, 78, 0.16);
}

.auth-benefits div {
  display: grid;
  gap: 8px;
  min-height: 132px;
  align-content: center;
  padding: 20px 16px;
  border-left: 1px solid #d7e2ef;
  text-align: center;
}

.auth-benefits div:first-child {
  border-left: 0;
}

.auth-benefits strong {
  color: #071a38;
  font-size: 0.95rem;
}

.auth-benefits span {
  color: #405372;
  font-size: 0.82rem;
  line-height: 1.45;
}

html[data-theme="dark"] .auth-panel {
  background:
    linear-gradient(115deg, rgba(4, 15, 27, 0.93), rgba(7, 29, 47, 0.9)),
    url("assets/terrasis-dashboard-theme.png") center / cover fixed;
}

html[data-theme="dark"] .auth-modal {
  border: 1px solid rgba(120, 171, 219, 0.22);
  background: rgba(6, 20, 33, 0.9);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

html[data-theme="dark"] .auth-logo,
html[data-theme="dark"] .auth-heading h2,
html[data-theme="dark"] .auth-form label,
html[data-theme="dark"] .auth-options,
html[data-theme="dark"] .auth-switch-copy {
  color: #f1f7ff;
}

html[data-theme="dark"] .auth-logo span,
html[data-theme="dark"] .auth-options button,
html[data-theme="dark"] .auth-switch-copy button {
  color: #67b8ff;
}

html[data-theme="dark"] .auth-form .auth-options button {
  min-height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #67b8ff;
  box-shadow: none;
}

html[data-theme="dark"] .auth-heading p,
html[data-theme="dark"] .auth-divider,
html[data-theme="dark"] .auth-status {
  color: #b3c6da;
}

html[data-theme="dark"] .auth-divider::before,
html[data-theme="dark"] .auth-divider::after {
  background: #2a435d;
}

html[data-theme="dark"] .auth-status.error {
  color: #ff9b8f;
}

.plan-list {
  display: grid;
  gap: 9px;
}

.plan-access-note {
  display: grid;
  gap: 4px;
  border: 1px solid #d8e5f2;
  border-radius: 10px;
  padding: 10px;
  background: #f7fbff;
}

.plan-access-note strong {
  color: #0d2b4c;
  font-size: 0.86rem;
}

.plan-access-note span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.35;
}

.plan-access-note.active {
  border-color: rgba(22, 128, 84, 0.34);
  background: #effbf4;
}

.plan-access-note.locked {
  border-color: rgba(205, 145, 40, 0.36);
  background: #fff8ea;
}

.plan-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfd;
}

.plan-card strong {
  font-size: 0.95rem;
}

.plan-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.35;
}

.plan-card ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 16px;
}

.plan-card.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 110, 105, 0.14);
}

.plan-card.active button {
  background: #87908d;
  cursor: default;
}

.segmented,
.tool-grid {
  display: grid;
  gap: 8px;
}

.segmented {
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 4px;
  background: #f0f6fb;
}

.segmented button {
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 0.86rem;
}

.segmented button:last-child {
  grid-column: 1 / -1;
}

.weather-segmented {
  grid-template-columns: repeat(3, 1fr);
}

.weather-segmented button:last-child {
  grid-column: auto;
}

.segmented button.active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 5px 16px rgba(11, 99, 189, 0.16);
}

.auth-panel .auth-tabs {
  grid-template-columns: repeat(3, 1fr);
}

.auth-panel .auth-tabs button:last-child {
  grid-column: auto;
}

.layer-list {
  display: grid;
  gap: 9px;
}

.layer-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #d9e6f2;
  border-radius: 13px;
  padding: 10px;
  background: #fbfdff;
}

.operation-layer-row {
  background: #f7fbfa;
  border-style: dashed;
}

.sky-path-day-control {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 176, 46, 0.32);
  border-radius: 12px;
  background:
    radial-gradient(circle at 12% 50%, rgba(255, 208, 103, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(255, 248, 215, 0.86), rgba(238, 248, 255, 0.86));
}

.sky-path-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 750;
}

.sky-path-day-header strong {
  color: #9d5f00;
  font-size: 0.76rem;
}

.sky-path-day-control input[type="range"] {
  width: 100%;
  accent-color: #ffb02e;
}

.sky-path-day-control > span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 650;
}

.layer-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 2px solid currentColor;
  background: color-mix(in srgb, currentColor 22%, transparent);
}

.layer-meta strong {
  display: block;
  font-size: 0.91rem;
}

.layer-meta span {
  color: var(--muted);
  font-size: 0.78rem;
}

.layer-actions {
  display: inline-grid;
  grid-template-columns: 38px 28px;
  align-items: center;
  gap: 7px;
}

.layer-delete {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #9f2d25;
  font-size: 0.72rem;
  font-weight: 650;
  cursor: pointer;
}

.layer-delete:hover {
  border-color: #b6493c;
  background: #fff5f3;
}

.toggle {
  position: relative;
  width: 38px;
  height: 22px;
}

.toggle input {
  position: absolute;
  opacity: 0;
}

.toggle span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #cfd8de;
}

.toggle span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
}

.toggle input:checked + span {
  background: var(--brand);
}

.toggle input:checked + span::after {
  transform: translateX(16px);
}

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

.tool-button {
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  padding: 10px;
}

.tool-button.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 99, 189, 0.14);
}

.tool-button span {
  display: block;
  color: var(--brand);
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1;
}

.tool-button strong {
  display: block;
  margin-top: 8px;
  font-size: 0.86rem;
  font-weight: 650;
}

.tool-button.locked,
.secondary-button.locked {
  opacity: 0.56;
}

.tool-button.locked::after,
.secondary-button.locked::after {
  content: " locked";
  display: inline-block;
  margin-left: 4px;
  color: #8a5b00;
  font-size: 0.64rem;
  font-weight: 650;
}

.premium-analysis-panel {
  background:
    linear-gradient(155deg, rgba(238, 248, 255, 0.98), rgba(255, 249, 229, 0.94)),
    #ffffff;
}

.premium-badge {
  border: 1px solid rgba(255, 176, 46, 0.45);
  border-radius: 999px;
  background: rgba(255, 176, 46, 0.14);
  color: #925800;
  padding: 4px 8px;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.premium-analysis-copy {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

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

.premium-feature-card {
  display: grid;
  gap: 5px;
  min-height: 104px;
  border: 1px solid rgba(194, 216, 237, 0.95);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  padding: 10px;
  text-align: left;
  cursor: pointer;
}

.premium-feature-card span {
  width: max-content;
  border-radius: 8px;
  background: rgba(11, 99, 189, 0.1);
  color: var(--brand);
  padding: 4px 6px;
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.premium-feature-card strong {
  font-size: 0.82rem;
  line-height: 1.2;
}

.premium-feature-card small {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.35;
}

.premium-feature-card:hover,
.premium-feature-card:focus-visible,
.premium-feature-card.active {
  border-color: rgba(11, 99, 189, 0.5);
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 99, 189, 0.12);
}

.premium-feature-card.locked {
  opacity: 0.72;
}

.premium-analysis-status {
  margin-top: 12px;
  border-left: 3px solid #ffb02e;
  border-radius: 10px;
  background: rgba(255, 176, 46, 0.1);
  color: #5e420c;
  padding: 9px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.45;
}

.favorite-places-status,
.admin-live-copy,
.admin-live-status {
  margin: 0;
  color: #58718a;
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1.45;
}

.favorite-places-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.favorite-places-form[hidden] {
  display: none;
}

.favorite-coordinate {
  overflow: hidden;
  border-radius: 8px;
  background: #edf5fd;
  padding: 6px 8px;
  color: #49647f;
  font-size: 0.66rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-actions,
.admin-live-actions {
  display: flex;
  gap: 6px;
}

.favorite-actions button,
.admin-live-actions button {
  flex: 1;
  min-height: 31px;
  border: 1px solid #c7def4;
  border-radius: 9px;
  background: #f4faff;
  color: #075bb0;
  font-size: 0.67rem;
  font-weight: 800;
  cursor: pointer;
}

.favorite-actions button:last-child,
.admin-live-actions button:first-child.is-active {
  border-color: #0b6fe6;
  background: #0b6fe6;
  color: #fff;
}

.favorite-places-list,
.admin-live-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  max-height: 230px;
  overflow-y: auto;
}

.favorite-place-item,
.admin-live-item {
  display: grid;
  gap: 3px;
  border: 1px solid #d8e6f3;
  border-radius: 10px;
  background: #f7fbff;
  padding: 7px;
}

.favorite-place-item header,
.admin-live-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.favorite-place-item strong,
.admin-live-item strong {
  overflow: hidden;
  color: #0d2946;
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-place-item span,
.admin-live-item span {
  color: #5a748e;
  font-size: 0.62rem;
  font-weight: 650;
}

.favorite-place-item button,
.admin-live-item button {
  min-height: 25px;
  border: 1px solid #d4e4f3;
  border-radius: 7px;
  background: #fff;
  padding: 0 7px;
  color: #0b559e;
  font-size: 0.62rem;
  font-weight: 800;
  cursor: pointer;
}

.favorite-place-item .favorite-remove {
  color: #993f38;
}

.admin-live-count {
  display: inline-grid;
  min-width: 27px;
  min-height: 27px;
  place-items: center;
  border-radius: 999px;
  background: #e9f4ff;
  color: #075bb0;
  font-size: 0.72rem;
}

.admin-live-copy {
  margin-bottom: 9px;
}

.admin-live-status {
  margin-top: 9px;
}

.admin-correction-message {
  display: grid;
  gap: 5px;
  margin-bottom: 8px;
  color: #49647f;
  font-size: 0.66rem;
  font-weight: 750;
}

.admin-correction-message textarea {
  min-height: 72px;
  resize: vertical;
  border: 1px solid #d4e4f3;
  border-radius: 9px;
  background: #f7fbff;
  padding: 8px;
  color: #0d2946;
  font: inherit;
}

.admin-correction-upload {
  display: grid;
  gap: 5px;
  margin-bottom: 9px;
  color: #49647f;
  font-size: 0.66rem;
  font-weight: 750;
}

.admin-correction-upload input {
  width: 100%;
  font-size: 0.64rem;
}

.admin-correction-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-height: 380px;
  overflow-y: auto;
}

.admin-correction-item {
  display: grid;
  gap: 7px;
  border: 1px solid #d8e6f3;
  border-radius: 10px;
  background: #f7fbff;
  padding: 8px;
  color: #0d2946;
  font-size: 0.66rem;
}

.admin-correction-item header,
.admin-correction-actions {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.admin-correction-item p {
  margin: 0;
  white-space: pre-wrap;
}

.admin-correction-item img {
  max-width: 100%;
  max-height: 160px;
  border-radius: 8px;
  object-fit: contain;
}

.admin-correction-status-pill {
  border-radius: 999px;
  background: #e9f4ff;
  padding: 3px 7px;
  color: #075bb0;
  font-weight: 800;
}

.admin-correction-replies {
  display: grid;
  gap: 4px;
}

.admin-correction-reply {
  border-left: 2px solid #0b6fe6;
  padding-left: 7px;
  color: #5a748e;
}

.admin-correction-actions button {
  min-height: 27px;
  border: 1px solid #d4e4f3;
  border-radius: 7px;
  background: #fff;
  color: #0b559e;
  font-size: 0.62rem;
  font-weight: 800;
}

.admin-user-marker {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #d74641;
  color: #fff;
  box-shadow: 0 6px 18px rgba(5, 49, 92, 0.34);
  font-size: 0.9rem;
  font-weight: 900;
}

.admin-user-marker span {
  display: inline-block;
  transform: rotate(var(--admin-heading, 0deg));
}

.admin-live-trail {
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(12, 83, 150, 0.3));
}

html[data-theme="dark"] .favorite-places-status,
html[data-theme="dark"] .admin-live-copy,
html[data-theme="dark"] .admin-live-status {
  color: #aec9df;
}

html[data-theme="dark"] .favorite-coordinate,
html[data-theme="dark"] .favorite-place-item,
html[data-theme="dark"] .admin-live-item,
html[data-theme="dark"] .admin-correction-item,
html[data-theme="dark"] .admin-correction-message textarea {
  border-color: rgba(125, 170, 204, 0.3);
  background: rgba(7, 30, 51, 0.58);
  color: #d9eaff;
}

html[data-theme="dark"] .favorite-place-item strong,
html[data-theme="dark"] .admin-live-item strong,
html[data-theme="dark"] .admin-correction-item {
  color: #f4f9ff;
}

.control-stack {
  display: grid;
  gap: 12px;
}

.range-field {
  display: grid;
  gap: 8px;
}

.range-field span {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.84rem;
}

.range-field strong {
  color: var(--ink);
}

.range-field input {
  accent-color: var(--brand);
}

.robot-form {
  display: grid;
  gap: 10px;
}

.robot-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.robot-form input,
.robot-form select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px 9px;
  color: var(--ink);
}

.inline-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.robot-route-status {
  min-height: 42px;
  margin-top: 12px;
  border-left: 3px solid var(--brand);
  padding-left: 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.telemetry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.telemetry-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  padding: 9px;
}

.telemetry-grid span,
.waypoint-list span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
}

.telemetry-grid strong {
  display: block;
  margin-top: 2px;
  font-size: 0.9rem;
}

.waypoint-list {
  display: grid;
  gap: 7px;
  max-height: 124px;
  margin: 12px 0 0;
  padding-left: 20px;
  overflow: auto;
  color: var(--ink);
  font-size: 0.82rem;
}

.waypoint-list li {
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.drawing-list {
  display: grid;
  gap: 8px;
  max-height: 190px;
  overflow: auto;
}

.drawing-list > span {
  color: var(--muted);
  font-size: 0.82rem;
}

.drawing-item {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

.drawing-item strong {
  font-size: 0.84rem;
}

.drawing-item span {
  color: var(--muted);
  font-size: 0.74rem;
}

.drawing-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.drawing-actions button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 650;
  cursor: pointer;
}

.drawing-actions button:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.measure-result {
  min-height: 38px;
  margin-top: 12px;
  border-left: 3px solid var(--brand-2);
  padding-left: 10px;
  font-size: 0.86rem;
}

.weather-readout {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  border-left: 3px solid var(--brand);
  padding-left: 10px;
}

.weather-readout strong {
  font-size: 0.92rem;
}

.weather-readout span,
.weather-alerts,
.weather-legend {
  color: var(--muted);
  font-size: 0.82rem;
}

.terrain-controls {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.terrain-controls label {
  display: grid;
  grid-template-columns: 72px minmax(72px, 1fr) 46px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.terrain-controls input {
  width: 100%;
}

.terrain-controls span {
  color: var(--ink);
  text-align: right;
}

.terrain-boundary {
  display: grid;
  gap: 6px;
  padding: 10px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

.terrain-boundary strong {
  font-size: 0.88rem;
}

.terrain-boundary span,
.terrain-progress > span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.terrain-boundary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.terrain-boundary-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 650;
  cursor: pointer;
}

.terrain-boundary-actions button:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.terrain-progress {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.terrain-progress[hidden] {
  display: none;
}

.terrain-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #d8e4e3;
}

.terrain-progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--orange));
  transition: width 0.16s ease;
}

.terrain-readout {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  border-left: 3px solid var(--brand-2);
  padding-left: 10px;
}

.terrain-readout strong {
  font-size: 0.92rem;
}

.terrain-readout span,
.terrain-legend {
  color: var(--muted);
  font-size: 0.82rem;
}

.weather-legend {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.terrain-legend {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.terrain-output-button {
  display: inline-grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  margin-top: 12px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #0b63bd, #1496d4);
  color: #fff;
  font-weight: 650;
  box-shadow: 0 12px 24px rgba(11, 99, 189, 0.2);
}

.terrain-output-button span {
  display: grid;
  gap: 2px;
  text-align: left;
}

.terrain-output-button strong {
  font-size: 0.9rem;
  line-height: 1.15;
}

.terrain-output-button small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
}

.terrain-output-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.legend-ramp {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #22c55e, #facc15, #f97316, #dc2626);
}

.legend-labels {
  display: flex;
  justify-content: space-between;
}

.weather-alerts {
  display: grid;
  gap: 6px;
  max-height: 120px;
  margin-top: 12px;
  overflow: auto;
}

.weather-alert {
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-2);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) 124px;
  height: 100%;
  min-width: 0;
  min-height: 0;
  background: #f6fbff;
}

.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  padding: 10px 14px;
}

.eyebrow {
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.workspace h2 {
  margin-top: 2px;
  font-size: 1.1rem;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.workspace-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.workspace-nav button {
  min-height: 30px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #071a38;
  font-weight: 650;
  padding: 0 3px;
}

.workspace-nav button.active {
  border-color: var(--brand);
  color: var(--brand);
}

.primary-button,
.secondary-button,
.search-box button {
  min-height: 34px;
  border-radius: 8px;
  padding: 6px 12px;
  font-weight: 650;
}

.primary-button,
.search-box button {
  border: 1px solid var(--brand);
  background: linear-gradient(135deg, #0b63bd, #1685dc);
  color: #fff;
}

.secondary-button {
  border: 1px solid #d3e2f0;
  background: #fff;
  color: var(--ink);
}

.secondary-button.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 110, 105, 0.14);
}

.map-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 8px solid #eef6fc;
  border-radius: 0 0 18px 0;
}

.map-stage:fullscreen {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  border: 0;
  border-radius: 0;
  background: #081a38;
}

.map-stage:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  border: 0;
  border-radius: 0;
  background: #081a38;
}

.map-stage:fullscreen #map {
  border-radius: 0;
}

.map-stage:-webkit-full-screen #map {
  border-radius: 0;
}

#map {
  width: 100%;
  height: 100%;
  border-radius: 16px;
}

body.navigation-focus #map,
body.navigation-focus .weather-canvas,
body.navigation-focus .day-night-canvas,
body.navigation-focus .terrain-analysis-canvas {
  position: absolute;
  inset: auto;
  left: 50%;
  top: 50%;
  width: var(--navigation-map-overscan-size, 110vmax);
  height: var(--navigation-map-overscan-size, 110vmax);
  border-radius: 0;
}

body.navigation-focus #map {
  transform: translate(-50%, -50%);
}

body.navigation-focus .weather-canvas,
body.navigation-focus .day-night-canvas,
body.navigation-focus .terrain-analysis-canvas {
  transform: translate(-50%, -50%);
}

.weather-canvas {
  position: absolute;
  inset: 0;
  z-index: 430;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.day-night-canvas {
  position: absolute;
  inset: 0;
  z-index: 410;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.terrain-analysis-canvas {
  position: absolute;
  inset: 0;
  z-index: 420;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.map-brand-watermark {
  position: absolute;
  top: 54%;
  left: clamp(62px, 12%, 144px);
  z-index: 405;
  width: clamp(190px, 31%, 332px);
  height: auto;
  opacity: 0.16;
  pointer-events: none;
  user-select: none;
  filter: saturate(0.82);
  transform: translateY(-50%);
}

body.navigation-focus .map-brand-watermark {
  display: none;
}

@media (max-width: 600px) {
  .map-brand-watermark {
    top: 57%;
    left: calc(28px + env(safe-area-inset-left, 0px));
    width: clamp(154px, 49vw, 194px);
    opacity: 0.15;
  }
}

@media (orientation: landscape) and (max-height: 600px) {
  .map-brand-watermark {
    top: 57%;
    left: calc(48px + env(safe-area-inset-left, 0px));
    width: clamp(136px, 20vw, 168px);
    opacity: 0.15;
  }
}

body.navigation-heading-up #map .leaflet-map-pane > .leaflet-pane:not(.leaflet-tooltip-pane):not(.leaflet-popup-pane) {
  transform: rotate(var(--navigation-map-rotation, 0deg));
  transform-origin: var(--navigation-map-origin-x, 50%) var(--navigation-map-origin-y, 50%);
  transition: transform 260ms linear;
  backface-visibility: hidden;
  will-change: transform;
}

body.navigation-focus.navigation-heading-up .weather-canvas,
body.navigation-focus.navigation-heading-up .day-night-canvas,
body.navigation-focus.navigation-heading-up .terrain-analysis-canvas {
  transform: translate(-50%, -50%) rotate(var(--navigation-map-rotation, 0deg));
  transform-origin: center;
  transition: transform 260ms linear;
}

body.navigation-manual-bearing #map .leaflet-map-pane > .leaflet-pane:not(.leaflet-tooltip-pane):not(.leaflet-popup-pane),
body.navigation-focus.navigation-manual-bearing .weather-canvas,
body.navigation-focus.navigation-manual-bearing .day-night-canvas,
body.navigation-focus.navigation-manual-bearing .terrain-analysis-canvas {
  transition-duration: 35ms;
}

.map-stage.navigation-camera-resizing #map .leaflet-map-pane > .leaflet-pane:not(.leaflet-tooltip-pane):not(.leaflet-popup-pane),
.map-stage.navigation-camera-resizing .weather-canvas,
.map-stage.navigation-camera-resizing .day-night-canvas,
.map-stage.navigation-camera-resizing .terrain-analysis-canvas {
  transition: none;
}

.map-overlay {
  position: absolute;
  z-index: 600;
  border: 1px solid rgba(194, 216, 237, 0.8);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.map-view-toolbar {
  position: absolute;
  top: 64px;
  left: 58px;
  z-index: 640;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: min(620px, calc(100% - 210px));
  padding: 6px;
  border: 1px solid rgba(194, 216, 237, 0.82);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 34px rgba(5, 49, 92, 0.16);
  backdrop-filter: blur(12px);
}

.map-view-toolbar button {
  min-height: 34px;
  border: 1px solid rgba(194, 216, 237, 0.9);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--brand);
  padding: 6px 10px;
  font-size: 0.76rem;
  font-weight: 850;
  white-space: nowrap;
}

.map-view-toolbar button:hover,
.map-view-toolbar button:focus-visible,
.map-view-toolbar button.is-active {
  background: linear-gradient(135deg, rgba(11, 99, 189, 0.12), rgba(34, 164, 216, 0.12));
  color: #063963;
}

html[data-theme="dark"] .map-view-toolbar {
  border-color: rgba(120, 171, 219, 0.34);
  background: rgba(8, 19, 27, 0.9);
}

html[data-theme="dark"] .map-view-toolbar button {
  border-color: rgba(120, 171, 219, 0.26);
  background: rgba(255, 255, 255, 0.08);
  color: var(--brand);
}

html[data-theme="dark"] .map-view-toolbar button:hover,
html[data-theme="dark"] .map-view-toolbar button:focus-visible,
html[data-theme="dark"] .map-view-toolbar button.is-active {
  background: rgba(107, 182, 255, 0.15);
  color: #f1f7ff;
}

.search-box {
  top: 12px;
  left: 58px;
  right: 12px;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 6px;
  max-width: 700px;
  padding: 6px;
}

.search-results {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  max-height: 220px;
  overflow: auto;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.search-result {
  display: grid;
  gap: 3px;
  border: 0;
  border-radius: 7px;
  background: #f5f8f9;
  color: var(--ink);
  padding: 9px;
  text-align: left;
}

.search-result:hover,
.search-result:focus {
  background: rgba(11, 110, 105, 0.1);
}

.search-result strong {
  font-size: 0.82rem;
}

.search-result span {
  color: var(--muted);
  font-size: 0.74rem;
}

.search-box input {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #d7e2ef;
  border-radius: 12px;
}

.coordinate-box {
  left: 14px;
  right: auto;
  bottom: 14px;
  padding: 8px 12px;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 650;
}

.map-viewing-scale {
  position: absolute;
  right: 4px;
  bottom: 14px;
  z-index: 1120;
  display: grid;
  justify-items: end;
  gap: 5px;
  padding: 7px 9px 8px;
  border: 1px solid rgba(194, 216, 237, 0.88);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(5, 49, 92, 0.15);
  pointer-events: none;
}

body:not(.right-menu-collapsed) .map-viewing-scale {
  right: 4px;
}

body.directions-open .map-viewing-scale {
  right: min(446px, calc(100% - 122px));
}

.map-viewing-scale strong {
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.map-viewing-scale span {
  display: block;
  width: 76px;
  height: 7px;
  border-right: 2px solid #0a65bf;
  border-bottom: 2px solid #0a65bf;
  border-left: 2px solid #0a65bf;
  transition: width 140ms ease;
}

.sun-map-status {
  left: 14px;
  right: auto;
  bottom: 58px;
  max-width: min(360px, calc(100% - 36px));
  padding: 8px 12px;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.35;
}

.map-hover-place-label {
  position: absolute;
  z-index: 1080;
  display: grid;
  gap: 3px;
  min-width: 158px;
  max-width: min(300px, calc(100% - 28px));
  padding: 10px 13px 11px;
  border: 1px solid rgba(28, 108, 185, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 16px 34px rgba(5, 49, 92, 0.2);
  color: var(--ink);
  pointer-events: none;
}

.map-hover-place-label[hidden] {
  display: none;
}

.map-hover-place-label span {
  color: #0a65bf;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.18;
}

.map-hover-place-label strong {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
}

.map-hover-place-label small {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sun-marker-tooltip {
  border: 1px solid rgba(255, 212, 106, 0.56);
  border-radius: 12px;
  background: rgba(8, 26, 56, 0.88);
  color: #fff6d0;
  box-shadow: 0 12px 28px rgba(5, 49, 92, 0.22);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  max-width: 280px;
  padding: 8px 12px;
  white-space: normal;
  line-height: 1.4;
  text-align: left;
}

.sun-marker-tooltip::before {
  display: none;
}

.city-night-tooltip {
  border: 1px solid rgba(139, 185, 255, 0.42);
  border-radius: 12px;
  background: rgba(5, 17, 34, 0.9);
  color: #edf4ff;
  box-shadow: 0 12px 28px rgba(5, 49, 92, 0.18);
  font-size: 0.74rem;
  font-weight: 650;
  max-width: 280px;
  padding: 8px 12px;
  white-space: normal;
  line-height: 1.4;
  text-align: left;
}

.city-night-tooltip::before {
  display: none;
}

.map-live-panel {
  position: absolute;
  right: 12px;
  top: 238px;
  z-index: 1100;
  display: grid;
  grid-template-columns: repeat(2, 38px);
  width: 95px;
  gap: 5px;
  padding: 6px;
  border: 1px solid rgba(194, 216, 237, 0.86);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 48px rgba(5, 49, 92, 0.18);
  backdrop-filter: blur(12px);
}

body.right-menu-collapsed .map-live-panel {
  display: none;
}

.screen-reader-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.map-live-action {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #d5e4f2;
  border-radius: 13px;
  background: linear-gradient(135deg, #f5fbff, #fff9e8);
  color: #0b63bd;
  font: inherit;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.map-live-action > span:first-child {
  font-size: 1rem;
  font-weight: 850;
}

.map-live-action:hover,
.map-live-action:focus-visible {
  border-color: rgba(11, 99, 189, 0.42);
  outline: none;
  transform: translateY(-1px);
}

.map-live-action.is-active {
  border-color: #0871d3;
  background: linear-gradient(145deg, #0b7cde, #0864bc);
  color: #ffffff;
  box-shadow: 0 7px 15px rgba(8, 100, 188, 0.3);
}

.map-live-action-fixed {
  cursor: default;
  background: rgba(11, 99, 189, 0.09);
}

.map-live-action-fixed > span:first-child {
  font-size: 0.78rem;
}

.map-traffic-action > span:first-child {
  font-size: 0.62rem;
  letter-spacing: -0.03em;
}

.map-live-action::after {
  position: absolute;
  top: 50%;
  right: calc(100% + 8px);
  padding: 6px 9px;
  border-radius: 8px;
  background: #082846;
  color: #ffffff;
  content: attr(data-tip);
  font-size: 0.67rem;
  font-weight: 750;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(4px, -50%);
  transition: opacity 130ms ease, transform 130ms ease;
  white-space: nowrap;
}

.map-live-action:hover::after,
.map-live-action:focus-visible::after {
  opacity: 1;
  transform: translate(0, -50%);
}

.map-live-slider {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(255, 176, 46, 0.32);
  border-radius: 13px;
  background:
    radial-gradient(circle at 12% 50%, rgba(255, 208, 103, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(255, 248, 215, 0.9), rgba(238, 248, 255, 0.9));
}

.map-live-slider div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.74rem;
  font-weight: 800;
}

.map-live-slider strong {
  color: #9d5f00;
}

.map-live-slider input {
  width: 100%;
  accent-color: #ffb02e;
}

.map-live-slider > span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.map-live-year-popover {
  position: absolute;
  top: 51px;
  right: calc(100% + 10px);
  width: 208px;
  box-shadow: 0 14px 32px rgba(5, 49, 92, 0.18);
}

.map-live-year-popover[hidden] {
  display: none;
}

.map-directions-popover {
  position: absolute;
  right: calc(100% + 10px);
  bottom: 0;
  display: grid;
  width: min(294px, calc(100vw - 154px));
  max-height: min(418px, calc(100vh - 112px));
  gap: 8px;
  overflow: auto;
  padding: 11px;
  border: 1px solid rgba(155, 191, 224, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 42px rgba(5, 49, 92, 0.22);
  color: var(--ink);
}

.map-directions-popover[hidden] {
  display: none;
}

body.directions-pinpoint-mode .map-directions-popover,
body.directions-pinpoint-mode .search-box,
body.directions-pinpoint-mode .sun-map-status,
body.directions-pinpoint-mode .coordinate-box,
body.directions-pinpoint-mode .map-view-toolbar,
body.directions-pinpoint-mode .map-live-panel,
body.directions-pinpoint-mode .map-control-dock,
body.directions-pinpoint-mode .map-brand-watermark {
  visibility: hidden;
  pointer-events: none;
}

.directions-pinpoint-marker {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1420;
  pointer-events: none;
  transform: translate(-50%, -45px);
}

.directions-pinpoint-marker[hidden],
.directions-pinpoint-panel[hidden] {
  display: none;
}

.directions-pinpoint-panel {
  position: absolute;
  bottom: max(70px, calc(62px + env(safe-area-inset-bottom, 0px)));
  left: 50%;
  z-index: 1425;
  display: grid;
  width: min(306px, calc(100% - 22px));
  gap: 9px;
  border: 1px solid rgba(155, 191, 224, 0.94);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.97);
  padding: 12px;
  box-shadow: 0 18px 46px rgba(5, 49, 92, 0.25);
  color: #071a38;
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}

.directions-pinpoint-panel > div:first-child {
  display: grid;
  gap: 3px;
}

.directions-pinpoint-panel strong {
  color: #073b70;
  font-size: 0.82rem;
}

.directions-pinpoint-panel span {
  color: #526c85;
  font-size: 0.66rem;
  font-weight: 650;
}

.directions-pinpoint-panel output {
  border-radius: 9px;
  background: #edf6ff;
  padding: 8px;
  color: #0b559e;
  font-family: "Courier New", monospace;
  font-size: 0.76rem;
  font-weight: 800;
  text-align: center;
}

.directions-pinpoint-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 7px;
}

.directions-pinpoint-actions button {
  min-height: 36px;
  border: 1px solid #d5e4f2;
  border-radius: 10px;
  background: #f1f8ff;
  color: #0b559e;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.directions-pinpoint-actions .directions-primary {
  border-color: #0b6fe6;
  background: #0b6fe6;
  color: #ffffff;
}

.map-directions-popover header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.map-directions-popover header strong {
  color: #073b70;
  font-size: 0.86rem;
}

.map-directions-popover header button {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: #eaf4ff;
  color: #0b63bd;
  font-weight: 800;
  cursor: pointer;
}

.map-directions-popover label {
  display: grid;
  gap: 4px;
  color: #4f657d;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.map-directions-popover input {
  width: 100%;
  border: 1px solid #cedfed;
  border-radius: 9px;
  background: #ffffff;
  padding: 8px 9px;
  color: #09233f;
  font-size: 0.75rem;
  font-weight: 650;
}

.directions-place-suggestions {
  display: grid;
  gap: 4px;
  max-height: 172px;
  margin-top: 3px;
  overflow: auto;
  padding: 5px;
  border: 1px solid #d4e4f3;
  border-radius: 10px;
  background: #f7fbff;
  text-transform: none;
}

.directions-place-suggestions[hidden] {
  display: none;
}

.directions-place-suggestion {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 45px;
  border: 0;
  border-radius: 8px;
  background: #ffffff;
  padding: 7px 8px;
  color: #09233f;
  text-align: left;
  cursor: pointer;
}

.directions-place-suggestion:hover,
.directions-place-suggestion:focus-visible {
  background: #e7f2ff;
  outline: 2px solid rgba(11, 111, 230, 0.2);
}

.directions-place-suggestion strong {
  font-size: 0.71rem;
  font-weight: 800;
  line-height: 1.25;
}

.directions-place-suggestion span,
.directions-place-empty {
  color: #607890;
  font-size: 0.63rem;
  font-weight: 650;
  line-height: 1.28;
}

.directions-place-empty {
  padding: 7px;
}

.map-directions-picks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.map-directions-picks button,
.directions-clear {
  min-height: 32px;
  border: 1px solid #d5e4f2;
  border-radius: 9px;
  background: #f1f8ff;
  color: #0b559e;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
}

.map-directions-picks .directions-primary,
.map-navigation-actions .directions-primary {
  border-color: #0b6fe6;
  background: #0b6fe6;
  color: #ffffff;
}

.map-directions-picks button:disabled {
  cursor: progress;
  opacity: 0.6;
}

.map-directions-status {
  border-left: 3px solid #0b6fe6;
  padding: 6px 0 6px 8px;
  color: #506982;
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1.35;
}

.map-directions-status.error {
  border-left-color: #bd3d3d;
  color: #9a3030;
}

.navigation-consent-prompt {
  display: grid;
  gap: 7px;
  border: 1px solid #d7eadf;
  border-radius: 11px;
  background: #eefbf5;
  padding: 8px;
  color: #285b45;
}

.navigation-consent-prompt.requires-attention {
  border-color: #087c69;
  box-shadow: 0 0 0 2px rgba(8, 124, 105, 0.14);
}

.navigation-consent-prompt.is-consented {
  background: #e7f8f0;
}

.navigation-consent-prompt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.navigation-consent-prompt-head strong {
  color: #164b40;
  font-size: 0.72rem;
}

.navigation-consent-prompt-head span {
  border-radius: 999px;
  background: #fff1d8;
  padding: 3px 7px;
  color: #875308;
  font-size: 0.57rem;
  font-weight: 800;
  text-transform: uppercase;
}

.navigation-consent-prompt.is-consented .navigation-consent-prompt-head span {
  background: #d4f1e2;
  color: #087c69;
}

.navigation-consent-prompt p {
  margin: 0;
  color: #37685b;
  font-size: 0.62rem;
  font-weight: 650;
  line-height: 1.38;
}

.map-directions-popover .navigation-prompt-opt-in {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  border: 1px solid rgba(8, 124, 105, 0.17);
  border-radius: 8px;
  background: #ffffff;
  padding: 6px 7px;
  color: #244d43;
  font-size: 0.62rem;
  line-height: 1.35;
  text-transform: none;
}

.map-directions-popover .navigation-prompt-opt-in[hidden] {
  display: none;
}

.map-directions-popover .navigation-prompt-opt-in input {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin: 1px 0 0;
  padding: 0;
  accent-color: #087c69;
}

.navigation-prompt-opt-in a {
  color: #056b64;
  font-weight: 800;
}

.navigation-prompt-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.navigation-prompt-actions button {
  min-height: 29px;
  border: 1px solid #cfe5db;
  border-radius: 8px;
  background: #ffffff;
  color: #056b64;
  font-size: 0.63rem;
  font-weight: 800;
  cursor: pointer;
}

.navigation-prompt-actions .directions-primary {
  border-color: #087c69;
  background: #087c69;
  color: #ffffff;
}

.navigation-consent-prompt small {
  color: #487469;
  font-size: 0.59rem;
  font-weight: 650;
  line-height: 1.35;
}

.navigation-consent-prompt small.error {
  color: #a32d28;
}

.map-directions-results {
  display: grid;
  gap: 8px;
}

.map-directions-results[hidden] {
  display: none;
}

.map-directions-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  border-radius: 9px;
  background: #eef6ff;
  padding: 8px;
}

.map-directions-summary strong {
  color: #075bb0;
  font-size: 0.92rem;
}

.map-directions-summary span {
  color: #536a82;
  font-size: 0.62rem;
  font-weight: 750;
  text-align: right;
}

.map-directions-alternatives {
  display: grid;
  gap: 5px;
}

.map-directions-alternatives[hidden] {
  display: none;
}

.map-directions-alternatives button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 35px;
  border: 1px solid #d9e7f4;
  border-radius: 9px;
  background: #f7fbff;
  padding: 6px 8px;
  color: #385471;
  font-size: 0.68rem;
  font-weight: 750;
  cursor: pointer;
}

.map-directions-alternatives button.is-selected {
  border-color: #0b6fe6;
  background: #eaf4ff;
  color: #075bb0;
}

.map-directions-alternatives button strong {
  font-size: 0.72rem;
}

.directions-single-route {
  margin: 0;
  padding: 8px 9px;
  border: 1px dashed #d9e7f4;
  border-radius: 9px;
  background: #f7fbff;
  color: #61768d;
  font-size: 0.68rem;
  font-weight: 700;
}

.map-directions-times {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.map-directions-times div {
  border: 1px solid #dce8f3;
  border-radius: 9px;
  padding: 6px 7px;
  background: #fbfdff;
}

.map-directions-times span {
  display: block;
  color: #637992;
  font-size: 0.63rem;
  font-weight: 750;
}

.map-directions-times strong {
  color: #09233f;
  font-size: 0.78rem;
}

.map-directions-results small {
  color: #657b92;
  font-size: 0.62rem;
  font-weight: 650;
  line-height: 1.35;
}

.map-directions-results .navigation-data-notice {
  border: 1px solid #d7eadf;
  border-radius: 8px;
  background: #eefbf5;
  padding: 6px 7px;
  color: #285b45;
}

.map-directions-results .navigation-data-notice a {
  color: #056b64;
  font-weight: 800;
}

.map-directions-popover .directions-privacy-open {
  min-height: 31px;
  border: 0;
  background: transparent;
  color: #056b64;
  cursor: pointer;
  font-size: 0.66rem;
  font-weight: 800;
  text-decoration: underline;
}

.directions-clear {
  background: #ffffff;
}

.map-navigation-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.map-navigation-actions button {
  min-height: 36px;
  border: 1px solid #d5e4f2;
  border-radius: 10px;
  background: #f1f8ff;
  color: #0b559e;
  font-size: 0.74rem;
  font-weight: 850;
  cursor: pointer;
}

.map-navigation-actions button[hidden] {
  display: none;
}

.map-navigation-telemetry {
  position: absolute;
  right: auto;
  bottom: 14px;
  left: 50%;
  z-index: 1250;
  display: grid;
  gap: 8px;
  width: min(1080px, calc(100% - 28px));
  padding: 9px;
  border: 1px solid rgba(110, 190, 255, 0.44);
  border-radius: 14px;
  background: linear-gradient(142deg, #071c32 0%, #0b304e 54%, #103e5f 100%);
  box-shadow: 0 18px 46px rgba(2, 16, 32, 0.54);
  transform: translateX(-50%);
  color: #f4f9ff;
}

.map-navigation-telemetry[hidden] {
  display: none;
}

.map-navigation-heading {
  color: #f4f9ff;
  font-size: 0.78rem;
}

.navigation-dock-header,
.navigation-dock-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navigation-dock-header {
  justify-content: space-between;
}

.navigation-dock-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.navigation-dock-title {
  display: grid;
  gap: 2px;
}

.navigation-dock-title span {
  color: #a8d3ee;
  font-size: 0.64rem;
  font-weight: 750;
}

.navigation-dock-title .navigation-poi-status {
  color: #67dfbf;
}

.map-navigation-metrics {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 6px;
}

.map-navigation-metrics div {
  padding: 6px;
  border: 1px solid rgba(134, 199, 244, 0.16);
  border-radius: 8px;
  background: rgba(4, 19, 35, 0.42);
}

.map-navigation-metrics span {
  display: block;
  color: #9bc1dc;
  font-size: 0.59rem;
  font-weight: 750;
  text-transform: uppercase;
}

.map-navigation-metrics strong {
  display: block;
  margin-top: 2px;
  color: #ffffff;
  font-size: 0.77rem;
}

.map-navigation-metrics small {
  display: block;
  margin-top: 2px;
  color: #9bc1dc;
  font-size: 0.52rem;
  font-weight: 700;
  white-space: nowrap;
}

.map-navigation-metrics .navigation-sensor-metric,
.map-navigation-metrics .navigation-comfort-metric {
  border-color: rgba(81, 211, 168, 0.24);
  background: rgba(5, 38, 42, 0.46);
}

.navigation-comfort-metric[data-level="smooth"] strong {
  color: #43e49b;
}

.navigation-comfort-metric[data-level="comfortable"] strong,
.navigation-comfort-metric[data-level="adjusting"] strong {
  color: #8fd0ff;
}

.navigation-comfort-metric[data-level="bumpy"] strong {
  color: #ffd36e;
}

.navigation-comfort-metric[data-level="harsh"] strong {
  color: #ff9277;
}

#navigationTraffic[data-level="free-flow"] {
  color: #43e49b;
}

#navigationTraffic[data-level="moderate"] {
  color: #ffd36e;
}

#navigationTraffic[data-level="slow"],
#navigationTraffic[data-level="stopped"] {
  color: #ff9277;
}

.navigation-heading-display {
  display: flex !important;
  align-items: center;
  gap: 5px;
}

.navigation-heading-display i {
  display: inline-grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 50%;
  background: rgba(107, 182, 255, 0.18);
  color: #8fd0ff;
  font-size: 0.78rem;
  font-style: normal;
  transform-origin: center;
}

.navigation-heading-display b {
  font-size: 0.7rem;
}

.navigation-recenter {
  min-height: 30px;
  border: 1px solid rgba(11, 111, 230, 0.24);
  border-radius: 9px;
  background: #0b6fe6;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 850;
  cursor: pointer;
}

.navigation-sensors-enable {
  min-height: 30px;
  border: 1px solid rgba(76, 215, 170, 0.48);
  border-radius: 9px;
  background: rgba(15, 152, 112, 0.2);
  padding: 0 12px;
  color: #aef0d4;
  font-size: 0.7rem;
  font-weight: 850;
  cursor: pointer;
}

.navigation-sensors-enable.is-active {
  border-color: rgba(67, 228, 155, 0.62);
  background: rgba(17, 162, 104, 0.32);
  color: #d5ffee;
}

.navigation-sensors-enable:disabled {
  cursor: default;
  opacity: 0.82;
}

.navigation-remove-next-stop {
  min-height: 30px;
  border: 1px solid rgba(255, 195, 82, 0.62);
  border-radius: 9px;
  background: rgba(255, 187, 55, 0.18);
  padding: 0 12px;
  color: #ffd985;
  font-size: 0.7rem;
  font-weight: 850;
  cursor: pointer;
}

.navigation-remove-next-stop:disabled {
  cursor: progress;
  opacity: 0.7;
}

.navigation-stop {
  min-height: 30px;
  border: 1px solid rgba(255, 144, 136, 0.58);
  border-radius: 9px;
  background: #ffe6e3;
  padding: 0 12px;
  color: #8c2125;
  font-size: 0.7rem;
  font-weight: 850;
  cursor: pointer;
}

.navigation-recenter[hidden] {
  display: none;
}

.navigation-rotation-control {
  position: absolute;
  top: 50%;
  right: calc(12px + env(safe-area-inset-right, 0px));
  z-index: 1815;
  display: grid;
  width: 58px;
  min-height: 66px;
  place-items: center;
  gap: 3px;
  border: 1px solid rgba(11, 111, 230, 0.28);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  color: #0b63bd;
  box-shadow: 0 12px 28px rgba(5, 49, 92, 0.2);
  transform: translateY(-50%);
}

.navigation-rotation-control svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.navigation-rotation-control svg path:last-child {
  fill: currentColor;
  stroke-width: 1.2;
}

.navigation-rotation-control span {
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.navigation-rotation-control[data-mode="north"] {
  border-color: rgba(11, 111, 230, 0.5);
  background: #0b6fe6;
  color: #ffffff;
}

.navigation-rotation-control[data-mode="manual"] {
  border-color: rgba(255, 184, 65, 0.56);
  background: #fff4dc;
  color: #8a5a00;
}

.navigation-sensors-enable[hidden] {
  display: none;
}

.navigation-stop[hidden] {
  display: none;
}

.navigation-sensor-status {
  color: #95bbd5;
  font-size: 0.6rem;
  font-weight: 700;
}

.map-navigation-legend {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #a8d3ee;
  font-size: 0.62rem;
  font-weight: 700;
}

.map-navigation-legend i {
  display: inline-block;
  width: 10px;
  height: 5px;
  margin-left: 3px;
  border-radius: 999px;
  background: #62839f;
}

.map-navigation-legend .clear {
  background: #11a268;
}

.map-navigation-legend .moderate {
  background: #e6a21b;
}

.map-navigation-legend .slow {
  background: #e56938;
}

.map-navigation-legend .stopped {
  background: #d74641;
}

.directions-alternate-line {
  cursor: pointer;
}

body.navigation-focus .directions-alternate-line {
  filter: drop-shadow(0 0 4px rgba(255, 178, 15, 0.86));
}

.live-vehicle-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  background: transparent;
  border: 0;
  filter: drop-shadow(0 5px 8px rgba(5, 24, 44, 0.32));
}

.live-vehicle-heading {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  line-height: 1;
  transform-origin: 50% 50%;
}

.live-vehicle-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  stroke: #ffffff;
  stroke-width: 1.35;
  stroke-linejoin: round;
}

.live-aircraft-icon svg {
  fill: #0b63bd;
}

.live-ship-icon svg {
  fill: #067a7a;
}

.live-telemetry-popup {
  display: grid;
  gap: 0.35rem;
  min-width: 220px;
  color: #102034;
}

.live-telemetry-popup strong {
  color: #062d53;
  font-size: 0.98rem;
}

.live-telemetry-popup > span {
  color: #516176;
  font-size: 0.75rem;
  font-weight: 700;
}

.live-telemetry-popup dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.25rem 0.65rem;
  margin: 0.2rem 0 0;
}

.live-telemetry-popup dt {
  color: #526579;
  font-size: 0.72rem;
  font-weight: 800;
}

.live-telemetry-popup dd {
  margin: 0;
  color: #0f2438;
  font-size: 0.74rem;
  font-weight: 800;
  text-align: right;
}

html[data-theme="dark"] .map-live-panel {
  border-color: rgba(120, 171, 219, 0.34);
  background: #08131b;
}

html[data-theme="dark"] .map-viewing-scale {
  border-color: rgba(120, 171, 219, 0.34);
  background: rgba(8, 19, 27, 0.96);
}

html[data-theme="dark"] .map-viewing-scale strong {
  color: #eef6ff;
}

html[data-theme="dark"] .map-viewing-scale span {
  border-color: #88c9ff;
}

html[data-theme="dark"] .map-hover-place-label {
  border-color: rgba(120, 171, 219, 0.34);
  background: rgba(8, 19, 27, 0.97);
}

html[data-theme="dark"] .map-hover-place-label strong {
  color: #eef6ff;
}

html[data-theme="dark"] .map-live-action {
  border-color: rgba(120, 171, 219, 0.24);
  background: rgba(255, 255, 255, 0.07);
  color: #88c9ff;
}

html[data-theme="dark"] .map-live-action.is-active {
  background: linear-gradient(145deg, #137dda, #0757a5);
  color: #ffffff;
}

html[data-theme="dark"] .map-live-traffic-card {
  border-color: rgba(120, 171, 219, 0.34);
  background: rgba(8, 19, 27, 0.98);
  color: #eef6ff;
}

html[data-theme="dark"] .map-live-traffic-card button {
  border-color: rgba(120, 171, 219, 0.34);
  background: rgba(19, 125, 218, 0.16);
  color: #88c9ff;
}

html[data-theme="dark"] .map-live-traffic-card small {
  color: #b3c8dc;
}

html[data-theme="dark"] .traffic-profile-control span {
  color: #b3c8dc;
}

html[data-theme="dark"] .traffic-profile-control select {
  border-color: rgba(120, 171, 219, 0.34);
  background: rgba(19, 125, 218, 0.16);
  color: #eef6ff;
}

html[data-theme="dark"] .map-directions-popover {
  border-color: rgba(120, 171, 219, 0.34);
  background: rgba(8, 19, 27, 0.98);
  color: #eef6ff;
}

html[data-theme="dark"] .directions-pinpoint-panel {
  border-color: rgba(120, 171, 219, 0.4);
  background: rgba(8, 19, 27, 0.97);
  color: #eef6ff;
}

html[data-theme="dark"] .directions-pinpoint-panel strong {
  color: #eef6ff;
}

html[data-theme="dark"] .directions-pinpoint-panel span {
  color: #bdd6eb;
}

html[data-theme="dark"] .directions-pinpoint-panel output {
  background: rgba(107, 182, 255, 0.13);
  color: #dbefff;
}

html[data-theme="dark"] .directions-pinpoint-actions button {
  border-color: rgba(120, 171, 219, 0.3);
  background: rgba(107, 182, 255, 0.14);
  color: #dbefff;
}

html[data-theme="dark"] .directions-pinpoint-actions .directions-primary {
  border-color: #137dda;
  background: #137dda;
  color: #ffffff;
}

html[data-theme="dark"] .map-directions-popover header strong,
html[data-theme="dark"] .map-directions-times strong {
  color: #eef6ff;
}

html[data-theme="dark"] .map-directions-popover input,
html[data-theme="dark"] .map-directions-times div,
html[data-theme="dark"] .map-directions-summary,
html[data-theme="dark"] .map-directions-alternatives button {
  border-color: rgba(120, 171, 219, 0.24);
  background: rgba(255, 255, 255, 0.07);
  color: #eef6ff;
}

html[data-theme="dark"] .directions-place-suggestions {
  border-color: rgba(120, 171, 219, 0.24);
  background: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .directions-place-suggestion {
  background: rgba(107, 182, 255, 0.08);
  color: #eef6ff;
}

html[data-theme="dark"] .directions-place-suggestion:hover,
html[data-theme="dark"] .directions-place-suggestion:focus-visible {
  background: rgba(107, 182, 255, 0.17);
}

html[data-theme="dark"] .map-directions-picks button,
html[data-theme="dark"] .directions-clear,
html[data-theme="dark"] .map-directions-popover header button,
html[data-theme="dark"] .map-navigation-actions button {
  border-color: rgba(120, 171, 219, 0.3);
  background: rgba(107, 182, 255, 0.14);
  color: #dbefff;
}

html[data-theme="dark"] .map-directions-picks .directions-primary,
html[data-theme="dark"] .map-navigation-actions .directions-primary {
  border-color: #137dda;
  background: #137dda;
  color: #ffffff;
}

html[data-theme="dark"] .map-directions-alternatives button.is-selected {
  border-color: #137dda;
  background: rgba(19, 125, 218, 0.2);
  color: #eef6ff;
}

html[data-theme="dark"] .map-directions-results .navigation-data-notice a,
html[data-theme="dark"] .map-directions-popover .directions-privacy-open {
  color: #72e2c5;
}

html[data-theme="dark"] .navigation-consent-prompt {
  border-color: rgba(83, 208, 168, 0.32);
  background: rgba(10, 96, 78, 0.26);
  color: #d8fff1;
}

html[data-theme="dark"] .navigation-consent-prompt-head strong,
html[data-theme="dark"] .navigation-consent-prompt p,
html[data-theme="dark"] .navigation-consent-prompt small {
  color: #d8fff1;
}

html[data-theme="dark"] .navigation-consent-prompt-head span {
  background: rgba(255, 192, 75, 0.18);
  color: #ffda91;
}

html[data-theme="dark"] .navigation-consent-prompt.is-consented .navigation-consent-prompt-head span {
  background: rgba(72, 215, 162, 0.22);
  color: #84f1cc;
}

html[data-theme="dark"] .map-directions-popover .navigation-prompt-opt-in,
html[data-theme="dark"] .navigation-prompt-actions button {
  border-color: rgba(83, 208, 168, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: #d8fff1;
}

html[data-theme="dark"] .navigation-prompt-opt-in a {
  color: #72e2c5;
}

html[data-theme="dark"] .navigation-prompt-actions .directions-primary {
  border-color: #0a8d78;
  background: #0a8d78;
  color: #ffffff;
}

html[data-theme="dark"] .navigation-consent-prompt small.error {
  color: #ffb4ae;
}

html[data-theme="dark"] .directions-single-route {
  border-color: rgba(120, 171, 219, 0.24);
  background: rgba(255, 255, 255, 0.07);
  color: #a8d3ee;
}

html[data-theme="dark"] .map-navigation-telemetry {
  border-color: rgba(110, 190, 255, 0.44);
  background: linear-gradient(142deg, #071c32 0%, #0b304e 54%, #103e5f 100%);
}

html[data-theme="dark"] .map-navigation-metrics div {
  border-color: rgba(134, 199, 244, 0.16);
  background: rgba(4, 19, 35, 0.42);
}

html[data-theme="dark"] .map-navigation-heading,
html[data-theme="dark"] .map-navigation-metrics strong {
  color: #ffffff;
}

html[data-theme="dark"] .navigation-dock-title span,
html[data-theme="dark"] .map-navigation-metrics span,
html[data-theme="dark"] .map-navigation-legend {
  color: #a8d3ee;
}

html[data-theme="dark"] .navigation-heading-display i {
  background: rgba(107, 182, 255, 0.15);
  color: #88c9ff;
}

html[data-theme="dark"] .navigation-recenter {
  border-color: #137dda;
  background: #137dda;
}

html[data-theme="dark"] .navigation-rotation-control {
  border-color: rgba(107, 182, 255, 0.42);
  background: rgba(7, 27, 47, 0.94);
  color: #8fd0ff;
}

html[data-theme="dark"] .navigation-rotation-control[data-mode="north"] {
  background: #137dda;
  color: #ffffff;
}

html[data-theme="dark"] .navigation-rotation-control[data-mode="manual"] {
  border-color: rgba(255, 199, 93, 0.62);
  background: rgba(103, 71, 9, 0.92);
  color: #ffd985;
}

html[data-theme="dark"] .navigation-stop {
  border-color: rgba(255, 144, 136, 0.58);
  background: #ffe6e3;
  color: #8c2125;
}

body.navigation-focus .map-view-toolbar,
body.navigation-focus .search-box,
body.navigation-focus .coordinate-box,
body.navigation-focus .map-viewing-scale,
body.navigation-focus .sun-map-status,
body.navigation-focus .map-live-panel,
body.navigation-focus .map-compass,
body.navigation-focus .map-control-dock,
body.navigation-focus .map-context-menu,
body.navigation-focus .map-stage .leaflet-top {
  display: none;
}

body.navigation-focus {
  overflow: hidden;
}

body.navigation-focus .app-shell {
  position: fixed;
  inset: 0;
  z-index: 1600;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  margin: 0;
  border: 0;
  border-radius: 0;
}

body.navigation-focus .workspace {
  height: 100%;
  grid-template-rows: 0 minmax(0, 1fr) 0;
}

html[data-theme="dark"] .map-live-slider {
  border-color: rgba(255, 208, 103, 0.26);
  background:
    radial-gradient(circle at 12% 50%, rgba(255, 176, 46, 0.18), transparent 34%),
    rgba(255, 255, 255, 0.07);
}

.map-compass {
  position: absolute;
  top: 12px;
  right: 148px;
  z-index: 620;
  width: 82px;
  height: 82px;
  border: 1px solid rgba(70, 80, 88, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 48px rgba(5, 49, 92, 0.16);
  backdrop-filter: blur(10px);
  pointer-events: none;
}

.map-compass span {
  position: absolute;
  color: #3f4549;
  line-height: 1;
}

.compass-ring {
  inset: 15px;
  border: 2px solid currentColor;
  border-radius: 50%;
  opacity: 0.92;
}

.compass-ring-outer {
  inset: 10px;
  border-width: 3px;
  opacity: 0.9;
}

.compass-ring-inner {
  inset: 25px;
  border-width: 2px;
  opacity: 0.78;
}

.compass-needle {
  top: 50%;
  left: 50%;
  width: 5px;
  height: 64px;
  background: currentColor;
  clip-path: polygon(50% 0, 100% 43%, 58% 50%, 100% 57%, 50% 100%, 0 57%, 42% 50%, 0 43%);
  transform: translate(-50%, -50%);
}

.compass-needle-ew {
  transform: translate(-50%, -50%) rotate(90deg);
}

.compass-needle-ne {
  width: 4px;
  height: 56px;
  opacity: 0.82;
  transform: translate(-50%, -50%) rotate(45deg);
}

.compass-needle-nw {
  width: 4px;
  height: 56px;
  opacity: 0.82;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.compass-tick {
  top: 50%;
  left: 50%;
  width: 2px;
  height: 48px;
  background:
    linear-gradient(to bottom, currentColor 0 22%, transparent 22% 78%, currentColor 78% 100%);
  opacity: 0.42;
  transform: translate(-50%, -50%) rotate(22.5deg);
}

.compass-tick-b {
  transform: translate(-50%, -50%) rotate(-22.5deg);
}

.compass-label {
  color: #3f4549;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

.compass-label-n {
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
}

.compass-label-e {
  top: 50%;
  right: -1px;
  transform: translateY(-50%);
}

.compass-label-s {
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
}

.compass-label-w {
  top: 50%;
  left: -1px;
  transform: translateY(-50%);
}

.compass-label-ne {
  top: 11px;
  right: 7px;
  transform: rotate(42deg);
}

.compass-label-se {
  right: 8px;
  bottom: 10px;
  transform: rotate(-42deg);
}

.compass-label-sw {
  bottom: 10px;
  left: 8px;
  transform: rotate(42deg);
}

.compass-label-nw {
  top: 11px;
  left: 7px;
  transform: rotate(-42deg);
}

.compass-core {
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  border: 5px solid currentColor;
  border-radius: 50%;
  background: #ffffff;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.72);
}

html[data-theme="dark"] .map-compass {
  border-color: rgba(220, 230, 238, 0.18);
  background: rgba(7, 22, 43, 0.84);
}

html[data-theme="dark"] .map-compass span {
  color: #e3edf4;
}

html[data-theme="dark"] .compass-label {
  color: #e3edf4;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.46);
}

html[data-theme="dark"] .compass-core {
  background: #07162b;
  box-shadow: 0 0 0 3px rgba(7, 22, 43, 0.72);
}

.map-control-dock {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 620;
  display: grid;
  width: auto;
  max-width: 126px;
  gap: 0;
  border: 1px solid rgba(194, 216, 237, 0.82);
  border-radius: 14px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 48px rgba(5, 49, 92, 0.18);
  backdrop-filter: blur(12px);
}

.map-control-dock strong {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.map-control-dock div {
  display: grid;
  grid-template-columns: repeat(2, 38px);
  gap: 5px;
}

.map-control-dock button {
  display: grid;
  place-items: center;
  position: relative;
  width: 38px;
  height: 38px;
  min-height: 38px;
  border: 1px solid rgba(194, 216, 237, 0.9);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--brand);
  font-weight: 650;
}

.map-control-dock button:hover,
.map-control-dock button:focus-visible,
.map-control-dock button.is-active {
  background: rgba(11, 99, 189, 0.08);
  color: #063963;
}

html[data-theme="dark"] .map-control-dock button:hover,
html[data-theme="dark"] .map-control-dock button:focus-visible,
html[data-theme="dark"] .map-control-dock button.is-active {
  background: rgba(107, 182, 255, 0.14);
  color: #f1f7ff;
}

.map-control-dock button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.map-control-dock button span {
  position: absolute;
  right: calc(100% + 8px);
  top: 50%;
  opacity: 0;
  transform: translateY(-50%) translateX(4px);
  pointer-events: none;
  border: 1px solid rgba(194, 216, 237, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: #071a38;
  padding: 5px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 12px 28px rgba(5, 49, 92, 0.16);
  transition: opacity 140ms ease, transform 140ms ease;
}

.map-context-menu {
  position: absolute;
  z-index: 1300;
  min-width: 224px;
  max-width: min(280px, calc(100% - 20px));
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(194, 216, 237, 0.92);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.97);
  color: #071a38;
  box-shadow: 0 18px 42px rgba(5, 49, 92, 0.22);
}

.map-context-menu[hidden] {
  display: none;
}

.map-context-menu strong {
  font-size: 0.76rem;
  letter-spacing: 0.01em;
}

.map-context-menu span {
  padding: 7px 8px;
  border-radius: 8px;
  background: #f2f7fc;
  color: #244461;
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
  font-weight: 700;
}

.map-context-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.map-context-menu button {
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  background: #e9f3ff;
  color: #0b4f94;
  padding: 6px 8px;
  font-size: 0.72rem;
  font-weight: 850;
  cursor: pointer;
}

.map-context-menu button:first-child {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #0b63bd, #1685dc);
  color: #ffffff;
}

.map-context-menu button:hover,
.map-context-menu button:focus-visible {
  filter: brightness(1.05);
  outline: none;
  box-shadow: 0 0 0 3px rgba(11, 99, 189, 0.16);
}

html[data-theme="dark"] .map-context-menu {
  border-color: rgba(120, 171, 219, 0.38);
  background: rgba(8, 19, 27, 0.96);
  color: #eef7ff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
}

html[data-theme="dark"] .map-context-menu span {
  background: rgba(107, 182, 255, 0.12);
  color: #dbefff;
}

html[data-theme="dark"] .map-context-menu button {
  background: rgba(107, 182, 255, 0.14);
  color: #dbefff;
}

html[data-theme="dark"] .map-context-menu button:first-child {
  background: linear-gradient(135deg, #0b63bd, #1685dc);
  color: #ffffff;
}

.map-control-dock button:hover span,
.map-control-dock button:focus-visible span {
  opacity: 1;
  transform: translateY(-50%);
}

#dockFullscreen {
  grid-column: 1 / -1;
  width: 81px;
  grid-template-columns: 18px auto;
  gap: 5px;
  padding: 0 8px;
  place-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0b63bd, #1685dc);
  color: #fff;
}

#dockFullscreen span {
  position: static;
  opacity: 1;
  transform: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  padding: 0;
  box-shadow: none;
  font-size: 0.7rem;
}

#dockFullscreen:hover span,
#dockFullscreen:focus-visible span {
  transform: none;
}

.three-d-panel {
  position: fixed;
  inset: 42px;
  z-index: 3200;
  display: grid;
  grid-template-rows: auto minmax(360px, 1fr) auto auto auto;
  gap: 10px;
  width: auto;
  min-height: 520px;
  padding: 16px;
  border-radius: 20px;
  background: #08131b;
  color: #f8fbfa;
  box-shadow: 0 30px 90px rgba(2, 15, 28, 0.48);
  overflow: hidden;
}

.three-d-panel[hidden] {
  display: none;
}

.three-d-header,
.horizon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.three-d-header {
  font-size: 1rem;
  font-weight: 650;
}

#terrainCanvas {
  width: 100%;
  height: 100%;
  min-height: 280px;
  border: 1px solid rgba(248, 251, 250, 0.16);
  border-radius: 8px;
  background: #08131b;
  touch-action: none;
}

.globe-hover-card {
  position: absolute;
  z-index: 3;
  min-width: 180px;
  max-width: 260px;
  padding: 10px 12px;
  border: 1px solid rgba(248, 251, 250, 0.2);
  border-radius: 12px;
  background: rgba(8, 19, 27, 0.92);
  color: #f8fbfa;
  box-shadow: 0 18px 42px rgba(2, 15, 28, 0.42);
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.globe-hover-card strong {
  display: block;
  margin-bottom: 4px;
  color: #fff2c2;
  font-size: 0.84rem;
}

.globe-hover-card span {
  display: block;
  color: #d9e5e3;
  font-size: 0.75rem;
  line-height: 1.45;
}

.map-live-traffic-card {
  position: absolute;
  top: 0;
  right: calc(100% + 8px);
  display: grid;
  width: 245px;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(15, 100, 168, 0.22);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.98);
  color: #18344f;
  box-shadow: 0 15px 36px rgba(7, 39, 69, 0.14);
  font-size: 0.72rem;
  line-height: 1.42;
}

.map-live-traffic-card[hidden] {
  display: none;
}

.map-live-traffic-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.map-live-traffic-card strong {
  font-size: 0.76rem;
}

.map-live-traffic-card button {
  border: 1px solid #cdddec;
  border-radius: 8px;
  background: #f2f8fd;
  padding: 4px 8px;
  color: #0b63bd;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.map-live-traffic-card span {
  font-weight: 700;
}

.map-live-traffic-card small {
  color: #5c7288;
  font-size: 0.66rem;
}

.traffic-profile-control {
  display: grid;
  gap: 4px;
}

.traffic-profile-control span {
  color: #5c7288;
  font-size: 0.65rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.traffic-profile-control select {
  width: 100%;
  border: 1px solid #cadbea;
  border-radius: 8px;
  background: #f5f9fd;
  padding: 6px 7px;
  color: #16354e;
  font: inherit;
  font-weight: 700;
}

.globe-search {
  position: absolute;
  top: 56px;
  left: 24px;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 8px;
  width: min(430px, calc(100% - 48px));
}

.globe-search-results {
  grid-column: 1 / -1;
  display: grid;
  gap: 5px;
  max-height: 240px;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(248, 251, 250, 0.14);
  border-radius: 7px;
  background: rgba(8, 19, 27, 0.92);
}

.globe-search-results[hidden] {
  display: none;
}

.globe-search-result {
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 8px;
  text-align: left;
  cursor: pointer;
}

.globe-search-result:hover,
.globe-search-result:focus {
  background: rgba(11, 110, 105, 0.68);
}

.globe-search-result strong {
  display: block;
  font-size: 0.82rem;
}

.globe-search-result span {
  color: #d9e5e3;
  font-size: 0.72rem;
}

.globe-search input,
.globe-search button {
  min-height: 36px;
  border-radius: 7px;
}

.globe-controls {
  position: absolute;
  right: 24px;
  bottom: 118px;
  z-index: 2;
  display: grid;
  gap: 8px;
  width: min(310px, calc(100% - 48px));
  padding: 10px;
  border: 1px solid rgba(248, 251, 250, 0.15);
  border-radius: 8px;
  background: rgba(8, 19, 27, 0.78);
}

.globe-controls label {
  display: grid;
  grid-template-columns: 38px 1fr 48px;
  align-items: center;
  gap: 8px;
  color: #d9e5e3;
  font-size: 0.78rem;
  font-weight: 650;
}

.globe-controls span {
  text-align: right;
}

.horizon {
  color: #d9e5e3;
  font-size: 0.78rem;
  font-weight: 650;
}

.terrain-3d-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.terrain-3d-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.terrain-3d-actions button {
  min-height: 32px;
  border: 1px solid rgba(248, 251, 250, 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 650;
  cursor: pointer;
}

.terrain-3d-actions button.is-active {
  border-color: rgba(255, 224, 143, 0.5);
  background: rgba(255, 208, 103, 0.16);
  color: #fff2c2;
}

.terrain-3d-actions span {
  color: #d9e5e3;
  font-size: 0.78rem;
  font-weight: 650;
  text-align: right;
}

.terrain-3d-altitude-key {
  display: grid;
  grid-template-columns: auto minmax(120px, 220px) auto;
  align-items: center;
  justify-content: end;
  gap: 8px;
  color: #d9e5e3;
  font-size: 0.74rem;
  font-weight: 650;
}

.terrain-3d-altitude-key i {
  display: block;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2376b7, #3fbf7f 24%, #d5c96f 48%, #ad7440 72%, #fff2d0);
  box-shadow: 0 0 18px rgba(255, 214, 143, 0.2);
}

.terrain-3d-source-note {
  color: #bcd1dc;
  font-size: 0.72rem;
  font-weight: 650;
  text-align: right;
}

.terrain-3d-relief {
  display: grid;
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid rgba(106, 206, 154, 0.25);
  border-radius: 10px;
  background: rgba(45, 136, 88, 0.12);
}

.terrain-3d-relief label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #d9e5e3;
  font-size: 0.76rem;
  font-weight: 700;
}

.terrain-3d-relief strong {
  color: #b9f1c9;
}

.terrain-3d-relief input[type="range"] {
  width: 100%;
  accent-color: #48b97a;
}

.terrain-3d-relief > span {
  color: #bcd1dc;
  font-size: 0.72rem;
  line-height: 1.35;
}

.terrain-3d-year-tracker {
  display: grid;
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 208, 103, 0.24);
  border-radius: 10px;
  background:
    radial-gradient(circle at 12% 50%, rgba(255, 176, 46, 0.2), transparent 34%),
    rgba(255, 255, 255, 0.07);
}

.terrain-3d-year-tracker label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #d9e5e3;
  font-size: 0.76rem;
  font-weight: 700;
}

.terrain-3d-year-tracker strong {
  color: #fff2c2;
}

.terrain-3d-year-tracker input[type="range"] {
  width: 100%;
  accent-color: #ffb02e;
}

.terrain-3d-year-tracker > span {
  color: #ffe9a6;
  font-size: 0.76rem;
  font-weight: 650;
}

.terrain-3d-eclipse {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.terrain-3d-eclipse label {
  color: #d9e5e3;
  font-size: 0.76rem;
  font-weight: 650;
}

.terrain-3d-eclipse select {
  min-height: 34px;
  border: 1px solid rgba(248, 251, 250, 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 650;
  padding: 0 10px;
}

.terrain-3d-eclipse select option {
  color: #08131b;
  background: #f8fbfa;
}

.terrain-3d-eclipse-info {
  color: #bcd1dc;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.45;
}

.terrain-3d-sun-status {
  color: #ffe9a6;
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.4;
}

.terrain-3d-sun-distance {
  color: #d9e5e3;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.35;
}

.traffic-line-slow {
  animation: trafficPulse 1.2s ease-in-out infinite;
}

.traffic-line-mid {
  animation: trafficPulse 1.8s ease-in-out infinite;
}

.traffic-line-fast {
  animation: trafficPulse 2.4s ease-in-out infinite;
}

.live-traffic-tooltip {
  border: 1px solid rgba(18, 55, 78, 0.2);
  border-radius: 10px;
  background: rgba(7, 28, 43, 0.94);
  color: #f1f8ff;
  font-size: 0.68rem;
  font-weight: 700;
}

.shortest-route-line {
  filter: drop-shadow(0 2px 3px rgba(11, 99, 189, 0.42));
  stroke-linecap: round;
  stroke-linejoin: round;
}

.directions-route-line {
  filter: drop-shadow(0 3px 4px rgba(11, 111, 230, 0.42));
  stroke-linecap: round;
  stroke-linejoin: round;
}

.directions-route-marker {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #0b6fe6;
  color: #ffffff;
  box-shadow: 0 7px 18px rgba(5, 49, 92, 0.3);
  font-size: 0.72rem;
  font-weight: 850;
}

.directions-point-pin {
  position: relative;
  display: grid;
  width: 38px;
  height: 48px;
  place-items: start center;
  filter: drop-shadow(0 7px 9px rgba(5, 49, 92, 0.34));
}

.directions-point-pin.pinpoint {
  filter: drop-shadow(0 9px 14px rgba(5, 49, 92, 0.48));
  animation: pinpointFloat 1.35s ease-in-out infinite;
}

.directions-point-pin::before {
  position: absolute;
  top: 2px;
  width: 29px;
  height: 29px;
  border: 2px solid #ffffff;
  border-radius: 50% 50% 50% 0;
  background: #0b6fe6;
  content: "";
  transform: rotate(-45deg);
}

.directions-point-pin::after {
  position: absolute;
  bottom: 1px;
  width: 19px;
  height: 6px;
  border-radius: 50%;
  background: rgba(5, 49, 92, 0.22);
  content: "";
}

.directions-point-pin i {
  position: relative;
  z-index: 1;
  display: block;
  width: 10px;
  height: 10px;
  margin-top: 12px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.directions-point-pin.target::before {
  background: #da3f43;
}

.directions-point-pin.target::after {
  background: rgba(142, 33, 37, 0.24);
}

body.directions-pinpoint-source .directions-point-pin.source.committed,
body.directions-pinpoint-target .directions-point-pin.target.committed {
  visibility: hidden;
}

@keyframes pinpointFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.navigation-trace-line {
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(5, 49, 92, 0.22));
}

.navigation-vehicle-marker {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #62839f;
  box-shadow: 0 7px 18px rgba(5, 49, 92, 0.32);
  color: #ffffff;
}

.navigation-vehicle-marker span {
  display: block;
  font-size: 1.05rem;
  font-weight: 900;
  transform: rotate(var(--navigation-vehicle-angle, -90deg));
  transition: transform 260ms linear;
}

.navigation-vehicle-marker.clear {
  background: #11a268;
}

.navigation-vehicle-marker.moderate {
  background: #e6a21b;
}

.navigation-vehicle-marker.slow {
  background: #e56938;
}

.navigation-vehicle-marker.stopped {
  background: #d74641;
}

.navigation-poi-marker {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 18px 18px 18px 5px;
  background: #087e70;
  box-shadow: 0 7px 19px rgba(4, 31, 42, 0.34);
  color: #ffffff;
  transform: rotate(-45deg);
}

.navigation-poi-marker span {
  display: block;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1;
  transform: rotate(45deg);
}

.navigation-poi-marker.fuel {
  background: #ee8c24;
}

.navigation-poi-marker.hospital {
  background: #d4384b;
}

.navigation-poi-marker.interest {
  background: #087e70;
}

.navigation-poi-marker.is-next-stop {
  border-color: #ffd454;
  box-shadow: 0 0 0 4px rgba(255, 212, 84, 0.33), 0 7px 19px rgba(4, 31, 42, 0.34);
}

.navigation-poi-popup {
  display: grid;
  gap: 4px;
  min-width: 170px;
  color: #10263e;
}

.navigation-poi-popup strong {
  color: #112a43;
  font-size: 0.88rem;
}

.navigation-poi-popup span {
  color: #3a5b74;
  font-size: 0.75rem;
}

.navigation-poi-popup small {
  color: #668097;
  font-size: 0.69rem;
}

.navigation-poi-next-stop,
.navigation-poi-remove-stop {
  min-height: 34px;
  margin-top: 5px;
  border: 0;
  border-radius: 9px;
  background: #0b6fe6;
  color: #ffffff;
  font-size: 0.73rem;
  font-weight: 800;
  cursor: pointer;
}

.navigation-poi-remove-stop {
  border: 1px solid #e6b97c;
  background: #fff1dc;
  color: #8e5108;
}

.navigation-poi-next-stop:disabled,
.navigation-poi-remove-stop:disabled {
  background: #d7e3ee;
  color: #506982;
  cursor: default;
}

.directions-route-marker.next-stop {
  background: #f08c25;
}

.drone-marker {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  box-shadow: 0 6px 18px rgba(23, 32, 39, 0.28);
  font-size: 0.7rem;
  font-weight: 650;
}

@keyframes trafficPulse {
  0%,
  100% {
    stroke-opacity: 0.45;
  }
  50% {
    stroke-opacity: 1;
  }
}

.data-dock {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  min-width: 0;
}

.dock-header {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}

.workspace h3 {
  margin-top: 2px;
  font-size: 1rem;
}

.table-wrap {
  height: 86px;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

th,
td {
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafb;
  color: var(--ink);
  font-size: 0.76rem;
  letter-spacing: 0;
  text-transform: none;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  background: rgba(39, 136, 93, 0.12);
  color: var(--success);
  font-size: 0.78rem;
  font-weight: 650;
}

.status-pill.review {
  background: rgba(217, 137, 43, 0.16);
  color: #9a5a13;
}

.leaflet-popup-content-wrapper {
  border-radius: 8px;
}

.popup-title {
  margin: 0 0 6px;
  font-weight: 650;
}

.popup-list {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  body.auth-open {
    overflow: hidden;
  }

  .home-screen {
    padding: 26px 22px;
  }

  .app-shell {
    width: min(100vw - 22px, 1280px);
    margin: 18px auto;
  }

  .home-nav {
    grid-template-columns: 1fr auto;
  }

  .home-links {
    display: none;
  }

  .home-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 44px;
  }

  .home-brand strong {
    font-size: 2rem;
  }

  .home-copy h1 {
    font-size: 2.65rem;
  }

  .home-visual {
    min-height: 430px;
  }

  .home-features,
  .home-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer {
    grid-template-columns: 1fr;
    width: min(100% - 44px, 720px);
  }

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

  .analysis-parameter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analysis-report-panel dl {
    grid-template-columns: 1fr;
  }

  .footer-actions {
    justify-content: flex-start;
  }

  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .sidebar {
    height: auto;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workspace {
    height: auto;
    grid-template-rows: auto minmax(520px, 64vh) 260px;
  }

  .auth-panel {
    padding: 18px;
  }

  .auth-panel.open {
    place-items: start center;
  }

  .auth-modal {
    grid-template-columns: 1fr;
    width: min(100%, 560px);
    min-height: auto;
  }

  .auth-card {
    padding: 44px 24px 28px;
  }

  .auth-visual-panel {
    min-height: 420px;
    padding: 34px 26px 24px;
  }

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

  .auth-benefits div:nth-child(3) {
    border-left: 0;
  }

  .app-shell {
    position: relative;
    grid-template-columns: 1fr;
    width: 100vw;
    height: 100vh;
    height: 100svh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  body.left-menu-collapsed .app-shell,
  body.map-maximized .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    top: 10px;
    bottom: 10px;
    left: 10px;
    z-index: 1700;
    width: min(322px, calc(100vw - 20px));
    height: auto;
    max-height: none;
    border-radius: 18px;
    border-bottom: 0;
    box-shadow: 0 24px 64px rgba(5, 49, 92, 0.28);
    transform: translateX(0);
  }

  body.left-menu-collapsed .sidebar,
  body.map-maximized.left-menu-collapsed .sidebar {
    width: min(322px, calc(100vw - 20px));
    padding: 14px 10px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(calc(-100% - 24px));
  }

  body.map-maximized:not(.left-menu-collapsed) .sidebar {
    width: min(322px, calc(100vw - 20px));
    padding: 14px 10px;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
  }

  .workspace {
    height: 100%;
    grid-template-rows: auto minmax(0, 1fr) 0;
  }

  .data-dock {
    display: none;
  }

  .map-stage {
    min-height: 0;
    border: 0;
    border-radius: 0;
  }

  #map {
    border-radius: 0;
  }

  .map-view-toolbar {
    top: 64px;
    left: 58px;
    z-index: 1720;
    max-width: calc(100% - 202px);
  }
}

@media (max-width: 600px) {
  body {
    overflow-x: hidden;
  }

  .home-screen {
    padding: 18px 14px;
  }

  .home-nav {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }

  .home-brand {
    min-width: 0;
  }

  .home-brand-logo {
    width: min(178px, 47vw);
  }

  .home-brand-icon {
    width: 44px;
    height: 44px;
  }

  .home-brand strong {
    font-size: 1.7rem;
  }

  .home-brand span {
    font-size: 0.7rem;
  }

  .home-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    flex-direction: row;
  }

  .home-actions .home-login-button,
  .home-actions .home-primary-button {
    min-height: 46px;
    padding: 0 16px;
  }

  .home-actions,
  .home-cta {
    align-items: stretch;
  }

  .home-copy h1 {
    font-size: 2.05rem;
  }

  .home-copy p {
    font-size: 1.02rem;
  }

  .home-features,
  .home-stats {
    grid-template-columns: 1fr;
  }

  .site-footer {
    width: calc(100% - 28px);
    padding: 14px;
  }

  .footer-metric-grid,
  .feedback-fields {
    grid-template-columns: 1fr;
  }

  .feedback-card {
    padding: 24px 18px;
  }

  .analysis-dialog-panel {
    align-items: stretch;
    padding: 10px;
  }

  .analysis-dialog-card {
    max-height: calc(100vh - 20px);
    padding: 22px 16px;
    border-radius: 18px;
  }

  .analysis-dialog-heading {
    grid-template-columns: 1fr;
    padding-right: 42px;
  }

  .analysis-parameter-form {
    grid-template-columns: 1fr;
  }

  .analysis-dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .analysis-dialog-actions button {
    width: 100%;
  }

  .feedback-submit-row {
    align-items: stretch;
    flex-direction: column;
  }

  .feedback-submit-row button {
    width: 100%;
  }

  .home-visual {
    min-height: 300px;
  }

  .workspace-nav {
    display: none;
  }

  .map-control-dock {
    right: 10px;
    top: auto;
    bottom: 10px;
    max-width: 112px;
    max-height: 172px;
    padding: 7px;
    border-radius: 14px;
    overflow: auto;
  }

  .map-control-dock div {
    grid-template-columns: repeat(2, 40px);
    gap: 5px;
  }

  .map-control-dock button {
    width: 40px;
    height: 40px;
    min-height: 40px;
    border-radius: 9px;
  }

  .map-live-panel {
    right: 10px;
    top: 118px;
    width: 114px;
    max-height: none;
    overflow: visible;
  }

  .map-view-toolbar {
    top: auto;
    right: 130px;
    bottom: 10px;
    left: 10px;
    max-width: none;
    overflow-x: auto;
    padding: 5px;
  }

  .map-view-toolbar button {
    min-height: 38px;
    padding: 7px 9px;
    font-size: 0.72rem;
  }

  .search-box {
    top: 10px;
    right: 122px;
    left: 10px;
    grid-template-columns: minmax(0, 1fr);
    max-width: none;
  }

  .search-box button {
    display: none;
  }

  .coordinate-box {
    bottom: 62px;
    left: 10px;
    max-width: calc(100% - 140px);
  }

  .map-viewing-scale {
    right: 10px;
    bottom: 192px;
  }

  body:not(.right-menu-collapsed) .map-viewing-scale {
    right: 134px;
    bottom: 62px;
  }

  body.right-menu-collapsed .map-viewing-scale {
    right: 122px;
    bottom: 62px;
  }

  body.directions-open .map-viewing-scale {
    display: none;
  }

  body.navigation-focus .map-navigation-telemetry {
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    width: calc(100% - 20px);
    gap: 6px;
    padding: 8px;
  }

  body.navigation-focus .map-navigation-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  body.navigation-focus .map-navigation-metrics div {
    padding: 5px;
  }

  body.navigation-focus .navigation-sensor-status {
    font-size: 0.57rem;
  }

  body.navigation-focus .map-navigation-legend {
    display: none;
  }

  .sun-map-status {
    bottom: 106px;
    left: 10px;
    max-width: calc(100% - 20px);
  }

  .map-compass {
    top: 66px;
    right: 14px;
    width: 58px;
    height: 58px;
  }

  .map-compass .compass-label {
    font-size: 0.56rem;
  }

  .map-compass .compass-needle {
    height: 44px;
  }

  .map-compass .compass-ring-outer {
    inset: 7px;
  }

  .map-compass .compass-ring-inner {
    inset: 18px;
  }

  .map-context-menu {
    min-width: 216px;
    max-height: calc(100% - 18px);
    overflow: auto;
  }

  #dockFullscreen {
    width: 85px;
    padding: 0 8px;
    gap: 5px;
  }

  #dockFullscreen span {
    font-size: 0.68rem;
  }

  .three-d-panel {
    inset: 10px;
    grid-template-rows: auto auto minmax(320px, 1fr) auto auto;
    gap: 10px;
    min-height: 0;
    max-height: calc(100vh - 20px);
    padding: 14px;
    overflow: auto;
    border-radius: 18px;
  }

  .three-d-header {
    gap: 12px;
    font-size: 1rem;
    line-height: 1.15;
  }

  .three-d-header .icon-button {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    font-size: 1.05rem;
  }

  .globe-search {
    position: static;
    z-index: auto;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    order: 2;
  }

  .globe-search input,
  .globe-search button {
    min-width: 0;
    min-height: 42px;
    font-size: 0.95rem;
  }

  #terrainCanvas {
    min-height: 320px;
    order: 3;
  }

  .globe-controls {
    position: static;
    z-index: auto;
    width: 100%;
    order: 4;
  }

  .globe-controls label {
    grid-template-columns: 44px minmax(0, 1fr) 58px;
  }

  .horizon {
    order: 5;
    gap: 8px;
  }

  .terrain-3d-actions {
    align-items: stretch;
    flex-direction: column;
    order: 6;
    margin-top: 0;
  }

  .terrain-3d-actions button {
    min-height: 42px;
  }

  .terrain-3d-actions span {
    text-align: left;
    line-height: 1.35;
  }

  .sidebar,
  .topbar,
  .dock-header {
    padding: 14px;
  }

  .topbar,
  .dock-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-box {
    left: 10px;
    right: 122px;
    grid-template-columns: minmax(0, 1fr);
  }

  .workspace {
    grid-template-rows: 0 minmax(0, 1fr) 0;
  }

  .topbar {
    min-height: 0;
    height: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    opacity: 0;
    pointer-events: none;
  }

  .auth-panel {
    padding: 10px;
  }

  .auth-modal {
    width: 100%;
    border-radius: 20px;
  }

  .auth-card {
    gap: 14px;
    padding: 42px 18px 24px;
  }

  .auth-logo {
    justify-content: flex-start;
  }

  .auth-logo-mark {
    width: 58px;
    height: 58px;
    border-radius: 18px;
  }

  .auth-logo strong {
    font-size: 2rem;
  }

  .auth-social,
  .auth-benefits {
    grid-template-columns: 1fr;
  }

  .auth-benefits div,
  .auth-benefits div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid #d7e2ef;
  }

  .auth-benefits div:first-child {
    border-top: 0;
  }

  .auth-visual-panel {
    min-height: 360px;
  }

  .auth-floating-icons {
    display: none;
  }

  th,
  td {
    padding: 10px 14px;
  }
}

@media (orientation: landscape) and (max-height: 600px) {
  .map-control-dock {
    right: 10px;
    top: 72px;
    bottom: auto;
    max-width: none;
    max-height: none;
    padding: 6px;
    overflow: visible;
  }

  .map-control-dock div {
    grid-template-columns: repeat(3, 38px);
    gap: 5px;
  }

  .map-control-dock button {
    width: 38px;
    height: 38px;
    min-height: 38px;
  }

  #dockFullscreen {
    grid-column: auto;
    width: 38px;
    padding: 0;
  }

  #dockFullscreen span {
    display: none;
  }

  .map-view-toolbar {
    top: auto;
    right: 150px;
    bottom: 16px;
    left: 10px;
    max-width: none;
    overflow-x: auto;
    padding: 5px;
  }

  .map-live-panel {
    top: 58px;
    right: 10px;
  }

  .sun-map-status {
    bottom: 128px;
  }

  .coordinate-box {
    bottom: 84px;
  }

  .map-viewing-scale {
    right: 4px;
    bottom: 14px;
  }

  body.navigation-focus .map-navigation-telemetry {
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    width: min(920px, calc(100% - 16px));
    gap: 5px;
    padding: 7px 9px;
  }

  body.navigation-focus .map-navigation-metrics {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 4px;
  }

  body.navigation-focus .map-navigation-metrics div {
    padding: 4px 5px;
  }

  body.navigation-focus .map-navigation-metrics span {
    font-size: 0.55rem;
  }

  body.navigation-focus .map-navigation-metrics strong {
    font-size: 0.68rem;
  }

  body.navigation-focus .map-navigation-legend {
    display: none;
  }

  body.navigation-focus .navigation-sensor-status {
    display: none;
  }
}

@media (max-width: 600px) and (orientation: portrait) {
  .map-control-dock {
    top: 292px;
    right: 10px;
    bottom: auto;
    max-width: none;
    max-height: none;
    padding: 6px;
    overflow: visible;
  }

  .map-control-dock div {
    grid-template-columns: repeat(3, 38px);
    gap: 5px;
  }

  .map-control-dock button {
    width: 38px;
    height: 38px;
    min-height: 38px;
  }

  #dockFullscreen {
    grid-column: auto;
    width: 38px;
    padding: 0;
  }

  #dockFullscreen span {
    display: none;
  }

  .map-view-toolbar {
    right: 10px;
    bottom: 60px;
  }

  .map-viewing-scale,
  body:not(.right-menu-collapsed) .map-viewing-scale,
  body.right-menu-collapsed .map-viewing-scale {
    right: 4px;
    bottom: 14px;
  }

  .coordinate-box {
    bottom: 14px;
    left: 4px;
  }

  .sun-map-status {
    bottom: 116px;
  }
}

/* Normal mobile map mode: keep tools available without covering the map center. */
@media (max-width: 900px), (orientation: landscape) and (max-height: 600px) {
  body.map-maximized {
    overflow: hidden;
  }

  body.map-maximized .app-shell {
    position: fixed;
    inset: 0;
    z-index: 1600;
  }

  body.directions-open .map-live-panel {
    backdrop-filter: none;
  }

  body.directions-open .sun-map-status,
  body.directions-open .coordinate-box,
  body.directions-open .map-view-toolbar {
    display: none;
  }

  body.map-maximized:not(.left-menu-collapsed) .search-box,
  body.map-maximized:not(.left-menu-collapsed) .map-compass,
  body.map-maximized:not(.left-menu-collapsed) .map-live-panel,
  body.map-maximized:not(.left-menu-collapsed) .map-control-dock,
  body.map-maximized:not(.left-menu-collapsed) .sun-map-status,
  body.map-maximized:not(.left-menu-collapsed) .coordinate-box,
  body.map-maximized:not(.left-menu-collapsed) .map-viewing-scale,
  body.map-maximized:not(.left-menu-collapsed) .map-hover-place-label {
    display: none;
  }

  body.map-maximized:not(.left-menu-collapsed) .map-view-toolbar {
    top: 14px;
    right: auto;
    bottom: auto;
    left: min(calc(100vw - 49px), 342px);
    z-index: 1920;
    max-width: none;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body.map-maximized:not(.left-menu-collapsed) .map-view-toolbar button:not(#toggleLeftMenu) {
    display: none;
  }

  body.map-maximized:not(.left-menu-collapsed) #toggleLeftMenu {
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    font-size: 0;
  }

  body.map-maximized:not(.left-menu-collapsed) #toggleLeftMenu::after {
    content: "X";
    font-size: 0.78rem;
    font-weight: 800;
  }

  .map-directions-popover {
    position: fixed;
    top: max(62px, env(safe-area-inset-top, 0px) + 12px);
    right: auto;
    bottom: auto;
    left: 50%;
    z-index: 1900;
    width: min(360px, calc(100vw - 20px));
    max-height: calc(100svh - 76px - env(safe-area-inset-bottom, 0px));
    padding: 13px;
    transform: translateX(-50%);
  }
}

@media (max-width: 600px) and (orientation: portrait) {
  .search-box {
    top: 8px;
    right: 8px;
    left: 48px;
    min-height: 42px;
    border-radius: 12px;
  }

  .search-box input {
    min-height: 40px;
    font-size: 0.78rem;
  }

  .map-compass {
    top: 59px;
    right: 9px;
    width: 50px;
    height: 50px;
  }

  .map-compass .compass-label {
    font-size: 0.53rem;
  }

  .map-compass .compass-ring-outer {
    inset: 6px;
  }

  .map-compass .compass-ring-inner {
    inset: 15px;
  }

  .map-compass .compass-needle {
    height: 40px;
    width: 3px;
  }

  .map-live-panel {
    top: 57px;
    right: auto;
    left: 48px;
    width: auto;
    grid-template-columns: repeat(7, 34px);
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
  }

  .map-live-action {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .map-live-traffic-card {
    top: calc(100% + 8px);
    right: auto;
    left: 0;
    width: min(270px, calc(100vw - 58px));
  }

  .map-live-year-popover {
    top: calc(100% + 8px);
    right: auto;
    left: 0;
  }

  .map-control-dock {
    top: 118px;
    right: 8px;
    bottom: auto;
    max-width: none;
    padding: 4px;
    border-radius: 12px;
  }

  .map-control-dock div {
    grid-template-columns: repeat(3, 32px);
    gap: 4px;
  }

  .map-control-dock button,
  #dockFullscreen {
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
  }

  .map-control-dock button svg {
    width: 15px;
    height: 15px;
  }

  .sun-map-status {
    right: 8px;
    bottom: 82px;
    left: 8px;
    max-width: none;
    min-height: 28px;
    padding: 6px 8px;
    overflow: hidden;
    font-size: 0.64rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .coordinate-box {
    right: 8px;
    bottom: 48px;
    left: 8px;
    max-width: none;
    min-height: 26px;
    overflow: hidden;
    padding: 5px 8px;
    font-size: 0.66rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .map-view-toolbar {
    right: auto;
    bottom: 7px;
    left: 7px;
    width: auto;
    gap: 4px;
    padding: 4px;
    overflow: visible;
    border-radius: 11px;
  }

  .map-view-toolbar button {
    min-height: 34px;
    padding: 5px 7px;
    font-size: 0.64rem;
  }

  .map-viewing-scale,
  body:not(.right-menu-collapsed) .map-viewing-scale,
  body.right-menu-collapsed .map-viewing-scale {
    right: 7px;
    bottom: 7px;
    gap: 3px;
    width: 92px;
    min-height: 42px;
    padding: 5px 7px;
    box-sizing: border-box;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
  }

  .map-viewing-scale strong {
    min-width: 0;
    max-width: 100%;
    justify-self: end;
    font-size: 0.62rem;
  }

  .map-viewing-scale span {
    width: 58px;
    min-width: 0;
    max-width: 100%;
    justify-self: end;
    box-sizing: border-box;
    height: 6px;
  }
}

@media (orientation: landscape) and (max-height: 600px) {
  .map-directions-popover {
    top: 8px;
    width: min(380px, calc(100vw - 164px));
    max-height: calc(100svh - 16px);
  }

  .search-box {
    top: 8px;
    right: 66px;
    left: 48px;
    min-height: 42px;
    border-radius: 12px;
  }

  .search-box input {
    min-height: 40px;
  }

  .map-compass {
    top: 8px;
    right: 9px;
    width: 48px;
    height: 48px;
  }

  .map-compass .compass-label {
    font-size: 0.52rem;
  }

  .map-compass .compass-ring-outer {
    inset: 6px;
  }

  .map-compass .compass-ring-inner {
    inset: 14px;
  }

  .map-compass .compass-needle {
    width: 3px;
    height: 38px;
  }

  .map-live-panel {
    top: 58px;
    right: 126px;
    width: auto;
    grid-template-columns: repeat(7, 32px);
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
  }

  .map-live-action {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .map-live-traffic-card {
    top: calc(100% + 8px);
    right: 0;
    width: 242px;
  }

  .map-control-dock {
    top: 61px;
    right: 8px;
    padding: 4px;
    border-radius: 12px;
  }

  .map-control-dock div {
    grid-template-columns: repeat(3, 32px);
    gap: 4px;
  }

  .map-control-dock button,
  #dockFullscreen {
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
  }

  .map-control-dock button svg {
    width: 15px;
    height: 15px;
  }

  .coordinate-box {
    bottom: 46px;
    left: 7px;
    max-width: calc(100% - 190px);
    min-height: 26px;
    overflow: hidden;
    padding: 5px 8px;
    font-size: 0.65rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sun-map-status {
    bottom: 78px;
    left: 48px;
    max-width: min(410px, calc(100% - 231px));
    min-height: 27px;
    overflow: hidden;
    padding: 6px 8px;
    font-size: 0.63rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .map-view-toolbar {
    right: auto;
    bottom: 7px;
    left: 7px;
    width: auto;
    gap: 4px;
    padding: 4px;
    overflow: visible;
    border-radius: 11px;
  }

  .map-view-toolbar button {
    min-height: 33px;
    padding: 5px 8px;
    font-size: 0.64rem;
  }

  .map-viewing-scale,
  body:not(.right-menu-collapsed) .map-viewing-scale,
  body.right-menu-collapsed .map-viewing-scale {
    right: 7px;
    bottom: 7px;
    width: 96px;
    min-height: 41px;
    gap: 3px;
    padding: 5px 7px;
    box-sizing: border-box;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
  }

  .map-viewing-scale strong {
    min-width: 0;
    max-width: 100%;
    justify-self: end;
    font-size: 0.62rem;
  }

  .map-viewing-scale span {
    width: 60px;
    min-width: 0;
    max-width: 100%;
    justify-self: end;
    box-sizing: border-box;
    height: 6px;
  }
}

/* Keep scale orientation stable while panels and map modes open around it. */
.map-viewing-scale,
body:not(.right-menu-collapsed) .map-viewing-scale,
  body.right-menu-collapsed .map-viewing-scale,
  body.directions-open .map-viewing-scale,
  body.map-maximized:not(.left-menu-collapsed) .map-viewing-scale {
  right: calc(7px + env(safe-area-inset-right, 0px));
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  display: grid;
}

body.navigation-focus .map-viewing-scale {
  right: calc(7px + env(safe-area-inset-right, 0px));
  bottom: var(--navigation-scale-clearance, calc(112px + env(safe-area-inset-bottom, 0px)));
  display: grid;
  z-index: 1810;
}

@media (orientation: landscape) and (max-height: 600px) {
  body.navigation-focus .map-viewing-scale {
    bottom: var(--navigation-scale-clearance, calc(82px + env(safe-area-inset-bottom, 0px)));
  }
}

@media (max-width: 600px) {
  .navigation-rotation-control {
    right: calc(10px + env(safe-area-inset-right, 0px));
    width: 52px;
    min-height: 60px;
    border-radius: 14px;
  }

  .navigation-rotation-control svg {
    width: 25px;
    height: 25px;
  }

  .directions-pinpoint-panel {
    bottom: calc(62px + env(safe-area-inset-bottom, 0px));
  }
}

@media (orientation: landscape) and (max-height: 600px) {
  .directions-pinpoint-panel {
    right: auto;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    left: calc(8px + env(safe-area-inset-left, 0px));
    width: min(278px, calc(50vw - 14px));
    padding: 9px;
    gap: 7px;
    transform: none;
  }

  .directions-pinpoint-actions button {
    min-height: 32px;
  }
}

@media (orientation: landscape) and (max-height: 600px) {
  .navigation-rotation-control {
    right: calc(8px + env(safe-area-inset-right, 0px));
    width: 48px;
    min-height: 56px;
    border-radius: 13px;
  }
}
