.full-map { background: #e4e9dd; }
.map-canvas.leaflet-container { background: #e4e9dd; }
.leaflet-container { font-family: Inter, sans-serif; }
.leaflet-tile-pane { filter: saturate(1.12) contrast(1.1); }
.leaflet-relief-pane { filter: contrast(1.3); }
.pale-relief { filter: sepia(.32) hue-rotate(32deg) saturate(.65); }
.russian-map-label { background: transparent; border: 0; text-align: center; }
.russian-map-label span {
  display: inline-block;
  color: #263529;
  font: 600 12px/1.3 Inter, sans-serif;
  padding: 2px 6px;
  border-radius: 4px;
  background: #ffffffe0;
  box-shadow: 0 1px 4px #20392718;
}
.region-label span { color: #294238; font-size: 15px; letter-spacing: .2px; }
.map-breadcrumb { display: flex; flex-direction: column; gap: 2px; }
.map-breadcrumb span { font-size: 10px; color: #64746a; }
.map-filters button { font-size: 12px; color: var(--green); font-weight: 600; }
.map-filters { top: 88px; }
.map-boundary-note { font-size: 10px; color: #727d74; line-height: 1.45; }
.layer-panel { width: 248px; padding: 18px; }
.layer-panel .line { border-top-color: #cf8a20; }
.layer-panel .dash { border-top-color: #8d61a3; }
.layer-panel > label { margin: 14px 0 8px; }
.layer-panel hr { margin: 15px 0; }
.basemap-controls { margin-top: 10px; padding-bottom: 12px; }
.map-detail {
  grid-template-columns: 150px minmax(180px,.85fr) minmax(260px,1.25fr);
  gap: 20px;
  padding: 20px;
  right: 288px;
  bottom: 24px;
  align-items: stretch;
}
.map-detail .landscape { height: auto; min-height: 230px; }
.map-object-info { display: flex; flex-direction: column; min-width: 0; }
.map-object-info .detail-title h2 { font-size: 22px; }
.map-object-info > .tag { align-self: start; margin-top: 6px; }
.map-object-info > .outline { margin-top: auto; align-self: start; }
.route-planner { border-left: 1px solid var(--border); padding-left: 20px; }
.planner-heading { display: flex; align-items: center; gap: 8px; }
.planner-heading h3 { margin: 0; font-size: 15px; }
.route-symbol { font-size: 23px; color: var(--green); line-height: 1; }
.route-destination { color: #6b756f; font-size: 11px; margin: 5px 0 10px; }
.route-destination strong { color: var(--green); }
.route-planner > label { font-size: 11px; font-weight: 600; display: block; margin-bottom: 4px; }
.route-planner select { width: 100%; font-size: 12px; padding: 7px 9px; }
.start-tools { display: flex; gap: 7px; margin: 8px 0; }
.start-tools button { flex: 1; font-size: 11px; padding: 7px; color: var(--green); }
.start-tools button[aria-pressed=true] { background: var(--green); color: white; }
.coordinate-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.coordinate-inputs label { font-size: 10px; color: #6b756f; }
.coordinate-inputs input { width: 100%; padding: 6px 8px; border: 1px solid var(--border); border-radius: 5px; font: 11px Inter,sans-serif; margin-top: 3px; }
.route-actions { display: flex; gap: 7px; margin-top: 9px; }
.route-actions select { min-width: 0; flex: 1; font-size: 11px; }
.route-actions .primary { border: 0; font-size: 11px; padding: 8px 11px; }
.route-actions .primary:hover { background: #205749; color: white; }
.route-actions button:disabled { opacity: .65; cursor: wait; }
.route-actions #clear-route { padding: 5px 8px; font-size: 17px; }
#route-result { font-size: 11px; line-height: 1.5; color: #556b5d; margin: 9px 0 0; }
.pick-start, .pick-start .leaflet-interactive { cursor: crosshair !important; }
.start-tooltip { font: 600 11px Inter,sans-serif; border: 1px solid #d4ac58; background: #fff9e8; color: #856024; }
.leaflet-control-attribution { max-width: 500px; max-height: 32px; overflow: auto; font-size: 8px !important; }
#map-status { bottom: 3px; left: 90px; max-width: 65%; font-size: 10px; }
@media (max-width: 1250px) {
  .map-detail { grid-template-columns: minmax(150px,.8fr) minmax(260px,1.2fr); gap: 16px; right: 280px; }
  .map-detail > .landscape { display: none; }
}
@media (max-width: 950px) {
  .map-detail { right: 20px; }
  .layer-panel { width: 215px; max-height: 315px; }
  .full-map { min-height: 800px; }
}
@media (max-width: 650px) {
  .full-map { min-height: 960px; height: auto; }
  #main-map { bottom: 390px; }
  .layer-panel { right: 10px; top: 145px; width: 170px; max-height: 245px; padding: 12px; }
  .map-breadcrumb { left: 10px; top: 12px; right: 10px; font-size: 12px; }
  .map-filters { top: 79px; left: 10px; right: 10px; }
  .map-filters select { max-width: 210px; min-width: 0; width: 55%; font-size: 12px; }
  .map-filters button { white-space: nowrap; font-size: 11px; }
  .map-detail { grid-template-columns: 1fr; bottom: 20px; left: 10px; right: 10px; gap: 14px; padding: 16px; }
  .map-object-info > p, .map-object-info > .tag, .map-object-info > .outline { display: none; }
  .map-object-info .detail-title h2 { font-size: 20px; }
  .route-planner { padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--border); }
  .route-planner select { font-size: 13px; }
  .coordinate-inputs input { font-size: 13px; }
  .start-tools button { font-size: 12px; }
  .leaflet-control-attribution { max-width: 250px; }
  #map-status { top: 555px; bottom: auto; left: 10px; max-width: calc(100% - 20px); }
}

/* Map workspace: quiet surfaces and a compact explorer dock. */
.map-mode .full-map { background: #dce7de; min-height: 760px; }
.map-mode .leaflet-tile-pane { filter: saturate(.78) contrast(.96) brightness(1.08); }
.map-mode .leaflet-relief-pane { filter: contrast(1.05); }
.map-mode .map-breadcrumb,
.map-mode .map-filters,
.map-mode .layer-panel,
.map-mode .map-detail { border: 1px solid #ffffffbc; background: #fffffff2; box-shadow: 0 8px 32px #18372b16, 0 1px 3px #18372b0d; backdrop-filter: blur(16px); }
.map-mode .map-breadcrumb { left: 24px; top: 24px; padding: 15px 19px; border-radius: 16px; gap: 4px; }
.map-mode .map-breadcrumb b { color: #213e35; font-size: 16px; letter-spacing: -.35px; }
.map-mode .map-breadcrumb span { font-size: 11px; color: #718078; }
.map-mode .map-filters { left: 24px; top: 111px; padding: 6px; border-radius: 13px; gap: 5px; }
.map-mode .map-filters select { border: 0; background: transparent; max-width: 220px; }
.map-mode .map-filters button { background: #edf4f0; border: 0; border-radius: 9px; }
.map-mode .layer-panel { right: 24px; top: 24px; width: 250px; padding: 21px; border-radius: 18px; max-height: calc(100% - 60px); }
.map-mode .layer-panel > b { display: block; font-size: 16px; color: #213e35; }
.map-mode .basemap-controls { margin-top: 14px; padding-bottom: 13px; }
.map-mode .basemap-controls select { background: #f0f5f2; border-color: #e1e9e3; border-radius: 9px; padding: 10px; }
.map-mode .layer-panel label { color: #385047; font-size: 12px; }
.map-mode .layer-panel > label { font-weight: 600; }
.map-mode .layer-legend { padding-left: 23px; color: #718078; font-size: 11px; }
.map-mode .layer-legend p { margin: 8px 0; }
.map-mode input[type=range] { accent-color: #28665b; height: 5px; }
.map-mode .map-boundary-note { padding: 10px; background: #f0f5f2; border-radius: 9px; margin-bottom: 0; }
.map-mode .map-detail { left: 24px; right: 298px; bottom: 32px; border-radius: 20px; padding: 18px; gap: 20px; grid-template-columns: 120px minmax(145px,.8fr) minmax(245px,1.2fr); }
.map-mode .map-detail > .landscape { border-radius: 12px; min-height: 225px; overflow: hidden; }
.map-mode .map-object-info .detail-title h2 { font-size: 25px; letter-spacing: -.7px; color: #213e35; }
.map-mode .map-object-info p { font-size: 12px; color: #6a7b72; }
.map-mode .map-object-info > .tag { background: #edf4f0; color: #527363; border-radius: 6px; font-size: 10px; }
.map-mode .map-object-info > .outline { border-color: #cfddd5; border-radius: 9px; font-size: 11px; padding: 9px 11px; }
.map-mode .detail-title .icon-button { border: 0; background: transparent; padding: 4px; color: #6d8177; }
.map-mode .route-planner { border-color: #e5ece7; padding-left: 20px; }
.map-mode .planner-heading h3 { color: #284a3e; font-size: 14px; }
.map-mode .route-planner select,
.map-mode .coordinate-inputs input { border-color: #dfe8e2; background: #f7faf8; border-radius: 8px; }
.map-mode .start-tools button { border-color: #dfe8e2; border-radius: 8px; background: #fff; }
.map-mode .start-tools button[aria-pressed=true] { background: #28665b; }
.map-mode .route-actions .primary { border-radius: 8px; box-shadow: 0 3px 9px #28665b22; }
.map-mode #route-result { font-size: 11px; margin-bottom: 0; }
.map-mode .russian-map-label span { border-radius: 6px; background: #ffffffdb; color: #29493b; box-shadow: 0 2px 6px #193c2820; padding: 3px 7px; font-size: 11px; }
.map-mode .region-label span { background: transparent; box-shadow: none; font-size: 15px; text-shadow: 0 1px 3px white, 0 -1px 3px white; }
.map-mode .leaflet-control-zoom { margin-left: 24px; margin-top: 175px; border: 0; border-radius: 12px; overflow: hidden; box-shadow: 0 5px 20px #18372b20; }
.map-mode .leaflet-control-zoom a { width: 38px; height: 38px; line-height: 38px; color: #28665b; border-color: #e8eee9; }
.map-mode #map-status:empty { display: none; }
.map-mode #map-status { border-radius: 6px; padding: 3px 8px; }
@media (max-width: 1250px) {
  .map-mode .map-detail { grid-template-columns: minmax(145px,.8fr) minmax(245px,1.2fr); }
  .map-mode .map-detail > .landscape { display: none; }
}
@media (max-width: 950px) {
  .map-mode .full-map { min-height: 860px; }
  .map-mode .layer-panel { width: 210px; max-height: 360px; padding: 16px; }
  .map-mode .map-detail { right: 24px; }
  .map-mode .map-breadcrumb { max-width: calc(100% - 270px); }
  .map-mode .map-breadcrumb b { font-size: 14px; }
}
@media (max-width: 650px) {
  .map-mode .full-map { min-height: 1040px; }
  .map-mode #main-map { bottom: 405px; }
  .map-mode .map-breadcrumb { left: 12px; right: 12px; top: 12px; max-width: none; padding: 12px 15px; border-radius: 12px; }
  .map-mode .map-filters { top: 94px; left: 12px; right: 12px; }
  .map-mode .map-filters select { flex: 1; max-width: none; }
  .map-mode .layer-panel { top: 156px; right: 12px; width: 175px; max-height: 290px; padding: 13px; border-radius: 14px; }
  .map-mode .layer-panel > b { font-size: 14px; }
  .map-mode .map-detail { left: 12px; right: 12px; bottom: 24px; grid-template-columns: 1fr; padding: 16px; gap: 12px; border-radius: 16px; }
  .map-mode .route-planner { border-left: 0; padding: 12px 0 0; }
  .map-mode .map-object-info .detail-title h2 { font-size: 22px; }
  .map-mode .leaflet-control-zoom { margin-left: 12px; }
  .map-mode #map-status { top: 585px; bottom: auto; left: 12px; }
}

/* Explorer list and two-column object dock. */
.map-mode .map-detail { grid-template-columns: minmax(170px,.8fr) minmax(260px,1.2fr); max-width: 820px; }
.map-mode .map-object-info .eyebrow { margin: 0 0 6px; }
.map-mode .coordinate-note { font-size: 10px; line-height: 1.4; padding: 8px 0; color: #889087; max-width: 260px; }
.map-object-list { position: absolute; z-index: 500; left: 24px; top: 175px; width: 230px; border-radius: 14px; overflow: hidden; background: #fffffff0; box-shadow: 0 6px 25px #18372b14; backdrop-filter: blur(14px); border: 1px solid #ffffffbf; }
.map-object-list summary { cursor: pointer; font-size: 12px; font-weight: 650; color: #36594a; padding: 14px 15px; }
.map-object-list summary span { float: right; color: #7c9386; }
#map-object-list { max-height: 235px; overflow-y: auto; padding: 0 6px 6px; }
#map-object-list button { display: flex; flex-direction: column; text-align: left; width: 100%; border: 0; background: transparent; border-radius: 8px; padding: 9px 10px; gap: 2px; }
#map-object-list button:hover,#map-object-list button[aria-pressed=true] { background: #eaf3ee; }
#map-object-list button span { font-size: 12px; font-weight: 600; color: #375a49; }
#map-object-list button small { font-size: 10px; color: #7b8a80; }
#map-object-list > p { padding: 10px; font-size: 12px; }
.map-mode .leaflet-control-zoom { margin-top: 460px; }
.map-mode .leaflet-container { background-color: #e2eadd; background-image: repeating-radial-gradient(ellipse at 70% 40%, transparent 0, transparent 40px, #bdd0b750 42px, transparent 44px, transparent 60px); }
@media(max-width:950px) { .map-mode .map-object-list { width: 200px; } .map-mode .map-detail { max-width: none; } }
@media(max-width:650px) { .map-mode .map-object-list { left: 12px; top: 156px; width: calc(100% - 211px); min-width: 125px; } #map-object-list { max-height: 230px; } .map-mode .map-detail { grid-template-columns: 1fr; } .map-mode .leaflet-control-zoom { margin-top: 475px; } .map-mode .map-object-info > .coordinate-note { display: block; margin: 0; padding: 5px 0; max-width: none; } }
.map-mode .map-breadcrumb > .eyebrow { display: none; }
.map-mode .map-filters select { width: 220px; }
@media(max-width:650px) { .map-mode .map-filters select { width: 55%; } }
.layer-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.layer-panel-heading b { font-size: 15px; color: #213e35; }
#layers-toggle { padding: 2px 7px; background: transparent; border: 0; font-size: 18px; color: #527363; }
.layer-panel.is-collapsed #layer-panel-body { display: none; }
.map-mode .layer-panel.is-collapsed { max-height: none; overflow: visible; }
@media(max-width:650px) { .map-mode .full-map:has(.map-detail[hidden]) { min-height: 740px; height: calc(100dvh - 183px); } .map-mode .full-map:has(.map-detail[hidden]) #main-map { bottom: 0; } .map-mode .map-object-list { width: 160px; } .map-mode .layer-panel { width: 178px; } .layer-panel-heading b { font-size: 12px; } }
/* One measured explorer surface keeps search, heading and list together. */
.map-explorer { position: absolute; z-index: 500; top: 24px; left: 24px; width: 300px; border-radius: 17px; background: #fffffff2; border: 1px solid #ffffffbc; box-shadow: 0 8px 32px #18372b16; backdrop-filter: blur(16px); overflow: hidden; }
.map-mode .map-explorer .map-breadcrumb { position: static; max-width: none; width: auto; padding: 17px 18px 10px; box-shadow: none; border: 0; border-radius: 0; background: transparent; }
.map-mode .map-explorer .map-breadcrumb b { font-size: 14px; }
.map-mode .map-explorer .map-filters { position: static; padding: 6px; margin: 0 12px 6px; box-shadow: none; border: 1px solid #e4ece6; border-radius: 10px; background: white; gap: 0; }
.map-mode .map-explorer .map-filters select { width: 55%; flex: 1; font-size: 12px; padding: 8px 4px; }
.map-mode .map-explorer .map-filters button { font-size: 10px; padding: 9px 7px; white-space: nowrap; }
.map-mode .map-explorer .map-object-list { position: static; width: auto; min-width: 0; box-shadow: none; border: 0; border-top: 1px solid #e8eee9; background: transparent; border-radius: 0; backdrop-filter: none; }
.map-mode .map-explorer #map-object-list { max-height: 210px; }
.map-mode .leaflet-container { background-image: none; }
@media(max-width:950px) { .map-explorer { width: 260px; } }
@media(max-width:650px) { .map-explorer { top: 12px; left: 12px; right: 12px; width: auto; border-radius: 13px; } .map-mode .map-explorer .map-breadcrumb { padding: 12px 14px 8px; } .map-mode .map-explorer .map-breadcrumb b { font-size: 13px; } .map-mode .map-explorer .map-filters { margin-bottom: 8px; } .map-mode .layer-panel { top: 188px; } .map-mode .map-explorer #map-object-list { max-height: 130px; } .map-mode .leaflet-control-zoom { margin-top: 310px; } }
.map-mode .map-object-info > p { margin: 6px 0; }
.map-mode .coordinate-note { padding: 3px 0; }
.map-mode .map-detail { padding: 16px; }
@media(max-width:650px) { .map-mode .coordinate-note { display: block; max-width: none; } }
@media(max-width:650px) {
  .map-mode .layer-panel { top: auto; bottom: 430px; max-height: 250px; }
  .map-mode .full-map:has(.map-detail[hidden]) .layer-panel { bottom: 24px; }
}

/* Cartographic explorer with restrained surfaces around the terrain. */
.map-mode .full-map { background: #e6eddf; }
.terrain-map-canvas { position: absolute; inset: 0; z-index: 1; background: #e6eddf; }
.map-mode .map-explorer { width: 280px; border-radius: 13px; box-shadow: 0 4px 20px #37492f12; background: #fffffff0; }
.map-mode .layer-panel { width: 248px; padding: 16px; border-radius: 13px; box-shadow: 0 4px 20px #37492f12; }
.layer-panel-heading { margin-bottom: 12px; }
.map-view-switch { display: flex; gap: 4px; padding: 4px; background: #edf2e9; border-radius: 9px; }
.map-view-switch button { flex: 1; border: 0; background: transparent; padding: 8px; font-size: 12px; font-weight: 650; color: #63816d; border-radius: 6px; }
.map-view-switch button[aria-pressed=true] { background: #fff; color: #285b46; box-shadow: 0 2px 5px #32492b10; }
.map-view-switch button:disabled { opacity: .45; cursor: default; }
.mode-badge { font-size: 9px; font-weight: 400; margin-left: 4px; }
.terrain-status { font-size: 10px; color: #80917e; line-height: 1.5; margin: 9px 0 13px; }
.terrain-controls { border-top: 1px solid #e5ebdf; border-bottom: 1px solid #e5ebdf; padding: 12px 0; }
.terrain-control-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.terrain-control-label label { margin: 0 !important; font-size: 11px !important; }
.terrain-control-label output { font-size: 10px; font-variant-numeric: tabular-nums; color: #69886d; }
.terrain-controls input[type=range] { width: 100%; margin: 8px 0 14px; }
.terrain-reset { font-size: 10px; padding: 6px 9px; color: #557b5e; border-color: #dfe8d8; background: #f7faf3; width: 100%; }
.map-mode .basemap-controls { margin-top: 0; padding-bottom: 12px; }
.map-mode .basemap-controls select { font-size: 11px; background: #f6f8f1; border-color: #e4e9db; }
.map-layer-options summary { font-size: 11px; font-weight: 600; cursor: pointer; padding: 10px 0; color: #44654e; }
.map-layer-options label { display: flex; gap: 8px; margin: 12px 0 8px; }
.map-mode .map-boundary-note { background: #f4f6ed; font-size: 9px; }
.map-mode .map-detail { max-width: 720px; padding: 16px; border-radius: 14px; box-shadow: 0 4px 20px #37492f12; grid-template-columns: minmax(150px,.85fr) minmax(245px,1.15fr); }
.map-mode .map-object-info .detail-title h2 { font-size: 21px; letter-spacing: -.45px; }
.map-mode .map-object-info > p { font-size: 11px; }
.map-mode .coordinate-note { font-size: 9px !important; }
.map-mode .map-explorer #map-object-list { max-height: 180px; }
.map-mode .leaflet-tile-pane { filter: brightness(.68) saturate(.78) contrast(.97); }
.map-mode .leaflet-relief-pane { filter: none; }
.map-mode .maplibregl-ctrl-top-left { top: 220px; left: 14px; }
.map-mode .maplibregl-ctrl-group { border-radius: 9px; overflow: hidden; box-shadow: 0 3px 12px #37492f18; }
.map-mode .maplibregl-ctrl-attrib { font-size: 9px; }
@media(max-width:950px) { .map-mode .map-explorer { width: 250px; } .map-mode .layer-panel { width: 210px; } .map-mode .map-detail { max-width: none; } }
@media(max-width:650px) { .map-mode .map-explorer { width: auto; } .map-mode .layer-panel { width: 188px; padding: 12px; max-height: 285px; } .map-mode .map-detail { grid-template-columns: 1fr; } .map-mode .maplibregl-ctrl-top-left { top: 180px; left: 2px; } .terrain-controls { padding: 9px 0; } }
.map-view-switch { align-items: center; padding: 5px 8px; gap: 8px; }
.map-view-switch label { font-size: 10px !important; margin: 0 !important; white-space: nowrap; }
.map-view-switch select { min-width: 0; flex: 1; border: 0; padding: 7px 9px; color: #285b46; background: white; font-size: 11px; font-weight: 600; }
#terrain3d-map { z-index: 2; }
.map-mode.is-terrain-3d .basemap-controls { display: none; }
.map-mode .terrain-controls input:disabled { opacity: .45; }
/* Leaflet panes need their own stacking context below the WebGL canvas. */
.map-mode #main-map { z-index: 0; isolation: isolate; }
.map-mode #main-map[aria-hidden=true] { visibility: hidden; pointer-events: none; }
.map-mode #terrain3d-map { z-index: 2; }
.map-mode .full-map:has(#main-map[aria-hidden=true]) #map-status { display: none; }
.terrain-object-label { font-family: Inter,sans-serif !important; font-size: 11px !important; box-shadow: 0 2px 7px #2b492417; }

/* Fullscreen is the map surface itself; the surrounding portal stays outside. */
.map-fullscreen { position: absolute; z-index: 510; left: 24px; top: 330px; width: 38px; height: 38px; display: grid; place-items: center; padding: 9px; border: 1px solid #e1e8d9; border-radius: 9px; background: #ffffffed; color: #386348; box-shadow: 0 3px 12px #37492f18; }
.map-fullscreen svg { width: 20px; height: 20px; }
.map-fullscreen[aria-pressed=true] { background: #edf5e8; border-color: #b3c9aa; }
.full-map:fullscreen,.map-mode .full-map.map-fullscreen-fallback { width: 100vw; height: 100dvh; min-height: 0 !important; max-height: none; margin: 0; overflow: hidden; }
.map-mode .full-map.map-fullscreen-fallback { position: fixed; inset: 0; z-index: 2500; }
.map-mode .full-map.is-map-fullscreen .map-explorer { width: 270px; }
.map-mode .full-map.is-map-fullscreen .map-detail { max-width: 680px; }
.map-mode .full-map.is-map-fullscreen .layer-panel { max-height: calc(100% - 70px); }
@media(max-width:650px) {
  .map-fullscreen { left: 12px; top: 290px; }
  .map-mode .full-map.is-map-fullscreen .map-explorer { right: 70px; width: auto; }
  .map-mode .full-map.is-map-fullscreen .map-breadcrumb span { display: none; }
  .map-mode .full-map.is-map-fullscreen .map-breadcrumb { padding-bottom: 8px; }
  .map-mode .full-map.is-map-fullscreen .map-object-list { display: none; }
  .map-mode .full-map.is-map-fullscreen .map-fullscreen { top: 12px; left: auto; right: 12px; }
  .map-mode .full-map.is-map-fullscreen .layer-panel { bottom: 50px !important; max-height: 260px; }
  .map-mode .full-map.is-map-fullscreen .map-detail { max-height: 48dvh; overflow: auto; }
}
.map-mode .full-map.is-map-fullscreen { height: 100dvh !important; min-height: 0 !important; }
.map-mode .terrain-object-label { background: #fffef7 !important; color: #203b2b !important; border: 1px solid #73896b !important; font-weight: 700 !important; box-shadow: 0 2px 7px #223c2940, 0 0 0 2px #ffffffb8 !important; }
.map-mode .terrain-object-label[aria-pressed=true] { background: #24583d !important; color: #fff !important; border-color: #fff !important; box-shadow: 0 2px 10px #173b3566, 0 0 0 3px #d4e6bc !important; }
.map-mode .terrain-object-label:focus-visible { outline: 3px solid #d5a64b; outline-offset: 3px; }
/* A marker selects first; routing and reading are explicit actions. */
.map-mode .map-detail:not(.route-open) { max-width: 390px; grid-template-columns: minmax(0,1fr); }
.map-mode .map-detail.route-open { max-width: 790px; grid-template-columns: minmax(210px,1fr) minmax(290px,1fr); }
.map-mode .map-object-info .tags { margin: 8px 0; }
.map-mode .map-object-excerpt { font-size: 13px; line-height: 1.7; color: #405e49; margin: 8px 0 14px; }
.map-mode .map-object-info > p { color: #4d6757; font-size: 12px; }
.map-object-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.map-object-actions .primary,.map-object-actions .outline { margin: 0; font-size: 12px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; flex: 1; white-space: nowrap; }
.map-mode .coordinate-note { color: #637861; font-size: 11px !important; line-height: 1.65; }
.map-mode .route-planner { color: #3e5a48; }
.map-mode .route-planner input,.map-mode .route-planner select { font-size: 12px; }
.map-mode .map-object-info .detail-title h2 { font-size: 24px; line-height: 1.25; }
@media(max-width:950px) { .map-mode .map-detail.route-open { max-width: none; grid-template-columns: minmax(180px,1fr) minmax(240px,1fr); } }
@media(max-width:650px) {
 .map-mode .map-detail:not(.route-open),.map-mode .map-detail.route-open { max-width: none; grid-template-columns: minmax(0,1fr); }
 .map-mode .map-object-info .detail-title h2 { font-size: 23px; }
 .map-mode .map-object-info > p { font-size: 13px; }
 .map-object-actions { gap: 9px; } .map-object-actions .primary,.map-object-actions .outline { min-height: 42px; }
}
@media(max-width:650px) { .map-mode .map-object-info > .map-object-excerpt { display: block; margin: 8px 0 12px; } }
.route-context { border-top: 1px solid #dfe7d8; padding-top: 12px; margin-top: 14px; }
.route-context h4 { margin: 0 0 10px; font-size: 13px; }
.route-context label { display: block; color: #55705c; font-size: 11px; margin-bottom: 6px; }
.route-context select { width: 100%; }
.route-context-list { margin: 12px 0; padding-left: 18px; max-height: 210px; overflow-y: auto; }
.route-context-list li { padding: 8px 0; border-bottom: 1px solid #e8eee0; }
.route-context-list a { color: #245c41; font-size: 12px; font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.route-context-list p,.route-context-note { font-size: 11px !important; line-height: 1.65; color: #536b55; margin: 6px 0; }
.route-context-list small { color: #647763; font-size: 10px; }
.map-mode .map-detail.route-open:has(.route-context:not([hidden])) { max-height: calc(100% - 230px); overflow-y: auto; }
@media(max-width:650px) { .map-mode .map-detail.route-open:has(.route-context:not([hidden])) { max-height: none; overflow: visible; } .map-mode .full-map.is-map-fullscreen .map-detail.route-open { max-height: 48dvh; overflow: auto; } }
.route-context-list .route-coordinate-source { display: block; font-size: 10px; font-weight: 500; margin-top: 6px; }
/* Soft geographic relief and floating controls. */
.leaflet-tile-pane { filter: saturate(.85) contrast(.96); }
.terrain-base { filter: none; }
.russian-map-label span { background: #fffffff0; color: #304c46; border-radius: 7px; padding: 3px 7px; font-weight: 550; box-shadow: 0 2px 8px #1b41351a; }
.region-label span { background: transparent; box-shadow: none; font-size: 13px; letter-spacing: 1px; text-shadow: 0 1px 3px white; }
.leaflet-interactive { filter: drop-shadow(0 2px 3px #254e4538); }
.leaflet-tooltip { border: 1px solid #e2ebe6; border-radius: 9px; padding: 7px 10px; color: #244d43; box-shadow: 0 4px 18px #244d4320; }
.leaflet-control-zoom { border: 1px solid #ffffffb8 !important; border-radius: 12px !important; overflow: hidden; box-shadow: 0 4px 20px #244d4320 !important; }
.leaflet-control-zoom a { color: #31574e !important; background: #ffffffed !important; width: 36px !important; height: 36px !important; line-height: 36px !important; }
.map-mode .layer-panel,.map-mode .map-detail,.map-mode .map-explorer { background: #fffffff2; border: 1px solid #ffffffd9; border-radius: 18px; box-shadow: 0 8px 32px #244d4317; backdrop-filter: blur(12px); }
.map-mode .map-explorer { padding: 16px; }
.map-mode .map-object-list { background: transparent; box-shadow: none; border-color: #e1ebe4; border-radius: 12px; }
.map-mode .map-object-list button { border-radius: 9px; margin: 3px 0; }
.map-mode .map-object-list button[aria-pressed=true] { background: #e7f2ec; color: #235d49; }
.map-mode .layer-panel select,.map-mode .map-filters select { border: 1px solid #dce7e0; border-radius: 10px; background: #f8fbf9; min-height: 38px; }
.map-mode input[type=range] { accent-color: #438d73; }
.home .preview-map { position: relative; isolation: isolate; overflow: hidden; border: 5px solid #ffffffc9; border-radius: 24px; box-shadow: 0 12px 40px #315c4820; }
.home .mini-map-open { position: absolute; top: 14px; right: 14px; z-index: 600; display: flex; align-items: center; gap: 16px; padding: 12px 16px; background: #fffffff2; border: 1px solid #ffffff; border-radius: 12px; color: #315d4d; font-size: 12px; font-weight: 650; box-shadow: 0 4px 16px #21483517; }
.home .mini-map-open:hover { background: #e7f3eb; }
.home .mini-map-open:focus-visible { outline: 3px solid #438d73; outline-offset: 3px; }
.home .preview-map .leaflet-control-zoom { margin: 14px; }
@media(max-width:650px) { .map-mode .map-explorer { padding: 10px; border-radius: 14px; } .home .mini-map-open { padding: 10px 12px; top: 10px; right: 10px; } }
.home #mini-map .leaflet-tile-pane { filter: saturate(.82) contrast(.95) brightness(1.04); }
.home .preview-map { border-width: 3px; border-radius: 20px; }
.home .mini-map-open { gap: 9px; padding: 11px 13px; font-size: 11px; }
.home .mini-map-open svg { width: 18px; height: 18px; }
.home #mini-map .region-label { display: none; }
.home #mini-map .leaflet-control-attribution { max-width: 380px; max-height: 18px; background: #ffffffdf; }
.home .preview-map #map-status { position: absolute; left: 12px; right: 12px; bottom: 24px; width: fit-content; max-width: calc(100% - 24px); padding: 6px 9px; border-radius: 8px; background: #fffffff0; color: #416355; font-size: 10px; box-shadow: 0 2px 8px #244d4310; pointer-events: none; }
.home .preview-map #map-status:empty { display: none; }
