:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #15171a;
  background: #eef0f2;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body, .app-shell, #map {
  width: 100%;
  height: 100%;
  margin: 0;
}

body { overflow: hidden; }

.app-shell {
  position: relative;
  isolation: isolate;
  background: #eef1ef;
}

#map { position: absolute; inset: 0; }

.leaflet-container {
  font: inherit;
  background: #eef1ef;
  outline: none;
}

.leaflet-control-container { display: block; }
.leaflet-tile-pane { filter: saturate(.48) contrast(.88) brightness(1.12); }
.leaflet-tile-pane.terrain-mode { filter: saturate(.78) contrast(1.02) brightness(1.04); }

.brand-card,
.detail-breadcrumbs,
.search-card,
.view-switch,
.map-status,
.map-tools,
.zoom-hint,
.loading-card,
.search-message,
.well-card,
.depth-legend,
.attribution-note {
  position: absolute;
  z-index: 1200;
}

.detail-breadcrumbs { top: 24px; left: 105px; display: none; align-items: center; gap: 13px; height: 54px; padding: 0 18px; color: #55647a; background: rgba(255,255,255,.96); border: 1px solid #d8e0ea; border-radius: 12px; box-shadow: 0 10px 28px rgba(17,35,60,.14); font-size: 13px; }
.detail-breadcrumbs.visible { display: flex; }
.detail-breadcrumbs b { color: #9aa6b6; }
.detail-breadcrumbs strong { color: #17243a; }
.detail-mode .brand-card { width: 66px; min-width: 66px; padding: 7px; }
.detail-mode .brand-card > div:last-child { display: none; }
.detail-mode .brand-mark { width: 50px; height: 50px; }
.map-scale { position: absolute; z-index: 1200; right: 24px; bottom: 28px; display: flex; align-items: flex-end; gap: 5px; height: 36px; padding: 8px 12px; color: #27344a; background: rgba(255,255,255,.94); border: 1px solid #d8e0ea; border-radius: 9px; box-shadow: 0 8px 22px rgba(17,35,60,.12); font-size: 10px; }
.map-scale i { position: relative; width: 82px; height: 9px; border-bottom: 2px solid #182234; }
.map-scale i::before, .map-scale i::after { content: ""; position: absolute; bottom: -5px; width: 2px; height: 9px; background: #182234; }
.map-scale i::before { left: 0; }.map-scale i::after { right: 0; }

.depth-legend {
  right: 24px;
  bottom: 30px;
  width: 176px;
  padding: 14px 15px;
  background: rgba(255,255,255,.95);
  border: 1px solid #d8dde4;
  border-radius: 9px;
  box-shadow: 0 10px 28px rgba(29,42,63,.11);
  backdrop-filter: blur(14px);
}

.depth-legend strong { display: block; margin-bottom: 10px; font-size: 12px; }
.depth-legend div { display: flex; align-items: center; gap: 9px; margin-top: 7px; color: #5e6672; font-size: 11px; }
.depth-legend i { width: 28px; height: 8px; border-radius: 5px; }
.depth-legend small { display:block;margin-top:9px;color:#6f7b8d;font-size:9px;line-height:1.3; }
.depth-1 { background: #9bd8f2; }
.depth-2 { background: #55b6e7; }
.depth-3 { background: #347ae5; }
.depth-4 { background: #173f9f; }

.well-card {
  top: 96px;
  right: 24px;
  width: 312px;
  padding: 20px;
  transform: translateX(calc(100% + 40px));
  opacity: 0;
  background: rgba(255,255,255,.97);
  border: 1px solid #d8dde4;
  border-radius: 11px;
  box-shadow: 0 18px 44px rgba(29,42,63,.16);
  backdrop-filter: blur(16px);
  transition: transform .3s ease, opacity .25s ease;
  pointer-events: none;
}

.well-card.open { transform: translateX(0); opacity: 1; pointer-events: auto; }
.well-card-close { position: absolute; top: 10px; right: 12px; width: 30px; height: 30px; border: 0; background: transparent; color: #20242a; font-size: 26px; cursor: pointer; }
.well-card-kicker { margin: 0 0 6px; color: #3567f0; font-size: 10px; font-weight: 800; letter-spacing: .11em; }
.well-card h2 { margin: 0 34px 18px 0; font-size: 22px; line-height: 1.12; }
.well-depth-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 15px; background: #edf3ff; border-radius: 8px; }
.well-depth-row span { display: block; margin-bottom: 3px; color: #637084; font-size: 11px; }
.well-depth-row strong { color: #265ee6; font-size: 31px; line-height: 1; }
.well-mini-rig { position: relative; width: 48px; height: 54px; }
.well-mini-rig i { position: absolute; right: 11px; bottom: 13px; width: 5px; height: 38px; background: #ef2436; border-radius: 2px 2px 0 0; box-shadow: -6px 10px 0 -2px #26313d; }
.well-mini-rig b { position: absolute; left: 4px; right: 4px; bottom: 5px; height: 16px; border-radius: 3px; background: #f8fafc; border: 2px solid #26313d; }
.well-details { margin: 15px 0; border-top: 1px solid #e3e7ec; }
.well-details div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid #e3e7ec; }
.well-details span { color: #727b87; font-size: 11px; }
.well-details strong { font-size: 11px; text-align: right; }
.well-details .ready { color: #23945b; }
.well-action { width: 100%; height: 44px; border: 0; border-radius: 7px; background: #ef2436; color: white; font-size: 12px; font-weight: 800; cursor: pointer; }

.drill-marker { position: relative; width: 54px; height: 69px; transform-origin: 50% 100%; cursor: pointer; filter: drop-shadow(0 7px 8px rgba(25,46,75,.18)); transition: transform .18s ease, filter .18s ease; }
.drill-marker:hover, .drill-marker.selected { transform: translateY(-4px) scale(1.08); filter: drop-shadow(0 10px 12px rgba(37,85,181,.28)); }
.drill-marker .mast { position: absolute; left: 26px; top: 1px; width: 5px; height: 43px; border-radius: 2px 2px 0 0; background: #ef2436; box-shadow: -7px 13px 0 -2px #26313d; }
.drill-marker .mast::before { content: ""; position: absolute; left: -6px; top: 8px; width: 15px; height: 2px; background: #26313d; transform: rotate(-18deg); box-shadow: 0 8px 0 #26313d, 0 16px 0 #26313d; }
.drill-marker .truck { position: absolute; left: 4px; top: 35px; width: 40px; height: 16px; border: 2px solid #26313d; border-radius: 4px 4px 2px 2px; background: #fff; }
.drill-marker .truck::before { content: ""; position: absolute; left: -5px; bottom: -7px; width: 9px; height: 9px; border: 2px solid white; border-radius: 50%; background: #26313d; box-shadow: 31px 0 0 -2px #26313d, 31px 0 0 0 white; }
.drill-marker .depth-badge { position: absolute; left: 50%; bottom: 0; min-width: 42px; padding: 4px 7px; transform: translateX(-50%); color: #fff; background: #245fe3; border: 2px solid white; border-radius: 11px; font-size: 10px; font-weight: 800; line-height: 1; text-align: center; white-space: nowrap; }
.drill-marker.selected::after { content: ""; position: absolute; left: 50%; bottom: -12px; width: 58px; height: 20px; transform: translateX(-50%); border: 2px solid rgba(53,103,240,.68); border-radius: 50%; animation: pulse 1.5s ease-out infinite; }

.depth-zone { mix-blend-mode: multiply; }

@keyframes pulse { 0% { transform: translateX(-50%) scale(.55); opacity: .9; } 100% { transform: translateX(-50%) scale(1.25); opacity: 0; } }

.search-card {
  top: 24px;
  left: 50%;
  display: flex;
  align-items: center;
  width: min(520px, calc(100vw - 620px));
  min-width: 340px;
  height: 54px;
  padding: 0 7px 0 17px;
  transform: translateX(-50%);
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(212,217,224,.95);
  border-radius: 10px;
  box-shadow: 0 12px 34px rgba(29,42,63,.12);
  backdrop-filter: blur(14px);
}

.search-card svg { flex: 0 0 auto; width: 21px; fill: none; stroke: #15171a; stroke-width: 1.8; }
.search-card input { min-width: 0; flex: 1; height: 100%; padding: 0 14px; border: 0; outline: 0; background: transparent; color: #15171a; font: 14px/1 Arial, sans-serif; }
.search-card input::placeholder { color: #7a838f; }
.search-card button { height: 40px; padding: 0 17px; border: 0; border-radius: 7px; background: #3567f0; color: white; font-size: 12px; font-weight: 700; cursor: pointer; }

.view-switch { top: 24px; right: 24px; display: flex; padding: 4px; background: rgba(255,255,255,.94); border: 1px solid #d8dde4; border-radius: 9px; box-shadow: 0 10px 28px rgba(29,42,63,.1); }
.view-switch button { height: 38px; padding: 0 15px; border: 0; border-radius: 6px; background: transparent; color: #515a66; font-size: 12px; font-weight: 700; cursor: pointer; }
.view-switch button.active { background: #3567f0; color: #fff; }

.brand-card {
  top: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 244px;
  padding: 12px 18px 12px 12px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(212,217,224,.94);
  border-radius: 10px;
  box-shadow: 0 12px 34px rgba(29,42,63,.12);
  backdrop-filter: blur(14px);
}

.brand-mark {
  width: 52px;
  height: 52px;
  color: #111820;
}

.brand-mark svg { width: 100%; height: 100%; }

.eyebrow {
  margin: 0 0 3px;
  color: #3567f0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
}

h1 {
  margin: 0;
  font-size: 21px;
  line-height: 1.08;
  letter-spacing: -.02em;
}

.map-status {
  left: 24px;
  bottom: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 17px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(212,217,224,.94);
  border-radius: 9px;
  box-shadow: 0 10px 28px rgba(29,42,63,.11);
  backdrop-filter: blur(14px);
}

.status-dot {
  width: 10px;
  height: 10px;
  border: 3px solid #cfe0ff;
  border-radius: 50%;
  background: #3567f0;
  box-sizing: content-box;
}

.map-status strong,
.map-status span { display: block; }
.map-status strong { font-size: 14px; }
.map-status div span { margin-top: 2px; color: #68717d; font-size: 12px; }

.map-tools {
  right: 24px;
  top: 50%;
  display: grid;
  transform: translateY(-50%);
  border: 1px solid #d6dbe2;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(29,42,63,.13);
}

.tool-button {
  width: 50px;
  height: 50px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #e1e4e9;
  background: rgba(255,255,255,.96);
  color: #15171a;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transition: color .18s ease, background .18s ease;
}

.tool-button:last-child { border-bottom: 0; }
.tool-button:hover { color: #3567f0; background: #f1f5ff; }
.tool-button:active { background: #e6edff; }
.home-button svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.zoom-hint {
  right: 24px;
  bottom: 30px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  color: #5c6571;
  background: rgba(255,255,255,.9);
  border: 1px solid #dfe3e8;
  border-radius: 8px;
  font-size: 12px;
  box-shadow: 0 7px 20px rgba(29,42,63,.08);
  transition: opacity .4s ease, transform .4s ease;
}

.zoom-hint.hidden { opacity: 0; transform: translateY(8px); pointer-events: none; }

.mouse-icon {
  width: 13px;
  height: 20px;
  border: 1.5px solid #66707c;
  border-radius: 8px;
}

.mouse-icon::after {
  content: "";
  display: block;
  width: 2px;
  height: 5px;
  margin: 3px auto;
  border-radius: 1px;
  background: #3567f0;
}

.loading-card {
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  transform: translate(-50%, -50%);
  background: white;
  border: 1px solid #dfe3e8;
  border-radius: 9px;
  box-shadow: 0 16px 42px rgba(29,42,63,.15);
  font-size: 13px;
  font-weight: 700;
  transition: opacity .25s ease;
}

.loading-card.hidden { opacity: 0; pointer-events: none; }

.search-message { top: 88px; left: 50%; padding: 9px 13px; transform: translateX(-50%) translateY(-5px); color: #5e6672; background: rgba(255,255,255,.96); border: 1px solid #dde2e9; border-radius: 7px; box-shadow: 0 8px 22px rgba(29,42,63,.1); font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.search-message.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

.loader {
  width: 18px;
  height: 18px;
  border: 2px solid #dce5ff;
  border-top-color: #3567f0;
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

.attribution-note {
  right: 24px;
  bottom: 8px;
  color: rgba(58,66,77,.82);
  font-size: 10px;
  text-shadow: 0 1px 2px white;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 720px) {
  .brand-card { top: 14px; left: 14px; min-width: 0; padding: 10px 13px 10px 10px; }
  .brand-mark { width: 42px; height: 42px; }
  h1 { font-size: 17px; }
  .search-card { top: 76px; left: 14px; width: calc(100vw - 28px); min-width: 0; transform: none; }
  .search-card button { display: none; }
  .view-switch { top: 140px; right: 14px; }
  .search-message { top: 136px; }
  .depth-legend { display: none; }
  .well-card { top: auto; right: 14px; bottom: 18px; left: 14px; width: auto; transform: translateY(calc(100% + 40px)); }
  .well-card.open { transform: translateY(0); }
  .map-tools { right: 14px; }
  .tool-button { width: 44px; height: 44px; }
  .map-status { left: 14px; bottom: 24px; }
  .zoom-hint { display: none; }
  .attribution-note { right: 14px; bottom: 6px; font-size: 8px; }
}

/* Visual language of the approved concept */
.leaflet-tile-pane { filter: saturate(1.04) contrast(.97) brightness(1.12); }
.leaflet-tile-pane.terrain-mode { filter: saturate(1.06) contrast(1.04) brightness(.98); }

.brand-card {
  min-width: 218px;
  padding: 10px 16px 10px 10px;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(17,35,60,.15);
}
.brand-mark { width: 58px; height: 58px; }
.eyebrow { color: #185be8; font-size: 11px; }
.brand-card h1 { font-size: 19px; }

.search-card {
  left: auto;
  right: 24px;
  width: min(466px, calc(100vw - 580px));
  min-width: 360px;
  height: 60px;
  transform: none;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(17,35,60,.15);
}
.search-card input { font-size: 16px; }
.search-card button { height: 44px; padding: 0 21px; }
.map-filters {
  position: absolute;
  z-index: 1200;
  top: 94px;
  right: 24px;
  display: flex;
  gap: 9px;
}
.map-filters button {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 43px;
  padding: 0 14px;
  color: #1c2c46;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(208,216,227,.98);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(17,35,60,.12);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.map-filters button.active { color: #fff; background: #1760e9; border-color: #1760e9; }
.map-filters button.active .filter-icon, .map-filters button.active b { color: #fff; }
.layers-icon { width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round; }
.map-filters b { color: #607087; font-size: 15px; }
.filter-icon, .filter-rig { color: #155de9; font-size: 20px; line-height: 1; }
.view-switch { top: 148px; right: 24px; border-radius: 10px; }

.map-status { border-radius: 12px; }
.depth-legend { left: 24px; right: auto; bottom: 106px; width: 205px; border-radius: 12px; }
.depth-legend strong::before { content: none; }
.depth-legend i { width: 34px; height: 12px; }
.map-tools { right: 24px; border-radius: 12px; }

.drill-marker { --rig-scale: 1; width: 70px; height: 86px; transform: scale(var(--rig-scale)); filter: drop-shadow(0 8px 8px rgba(18,33,55,.28)); }
.drill-marker:hover, .drill-marker.selected { transform: translateY(-5px) scale(calc(var(--rig-scale) + .1)); filter: drop-shadow(0 13px 14px rgba(15,75,184,.34)); }
.drill-marker .mast, .drill-marker .truck { display: none; }
.rig-art { position: absolute; z-index: 2; left: -5px; top: -10px; width: 80px; height: 72px; object-fit: contain; object-position: center; overflow: visible; }
.rig-halo { position: absolute; z-index: 1; left: 50%; top: 18px; width: 68px; height: 50px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle, rgba(47,126,255,.33), rgba(47,126,255,.08) 52%, transparent 70%); opacity: 0; transition: opacity .18s ease; }
.drill-marker.selected .rig-halo { opacity: 1; }
.drill-marker .depth-badge { z-index: 4; bottom: 0; min-width: 47px; padding: 5px 8px; color: #1257db; background: #fff; border: 1px solid #dbe6ff; border-radius: 8px; box-shadow: 0 5px 14px rgba(25,61,122,.18); font-size: 11px; }
.drill-marker.selected .depth-badge { color: #fff; background: #165ee9; border-color: #fff; }
.drill-marker.selected::after { bottom: 10px; width: 82px; height: 38px; border-color: rgba(40,117,255,.84); box-shadow: 0 0 0 11px rgba(46,126,255,.12); }
.village-rig { width: 82px; height: 96px; }
.village-rig .rig-art { left: -3px; top: -14px; width: 90px; height: 80px; }
.village-rig .depth-badge { bottom: 12px; font-size: 12px; }
.settlement-name { position: absolute; z-index: 5; left: 50%; bottom: -8px; max-width: 130px; padding: 3px 7px; transform: translateX(-50%); overflow: hidden; color: #13233d; background: rgba(255,255,255,.96); border: 1px solid #dbe2ec; border-radius: 6px; box-shadow: 0 4px 12px rgba(21,44,80,.14); font-size: 10px; font-style: normal; font-weight: 800; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.village-rig.selected { --rig-scale: 1.32 !important; z-index: 20; }
.detail-mode .village-rig:not(.selected) { opacity: .88; }
.street-label { display: flex; align-items: center; justify-content: center; padding: 4px 10px; color: #1d2c42; background: rgba(255,255,255,.94); border: 1px solid #d6dee8; border-radius: 8px; box-shadow: 0 4px 12px rgba(21,44,80,.14); font-size: 10px; font-weight: 800; white-space: nowrap; transform: rotate(-3deg); }

.well-card { top: 198px; width: 372px; max-height: calc(100vh - 218px); padding: 22px; overflow-y: auto; border-radius: 16px; box-shadow: 0 20px 55px rgba(17,35,60,.22); }
.well-card h2 { font-size: 24px; }
.well-depth-row { background: linear-gradient(135deg,#edf5ff,#e5eeff); border: 1px solid #d7e5ff; border-radius: 11px; }
.well-depth-row strong { display: inline-block; padding: 4px 10px 6px; color: #fff; background: #1760e9; border-radius: 9px; font-size: 34px; }
.well-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 12px 0 14px; }
.well-metrics > div { position: relative; min-height: 70px; padding: 11px 10px 9px 38px; background: #f0f4fa; border-radius: 10px; }
.well-metrics span { position: absolute; left: 13px; top: 14px; color: #159ee9; font-size: 18px; }
.well-metrics small, .well-metrics strong { display: block; }
.well-metrics small { color: #647187; font-size: 10px; }
.well-metrics strong { margin-top: 5px; color: #18366d; font-size: 17px; }
.depth-profile > strong { font-size: 12px; }
.profile-chart { position: relative; height: 90px; margin-top: 8px; padding-left: 28px; overflow: hidden; background: repeating-linear-gradient(to bottom,transparent 0,transparent 21px,#dfe7f2 22px),repeating-linear-gradient(to right,transparent 0,transparent 34px,#edf1f6 35px); border: 1px solid #dfe6ef; border-radius: 7px; }
.profile-chart span { position: absolute; left: 4px; color: #667387; font-size: 9px; }
.profile-chart span:nth-child(1) { top: 3px; }.profile-chart span:nth-child(2) { top: 37px; }.profile-chart span:nth-child(3) { bottom: 3px; }
.profile-chart svg { width: 100%; height: 100%; }
.profile-chart path { fill: rgba(34,109,238,.08); stroke: #1760e9; stroke-width: 2.3; vector-effect: non-scaling-stroke; }
.profile-chart circle { fill: #1760e9; stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.well-details { margin-top: 13px; }
.well-action { height: 48px; border-radius: 9px; background: #f02437; font-size: 13px; }

.water-depth-label { display: flex; align-items: center; justify-content: center; width: 76px !important; height: 28px !important; color: #fff; background: #1760e9; border: 2px solid #fff; border-radius: 10px; box-shadow: 0 5px 16px rgba(15,73,172,.28); font-size: 12px; font-weight: 900; white-space: nowrap; }
.detail-mode .water-depth-label { width: 112px !important; height: 36px !important; margin-left: -56px !important; margin-top: -18px !important; border-radius: 14px; font-size: 19px; font-weight: 700; background: #0854ed; box-shadow: 0 0 12px #58baff88; }
.detail-mode .map-status { display: none; }
.detail-mode .depth-legend { bottom: 38px; }
.detail-mode .map-filters > button:not(:first-child) { display: none; }
.detail-mode .map-filters { top: 170px; right: 24px; left: auto; }
.detail-mode .view-switch { top: 104px; }
.detail-mode .sketch-rig { opacity: 1; }
.sketch-rig .rig-art { width: 110px; height: 90px; left: -14px; top: -13px; }
.detail-mode .sketch-rig.selected { --rig-scale: .95 !important; }
.detail-mode .sketch-rig.selected::after { display: none; }
.detail-mode .sketch-rig.selected .rig-halo { width: 88px; height: 82px; top: 0; background: radial-gradient(ellipse,#2588ff99, #2676ff55 45%, transparent 70%); }
.map-scale { display: none; }
.leaflet-control-scale { margin: 0 24px 30px 0 !important; padding: 12px 14px; background: #fffffff2; border-radius: 9px; box-shadow: 0 3px 16px #19345020; }
.leaflet-control-scale-line { border-color: #22334f; color: #22334f; background: transparent; font-size: 11px; }
.sketch-rig .depth-badge { bottom: 4px; border-radius: 7px; font-size: 16px; font-weight: 700; padding: 5px 9px; box-shadow: 0 2px 8px #1d4f8040; }
.village-preview-tools { display: none; position: absolute; z-index: 750; bottom: 18px; left: 50%; transform: translateX(-50%); align-items: center; gap: 10px; white-space: nowrap; }
.detail-mode .village-preview-tools { display: flex; }
.village-preview-tools button { border: 1px solid #dfe8f5; background: white; border-radius: 9px; padding: 10px 14px; color: #174bbc; font-weight: 700; cursor: pointer; }
.village-preview-tools span { padding: 7px 10px; border-radius: 7px; background: #ffffffed; font-size: 10px; color: #536174; }
.geology-section { margin: 14px 0 4px; }
.geology-section > strong { display: block; margin-bottom: 8px; font-size: 12px; }
.geology-cutaway { display: grid; grid-template-columns: 32px 1fr; height: 178px; overflow: hidden; border: 1px solid #dce4ef; border-radius: 9px; background: #f5f7fa; }
.geo-ruler { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 5px 3px 5px 0; color: #5e6b7f; background: #fff; border-right: 1px solid #dce4ef; font-size: 8px; text-align: right; }
.geo-ruler span:last-child { color: #135ee8; font-weight: 900; }
.geo-layers { position: relative; display: grid; grid-template-rows: 15% 22% 38% 25%; overflow: hidden; }
.geo-layer { position: relative; border-bottom: 1px solid rgba(255,255,255,.5); }
.geo-layer span { position: absolute; z-index: 3; right: 6px; top: 5px; max-width: 126px; padding: 3px 6px; color: #20314e; background: rgba(255,255,255,.83); border-radius: 5px; font-size: 8px; font-weight: 700; }
.geo-layer.soil { background: linear-gradient(120deg,#684126,#98704e 45%,#5d3b23); }
.geo-layer.clay { background: repeating-linear-gradient(165deg,#b67d4a 0,#b67d4a 6px,#d19d68 7px,#d19d68 12px); }
.geo-layer.rock { background: radial-gradient(circle at 20% 30%,#8b9299 0 3px,transparent 4px),radial-gradient(circle at 70% 65%,#727b83 0 4px,transparent 5px),linear-gradient(#60686f,#343b42); background-size: 27px 22px,35px 28px,auto; }
.geo-layer.water { background: linear-gradient(180deg,#087ce8,#00b6fa 45%,#053fa8); box-shadow: inset 0 6px 14px rgba(130,228,255,.55); }
.geo-layer.water::before { content: ""; position: absolute; inset: 3px 0 auto; height: 8px; background: repeating-radial-gradient(ellipse at 50% 100%,transparent 0 7px,rgba(255,255,255,.5) 8px 9px,transparent 10px 16px); }
.bore-pipe { position: absolute; z-index: 4; top: 0; bottom: var(--pipe-bottom, 15px); left: 42%; width: 15px; transform: translateX(-50%); background: linear-gradient(90deg,#202a32,#e7edf2 32%,#fff 50%,#7f8b94 75%,#172027); border-radius: 2px 2px 7px 7px; box-shadow: 0 2px 8px rgba(0,0,0,.42); }
.bore-pipe i { position: absolute; left: 3px; right: 3px; bottom: 0; height: 28%; border-radius: 0 0 5px 5px; background: linear-gradient(#28bfff,#0069e6); box-shadow: 0 0 10px #2bc7ff; }

@media (max-width: 900px) {
  .map-filters { display: none; }
  .view-switch { top: 96px; }
  .search-card { right: 14px; width: calc(100vw - 270px); min-width: 280px; }
}

@media (max-width: 720px) {
  .search-card { top: 86px; left: 14px; right: 14px; width: auto; }
  .view-switch { top: 154px; }
  .depth-legend { display: none; }
  .well-card { top: auto; }
}

/* Lightweight, shared map UI at every locality. */
.leaflet-tile-pane,.leaflet-tile-pane.terrain-mode { filter:none; }
.brand-card,.search-card,.view-switch,.map-status,.well-card,.map-filters { backdrop-filter:none; }
.water-depth-label { display:none !important; }
.compact-rig,.detail-mode .compact-rig { --rig-scale:.82 !important; opacity:1 !important; width:68px;height:84px;filter:drop-shadow(0 2px 3px #132c4e40); }
.compact-rig .rig-art { width:100px;height:72px;left:-16px;top:-6px; }
.compact-rig .depth-badge { bottom:6px;font-size:14px;padding:4px 8px; }
.compact-rig .settlement-name { bottom:-12px;font-size:11px;max-width:150px; }
.compact-rig.selected,.detail-mode .compact-rig.selected { --rig-scale:.9 !important; }
.compact-rig.selected::after { display:none; }
.well-hit-target { background:transparent;border:0; }
.well-hit-target:focus-visible { outline:3px solid #185eea;outline-offset:3px;border-radius:8px; }
.search-card { width:min(460px,calc(100vw - 500px));min-width:250px; }
.search-results { position:absolute;z-index:1300;right:24px;top:86px;width:min(460px,calc(100vw - 500px));max-height:320px;overflow:auto;border-radius:12px;background:#fff;box-shadow:0 8px 28px #16325033; }
.search-results[hidden] { display:none; }
.search-results button { display:block;width:100%;padding:13px 16px;text-align:left;border:0;border-bottom:1px solid #edf1f7;background:#fff;color:#243c5a;cursor:pointer; }
.search-results button:hover,.search-results button:focus-visible { background:#edf5ff; }
.map-filters,.detail-mode .map-filters { display:flex;left:auto;right:24px;top:164px; }
.view-switch,.detail-mode .view-switch { top:100px;right:24px; }
.map-status,.detail-mode .map-status { display:flex;left:20px;bottom:24px;max-width:380px;padding:9px 12px;pointer-events:none; }
.map-status strong { display:none; }
.depth-legend,.detail-mode .depth-legend { left:20px;bottom:90px;width:180px;padding:12px;pointer-events:none; }
.village-preview-tools,.detail-mode .village-preview-tools { display:none; }
.village-preview-tools.visible { display:flex;left:20px;top:104px;bottom:auto;transform:none; }
.village-preview-tools span { display:none; }
.dataset-note { position:absolute;z-index:700;bottom:5px;left:20px;max-width:calc(100% - 220px);font-size:10px;padding:3px 6px;color:#374b65;background:#ffffffe6;border-radius:4px;pointer-events:none; }
.well-card { top:220px;max-height:calc(100vh - 244px);width:350px; }
.well-card-close { width:44px;height:44px;top:6px;right:6px; }
.search-message,.zoom-hint,.detail-breadcrumbs { pointer-events:none; }
.zoom-hint { display:none; }
@media(max-width:700px){
 .brand-card { top:14px;left:14px; }
 .detail-breadcrumbs { top:20px;left:90px;max-width:calc(100vw - 106px);font-size:10px; }
 .search-card { top:84px;left:14px;right:14px;width:auto;min-width:0;height:50px; }
 .search-results { top:136px;left:14px;right:14px;width:auto; }
 .search-card button { display:block;padding:0 12px;height:36px; }
 .map-filters,.detail-mode .map-filters { top:146px;right:14px; }
 .view-switch,.detail-mode .view-switch { top:146px;left:14px;right:auto; }
 .village-preview-tools.visible { top:205px;left:14px; }
 .depth-legend,.detail-mode .depth-legend { display:none; }
 .map-status,.detail-mode .map-status { left:14px;bottom:40px;max-width:calc(100vw - 120px);font-size:11px; }
 .map-status div span { font-size:10px; }
 .well-card { top:auto;bottom:12px;left:12px;right:12px;width:auto;max-height:56vh; }
 .card-open .map-status,.card-open .dataset-note { display:none; }
 .dataset-note { bottom:5px;left:8px;max-width:calc(100% - 80px);font-size:9px; }
 .leaflet-control-scale { margin:0 14px 80px 0 !important; }
}

/* Correction: narrower panel, normal type scale, separate request step. */
.brand-card,.detail-mode .brand-card { width:126px;min-width:126px;height:74px;padding:4px 7px;border-radius:50%; }
.brand-mark,.detail-mode .brand-mark { width:112px;height:66px;border-radius:50%; }
.detail-breadcrumbs { left:160px;max-width:calc(100vw - 770px); }

.calculator-panel { width:420px;padding:20px; }
.calculator-panel .well-card-kicker { margin-bottom:4px;font-size:10px; }
.calculator-panel h2 { margin-bottom:4px;font-size:24px;line-height:1.15; }
.calc-address { margin-bottom:11px;font-size:12px; }
.calc-address svg { width:17px;height:17px; }
.calc-section-title { margin-bottom:7px;font-size:13px; }
.calc-geology { height:170px;margin-bottom:10px;grid-template-columns:32px 1.05fr .95fr; }
.calc-geo-names { gap:4px;padding-left:6px; }
.calc-geo-names span,.calc-geo-names strong { padding:0 8px;font-size:10.5px;line-height:1.15; }
.calc-geo-names strong { font-size:10.5px; }
.calculator-panel .calc-summary { display:grid;grid-template-columns:1fr auto;gap:7px 12px;padding:10px 12px; }
.calculator-panel .calc-summary span { font-size:11px; }
.calculator-panel .calc-summary strong { font-size:16px; }
.calculator-panel .calc-lines { display:block;margin:9px 0; }
.calculator-panel .calc-lines div { display:grid;grid-template-columns:28px 1fr auto;grid-template-rows:1fr;gap:8px;min-height:42px;padding:8px 7px;background:#f5f8fc;border-width:0 0 1px;border-radius:0; }
.calculator-panel .calc-lines svg { grid-row:auto;width:22px;height:22px; }
.calculator-panel .calc-lines span { font-size:12px;line-height:1.2; }
.calculator-panel .calc-lines strong { font-size:13px; }
.calculator-panel .calc-total { padding:11px 13px; }
.calculator-panel .calc-total span { font-size:12px; }
.calculator-panel .calc-total strong { font-size:27px; }
.calculator-panel .calc-total small { font-size:9px; }
.calculator-panel .exact-toggle { height:44px;margin-top:9px;font-size:13px; }
.calculator-panel .admin-toggle { height:31px;margin-top:3px;font-size:11px; }
.calculator-open .map-tools,.calculator-open .map-filters { right:450px; }

.request-panel { position:absolute;z-index:1110;top:50%;right:24px;width:390px;padding:26px 24px;transform:translate(35px,-50%);opacity:0;pointer-events:none;color:#172b47;background:#fff;border:1px solid #d7e2f1;border-radius:16px;box-shadow:0 24px 70px #102d5d40;transition:transform .25s ease,opacity .2s ease; }
.request-panel.open { transform:translate(0,-50%);opacity:1;pointer-events:auto; }
.request-icon { display:flex;align-items:center;justify-content:center;width:46px;height:46px;margin-bottom:15px;color:#fff;background:linear-gradient(145deg,#159cea,#1760e9);border-radius:14px;box-shadow:0 9px 20px #1760e93b;font-size:24px;font-weight:900; }
.request-panel h2 { margin:0 35px 9px 0;font-size:23px;line-height:1.15; }
.request-panel > p:not(.well-card-kicker) { margin:0 0 17px;color:#607087;font-size:13px;line-height:1.45; }
.request-start,.request-back { width:100%;height:44px;border:0;border-radius:9px;font-weight:800;cursor:pointer; }
.request-start { color:#fff;background:#ef263a;box-shadow:0 8px 18px #ef263a30; }
.request-start[hidden] { display:none; }
.request-back { height:34px;margin-top:7px;color:#607087;background:transparent;font-size:11px; }
.request-panel .lead-form { grid-template-columns:1fr 1fr;gap:7px;margin-top:0; }
.request-panel .lead-form input { height:42px;font-size:13px; }
.request-panel .lead-form button { height:42px;font-size:12px; }
@media(max-width:700px){
 .brand-card,.detail-mode .brand-card { width:106px;min-width:106px;height:64px; }
 .brand-mark,.detail-mode .brand-mark { width:94px;height:56px; }
 .detail-breadcrumbs { left:126px;max-width:calc(100vw - 142px); }
 .calculator-panel { width:auto; }
 .request-panel { top:auto;right:12px;bottom:12px;left:12px;width:auto;transform:translateY(30px); }
 .request-panel.open { transform:translateY(0); }
}

/* Compact, richer well experience. */
.brand-card,.detail-mode .brand-card { width:104px;min-width:104px;height:70px;padding:4px 6px;border-radius:50%; }
.brand-mark,.detail-mode .brand-mark { width:92px;height:62px;border-radius:50%; }
.brand-mark img { object-fit:cover; }

.well-card:not(.expanded) { width:212px;min-height:78px;padding:13px 14px;background:linear-gradient(145deg,#fff 0%,#f5f9ff 100%);border:1px solid #cfe0fa;box-shadow:0 14px 34px #173b7530; }
.well-card:not(.expanded)::after { content:"";position:absolute;left:22px;bottom:-7px;width:13px;height:13px;transform:rotate(45deg);background:#f7faff;border-right:1px solid #cfe0fa;border-bottom:1px solid #cfe0fa; }
.well-popup-summary { display:flex;align-items:center;gap:7px;color:#42516a;font-size:12px; }
.well-popup-summary::before { content:"";width:8px;height:8px;border-radius:50%;background:#13a6ef;box-shadow:0 0 0 5px #dff4ff; }
.well-popup-summary strong { margin-left:auto;padding:4px 8px;color:#fff;background:#1760e9;border-radius:7px;font-size:14px;box-shadow:0 5px 12px #1760e944; }
.well-details-action { display:flex;align-items:center;gap:5px;margin:8px 0 0 20px;font-size:11px;font-weight:800; }
.well-details-action::after { content:"→";font-size:15px;line-height:1;transition:transform .18s ease; }
.well-details-action:hover::after { transform:translateX(3px); }

.calculator-panel { width:450px;padding:17px 18px 15px;background:linear-gradient(155deg,#fff 0%,#f9fbff 100%);border:1px solid #d5e0f0;box-shadow:0 24px 70px #102d5d3d; }
.calculator-panel .well-card-kicker { margin-bottom:3px;color:#1760e9;font-size:9px;letter-spacing:.15em; }
.calculator-panel h2 { margin:0 38px 2px 0;font-size:22px;letter-spacing:-.02em; }
.calc-address { margin-bottom:8px;color:#63728a;font-size:10px; }
.calc-address svg { width:15px;height:15px; }
.calc-section-title { margin-bottom:5px;font-size:11px; }
.calc-geology { height:146px;margin-bottom:8px;border:1px solid #d9e4f0;border-radius:9px;box-shadow:inset 0 0 0 1px #fff; }
.calc-geo-names { gap:3px;padding-left:5px; }
.calc-geo-names span,.calc-geo-names strong { min-width:0;padding:0 7px;overflow-wrap:anywhere;font-size:8.5px; }
.calc-geo-names strong { font-size:9px; }
.calculator-panel .calc-summary { grid-template-columns:auto 1fr auto 1fr;align-items:center;gap:6px 8px;padding:8px 10px; }
.calculator-panel .calc-summary span { color:#687891;font-size:9px; }
.calculator-panel .calc-summary strong { justify-self:end;font-size:14px; }
.calculator-panel .calc-lines { display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:7px 0; }
.calculator-panel .calc-lines div { display:grid;grid-template-columns:24px 1fr;grid-template-rows:auto auto;gap:2px 5px;min-width:0;padding:7px;background:#f0f5fb;border:1px solid #e1e9f3;border-radius:8px; }
.calculator-panel .calc-lines svg { grid-row:1/3;width:20px;height:20px;align-self:center; }
.calculator-panel .calc-lines span { overflow-wrap:anywhere;color:#627087;font-size:8.5px;line-height:1.05; }
.calculator-panel .calc-lines strong { font-size:11px;white-space:nowrap; }
.calculator-panel .calc-total { display:grid;grid-template-columns:1fr auto;align-items:center;padding:8px 11px; }
.calculator-panel .calc-total span { font-size:10px; }
.calculator-panel .calc-total strong { grid-column:2;grid-row:1/3;margin:0;font-size:23px;white-space:nowrap; }
.calculator-panel .calc-total small { grid-column:1;font-size:8px; }
.calculator-panel .exact-toggle { height:38px;margin-top:7px;border-radius:9px;box-shadow:0 8px 18px #ef263a2c; }
.calculator-panel .admin-toggle { height:25px;margin-top:2px; }
.lead-form { grid-template-columns:1fr 1fr;gap:6px;margin-top:7px; }
.lead-form button { grid-column:1/-1;height:38px;margin-top:0; }
.lead-form input { height:37px;min-width:0; }
.calc-message { margin-top:4px; }
.calculator-open .map-tools,.calculator-open .map-filters { right:480px; }
@media(max-width:700px){
 .brand-card,.detail-mode .brand-card { width:90px;min-width:90px;height:60px; }
 .brand-mark,.detail-mode .brand-mark { width:80px;height:52px; }
 .calculator-panel { padding:14px; }
 .calc-geology { height:136px; }
}

/* Two-step well card and locally configurable estimate. */
.well-card { top:104px;max-height:calc(100vh - 124px);overflow:hidden;transition:transform .3s ease,opacity .25s ease; }
.well-location { margin:-5px 0 12px;color:#68778d;font-size:12px; }
.well-card:not(.expanded) .depth-profile,
.well-card:not(.expanded) .geology-section,
.well-card:not(.expanded) .well-details,
.well-card:not(.expanded) .well-calculate-action { display:none; }
.well-card:not(.expanded) { width:330px;padding:20px; }
.well-card:not(.expanded) .well-depth-row { margin-top:10px; }
.well-card.expanded { width:370px;padding:18px 20px; }
.well-card.expanded .well-details-action { display:none; }
.well-card.expanded .depth-profile { display:none; }
.well-card.expanded .geology-section { margin:10px 0 4px; }
.well-card.expanded .geology-cutaway { height:142px; }
.well-card.expanded .well-metrics { margin:8px 0 10px; }
.well-card.expanded .well-metrics > div { min-height:58px;padding-top:8px; }
.well-card.expanded .well-details { margin-top:8px; }
.well-card.expanded .well-action { height:44px;margin-top:8px; }
.well-action { width:100%;border:0;color:#fff;cursor:pointer; }
.well-details-action { background:#1760e9; }
.well-calculate-action { background:#ef263a; }
.drill-marker.selected::after,.compact-rig.selected::after { display:block;animation:pulse 1.2s ease-out infinite; }

.calculator-panel { position:absolute;z-index:1100;top:104px;right:24px;width:390px;padding:22px;color:#182c48;background:#fff;border-radius:16px;box-shadow:0 20px 55px #11233c38;transform:translateX(calc(100% + 50px));opacity:0;pointer-events:none;transition:transform .3s ease,opacity .25s ease; }
.calculator-panel.open { transform:translateX(0);opacity:1;pointer-events:auto; }
.calculator-open .map-tools,.calculator-open .map-filters { right:520px; }
.calculator-open .search-card,.calculator-open .search-results { display:none; }
.calculator-panel h2 { margin:2px 42px 14px 0;font-size:23px; }
.calc-summary { display:grid;grid-template-columns:1fr auto;gap:8px 16px;padding:12px 14px;background:#edf4ff;border-radius:10px;font-size:12px; }
.calc-summary strong { color:#145be0;font-size:16px; }
.calc-lines { margin:12px 0; }
.calc-lines div { display:grid;grid-template-columns:28px 1fr auto;align-items:center;gap:8px;padding:8px 2px;border-bottom:1px solid #e8edf5;font-size:13px; }
.calc-lines svg { width:23px;height:23px;fill:none;stroke:#105bdc;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round; }
.calc-total { padding:13px 14px;color:#fff;background:linear-gradient(135deg,#1264ef,#0645b9);border-radius:11px; }
.calc-total span,.calc-total small { display:block; }
.calc-total strong { display:block;margin:4px 0;font-size:28px; }
.calc-total small { color:#dce9ff;font-size:10px; }
.exact-toggle,.admin-toggle,.lead-form button,.admin-form button { width:100%;height:42px;margin-top:10px;border:0;border-radius:8px;font-weight:800;cursor:pointer; }
.exact-toggle,.lead-form button { color:#fff;background:#ef263a; }
.admin-toggle { height:32px;color:#53647b;background:transparent;font-size:11px; }
.lead-form,.admin-form { display:grid;gap:7px;margin-top:10px; }
.lead-form[hidden],.admin-form[hidden] { display:none; }
.lead-form input,.admin-form input { width:100%;height:40px;padding:0 11px;border:1px solid #d8e1ed;border-radius:8px;font:inherit; }
.lead-form .lead-consent { grid-column:1/-1;display:flex;align-items:flex-start;gap:8px;color:#5f6d82;font-size:11px;line-height:1.3; }
.lead-form .lead-consent input { width:16px;height:16px;flex:0 0 16px;margin:0;padding:0; }
.lead-form .lead-consent a { color:#1760e9; }
.admin-form { grid-template-columns:1fr 1fr; }
.admin-form label:first-child { grid-column:1/-1; }
.admin-form label { color:#64738a;font-size:10px; }
.admin-form button { grid-column:1/-1;color:#fff;background:#1760e9; }
.calc-message { min-height:14px;margin:8px 0 0;color:#188044;font-size:11px;line-height:1.3; }
@media(max-width:700px){
 .well-card,.well-card:not(.expanded),.well-card.expanded,.calculator-panel { top:auto;right:12px;bottom:12px;left:12px;width:auto;max-height:calc(100vh - 155px); }
 .calculator-panel { padding:18px; }
 .calculator-open .map-tools,.calculator-open .map-filters { display:none; }
}
/* Locally drawn vector map; no imagery, external fonts or remote map services. */

/* Single 2D mode: compact Geom badge and one clear layer control. */
.brand-card,.detail-mode .brand-card {
  width:74px;min-width:74px;height:74px;padding:7px;border-radius:50%;
  align-items:center;justify-content:center;background:#fffffff7;
}
.brand-card > div:last-child,.detail-mode .brand-card > div:last-child { display:none; }
.brand-mark,.detail-mode .brand-mark { width:60px;height:60px; }
.brand-mark { overflow:hidden;border-radius:50%;background:#fff; }
.brand-mark img { display:block;width:100%;height:100%;object-fit:cover;object-position:center; }
.detail-breadcrumbs { max-width:calc(100vw - 720px);overflow:hidden;white-space:nowrap; }
.detail-breadcrumbs span,.detail-breadcrumbs strong { overflow:hidden;text-overflow:ellipsis; }
.map-filters,.detail-mode .map-filters { top:100px; }
@media(max-width:700px){
  .brand-card,.detail-mode .brand-card { width:62px;min-width:62px;height:62px;padding:6px; }
  .brand-mark,.detail-mode .brand-mark { width:50px;height:50px; }
  .map-filters,.detail-mode .map-filters { top:146px; }
}

/* Match the approved map sketch. */
.map-filters,.detail-mode .map-filters { top:calc(50% + 135px);right:24px; }
.map-filters button,.map-filters button.active { width:52px;height:52px;padding:0;justify-content:center;color:#17243a;background:#fffffff7;border-color:#d9e0ea;border-radius:10px;font-size:0;box-shadow:0 6px 18px #13284426; }
.map-filters button b { display:none; }
.map-filters .layers-icon { width:28px;height:28px; }
.calculator-open .map-filters { right:520px; }

.well-card:not(.expanded) { left:var(--popup-left,50%);top:var(--popup-top,50%);right:auto;bottom:auto;width:190px;min-height:72px;padding:11px 12px;border-radius:9px;transform:translateY(8px); }
.well-card:not(.expanded).open { transform:translateY(0); }
.well-card:not(.expanded) > :not(.well-popup-summary):not(.well-details-action):not(.well-card-close) { display:none; }
.well-card:not(.expanded) .well-card-close { display:none; }
.well-popup-summary { color:#1b2638;font-size:13px;font-weight:700;white-space:nowrap; }
.well-popup-summary strong { color:#125de5;font-size:15px; }
.well-details-action { width:auto;height:auto;margin-top:5px;padding:0;color:#1760e9;background:transparent;font-size:12px;text-align:left; }
.well-card.expanded .well-popup-summary { display:none; }

.calculator-panel { top:14px;width:490px;max-height:calc(100vh - 28px);padding:20px 22px;overflow:hidden; }
.calculator-panel h2 { margin-bottom:4px;font-size:25px; }
.calc-address { display:flex;align-items:center;gap:7px;margin:0 0 12px;color:#283752;font-size:12px; }
.calc-address svg { width:18px;height:18px;fill:none;stroke:#123a78;stroke-width:1.8; }
.calc-section-title { display:block;margin-bottom:7px;font-size:13px; }
.calc-geology { display:grid;grid-template-columns:32px 1.1fr .9fr;height:180px;margin-bottom:10px;overflow:hidden;border-radius:8px; }
.calc-geology .geo-ruler { font-size:8px; }
.calc-geology .geo-layers { grid-template-rows:18% 24% 35% 23%; }
.calc-geo-names { display:grid;grid-template-rows:18% 24% 35% 23%;gap:5px;padding-left:7px;background:#fff; }
.calc-geo-names span,.calc-geo-names strong { display:flex;align-items:center;padding:0 9px;color:#253552;background:#eef3f9;border-radius:7px;font-size:10px;line-height:1.1; }
.calc-geo-names strong { color:#0754c9;background:#d9edff;font-size:11px; }
.calculator-panel .calc-summary { padding:8px 12px; }
.calculator-panel .calc-lines { margin:7px 0; }
.calculator-panel .calc-lines div { padding:5px 2px; }
.calculator-panel .calc-total { padding:9px 12px; }
.calculator-panel .calc-total strong { font-size:25px; }
.calculator-panel .exact-toggle { height:40px;margin-top:8px; }
.calculator-panel .admin-toggle { margin-top:4px; }
@media(max-width:700px){
 .map-filters,.detail-mode .map-filters { top:146px;right:14px; }
 .calculator-panel { max-height:calc(100vh - 24px);overflow:auto; }
 .well-card:not(.expanded) { left:14px;right:auto;bottom:90px;top:auto;width:190px; }
}
#map,.leaflet-container { background:#f1f0e8; }
.terrain-view #map { background:#eeeee3; }
.attribution-note a { color:inherit;text-decoration:none; }
.attribution-note a:hover { text-decoration:underline; }

/* Final corrections: these must remain last in the cascade. */
.brand-card,.detail-mode .brand-card { width:126px;min-width:126px;height:74px;padding:4px 7px;border-radius:50%; }
.brand-mark,.detail-mode .brand-mark { width:112px;height:66px;border-radius:50%; }
.detail-breadcrumbs { left:160px;max-width:calc(100vw - 770px); }
.calculator-panel { top:14px;width:420px;max-height:calc(100vh - 28px);padding:20px;overflow:hidden; }
.calculator-panel .well-card-kicker { margin-bottom:4px;font-size:10px; }
.calculator-panel h2 { margin:0 38px 4px 0;font-size:24px;line-height:1.15; }
.calc-address { margin-bottom:11px;font-size:12px; }
.calc-address svg { width:17px;height:17px; }
.calc-section-title { margin-bottom:7px;font-size:13px; }
.calc-geology { height:170px;margin-bottom:10px;grid-template-columns:32px 1.05fr .95fr; }
.calc-geo-names { gap:4px;padding-left:6px; }
.calc-geo-names span,.calc-geo-names strong { padding:0 8px;font-size:10.5px;line-height:1.15; }
.calculator-panel .calc-summary { display:grid;grid-template-columns:1fr auto;gap:7px 12px;padding:10px 12px; }
.calculator-panel .calc-summary span { font-size:11px; }
.calculator-panel .calc-summary strong { font-size:16px; }
.calculator-panel .calc-lines { display:block;margin:9px 0; }
.calculator-panel .calc-lines div { display:grid;grid-template-columns:28px 1fr auto;grid-template-rows:1fr;gap:8px;min-height:42px;padding:8px 7px;background:#f5f8fc;border-width:0 0 1px;border-radius:0; }
.calculator-panel .calc-lines svg { grid-row:auto;width:22px;height:22px; }
.calculator-panel .calc-lines span { font-size:12px;line-height:1.2; }
.calculator-panel .calc-lines strong { font-size:13px; }
.calculator-panel .calc-total { display:grid;grid-template-columns:1fr auto;align-items:center;padding:11px 13px; }
.calculator-panel .calc-total span { font-size:12px; }
.calculator-panel .calc-total strong { grid-column:2;grid-row:1/3;margin:0;font-size:27px; }
.calculator-panel .calc-total small { grid-column:1;font-size:9px; }
.calculator-panel .exact-toggle { height:44px;margin-top:9px;font-size:13px; }
.calculator-panel .admin-toggle { height:31px;margin-top:3px;font-size:11px; }
.calculator-open .map-tools,.calculator-open .map-filters { right:450px; }
@media(max-width:700px){
 .brand-card,.detail-mode .brand-card { width:106px;min-width:106px;height:64px; }
 .brand-mark,.detail-mode .brand-mark { width:94px;height:56px; }
 .detail-breadcrumbs { left:126px;max-width:calc(100vw - 142px); }
 .calculator-panel { width:auto;max-height:calc(100vh - 24px);overflow:auto; }
}

/* The Geom sign sits directly on the map, without a white badge behind it. */
.brand-card,.detail-mode .brand-card {
 background:transparent;
 border:0;
 box-shadow:none;
 backdrop-filter:none;
}
.brand-mark,.detail-mode .brand-mark {
 overflow:visible;
 background:transparent;
}
.brand-mark img,.detail-mode .brand-mark img {
 object-fit:contain;
}

/* Keep the compact well preview legible at every map scale. */
.well-card:not(.expanded) {
 width:212px;
}
.well-popup-summary strong {
 flex:0 0 auto;
 color:#fff;
}
.well-details-action {
 display:flex;
 width:calc(100% - 20px);
 align-items:center;
 justify-content:space-between;
 gap:8px;
 white-space:nowrap;
}

/* Fit all geology captions inside their matching strata. */
.calc-geology .geo-layers,
.calc-geo-names {
 grid-template-rows:18fr 24fr 35fr 23fr;
}
.calc-geo-names {
 min-width:0;
 overflow:hidden;
}
.calc-geo-names span,
.calc-geo-names strong {
 min-width:0;
 min-height:0;
 box-sizing:border-box;
 overflow:hidden;
 overflow-wrap:normal;
 word-break:normal;
}

/* Optically center the layers symbol inside its square control. */
.map-filters button,
.map-filters button.active {
 display:grid;
 place-items:center;
 line-height:0;
}
.map-filters .layers-icon {
 display:block;
 margin:0;
 transform:translate(0,0);
}

/* Public-site shell. The map remains the main screen. */
[hidden]{display:none!important}
.client-header{position:absolute;z-index:1190;top:0;left:0;right:0;height:68px;padding:10px 22px 10px 150px;display:flex;align-items:center;justify-content:space-between;background:#fffffff4;border-bottom:1px solid #dce4ee;box-shadow:0 5px 20px #18365b12}.client-copy{display:grid;gap:3px}.client-copy strong{color:#132b4d;font-size:16px}.client-copy span{color:#69758a;font-size:11px}.client-actions{display:flex;align-items:center;gap:18px}.client-actions a{color:#1a3151;text-decoration:none;font-size:13px;font-weight:700}.client-actions button{height:38px;padding:0 17px;border:0;border-radius:9px;color:#fff;background:#1760e9;font-weight:800;cursor:pointer}.brand-card,.detail-mode .brand-card{z-index:1250;top:1px;cursor:pointer}.search-card{top:82px}.detail-breadcrumbs{top:82px}.site-footer{position:absolute;z-index:1300;left:0;right:0;bottom:0;min-height:30px;padding:6px 20px;display:flex;align-items:center;justify-content:space-between;gap:20px;color:#526077;background:#fffffff4;border-top:1px solid #dae2ed;font-size:12px}.site-footer div{display:flex;align-items:center;gap:13px}.site-footer a{color:#315a92;text-decoration:none}.tobiz-credit{font-size:14px!important;font-weight:700;white-space:nowrap}.dataset-note{bottom:34px}.attribution-note{bottom:34px}.map-scale{bottom:61px}.depth-legend{bottom:61px}.map-status{bottom:54px}.share-map-button{position:absolute;z-index:1250;left:20px;bottom:58px;height:38px;padding:0 15px;border:1px solid #d1dce9;border-radius:9px;color:#1d3f70;background:#fffffff2;box-shadow:0 8px 24px #1d385c20;font-weight:700;cursor:pointer}.modal-backdrop{position:absolute;z-index:3000;inset:0;display:grid;place-items:center;padding:20px;background:#0e213d80;backdrop-filter:blur(5px)}.site-modal{position:relative;width:min(430px,calc(100vw - 30px));padding:26px;color:#182b49;background:#fff;border-radius:17px;box-shadow:0 30px 100px #06132960}.site-modal h2{margin:7px 34px 7px 0;font-size:25px}.site-modal p{color:#68758a;font-size:13px;line-height:1.45}.modal-close{position:absolute;top:14px;right:14px;width:34px;height:34px;border:0;background:transparent;font-size:25px;cursor:pointer}.auth-tabs{display:grid;grid-template-columns:1fr 1fr;padding:4px;background:#edf3fa;border-radius:10px}.auth-tabs button{height:38px;border:0;border-radius:8px;color:#63738a;background:transparent;font-weight:800;cursor:pointer}.auth-tabs button.active{color:#145bd7;background:#fff;box-shadow:0 4px 12px #17396415}.site-modal form,.site-modal label{display:grid;gap:6px}.site-modal form{gap:12px;margin-top:18px}.site-modal label{color:#4f6179;font-size:12px}.site-modal input,.site-modal textarea{width:100%;padding:11px 12px;border:1px solid #cdd9e8;border-radius:9px;font:inherit}.site-modal form>button,.share-actions button{height:44px;border:0;border-radius:9px;color:#fff;background:#1760e9;font-weight:800;cursor:pointer}.site-modal small{display:block;min-height:18px;margin-top:10px;color:#1760e9}.share-modal textarea{height:112px;resize:none}.share-actions{display:flex;align-items:center;gap:14px}.share-actions button{padding:0 16px}.share-actions a{color:#1760e9;font-size:13px;font-weight:700;text-decoration:none}

/* Clean, non-interactive presentation used in external embeds. */
.embed-mode .client-header,.embed-mode .detail-breadcrumbs,.embed-mode .search-card,.embed-mode .search-results,.embed-mode .map-filters,.embed-mode .map-tools,.embed-mode .village-preview-tools,.embed-mode .zoom-hint,.embed-mode .well-card,.embed-mode .calculator-panel,.embed-mode .request-panel,.embed-mode .depth-legend,.embed-mode .map-scale,.embed-mode .map-status,.embed-mode .leaflet-control-scale,.embed-mode .dataset-note,.embed-mode .attribution-note,.embed-mode .share-map-button,.embed-mode .site-footer{display:none!important}.embed-mode .brand-card{display:block;top:12px;left:12px;background:transparent;border:0;box-shadow:none}.embed-mode .well-hit-target{pointer-events:none!important}

@media(max-width:900px){.client-header{height:74px;padding-left:126px}.client-copy span,.client-actions a{display:none}.search-card{top:84px}.detail-breadcrumbs{top:84px}.site-footer div span:not(:first-child),.site-footer div a{display:none}.tobiz-credit{font-size:12px!important}.share-map-button{bottom:65px}}@media(max-width:620px){.client-copy{display:none}.client-header{padding-left:118px}.site-footer{padding:6px 10px}.site-footer div{display:none}.site-footer{justify-content:flex-end}.tobiz-credit{font-size:12px!important}}

/* Public map without a site header: controls sit directly over the map. */
.client-header { display:none!important; }
.brand-card,.detail-mode .brand-card { top:12px;left:18px; }
.search-card { top:18px; }
.detail-breadcrumbs { top:18px; }
.map-status { display:none!important; }

/* Keep the lower map controls separate and readable. */
.depth-legend,.detail-mode .depth-legend { left:20px;bottom:82px; }
.share-map-button { left:auto;right:20px;bottom:46px; }
.dataset-note { left:20px;right:auto;bottom:35px;max-width:60vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.attribution-note { bottom:35px; }
.map-scale { bottom:72px; }
.site-footer { min-height:30px; }
.tobiz-credit { font-weight:400!important; }

/* Optical centring for the layers glyph. */
.map-filters button,.map-filters button.active { display:flex!important;align-items:center!important;justify-content:center!important;padding:0!important; }
.map-filters .layers-icon { width:26px;height:26px;margin:0!important;transform:translateX(1px)!important;flex:0 0 26px; }

/* Share dialog buttons use one baseline and cannot collide. */
.share-actions { display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px;margin-top:12px; }
.share-actions button { width:100%;padding:0 18px; }
.share-actions a { display:flex;align-items:center;justify-content:center;min-height:44px;padding:0 4px;white-space:nowrap; }

@media(max-width:900px){
 .search-card{top:16px;right:14px;max-width:calc(100vw - 150px)}
 .detail-breadcrumbs{top:16px}
 .share-map-button{right:12px;bottom:48px}
 .dataset-note{max-width:55vw}
}
@media(max-width:620px){
 .brand-card,.detail-mode .brand-card{top:8px;left:8px}
 .search-card{top:80px;left:12px;right:12px;max-width:none}
 .depth-legend{display:none!important}
 .dataset-note{max-width:calc(100vw - 150px)}
 .share-actions{grid-template-columns:1fr}
}

/* Compact well preview: a clear action button with balanced spacing. */
.well-card:not(.expanded) {
 width:220px;
 padding:12px;
}
.well-card:not(.expanded) .well-popup-summary {
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:10px;
 min-height:28px;
}
.well-card:not(.expanded) .well-details-action {
 display:flex;
 width:100%;
 height:34px;
 margin:9px 0 0;
 padding:0 12px;
 align-items:center;
 justify-content:space-between;
 border:1px solid #1760e9;
 border-radius:7px;
 color:#fff;
 background:#1760e9;
 box-shadow:0 5px 12px rgba(23,96,233,.2);
 font-size:12px;
 font-weight:800;
 line-height:1;
 cursor:pointer;
}
.well-card:not(.expanded) .well-details-action:hover {
 background:#0f52cf;
 border-color:#0f52cf;
}
.well-card:not(.expanded) .well-details-action:focus-visible {
 outline:3px solid rgba(23,96,233,.25);
 outline-offset:2px;
}

/* Keep the depth badge and settlement caption visually separate. */
.compact-rig .settlement-name,
.detail-mode .compact-rig .settlement-name {
 bottom:-20px;
}

/* Major settlements are labelled once globally instead of once per map tile. */
.city-label-marker {
 display:flex;
 align-items:center;
 justify-content:center;
 background:transparent;
 border:0;
 pointer-events:none;
}
.city-label-marker span {
 display:inline-block;
 padding:3px 7px;
 color:#344b43;
 background:rgba(255,255,255,.76);
 border-radius:5px;
 box-shadow:0 1px 4px rgba(35,55,48,.12);
 font-size:13px;
 font-weight:800;
 line-height:1;
 white-space:nowrap;
}
