  /* Basin Insights overlay shell: map is full viewport and header/footer float above it. */
  .bisn-overlay-shell {
    overflow: hidden;
    --bisn-header-clearance: 128px;
    --bisn-footer-clearance: 0px;
  }
  .bisn-overlay-shell > .flex.grow.flex-col { position: relative; min-height: 100vh; min-height: 100dvh; }
  .bisn-overlay-shell #header {
    position: fixed;
    top: 8px;
    left: 0;
    right: 0;
    z-index: 1200;
    pointer-events: none;
  }
  .bisn-overlay-shell #header .kt-container-fixed,
  .bisn-overlay-shell #header .flr-header-shell { pointer-events: auto; }
  /* The floating header sits at z-1200; lift the global profile modal above it (it ships at z-200). */
  .bisn-overlay-shell #profileModal { z-index: 2000; }
  .bisn-overlay-shell .flr-text-logo-sub {
    color: #365845 !important;
    font-weight: 800;
  }
  .dark .bisn-overlay-shell .flr-text-logo-sub {
    color: #96c8a8 !important;
  }
  .bisn-overlay-shell .container-fixed.w-full.flex.px-0 { width: 100vw; max-width: none; margin: 0; }
  .bisn-overlay-shell #content { min-height: 100vh; min-height: 100dvh; }
  .bisn-overlay-shell .footer.footer-bisn-minimal {
    position: fixed;
    left: auto;
    right: 0;
    bottom: 0;
    z-index: 1200;
    pointer-events: none;
    background: transparent;
    width: auto;
  }
  .bisn-overlay-shell .footer.footer-bisn-minimal .kt-container-fixed {
    pointer-events: auto;
    border: 0;
    margin: 0;
    padding: 0 12px 12px;
    background: transparent;
    width: auto;
    max-width: none;
  }
  .bisn-overlay-shell .footer.footer-bisn-minimal .kt-container-fixed > div {
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    justify-content: flex-end;
  }
  .bisn-overlay-shell .footer.footer-bisn-minimal a {
    color: rgba(26,29,28,0.86) !important;
    text-shadow: 0 1px 2px rgba(255,255,255,0.6);
  }
  .dark .bisn-overlay-shell .footer.footer-bisn-minimal a {
    color: rgba(255,255,255,0.88) !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.45);
  }

  /* Fullscreen map itself */
  .bisn-fullscreen-wrap { position: relative; width: 100%; }
  #map { height: 100vh; height: 100dvh; width: 100%; position: relative; }

  /* Map attribution: lower-left, collapsed (info button) by default */
  .bisn-overlay-shell .maplibregl-ctrl-bottom-left {
    left: 12px;
    bottom: 12px;
  }
  .bisn-overlay-shell .maplibregl-ctrl-attrib {
    background: rgba(255, 255, 255, 0.72);
    border-radius: 8px;
    font-size: 11px;
    margin: 0;
  }
  .dark .bisn-overlay-shell .maplibregl-ctrl-attrib {
    background: rgba(37, 40, 38, 0.78);
    color: #fff;
  }
  .bisn-overlay-shell .maplibregl-ctrl-attrib.maplibregl-compact:not(.maplibregl-compact-show) .maplibregl-ctrl-attrib-inner {
    display: none;
  }
  /* Info button: drop MapLibre's 50% white disc behind the icon (read as a white ring on dark);
     redraw the icon as a black disc with a white "i" so it stays legible in both modes. */
  .bisn-overlay-shell .maplibregl-ctrl-attrib-button {
    background-color: transparent;
    background-image: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 20 20'><circle cx='10' cy='10' r='6' fill='%23000'/><path d='M9 7a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0' fill='%23fff'/></svg>");
  }

  /* Unified sidebar */
  :root {
    --bisn-sidebar-w: 340px;
    --bisn-space-2: 8px;
    --bisn-space-3: 12px;
    --bisn-space-4: 16px;
    --bisn-sidebar-divider: rgba(26,29,28,0.12);
  }
  .dark :root, .dark.bisn-overlay-shell {
    --bisn-sidebar-divider: rgba(255,255,255,0.14);
  }

  .bisn-sidebar {
    position: absolute;
    top: calc(var(--bisn-header-clearance) + 6px);
    /* align left edge with the menu bar (max-width 1600px, centered) */
    left: max(24px, calc((100vw - 1600px) / 2));
    z-index: 1002;
    width: var(--bisn-sidebar-w);
    max-height: calc(100vh - var(--bisn-header-clearance) - 20px);
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    /* Match the floating glass header pill exactly. */
    background: rgba(255, 255, 255, 0.44);
    color: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 14px;
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    font-size: 14px;
    line-height: 1.35;
    transform-origin: left center;
    transition: transform .3s cubic-bezier(.22,.61,.36,1), opacity .26s ease;
  }
  .dark .bisn-sidebar {
    background: rgba(20, 24, 31, 0.55);
    color: #e5e7eb;
    border-color: rgba(255, 255, 255, 0.12);
  }

  .bisn-sidebar-section {
    padding: 14px;
  }
  .bisn-sidebar-filters + .bisn-sidebar-3d,
  .bisn-sidebar-filters + .bisn-sec,
  .bisn-sidebar-3d + .bisn-sec,
  .bisn-sec + .bisn-sec,
  .bisn-sec + .bisn-sidebar-legend {
    border-top: 1px solid var(--bisn-sidebar-divider);
  }
  .bisn-sidebar-heading {
    margin: 0 0 var(--bisn-space-3);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
  }

  /* Panel header row: title + hide toggle */
  .bisn-sidebar-headrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--bisn-space-3);
    margin: 0 0 var(--bisn-space-3);
  }
  .bisn-sidebar-headrow .bisn-sidebar-heading { margin: 0; }
  .bisn-sidebar-heading {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .bisn-sidebar-heading svg { width: 16px; height: 16px; opacity: 0.7; flex-shrink: 0; }
  .bisn-panel-hide {
    border: 0;
    background: rgba(0,0,0,0.06);
    color: inherit;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    flex-shrink: 0;
    transition: opacity .15s ease, background .15s ease;
  }
  .bisn-panel-hide svg { width: 16px; height: 16px; }
  .bisn-panel-hide:hover { opacity: 1; background: rgba(0,0,0,0.12); }
  .dark .bisn-panel-hide { background: rgba(255,255,255,0.08); }
  .dark .bisn-panel-hide:hover { background: rgba(255,255,255,0.16); }

  /* Hidden state: slide the card off to the left and fade it out */
  .bisn-sidebar.is-hidden {
    transform: translateX(calc(-100% - 24px));
    opacity: 0;
    pointer-events: none;
  }

  /* Collapsed-panel reveal: slim drawer handle anchored to the left edge */
  .bisn-panel-show {
    position: absolute;
    top: 50%;
    left: 0;
    z-index: 1002;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 30px;
    padding: 16px 0;
    border: 1px solid rgba(255,255,255,0.5);
    border-left: 0;
    border-radius: 0 12px 12px 0;
    background: rgba(255,255,255,0.62);
    color: #1a1d1c;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    cursor: pointer;
    box-shadow: 2px 6px 18px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(-50%) translateX(-100%);
    pointer-events: none;
    transition: opacity .24s ease .04s, transform .3s cubic-bezier(.22,.61,.36,1) .04s, background .15s ease;
  }
  .bisn-panel-show svg { width: 16px; height: 16px; }
  .bisn-panel-show .bisn-show-layers { opacity: 0.82; }
  .bisn-panel-show .bisn-show-chev { width: 14px; height: 14px; opacity: 0.6; }
  .bisn-panel-show:hover { background: rgba(255,255,255,0.82); }
  .dark .bisn-panel-show {
    background: rgba(37,40,38,0.78);
    color: #fff;
    border-color: rgba(255,255,255,0.16);
  }
  .dark .bisn-panel-show:hover { background: rgba(37,40,38,0.9); }
  .bisn-panel-show.is-visible {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
    pointer-events: auto;
  }

  /* Pill toggles (GSAs / 3D view) */
  .bisn-pill-row {
    display: flex;
    gap: 8px;
  }
  .bisn-pill {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 8px;
    border-radius: 10px;
    border: 1px solid rgba(26,29,28,0.14);
    background: rgba(255,255,255,0.5);
    color: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
  }
  .bisn-pill svg { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.78; }
  .bisn-pill:hover { background: rgba(255,255,255,0.72); }
  .bisn-pill-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
  }
  .bisn-pill:has(.bisn-pill-input:checked) {
    background: #0d7cff;
    border-color: #0d7cff;
    color: #fff;
    box-shadow: 0 2px 10px rgba(13,124,255,0.32);
  }
  .bisn-pill:has(.bisn-pill-input:checked) svg { opacity: 1; }
  .bisn-pill:has(.bisn-pill-input:focus-visible) {
    outline: 2px solid rgba(13,124,255,0.45);
    outline-offset: 2px;
  }
  .dark .bisn-pill { background: rgba(0,0,0,0.28); border-color: rgba(255,255,255,0.14); }
  .dark .bisn-pill:hover { background: rgba(0,0,0,0.4); }
  .dark .bisn-pill:has(.bisn-pill-input:checked) { background: #0d7cff; border-color: #0d7cff; color: #fff; }

  /* Generic collapsible section (Basin Statistics, Crop Breakdown) */
  .bisn-sec { padding: 0; }
  .bisn-sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--bisn-space-3);
    padding: 14px;
    cursor: pointer;
    user-select: none;
  }
  .bisn-sec-headleft { display: flex; align-items: center; gap: 8px; min-width: 0; }
  .bisn-sec-headleft svg { width: 15px; height: 15px; opacity: 0.7; flex-shrink: 0; }
  .bisn-sec-title { margin: 0; font-size: 15px; font-weight: 600; }
  .bisn-sec-head .chev { display: inline-block; transition: transform .18s ease; opacity: 0.75; }
  .bisn-sec.collapsed .chev { transform: rotate(-90deg); }
  .bisn-sec-body { padding: 0 14px 14px; }
  .bisn-sec.collapsed .bisn-sec-body { display: none; }
  .bisn-filter-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 10px;
    align-items: end;
  }
  .bisn-filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
  }
  .bisn-field-label {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.82;
    line-height: 1.2;
  }
  .bisn-var-labelrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .bisn-openet-attrib { display: none; align-items: center; flex-shrink: 0; opacity: 0.9; }
  .bisn-openet-attrib.is-on { display: inline-flex; }
  .bisn-openet-attrib:hover { opacity: 1; }
  .bisn-openet-attrib img { height: 15px; width: auto; display: block; }
  .bisn-sidebar select {
    width: 100%;
    max-width: 100%;
    font-size: 14px;
    line-height: 1.25;
    color: inherit;
    border: 1px solid rgba(26,29,28,0.12);
    border-radius: 10px;
    padding: 8px 2.125rem 8px 10px;
    appearance: none;
    -webkit-appearance: none;
    background-color: rgba(255,255,255,0.62);
    background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2012%2012%22%3E%3Cpath%20fill%3D%231a1d1c%22%20fill-opacity%3D%220.72%22%20d%3D%22M2.5%204.5%206%208l3.5-3.5%22/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
  }
  .bisn-filter-field-year select {
    padding-left: 8px;
    padding-right: 1.75rem;
    text-align: center;
  }
  .dark .bisn-sidebar select {
    background-color: rgba(0,0,0,0.28);
    border-color: rgba(255,255,255,0.14);
    background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2012%2012%22%3E%3Cpath%20fill%3D%23ffffff%22%20fill-opacity%3D%220.85%22%20d%3D%22M2.5%204.5%206%208l3.5-3.5%22/%3E%3C/svg%3E");
  }
  .bisn-gsa-block {
    display: flex;
    flex-direction: column;
    gap: var(--bisn-space-3);
    margin-top: var(--bisn-space-3);
  }
  .bisn-opacity-wrap {
    display: flex;
    align-items: center;
    gap: var(--bisn-space-3);
    font-size: 14px;
  }
  .bisn-gsa-opacity {
    flex-direction: column;
    align-items: stretch;
    gap: var(--bisn-space-2);
  }
  .bisn-gsa-opacity .bisn-range {
    width: 100%;
  }
  .bisn-range {
    -webkit-appearance: none;
    appearance: none;
    width: 124px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(13,124,255,0.4), rgba(13,124,255,0.92));
    cursor: pointer;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.18);
  }
  .dark .bisn-range { background: linear-gradient(90deg, rgba(84,161,255,0.45), rgba(84,161,255,0.96)); box-shadow: inset 0 1px 2px rgba(0,0,0,0.32); }
  .bisn-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    border: 0;
    box-shadow: 0 0 0 2px #0d7cff, 0 2px 5px rgba(0,0,0,0.38);
    transition: box-shadow .15s ease, transform .1s ease;
  }
  .bisn-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    border: 0;
    box-shadow: 0 0 0 2px #0d7cff, 0 2px 5px rgba(0,0,0,0.38);
    transition: box-shadow .15s ease, transform .1s ease;
  }
  .dark .bisn-range::-webkit-slider-thumb { background: #2a2d2c; }
  .dark .bisn-range::-moz-range-thumb { background: #2a2d2c; }
  .bisn-range:hover::-webkit-slider-thumb,
  .bisn-range:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 2px #0d7cff, 0 0 0 7px rgba(13,124,255,0.18), 0 2px 5px rgba(0,0,0,0.38);
  }
  .bisn-range:hover::-moz-range-thumb,
  .bisn-range:focus-visible::-moz-range-thumb {
    box-shadow: 0 0 0 2px #0d7cff, 0 0 0 7px rgba(13,124,255,0.18), 0 2px 5px rgba(0,0,0,0.38);
  }
  .bisn-range:active::-webkit-slider-thumb {
    transform: scale(1.08);
    box-shadow: 0 0 0 2px #0d7cff, 0 0 0 9px rgba(13,124,255,0.24), 0 2px 5px rgba(0,0,0,0.38);
  }
  .bisn-range:active::-moz-range-thumb {
    transform: scale(1.08);
    box-shadow: 0 0 0 2px #0d7cff, 0 0 0 9px rgba(13,124,255,0.24), 0 2px 5px rgba(0,0,0,0.38);
  }
  .bisn-range:focus-visible { outline: none; }
  .bisn-range::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(13,124,255,0.4), rgba(13,124,255,0.92));
  }

  /* GSA opacity: readout row + live preview swatch */
  .bisn-opacity-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--bisn-space-3);
  }
  .bisn-opacity-readout { display: inline-flex; align-items: center; gap: 7px; }
  .bisn-opacity-val {
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    opacity: 0.92;
    min-width: 34px;
    text-align: right;
  }
  .bisn-opacity-preview {
    width: 16px;
    height: 16px;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    background-color: rgba(255,255,255,0.5);
    background-image:
      linear-gradient(45deg, rgba(0,0,0,0.16) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.16) 75%),
      linear-gradient(45deg, rgba(0,0,0,0.16) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.16) 75%);
    background-size: 6px 6px;
    background-position: 0 0, 3px 3px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.2);
  }
  .dark .bisn-opacity-preview { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25); }
  .bisn-opacity-preview .fill {
    position: absolute;
    inset: 0;
    background: #5c6b4f;
    opacity: 0.2;
  }

  /* GSA opacity: accent-filled track that reflects the current value */
  .bisn-range-fill {
    background: linear-gradient(90deg, #3a90ff 0%, #0d7cff var(--val, 20%), rgba(26,29,28,0.14) var(--val, 20%), rgba(26,29,28,0.14) 100%);
  }
  .dark .bisn-range-fill {
    background: linear-gradient(90deg, #5aa0ff 0%, #3a90ff var(--val, 20%), rgba(255,255,255,0.16) var(--val, 20%), rgba(255,255,255,0.16) 100%);
  }
  .bisn-range-fill::-moz-range-track { height: 8px; border-radius: 999px; background: rgba(26,29,28,0.14); border: 0; }
  .dark .bisn-range-fill::-moz-range-track { background: rgba(255,255,255,0.16); }
  .bisn-range-fill::-moz-range-progress { height: 8px; border-radius: 999px; background: linear-gradient(90deg, #3a90ff, #0d7cff); }
  .dark .bisn-range-fill::-moz-range-progress { background: linear-gradient(90deg, #5aa0ff, #3a90ff); }

  /* Stats block (inside sidebar) */
  .bisn-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: var(--bisn-space-3); }
  .bisn-kpi {
    background: rgba(255,255,255,0.4);
    border: 1px solid rgba(26,29,28,0.1);
    border-radius: 10px;
    padding: 10px 12px;
  }
  .dark .bisn-kpi { background: rgba(0,0,0,0.22); border-color: rgba(255,255,255,0.12); }
  .bisn-kpi .label { font-size: 12px; font-weight: 500; opacity: 0.78; }
  .bisn-kpi .val { font-size: 20px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; line-height: 1.2; }
  .bisn-topcrops { margin-top: 0; max-height: 148px; overflow: auto; }
  .bisn-section-label {
    margin: 0 0 var(--bisn-space-3);
    font-size: 14px;
    font-weight: 600;
    opacity: 0.9;
  }
  .bisn-crop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--bisn-space-3);
    padding: 6px 0;
  }
  .bisn-crop .left { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .bisn-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.35);
    box-shadow: 0 0 0 1px rgba(0,0,0,0.2) inset;
  }
  .bisn-crop .name {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .bisn-crop .count {
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
  }
  .bisn-empty { opacity: 0.7; font-size: 14px; }

  /* Legend (footer of sidebar) */
  .bisn-sidebar-legend { padding: 14px; }
  .bisn-legend-inner { display: flex; flex-direction: column; gap: var(--bisn-space-3); }
  .bisn-legend-title { font-size: 14px; font-weight: 600; margin: 0; }
  .bisn-legend-note { font-size: 13px; opacity: 0.82; margin: 0; line-height: 1.4; }
  .bisn-legend-ramp {
    height: 12px;
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.18);
  }
  .bisn-legend-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    opacity: 0.82;
  }

  /* Mobile tweaks: narrower min-width so the header doesn’t block the map */
  @media (max-width: 767px) {
    .bisn-overlay-shell { --bisn-header-clearance: 96px; }
    .bisn-overlay-shell #header { top: 4px; }
    .bisn-overlay-shell .footer.footer-bisn-minimal .kt-container-fixed { padding: 0 8px 8px; }
    .bisn-overlay-shell .maplibregl-ctrl-bottom-left { left: 8px; bottom: 8px; }
    :root { --bisn-sidebar-w: 86vw; }
    .bisn-sidebar { left: 12px; }
  }

  /* 3D height (inside sidebar, shown when 3D is on) */
  .bisn-sidebar-3d {
    padding: 14px;
    display: none;
  }
  .bisn-sidebar-3d-label {
    display: flex;
    align-items: center;
    gap: var(--bisn-space-3);
    font-size: 14px;
  }
  .bisn-sidebar-3d-label span { flex-shrink: 0; opacity: 0.85; }
  .bisn-range-full { width: 100%; flex: 1 1 0; min-width: 0; }

  /* Field details modal (centered over the map, styled like stats) */
  .bisn-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(2px);
    z-index: 1002;
    display: none;
  }
  .bisn-modal-backdrop.open { display: block; }

  .bisn-fieldpanel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1003; /* above backdrop */
    background: rgba(255,255,255,0.56);
    color: #1a1d1c;
    border: 1px solid rgba(255,255,255,0.65);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    min-width: 280px;
    max-width: 92vw;
    width: 720px;
    max-height: 80vh;
    display: none; /* hidden by default until a field is selected */
    overflow: hidden; /* clip rounded corners */
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  }
  .dark .bisn-fieldpanel { background: rgba(37, 40, 38, 0.74); color: #fff; border-color: rgba(255,255,255,0.14); }
  .bisn-fieldpanel.open { display: block; }
  .bisn-fieldpanel .head { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:12px 14px; border-bottom: 1px solid rgba(255,255,255,0.12); cursor: default; }
  .bisn-fieldpanel .title { margin:0; font-size:14px; font-weight:600; opacity:.95; }
  .bisn-fieldpanel .close { cursor:pointer; border:none; background:transparent; color:inherit; font-size:18px; line-height:1; padding:2px 6px; }
  .bisn-fieldpanel .body { padding: 12px 14px; max-height: calc(80vh - 50px); overflow: auto; }

  /* Mobile: keep modal compact */
  @media (max-width: 767px) {
    .bisn-fieldpanel { width: 92vw; min-width: 0; }
  }

  /* High-contrast styling for hover tooltip popup */
  .maplibregl-popup.basin-tip { z-index: 1000; }
  .maplibregl-popup.basin-tip .maplibregl-popup-content {
    background: rgba(20, 20, 20, 0.95);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    padding: 6px 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  }
  .maplibregl-popup.basin-tip .maplibregl-popup-close-button { color: #ffffff; }
  /* Popup arrow: explicit per-anchor coloring + subtle light outline for visibility in dark mode */
  .maplibregl-popup.basin-tip .maplibregl-popup-tip {
    border-top-color: transparent !important;
    border-bottom-color: transparent !important;
    border-left-color: transparent !important;
    border-right-color: transparent !important;
    filter: drop-shadow(0 0 0.75px rgba(255,255,255,0.35));
  }
  .maplibregl-popup.basin-tip.maplibregl-popup-anchor-top .maplibregl-popup-tip {
    border-bottom-color: rgba(20, 20, 20, 0.95) !important;
  }
  .maplibregl-popup.basin-tip.maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
    border-top-color: rgba(20, 20, 20, 0.95) !important;
  }
  .maplibregl-popup.basin-tip.maplibregl-popup-anchor-left .maplibregl-popup-tip {
    border-right-color: rgba(20, 20, 20, 0.95) !important;
  }
  .maplibregl-popup.basin-tip.maplibregl-popup-anchor-right .maplibregl-popup-tip {
    border-left-color: rgba(20, 20, 20, 0.95) !important;
  }
  /* Centered loading spinner for map */
  .bisn-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(255, 255, 255, 0.25);
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: bisn-spin 0.9s linear infinite;
    box-shadow: 0 0 12px rgba(0,0,0,0.4);
    background: rgba(0,0,0,0.1);
  }
  @keyframes bisn-spin { to { transform: rotate(360deg); } }
