
/* CSS_ICON_CACHE_BUST: every url('/static/icons/...') below carries a
   ?v=<timestamp> — /static/icons/ is served with Cache-Control:
   max-age=86400 (app/__init__.py's _cache_static_icons), so a browser
   that already loaded the page keeps the OLD svg bytes for up to a day
   with no revalidation at all, same as url_for'd files — unlike those,
   these url()s have no Jinja to auto-bump them, so bump the ?v= by hand
   (search/replace this file's current value) whenever ANY icon file
   referenced below changes content, even if its path doesn't change. */

/* Make the Layers pill use the same style as .geosam-pill/.slideup-button, just larger */
.layer-pill-btn {
  min-width: 240px;
  width: 240px;
  max-width: 240px;
  min-height: 3rem;
  height: 3rem;
  color: var(--pill-fg);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 24px 0 16px;
  box-sizing: border-box;
  text-align: right;
}

.layer-pill-btn .remote-btn-label {
  font-size: 1.125rem;
  font-weight: 500;
  flex: 1 1 auto;
  text-align: right;
}
.layer-pill-btn svg {
  height: 1.6875rem; /* 2rem * 0.85 */
  width: 1.6875rem;
  margin-right: 8px;
  color: inherit;
  fill: currentColor;
}

 .slideup-button {
  font-size: 0.8125rem !important;
  color: var(--pill-fg);
}
.slideup-button svg {
  color: inherit;
  fill: currentColor;
}
.sheet-nav-logo {
  height: 2.25rem;
  width: auto;
  margin-left: 16px;
  margin-right: 0;
  z-index: 10001;
  opacity: 0.92;
  pointer-events: none;
}

/* Light tiles: swap to dark logo on both panels */
body:not(.tile-dark) .sheet-nav-logo,
body:not(.tile-dark) .intro-nav-logo {
  content: url('/static/logo/Logo_dark.png');
}

body.tile-dark #dash-sheet.sheet-nav-compact .sheet-nav-logo {
  content: url('/static/logo/LogoSmall_light.png');
}
body:not(.tile-dark) #dash-sheet.sheet-nav-compact .sheet-nav-logo {
  content: url('/static/logo/LogoSmall_dark.png');
}

#dash-sheet.sheet-nav-compact .sheet-nav-logo {
  height: 1.125rem;
}

/* Left and bottom panels: logo left-aligned */
#dash-sheet:not(.sheet-right) .sheet-nav-bar {
  justify-content: flex-start;
  text-align: left;
}
#dash-sheet:not(.sheet-right) .sheet-nav-logo {
  margin-left: 16px;
  margin-right: 0;
}

/* Right panel: logo right-aligned */
#dash-sheet.sheet-right .sheet-nav-bar {
  justify-content: flex-end;
  text-align: right;
}
#dash-sheet.sheet-right .sheet-nav-logo {
  margin-left: 0;
  margin-right: 16px;
}
@media (max-width: 768px) {
  .sheet-nav-logo {
    height: 1.125rem;
  }
  body.tile-dark .sheet-nav-logo {
    content: url('/static/logo/LogoSmall_light.png');
  }
  body:not(.tile-dark) .sheet-nav-logo {
    content: url('/static/logo/LogoSmall_dark.png');
  }
  #dash-sheet:not(.sheet-right) .sheet-nav-logo {
    margin-left: 8px;
    margin-right: 0;
  }
  #dash-sheet.sheet-right .sheet-nav-logo {
    margin-left: 0;
    margin-right: 8px;
  }
}


/* ── Dock view: nav-bar badge mirror ── */
#dash-sheet.dock-view-active .sheet-nav-title {
  display: none;
}
/* Atlas: shows the Name . Type header (map-shared.js's setNavTitle calls)
   — the panel's only place carrying that context there. Land Studio
   (segment-edit-active) keeps it too — it's the only place in card view
   that still says which land (and, inside a zone, "Land: Zone" —
   segment-mode.js's own setNavTitle calls) you're on at all; the seg bar
   doesn't cover that on its own. Dock view's own badge mirror above
   still hides it — that place is already occupied there. */
#dash-sheet:not(.dock-view-active) .sheet-nav-title {
  display: flex;
}
.nav-btn.sheet-layer-nav {
  top: 50%;
  transform: translateY(-50%);
  z-index: 10002;
}
.sheet-nav-badge {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--nav-safe-left, 56px);
  right: var(--nav-safe-right, 44px);
  display: flex;
  align-items: center;
  /* Sits flush against .dash-view-toggles (the Card/Dock buttons), not
     centered in whatever space is left between the logo and them — the
     requested [logo] [layer name + dropdown] [card/dock buttons] order.
     .dash-view-toggles itself sits at the nav bar's right edge by
     default and moves to the left edge for a right-docked (.sheet-right)
     panel (styles.css, below) — this mirrors that same flip. */
  justify-content: flex-end;
  gap: 6px;
  pointer-events: none;
}
#dash-sheet.sheet-right .sheet-nav-badge { justify-content: flex-start; }
/* [hidden] and a class-level `display` rule have EQUAL specificity
   (0,1,0 each) — whichever is declared later in the stylesheet wins the
   tie, which is this rule, not the browser's own built-in [hidden]
   {display:none}. slideup.js's navBadge.hidden=true (switching back to
   Card view) was therefore setting the attribute correctly but doing
   nothing visually — confirmed live: the Dock-view nav badge (icon +
   plan/layer name) stayed on screen after leaving Dock, reading as a
   leftover "REDD+" title sitting where Card view is normally empty.
   Needs its own explicit override to actually win. */
.sheet-nav-badge[hidden] {
  display: none;
}
.sheet-nav-badge > * { pointer-events: auto; }
.sheet-nav-badge-icon {
  flex-shrink: 0;
  width: 1.615rem;
  height: 1.615rem;
  border: none;
  background: transparent;
  color: rgb(var(--theme-fg));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.75;
  transition: color 0.18s, opacity 0.18s;
}
.sheet-nav-badge-icon:hover { opacity: 0.9; }
.sheet-nav-badge-icon svg {
  width: 1.0625rem;
  height: 1.0625rem;
  color: inherit;
  fill: currentColor;
  transition: filter 0.18s;
}
.sheet-nav-badge-icon.icon-active { opacity: 1; }
/* --plan-color (set on #dash-sheet by slideup.js's own _syncNavBadge,
   ONLY while the mirrored Dock item is actually a plan — see its own
   comment) replaces --zone-accent here, same reasoning and same bug as
   .layer-icon-btn.icon-active above: --zone-accent is one global "last
   default plan" value with no idea whether THIS particular badge is
   currently showing a plan or a sensing layer, so a sensing layer
   mirrored into Dock's own badge picked up a plan's color too. Plain
   fallback (no var() wrapping an unset custom property) for a sensing
   layer, since --plan-color is reliably absent for one. */
body.tile-dark .sheet-nav-badge-icon.icon-active {
  color: var(--plan-color, var(--status-warn));
}
body.tile-dark .sheet-nav-badge-icon.icon-active svg {
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--plan-color, rgb(var(--status-warn-rgb))) 90%, transparent)) drop-shadow(0 1px 2px rgba(var(--blackRGB),0.2));
}
body:not(.tile-dark) .sheet-nav-badge-icon.icon-active {
  color: var(--plan-color, var(--highlight));
}
body:not(.tile-dark) .sheet-nav-badge-icon.icon-active svg {
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--plan-color, var(--highlight)) 60%, transparent)) drop-shadow(0 1px 2px rgba(var(--blackRGB),0.15));
}
.sheet-nav-badge-label {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgb(var(--theme-fg));
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.sheet-nav-badge-dropdown {
  flex-shrink: 1;
  min-width: 0;
  max-width: 160px;
  font-size: 0.8125rem;
}
.sheet-nav-badge-dropdown .custom-dropdown-selected {
  padding: 2px 6px;
  overflow: hidden;
}
.sheet-nav-badge-dropdown .custom-dropdown-label {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
#dash-sheet.sheet-nav-compact .sheet-nav-badge-dropdown .custom-dropdown-label {
  display: none;
}
#dash-sheet.sheet-nav-compact .sheet-nav-badge-dropdown .custom-dropdown-source-icon {
  display: block;
  width: var(--icon-arrow-size-sm);
  height: var(--icon-arrow-size-sm);
  background-color: currentColor;
  -webkit-mask-image: url('/static/icons/data/DataSource.svg?v=1792024277');
  mask-image: url('/static/icons/data/DataSource.svg?v=1792024277');
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
body.tile-dark .sheet-nav-badge-dropdown .custom-dropdown-source-icon-wrap {
  color: rgba(var(--lightTheme), 0.45) !important;
}
body:not(.tile-dark) .sheet-nav-badge-dropdown .custom-dropdown-source-icon-wrap {
  color: rgba(var(--darkTheme), 0.45) !important;
}

/* ── Sheet nav title (name · level) ──────────────────────────────────────── */
.sheet-nav-title {
  position: absolute;
  top: 0; bottom: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
  gap: 0;
  /* A small nudge down off the logo's own vertical center — was sitting
     flush on the same baseline, reading as cramped against it. */
  transform: translateY(4px);
}
.sheet-nav-title.nav-title-safe {
  left: var(--nav-safe-left, 56px);
  right: var(--nav-safe-right, 44px);
}

.sheet-nav-name {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  opacity: 0.88;
  flex-shrink: 0;
  z-index: 10002;
}
/* The panel header's name / level are copy-pasteable (the bar itself is
   user-select:none for dragging; slideup.js's attachNavDrag skips these). */
.sheet-nav-name,
.sheet-nav-level {
  -webkit-user-select: text;
  user-select: text;
  cursor: text;
}
.sheet-nav-sep {
  opacity: 0.35;
  padding: 0 5px;
  font-size: 0.6875rem;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
}
.sheet-nav-level {
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.5;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
:root {
  --font-scale: 1;
  /* Multiplier behind every plan-color tint (the plan card's own glass
     wash, its header's colored left edge, Dock view's equivalent) — see
     .mb-group-plan's own comment. Was 0 — permanently zeroing all of
     them out — with no toggle anywhere in the codebase driving it
     (confirmed: no other reference to this var exists), so there's
     nothing to "turn back on" from settings; it was just left off. 1
     restores the colored glassy look these were designed to have by
     default. */
  --BACKGROUND_COLOR_FILTER: 1;
  /* ── Responsive layout foundation ── */
  --gutter: clamp(12px, 4vw, 50px);
  --icon-arrow-size: 1.25rem;
  --icon-arrow-size-sm:         calc(var(--icon-arrow-size) * 0.9);
  --icon-arrow-size-breadcrumb: calc(var(--icon-arrow-size) * 0.7);
  --blur: 12px;
  --trans: 0.7;
  --roll-menu-duration: 0.15s;
  --roll-menu-idle-collapse: 5s;
  --fly-duration: 0.9s;
  --studio-col-slack: 80px;      
  --topbar-h: 110px;
  --map-gap: 4px;
  --smallcorner: 8px;
  --bigcorner: 12px;
  --maximize-margin: 20px;

  --whiteRGB:      255, 255, 255;
  --blackRGB:      0, 0, 0;

  /* ── Plan↔sensing-layer connection colors — see context/Tech/design.md ── */
  --rainbow-1:  #f4978e;   /* red */
  --rainbow-2:  #f8b17e;   /* orange */
  --rainbow-3:  #f9dc7e;   /* amber */
  --rainbow-4:  #b9e79f;   /* green */
  --rainbow-5:  #8fd6c1;   /* teal */
  --rainbow-6:  #90cbe8;   /* blue */
  --rainbow-7:  #a7bfd9;   /* slate */
  --rainbow-8:  #b3a3d6;   /* indigo */
  --rainbow-9:  #dda3d4;   /* magenta */
  --rainbow-10: #f4a6c6;   /* pink */
  --rainbow-11: #c7e18f;   /* lime */
  --rainbow-12: #f6d18a;   /* gold */
  --verena-color: #caa5f7; /* purplefucker */

  /* ── Theme surface colors ─- */
  --lightTheme: var(--whiteRGB);
  --darkTheme:  var(--blackRGB);
  --lightTheme: 255, 255, 255;
  --darkTheme:  21,21,21;

  --theme-fg:   var(--darkTheme);  /* default */
  --theme-highlight: var(--highlight-border-color-light);

  --white: #FFFFFF;
  --black: #000000;

  --lightgrey:  #EEEEEE;
  --darkgrey:   #555555;
  --darkergrey: #333333;
  --lowlight:   #f7f7f7;

  --lightcolor: #D8ECC7;
  --midcolor:   #7CB342;
  --midcolor-rgb: 124, 179, 66;   /* rgb triplet companion — for rgba(var(--midcolor-rgb), X) translucent fills */
  --darkcolor:  #006B2C;

  --tooltip-bg: #222;

  /* USDA soil-texture triangle palette (12 classes) */
  --usda-clay:             #b5451b;
  --usda-sandy-clay:       #e07b54;
  --usda-silty-clay:       #c9956c;
  --usda-clay-loam:        #d4aa72;
  --usda-sandy-clay-loam:  #c9b45a;
  --usda-silty-clay-loam:  #8faa82;
  --usda-sandy-loam:       #7ab568;
  --usda-loam:             #9ec96e;
  --usda-silt-loam:        #89b5d0;
  --usda-silt:             #5585b0;
  --usda-loamy-sand:       #e8cc7a;
  --usda-sand:             #f2edcc;

  /* Terrain legend */
  --slope-gradient-1: #c8e6c9;
  --slope-gradient-2: #fff176;
  --slope-gradient-3: #ff8f00;
  --slope-gradient-4: #b71c1c;
  --elevation-gradient-1: #404040;
  --elevation-gradient-2: #808080;
  --elevation-gradient-3: #c0c0c0;

  --greendeforest1: #228B22;
  --greendeforest2: #25af25;
  --blueforestgain: #2E86DE;
  --transdeforest: 1;

  --brownunsed1:#6B4B31;
  --highlight:  #D19243;
  --highlight-rgb: 209, 146, 67;   /* rgb triplet companion — for rgba(var(--highlight-rgb), X) glow/translucent uses */
  --brownunsed2:#CCB38A;

  --pink:     #ea9aaa;
  --darkpink: #e55572;

  /* approve/reject colors for status indicators, etc. — also the one
     centralized error-text color (.error-msg, .sp-confirm-yes, .text-
     error all read this var rather than their own hardcoded reds now)
     so every error message across the platform re-themes together, not
     per-component. Dark-mode override just below. */
  --red:      #C0392B;
  --red-rgb:  192, 57, 43;
  --green: #2a7d4f;
  --green-rgb: 42, 125, 79;

  /* ── Status / semantic colors (pass-fail-style indicators: EUDR */
  --status-good:    #4ade80;
  --status-bad:     #f87171;
  --status-warn:    #facc15;
  --status-neutral: #9ca3af;
  --status-good-rgb:    74, 222, 128;
  --status-bad-rgb:     248, 113, 113;
  --status-warn-rgb:    250, 204, 21;
  --status-neutral-rgb: 156, 163, 175;

  /* ── IUCN Red List conservation-status badge colors (biodiversity.js) ── */
  --iucn-cr: #dc2626;  /* Critically Endangered */
  --iucn-en: #ea580c;  /* Endangered */
  --iucn-vu: #ca8a04;  /* Vulnerable */
  --iucn-nt: #65a30d;  /* Near Threatened */
  --iucn-lc: #16a34a;  /* Least Concern */
  --iucn-dd: #6b7280;  /* Data Deficient */
  --iucn-ex: #1e1b4b;  /* Extinct */

  --segment-vertex-radius:          2.5;
  --segment-vertex-weight:          2;
  --segment-edge-weight:            2;
  --segment-edge-fill-opacity:      0.25;
  --move-seg-handle-radius:         2.5;

  /* ── Pill result typography tokens ──   */
  --pill-xs:   0.5625rem;   /* chart axis labels     */
  --pill-sm:   0.6875rem;  /* keys / section labels */
  --pill-md:   0.75rem;  /* stat values           */
  --pill-lg:   0.9375rem;  /* headlines             */
  --pill-fg:   rgb(var(--theme-fg));            /* values — full opacity */
  --pill-sub:  rgba(var(--theme-fg), 0.65);     /* labels / keys         */
  --pill-dim:  rgba(var(--theme-fg), 0.45);     /* source / attribution  */

  /* ── Layer Box: shared typography tokens ─────────────────────────────── */
  --layer-box-title-size:       0.6875rem;
  --layer-box-title-weight:     400;
  --layer-box-kv-key-size:      0.71875rem;
  --layer-box-kv-key-weight:    400;
  --layer-box-kv-value-size:    0.6875rem;
  --layer-box-kv-value-weight:  300;
  --layer-box-signature-size:   var(--pill-xs);
  --layer-box-signature-weight: 300;
}

/* --red's own dark-mode variant — the muted brick-red above reads fine
   on a light ground but loses most of its contrast/urgency against a
   near-black one; lightened (same hue) rather than just brightened, so
   it stays recognizably "the error red," not a different color. Keyed
   off body.tile-dark, same as every other themed token in this file
   (--theme-fg etc.) — a previous version of this comment claimed "no
   explicit light/dark toggle exists in this app" and gated it on the
   OS's own prefers-color-scheme instead, which was simply wrong:
   body.tile-dark is this app's real, manually-toggled theme class, used
   throughout this file, and reading the OS preference instead meant
   --red never followed the app's OWN theme toggle at all — confirmed
   live as a real bug, not just a stale comment. This is the only
   override needed for every centralized consumer (.error-msg,
   .sp-confirm-yes, .text-error) to re-theme automatically. */
body.tile-dark {
  --red:     #dd877e;
  --red-rgb: 221, 135, 126;
}

/* Key/value and signature COLOR (below, at each class's own definition) . */
:root {
  /* ── Climate chart tokens ── */
  --climate-rain:      rgba(80, 140, 200, 0.55);
  --climate-temp:      rgba(220, 130, 90, 0.65);
  --climate-temp-hot:  #d97070;
  --climate-temp-cold: #6fa8d0;
  --climate-wind:      rgba(151, 177, 164, 0.7);
  --climate-sunlight:          #f59e0b;
  --climate-sunlight-dim:      rgba(245, 158, 11, 0.55);
  --climate-sunlight-theory:     #38bdf8;
  --climate-sunlight-theory-dim: rgba(56, 189, 248, 0.55);
  --climate-humidity:             #1d91c0;
  --climate-water:                #2ca25f;
  --climate-water-dim:            rgba(44, 162, 95, 0.55);
  --climate-forest-dim:           rgba(74, 158, 74, 0.55);

  /* UNEP aridity zone colors */
  --climate-humid:      #4a90d9;
  --climate-subhumid:   #5cb85c;
  --climate-semiarid:   #e0a500;
  --climate-arid:       #e07030;
  --climate-hyperarid:  #b02010;

  /* ── Map polygon styles ── */
  
  --thin: 0.5px;
  --thick: 1.2px;

/* normal polygons */
  --normal-border-color-dark:  var(--white);
  --normal-border-color-light: var(--black);
  --normal-border-opacity:     0.8;
  --normal-border-weight:      var(--thin);
  --normal-border-blur:        0px;

  --normal-fill-color-dark:  var(--white);
  --normal-fill-color-light: var(--black);
  --normal-fill-opacity:     0;
  --normal-fill-blur:        0px;

  --asset-fill-opacity:       0.35;
  --asset-hover-fill-opacity: 0.55;

/* hover polygons */
  --hover-border-color-dark:  var(--normal-fill-color-dark);
  --hover-border-color-light: var(--normal-fill-color-light);
  --hover-border-opacity:     0.8;
  --hover-border-weight:      var(--thick);
  --hover-border-blur:        0px;

  --hover-fill-color-dark:  var(--normal-fill-color-dark);
  --hover-fill-color-light: var(--normal-fill-color-light);
  --hover-fill-opacity:     0.10;
  --hover-fill-blur:        0px;

/* highlight polygons */
  --highlight-border-color-dark:  var(--white); /* lightgrey */
  --highlight-border-color-light: var(--black); /* darkgrey */
  --highlight-border-opacity:     0.8;
  --highlight-border-weight:      var(--thick);
  --highlight-border-blur:        0px;

  --highlight-fill-color-dark:  var(--white);
  --highlight-fill-color-light: var(--black);
  --highlight-fill-opacity:     0;
  --highlight-fill-blur:        0px;

  --selected-border-color-dark:  var(--normal-fill-color-dark);
  --selected-border-color-light: var(--normal-fill-color-light);
  --selected-fill-color-dark:    var(--normal-fill-color-dark);
  --selected-fill-color-light:   var(--normal-fill-color-light);
  --selected-border-opacity:     0.3;
  --selected-border-weight:      var(--thick);
  --selected-fill-opacity:       0.25;

 /* edit polygons */
  --edit-mode-border-weight: var(--thick);
  --edit-border-color-dark:  var(--white); /* lightgrey */
  --edit-border-color-light: var(--black); /* darkgrey */

  /* Tree styles to pass on to map.js */
  --map-point-weight: 1.5;
  --map-point-weight-hover:    2.5;
  --map-point-opacity:         0.7;
  --map-point-fill-opacity:    0.7;
  --map-point-hover-anim:      0.1s;
  --map-point-radius-min:      0.3;
  --map-point-radius-max:      8;
  --map-point-radius-factor:   0.28;
  --map-point-radius-default:  30;

  --tree-asset-color: #FFFF00; /* default */

  --tree-esri-color:   #CCCCCC;
  --tree-google-color: #999999;
  --tree-mapbox-color: #444444;

  /* ── Globe atmosphere / fog (Mapbox setFog) ── */
  --fog-color:          rgb(186, 210, 235);  /* lower atmosphere / horizon haze */
  --fog-high-color:     rgb(36, 92, 223);   /* upper atmosphere */
  --fog-space-color:    rgb(15, 30, 60);    /* deep space */
  --fog-horizon-blend:  0.02;
  --fog-star-intensity: 0.4;

  --panel-glow:   0 0 6px color-mix(in srgb, var(--lowlight) 6%, transparent),
                  0 0 16px color-mix(in srgb, var(--lowlight) 3%, transparent);

  /* ── CAR property type colors ── */
  --car-iru:   #228B22;   /* Dark green - Imóvel Rural */
  --car-ast:   #D2821E;   /* Amber - Assentamento */
  --car-pct:   #8B008B;   /* Purple - Povos e Comunidades */
  --car-other: #787878;   /* Grey - Other */

  /* ── ESA WorldCover class colors (v200, 2021) ── */
  --esa-c10:  #006400;   /* Tree Cover */
  --esa-c20:  #ffbb22;   /* Shrubland */
  --esa-c30:  #ffff4c;   /* Grassland */
  --esa-c40:  #f096ff;   /* Cropland */
  --esa-c50:  #fa0000;   /* Built-up */
  --esa-c60:  #b4b4b4;   /* Bare / Sparse Vegetation */
  --esa-c70:  #f0f0f0;   /* Snow and Ice */
  --esa-c80:  #0064c8;   /* Permanent Water Bodies */
  --esa-c90:  #0096a0;   /* Herbaceous Wetland */
  --esa-c95:  #00cf75;   /* Mangroves */
  --esa-c100: #fae6a0;   /* Moss and Lichen */

  /* ── Dynamic World class colors (Google, V1) ── */
  --dw-c0: #419bdf;   /* Water */
  --dw-c1: #397d49;   /* Trees */
  --dw-c2: #88b053;   /* Grass */
  --dw-c3: #7a87c6;   /* Flooded Vegetation */
  --dw-c4: #e49635;   /* Crops */
  --dw-c5: #dfc35a;   /* Shrub & Scrub */
  --dw-c6: #c4281b;   /* Built */
  --dw-c7: #a59b8f;   /* Bare */
  --dw-c8: #b39fe1;   /* Snow & Ice */

  /* ── ESRI Annual Land Cover class colors (10m) ── */
  --esri-c1:  #1a5bab;   /* Water */
  --esri-c2:  #358221;   /* Trees */
  --esri-c4:  #87d19e;   /* Flooded Vegetation */
  --esri-c5:  #ffdb5c;   /* Crops */
  --esri-c7:  #ed022a;   /* Built Area */
  --esri-c8:  #ede9e4;   /* Bare Ground */
  --esri-c9:  #f2faff;   /* Snow / Ice */
  --esri-c10: #c8c8c8;   /* Clouds */
  --esri-c11: #c6ad8d;   /* Rangeland */

  /* ── GLAD GLCLU class colors (UMD, 2019) ── */
  --glad-c1: #419bdf;   /* Water */
  --glad-c2: #88b053;   /* Short Vegetation / Grassland */
  --glad-c3: #e49635;   /* Cropland */
  --glad-c4: #397d49;   /* Trees */
  --glad-c5: #c4281b;   /* Built-up */
  --glad-c6: #a59b8f;   /* Bare Ground */
  --glad-c7: #f2faff;   /* Snow / Ice */
  --glad-c8: #7a87c6;   /* Wetland */

  /* ── GLC_FCS30D class colors (Beijing Normal Univ., 1985–2022) ── */
  --glc-c10:  #ffff64;   /* Rainfed Cropland */
  --glc-c20:  #aaf0f0;   /* Irrigated Cropland */
  --glc-c51:  #003c00;   /* Closed Broadleaved Evergreen Forest */
  --glc-c52:  #285000;   /* Closed Broadleaved Deciduous Forest */
  --glc-c61:  #788200;   /* Open Broadleaved Evergreen Forest */
  --glc-c62:  #8ca000;   /* Open Broadleaved Deciduous Forest */
  --glc-c71:  #005000;   /* Closed Needleleaved Evergreen Forest */
  --glc-c72:  #003c00;   /* Closed Needleleaved Deciduous Forest */
  --glc-c81:  #286400;   /* Open Needleleaved Evergreen Forest */
  --glc-c82:  #5a8700;   /* Open Needleleaved Deciduous Forest */
  --glc-c91:  #004b00;   /* Closed Mixed Forest */
  --glc-c92:  #287800;   /* Open Mixed Forest */
  --glc-c120: #966400;   /* Shrubland */
  --glc-c130: #ffb432;   /* Grassland */
  --glc-c150: #ffdcd2;   /* Sparse Vegetation */
  --glc-c180: #00a884;   /* Wetland */
  --glc-c190: #c31400;   /* Impervious / Urban */
  --glc-c200: #fff5d7;   /* Bare Land */
  --glc-c210: #0046c8;   /* Water */
  --glc-c220: #ffffff;   /* Snow / Ice */

  /* ── MapBiomas LULC class colors — Collection 10 official ── */
  /* Forest */
  --mb-c3:  #1f8d49;   /* Forest Formation */
  --mb-c4:  #7dc975;   /* Savanna Formation */
  --mb-c5:  #04381d;   /* Mangrove */
  --mb-c6:  #007785;   /* Floodable Forest */
  --mb-c9:  #7a5900;   /* Forest Plantation */
  --mb-c49: #02d659;   /* Wooded Sandbank Vegetation */
  /* Non-Forest Natural Formation */
  --mb-c11: #519799;   /* Wetland */
  --mb-c12: #d6bc74;   /* Grassland */
  --mb-c29: #ffaa5f;   /* Rocky Outcrop */
  --mb-c32: #fc8114;   /* Hypersaline Tidal Flat */
  --mb-c50: #ad5100;   /* Herbaceous Sandbank Vegetation */
  /* Farming */
  --mb-c15: #edde8e;   /* Pasture */
  --mb-c20: #db7093;   /* Sugar Cane */
  --mb-c21: #ffefc3;   /* Mosaic of Uses */
  --mb-c35: #9065d0;   /* Palm Oil */
  --mb-c39: #f5b3c8;   /* Soybean */
  --mb-c40: #c71585;   /* Rice */
  --mb-c41: #f54ca9;   /* Other Temporary Crops */
  --mb-c46: #d68fe2;   /* Coffee */
  --mb-c47: #9932cc;   /* Citrus */
  --mb-c48: #e6ccff;   /* Other Perennial Crops */
  --mb-c62: #ff69b4;   /* Cotton */
  /* Non-Vegetated Area */
  --mb-c23: #ffa07a;   /* Beach, Dune & Sand Spot */
  --mb-c24: #d4271e;   /* Urban Area */
  --mb-c25: #db4d4f;   /* Other Non-Vegetated */
  --mb-c30: #9c0027;   /* Mining */
  --mb-c75: #c12100;   /* Photovoltaic Plant */
  /* Water */
  --mb-c31: #091077;   /* Aquaculture */
  --mb-c33: #2532e4;   /* River, Lake & Ocean */
  /* Non-Observed */
  --mb-c27: #d4d4d4;   /* Non Observed */

  /* ── Chart colors ─── */
  --chart-text:     rgb(21, 21, 21);
  --chart-grid:     rgba(21, 21, 21, 0.18);
  --chart-hover:    rgba(255,255,255,0.85);

  /* ── Tree detection colors ─── */
  --tree-circle:    #7CB342;   /* Olive green */

  /* ── Overlay colors ── */
  --image-bg:       #1a1a1a;

  /* ── Shared glass controls: tile selector, zoom, search ───────────────── */
  --control-glass-bg: transparent;
  --control-glass-border: rgba(100, 100, 100, 0.5);
  --control-glass-shadow: var(--panel-glow);
  --control-glass-text: rgba(var(--darkTheme), 0.88);
  --control-glass-text-muted: rgba(var(--darkTheme), 0.58);
  --control-glass-separator: rgba(var(--darkTheme), 0.35);
  --control-glass-hover: rgba(var(--darkTheme), 0.10);

  /* ── Map element shadow ────────────────────────────────────────────────── */
  --map-element-shadow: 0 2px 8px rgba(var(--blackRGB), 0.18), 0 1px 3px rgba(var(--blackRGB), 0.10);

  /* ── Consolidated glass panel tokens ───────────────────────────────────── */
  --glass-panel-bg: rgba(var(--lightTheme), 0.08);
  --glass-panel-blur: 16px;
  --glass-panel-shadow: 0 12px 40px rgba(var(--blackRGB), 0.28), 0 4px 12px rgba(var(--blackRGB), 0.15);
  /* calc(1px * var(--font-scale)): --font-scale defaults to 1, so this is
     exactly today's 1px at the default setting — it only grows/shrinks
     once someone actually moves off that default, same scaling every
     other sized value in a card already gets. */
  --glass-panel-border: calc(1px * var(--font-scale)) solid rgba(100, 100, 100, 0.5);
  --glass-panel-radius: var(--bigcorner);
  --glass-panel-edge: inset 0 1px 0 rgba(255,255,255,0.08);
  --glass-button-bg: rgba(var(--blackRGB), 0.05);
  --glass-button-hover-bg: rgba(var(--blackRGB), 0.1);
  --glass-button-blur: var(--glass-panel-blur);
  --panel-form-pad-x: 22px;
  --panel-form-pad-y: 18px;

  /* ── Tree circle color ──────────────────────────────────────────────────── */
  --tree-circle:     #333333;
}

body.tile-dark {
  /* ── Single-point flip: everything referencing these tokens adapts automatically ── */
  --theme-fg:              var(--lightTheme);
  --theme-highlight:       var(--highlight-border-color-dark);
  --tree-circle:           rgb(var(--lightTheme));
  color:                   rgb(var(--lightTheme));
  /* glass control tokens */
  --glass-button-bg:       rgba(var(--lightTheme), 0.12);
  --glass-button-hover-bg: rgba(var(--lightTheme), 0.22);
  --control-glass-border:  rgba(var(--lightTheme), 0.14);
  --control-glass-text:       rgba(var(--lightTheme), 0.92);
  --control-glass-text-muted: rgba(var(--lightTheme), 0.46);
  --control-glass-separator:  rgba(var(--lightTheme), 0.16);
  --control-glass-hover:      rgba(var(--lightTheme), 0.10);
  --chart-text:               rgb(255, 255, 255);
  --chart-grid:               rgba(255, 255, 255, 0.18);
}

/* Shared glow for all glass panels — comment out --panel-glow above to remove */
.auth-forms,
#point-info-panel,
.intro-sheet,
#dash-sheet,
.layover-frame {
  box-shadow: var(--panel-glow), var(--map-element-shadow) !important;
}

html {
  background: transparent;
  font-size: calc(16px * var(--font-scale));
}

.prose {
  color: var(--darkergrey);
  font-weight: 300;
  text-align: left;
  margin: 20px;}
.prose :is(h1,h2,h3,h4,h5,h6) {
  color: var(--darkcolor);
  text-align: center;
  font-weight: 700;}

body {
    font-family: Montserrat, Jost, Arial, sans-serif;
    font-size: 1rem;
    background-color: #fff;
    color: var(--darkergrey);
    text-align: center;
    font-weight: 300;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    height: 100vh;}

a {text-decoration: none;}
b, strong {font-weight: 400;}
h1 {color: var(--darkcolor); font-weight: 600; font-size: 2rem;}
h2 {color: var(--darkcolor); font-weight: 500; font-size: 1.5rem;}
h3 {color: var(--darkcolor); font-weight: 400; font-size: 1.25rem;}
h4 {font-size: 1.1rem;}
h5 {font-size: 1rem;}
h6 {font-size: 0.9rem;}

/* ── UTILITY CLASSES ─────────────────────────────────────────────────────── */

/* Display utilities */
.hidden { display: none !important; }
.visible { display: block !important; }
.inline-block { display: inline-block !important; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-center { display: flex; align-items: center; }
.flex-gap-6 { gap: 6px; }
.flex-gap-10 { gap: 10px; }
.flex-gap-12 { gap: 12px; }
.flex-1 { flex: 1; }

/* Grid utilities */
.grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; }
.grid-2col-16 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; margin-top: 10px; }

/* Additional flex utilities */
.flex-gap-4 { gap: 4px; }

/* Sizing utilities */
.w-100 { width: 100%; }

/* Spacing utilities */
.mt-8 { margin-top: 8px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-10 { margin-bottom: 10px; }
.p-10 { padding: 10px; }
.ml-auto { margin-left: auto; }

/* Text color utilities */
.text-success { color: #388e3c; }
.text-error { color: var(--red); }

/* Background utilities */
.bg-transparent { background: transparent !important; }

/* Image utilities */
.img-pixelated {
  width: 100%;
  image-rendering: pixelated;
  border-radius: 6px;
  background: transparent;
  display: block;
  transition: opacity 0.15s ease;
}

/* Treecycle icon utilities */
.phase-icon {
  flex-shrink: 0;
  vertical-align: middle;
  margin-right: 3px;
  display: inline-block;
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.phase-color-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  vertical-align: middle;
  margin-right: 3px;
}

.cycle-svg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.legend-name {
  font-size: var(--legend-text-size, 10px);
}

/* SVG visualization styling */
.svg-result-viz {
  width: 100%;
  border-radius: 6px;
  background: transparent;
  display: block;
  margin-top: 10px;
  border: 1px solid var(--lightcolor);
}
/* A plan's own diagram (LayerUI.geoSvgDiagram, shared by restore/parking/
   plantation/playground/energy) takes its frame color from that SAME
   plan's own --plan-color (set inline per card, html/layers.html) instead
   of the plain neutral default above — centralized here once, rather
   than each plan hand-rolling its own border color, so any plan using
   this shared diagram gets a plan-colored frame for free. */
.mb-group-plan .svg-result-viz {
  border-color: var(--plan-color, var(--lightcolor));
}

/* Point overlay panel sizing and positioning */


/* Paywall button states */
.paywall-btn.disabled-btn {
  background: var(--darkgrey);
}

/* Cursor utilities */
.cursor-pointer { cursor: pointer; }

.car-legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}


.mb-group {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 4px 24px rgba(0,0,0,0.18);
  background: var(--glass-panel-bg, #fff);
  margin-top: 0.35rem;
  transition: box-shadow 0.18s;
}
.mb-group[open] {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12), 0 4px 24px rgba(0,0,0,0.22);
}
.mb-group + .mb-group { margin-top: 2px; }
.mb-group-sub { margin: 2px 6px 6px 6px; }

.mb-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 10px 14px;
  cursor: pointer;
  list-style: none;
  border-radius: 8px 8px 0 0;
  background: transparent;
  user-select: none;
  font-size: 1.1em;
  font-weight: 600;
  box-shadow: none;
  position: relative;
  transition: background 0.15s;
}
.mb-group-header::-webkit-details-marker { display: none; }
.mb-group-header:hover {
  background: rgba(var(--theme-fg), 0.09);
}
/* Plan-family tint, card chrome — a thin, flat rgba(--highlight) wash
   LAYERED ON TOP of .mb-group's own var(--glass-panel-bg) (second
   background-image below it in the same `background` shorthand, normal
   blend), not background-blend-mode:hue as an earlier version did.
   --glass-panel-bg is a near-white, near-zero-saturation wash — the hue
   blend function takes the BACKDROP's own saturation (SetSat(Cs,
   Sat(Cb)) per spec), so blending a hue onto an ~S:0 backdrop is a
   no-op on color; what was actually visible was the OPAQUE (alpha:1)
   gradient layer overriding the backdrop's real ~8% alpha outright,
   making Plan cards solid instead of glass — exactly the "different
   blurriness/opacity" this was fixed to avoid. A plain low-alpha wash
   adds only a few % to the total alpha (still layered over the SAME
   unmodified backdrop-filter blur, never touched here) while actually
   reading as a yellow tint, since normal blend doesn't discard it like
   hue did. Icons are untouched — this only ever touches fill, and Dock
   view's own equivalent (no separate card there) lives on
   #dash-sheet.dock-plan-active instead, below. */
.mb-group-plan {
  /* Each plan sets its own --plan-color inline (html/layers.html, the same
     --rainbow-N its toolbar button gets in toolbar.js's setPlans); yellow is
     only the fallback. color-mix(... transparent) gives that colour at a
     fixed low alpha, so the card's own glass background is unchanged. */
  --plan-color: var(--highlight);
  background:
    linear-gradient(color-mix(in srgb, var(--plan-color) calc(12% * var(--BACKGROUND_COLOR_FILTER)), transparent), color-mix(in srgb, var(--plan-color) calc(12% * var(--BACKGROUND_COLOR_FILTER)), transparent)),
    var(--glass-panel-bg);
}
.mb-group-plan > .mb-group-header {
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--plan-color) calc(55% * var(--BACKGROUND_COLOR_FILTER)), transparent);
}
.mb-group-info-btn {
  margin-left: auto;
  flex-shrink: 0;
  position: relative;
  font-size: 0.8125rem !important;
  touch-action: none;
}

.opacity-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 1.45rem;
  height: 1.45rem;
  pointer-events: none;
  overflow: visible;
  opacity: 0;
  transition: opacity 0.18s;
}
.mb-group-info-btn:hover .opacity-ring { opacity: 1; }
.mb-group-info-btn.opacity-dragging .opacity-ring { opacity: 1; transition: none; }


.mb-group-arrow {
  color: rgba(var(--theme-fg), 0.4);
  transition: color 0.12s, background 0.12s, transform 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  /* Was a hardcoded 22px — didn't track --font-scale like every other
     arrow icon does. Same var the inner ::before already used. */
  width: var(--icon-arrow-size-sm);
  height: var(--icon-arrow-size-sm);
  margin-right: 4px;
  border-radius: 4px;
  cursor: pointer;
}

.mb-group-arrow::before {
  content: '';
  display: block;
  width: var(--icon-arrow-size-sm);
  height: var(--icon-arrow-size-sm);
  background-color: currentColor;
  -webkit-mask-image: url('/static/icons/menu/ArrowRight.svg?v=1792024277');
  mask-image: url('/static/icons/menu/ArrowRight.svg?v=1792024277');
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
.mb-group-header:hover .mb-group-arrow {
  color: rgba(var(--theme-fg), 0.65);
}
.mb-group-arrow:hover {
  color: rgba(var(--theme-fg), 0.9) !important;
}
.mb-group-arrow:active {
  color: rgba(var(--theme-fg), 1) !important;
}
.mb-group[open] > .mb-group-header .mb-group-arrow {
  transform: rotate(90deg);
}

/* Plant-species panel section disclosure  */
.ps-sec-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
}
.ps-sec-summary::-webkit-details-marker { display: none; }
.ps-arrow {
  display: inline-block;
  width: var(--icon-arrow-size);
  height: var(--icon-arrow-size);
  flex-shrink: 0;
  opacity: 0.5;
  transition: transform 0.15s ease;
}
.ps-arrow::before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background-color: currentColor;
  -webkit-mask-image: url('/static/icons/menu/ArrowRight.svg?v=1792024277');
  mask-image: url('/static/icons/menu/ArrowRight.svg?v=1792024277');
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
.ps-sec[open] > .ps-sec-summary .ps-arrow {
  transform: rotate(90deg);
}

.mb-group-label {
  font-size: 0.75rem;
  color: rgba(var(--theme-fg), 0.85);
  font-weight: 500;
  flex: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,0.12);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mb-group-header svg:not(.opacity-ring) {
  /* rem, not em — this selector (.mb-group-header svg) is MORE specific
     than .layer-icon-btn svg's own rem-based rule above, so it's the one
     that actually wins in Card view (wherever the icon sits in its
     normal .mb-group-header position) regardless of how many times that
     other rule gets "fixed" to track --font-scale — confirmed the actual
     reason this kept coming back. em compounds through every ancestor's
     own font-size (.mb-group-header's own font-size:1.1em included) —
     correct in theory if every ancestor between here and html stays
     scale-relative, but one fixed-px font-size anywhere in that chain
     (Card view's own layout, not Dock's — Dock moves this same icon into
     .tab-label-row, a different ancestor chain the fixed one never sat
     in, which is exactly why only Dock view looked right) silently
     breaks it. rem skips that whole chain and reads --font-scale off
     html directly, same proven mechanism as .layer-icon-btn svg.
     1.43rem/1.0725rem preserve today's default-scale size exactly
     (1.3em/0.975em × .mb-group-header's own 1.1em, at the 16px root). */
  width: 1.43rem;
  height: 1.43rem;
  display: inline-block;
  vertical-align: middle;
  fill: currentColor !important;
  stroke: currentColor !important;
  color: inherit;
  margin-right: 6px;
  opacity: 0.92;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.10));
}
.tree-sections-grid .mb-group-header svg:not(.opacity-ring) {
  width: 1.0725rem;
  height: 1.0725rem;
  opacity: 0.55;
}

/* ── Layer icon toggle button ─────────────────────────────────────────────── */
.layer-icon-btn {
  background: none;
  border: none;
  padding: 2px;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  color: inherit;
  position: relative;
  flex-shrink: 0;
  opacity: 0.6;
  transition: color 0.18s, opacity 0.18s;
}
.layer-icon-btn svg {
  margin-right: 0 !important;
  transition: filter 0.18s, fill 0.18s;
  fill: currentColor;
  /* Each icon file ships its own fixed width/height="24px" attribute
     (static/icons/.../*.svg) — with no override here, the "Toggle X on
     map" icon stayed exactly 24px regardless of --font-scale, unlike
     every other sized element in a card, which already scales with it.
     rem, not calc(px * var(--font-scale)) — the previous px-based calc
     version didn't visibly react to the A+/A- buttons despite reading
     the same variable; .sheet-nav-badge-icon svg (Dock view's own
     equivalent icon, confirmed working) sizes itself in rem instead,
     which inherits through html's own font-size: calc(16px *
     var(--font-scale)) (styles.css's root rule) rather than resolving
     --font-scale a second time independently — same real effect, but
     this is the actually-proven mechanism, not a parallel one. 1.65rem
     = 26.4px (10% larger than the original 24px) at the default scale. */
  width: 1.65rem;
  height: 1.65rem;
}
.layer-icon-btn:hover { opacity: 0.8; }

/* Has data but hidden — full brightness */
.layer-icon-btn.icon-ready        { opacity: 1; }
.layer-icon-btn.icon-ready:hover  { opacity: 0.82; }

/* Viewing — full opacity, then theme-specific color */
.layer-icon-btn.icon-active       { opacity: 1; }
.layer-icon-btn.icon-active:hover { opacity: 0.78; }

/* Dark theme: white icon → yellow + glow. Deliberately NOT
   var(--zone-accent, ...) here any more — that variable is one single
   GLOBAL value (whichever plan was opened/default-set most recently,
   segment-mode.js's _applyZoneAccent), so every sensing/3D layer's icon
   was picking up THAT plan's color too, confirmed live: opening REDD+
   turned Tidal's own icon green right along with it. A sensing layer
   has no .mb-group-plan ancestor at all, so it was never meant to read
   this zone-wide variable in the first place — it always gets the
   universal yellow now, regardless of which plan (if any) is open. */
body.tile-dark .layer-icon-btn.icon-active {
  color: var(--status-warn);
}
body.tile-dark .layer-icon-btn.icon-active svg {
  filter: drop-shadow(0 0 6px rgba(var(--status-warn-rgb),0.9)) drop-shadow(0 1px 2px rgba(var(--blackRGB),0.2));
}

body:not(.tile-dark) .layer-icon-btn.icon-active {
  color: var(--highlight);
}
body:not(.tile-dark) .layer-icon-btn.icon-active svg {
  filter: drop-shadow(0 0 5px rgba(var(--highlight-rgb),0.6)) drop-shadow(0 1px 2px rgba(var(--blackRGB),0.15));
}
/* A PLAN's own card (.mb-group-plan, not a sensing layer) does get its
   own fixed color here — not the shared --zone-accent, but --plan-color,
   which is already set correctly PER-CARD, inline, by whichever plan
   this specific card belongs to (.mb-group-plan's own comment above) —
   REDD+'s card always shows REDD+'s own color this way, never "whichever
   plan happened to open last," and it can never leak onto a sensing
   layer's icon since --plan-color is simply undefined outside a plan
   card's own subtree. Higher specificity than the two rules above (one
   extra ancestor class) so it correctly wins for plan cards only. */
.mb-group-plan.tile-dark .layer-icon-btn.icon-active,
body.tile-dark .mb-group-plan .layer-icon-btn.icon-active {
  color: var(--plan-color, var(--status-warn));
}
body.tile-dark .mb-group-plan .layer-icon-btn.icon-active svg {
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--plan-color, rgb(var(--status-warn-rgb))) 90%, transparent)) drop-shadow(0 1px 2px rgba(var(--blackRGB),0.2));
}
body:not(.tile-dark) .mb-group-plan .layer-icon-btn.icon-active {
  color: var(--plan-color, var(--highlight));
}
body:not(.tile-dark) .mb-group-plan .layer-icon-btn.icon-active svg {
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--plan-color, var(--highlight)) 60%, transparent)) drop-shadow(0 1px 2px rgba(var(--blackRGB),0.15));
}


/* Body-level drag state: global cursor + no text selection */
body.opacity-drag-active,
body.opacity-drag-active * { cursor: crosshair !important; user-select: none !important; }

/* Loading pulse */
.layer-icon-btn.icon-loading {
  opacity: 0.5;
  animation: icon-pulse 0.9s ease-in-out infinite;
}
@keyframes icon-pulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

/* ── LULC legend (below chart) — transparent, no glow, normal-case bold titles ── */
.lulc-legend {
  margin-top: 10px;
}
.lulc-legend .mb-group {
  box-shadow: none !important;
  background: transparent;
}
.lulc-legend .mb-group[open] {
  box-shadow: none !important;
}
.lulc-legend .mb-group-header {
  padding: 5px 4px;
  background: transparent;
  font-size: 1em;
}
.lulc-legend .mb-group-header:hover {
  background: rgba(var(--theme-fg), 0.05);
}
.lulc-legend .mb-group-label {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  font-size: 0.6875rem;
  color: rgba(var(--theme-fg), 0.55);
}
.lulc-legend .mb-group-items {
  padding: 4px 8px 8px 16px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  row-gap: 2px;
  column-gap: 14px;
}
.lulc-legend .mb-class-row {
  gap: 6px;
  padding: 2px 0;
}


.mb-group-items {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 16px 16px 16px;
  background: transparent;
  border-radius: 0 0 8px 8px;
}

.mb-class-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.mb-class-row .result-meta { margin-bottom: 0; }

/* Container utilities */
/* .data-container's base rule is display:inline-block (shrink-to-fit) — fine
   for the narrow, single-column 560px card it was designed for, but it starves
   any WIDE card (every plan box that opts in via -max) of real width: an
   inline-block parent doesn't hand a multi-column child (.plan-sections) the
   panel's actual available width to flow into, it shrink-wraps to a modest
   "preferred" width instead — confirmed live: .plan-sections stayed ~460px
   wide (and so never grew past one column) even inside a 1450px-wide panel,
   until this was block+100% instead of inline-block. */
/* Combined-class selector, not just .data-container-max alone: both classes
   are always used together (class="data-container data-container-max"), and
   .data-container's OWN max-width:560px (defined later in this file) was
   silently winning on same-specificity/source-order whenever it did — this
   guarantees the -max override actually wins regardless of where either
   rule sits in the file. */
.data-container.data-container-max,
.data-container-max { display: block; width: 100%; max-width: 100%; }
/* A plan's components (params / input / map / results / verdict) are ~300px columns: a
   narrow panel shows one, a wide one (e.g. bottom-docked on desktop) shows several side
   by side. Each section stays whole (.layer-section's break-inside: avoid). */
.plan-sections { column-width: 300px; column-gap: 14px; }
/* data-view="tab" is Dock view's own internal identifier (renamed in the UI,
   never in this attribute — see layers.html's _applyBoxView). Side-docked Dock
   is narrow, so columns are pointless there and this turns them off — but
   bottom-docked Dock is exactly the wide case the columns above exist for, so
   .dock-bottom (set by slideup.js's dockSide message) overrides back to
   columns. This used to disable columns in Dock view outright, on the wrong
   assumption that "tab" meant some other, already-columned mode. */
body[data-view="tab"] .plan-sections { column-width: auto; column-count: auto; }
body[data-view="tab"].dock-bottom .plan-sections { column-width: 300px; column-count: auto; }
.img-container {
  position: relative;
  width: 100%;
}

.img-container img {
  width: 100%;
  image-rendering: pixelated;
  border-radius: 6px;
  background: transparent;
  display: block;
}

.img-container-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  border-radius: 6px;
}

/* Chart container */
.chart-container {
  width: 100%;
  height: 380px;
}

.header {
    background-color: var(--darkcolor);
    color: var(--whiteRGB);
    padding: 15px;
    font-size: 1.5rem;
    font-weight: 600;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;
    display: flex;
    z-index: 1000;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--map-element-shadow);}
.search-container {
    display: flex;
    align-items: center;
    position: relative;
    min-width: 280px;
    margin-left: auto;
    margin-right: 8px;
    max-width: 500px;}

@keyframes search-glow-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--status-warn-rgb), 0.5); }
  50%      { box-shadow: 0 0 12px 4px rgba(var(--status-warn-rgb), 0.85); }
}
.search-container.search-glow {
  border-radius: 10px;
  animation: search-glow-pulse 1s ease-in-out infinite;
}

/* A just-requested parcel's own shape on the map — reuses search-glow-pulse's
   same color/rhythm (--status-warn, 1s ease-in-out), but as a drop-shadow
   instead of box-shadow: an SVG <path> (every Leaflet polygon is one) isn't
   a box, and box-shadow doesn't reliably glow around its actual drawn shape
   the way a filter does. _flashMapLayer (mapleaflet-cadastre.js) adds/removes
   this on whichever layer(s) a request just targeted — the current selection
   and/or an active whole-block candidate. */
@keyframes map-shape-request-pulse {
  0%, 100% { filter: drop-shadow(0 0 0px rgba(var(--status-warn-rgb), 0.6)); }
  50%      { filter: drop-shadow(0 0 10px rgba(var(--status-warn-rgb), 0.95)); }
}
.map-shape-flash-requested {
  animation: map-shape-request-pulse 1s ease-in-out infinite;
}

#map-search-source {
  position: fixed;
  left: -9999px;
  top: -9999px;
  pointer-events: none;
}
.search-bar {
    flex: 1;
    font-size: 0.9375rem;
    font-weight: 300;
    background-color: rgb(var(--whiteRGB));
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 8px;
    min-width: 200px;
    text-align: left;
    pointer-events: auto;
    cursor: text;}
  .search-bar::placeholder {
    font-weight: 200;
  }
  .search-bar::-webkit-input-placeholder {
    font-weight: 200;
  }
.search-bar:focus {
  border: 1px solid var(--highlight);
  outline: none;
  transition: border-color 0.2s ease-in-out;}
.search-dropdown {
  /* position:fixed, left/top/width set in JS (map-search.js's
     _positionSearchDropdown) — see that function's own comment on why:
     escapes .leaflet-container's overflow:hidden on the map page, where
     the search box is a real Leaflet control nested inside it. */
  position: fixed;
  background: var(--glass-panel-bg);
  backdrop-filter: blur(48px) saturate(1.8);
  -webkit-backdrop-filter: blur(48px) saturate(1.8);
  border: 1px solid var(--control-glass-border);
  border-radius: 10px; max-height: 300px; overflow-y: auto;
  z-index: 10000; display: none;
  box-shadow: var(--map-element-shadow); }
.search-dropdown.active { display: block; }
.search-result {
  padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--control-glass-separator);
  font-size: 0.75rem; font-weight: 300; color: var(--control-glass-text);
  display: block; text-align: left; }
.search-result:last-child { border-bottom: none; }
.search-result:hover { background: rgba(var(--blackRGB), 0.08); }

.search-result-inert { cursor: default; opacity: 0.6; font-style: italic; }
.search-result-inert:hover { background: none; }
.search-result-loading { display: flex; align-items: center; gap: 8px; }
.search-spinner-dot {
  width: 11px; height: 11px; flex-shrink: 0;
  border: 2px solid rgba(var(--theme-fg), 0.22);
  border-top-color: var(--midcolor, currentColor);
  border-radius: 50%;
  animation: search-spinner-spin 0.7s linear infinite;
}
@keyframes search-spinner-spin { to { transform: rotate(360deg); } }
.search-result-level { font-size: 0.625rem; color: var(--control-glass-text); font-weight: 300;
  display: inline-block; padding: 2px 6px; background: rgba(var(--blackRGB), 0.05);
  border-radius: 3px; margin-right: 8px; opacity: 0.55; }
.search-result-path { color: var(--control-glass-text); font-size: 0.6875rem; font-weight: 300; display: inline; }
.search-result-match { font-size: 0.625rem; color: var(--control-glass-text); opacity: 0.7;
  display: inline-block; margin-left: 8px; font-style: italic; }
::selection {
  color: rgba(var(--blackRGB));
  background-color: var(--highlight);
}
a {color: var(--darkgrey);}
a:hover { color: var(--darkcolor);}

.scrollable-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;}
.scrollable-content:has(#map) { touch-action: none; }

main {height: 100%;}

/* ── Single mode: map-first UI ───────────────────────────────────────────── */
body.no-toolbar {
  --topbar-h: 0px;
}
.mini-launcher {
  position: fixed;
  right: 12px;
  top: 12px;
  z-index: 10060;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  touch-action: none;
}

.mini-launcher.open {
  z-index: 10060 !important;
}

.mini-launcher.in-map-controls {
  position: relative;
  right: auto;
  top: auto;
  z-index: auto;
  align-items: flex-start;
}

.mini-launcher.in-map-controls.open {
  z-index: 10060 !important;
}

.mini-launcher-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: auto;
  right: 0;
  width: fit-content;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-radius: var(--glass-panel-radius);
  border: var(--glass-panel-border);
  background: var(--glass-panel-bg);
  backdrop-filter: blur(var(--glass-panel-blur));
  -webkit-backdrop-filter: blur(var(--glass-panel-blur));
  box-shadow: var(--map-element-shadow);
  touch-action: none;
}
/* Shared open animation for every "rolls open from its trigger" panel —
   the data-source dropdown list (dropdown-shared.js), the mini-launcher
   toolbar panel (toolbar.js), and the breadcrumb's own enlarge popover
   (segment-mode.js) all just toggle these same two classes; one rule
   here changes the animation everywhere at once. Slide only now — no
   opacity fade and no scaleY squash, both removed (together they read
   as the panel both fading in AND being squeezed vertically, which is
   what looked off, not a clean slide). */
/* Plain fade, no movement — every earlier version of this rule (slide,
   clip-path reveal, the bottom-anchored "dragging a carpet" grow) is
   gone; opacity only, same duration in and out. Closing is this same
   transition running in reverse (removing .roll-menu-open just drops
   opacity back to 0) — whichever JS opened this is responsible for
   delaying its own display:none/reparent by the same duration this
   transition actually takes (search each file for _rollMenuMs), or the
   element gets yanked out of the layout before the fade-out has time to
   play and the close just snaps instead of fading. */
.roll-menu {
  transition: opacity var(--roll-menu-duration) ease-out;
  opacity: 0;
  pointer-events: none;
}
.roll-menu.roll-menu-open {
  opacity: 1;
  pointer-events: auto;
}
/* config.py's TOOLBAR_ANIMATIONS */
body.toolbar-no-anim .roll-menu {
  transition: none !important;
}

.mini-launcher-groups-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.5rem;
  /* overflow stays visible at rest — see the .body-collapsed rule right
     below for why it's only ever set to hidden there. A permanent
     overflow:hidden here (the previous approach, plus a padding/negative-
     margin trick to buy the ring some room) still clipped a
     .plan-linked ring's box-shadow (1.5px) at the edge between adjacent
     reflow-cols (toolbar.js's reflowMiniLauncher) — this avoids the
     clipping ancestor entirely instead of trying to out-pad it. */
  overflow: visible;
  max-height: 2000px;
  max-width: 2000px;
  opacity: 1;
  transition: max-height 0.18s ease, max-width 0.18s ease, opacity 0.15s ease, margin 0.18s ease;
}
.mini-launcher-panel.body-collapsed .mini-launcher-groups-row {
  /* Only clipped while actually collapsing/collapsed — max-height:0
     needs this to visually hide content, but the open/expanded state
     (the rule above) never needs it since max-height:2000px never
     actually constrains real content anyway. */
  overflow: hidden;
  max-height: 0;
  max-width: 0;
  opacity: 0;
  pointer-events: none;
}
body.toolbar-no-anim .mini-launcher-groups-row {
  transition: none !important;
}
/* Panel titles ("Atlas" / "Land Studio") — same typography the old single
   Map/Atlas/Studio/Planner state label had. */
.toolbar-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(var(--theme-fg), 0.9);
  opacity: 0.55;
  pointer-events: none;
}
/* The Land Studio toolbar exists only while it has something visible in
   it (i.e. Studio); an "absent" toolbar is hidden but keeps its layout so
   toolbar.js can still measure its blocks to notice when they come back
   (display:none would zero every measurement, so it could never know). */
.mini-launcher-panel.tb-absent {
  visibility: hidden !important;
  pointer-events: none !important;
}
.mini-launcher-panel > .panel-bar { cursor: pointer; }
.mini-launcher-panel:not(.body-collapsed) > .panel-bar > .mb-group-arrow {
  transform: rotate(90deg);
}
.mini-launcher-reflow-col {
  display: flex;
  flex-direction: column;
}
.mini-launcher-reflow-col > .mini-launcher-block:not(:first-child) {
  margin-top: 0.25rem;
  padding-top: 0.375rem;
  border-top: 1px solid rgba(var(--theme-fg), 0.12);
}
.mini-launcher-reflow-col:not(:first-child) {
  padding-left: 0.375rem;
  border-left: 1px solid rgba(var(--theme-fg), 0.12);
}
.mini-launcher-block[data-block="view"],
.mini-launcher-block[data-block="assets"],
.mini-launcher-block[data-block="data"] {
  display: flex;
  flex-direction: column;
}
.mini-launcher-data-column {
  gap: 0.3125rem;
}

.mini-launcher-plan-column {
  display: none;
  flex-direction: column;
  gap: 0.3125rem;
}
.mini-launcher-view-group,
.mini-launcher-tools-group,
.mini-launcher-file-group,
.mini-launcher-data-group,
.mini-launcher-assets-group,
.mini-launcher-plan-group {
  display: grid;
  grid-template-columns: 1.615rem 1.615rem;
  gap: 0.3125rem;
}


.mini-launcher-group-title {
  font-size: 0.5rem;
  font-weight: 300;
  color: rgba(var(--theme-fg), 0.45);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  line-height: 1.3;
  text-align: left;
  width: 3.5425rem;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
}

.mini-launcher-group-title { align-self: start; }
.mini-launcher-group-title--grid { grid-column: 1 / -1; width: auto; }
#mini-launcher-assets-title,
#mini-launcher-data-title {
  display: none;
}
#mini-launcher-data-title.mini-launcher-group-title-visible {
  display: flex;
}
#mini-launcher-assets-title.mini-launcher-group-title-visible {
  display: flex;
}

.mini-launcher-panel > .panel-bar {
  border-radius: var(--glass-panel-radius) var(--glass-panel-radius) 0 0;
  justify-content: space-between;
  padding: 2px 2px 2px 4px;
  min-height: 13px;
}

.mini-launcher.in-map-controls .mini-launcher-panel {
  left: 0;
  right: auto;
}

.mini-launcher-tools-group,
.mini-launcher-file-group,
.mini-launcher-data-group,
.mini-launcher-assets-group,
.mini-launcher-plan-group {
  display: none;
}
.mini-launcher-plan-group.has-plans {
  display: grid;
}

/* ── VISIBILITY_STATES: Map/Atlas/Studio/Planner ──*/

.btn-toggle[data-visibility="Studio"],
.btn-toggle[data-visibility="Planner"],
.btn-toggle[data-visibility="Atlas"] {
  display: none;
}
.mini-launcher-tools-group[data-visibility="Map"],
.mini-launcher-file-group[data-visibility="Map"] {
  display: grid;
}
.btn-toggle[data-visibility="Map"] {
  display: flex;
}
body.atlas-active .mini-launcher-tools-group[data-visibility="Atlas"],
body.atlas-active .mini-launcher-file-group[data-visibility="Atlas"] {
  display: grid;
}
body.atlas-active .btn-toggle[data-visibility="Atlas"] {
  display: flex;
}
body.segment-edit-active .mini-launcher-tools-group[data-visibility="Studio"] {
  display: grid;
}
body.new-cadastre-draw-active .mini-launcher-tools-group[data-visibility="Studio"] {
  display: grid;
}
body.segment-edit-active.zone-edit-active .mini-launcher-plan-column[data-visibility="Planner"] {
  display: flex;
}
body.segment-edit-active .btn-toggle[data-visibility="Studio"] {
  display: flex;
}
body.segment-edit-active.zone-edit-active .btn-toggle[data-visibility="Planner"] {
  display: flex;
}
body.atlas-active .mini-launcher-data-group[data-visibility="Atlas"].has-layers {
  display: grid;
}
body.segment-edit-active .mini-launcher-data-group[data-visibility="Studio"].has-layers {
  display: grid;
}
/* Admin-only: sensing stays available in Atlas too, not just Studio —
   json/buttons.json's own data group visibility is "Studio" for every
   user; this is an additional grant on top of that, not a change to it. */
body.is-admin.admin-sees-data.atlas-active .mini-launcher-data-group[data-visibility="Studio"].has-layers {
  display: grid;
}
.mini-launcher-block[data-block="data"][data-visibility] {
  display: none;
}
.mini-launcher-block[data-block="data"][data-visibility="Map"] {
  display: flex;
}
body.atlas-active .mini-launcher-block[data-block="data"][data-visibility="Atlas"] {
  display: flex;
}
body.segment-edit-active .mini-launcher-block[data-block="data"][data-visibility="Studio"] {
  display: flex;
}
/* Admin-only: data block itself stays shown in Atlas too — same grant as
   the .mini-launcher-data-group rule above, just for the outer wrapper. */
body.is-admin.admin-sees-data.atlas-active .mini-launcher-block[data-block="data"][data-visibility="Studio"] {
  display: flex;
}

body.parcel-border-edit-active .mini-launcher-block[data-block="data"] {
  display: none !important;
}

body.segment-edit-active .map-search-control {
  flex-direction: column-reverse;
  align-items: flex-end;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0;
}
body.segment-edit-active .map-search-control .search-container {
  display: none;
}

.mini-launcher-assets-group.has-assets {
  display: grid;
}

.mini-launcher-data-group .data-layer-icon,
.mini-launcher-assets-group .asset-toolbar-icon,
.mini-launcher-plan-group .plan-toolbar-icon {
  width: 1.0925rem;
  height: 1.0925rem;
  display: inline-flex;
}
/* Plan-family tint on each button's own fill too, not just the block
   region above — a thin flat rgba wash layered over the button's own
   var(--glass-button-bg) (same reasoning as .mb-group-plan's own
   comment: hue-blend against a near-achromatic backdrop is a no-op on
   color, and an opaque top layer silently overrides the button's real
   alpha/opacity). Icon color is untouched (no rule here targets
   .plan-toolbar-icon's color); a currently-open plan's own
   --plan-ring-color (inline per-button) still wins on the icon once
   aria-pressed="true" (the rule further down) — this only ever touches
   the fill. */
.mini-launcher-plan-group .btn-toggle:not([aria-pressed="true"]) {
  background:
    linear-gradient(color-mix(in srgb, var(--plan-ring-color, var(--highlight)) calc(12% * var(--BACKGROUND_COLOR_FILTER)), transparent), color-mix(in srgb, var(--plan-ring-color, var(--highlight)) calc(12% * var(--BACKGROUND_COLOR_FILTER)), transparent)),
    var(--glass-button-bg);
}
/* Hover highlight — every OTHER button group gets this for free from
   the shared .btn-toggle:hover rule (var(--glass-button-hover-bg)), but
   that rule loses here: this group's own two-class tint rule right
   above sits at higher specificity and always wins regardless of
   :hover, so a plan button's background silently never changed on
   hover at all — confirmed live. Same 12%->24% doubling the
   light/dark --glass-button-bg->--glass-button-hover-bg tokens
   themselves use, kept on the plan's own ring color rather than
   swapping to the generic hover token, so the highlight still reads as
   "this plan," just brighter — not a different, unrelated color. */
.mini-launcher-plan-group .btn-toggle:hover:not([aria-pressed="true"]) {
  background:
    linear-gradient(color-mix(in srgb, var(--plan-ring-color, var(--highlight)) calc(24% * var(--BACKGROUND_COLOR_FILTER)), transparent), color-mix(in srgb, var(--plan-ring-color, var(--highlight)) calc(24% * var(--BACKGROUND_COLOR_FILTER)), transparent)),
    var(--glass-button-bg);
}
.mini-launcher-data-group .data-layer-icon svg,
.mini-launcher-assets-group .asset-toolbar-icon svg,
.mini-launcher-plan-group .plan-toolbar-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}
.mini-launcher-data-group .data-layer-icon svg path,
.mini-launcher-assets-group .asset-toolbar-icon svg path,
.mini-launcher-plan-group .plan-toolbar-icon svg path {
  fill: currentColor;
}
.mini-launcher-assets-group .asset-toolbar-icon svg.lucide,
.mini-launcher-assets-group .asset-toolbar-icon svg.lucide path {
  fill: none;
  stroke: currentColor;
}
/* Blue Carbon (planning/Carbon_Blue.svg) is a lucide-style outline icon
   (root <svg class="lucide ...">, every path meant to stay fill:none and
   draw via stroke="currentColor" only) — same shape of icon the assets
   group already carves out above, but this group's own unconditional
   "svg path { fill: currentColor }" rule (right above) had no matching
   exemption, so every one of its paths got force-filled solid, right
   down into the mangrove leaves' own interior (confirmed live: looked
   fine on the card, which never applies this rule at all, only wrong
   here in the toolbar). !important on both: a plain .cc-stroke-style
   specificity win was already enough on paper, but there's no reason to
   leave a plan icon's own correctness riding on a cascade tie it doesn't
   need to — same belt-and-suspenders precedent #eyeno-toggle-icon
   (Eye.svg override, this file's own .showing rule) already uses. */
.mini-launcher-plan-group .plan-toolbar-icon svg.lucide,
.mini-launcher-plan-group .plan-toolbar-icon svg.lucide path {
  fill: none !important;
  stroke: currentColor !important;
}
.mini-launcher-plan-group .plan-toolbar-icon svg path.cc-stroke {
  fill: none !important;
}
.mini-launcher-assets-group .asset-toolbar-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(var(--theme-fg), 0.35);
}
.mini-launcher-data-group .data-layer-spacer {
  width: 1.615rem;
  height: 1.615rem;
  display: block;
}
.mini-launcher-data-group .btn-toggle[aria-pressed="true"] .data-layer-icon,
.mini-launcher-assets-group .btn-toggle[aria-pressed="true"] .asset-toolbar-icon,
.mini-launcher-assets-group .btn-toggle[aria-pressed="true"] .asset-toolbar-dot {
  filter: drop-shadow(0 0 6px rgba(var(--status-warn-rgb),0.9)) drop-shadow(0 1px 2px rgba(var(--blackRGB),0.2));
}
.mini-launcher-data-group .btn-toggle.icon-loading .data-layer-icon,
.mini-launcher-assets-group .btn-toggle.icon-loading .asset-toolbar-icon,
.mini-launcher-assets-group .btn-toggle.icon-loading .asset-toolbar-dot {
  animation: data-layer-blink 0.9s ease-in-out infinite;
}
@keyframes data-layer-blink { 50% { opacity: 0.25; } }

.mini-launcher-panel .btn-toggle svg,
.mini-launcher-tools-group .btn-toggle svg,
.view-settings-buttons-grid .btn-toggle svg {
  width: 1.0925rem;
  height: 1.0925rem;
}
/* Solid (Material-style) icons take the button colour as their fill. Outline
   icons draw with stroke="currentColor" on the root <svg> (e.g. Carbon_Blue,
   Similar, Inverse), so they are left alone — forcing a fill here solidly filled
   their leaves/shapes. Keyed on the stroke, not fill="none": some solid icons
   (Grab.svg) also declare fill="none" on the root but rely on filled paths.
   .view-settings-buttons-grid: the relocated Viewing buttons (Font +/-,
   Globe, Grid, ...) hardcode fill="#1f1f1f" same as every other icon this
   rule already covers — they just moved out of .mini-launcher-panel into
   this popup's own grid (json/viewing.json) and this selector list was
   never updated to follow, leaving them a fixed dark color on any theme. */
.mini-launcher-panel .btn-toggle svg:not([stroke="currentColor"]),
.mini-launcher-tools-group .btn-toggle svg:not([stroke="currentColor"]),
.view-settings-buttons-grid .btn-toggle svg:not([stroke="currentColor"]) {
  fill: currentColor;
}
.mini-launcher-panel .btn-toggle svg:not([stroke="currentColor"]) path,
.mini-launcher-tools-group .btn-toggle svg:not([stroke="currentColor"]) path,
.view-settings-buttons-grid .btn-toggle svg:not([stroke="currentColor"]) path {
  fill: currentColor;
}

.btn-toggle .btn-icon-on { display: none; }
.btn-toggle.has-icon-toggle[aria-pressed="true"] .btn-icon-off { display: none; }
.btn-toggle[aria-pressed="true"] .btn-icon-on { display: inline-flex; }

.mini-launcher-panel .btn-toggle[aria-pressed="true"],
.mini-launcher-panel .btn-toggle.active,
.mini-launcher-panel .btn-toggle.flash-highlight,
.view-settings-modal .btn-toggle[aria-pressed="true"] {
  background: var(--glass-button-hover-bg);
  color: var(--status-warn);
}
.mini-launcher-panel .btn-toggle[aria-pressed="true"] svg,
.mini-launcher-panel .btn-toggle.active svg,
.mini-launcher-panel .btn-toggle.flash-highlight svg,
.view-settings-modal .btn-toggle[aria-pressed="true"] svg {
  filter: drop-shadow(0 0 6px rgba(var(--status-warn-rgb),0.9)) drop-shadow(0 1px 2px rgba(var(--blackRGB),0.2));
}
/* Plan buttons: their own assigned rainbow color instead of the shared
   yellow "active" look above — --plan-ring-color is set inline per-button
   (toolbar.js's setPlans), cycling through the --rainbow-* tokens.
   Same-specificity tie with the shared rule above (both one element-class
   + one attribute selector on .mini-launcher-panel) broken by adding
   .btn-toggle explicitly, not by source order, so this stays correct
   regardless of where either rule sits in the file. */
.mini-launcher-panel .btn-toggle.plan-toolbar-btn[aria-pressed="true"] {
  color: var(--plan-ring-color, var(--status-warn));
}
.mini-launcher-panel .btn-toggle.plan-toolbar-btn[aria-pressed="true"] svg {
  filter: drop-shadow(0 0 6px var(--plan-ring-color, rgba(var(--status-warn-rgb),0.9))) drop-shadow(0 1px 2px rgba(var(--blackRGB),0.2));
}
/* Sensing/3D buttons a currently-open plan declares as its own "inputs"
   (json/buttons.json) — marked with that plan's ring color, NOT lit up
   like an active/has-data layer, since the layer's own card is deliberately
   not opened just because a plan uses it (hydrateInputCharts closes it
   again right after scraping the chart preview it needs). A ring the user
   can still click through to open the real card themselves, same as any
   other sensing button. --plan-ring-color set inline (toolbar.js's
   PlanToolbar.setLinkedDataKeys) to whichever plan(s) currently claim it. */
.mini-launcher-data-group .btn-toggle.plan-linked {
  /* calc(1.5px * var(--font-scale)) — 25% thinner than the original 2px,
     scales with font-scale like --glass-panel-border above instead of
     staying a fixed line regardless of font size. */
  box-shadow: 0 0 0 calc(1.5px * var(--font-scale)) var(--plan-ring-color, transparent);
}
/* Globe View/Map View (globe-toggle) */
#globe-toggle[aria-pressed="true"] {
  background: unset;
  color: unset;
}
#globe-toggle[aria-pressed="true"] svg {
  filter: unset;
}

#map-controls-container {
  position: relative;
  z-index: 200005 !important;
}
#map-controls-container.launcher-open {
  z-index: 200005 !important;
}
#map-controls-wrapper {
  z-index: 200005 !important;
}

.mini-launcher-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--smallcorner);
  border: 0;
  color: var(--control-glass-text);
  font-size: 0.75rem;
   color: inherit !important;
   -webkit-text-fill-color: inherit !important;
}

.mini-launcher-link:hover {
  background: var(--glass-button-hover-bg);
  color: var(--control-glass-text);
}

.mini-launcher-link.active {
  background: var(--darkcolor);
  color: #fff;
}

.map-search-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--glass-panel-bg) !important;
  backdrop-filter: blur(var(--glass-panel-blur)) !important;
  -webkit-backdrop-filter: blur(var(--glass-panel-blur)) !important;
  border: 1px solid var(--control-glass-border) !important;
  box-shadow: var(--control-glass-shadow), var(--map-element-shadow) !important;
  font-family: Montserrat, Jost, Arial, sans-serif;
}

body.no-toolbar #map .leaflet-top.leaflet-left,
body.no-toolbar #map .leaflet-top.leaflet-right {
  margin-top: var(--leaflet-top-controls-offset, 56px);
  display: flex;
  flex-direction: column;
}

body.no-toolbar #map .leaflet-top .leaflet-control-zoom {
  order: 1;
}
body.no-toolbar #map .leaflet-top .leaflet-control-layers {
  order: 2;
}

.map-search-control .mini-launcher {
  flex: 0 0 auto;
}

.map-search-control .search-container {
  margin: 0;
  min-width: min(320px, calc(100vw - 220px));
  max-width: min(420px, calc(100vw - 220px));
}
@media (max-width: 768px) {
  .map-search-control {
    box-sizing: border-box;
    width: calc(100vw - 20px);
  }
  .map-search-control .search-container {
    min-width: 0;
    max-width: none;
    flex: 1 1 auto;
  }
}

.map-search-control .search-icon {
  filter: none;
  opacity: 0.7;
}

.map-search-control .search-bar {
  background: transparent;
  border: none;
  color: var(--control-glass-text);
  min-width: 0;
  padding: 8px 0;
}

.map-search-control .search-bar::placeholder {
  color: var(--control-glass-text-muted);
}

.map-search-control .search-bar:focus {
  border: none;
  outline: none;
}

.map-search-control .search-dropdown {
  /* top is set in JS now (position:fixed, .search-dropdown's own comment
     above) — only the look stays overridden here. */
  border: 1px solid var(--control-glass-border);
  border-radius: 12px;
}

.map-search-control .search-result,
.map-search-control .search-result-path,
.map-search-control .search-result-match,
.map-search-control .search-result-level {
  color: var(--control-glass-text);
  background: transparent;
}

.map-search-control .search-result:hover {
  background: rgba(var(--blackRGB), 0.08);
}

body.tile-dark .map-search-control .search-result:hover {
  background: rgba(var(--whiteRGB), 0.08);
}

.map-profile-btn,
.mini-launcher-toggle-btn {
  width: 2.375rem;
  height: 2.375rem;
  flex: 0 0 2.375rem;
  border-radius: 999px;
  border: 1px solid var(--control-glass-border);
  background: transparent;
  color: var(--control-glass-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  line-height: 1;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.map-profile-btn svg,
.mini-launcher-toggle-btn svg {
  width: 91.8%;
  height: 91.8%;
  fill: currentColor;
}
.map-profile-btn svg path,
.mini-launcher-toggle-btn svg path {
  fill: currentColor;
}

.map-profile-btn:hover,
.mini-launcher-toggle-btn:hover {
  background: var(--control-glass-hover);
  border-color: var(--control-glass-border);
}
.map-profile-btn:active,
.mini-launcher-toggle-btn:active {
  transform: scale(0.97);
}

/* .view-settings-modal reuses .photo-modal as its shell (styles.css,
   shared with the profile-photo modal) — left-aligned title/rows instead
   of that modal's own centered one, and draggable via its own .panel-bar
   header (.view-settings-title, wired by _wireDraggablePanel below —
   same .dragged contract .share-site-modal already uses: flex-centered
   at rest, switches to position:fixed/left/top once a drag actually
   starts). */
.view-settings-modal {
  text-align: left;
}
/* The modal itself keeps .photo-modal's own var(--glass-panel-bg) (live-
   tints along with every other glass panel, as intended) — it's the
   BACKDROP behind it that was the actual problem: .photo-modal-backdrop's
   shared rgba(0,0,0,0.55) dims the whole screen solid black, hiding the
   slide-up panel/map/everything the Glass Tint controls are meant to be
   previewed against. Scoped to this one backdrop's own id (not a change
   to .photo-modal-backdrop itself, which every other modal — photo
   upload etc. — still wants dark for focus).
   No background/blur at all now, not even the lighter tint this used to
   carry — a BLURRED backdrop here meant the modal's own backdrop-filter
   (right below) had nothing but an already-blurred, uniform wash behind
   it left to blur, which is why the modal itself read as a flat tinted
   box instead of genuine frosted glass. A fully transparent backdrop
   (still a real click-catcher, see styles.css's .photo-modal-backdrop —
   only its own paint is dropped) leaves the real map/toolbar/panel
   content behind the modal, so .photo-modal's own blur has something to
   actually distort — AND satisfies "don't blur anything outside the
   panel while adjusting it" for free, since there's no separate blur
   layer left to turn off. */
#view-settings-backdrop {
  background: transparent;
}
.view-settings-modal.dragged {
  position: fixed;
  margin: 0;
}
.view-settings-title {
  margin: -22px -22px 14px;
}
.view-settings-title-label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.view-settings-title-icon {
  display: inline-flex;
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 auto;
}
.view-settings-title-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}
/* The relocated Viewing toolbar buttons PLUS the boolean/enum view.json
   settings (json/viewing.json's own "buttons" array — the latter marked
   isViewSetting:true/data-view-key, html/base.html) — all share one
   .btn-toggle look and this one 4-column grid, no separate pill styling
   for the settings any more. */
.view-settings-buttons-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
  justify-items: center;
}
/* Glass Tint Color — a native color swatch sized/shaped like every other
   button in .view-settings-buttons-grid (.btn-toggle's own 1.615rem
   square), padded so a ring of the button's own glass background still
   shows around the swatch itself rather than the swatch filling the
   whole square corner to corner. */
.view-settings-color-swatch {
  padding: 3px;
  border: 0;
  cursor: pointer;
}
.view-settings-color-swatch::-webkit-color-swatch-wrapper { padding: 0; }
.view-settings-color-swatch::-webkit-color-swatch {
  border: 0;
  border-radius: calc(var(--smallcorner) * var(--font-scale) * 0.6);
}
.view-settings-color-swatch::-moz-color-swatch { border: 0; }
/* Fade Time/Report Columns/Max Map Zoom/Tile Keep Buffer/Glass Tint
   Intensity — reuse the exact same compact label+stepper layout Plan
   params' own number knobs use (.sam-knob-row--num/.knob-num/
   .knob-number-input/.knob-step, layer-ui.js's knobPanel), not a
   separate style, so this popup doesn't carry two different-looking
   number-field designs. Gap left at 0 here — each row already brings
   its own margin-bottom (.sam-knob-row), stacking a flex gap on top of
   that would just double the space between them. */
.view-settings-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 4px;
  text-align: left;
}
/* Save, centered — replaces the old left/right Cancel+Save
   .photo-modal-actions row every other modal keeps (those fields
   already save live, one at a time, on change; this is just "done"). */
.view-settings-actions {
  justify-content: center;
}
.view-settings-actions .button:first-child {
  margin-right: 0;
}


.map-profile-overlay-body .auth-forms {
  margin: 0;
  width: 100%;
  max-width: none;
  max-height: none;
  overflow: visible;
  box-sizing: border-box;
  padding: var(--panel-form-pad-y) var(--panel-form-pad-x);
  background: transparent;
}


body.tile-dark .map-search-control .search-icon {
  filter: invert(1) brightness(2);
  opacity: 0.88;}


/* Map */
/* ── Map containers ──────────────────────────────────────────────────────── */
#map { height: 100%; }

#map-mapbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9;
  background: #5a3a5c; /*#1a3a5c;*/
}

/* native map control stacks and tile selectors above the mini-launcher */
#map .leaflet-top,
#map .leaflet-bottom,
#map-mapbox .mapboxgl-ctrl-top-left,
#map-mapbox .mapboxgl-ctrl-top-right,
#map-mapbox .mapboxgl-ctrl-bottom-left,
#map-mapbox .mapboxgl-ctrl-bottom-right {
  z-index: 200000 !important;
}

/* ── Globe toggle / back button ──────────────────────────────────────────── */
.globe-btn { font-size: 1rem; }
.grid-btn  { font-size: 0.9375rem; }
#globe-back-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 5;
  background: rgba(20, 20, 20, 0.75);
  color: #eee;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 4px;
  width: 1.7rem;
  height: 1.7rem;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background 0.15s;
}
#globe-back-btn:hover { background: rgba(40,40,40,0.9); }

/* ── Shared tile picker control (thumbnail grid) ─────────────────*/
.map-tile-ctrl { position: relative; }
.map-tile-ctrl.leaflet-bar {
  border-radius: 999px !important;
}
.map-tile-ctrl-btn {
  width: 2.375rem !important;
  height: 2.375rem !important;
  border-radius: 999px !important;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  display: block !important;
}
.map-tile-ctrl-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.375rem;
  height: 1.375rem;
  background-color: var(--control-glass-text);
  -webkit-mask-image: url('/static/icons/menu/Tiles.svg?v=1792024277');
  mask-image: url('/static/icons/menu/Tiles.svg?v=1792024277');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.map-tile-panel {
  position: absolute;
  left: 2.875rem;
  top: 0;
  padding: 0.5rem;
  width: 15rem;
  max-height: 70vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.map-tile-panel.hidden { display: none; }

.map-tile-group {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.125rem 0;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.55;
  cursor: pointer;
  user-select: none;
  text-align: left;
  color: var(--control-glass-text);
}
.map-tile-group:first-child { padding-top: 0; }
.map-tile-group:hover { opacity: 0.85; }
.map-tile-group-label { flex: 1; text-align: left; }

.map-tile-group-toggle {
  flex-shrink: 0;
  width: 0.66rem !important;
  height: 0.66rem !important;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  display: block !important;
  position: relative;
  color: var(--control-glass-text);
}
.map-tile-group-toggle::before {
  content: '';
  position: absolute;
  inset: 0;
  width: 0.66rem;
  height: 0.66rem;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-image: url('/static/icons/menu/ArrowDown.svg?v=1792024277');
  mask-image: url('/static/icons/menu/ArrowDown.svg?v=1792024277');
  pointer-events: none;
}
.map-tile-group-toggle.collapsed::before {
  -webkit-mask-image: url('/static/icons/menu/ArrowRight.svg?v=1792024277');
  mask-image: url('/static/icons/menu/ArrowRight.svg?v=1792024277');
}

.map-tile-group-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  overflow: hidden;
  max-height: 2000px;
  opacity: 1;
  margin-top: 0.25rem;
  transition: max-height 0.18s ease, opacity 0.15s ease, margin 0.18s ease;
}
.map-tile-group-items.collapsed {
  max-height: 0 !important;
  opacity: 0 !important;
  margin-top: 0 !important;
  pointer-events: none !important;
}

.map-tile-item {
  display: flex !important;
  flex-direction: column;
  gap: 0.1875rem;
  padding: 0;
  border: 1px solid transparent !important;
  border-radius: 0.5rem;
  background: none;
  cursor: pointer;
  overflow: hidden;
  font-family: inherit;
  width: 100% !important;
  height: auto !important;
}
.map-tile-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0.375rem;
  display: block;
  transform: scale(1);
  transition: transform 0.15s ease;
}
.map-tile-item:hover img { transform: scale(1.05); }
.map-tile-item span {
  font-size: 0.625rem;
  text-align: left;
  padding: 0 0.125rem 0.1875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-tile-item[aria-pressed="true"] { border-color: var(--highlight) !important; }
.map-tile-item[aria-pressed="true"] img { outline: 0.125rem solid var(--highlight); outline-offset: -0.125rem; }

/* Buttons — pill color/fill  */
.button {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
    margin-top: 10px;
    align-self: center;
    width: fit-content;
    background-color: rgba(var(--theme-fg), 0.08);
    color: rgba(var(--theme-fg), 0.9);
    text-decoration: none;}
.button:hover {
    background-color: rgba(var(--theme-fg), 0.16);
    color: rgba(var(--theme-fg), 0.9)}

.profile-shortcut-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.button.profile-shortcut-btn,
.button.profile-shortcut-btn:hover {
    color: rgba(var(--theme-fg), 0.9);
}
.profile-shortcut-btn svg {
    width: 1.125rem;
    height: 1.125rem;
    color: inherit;
    fill: currentColor;
}

:is(#login-form, #registration-form, #profile-view, #profile-update-form, #admin-queue, #admin-email-queue, #share-site-form) .button,
#member-info-compose-send {
  background-image: url('/static/logo/tribal_grey.jpg') !important;
    background-size: 272px 370px;
    background-position: center;
    background-color: transparent !important;
    color: rgb(var(--whiteRGB));
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.search-icon {
    filter: invert(1) brightness(2);
    width: 1.375rem;
    height: 1.375rem;
    margin-right: 6px;
    flex-shrink: 0;}
:is(#login-form, #registration-form, #profile-view, #profile-update-form, #admin-queue, #admin-email-queue, #share-site-form) .button:hover,
:is(#login-form, #registration-form, #profile-view, #profile-update-form, #admin-queue, #admin-email-queue, #share-site-form) .button:focus-visible,
#member-info-compose-send:hover,
#member-info-compose-send:focus-visible {
  background-image: url('/static/logo/tribal_green.jpg') !important;
    background-color: transparent !important;
    filter: brightness(1.15);}

/* ── Admin requests page — buttons/list rows ── */
#admin-requests-page .admin-request-list .prop-row {
  padding: 8px 10px;
  border-radius: var(--smallcorner);
}
#admin-requests-page .admin-request-list .prop-key {
  padding-left: 0;
}
#admin-requests-page .admin-request-list .prop-row:nth-child(odd)  { background: var(--lightgrey); }
#admin-requests-page .admin-request-list .prop-row:nth-child(even) { background: var(--white); }

#admin-requests-page .admin-section-summary {
  background-image: url('/static/logo/tribal_grey.jpg');
  background-size: 272px 370px;
  color: var(--white);
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  padding: 8px 10px;
  border-radius: var(--smallcorner);
}
#admin-requests-page .admin-section-summary .crumb-arrow {
  color: rgba(255,255,255,0.7);
}
#admin-requests-page .admin-section + .admin-section {
  margin-top: 28px;
}

#admin-requests-page .admin-action-btn {
  min-width: 86px;
  text-align: center;
  background-size: 272px 370px !important;
  background-position: center !important;
  background-repeat: repeat !important;
  background-color: transparent !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5) !important;
  filter: none !important;
  opacity: 1 !important;
}

#admin-requests-page .admin-action-btn:hover,
#admin-requests-page .admin-action-btn:focus-visible {
  filter: none !important;
}
#admin-requests-page .admin-invite-status-dropdown {
  position: relative;
  flex: 0 0 auto;
  width: 9ch;
}
#admin-requests-page .admin-invite-status-btn {
  width: 100%;
  text-align: right;
  padding: 5px 6px;
  border-radius: var(--smallcorner);
  border: 1px solid var(--midgrey);
  background: var(--white);
  color: var(--black);
  font-size: 0.75rem;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#admin-requests-page .admin-invite-status-btn:disabled {
  opacity: 0.6;
  cursor: default;
}
#admin-requests-page .admin-invite-status-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  z-index: 20;
  background: var(--white);
  border: 1px solid var(--midgrey);
  border-radius: var(--smallcorner);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  overflow: hidden;
}
#admin-requests-page .admin-invite-status-option {
  padding: 5px 6px;
  font-size: 0.75rem;
  color: var(--black);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#admin-requests-page .admin-invite-status-option:hover {
  background: rgba(0,0,0,0.06);
}
#admin-requests-page .admin-invite-status-option.selected {
  font-weight: 600;
}
#admin-requests-page .admin-invite-status-option.disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}
#admin-requests-page .admin-invite-lastseen {
  color: var(--green);
}
.admin-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.admin-confirm-box {
  background: var(--white);
  color: var(--black);
  border-radius: var(--smallcorner);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  padding: 18px 20px;
  max-width: 380px;
  width: 100%;
}
.admin-confirm-box p {
  margin: 0 0 16px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.admin-confirm-box code {
  font-family: 'Courier New', Courier, monospace;
  background: var(--lightgrey);
  padding: 1px 5px;
  border-radius: 3px;
}
#admin-requests-page .admin-cycle-info-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  width: 260px;
  background: var(--white);
  color: var(--black);
  border: 1px solid var(--midgrey);
  border-radius: var(--smallcorner);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  padding: 10px 12px;
  font-size: 0.8rem;
  line-height: 1.4;
}
#admin-requests-page .admin-cycle-info-popover h1 {
  font-size: 0.9rem;
  margin: 0 0 8px;
}
#admin-requests-page .admin-cycle-info-popover ul {
  margin: 0;
  padding-left: 18px;
}
#admin-requests-page .admin-cycle-info-popover li {
  margin-bottom: 6px;
}
#admin-requests-page .admin-cycle-info-popover li:last-child {
  margin-bottom: 0;
}
/* Site Design Requests */
#admin-requests-page .admin-approve-btn,
#admin-requests-page .admin-approve-btn:hover,
#admin-requests-page .admin-approve-btn:focus-visible {
  background-image: url('/static/logo/tribal_green.jpg') !important;
  color: var(--white) !important;
}
#admin-requests-page .admin-deny-btn,
#admin-requests-page .admin-deny-btn:hover,
#admin-requests-page .admin-deny-btn:focus-visible {
  background-image: url('/static/logo/tribal_red.jpg') !important;
  color: var(--white) !important;
}
/* Email Verification Requests */
#admin-requests-page .admin-email-approve-btn,
#admin-requests-page .admin-email-approve-btn:hover,
#admin-requests-page .admin-email-approve-btn:focus-visible {
  background-image: url('/static/logo/tribal_green.jpg') !important;
  color: var(--white) !important;
}
#admin-requests-page .admin-email-deny-btn,
#admin-requests-page .admin-email-deny-btn:hover,
#admin-requests-page .admin-email-deny-btn:focus-visible {
  background-image: url('/static/logo/tribal_grey.jpg') !important;
  color: var(--white) !important;
}
#admin-requests-page .admin-email-delete-btn,
#admin-requests-page .admin-email-delete-btn:hover,
#admin-requests-page .admin-email-delete-btn:focus-visible {
  background-image: url('/static/logo/tribal_red.jpg') !important;
  color: var(--white) !important;
}

/* Sign-up Invites — grey pill, green on hover (tribal style) */
#admin-requests-page #admin-invite-add-btn,
#admin-requests-page #admin-invite-add-btn:hover,
#admin-requests-page #admin-invite-add-btn:focus-visible {
  background-image: url('/static/logo/tribal_grey.jpg') !important;
  color: var(--white) !important;
}
#admin-requests-page #admin-invite-add-btn:hover,
#admin-requests-page #admin-invite-add-btn:focus-visible {
  background-image: url('/static/logo/tribal_green.jpg') !important;
}

/* Organizations — same grey/green "Approve" look as the invite Add button */
#admin-requests-page #admin-org-add-btn,
#admin-requests-page #admin-org-add-btn:hover,
#admin-requests-page #admin-org-add-btn:focus-visible {
  background-image: url('/static/logo/tribal_grey.jpg') !important;
  color: var(--white) !important;
}
#admin-requests-page #admin-org-add-btn:hover,
#admin-requests-page #admin-org-add-btn:focus-visible {
  background-image: url('/static/logo/tribal_green.jpg') !important;
}

/* Hover motion only: no color/image swap. */
#admin-requests-page .admin-action-btn:hover,
#admin-requests-page .admin-action-btn:focus-visible {
  transform: translateY(-2px);
}

/* Main Content Area (Card Centered) */

.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;}
.card {
    background: rgba(var(--whiteRGB), var(--trans)) !important;   
    border-radius: 15px;
    padding: 20px;
    max-width: calc(100% - 50px);
      width: min(90vw, 800px);
    margin: 0 auto;
    box-shadow: 2px 2px 10px rgba(var(--blackRGB), 0.1);
}
.label {
    color: var(--darkcolor);
    font-weight: 400;}
.content {
    font-weight: 200;
    color: var(--darkgrey);
    max-width: 800px;
    width: 100%;
    margin: 0 auto;}
.gallery {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;}
.nav-btn {
    position: absolute;
    top: 8px;
    width: 1.7rem;
    height: 1.7rem;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-button-bg);
    color: var(--control-glass-text);
    border: none;
    font-size: 1.125rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s ease-in-out;
    /* .nav-btn.left/.right sit 8px from their container's edge — inside
       #dash-sheet's own .sheet-edge-handle-left/-right (28px wide,
       z-index:10002, styles.css), which exists to catch a resize drag
       anywhere along that whole strip. Without a z-index here the handle
       sat on top and silently ate clicks meant for a nav-btn landing in
       that same strip (e.g. the PDF viewer's own Next/Prev buttons) —
       this wins the real interactive control over the broader resize
       catch area whenever they overlap. */
    z-index: 10003;}
.nav-btn[hidden] {
  display: none;
}
.nav-btn.left {
    left: 8px;}
.nav-btn.right {
    right: 8px;}
.nav-btn:hover {
    background: var(--glass-button-hover-bg);
}

.nav-btn::before {
    content: '';
    display: block;
    width: var(--icon-arrow-size);
    height: var(--icon-arrow-size);
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: center; mask-position: center;
    -webkit-mask-size: contain; mask-size: contain;
    pointer-events: none;
}
.nav-btn.left::before  { -webkit-mask-image: url('/static/icons/menu/ArrowLeft.svg?v=1792024277');  mask-image: url('/static/icons/menu/ArrowLeft.svg?v=1792024277'); }
.nav-btn.right::before { -webkit-mask-image: url('/static/icons/menu/ArrowRight.svg?v=1792024277'); mask-image: url('/static/icons/menu/ArrowRight.svg?v=1792024277'); }

/* ── PDD inline PDF viewer (carbon.js's _renderPdfViewer) — see context/Tech/design.md ── */
/* .data-container's own 20px padding + 560px max-width (styles.css,
   ~line 4877) are right for a card of plain text/stats, but a PDF page
   wants to use the FULL width of whatever column/panel it's actually
   in — a wide Dock column or slide-up panel left it capped at 560px
   with empty space on either side instead of filling that space.
   :has() scopes this to exactly the card holding a PDF viewer, so
   every other card's own 560px cap is untouched. */
.data-container:has(.pdd-pdf-viewer) { max-width: 100%; }
/* Negative margin equal to .data-container's own 20px padding — bleeds
   the viewer to the card's true outer edge instead of sitting inset by
   that padding like the rest of the card's content does. */
.pdd-pdf-viewer { margin: 8px -20px 0 -20px; }
.pdd-pdf-page-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /* A4 portrait — the page fills this exactly (canvas below matches it),
     so the window always reads as "one page", not a tall/short crop of
     one. width:100% (not auto-centered at whatever the old max-height
     cap happened to leave) is what actually bleeds this edge to edge —
     height still follows from it via the aspect-ratio, so a wide column
     gets a wide page instead of a narrower, centered one. */
  width: 100%;
  aspect-ratio: 1 / 1.41421;
  max-height: 85vh;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background: #d8d8d8; /* light backdrop by default — see .pdd-pdf-dark below for the toggle */
  border: 1px solid rgba(var(--whiteRGB), 0.12);
  overflow: hidden;
  transition: background 0.15s ease;
}
.pdd-pdf-viewer.pdd-pdf-dark .pdd-pdf-page-wrap { background: #1c1c1c; }
.pdd-pdf-canvas {
  display: block;
  width: 100%; height: 100%;
  object-fit: contain; /* keeps the page's own aspect ratio exact even if the wrap's rounds slightly differently — zoomed past 1x, JS sets an explicit px size on this element instead, which wins over these two */
  background: #fff;    /* the page itself renders whatever the PDF's own background is (white for a light PDD, black for a dark one) — this is only the sliver visible if object-fit's rounding leaves a gap */
  box-shadow: 0 1px 6px rgba(0,0,0,0.25);
}
.pdd-pdf-viewer.pdd-pdf-dark .pdd-pdf-canvas { background: #000; }
/* Same subtle, at-rest-translucent look as every other carousel's .nav-btn
   (--glass-button-bg) — #zone-photos-gallery's own pair below is the exact
   model: no color/size/opacity override, just vertical centering, since
   this wrap (unlike the default top-8px strip) is a square-ish page.
   Color/background ARE overridden below though — these two buttons sit
   directly on the PDF page itself (#d8d8d8 light / #1c1c1c dark via
   .pdd-pdf-dark above), not on the app's own chrome, so --control-glass-
   text/--glass-button-bg (which flip with body.tile-dark, the APP's
   theme) are the wrong thing to follow here: toggling the report to
   white while the app itself is in dark mode left these at the dark
   theme's light-on-dark colors — a light icon on a near-white page,
   unreadable. Keyed off .pdd-pdf-dark (the report's OWN toggle,
   .pdd-pdf-bg-pill below) instead, so they always match the page
   they're actually sitting on regardless of the app's theme. */
.pdd-pdf-page-wrap .nav-btn {
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.75);
}
.pdd-pdf-page-wrap .nav-btn:hover { background: rgba(0, 0, 0, 0.16); }
.pdd-pdf-viewer.pdd-pdf-dark .pdd-pdf-page-wrap .nav-btn {
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.88);
}
.pdd-pdf-viewer.pdd-pdf-dark .pdd-pdf-page-wrap .nav-btn:hover { background: rgba(255, 255, 255, 0.24); }
/* Full screen — last item in .pdd-pdf-toolbar, now a plain
   .pdd-pdf-toolbar-btn like Edit/Download/the receipts beside it (same
   shape/size/hover — see that class below), just with a mask-icon
   (Maximize/Restore) instead of an <img>, since this one toggles between
   two icons rather than linking/downloading. requestFullscreen() targets
   the page-wrap itself, not the whole viewer/footer, so full screen
   shows just the page large. */
.pdd-pdf-fullscreen-btn::before {
  content: '';
  display: block;
  width: 0.85rem;
  height: 0.85rem;
  margin: 0 auto;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
  pointer-events: none;
  -webkit-mask-image: url('/static/icons/menu/Maximize.svg?v=1792024277');
  mask-image: url('/static/icons/menu/Maximize.svg?v=1792024277');
}
.pdd-pdf-fullscreen-btn.is-fullscreen::before {
  -webkit-mask-image: url('/static/icons/menu/Restore.svg?v=1792024277');
  mask-image: url('/static/icons/menu/Restore.svg?v=1792024277');
}
.pdd-pdf-page-wrap:fullscreen {
  max-height: 100vh;
  background: #d8d8d8;
  padding: 24px;
}
.pdd-pdf-viewer.pdd-pdf-dark .pdd-pdf-page-wrap:fullscreen { background: #1c1c1c; }
/* Fallback for platforms with no Fullscreen API at all (iPhone Safari —
   confirmed: requestFullscreen doesn't exist on any element there, so
   the button silently did nothing) — carbon.js applies this class
   itself instead of calling the real API when it isn't available.
   :fullscreen above gets position/stacking for free from the browser
   taking the element fullscreen natively; this has to do that part by
   hand too, not just copy the max-height/background/padding. */
.pdd-pdf-page-wrap.pdd-pdf-fake-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 100000;
  width: 100vw;
  max-height: 100vh;
  background: #d8d8d8;
  padding: 24px;
}
.pdd-pdf-viewer.pdd-pdf-dark .pdd-pdf-page-wrap.pdd-pdf-fake-fullscreen { background: #1c1c1c; }
.pdd-pdf-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  /* Just the page label now — every action (theme toggle, Edit, the two
     receipts, Download, Full screen) moved up onto the viewer itself,
     see .pdd-pdf-toolbar below. */
  padding: 0 20px;
}
.pdd-pdf-page-label { font-size: 0.75rem; opacity: 0.6; }
/* Toolbar row ON the viewer (carbon.js's _renderPdfViewer), same top-left
   corner Full screen used to sit in alone — exact order requested:
   [theme toggle][edit][download][access receipt][other receipt]
   [full screen]. Every button here (including Full screen, which keeps
   its own existing .btn-info/mask-icon styling further down) shares the
   same glass look (--glass-button-bg/--control-glass-text) — nothing
   here uses .li-place-btn's dark/green tribal pill, on purpose: a
   floating toolbar overlaying the page reads as chrome, not as an
   action the way Generate/the old stacked buttons were. */
.pdd-pdf-page-wrap .pdd-pdf-toolbar {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pdd-pdf-toolbar-btn,
.pdd-pdf-bg-pill {
  /* NOT --glass-button-bg/--control-glass-text (the APP's theme) — same
     bug/fix as .pdd-pdf-page-wrap .nav-btn above: this whole row sits
     directly on the PDF page itself, and the report's own light/dark
     toggle is independent of whatever theme the app around it happens
     to be in. Default (light page) colors below; .pdd-pdf-dark overrides
     them, same as the page background itself does. */
  background: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.75);
  border: none;
  cursor: pointer;
}
.pdd-pdf-viewer.pdd-pdf-dark .pdd-pdf-toolbar-btn,
.pdd-pdf-viewer.pdd-pdf-dark .pdd-pdf-bg-pill {
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.88);
}
/* Edit/Download/the two receipts/Full screen — all 5, same size as the
   main app toolbar's own icon buttons (.tab-icon-btn, 1.615rem) and, like
   those, scaled by the A+/A- controls purely through rem inheriting
   html's own font-size (calc(16px * var(--font-scale)), styles.css's
   root rule) — no separate zoom/size mechanism of their own. Rounded-
   rect "pill" shape (var(--smallcorner), same corner every other pill
   button in the app uses, e.g. .li-place-btn), not a circle. */
.pdd-pdf-toolbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.615rem;
  height: 1.615rem;
  padding: 0;
  border-radius: calc(var(--smallcorner) * var(--font-scale));
  transition: background 0.15s;
}
.pdd-pdf-toolbar-btn:hover { background: rgba(0, 0, 0, 0.16); }
.pdd-pdf-viewer.pdd-pdf-dark .pdd-pdf-toolbar-btn:hover { background: rgba(255, 255, 255, 0.24); }
.pdd-pdf-toolbar-btn.is-loading { opacity: 0.5; pointer-events: none; }
/* brightness(0) alone = black (visible on the light page); invert(1) on
   top of that = white (visible on the dark one) — these are plain <img>
   references to a fixed-color SVG (Edit/Regenerate/Printer/receipt
   icons), not inline currentColor masks, so filter is the only lever.
   Was brightness(0) invert(1) unconditionally — always white, invisible
   the moment the report itself is toggled to its light/default page. */
.pdd-pdf-toolbar-btn-icon { width: 0.85rem; height: 0.85rem; filter: brightness(0); }
.pdd-pdf-viewer.pdd-pdf-dark .pdd-pdf-toolbar-btn-icon { filter: brightness(0) invert(1); }
/* Dark/light toggle — same glass background as the icon buttons beside
   it (explicitly NOT the green/dark tribal .li-place-btn look), just a
   real switch (role="switch") instead of a push-button: the knob's
   position alone communicates state, no text label needed in a row
   this compact. */
.pdd-pdf-bg-pill {
  position: relative;
  width: 34px;
  height: 1.38rem;
  border-radius: 999px;
  padding: 0;
}
.pdd-pdf-bg-pill-knob {
  position: absolute;
  top: 2px; left: 2px;
  width: calc(1.38rem - 4px);
  height: calc(1.38rem - 4px);
  background: currentColor;
  border-radius: 50%;
  transition: transform 0.18s ease;
}
.pdd-pdf-bg-pill.is-dark .pdd-pdf-bg-pill-knob { transform: translateX(16px); }
/* The single "Generate [X] Report" button above this card (habitat.js/
   carbon.js) — not the viewer toolbar above, which has its own styling.
   Kept as its own named stack (not folded into a one-off rule) since
   this is still the one plain .li-place-btn in this whole card now. */
.pdd-action-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 340px;
  margin: 10px auto 0;
}
.pdd-action-stack .li-place-btn { width: 100%; text-align: center; }

#zone-photos-gallery {
  aspect-ratio: 3 / 2;
  height: auto;
  overflow: hidden;
}
#zone-photos-gallery .gallery-img,
#zone-photos-gallery .photo-dropzone {
  height: 100%;
}
#zone-photos-gallery .gallery-img img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}
#zone-photos-gallery .nav-btn {
  top: 50%;
  transform: translateY(-50%);
}
#zone-photos-gallery .photo-clickable {
  cursor: pointer;
}
#zone-photos-gallery .photo-clickable img {
  transition: transform 0.18s;
}
#zone-photos-gallery .photo-clickable:hover img {
  transform: scale(1.05);
}

/* The picker image (.segpick-img)  */
.segpick-gallery {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 240px;
}

.segpick-gallery:has(.segpick-create-slide:not(.hidden)) {
    height: auto;
    max-height: min(70vh, 640px);
}
.segpick-gallery img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 10px;
}
.segpick-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 1.7rem;
    height: 1.7rem;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-button-bg);
    color: var(--control-glass-text);
    border: none;
    border-radius: 50%;
    font-size: 1.125rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
}
.segpick-nav-btn.left  { left: 8px; }
.segpick-nav-btn.right { right: 8px; }
.segpick-nav-btn:hover { background: var(--glass-button-hover-bg); }
.segpick-nav-btn:disabled { opacity: 0.3; cursor: default; pointer-events: none; }
.segpick-nav-btn::before {
    content: '';
    display: block;
    width: var(--icon-arrow-size);
    height: var(--icon-arrow-size);
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: center; mask-position: center;
    -webkit-mask-size: contain; mask-size: contain;
    pointer-events: none;
}
.segpick-nav-btn.left::before  { -webkit-mask-image: url('/static/icons/menu/ArrowLeft.svg?v=1792024277');  mask-image: url('/static/icons/menu/ArrowLeft.svg?v=1792024277'); }
.segpick-nav-btn.right::before { -webkit-mask-image: url('/static/icons/menu/ArrowRight.svg?v=1792024277'); mask-image: url('/static/icons/menu/ArrowRight.svg?v=1792024277'); }
/* Drag-to-adjust-opacity ring drawn directly around the "next" nav button. */
.segpick-nav-btn.right .opacity-ring {
  opacity: 0;
  /* .segpick-nav-btn is 1.7rem  */
  width: 1.7rem;
  height: 1.7rem;
}
.segpick-nav-btn.right:hover .opacity-ring,
.segpick-nav-btn.right.opacity-dragging .opacity-ring { opacity: 1; transition: none; }
.segpick-nav-btn.right.opacity-dragging { cursor: grabbing; }
.segpick-blank-slide {
    width: 200px;
    max-width: 100%;
    height: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    border: 2px dashed var(--control-glass-border);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: rgba(var(--theme-fg), 0.4);
}
.segpick-blank-slide .zone-photo-add-icon { font-size: 40px; }
.segpick-create-slide {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 5px 45px 10px;
}
.segpick-create-inner {
    width: 100%;
    max-width: 420px;
}

.result-meta.segpick-label-thin {
    font-weight: 300;
    opacity: 0.7;
    margin-top: 0;
}

/* ── Legacy thumbnail/project gallery ── */
.thumbnail {
    width: calc(100% - 20px);
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    display: block;
    margin: 10px auto; }
.project-card {
    max-width: 320px;
    min-height: auto;
    background-color: rgb(var(--whiteRGB));
    width: calc(100% - 10px);
    justify-content: space-between;
    color: var(--darkgrey);
    padding: 5px;
    text-align: center;
    border-radius: 10px;
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 300;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-shadow: 0px 5px 10px rgba(var(--blackRGB), 0);
    transition: 0.2s ease-in-out;}
.project-card img,
.gallery img {
    max-width: 1024px;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 10px;}
.gallery {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;}
.project-card:hover {
    box-shadow: 0px 5px 20px rgba(var(--blackRGB), 0.15);
}


.auth-forms h2.profile-greeting {
    font-size: 1.4em;
    font-family: "EB Garamond", Garamond, "Times New Roman", serif;
    font-style: italic;
    font-weight: 400;
    text-align: center;
    color: var(--control-glass-text);
    opacity: 0.65;
    margin: 0 0 20px 0;
    line-height: 1.45;
}

/* ── My Info / My Sites — drawer-summary layout (tools-drawer is generic, stays here) ── */
#my-info-section > .tools-drawer-summary {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    transition: background 0.15s;
}
#my-info-section > .tools-drawer-summary > .crumb-arrow,
.my-sites-box > .tools-drawer-summary > .crumb-arrow {
    justify-self: start;
}

#my-info-section > .tools-drawer-summary:hover,
.my-sites-box > .tools-drawer-summary:hover {
    background: rgba(var(--theme-fg), 0.09);
    border-radius: var(--smallcorner) var(--smallcorner) 0 0;
}
.my-sites-box > .tools-drawer-summary {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    transition: background 0.15s;
}
#explore-sites-section > .tools-drawer-summary > .my-sites-view-toggles {
    grid-column: 3 / -1;
}
.my-sites-add-row .zone-photo-add-icon { font-size: 1rem; }


/* Photo upload modal */
.photo-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 200025;
    display: flex;
    align-items: center;
    justify-content: center; }
.photo-modal {
    background: var(--glass-panel-bg);
    backdrop-filter: blur(var(--glass-panel-blur));
    -webkit-backdrop-filter: blur(var(--glass-panel-blur));
    border: 1px solid var(--control-glass-border);
    border-radius: 18px;
  padding: 22px 22px 16px;
  width: min(390px, 92vw);
    color: var(--control-glass-text); }
.photo-modal-title {
  font-size: 0.875rem;
    font-weight: 600;
  margin: 0 0 12px;
    text-align: center;
    color: var(--control-glass-text); }
.photo-dropzone {
  border: 1px dashed var(--control-glass-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s;
  background: rgba(var(--theme-fg), 0.035);
    overflow: hidden; }
.photo-dropzone.drag-over {
    border-color: rgba(var(--theme-fg), 0.9);
    background: rgba(var(--theme-fg), 0.08); }

.zone-photo-add-slide {
    width: 100%;
    color: rgba(var(--theme-fg), 0.4);
    transition: border-color 0.18s, background 0.18s, color 0.18s; }
.zone-photo-add-slide:hover {
    border-color: rgba(var(--theme-fg), 0.9);
    background: rgba(var(--theme-fg), 0.08);
    color: rgba(var(--theme-fg), 1); }
.zone-photo-add-icon {
    font-size: 48px;
    font-weight: 200;
    line-height: 1; }
.gallery-img {
    position: relative;
    width: 100%; }
.gallery-caption {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: fit-content;
    max-width: calc(100% - 20px);
    margin: 0 auto;
    padding: 3px 10px;
    border-radius: var(--smallcorner);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.75rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none; }
.photo-drop-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
  gap: 6px;
  padding: 16px; }
.photo-drop-text {
  font-size: 0.75rem;
    color: var(--control-glass-text); }
.photo-drop-or {
  font-size: 0.6875rem;
    color: var(--control-glass-text);
    opacity: 0.55; }
.photo-preview-img {
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    border-radius: 10px; }
.photo-modal-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
  margin-top: 12px; }
.photo-modal-actions .button:first-child {
    margin-right: auto; }
.photo-modal-actions .button,
#photo-browse-btn {
  background: rgba(var(--theme-fg), 0.065) !important;
  border: 1px solid var(--control-glass-border) !important;
  color: var(--control-glass-text) !important;
  backdrop-filter: blur(calc(var(--glass-button-blur) * 0.9));
  -webkit-backdrop-filter: blur(calc(var(--glass-button-blur) * 0.9));
  font-size: 0.75rem !important;
  padding: 0.4rem 0.7rem !important;
  min-height: 1.85rem;
  line-height: 1.1;
}

/* ── Share-site panel — generic panel-bar bits (rest moved to profile.css) ── */
.share-site-panel-bar .panel-bar-label {
    flex: 1;
    text-align: center;
    font-weight: 600;
}


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


.text-info {
    display: flex;
    flex-direction: column;
    text-align: left;}
.text-info strong {
    font-size: 1rem;}
.text-info span {
    font-size: 0.875rem;
    color: var(--darkgrey);}

/* Form */
.auth-forms {
    padding: 30px;
    max-width: 600px;
    margin: 30px auto;
    text-align: left;
    color: var(--control-glass-text);
  position: relative;
}


#admin-requests-page .auth-forms {
    background: var(--white);
    color: var(--black);
    border-radius: var(--smallcorner);
    box-sizing: border-box;
    max-width: none;
    width: calc(100% - (2 * var(--gutter)));
    margin: 30px var(--gutter);
}
#admin-requests-page .auth-forms h2 {
    color: var(--black);
}
.auth-forms h2 {
    font-size: 1.5em;
    margin: 0 0 8px 0;
    text-align: center;
    color: var(--control-glass-text);
}
.auth-forms label,
.auth-forms p,
.auth-forms .terms-checkbox-container label { color: var(--control-glass-text); }
.auth-forms label,
.auth-forms p,
.auth-forms a,
.auth-forms input,
.auth-forms select,
.auth-forms button {
  font-size: 0.8125rem;
}
.auth-forms form label { margin-bottom: -2px; }
.auth-forms a { color: var(--darkgrey); text-decoration: none; }
.auth-forms a:hover { color: var(--darkergrey); }


.auth-forms input,
.auth-forms select {
    background: transparent !important;
    color: var(--control-glass-text) !important;
    font-size: 0.8125rem !important;
    border: 1px solid rgba(128, 128, 128, 0.4);
    border-radius: 8px;
    padding: 12px;
    width: 100% !important;
    box-sizing: border-box;
    -webkit-text-fill-color: var(--control-glass-text) !important;
    transition: background-color 9999s, color 9999s !important; }
.auth-forms input[type="date"] {
    font-family: inherit; }
.auth-forms input:-webkit-autofill,
.auth-forms input:-webkit-autofill:hover,
.auth-forms input:-webkit-autofill:focus,
.auth-forms input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
    box-shadow: 0 0 0 1000px transparent inset !important;
    -webkit-text-fill-color: var(--control-glass-text) !important;
    transition: background-color 9999s ease-in-out 0s !important; }
body.tile-dark .auth-forms input:-webkit-autofill,
body.tile-dark .auth-forms input:-webkit-autofill:hover,
body.tile-dark .auth-forms input:-webkit-autofill:focus,
body.tile-dark .auth-forms input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px rgba(20, 20, 20, 0.7) inset !important;
    box-shadow: 0 0 0 1000px rgba(20, 20, 20, 0.7) inset !important; }
.auth-forms input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0.6;
    cursor: pointer; }
body.tile-dark .auth-forms input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.7; }
.auth-forms input:focus,
.auth-forms select:focus { border-color: var(--lightcolor); outline: none; }
.auth-forms input::placeholder {
  color: var(--control-glass-text-muted);
  opacity: 0.62;
  font-weight: 300;
}
.auth-forms .placeholder-muted::placeholder {
  color: var(--control-glass-text-muted) !important;
  opacity: 0.62;
  font-weight: 300;
}
.auth-forms .placeholder-muted::-webkit-input-placeholder {
  color: var(--control-glass-text-muted) !important;
  opacity: 0.62;
  font-weight: 300;
}
.auth-forms .form-help {
  color: var(--control-glass-text-muted);
  margin-top: -4px;
}

.auth-forms .form-help.text-error {
  color: var(--red) !important;
  font-size: 0.6875rem;
  font-weight: 300;
  line-height: 1.25;
}

.auth-forms select.is-placeholder,
.auth-forms select.is-placeholder option[value=""] {
  color: var(--control-glass-text-muted) !important;
  -webkit-text-fill-color: var(--control-glass-text-muted) !important;
}


.auth-forms .birthdate-text-input {
  padding-left: 42px;
}

.password-field { position: relative; }
.password-field input {
  padding-right: 40px !important;
}
.password-toggle-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  color: var(--control-glass-text);
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.65;
  transition: opacity 0.16s ease;
}
.password-toggle-btn:hover,
.password-toggle-btn:focus-visible {
  opacity: 1;
}
/* Overrides `form button:hover`/`:active` below, which target every plain
   button inside a form (meant for the real Login/Enter submit buttons) —
   this one isn't a submit button, and that rule's own background-color +
   transform:translateY(-2px) both fought this button's own styling:
   the background read as an unwanted green highlight, and translateY(-2px)
   REPLACED (not added to) this button's own translateY(-50%) vertical
   centering, which is what made it visibly jump on hover. Kept subliminal
   per request — opacity is still the only thing that changes. */
.password-toggle-btn:hover,
.password-toggle-btn:active {
  background-color: transparent;
  transform: translateY(-50%);
}
.password-toggle-btn svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: currentColor !important; /* Eye.svg/EyeNo.svg hardcode fill="#1f1f1f" on the root <svg> — override it so the icon actually follows the button's own color/hover state instead of staying a fixed dark color */
}
/* Eye.svg shown at rest; EyeNo.svg (the "hide"/crossed state) shown only
   once the button's own .showing class flips on — never both, css-only,
   no extra fetch needed since both are inlined server-side. */
.password-toggle-icon-eyeno { display: none; }
.password-toggle-btn.showing .password-toggle-icon-eye { display: none; }
.password-toggle-btn.showing .password-toggle-icon-eyeno { display: inline-flex; }


body.login-gate-page,
body.landing-gate-page {
  background-image: url('/static/logo/tribal_green.jpg') !important;
  background-size: 272px 370px;
  background-color: var(--darkcolor) !important;
}
/* .mini-launcher is only the small floating toggle BUTTON — the actual
   Atlas/Land Studio toolbar lives in a separate element
   (#mini-launcher-panel, html/base.html) that this rule used to miss
   entirely: hiding the button still left the panel itself free to
   auto-reopen (toolbar.js's own localStorage('miniLauncherOpen') restore)
   on any page carrying one of these two body classes. Both covered now. */
body.login-gate-page .mini-launcher,
body.login-gate-page .mini-launcher-panel {
  display: none !important;
}
body.hide-mini-launcher .mini-launcher,
body.hide-mini-launcher .mini-launcher-panel {
  display: none !important;
}
body.login-gate-page .auth-forms {
  padding-top: 56px;
  background: #ffffff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
}


body.landing-gate-page .auth-forms {
  background: #ffffff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
}
body.login-gate-page main,
body.landing-gate-page main {
  display: flex;
  align-items: center;
  justify-content: center;
}
body.login-gate-page .auth-forms,
body.landing-gate-page .auth-forms {
  margin: 0;
}
form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;}
form label {
    font-weight: bold;
    color: var(--darkcolor);
    margin-bottom: -10px; }
form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="date"] {
    padding: 12px;
    border: 1px solid var(--lightgrey);
    border-radius: 8px;
    font-size: 1rem;
    width: calc(100% - 24px); 
    box-sizing: border-box; 
    transition: border-color 0.2s ease-in-out;}
form input[type="text"]:focus,
form input[type="email"]:focus,
form input[type="password"]:focus,
form input[type="date"]:focus {
    border-color: var(--highlight);
    outline: none;}
form button:hover {
    background-color: var(--darkcolor);
    transform: translateY(-2px);}
form button:active {
    transform: translateY(0);}

/* Leaflet */
.leaflet-pane.leaflet-popup-pane .leaflet-popup-content-wrapper {
  background: rgba(var(--whiteRGB),var(--trans)) !important;
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid rgba(var(--whiteRGB),0.22);
  box-shadow: 0 8px 24px rgba(var(--blackRGB),0.12) !important;
  border-radius: 12px !important;
  z-index: 10;}
.leaflet-pane.leaflet-popup-pane .leaflet-popup-tip{
  background: rgba(var(--whiteRGB),var(--trans)) !important;
  border: 1px solid rgba(var(--whiteRGB),0.22);
}
.leaflet-popup-content .person-card{
  background: transparent;
  border: 0;
  box-shadow: none;}
.leaflet-popup-pane   { z-index: 2000 !important; } 

.leaflet-tooltip {
    line-height: 1.2;
    padding: 0;}

/* Polygon-name hover tooltip */
.leaflet-tooltip-label {
    background: var(--glass-button-bg) !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    backdrop-filter: blur(var(--blur)) !important;
    -webkit-backdrop-filter: blur(var(--blur)) !important;
    font-family: Montserrat, Jost, Arial, sans-serif;
    font-weight: 200;
    color: var(--control-glass-text) !important;
    pointer-events: none;}

.leaflet-tooltip-pane { z-index: 5000 !important; }
.leaflet-pane > svg path.leaflet-interactive,
.leaflet-pane > svg circle.leaflet-interactive {
  pointer-events: auto !important;
  cursor: pointer !important;
  z-index: 10;}
.leaflet-control-layers, .map-tile-panel {
  background: var(--glass-panel-bg) !important;
  backdrop-filter: blur(var(--glass-panel-blur)) !important;
  -webkit-backdrop-filter: blur(var(--glass-panel-blur)) !important;
  border: 1px solid var(--control-glass-border) !important;
  box-shadow: var(--control-glass-shadow), var(--map-element-shadow) !important;
  font-family: Montserrat, Jost, Arial, sans-serif;
  border-radius: 12px !important;
  z-index: 200001 !important;}
.leaflet-control-layers-base, .leaflet-control-layers-overlays, .map-tile-item {
  color: var(--control-glass-text);
  font-size: 0.625rem; }
.leaflet-control-layers-expanded {
  background: transparent;
  text-align: left;}
.leaflet-control-layers-expanded label {
  color: var(--control-glass-text);
  font-size: 0.625rem;}
.leaflet-control-layers-separator {
  border-top-color: var(--control-glass-separator) !important;
}
.leaflet-control-layers-toggle {
  background-color: var(--glass-panel-bg) !important;
  border-radius: 10px !important;
  box-shadow: var(--map-element-shadow) !important;
  background-image: none !important;
  position: relative;
}
.leaflet-control-layers-toggle::before {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  background-color: var(--control-glass-text);
  -webkit-mask-image: url('/static/icons/menu/Tiles.svg?v=1792024277');
  mask-image: url('/static/icons/menu/Tiles.svg?v=1792024277');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.leaflet-bar, .mapboxgl-ctrl-group {
  box-shadow: var(--control-glass-shadow) !important;
  border-radius: 12px !important;
}
.leaflet-bar a, .mapboxgl-ctrl-group button, .map-tile-ctrl-btn {
  background-color: var(--control-glass-bg) !important;
  backdrop-filter: blur(var(--blur)) !important;
  -webkit-backdrop-filter: blur(var(--blur)) !important;
  color: var(--control-glass-text) !important;
  border: 1px solid var(--control-glass-border) !important;
  border-bottom-color: var(--control-glass-separator) !important;
}
.leaflet-bar a:hover, .mapboxgl-ctrl-group button:hover, .map-tile-ctrl-btn:hover, .map-tile-item:hover {
  background-color: var(--control-glass-hover) !important;
}
.leaflet-bar a.leaflet-disabled {
  color: var(--control-glass-text-muted) !important;
}
.leaflet-control-scale-line {
  background: var(--glass-panel-bg) !important;
  backdrop-filter: blur(var(--glass-panel-blur)) !important;
  -webkit-backdrop-filter: blur(var(--glass-panel-blur)) !important;
  border-color: var(--control-glass-border) !important;
  color: var(--control-glass-text) !important;
  text-shadow: none !important;
  box-shadow: var(--map-element-shadow) !important;
}

/* Mobile */
@media (max-width: 768px) {
  .header {
        padding: 10px;
        font-size: 1.25rem;}
  .search-bar {
        font-size: 1rem;}
  .profile-container {
        padding: 10px;
        margin-top: 60px; }
  .auth-forms {
        padding: 20px;
        margin: 20px auto;
        border-radius: 10px; }
  form input[type="text"],
    form input[type="email"],
    form input[type="password"],
    form input[type="date"] {
        padding: 10px;
        font-size: 0.875rem;}
  form button {
        padding: 10px 20px;
        font-size: 1rem;}
  .auth-forms h2 {
        font-size: 1.8em;}
}


/* Desktop */
@media (min-width: 769px) {
  :root { --topbar-h: 56px; }
  .header {
        padding: 15px;
        font-size: 24px;
      flex-direction: row;
          justify-content: flex-start; }
  .header .search-bar {
          width: auto;
          max-width: none; }
  .search-bar {
        max-width: 400px; }
}


hr {
    border: none;
    border-top: 1px solid var(--lightcolor);
    margin: 40px 0;}

/* Point markers */
.leaflet-point-circle { pointer-events: all; }
path.leaflet-point-circle,
circle.leaflet-point-circle {
  transition: d var(--map-point-hover-anim) ease, fill var(--map-point-hover-anim) ease, stroke var(--map-point-hover-anim) ease, stroke-width var(--map-point-hover-anim) ease, opacity var(--map-point-hover-anim) ease;
}

/* ── Point overlay ───────────────────────────────────────────────────────── */
#point-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: none;
  /* Above #map-controls-container(.launcher-open)'s 200005 !important  */
  z-index: 200006 !important;
  background: transparent;
  pointer-events: none;}
#point-overlay.active { display: block; }
/* openInfoPanel(title, html, {priority: true}) only  */
#point-overlay.point-overlay-priority { z-index: 200030 !important; }

/* Request-for-Design panel  */
#point-overlay.request-design-modal {
  background:
    radial-gradient(circle at 50% 30%, rgba(0, 0, 0, 0.10) 0%, rgba(0, 0, 0, 0.18) 40%, rgba(0, 0, 0, 0.34) 100%);
  backdrop-filter: blur(var(--glass-panel-blur));
  -webkit-backdrop-filter: blur(var(--glass-panel-blur));
  pointer-events: auto;
}

#point-info-panel,
.layover-frame,
.auth-forms,
#dash-sheet,
.intro-sheet {
  border-radius: var(--glass-panel-radius);
  background: var(--glass-panel-bg);
  backdrop-filter: blur(var(--glass-panel-blur));
  -webkit-backdrop-filter: blur(var(--glass-panel-blur));
  box-shadow: var(--glass-panel-shadow), var(--glass-panel-edge), var(--map-element-shadow);
  font-family: Montserrat, Jost, Arial, sans-serif;
  border: var(--glass-panel-border);
}
/* Plan-family tint, Dock/tab view's own equivalent of .mb-group-plan's
   card tint above — Dock view has no separate card of its own (its
   content fills the whole sheet), so while the Dock's active item is a
   Plan (slideup.js's dock-plan-active, toggled from html/layers.html's
   own _getDockBadgeData) the tint moves to the sheet's own background
   instead: a thin flat rgba wash layered over the SAME var(--glass-
   panel-bg) this rule already sets above, at the same backdrop-filter
   blur (untouched) — not background-blend-mode:hue (an earlier version):
   hue-blend against var(--glass-panel-bg)'s own near-zero saturation is
   a no-op on color (see .mb-group-plan's own comment), and its opaque
   top layer silently made the whole sheet read as a different, more
   solid opacity than every other view. var(--highlight) is still the
   color — the same yellow this app already uses for "highlighted/
   active" everywhere else — just applied as a wash, not a hue swap. */
#dash-sheet.dock-plan-active {
  background-image: linear-gradient(color-mix(in srgb, var(--plan-color, var(--highlight)) calc(12% * var(--BACKGROUND_COLOR_FILTER)), transparent), color-mix(in srgb, var(--plan-color, var(--highlight)) calc(12% * var(--BACKGROUND_COLOR_FILTER)), transparent));
}

.layover-frame {
  border-bottom: 1px solid rgba(100, 100, 100, 0.5);
}

#point-info-panel {
  position: fixed;
  width: 500px;
  pointer-events: auto;
  overflow: hidden;
  border-bottom: none;
  /* default: centered in viewport */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Show bottom border only on desktop (wide screens) */
@media (min-width: 769px) {
  #point-info-panel {
    border-bottom: 1px solid rgba(100, 100, 100, 0.5);
  }
}

/* Sizing/position while maximized is computed live in JS (pointoverlay.js's
   applyMaxSize, keyed off the actual room free of #dash-sheet) — no fixed
   width/max-width here any more, that would just fight the inline styles
   it sets. */

.resize-grip {
  position: absolute;
  width: 18px; height: 18px;
  touch-action: none;
  z-index: 10005;
}
.resize-grip-br {
  bottom: 0; right: 0;
  cursor: se-resize;
  background: linear-gradient(135deg,
    transparent 40%,
    rgba(var(--blackRGB),0.15) 40%,
    rgba(var(--blackRGB),0.15) 55%,
    transparent 55%,
    transparent 65%,
    rgba(var(--blackRGB),0.15) 65%,
    rgba(var(--blackRGB),0.15) 80%,
    transparent 80%
  );
}

@media (max-width: 540px) {
  #point-info-panel { width: calc(100vw - 24px) !important; }
}


/* ── Panel bar (drag handle + buttons) ──────────────────────────────────── */
.panel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 6px 6px 12px;
  cursor: grab;
  user-select: none;
  touch-action: none;
  border-radius: var(--bigcorner) var(--bigcorner) 0 0;
  min-height: 40px;}

#panel-bar { position: relative; }

#point-info-name-title {
  --nav-safe-left: 92px;
  --nav-safe-right: 68px;
}

#point-info-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
  padding: 0 14px 10px;
}

#point-info-top-row .remote-breadcrumb {
  flex: 1 1 180px;
  width: auto;
  margin-top: 0;
}
#point-info-3d-mount {
  flex: 1 1 220px;
  min-width: 220px;
  height: 160px;
  border-radius: var(--smallcorner);
  overflow: hidden;
}
#point-info-3d-mount > div:first-child {
  border-radius: var(--smallcorner) !important;
  margin-bottom: 0 !important;
}
.panel-bar-label {
  font-size: 0.6875rem;
  color: rgba(var(--theme-fg), 0.9);
  opacity: 0.9;
  pointer-events: none;}
#mini-launcher-state-label {
  text-align: left;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 6rem;
  font-weight: 700;
  opacity: 0.55;
  text-transform: uppercase;
}
.panel-bar-label.label-highlight {
  color: var(--highlight-border-color-light) !important;}
body.tile-dark .panel-bar-label.label-highlight {
  color: var(--highlight-border-color-dark) !important;
}
.panel-bar-buttons {
  display: flex;
  gap: 0.1875rem;
  align-items: center;}

/* Atlas / Land Studio bars only — 20% taller (40px -> 48px) on desktop. */
@media (min-width: 769px) {
  #mini-launcher-panel-bar,
  #studio-toolbar-bar {
    min-height: 48px;
  }
}

/* ── Overlay toggle + close buttons ─────────────────────────────────────── */
#point-info-panel #point-toggle-size {
  z-index: 10002;
  position: relative;
  font-size: 0.9375rem; line-height: 1;}
#point-info-panel #point-toggle-size:hover { background: var(--glass-button-hover-bg); }

/* Move close button inside bar (no longer absolute) */
#point-info-panel #point-close {
  position: relative !important;
  top: auto !important; right: auto !important;}
/* Mask-image icon, swapped by the .maximized state below — before this
   fix, this button showed the same maximize glyph in both states. */
#point-info-panel #point-toggle-size::before {
  content: '';
  display: block;
  width: var(--icon-arrow-size);
  height: var(--icon-arrow-size);
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-image: url('/static/icons/menu/Maximize.svg?v=1792024277');
  mask-image: url('/static/icons/menu/Maximize.svg?v=1792024277');
  pointer-events: none;
}
#point-info-panel.maximized #point-toggle-size::before {
  -webkit-mask-image: url('/static/icons/menu/Restore.svg?v=1792024277');
  mask-image: url('/static/icons/menu/Restore.svg?v=1792024277');
}

/* map-profile-panel's own Maximize  */


/* Chart iframe */
#point-chart-frame {
  display: none;
  border: none;
  width: 100%;
  height: 380px;
  border-radius: 0 0 var(--bigcorner) var(--bigcorner);
}
#point-info-body {
  overflow-y: auto;
  padding: 10px 14px 12px;
  max-height: 340px;
  text-align: left;
}

#point-info-body:has(.segpick-gallery),
#point-info-body:has(#zonecreate-imagery-preview) {
  max-height: min(85vh, 760px);
}
#point-info-body .po-row {
  display: flex;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(var(--theme-fg), 0.06);
  font-size: 0.8125rem;
  align-items: baseline;
}
@media (prefers-color-scheme: dark) {
  #point-info-body .po-row { border-bottom-color: rgba(255,255,255,0.07); }
}

#point-info-body .po-key {
  font-size: var(--layer-box-kv-key-size);
  font-weight: var(--layer-box-kv-key-weight);
  color: inherit;
  min-width: 100px;
  flex-shrink: 0;
  text-transform: capitalize;
  text-align: left;
}
#point-info-body .po-val {
  font-size: var(--layer-box-kv-value-size);
  font-weight: var(--layer-box-kv-value-weight);
  color: rgba(var(--theme-fg), 0.65);
  word-break: break-word;
}
#point-info-body .po-val a {
  color: #2a7d4f;
  text-decoration: underline;
  font-weight: 600;
}
#point-info-body .po-val a:hover { opacity: 0.75; }
@media (prefers-color-scheme: dark) {
  #point-info-body .po-val a { color: #5abf8a; }
}


.bird-internal-link {
  cursor: pointer;
  font-size: 0.85rem;
  opacity: 0.7;
  margin-left: 3px;
  user-select: none;
}
.bird-internal-link:hover { opacity: 1; }

.bird-photo-wrap {
  width: 100%;
  margin-bottom: 10px;
  text-align: center;
  background: rgba(0,0,0,0.05);
  border-radius: 6px;
  padding: 6px;
  min-height: 40px;
}
.bird-photo {
  max-width: 70%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 6px;
  display: inline-block;
  border: 1px solid rgba(0,0,0,0.1);
}
.bird-photo-broken {
  min-width: 60px;
  min-height: 60px;
  background: rgba(0,0,0,0.08);
  border: 1px dashed rgba(0,0,0,0.3);
}
.bird-photo-url {
  font-size: 0.5625rem;
  opacity: 0.4;
  word-break: break-all;
  margin-top: 3px;
}

.point-category {
  margin: 0.4em 0;
  font-size: 1rem;}
.point-category strong {
  color: var(--darkergrey);
}
.point-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;}
.point-table td {
  padding: 0.3em 0.5em;
  vertical-align: top;}
.point-table td:first-child {
  color: var(--darkgrey);
  width: 45%;}
.point-table a {
  color: var(--darkergrey);
  text-decoration: none;}
.point-table a:hover {
  text-decoration: underline;}

/* ── Slide-up panel (Desktop: left, Mobile: bottom) ─────────────────────── */

#dash-sheet {
  position: fixed;
  z-index: 200010;

  /* Desktop default: slide from left, full map height */
  inset: calc(var(--topbar-h) + var(--map-gap) + var(--sheet-inset-top, 0px)) auto calc(var(--map-gap) + var(--sheet-inset-bottom, 0px)) -100vw;
  height: auto;
  max-height: none;
  --sheet-max: 100vw;
  width: calc(var(--sheet-max) / 4);
  max-width: var(--sheet-max);
  transition: left 0.25s ease, width 0.15s ease, box-shadow 0.08s ease-out;
  border-radius: 0 16px 16px 0;
  touch-action: none;
  overscroll-behavior: none;
}

#dash-sheet.open { left: 0; }

#dash-sheet:not(.sheet-right):not(.sheet-bottom) {
  box-shadow: var(--panel-glow), var(--map-element-shadow), 14px 0 32px -2px rgba(var(--status-warn-rgb), calc(var(--relocate-glow, 0) * 0.4)) !important;
}
#dash-sheet.sheet-right {
  box-shadow: var(--panel-glow), var(--map-element-shadow), -14px 0 32px -2px rgba(var(--status-warn-rgb), calc(var(--relocate-glow, 0) * 0.4)) !important;
}
#dash-sheet.sheet-bottom {
  box-shadow: var(--panel-glow), var(--map-element-shadow), 0 -14px 32px -2px rgba(var(--status-warn-rgb), calc(var(--relocate-glow, 0) * 0.4)) !important;
}

/* ── Small Buttons ───────────────────────────────────────────────────────── */

#dash-sheet #dash-close,
#dash-sheet #dash-minimize,
#dash-sheet #dash-maximize,
.intro-sheet #intro-close,
#point-info-panel #point-close,
#point-info-panel #point-toggle-size,
#map-profile-panel #map-profile-close,
#map-profile-panel #map-profile-toggle-size,
.btn-info,
.btn-toggle,
.btn-cancel-spinner {
  border: 0;
  background: var(--glass-button-bg);
  font-size: 1.25rem;
  line-height: 1;
  width: 1.615rem;
  height: 1.615rem;
  appearance: none;
  -webkit-appearance: none;
  /* Scaled by --font-scale like the button's own rem-based size. */
  border-radius: calc(var(--smallcorner) * var(--font-scale));
  cursor: pointer;
  backdrop-filter: blur(var(--glass-button-blur));
  -webkit-backdrop-filter: blur(var(--glass-button-blur));
  color: var(--control-glass-text);
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: auto;
  touch-action: manipulation;
}
#dash-sheet #dash-close,
#dash-sheet #dash-minimize,
#dash-sheet #dash-maximize,
.intro-sheet #intro-close,
#point-info-panel #point-close { z-index: 10002; position: absolute; }

#dash-sheet .dash-view-toggles {
  position: absolute;
  z-index: 10002;
  top: 0.5rem;
  right: 3rem;
  left: auto;
  display: none;
  gap: 0.1875rem;
}
body.segment-edit-active #dash-sheet .dash-view-toggles {
  display: flex;
}
#dash-sheet .dash-view-btn {
  width: 1.615rem;
  height: 1.615rem;
  opacity: 0.5;
}
#dash-sheet .dash-view-btn.active {
  opacity: 1;
  background: var(--glass-button-hover-bg);
}
@media (max-width: 768px) {
  body.segment-edit-active #dash-sheet .dash-view-toggles {
    display: none !important;
  }
}
#dash-sheet .dash-view-btn:disabled {
  cursor: default;
  opacity: 0.35;
}

#mini-launcher-panel-close,
#studio-toolbar-close,
.mini-launcher-group-title .mini-launcher-group-toggle {
  width: 1.02rem;
  height: 1.02rem;
}
#mini-launcher-panel-close,
#studio-toolbar-close,
.mini-launcher-group-title .mini-launcher-group-toggle {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#mini-launcher-panel-close:hover,
#studio-toolbar-close:hover,
.mini-launcher-group-title .mini-launcher-group-toggle:hover {
  background: var(--glass-button-hover-bg);
}
#mini-launcher-panel-close::before,
#studio-toolbar-close::before,
.mini-launcher-group-toggle::before {
  content: '';
  display: block;
  width: 0.66rem;
  height: 0.66rem;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
  pointer-events: none;
}
#mini-launcher-panel-close::before,
#studio-toolbar-close::before {
  -webkit-mask-image: url('/static/icons/menu/Close.svg?v=1792024277');
  mask-image: url('/static/icons/menu/Close.svg?v=1792024277');
}

.mini-launcher-group-toggle {
  flex-shrink: 0;
  vertical-align: middle;
}
.mini-launcher-group-toggle::before {
  -webkit-mask-image: url('/static/icons/menu/ArrowDown.svg?v=1792024277');
  mask-image: url('/static/icons/menu/ArrowDown.svg?v=1792024277');
}
.mini-launcher-group-toggle.collapsed::before {
  -webkit-mask-image: url('/static/icons/menu/ArrowRight.svg?v=1792024277');
  mask-image: url('/static/icons/menu/ArrowRight.svg?v=1792024277');
}
.mini-launcher-group-title ~ * {
  overflow: hidden;
  max-height: 2000px;
  opacity: 1;
  transition: max-height 0.18s ease, opacity 0.15s ease, margin 0.18s ease;
}
/* That overflow:hidden (needed so the collapse animation clips) also clipped
   a .plan-linked ring's 1.5px box-shadow flush at the sensing grid's own
   edge, since the ring sits outside its button. Give it 3px of padding to
   hold the ring, cancelled by an equal negative margin so its footprint and
   button positions don't move; zeroed while collapsed so a closed group
   still shrinks to nothing. */
.mini-launcher-data-group {
  padding: 3px;
  margin: -3px;
}
.mini-launcher-group-title.collapsed ~ .mini-launcher-data-group {
  padding: 0 !important;
  margin: 0 !important;
}
.mini-launcher-group-title.collapsed ~ * {
  max-height: 0 !important;
  opacity: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  pointer-events: none !important;
}
/* config.py's TOOLBAR_ANIMATIONS  */
body.toolbar-no-anim .mini-launcher-group-title ~ * {
  transition: none !important;
}
/* Zone/File/Plan's block IS the grid/flex container  */
.mini-launcher-block.group-collapsed {
  gap: 0 !important;
}

.btn-info, .btn-toggle { position: static; z-index: auto; flex-shrink: 0; }
.btn-toggle:disabled { opacity: 0.35; cursor: default; }
.btn-toggle:disabled:hover { background: var(--glass-button-bg); }
#blur-toggle:disabled,
#blur-toggle:disabled svg {
  color: var(--control-glass-text);
  filter: none;
}
#blur-toggle:disabled { background: var(--glass-button-bg); }
.btn-toggle.is-empty:not(:disabled) { opacity: 0.35; }
.btn-toggle.is-empty:not(:disabled):hover { background: var(--glass-button-bg); }
.btn-info {
  border-radius: 50%;
  font-size: 0.8125rem;
  font-weight: 300;
  width: 1.38rem;
  height: 1.38rem;
  padding: 0;
  box-sizing: border-box;
}
.btn-info.mb-group-info-btn { position: relative; }
/* Maximize/restore + close — reuse .btn-info's own round shape, mask-icon
   pattern borrowed from #dash-sheet's own minimize/maximize buttons. */
.mb-group-max-btn::before,
.mb-group-close-btn::before {
  content: '';
  display: block;
  width: 0.72rem;
  height: 0.72rem;
  margin: 0 auto;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
  pointer-events: none;
}
.mb-group-max-btn::before   { -webkit-mask-image: url('/static/icons/menu/Maximize.svg?v=1792024277'); mask-image: url('/static/icons/menu/Maximize.svg?v=1792024277'); }
.mb-group[data-card-full] > .mb-group-header .mb-group-max-btn::before { -webkit-mask-image: url('/static/icons/menu/Restore.svg?v=1792024277'); mask-image: url('/static/icons/menu/Restore.svg?v=1792024277'); }
.mb-group-close-btn::before { -webkit-mask-image: url('/static/icons/menu/Close.svg?v=1792024277');    mask-image: url('/static/icons/menu/Close.svg?v=1792024277'); }

/* ── Per-source eye toggle (dropdown option rows) ────────────────────────── */
.source-eye-btn {
  display: inline-block;
  flex-shrink: 0;
  width: 0.9rem;
  height: 0.9rem;
  margin-right: 8px;
  cursor: pointer;
  opacity: 0.4;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-image: url('/static/icons/menu/EyeNo.svg?v=1792024277');
  mask-image: url('/static/icons/menu/EyeNo.svg?v=1792024277');
  transition: opacity 0.12s;
}
.source-eye-btn:hover { opacity: 0.75; }
.source-eye-btn.eye-on {
  opacity: 1;
  /* NOT --midcolor (a flat green, unrelated to this layer/plan at all —
     every other "shown on the map" indicator in a card, .layer-icon-btn.
     icon-active, uses the layer's own default yellow or, inside a plan's
     card, that plan's own --plan-color). --plan-color is normally set
     inline on the plan's own card element, which this dropdown's LIST
     portals OUT of (document.body.appendChild, dropdown-shared.js's
     _openList) the moment it opens — so that same var() fallback chain
     only actually reaches the real plan color because _openList copies
     --plan-color onto the list itself first, right before portaling. */
  -webkit-mask-image: url('/static/icons/menu/Eye.svg?v=1792024277');
  mask-image: url('/static/icons/menu/Eye.svg?v=1792024277');
}
body.tile-dark .source-eye-btn.eye-on { color: var(--plan-color, var(--status-warn)); }
body:not(.tile-dark) .source-eye-btn.eye-on { color: var(--plan-color, var(--highlight)); }
.source-eye-btn.eye-loading { opacity: 0.6; animation: sourceEyePulse 0.9s ease-in-out infinite; }
@keyframes sourceEyePulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.8; } }

/* Per-source delete (dropdown option rows) — same mask-image treatment,
   size and neutral currentColor as .source-eye-btn/.info-icon right next
   to it (same side of the row, not red — this is one icon among its
   siblings, not a standalone destructive action yet; the actual "this
   can't be undone" moment is the red Yes in the confirm row it opens). */
.source-delete-btn {
  display: inline-block;
  position: relative;
  flex-shrink: 0;
  width: 0.85rem;
  height: 0.85rem;
  margin-right: 6px;
  cursor: pointer;
  opacity: 0.4;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-image: url('/static/icons/menu/Button_Delete.svg?v=1792024277');
  mask-image: url('/static/icons/menu/Button_Delete.svg?v=1792024277');
  transition: opacity 0.12s;
}
.source-delete-btn:hover { opacity: 0.75; }
/* No cache for this source yet — nothing to delete. Same icon (so the
   row's layout/alignment never shifts between sources), struck through
   and inert rather than removed outright, so it's legible at a glance
   which sources in a multi-source list are even eligible. */
.source-delete-btn.no-cache {
  opacity: 0.25;
  cursor: not-allowed;
  /* NOT pointer-events:none — that blocks :hover from ever registering
     at all (confirmed: this is why hover looked broken here but not on
     the eye icon right next to it), not just clicks. The click itself
     is already independently guarded in JS
     (_confirmDeleteLayerSource's own no-cache check), so this can stay
     hoverable while still doing nothing when clicked. */
}
.source-delete-btn.no-cache:hover { opacity: 0.4; }
.source-delete-btn.no-cache::after {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  top: 50%;
  height: 1px;
  background: currentColor;
  transform: rotate(-45deg);
}

/* Ensure buttons are always on top when maximized */
#dash-sheet.max #dash-close,
#dash-sheet.max #dash-minimize {
  z-index: 10003;
}

/* Close button always has highest z-index */
#dash-sheet #dash-close {
  z-index: 10004 !important;
}

#dash-sheet #dash-close        { top: 0.5rem;    right: 0.5rem; left: auto; }
#dash-sheet #dash-minimize     { top: 2.3025rem; right: 0.5rem; left: auto; }
#dash-sheet #dash-maximize     { top: 4.105rem;  right: 0.5rem; left: auto; }
#dash-sheet #hansen-toggle-btn { top: 5.9075rem; right: 0.5rem; left: auto; }
.intro-sheet #intro-close,
#point-info-panel #point-close {
  top: max(0.5rem, env(safe-area-inset-top));
  right: max(0.5rem, env(safe-area-inset-right));
}


#dash-sheet #dash-close:hover,
#dash-sheet #dash-minimize:hover,
#dash-sheet #dash-maximize:hover,
.intro-sheet #intro-close:hover,
#point-info-panel #point-close:hover,
#map-profile-panel #map-profile-close:hover,
#map-profile-panel #map-profile-toggle-size:hover,
.btn-info:hover,
.btn-toggle:hover,
.btn-cancel-spinner:hover { background: var(--glass-button-hover-bg); }

#dash-sheet #dash-close:active::before,
#dash-sheet #dash-minimize:active::before,
#dash-sheet #dash-maximize:active::before {
  color: var(--lowlight);
}

/* ── Grip (drag handle) ──────────────────────────────────────────────────── */

#dash-sheet .sheet-grip {
  position: absolute;
  top: 104px; /* stops right where the close/minimize/maximize stack ends — never runs behind it */
  bottom: 8px;
  right: 4px; /* pulled in from the true edge, not flush against it */
  left: auto;
  width: 28px;
  display: flex;
  justify-content: center; /* the grab zone stays symmetric around the line */
  align-items: stretch;
  cursor: ew-resize;
  z-index: 10001;
  touch-action: none;
  background: transparent;
}

#dash-sheet .sheet-grip-handle {
  width: 9px;
  height: 100%;
  border-radius: 999px;
  background: rgba(var(--blackRGB),0.08);
  filter: blur(0.7px);
  opacity: 0;
  transition: opacity 0.2s ease;
}
#dash-sheet .sheet-grip.handle-visible .sheet-grip-handle,
#dash-sheet .sheet-grip.dragging .sheet-grip-handle {
  opacity: 1;
}

/* ── Panel content ───────────────────────────────────────────────────────── */

#dash-sheet #dash-frame {
  position: absolute;
  inset: 96px 0 0 0;
  width: 100%;
  height: calc(100% - 96px);
  border: 0;
  background: transparent !important;
  border-top-left-radius: 0;
  border-top-right-radius: 16px;
  overflow: hidden;
}
#dash-sheet.dock-view-active #dash-frame {
  inset: calc(48px + var(--frame-row-h, 0px)) 0 0 0;
  height: calc(100% - 48px - var(--frame-row-h, 0px));
}

#dash-frame,
iframe#dash-frame {
  background: transparent !important;
}


/* Mobile: full width, account for grip on top */
/* Desktop: minimized state */
#dash-sheet.min {
  width: 50px !important;
}

#dash-sheet.min #dash-frame { display: none; }
#dash-sheet.min .sheet-grip {
  height: 120px;
  width: 11px;
}

/* Hide minimize button when minimized */
#dash-sheet.min #dash-minimize { display: none; }
/* Move maximize button up when minimized (desktop) */
#dash-sheet.min #dash-maximize { top: 48px; }
/* Hide maximize button when maximized */
#dash-sheet.max #dash-maximize { display: none; }

/* ── Nav bar (drag-to-reposition handle) ─────────────────────────────────── */
.sheet-nav-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 48px;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  user-select: none;
  touch-action: none;
  pointer-events: auto;
  transition: transform 0.1s ease;
}
.sheet-nav-bar img {
  -webkit-user-drag: none;
  user-drag: none;
}
/* ── Side bar (desktop left/right panels — drag to reposition) ────────────── */
#dash-sheet .sheet-side-bar {
  display: none;
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: 48px;
  cursor: grab;
  z-index: 9999;
  touch-action: none;
  user-select: none;
  transition: transform 0.1s ease;
}
#dash-sheet .sheet-side-bar:active { cursor: grabbing; }

#dash-sheet:not(.sheet-bottom) .sheet-side-bar {
  display: block;
}

/* ── Edge-inset handles (slideup.js's _wireEdgeHandle) — see context/Tech/design.md ── */
#dash-sheet .sheet-edge-handle {
  display: none;
  position: absolute;
  top: 0; bottom: 0;
  width: 28px;
  justify-content: center;
  align-items: stretch;
  cursor: ew-resize;
  z-index: 10002;
  touch-action: none;
  background: transparent;
}
/* Scoped to -left/-right specifically, not the whole .sheet-edge-handle
   family — an unqualified `.sheet-bottom .sheet-edge-handle{display:flex}`
   here used to re-enable the SIDE-dock top/bottom pair too (they're
   `display:none` by default and this was the only rule un-hiding
   anything), leaving a phantom full-height .sheet-edge-handle-bottom
   stacked on top of the real -left handle in this exact corner —
   confirmed live: elementFromPoint at the -left handle's own screen
   position returned .sheet-edge-handle-bottom instead, silently eating
   every drag. */
#dash-sheet.sheet-bottom .sheet-edge-handle-left,
#dash-sheet.sheet-bottom .sheet-edge-handle-right {
  display: flex;
  /* Below the nav-bar's own 48px row (logo left, close/minimize/maximize
     right — both live only in that top strip for bottom-dock, unlike
     side-dock's own vertically-stacked stack), all the way to the true
     bottom edge — full length, stopping only where the nav-bar's own
     controls are, same idea as the top-handle's left/right insets below. */
  top: 48px;
}
#dash-sheet.sheet-bottom .sheet-edge-handle-left  { left: 0; }
#dash-sheet.sheet-bottom .sheet-edge-handle-right { right: 0; }
#dash-sheet.sheet-bottom .sheet-edge-handle-top,
#dash-sheet.sheet-bottom .sheet-edge-handle-bottom {
  display: none;
}
/* Minimized/maximized: width is forced (100% / full), insets don't apply
   visually either way — the handles would just be dead weight, hide them. */
#dash-sheet.sheet-bottom.min .sheet-edge-handle,
#dash-sheet.sheet-bottom.max .sheet-edge-handle {
  display: none;
}

/* Side-docked (left or right — anything not .sheet-bottom): the top/bottom
   pair instead, spanning the panel's own width, at its top/bottom edges.
   --nav-safe-left/--nav-safe-right (slideup.js, measured live off the
   actual logo/title width per dock side) are the exact same variables
   the bottom-dock grip already reuses for this — the top handle sits
   right where the logo and close/minimize/maximize stack both start, so
   it insets around them the same way; the bottom handle has nothing to
   dodge down there, full width. */
#dash-sheet:not(.sheet-bottom) .sheet-edge-handle-top,
#dash-sheet:not(.sheet-bottom) .sheet-edge-handle-bottom {
  display: flex;
  top: auto; bottom: auto; left: 0; right: 0;
  width: auto; height: 28px;
  justify-content: stretch;
  align-items: center;
  cursor: ns-resize;
}
#dash-sheet:not(.sheet-bottom) .sheet-edge-handle-top {
  top: 0;
  left: var(--nav-safe-left, 56px);
  right: var(--nav-safe-right, 44px);
}
#dash-sheet:not(.sheet-bottom) .sheet-edge-handle-bottom { bottom: 0; }
#dash-sheet.min .sheet-edge-handle-top,
#dash-sheet.min .sheet-edge-handle-bottom,
#dash-sheet.max .sheet-edge-handle-top,
#dash-sheet.max .sheet-edge-handle-bottom {
  display: none;
}
/* The inner pill — reuses .sheet-grip-handle's own base rule (9px/100%
   vertical) as-is for the left/right pair; top/bottom need the same
   90°-rotated shape .sheet-bottom .sheet-grip-handle already uses for
   the main grip when IT'S horizontal, keyed here off the handle's own
   orientation instead of dock side. Visibility (opacity 0 -> 1 on hover/
   drag) is .sheet-grip-handle's own base rule too — only the trigger
   selector differs (.sheet-edge-handle instead of .sheet-grip). */
#dash-sheet .sheet-edge-handle-top .sheet-grip-handle,
#dash-sheet .sheet-edge-handle-bottom .sheet-grip-handle {
  width: 100%;
  height: 8px;
}
#dash-sheet .sheet-edge-handle.handle-visible .sheet-grip-handle,
#dash-sheet .sheet-edge-handle.dragging .sheet-grip-handle {
  opacity: 1;
}
#dash-sheet.sheet-right .sheet-side-bar {
  right: auto;
  left: 0;
}


/* ── Right-aligned panel ── */
#dash-sheet.sheet-right {
    inset: calc(var(--topbar-h) + var(--map-gap) + var(--sheet-inset-top, 0px)) -100vw calc(var(--map-gap) + var(--sheet-inset-bottom, 0px)) auto;
    border-radius: 16px 0 0 16px;
    box-shadow: -8px 0 24px rgba(var(--blackRGB),0.15);
    transition: right 0.25s ease, width 0.15s ease;
  }
  #dash-sheet.sheet-right.open { right: 0; left: auto; }
  /* Grip on left edge — same full-length long handle as the left-docked
     default (top:104px clears the close/minimize/maximize stack, which
     for .sheet-right lives at this same left edge — see #dash-sheet.
     sheet-right #dash-close etc below — bottom:8px matches the default
     rule too), just mirrored to the panel's own left/inner edge instead
     of its right one. The old `inset: 50% auto auto 8px` never set a
     height at all, collapsing the grip to a sliver instead of a long
     draggable handle. */
  #dash-sheet.sheet-right .sheet-grip {
    top: 104px;
    bottom: 8px;
    left: 8px;
    right: auto;
    cursor: ew-resize;
  }
  #dash-sheet.sheet-right #dash-frame {
    inset: 48px 0 0 36px;
    width: calc(100% - 36px);
    height: calc(100% - 48px);
    border-top-left-radius: 16px;
    border-top-right-radius: 0;
  }
  #dash-sheet.sheet-right #dash-close        { left: 0.5rem;    right: auto; top: 0.5rem; }
  #dash-sheet.sheet-right #dash-minimize     { left: 0.5rem;    right: auto; top: 2.3025rem; }
  #dash-sheet.sheet-right #dash-maximize     { left: 0.5rem;    right: auto; top: 4.105rem; }
  #dash-sheet.sheet-right #hansen-toggle-btn { left: 0.5rem;    right: auto; top: 5.9075rem; }
  /* Card/Dock view toggles: default rule (top:0.5rem; right:3rem) sits
     just left of #dash-close's default right:0.5rem — same gap mirrored
     here now that close/minimize/maximize moved to the panel's left/inner
     edge instead, so the toggles stay next to that stack instead of
     stranded out at the panel's own right/outer edge. */
  #dash-sheet.sheet-right .dash-view-toggles { left: 3rem; right: auto; }
  #dash-sheet.sheet-right.min #dash-maximize { left: 0.5rem;    right: auto; top: 48px; }
  /* Arrows: flipped for right panel */
  #dash-sheet.sheet-right #dash-minimize::before     { -webkit-mask-image: url('/static/icons/menu/ArrowRight.svg?v=1792024277'); mask-image: url('/static/icons/menu/ArrowRight.svg?v=1792024277'); }
  #dash-sheet.sheet-right.min #dash-minimize::before { -webkit-mask-image: url('/static/icons/menu/ArrowLeft.svg?v=1792024277');  mask-image: url('/static/icons/menu/ArrowLeft.svg?v=1792024277'); }
  #dash-sheet.sheet-right #dash-maximize::before     { -webkit-mask-image: url('/static/icons/menu/ArrowLeft.svg?v=1792024277');  mask-image: url('/static/icons/menu/ArrowLeft.svg?v=1792024277'); }


/* ── Bottom panel (drag-down mode) ── */
  #dash-sheet.sheet-bottom {
    inset: auto calc(var(--map-gap) + var(--sheet-inset-right, 0px)) -100vh calc(var(--map-gap) + var(--sheet-inset-left, 0px));
    height: calc((100vh - var(--topbar-h) - var(--map-gap)) / 2);
    max-height: calc(100vh - var(--topbar-h) - var(--map-gap));
    --sheet-max: calc(100vh - var(--topbar-h) - var(--map-gap));
    width: auto !important;
    max-width: none;
    transition: bottom 0.25s ease, height 0.15s ease;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 24px rgba(var(--blackRGB),0.15);
  }
  #dash-sheet.sheet-bottom.open { bottom: 0; }
  #dash-sheet.sheet-bottom .sheet-grip {
    top: 8px; bottom: auto;
    left: var(--nav-safe-left, 56px);
    right: var(--nav-safe-right, 44px);
    width: auto; height: 28px;
    transform: none;
    cursor: ns-resize;
  }
  /* Scoped to .sheet-grip specifically, not every .sheet-grip-handle
     under .sheet-bottom — that unscoped version also caught the edge
     handles' own inner pills (.sheet-edge-handle-left/-right, which
     stay ew-resize/horizontal-drag even in bottom-dock mode) and
     flattened them to this same horizontal shape, backwards from what
     their own drag axis actually is: a horizontal-drag handle should
     show a VERTICAL pill (matching .sheet-grip's own left-dock shape),
     not a horizontal one copied from the vertical-drag main grip. */
  #dash-sheet.sheet-bottom .sheet-grip .sheet-grip-handle { width: 100%; height: 8px; }
  #dash-sheet.sheet-bottom #dash-close        { right: 0.5rem;    top: 0.5rem; left: auto; }
  #dash-sheet.sheet-bottom #dash-minimize     { right: 2.3025rem; top: 0.5rem; left: auto; }
  #dash-sheet.sheet-bottom #dash-maximize     { right: 4.105rem;  top: 0.5rem; left: auto; }
  #dash-sheet.sheet-bottom #hansen-toggle-btn { right: 5.9075rem; top: 0.5rem; left: auto; }
  #dash-sheet.sheet-bottom .dash-view-toggles { right: 6.25rem; }
  #dash-sheet.sheet-bottom #dash-frame {
    inset: 48px 0 0 0;
    width: 100%;
    height: calc(100% - 48px);
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
  }
  /* Arrows like mobile */
  #dash-sheet.sheet-bottom #dash-minimize::before     { -webkit-mask-image: url('/static/icons/menu/ArrowDown.svg?v=1792024277'); mask-image: url('/static/icons/menu/ArrowDown.svg?v=1792024277'); }
  #dash-sheet.sheet-bottom.min #dash-minimize::before { -webkit-mask-image: url('/static/icons/menu/ArrowUp.svg?v=1792024277');   mask-image: url('/static/icons/menu/ArrowUp.svg?v=1792024277'); }
  #dash-sheet.sheet-bottom #dash-maximize::before     { -webkit-mask-image: url('/static/icons/menu/ArrowUp.svg?v=1792024277');   mask-image: url('/static/icons/menu/ArrowUp.svg?v=1792024277'); }
  /* Minimized bottom */
  #dash-sheet.sheet-bottom.min {
    height: 50px !important;
    width: 100% !important;
  }
  #dash-sheet.sheet-bottom.min #dash-maximize { right: 2.3025rem; top: 0.5rem; left: auto; }

@media (max-width: 768px) {
  #dash-sheet.sheet-bottom {
    inset: auto var(--sheet-inset-right, 0px) -70vh var(--sheet-inset-left, 0px);
    height: calc((100vh - var(--topbar-h) - var(--map-gap)) / 2);
    max-height: calc(100vh - var(--topbar-h) - var(--map-gap));
    --sheet-max: calc(100vh - var(--topbar-h) - var(--map-gap));
    width: auto;
    max-width: none;
    left: var(--sheet-inset-left, 0px);
    transition: bottom 0.25s ease, height 0.15s ease;
    border-radius: 16px 16px 0 0;
  }
  #dash-sheet.sheet-bottom.open { left: var(--sheet-inset-left, 0px); bottom: 0; }
  #dash-sheet:not(.sheet-bottom) {
    inset: calc(var(--topbar-h) + var(--map-gap) + var(--sheet-inset-top, 0px)) auto calc(var(--map-gap) + var(--sheet-inset-bottom, 0px)) auto;
    height: auto;
    max-height: none;
    --sheet-max: 88vw;
    width: var(--sheet-max);
    max-width: var(--sheet-max);
    border-radius: 16px;
  }
  #dash-sheet:not(.sheet-right):not(.sheet-bottom) {
    left: -100vw;
    right: auto;
  }
  #dash-sheet:not(.sheet-right):not(.sheet-bottom).open { left: 0; }
  #dash-sheet.sheet-right {
    left: auto;
    right: -100vw;
  }
  #dash-sheet.sheet-right.open { right: 0; left: auto; }
}


/* ── Map controls: move away from the panel ─────────────────────────────── */

body:not(.sheet-open-right) .leaflet-top.leaflet-left,
body:not(.sheet-open-right) .leaflet-bottom.leaflet-left,
body:not(.sheet-open-right) .mapboxgl-ctrl-top-left {
  left: auto;
  right: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
body:not(.sheet-open-right) .map-tile-panel {
  left: auto;
  right: 2.25rem;
}
/* Sheet on right → push left controls back to their native top-left */
body.sheet-open-right .leaflet-top.leaflet-left,
body.sheet-open-right .leaflet-bottom.leaflet-left,
body.sheet-open-right .mapboxgl-ctrl-top-left {
  left: 0;
  right: auto;
  /* Without this, the column inherits the default flex align-items:
     stretch (set on .leaflet-top/.leaflet-bottom above, no override here
     until now) — every control box stretches to the stack's own width
     (set by whichever sibling is widest) instead of hugging its own
     content, leaving a wide empty strip to the right of the +/-/layers
     icons. The mirrored .leaflet-top.leaflet-right rule below already
     sets flex-start for the same reason when the stack is on the right. */
  align-items: flex-start;
}
body.sheet-open-right .map-tile-panel {
  left: 2.25rem;
  right: auto;
}
/* Sheet on right → push right controls to top-left */
body.sheet-open-right .leaflet-top.leaflet-right,
body.sheet-open-right .leaflet-bottom.leaflet-right {
  right: auto;
  left: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
body:not(.sheet-open-right) .leaflet-top.leaflet-left .leaflet-control,
body:not(.sheet-open-right) .leaflet-bottom.leaflet-left .leaflet-control,
body:not(.sheet-open-right) .mapboxgl-ctrl-top-left .mapboxgl-ctrl {
  margin-left: auto;
  margin-right: 0;
}


/* #intro-frame-close-btn */
#intro-frame-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
}
#intro-frame-close-btn::before {
  content: '';
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-image: url('/static/icons/menu/Close.svg?v=1792024277');
  mask-image: url('/static/icons/menu/Close.svg?v=1792024277');
  pointer-events: none;
}

/* Close icon (×)  */
#dash-sheet #dash-close::before,
#point-info-panel #point-close::before,
#map-profile-panel #map-profile-close::before,
.intro-sheet #intro-close::before,
#view-settings-close::before {
  content: '';
  display: block;
  width: var(--icon-arrow-size);
  height: var(--icon-arrow-size);
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-image: url('/static/icons/menu/Close.svg?v=1792024277');
  mask-image: url('/static/icons/menu/Close.svg?v=1792024277');
  pointer-events: none;
}

#dash-sheet .dash-view-btn::before {
  content: '';
  display: block;
  width: var(--icon-arrow-size);
  height: var(--icon-arrow-size);
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
  pointer-events: none;
}
#dash-sheet .dash-view-btn[data-mode="card"]::before { -webkit-mask-image: url('/static/icons/menu/Button_Gallery.svg?v=1792024277'); mask-image: url('/static/icons/menu/Button_Gallery.svg?v=1792024277'); }
#dash-sheet .dash-view-btn[data-mode="tab"]::before   { -webkit-mask-image: url('/static/icons/menu/Button_Dock.svg?v=1792024277');    mask-image: url('/static/icons/menu/Button_Dock.svg?v=1792024277'); }

/* Minimize/maximize arrows  */
#dash-sheet #dash-minimize::before,
#dash-sheet #dash-maximize::before {
  content: '';
  display: block;
  width: var(--icon-arrow-size);
  height: var(--icon-arrow-size);
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
  pointer-events: none;
}

/* Desktop: horizontal arrows for minimize and maximize */
#dash-sheet #dash-minimize::before {
  -webkit-mask-image: url('/static/icons/menu/ArrowLeft.svg?v=1792024277');
  mask-image: url('/static/icons/menu/ArrowLeft.svg?v=1792024277');
}

#dash-sheet.min #dash-minimize::before {
  -webkit-mask-image: url('/static/icons/menu/ArrowRight.svg?v=1792024277');
  mask-image: url('/static/icons/menu/ArrowRight.svg?v=1792024277');
}

#dash-sheet #dash-maximize::before {
  -webkit-mask-image: url('/static/icons/menu/ArrowRight.svg?v=1792024277');
  mask-image: url('/static/icons/menu/ArrowRight.svg?v=1792024277');
}

/* Mobile: vertical arrows for minimize and maximize */
#dash-sheet #hansen-toggle-btn::before {
  content: '◉';
  font-size: 0.9375rem;
  font-weight: 300;
  line-height: 1;
  pointer-events: none;
}
#dash-sheet #hansen-toggle-btn.overlay-hidden::before {
  content: '◎';
}

/* ── Intro sheet ─────────────────────────────────────────────────────────── */

.intro-sheet {
  position: fixed;
  bottom: -100%;
  left: 50%;
  transform: translateX(-50%);
  width: min(90vw, 800px);
  height: min(50vh, 400px);
  max-height: 90vh;
  z-index: 300000;
  overflow: hidden;
  box-shadow: var(--map-element-shadow);}
.intro-sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent !important;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;}
.intro-nav-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: transparent;
  z-index: 10001;
  cursor: grab;
  user-select: none;
}
.intro-nav-logo {
  height: 2.25rem;
  width: auto;
  margin-left: 16px;
  margin-top: 0;
  opacity: 0.92;
  pointer-events: none;
}
@media (max-width: 768px) {
  .intro-nav-logo {
    height: 1.75rem;
    margin-left: 8px;
  }
}


iframe.intro-frame {
  position: absolute;
  inset: 36px 0 0 0;
  border: 0;
  background: transparent !important;
  border-radius: 0 0 var(--bigcorner) var(--bigcorner);
  z-index: 0;}

.intro-sheet.open {
  bottom: max(24px, calc(env(safe-area-inset-bottom) + 8px));}

@media (max-width: 768px) {
  .intro-sheet {
    width: min(97vw, 800px);
    /* Same placeholder-before-measured reasoning as the base rule above —
       max-height stays the real ceiling for long content. */
    height: min(50vh, 400px);
    max-height: min(90dvh, calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px));
  }
}


.intro-sheet #intro-close {
  z-index: 300002;
}

.intro-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent !important;
  border-radius: inherit;}

html.intro-embed { background: transparent !important; }
body.intro-embed {
  background: transparent !important;
  color: var(--control-glass-text);
}
body.intro-embed .intro-md,
body.intro-embed .intro-md :is(h1, h2, h3, h4, h5, h6, p, li, span, strong, em, a) {
  color: inherit;
  font-size: 0.88em;
}
body.intro-embed .intro-md h1 {
  font-size: 1.3rem;
}
body.intro-embed .intro-md :is(h1, h2, h3, h4, h5, h6) {
  text-align: left;
}
body.intro-embed main { background: transparent !important; }
/* intro-embed.tile-dark color handled by --control-glass-text token flip in body.tile-dark */

body.tile-dark .leaflet-container {
  background: #000;
}

/* ── Zoning draw-tool cursor feedback (segment-mode.js's _setDrawCursor) ──
   Three states for whichever draw-type tool is currently armed: a plain
   crosshair the moment the tool is selected, a distinct "ready to place a
   point" cursor the instant the pointer is actually over somewhere
   drawable (inside the parcel boundary — a shape drawn outside it gets
   clipped away anyway, see _clipToParcelBoundary), and 'grabbing' for the
   span of an actual drag gesture (placing a straight edge, dragging a
   vertex/handle). Touch has no hover state to drive the "ready" swap at
   all — .zoning-touch-flash below is its substitute: a brief ring at the
   actual touch point instead of a cursor change. */
.leaflet-container.zoning-cursor-armed { cursor: crosshair; }
.leaflet-container.zoning-cursor-ready { cursor: cell; }
.leaflet-container.zoning-cursor-dragging,
.leaflet-container.zoning-cursor-dragging * { cursor: grabbing !important; }

.zoning-touch-flash {
  position: absolute;
  width: 28px;
  height: 28px;
  margin-left: -14px;
  margin-top: -14px;
  border-radius: 50%;
  border: 2px solid var(--status-warn);
  pointer-events: none;
  z-index: 1000;
  animation: zoning-touch-flash-anim 0.45s ease-out forwards;
}
.zoning-touch-flash.is-invalid { border-color: var(--red); }
@keyframes zoning-touch-flash-anim {
  0%   { transform: scale(0.4); opacity: 0.9; }
  100% { transform: scale(1.6); opacity: 0; }
}

html.dash-embed { background: transparent !important; }
body.dash-embed { background: transparent !important; color: rgb(var(--theme-fg)); }
html.dash-embed, body.dash-embed { touch-action: pan-y; overscroll-behavior: none; }

/* Embedded panel content boxes — content-sized */
body.dash-embed .header       { display: none !important; }
body.dash-embed .card         { background: transparent !important; display: inline-block; width: auto; min-width: 200px; max-width: 520px; }
body.dash-embed .main-content { padding: 20px; }
body.dash-embed .data-container { background: transparent !important; }

/* ── Cadastre / parcel report panels ─────────────────────────────────────── */

.data-container {
  background: #EEEEEE;
  padding: 20px;
  border-radius: 15px;
  display: inline-block;
  max-width: 560px;
  min-width: 240px;
  text-align: left;
  margin: 20px auto;}

.data-container .data-table {
  width: auto;}

.data-rows { margin-top: 0.75rem; }
.data-row {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--pill-sub); }
.data-row b { font-weight: 500; }
.data-row a { color: var(--darkcolor); text-decoration: none; }
.data-row a:hover { text-decoration: underline; }
.data-row.description { margin-top: 0.75rem; color: var(--darkgrey); font-style: italic; }

.description-box {
  background-color: transparent;
  border: 1px solid rgba(var(--blackRGB), 0.1);
  border-radius: var(--smallcorner);
  padding: 1.5rem;
  margin-bottom: 1.5rem;}

.description-box strong {
  color: var(--darkcolor);}

/* ── Remote sensing panel (remote.html) ─────────────────────────────────── */

body.dash-embed { padding: 28px 24px; align-items: flex-start; justify-content: flex-start; }

/* 3D terrain mount — full-bleed hero above breadcrumbs */
#terrain-3d-mount {
  margin: -28px -24px 20px;
  width: calc(100% + 48px);
}
/* strip the internal wrap's border-radius so it bleeds to the panel edge */
#terrain-3d-mount > div:first-child {
  border-radius: 0 !important;
  margin-bottom: 0 !important;
}

.remote-header {
  margin-bottom: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

.remote-header-logo-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}


.remote-header-logo {
  position: absolute;
  top: 0;
  left: 0;
  width: 64px;
  height: auto;
  opacity: 0.85;
  pointer-events: none;
  z-index: 10;
}

@media (max-width: 768px) {
  .remote-header-logo {
    width: 48px;
    top: 0;
    left: 0;
  }
}


.remote-header h2 {
  margin: 0 0 4px;
  font-size: 1.3rem;
  color: var(--theme-highlight);
  text-align: left;
  width: 100%;
}
.remote-header .level-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(var(--theme-fg), 0.6);
  font-weight: 400;
  text-align: left;
  width: 100%;
}
.remote-breadcrumb {
  margin-top: 6px;
  width: 100%;
}

/* Collapsible breadcrumb — shares the MapBiomas details/summary pattern */
.crumb-details {
  list-style: none;
}
.crumb-details + .crumb-details,
.crumb-details > .crumb-details {
  padding-left: 10px;
}
.crumb-summary {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 0;
  cursor: pointer;
  list-style: none;
  /* .crumb-text (below) already overrides this back to `text` on its own
     leaf span, so a single crumb's own name was already selectable —
     but `none` here still blocked a drag from continuing smoothly
     across the arrow/flag between crumbs, breaking what should read as
     one continuous path (e.g. "Norway > Oslo > ... > this Site") into
     disconnected per-crumb fragments. `text` here, same as `.crumb-text`
     already has, makes the whole row — including the seg-bar's own
     breadcrumb popover, same shared markup/CSS — one continuous
     selectable/copyable trail. Doesn't affect the click-to-expand
     <summary> toggle or crumb-text--jumpable's own click-to-navigate —
     both are click handlers, unrelated to this property. */
  user-select: text;
}
.crumb-summary::-webkit-details-marker { display: none; }
.crumb-arrow {
  --crumb-size: var(--icon-arrow-size-sm);
  --crumb-icon: url('/static/icons/menu/ArrowRight.svg?v=1792024277');
  width: var(--crumb-size);
  height: var(--crumb-size);
  color: rgba(var(--theme-fg), 0.35);
  transition: opacity 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;
  font-size: 0;
}
.crumb-arrow::before {
  content: '';
  width: 100%;
  height: 100%;
  display: block;
  background-color: currentColor;
  -webkit-mask-image: var(--crumb-icon);
  mask-image: var(--crumb-icon);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.tools-drawer-summary .crumb-arrow {
  color: rgba(var(--theme-fg), 0.55);
  opacity: 0.72;
}
.tools-drawer-summary:hover .crumb-arrow,
.tools-drawer[open] > .tools-drawer-summary .crumb-arrow {
  color: rgba(var(--theme-fg), 0.9);
  opacity: 0.95;
}
.crumb-summary .crumb-arrow {
  --crumb-size: var(--icon-arrow-size-breadcrumb);
  width: var(--crumb-size);
  height: var(--crumb-size);
}
.crumb-details[open] > .crumb-summary .crumb-arrow {
  --crumb-icon: url('/static/icons/menu/ArrowDown.svg?v=1792024277');
}

/* Shared masked-icon triangle */
.tri-arrow {
  display: inline-block;
  width: var(--icon-arrow-size);
  height: var(--icon-arrow-size);
  vertical-align: middle;
  flex-shrink: 0;
}
.tri-arrow::before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background-color: currentColor;
  -webkit-mask-image: url('/static/icons/menu/ArrowRight.svg?v=1792024277');
  mask-image: url('/static/icons/menu/ArrowRight.svg?v=1792024277');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.tri-arrow.tri-down::before {
  -webkit-mask-image: url('/static/icons/menu/ArrowDown.svg?v=1792024277');
  mask-image: url('/static/icons/menu/ArrowDown.svg?v=1792024277');
}
/* Country flag (app/routes.py's _flag_emoji) — round image now, same
   recipe as profile-panel.js's .my-sites-flag-img. */
.crumb-flag {
  flex-shrink: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}
.crumb-flag-img {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.crumb-text {
  font-size: 0.6875rem;
  color: rgba(var(--theme-fg), 0.55);
  line-height: 1.3;
  user-select: text;

  cursor: default;
}

.crumb-text--jumpable {
  cursor: pointer;
}
.crumb-text--jumpable:hover {
  color: rgba(var(--theme-fg), 0.9);
}
/* The block/foglio crumb's own shift-click-to-request-whole-block
   affordance (admin-only — html/layers.html's _onCrumbClick) — same
   jumpable look, just a dashed underline so it reads as "this one does
   something extra," not only "this one navigates." */
.crumb-text[data-block-crumb] {
  text-decoration: underline dashed rgba(var(--theme-fg), 0.35);
  text-underline-offset: 2px;
}
/* Multi-parcel merge selection / whole-block request, reflected onto the
   breadcrumb's own LAST crumb (html/layers.html's own
   _mergeGroupBreadcrumbSync, mirrored into the seg-bar popover and
   Information panel for free via _buildInertBreadcrumbHtml's clone,
   layers.js — same markup, same CSS, no separate styling needed there).
   "Selected" look matches #seg-bar-crumbs-popover's own
   .crumb-text--focus/--parcel recipe (full opacity + weight 600) rather
   than duplicating it, just not scoped to that one popover. */
.crumb-text--merge-base {
  color: rgb(var(--theme-fg));
  font-weight: 600;
}
/* A plain block sibling at the end of .remote-breadcrumb, OUTSIDE the
   nested <details> staircase entirely — its own left padding is set
   inline, in JS (_mergeGroupBreadcrumbSync measures the real base crumb's
   own text column directly, rather than approximating it here with a
   fixed calc() that can't know this report's own breadcrumb depth). */
#crumb-merge-extra { display: block; }
/* One row per OTHER selected parcel, stacked — never crammed onto one
   line, never nested deeper than this one shared level no matter how
   many are selected. */
.crumb-merge-row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 0;
  font-size: 0.6875rem;
  color: rgb(var(--theme-fg));
  font-weight: 600;
}
.crumb-merge-plus { opacity: 0.5; flex-shrink: 0; }
.crumb-reveal-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 2px;
  margin: 0;
  line-height: 1;
  font-size: 0.6875rem;
  opacity: 0.45;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  color: rgb(var(--theme-fg));
}
.crumb-reveal-btn:hover { opacity: 0.9; }
.crumb-reveal-btn svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
}
.remote-area {
  margin-top: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(var(--theme-fg), 0.9);
  text-align: left;
  width: 100%;
}
/* ── All tools collapsible drawer ── */
.tools-drawer {
  width: 100%;
}
.tools-drawer + .tools-drawer {
  margin-top: 9px;
}
.tools-drawer-summary {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgb(var(--theme-fg));
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tools-drawer-summary::-webkit-details-marker { display: none; }
.tools-drawer-summary:hover { color: rgba(var(--theme-fg), 0.75); }
.tools-drawer[open] > .tools-drawer-summary .crumb-arrow {
  --crumb-icon: url('/static/icons/menu/ArrowDown.svg?v=1792024277');
}

.remote-buttons { display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 0 0 6px; overflow: hidden; }

/* Single flex row: [i] [label] … [pills right-aligned] */
.remote-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  transition: opacity var(--tool-anim-dur, 47ms) ease var(--anim-delay, 0ms),
              transform var(--tool-anim-dur, 47ms) ease var(--anim-delay, 0ms);
}
.remote-btn-group.tool-hidden {
  opacity: 0;
  transform: translateY(-6px);
}
.remote-btn-group.tool-instant {
  transition: none !important;
}
.mb-group {
  transition: opacity var(--tool-anim-dur, 47ms) ease var(--anim-delay, 0ms),
              transform var(--tool-anim-dur, 47ms) ease var(--anim-delay, 0ms);
}
.mb-group.tool-hidden {
  opacity: 0;
  transform: translateY(-6px);
}
.mb-group.tool-instant {
  transition: none !important;
}

.prop-row { align-items: baseline; gap: 10px; }
.prop-key {
  flex: 0 0 auto;
  min-width: 120px;
  font-size: var(--layer-box-kv-key-size);
  font-weight: var(--layer-box-kv-key-weight);
  color: inherit;
  letter-spacing: 0;
  white-space: nowrap;
  padding-left: 12px;
  text-align: left;
}
.prop-val {
  flex: 1;
  font-size: var(--layer-box-kv-value-size);
  font-weight: var(--layer-box-kv-value-weight);
  color: inherit;
  opacity: 0.65;
  word-break: break-word;
  text-align: left;
}
/* openParcelInfo's (layers.js) "no data yet" fallback — was riding on the
   shared .status-msg class (loading-overlay-sized text, pill-fg color),
   way louder than the rest of this panel's own rows. Sized/colored like
   .prop-val above instead — same theme-aware `inherit` + token size as
   every other text in this panel. */
.details-empty-msg {
  font-size: var(--layer-box-kv-value-size);
  color: inherit;
  opacity: 0.65;
  margin: 0;
}

.remote-btn-label {
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(var(--theme-fg), 0.9);
  white-space: nowrap;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 5px;
}
.remote-btn-label svg {
  width: 1.67em;
  height: 1.67em;
  flex-shrink: 0;
  fill: rgba(var(--theme-fg), 0.8);
}

.geosam-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  margin-left: auto;
}

.geosam-pill {
  width: auto;
  min-width: 48px;
  padding-left: 12px;
  padding-right: 12px;
}

/* i centered in its circle */
.btn-info {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.geosam-pills { display: flex; gap: 3px; flex-shrink: 0; }
.asset-summary {
  font-size: 0.5625rem; font-weight: 300;
  color: rgba(var(--theme-fg), 0.6);
  padding: 4px 2px 0; min-height: 1em;
  display: flex; align-items: center; gap: 5px;
}
@keyframes asset-summary-spin { to { transform: rotate(360deg); } }
.edit-note-input {
  width: 100%; box-sizing: border-box; resize: vertical;
  font: inherit; font-size: 0.6875rem;
  border: 0; border-radius: var(--smallcorner);
  background-color: rgba(var(--theme-fg), 0.05);
  color: rgba(var(--theme-fg), 0.9);
  padding: 8px; margin-bottom: 6px;
}
.slideup-button,
.geosam-pill,
.unknown-upload-btn {
  display: inline-flex; align-items: center;
  gap: 7px;
  border: 0; border-radius: var(--smallcorner);
  background-color: rgba(var(--theme-fg), 0.05);
  color: rgba(var(--theme-fg), 0.9);
  font-size: 0.625rem; font-weight: 600; letter-spacing: 0.02em;
  padding: 0 7px; height: 2rem; cursor: pointer;
  backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur));
  transition: background 0.15s, opacity 0.15s;
}

.asset-pill { font-size: 0.5625rem; font-weight: 400; }
.geosam-pill.active  {
  background-image: url('/static/logo/tribal_green.jpg');
  background-size: 272px 370px;
  background-position: center;
  background-color: var(--darkcolor);
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.geosam-pill.done    { background: transparent; color: var(--darkcolor);
                       box-shadow: inset 0 0 0 1.5px var(--darkcolor); }
.slideup-button.done { background: transparent; color: var(--darkcolor);
                       box-shadow: inset 0 0 0 1.5px var(--darkcolor); }
.geosam-pill { position: relative; overflow: hidden; }
.geosam-pill.loading { opacity: 1; pointer-events: none; }
.geosam-pill.loading::after {
  content: '';
  position: absolute;
  top: 0; left: -80%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
  animation: pill-shine 1.1s linear infinite;
  pointer-events: none;
}
@keyframes pill-shine { to { left: 130%; } }
.slideup-button:hover,
.geosam-pill:hover:not(.active):not(.loading),
.unknown-upload-btn:hover { background-color: rgba(var(--theme-fg), 0.1); }

.slideup-button-icon {
  width: 1.4em;
  height: 1.4em;
  display: inline-block;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

.slideup-button-icon.upload-tree-icon {
  -webkit-mask-image: url('/static/icons/tree/upload_tree.svg?v=1792024277');
  mask-image: url('/static/icons/tree/upload_tree.svg?v=1792024277');
}

.slideup-button-icon.upload-leaf-icon {
  -webkit-mask-image: url('/static/icons/tree/upload_leave.svg?v=1792024277');
  mask-image: url('/static/icons/tree/upload_leave.svg?v=1792024277');
}

.slideup-button-icon.upload-branch-icon {
  -webkit-mask-image: url('/static/icons/tree/upload_branch.svg?v=1792024277');
  mask-image: url('/static/icons/tree/upload_branch.svg?v=1792024277');
}

.slideup-button-icon.upload-extra-icon {
  -webkit-mask-image: url('/static/icons/tree/upload_extra.svg?v=1792024277');
  mask-image: url('/static/icons/tree/upload_extra.svg?v=1792024277');
}
.button.running { opacity: 0.6; pointer-events: none; }
.button.active { background-color: var(--darkcolor); }

/* pill spinner — shown inside the pill while it is in loading state */
.pill-spinner {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid transparent;
  opacity: 0;
  pointer-events: none;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.geosam-pill.loading .pill-spinner {
  opacity: 1;
  border-top-color:  var(--midcolor);
  border-left-color: var(--midcolor);
  animation: pill-spin 0.7s linear infinite;
}
@keyframes pill-spin { to { transform: rotate(360deg); } }

#map-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 300000;
  background: rgba(var(--blackRGB), 0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease-out;
}
#map-loading-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
#map-loading-overlay .btn-cancel-spinner {
  display: none;
}
#map-loading-overlay .status-msg {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(2);
}
body.tile-dark #map-loading-overlay .status-msg  { color: rgba(var(--lightTheme), 0.92); }
body.tile-dark #map-loading-overlay .running-text { color: rgba(var(--lightTheme), 0.65); }

/* running spinner — single SVG infinity path drawn via stroke-dashoffset */
.status-msg { display: flex; align-items: center; gap: 12px; color: var(--pill-fg); font-size: calc(var(--pill-md) * 1.5); margin: 0; }
.status-msg-centered { justify-content: center; text-align: center; padding: 6px 0; }
.btn-cancel-spinner { position: static; z-index: auto; flex-shrink: 0; margin-left: 8px; }
/* Same Close.svg mask-icon every other card's close button uses
   (.btn-info/.mb-group-close-btn, the one beside Maximize/Info) instead
   of a literal "×" glyph — a glyph's own baseline sat visibly below the
   pill's true center (confirmed live, the ×'s typographic box is not
   centered inside its own line-height the way a mask-icon div is), and
   a glyph has no icon color/current-color masking of its own to pair
   with the hover highlight above. */
.btn-cancel-spinner::before {
  content: '';
  display: block;
  width: 0.8rem;
  height: 0.8rem;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-image: url('/static/icons/menu/Close.svg?v=1792024277');
  mask-image: url('/static/icons/menu/Close.svg?v=1792024277');
  pointer-events: none;
}
.running-spinner { display: inline-block; flex-shrink: 0; vertical-align: middle; color: var(--midcolor); overflow: visible; }
.running-text { font-size: 1em; font-weight: 300; letter-spacing: 0.01em; color: var(--pill-sub); }
.spinner-col { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.spinner-text-xs { font-size: var(--pill-xs); }
.spinner-track { width: 120px; height: 3px; background: rgba(var(--theme-fg), 0.18); border-radius: 2px; overflow: hidden; }
/* Width is the one genuinely dynamic value (the actual progress
   percentage) — set inline per call, same as any other data value. */
.spinner-track-fill { height: 100%; background: var(--midcolor); border-radius: 2px; transition: width 0.35s ease; }
/* PDD report-generation progress — 25% larger than the shared default,
   scoped here rather than on .running-spinner/.spinner-track directly so
   other callers (site-loading, etc.) keep their normal size. */
.pdd-progress-xl .running-spinner { width: 67.5px; height: 33.75px; }
.pdd-progress-xl .spinner-track { width: 150px; height: 3.75px; }
.pdd-progress-xl .spinner-text-xs { font-size: calc(var(--pill-xs) * 1.25); }
.pdd-progress-xl .spinner-col { gap: 12.5px; }

.multi-progress-list { display: flex; flex-direction: column; gap: 0; width: 160px; }
.multi-progress-row { display: flex; align-items: center; gap: 8px; }
.multi-progress-body { flex: 1; min-width: 0; }
.multi-progress-header { display: flex; justify-content: space-between; margin-bottom: 3px; }
.multi-progress-spacer { height: 10px; }
.running-dim  { color: var(--pill-dim); }
.rf-chart-label { display: flex; align-items: center; color: var(--pill-fg); }

/* ── Pill flow — reusable "compact list, click to expand" pattern ── */
.pill-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pill-flow-item {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(var(--theme-fg), 0.05);
  color: inherit;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  font-size: 0.75rem;
  transition: background 0.15s;
}
.pill-flow-item:hover { background: rgba(var(--theme-fg), 0.10); }
.pill-flow-item.expanded { display: none; }
.pill-flow-item.selected {
  background: rgba(var(--theme-fg), 0.18);
  font-weight: 700;
  opacity: 1;
}
.pill-flow-detail {
  display: none;
  flex: 1 1 100%;
  padding: 8px 10px;
  margin: 2px 0 4px;
  background: rgba(var(--theme-fg), 0.05);
  border-radius: var(--smallcorner);
  font-size: 0.75rem;
}
.pill-flow-detail.open { display: block; }

/* shared tag/link chip — used in bird lists and action buttons */
.bird-tag,
.bird-link {
  font-size: 0.8125rem;
  font-weight: 300;
  background: rgba(255,255,255,0.5);
  border-radius: 5px;
  padding: 2px 7px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  border: none;
}
.bird-tag:hover,
.bird-link:hover { opacity: 0.65; }

#remote-result { margin-top: 14px; width: 100%; }
#remote-result .data-container {
  display: block;
  width: 100%;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(var(--theme-fg), 0.10);
  border-radius: var(--smallcorner);
  box-sizing: border-box;
}
.result-table { width: 100%; border-collapse: collapse; font-size: var(--pill-md); margin-top: 8px; }
.result-table th { text-align: left; padding: 4px 8px; color: var(--pill-sub); font-weight: 400; border-bottom: 1px solid rgba(var(--theme-fg), 0.12); }
.result-table td { padding: 4px 8px; border-bottom: 1px solid rgba(var(--theme-fg), 0.08); color: var(--pill-sub); }
/* Pill result classes — all driven by --pill-* tokens above */
.pill-heading { font-size: var(--pill-lg); color: inherit;  font-weight: 700; }

.result-meta { font-size: var(--layer-box-kv-key-size);   font-weight: var(--layer-box-kv-key-weight);   color: inherit;   margin-bottom: 6px; }
.result-note { font-size: var(--layer-box-kv-value-size); font-weight: var(--layer-box-kv-value-weight); color: inherit; opacity: 0.65; }

.layer-box-signature {
  display: block;
  text-align: right;
  font-size: var(--layer-box-signature-size);
  font-weight: var(--layer-box-signature-weight);
  color: inherit;
  opacity: 0.45;
  margin: 14px 0 2px;
}
body[data-view="tab"] .layer-box-signature {
  display: none;
}
.dock-signature-anchor {
  display: none;
}
body[data-view="tab"] .dock-signature-anchor {
  display: block;
  position: fixed;
  right: 10px;
  bottom: 8px;
  z-index: 9999;
  pointer-events: none;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
  font-size: var(--layer-box-signature-size);
  font-weight: var(--layer-box-signature-weight);
  color: inherit;
  opacity: 0.45;
}
.hansen-scrubber {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background: rgba(var(--theme-fg), 0.28);
  outline: none;
  cursor: pointer;
  accent-color: transparent;
}
.hansen-scrubber::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(var(--theme-fg), 0.65);
  cursor: pointer;
  border: none;
  box-shadow: none;
}
.hansen-scrubber::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(var(--theme-fg), 0.65);
  cursor: pointer;
  border: none;
}
.hansen-scrubber::-moz-range-track {
  height: 2px;
  border-radius: 1px;
  background-color: rgba(var(--theme-fg), 0.28);
}
.hansen-scrubber::-moz-range-progress {
  height: 2px;
  border-radius: 1px;
  background-color: rgba(var(--theme-fg), 0.28);
}
.hansen-scrubber::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 1px;
  background-color: rgba(var(--theme-fg), 0.28);
}
.hansen-scrubber.has-year-ticks::-moz-range-track {
  background-color: transparent;
  background-image: repeating-linear-gradient(to right,
    rgba(var(--theme-fg), 0.28) 0, rgba(var(--theme-fg), 0.28) calc(var(--frame-year-tick, 100%) - 2px),
    transparent calc(var(--frame-year-tick, 100%) - 2px), transparent var(--frame-year-tick, 100%));
}
.hansen-scrubber.has-year-ticks::-webkit-slider-runnable-track {
  background-color: transparent;
  background-image: repeating-linear-gradient(to right,
    rgba(var(--theme-fg), 0.28) 0, rgba(var(--theme-fg), 0.28) calc(var(--frame-year-tick, 100%) - 2px),
    transparent calc(var(--frame-year-tick, 100%) - 2px), transparent var(--frame-year-tick, 100%));
}
/* ── Unified swatch legend (LayerUI.swatchLegend) ── */
.swatch-legend {
  display: flex; flex-direction: row; flex-wrap: wrap; row-gap: 4px; column-gap: 14px;
  font-size: 0.6875rem;
  color: var(--pill-fg);
}
.swatch-legend-item { display: flex; align-items: center; gap: 5px; }
.swatch-legend-color {
  width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0;
  opacity: 0.85;
}
/* Legacy hansen-legend aliases — kept for backwards compat, point to unified */
.hansen-legend { display: flex; flex-direction: column; gap: 4px; font-size: 0.6875rem; color: var(--pill-fg); }
/* ── Temporal layer standardized UI ─────────────────────────────────────── */
.temporal-tabs {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 2px;
  border-radius: var(--smallcorner);
  background: transparent;
  flex-shrink: 0;
}
.temporal-tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
  border-radius: calc(var(--smallcorner) - 2px);
  border: none;
  background: transparent;
  color: rgba(var(--theme-fg), 0.5);
  font-size: 0.6875rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.02em;
  text-align: left;
  transition: color 0.15s;
}
.temporal-tab-btn::before {
  content: '';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  border-radius: 3px;
  border: 1.5px solid rgba(var(--theme-fg), 0.4);
  font-size: 8px;
  line-height: 1;
  transition: border-color 0.15s, color 0.15s;
}
.temporal-tab-btn.temporal-tab-active {
  background: transparent;
  color: rgba(var(--theme-fg), 0.92);
}
.temporal-tab-btn.temporal-tab-active::before {
  content: '✕';
  border-color: rgba(var(--theme-fg), 0.92);
  color: rgba(var(--theme-fg), 0.92);
}
.temporal-tab-btn:hover:not(.temporal-tab-active) {
  color: rgba(var(--theme-fg), 0.75);
}
.temporal-viewer { margin-bottom: 10px; }
body[data-view="tab"].dock-bottom .temporal-viewer > .hansen-scrubber,
body[data-view="tab"].dock-bottom .temporal-viewer > .hansen-scrubber ~ * {
  display: none;
}

/* GeoSAM parameter knobs */
.sam-knob-row {
  display: grid;
  grid-template-columns: 150px 1fr 40px;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.sam-knob-label {
  font-size: 0.6875rem;
  color: rgba(var(--theme-fg), 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sam-slider {
  width: 100%;
  accent-color: rgba(var(--theme-fg), 0.5);
  cursor: pointer;
}
.sam-knob-val {
  font-size: 0.6875rem;
  color: rgba(var(--theme-fg), 0.9);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.knob-number-input,
.knob-text-input {
  width: 100%; box-sizing: border-box;
  border: 0; border-radius: var(--smallcorner);
  background-color: rgba(var(--theme-fg), 0.05);
  color: rgba(var(--theme-fg), 0.9);
  font: inherit; font-size: 0.6875rem;
  padding: 5px 8px;
}
.knob-number-input:focus,
.knob-text-input:focus { outline: 1px solid rgba(var(--theme-fg), 0.3); }

/* Number knobs: label flexes, the input is compact, with a glassy ▲▼ stepper
   (the native spinner is hidden — it looked out of place on the glass panels). */
.sam-knob-row--num { grid-template-columns: minmax(0, 1fr) auto; }
.sam-knob-row--num .sam-knob-label { white-space: normal; line-height: 1.25; }
.knob-num { position: relative; width: 5.6rem; }
.knob-num .knob-number-input {
  width: 100%; padding-right: 1.7rem; text-align: right;
  -moz-appearance: textfield; appearance: textfield;
}
.knob-num .knob-number-input::-webkit-outer-spin-button,
.knob-num .knob-number-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; display: none; }
.knob-step { position: absolute; top: 3px; right: 3px; bottom: 3px; display: flex; flex-direction: column; gap: 2px; }
.knob-step-btn {
  flex: 1 1 0; width: 1.15rem; min-height: 0; padding: 0; border: 0; cursor: pointer;
  border-radius: 4px;
  background: var(--glass-button-bg);
  -webkit-backdrop-filter: blur(var(--glass-button-blur)); backdrop-filter: blur(var(--glass-button-blur));
  color: var(--control-glass-text);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.knob-step-btn:hover { background: var(--glass-button-hover-bg); }
.knob-step-btn::before { content: ''; border-left: 3px solid transparent; border-right: 3px solid transparent; }
.knob-step-up::before   { border-bottom: 4px solid currentColor; }
.knob-step-down::before { border-top: 4px solid currentColor; }

/* Raw Channels / Multi-channel picker */
.mc-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6875rem;
  color: var(--text-secondary, #aaa);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.mc-select {
  background: var(--bg-input, #1e1e1e);
  color: var(--text-primary, #e0e0e0);
  border: 1px solid var(--border-subtle, #333);
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 12px;
  cursor: pointer;
}
.mc-num-input {
  background: var(--bg-input, #1e1e1e);
  color: var(--text-primary, #e0e0e0);
  border: 1px solid var(--border-subtle, #333);
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 12px;
  width: 52px;
  text-align: center;
}
.mc-render-btn {
  background: var(--accent, #3a7ca5);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: opacity 0.15s;
}
.mc-render-btn:hover { opacity: 0.85; }
.temporal-stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 14px;
  font-size: 0.6875rem;
  color: rgba(var(--theme-fg), 0.65);
  margin-top: 5px;
}
.temporal-stat-chips strong {
  color: rgba(var(--theme-fg), 0.9);
  font-weight: 600;
}

.topo-stats-details,
.layer-section {
  margin-top: 8px;
  background: transparent;
  border: none;
  /* Keeps one section whole across Dock's own multi-column reflow
     (body[data-view="tab"] .layer-chart-content, above) instead of
     letting it get sliced mid-content between two columns. */
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}
/* Same atomic-unit treatment for a plan box's own top-level pieces
   (carbon.js/habitat.js/procurement.js/parking.js/plantation.js) — those
   aren't wrapped in .layer-section the way sensing's Map/Chart/Legend/
   Statistics already are (LayerUI.assembleBox just concatenates whatever
   HTML each renderer hands it, no shared wrapper class), so this targets
   every direct child of the box's own .data-container instead. */
body[data-view="tab"] .layer-chart-content .data-container > * {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}
/* A section that itself holds other sections (a plan's Input list of charts)
   may split BETWEEN its inner ones instead of having to fit a whole column —
   the inner sections stay atomic. */
body[data-view="tab"] .layer-chart-content .layer-section:has(.layer-section),
body[data-view="tab"] .layer-chart-content .data-container > .layer-section:has(.plan-input-charts) {
  break-inside: auto;
  -webkit-column-break-inside: auto;
  page-break-inside: auto;
}
.topo-stats-summary,
.layer-section-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  padding: 2px 0;
  color: var(--pill-fg);
}
.topo-stats-summary::-webkit-details-marker,
.layer-section-summary::-webkit-details-marker { display: none; }
.topo-stats-details[open] > .topo-stats-summary .crumb-arrow,
.layer-section[open] > .layer-section-summary .crumb-arrow {
  --crumb-icon: url('/static/icons/menu/ArrowDown.svg?v=1792024277');
}
.topo-stats-summary .crumb-arrow,
.layer-section-summary .crumb-arrow {
  transition: opacity 0.15s ease;
}
.layer-section-body { padding: 6px 0 4px 14px; }
/* Biodiversity species list (static/js/biodiversity.js) groupeding */
.bio-group-body { padding: 2px 0 4px 14px; }
.layer-section-title {
  font-size: var(--layer-box-title-size);
  font-weight: var(--layer-box-title-weight);
  color: var(--pill-fg);
  margin: 0;
}

.soc-legend { width: 100%; }
.soc-legend-bar {
  height: 10px; border-radius: 4px; width: 100%;
  background: linear-gradient(to right, #f5e6b4, #a0522d, #2d1205);
}
.soc-legend-labels { display: flex; justify-content: space-between; margin-top: 3px; color: var(--pill-fg); }

/* ── UNEP aridity badge & scale ─────────────────────────────────────────── */
.unep-badge {
  display: flex;
  align-items: baseline;
  gap: 10px;
  border: 1.5px solid;
  border-radius: 6px;
  padding: 8px 12px;
  margin: 8px 0;
}
.unep-badge-zone {
  font-size: var(--pill-lg);
  font-weight: 700;
}
.unep-badge-ai {
  font-size: var(--pill-md);
  color: var(--pill-sub);
}
.unep-scale {
  display: flex;
  gap: 2px;
  margin-bottom: 10px;
  height: 6px;
}
.unep-zone {
  flex: 1;
  border-radius: 2px;
  font-size: 0;
  transition: opacity 0.2s;
}

/* ── Climate bar charts ──────────────────────────────────────────────────── */
.rf-chart-wrap {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  width: 100%;
  min-width: 0;
}
/* ── Annual bar/dumbbell chart — height proportional to width ──────────────── */
/* Outer wrapper establishes the aspect ratio via padding-bottom trick.        */
.rf-chart-annual-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 33.33%;   /* height = width ÷ 3 */
  margin-bottom: 2px;
}
/* Inner container fills the wrapper and is the flex chart surface.            */
.rf-chart-annual {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  gap: 3px;
}
.rf-chart-annual .rf-chart {
  height: 100%;
  align-items: flex-end;
}
.rf-chart-annual .rf-bar-col {
  height: 100%;
  justify-content: flex-end;
}
.rf-chart-annual .rf-yaxis {
  height: calc(100% - 14px);
  margin-bottom: 14px;
}
.rf-chart-annual .rf-bar {
  height: calc(var(--rf-bar-ratio, 0) * (100% - 14px));
  min-height: 2px;
}
/* Dumbbell area — fills column height minus label row */
.rf-dumbbell-area {
  position: relative;
  height: calc(100% - 14px);
  width: 100%;
  flex-shrink: 0;
}
.rf-yaxis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  height: calc(var(--rf-maxh, 44px) * var(--rf-bar-scale, 1));
  margin-bottom: 14px;
  min-width: 20px;
  flex-shrink: 0;
  font-size: var(--pill-xs);
  color: var(--pill-sub);
  line-height: 1;
}
.layer-section[open] .rf-chart-wrap { --rf-bar-scale: 1.8; }
.rf-chart {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.rf-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  /* min-width:0 overrides flex's default min-width:auto, which floors a
     flex item at its CONTENT's natural width — with 10-12 of these in a
     row (a full year/month set), that floor added up past whatever a
     narrow .plan-sections column (~300px) actually had to give it,
     pushing the whole chart wider than its column instead of shrinking
     into it. The label itself gets the same treatment below so it
     truncates instead of being what sets that floor. */
  min-width: 0;
  gap: 2px;
  font-size: var(--pill-xs);
  line-height: 1;
  text-align: center;
  color: var(--pill-fg);
  position: relative;
}
.rf-bar-col[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% - 14px);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(var(--theme-fg), 0.8);
  font-size: var(--pill-xs);
  font-weight: 300;
  white-space: nowrap;
  pointer-events: none;
  z-index: 20;
  line-height: 1.3;
}
.rf-bar-pair {
  display: flex;
  align-items: flex-end;
  gap: 1px;
  width: 100%;
}
.rf-bar-pair .rf-bar { flex: 1; }
.rf-bar {
  width: 100%;
  border-radius: 2px 2px 0 0;
  min-height: 2px;
  height: calc(var(--rf-bar-h, 2px) * var(--rf-bar-scale, 1));
  transition: opacity 0.15s;
}
.rf-bar:hover { opacity: 0.75; }
.rf-label {
  color: var(--pill-fg);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pill-chart-label { color: var(--pill-fg); }
/* Icon at the start of every centralized error message (json/error.json's
   own catalog of these strings) — one shared rule here instead of adding
   it at each of the ~15 call sites that build a <p class="error-msg">
   (layer-ui.js's renderError, profile-forms.js, segment-mode.js, etc.):
   every one of them already funnels through this same class. */
.error-msg {
  color: var(--red);
  font-size: 0.875rem;
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.error-msg::before {
  content: '';
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin-top: 0.1em;
  background-color: currentColor;
  -webkit-mask-image: url('/static/icons/menu/Error.svg?v=1792024277');
  mask-image: url('/static/icons/menu/Error.svg?v=1792024277');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* ── Climate stripes ─────────────────────────────────────────────────────── */
.stripe-bar {
  display: flex;
  width: 100%;
  aspect-ratio: 5 / 1;
  border-radius: 3px;
  overflow: hidden;
}

/* ── Pill mode buttons (Monthly / Annual / Clear-sky etc.) ───────────────── */
.btn-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid rgba(var(--theme-fg), 0.18);
  border-radius: var(--smallcorner);
  background: rgba(var(--theme-fg), 0.06);
  color: rgb(var(--theme-fg));
  font-size: var(--pill-xs);
  cursor: pointer;
  line-height: 1.4;
  white-space: nowrap;
  transition: background 0.15s;
}
.btn-tag:hover { background: rgba(var(--theme-fg), 0.12); }

/* ── Custom dropdown (DEM / source selectors) ────────────────────────────── */
.custom-dropdown {
  position: relative;
  display: inline-block;
}
.custom-dropdown-selected {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid rgba(var(--theme-fg), 0.18);
  border-radius: var(--smallcorner);
  background: rgba(var(--theme-fg), 0.06);
  background: rgba(255,255,255,0.08);
  
  color: rgb(var(--theme-fg));
  font-size: 0.875rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.custom-dropdown-selected:hover { background: rgba(var(--theme-fg), 0.12); }
.custom-dropdown-source-icon-wrap {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--pill-dim);
}
/* Both the icon and the chevron read currentColor off the wrap above,
   so they always match each other. */
.custom-dropdown-source-icon-wrap .tri-arrow,
.custom-dropdown-source-icon-wrap .custom-dropdown-source-icon {
  color: inherit;
}
/* Icon-only compact mode is Dock view's own thing, not a function of
   browser width — a per-layer source dropdown in Card view (e.g. Land
   Use's GLC FCS30D/ESRI LULC/Dynamic World/ESA WorldCover picker) always
   shows its full label (the actually-selected source's name), at every
   width; it never had its own compact styling to begin with, since
   .custom-dropdown-source-icon defaults to display:none right above.
   This used to also flip on below 768px viewport width regardless of
   view mode, which silently compacted the Card-view picker on any
   normal-width browser window/laptop screen too — the actual bug behind
   repeated "the dropdown is always compact and never shows what it's
   set to" reports. The ONLY place this still goes icon-only is the
   Dock-view nav-bar badge mirror (.sheet-nav-badge-dropdown, above),
   gated on #dash-sheet.sheet-nav-compact (the PANEL's own width, not the
   viewport's) — Card view's picker is untouched by that rule. */
.custom-dropdown-source-icon { display: none; }
/* .my-sites-menu-popover/.my-sites-menu-item (profile-panel.js's My Sites
   three-dot menu — Open/Make Public/Rename/Tags…/Share/Remove) reuse this
   exact rule rather than their own separate copy of the same "rolling list
   box" look every other dropdown in the app already has — see profile.css's
   own note on the .my-sites-menu-popover/.my-sites-menu-item rules this
   replaced. It's an action menu, not a value picker (dropdown-shared.js's
   attachDropdownListeners doesn't fit — each item is its own distinct
   action, not "pick one to become the new label"), so its open/close/idle-
   collapse stays its own small copy (profile-panel.js's _armMySitesMenuIdle)
   — only the VISUAL styling and the CSS is actually shared here. */
.custom-dropdown-list,
.my-sites-menu-popover {
  display: none;
  position: absolute;
  z-index: 200;
  left: 0;
  top: calc(100% + 1px);
  max-height: 240px;
  overflow-y: auto;
  border-radius: var(--smallcorner);
  background: rgba(var(--lightTheme), 0.92);
  box-shadow: 0 4px 16px rgba(var(--blackRGB), 0.22);
  border: var(--glass-panel-border);
}
body.tile-dark .custom-dropdown-list,
body.tile-dark .my-sites-menu-popover {
  background: rgba(var(--darkTheme), 0.95);
}
/* My Sites' own trigger sits at the right edge of a site row — right-align
   the list under it instead of the shared component's default left-align,
   and a touch narrower minimum width (it never carries a resolution badge). */
.my-sites-menu-popover { left: auto; right: 0; min-width: 160px; }
.my-sites-menu-popover:not(.hidden) { display: block; }
.custom-dropdown-option,
.my-sites-menu-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 10px;
  font-size: 0.875rem;
  color: rgb(var(--theme-fg));
  cursor: pointer;
  border-bottom: 1px solid rgba(var(--theme-fg), 0.07);
  white-space: nowrap;
  transition: background 0.1s;
}
/* .my-sites-menu-item is a real <button>, not a <div> — reset its default chrome. */
.my-sites-menu-item {
  width: 100%;
  text-align: left;
  background-color: transparent;
  border-left: 0; border-right: 0; border-top: 0;
}
.custom-dropdown-option:last-child,
.my-sites-menu-item:last-child { border-bottom: none; }
.custom-dropdown-option:hover,
.custom-dropdown-option.selected,
.my-sites-menu-item:hover:not(:disabled) { background: rgba(var(--theme-fg), 0.1); }
.my-sites-menu-item:disabled {
  color: rgba(var(--theme-fg), 0.35);
  cursor: default;
}
/* The "(N layouts)" part of Open — its own click target (shows
   _showLayoutNamesPopup, profile-panel.js) distinct from Open itself
   (navigates), so it needs to read as separately clickable. */
.my-sites-menu-open-count {
  color: rgba(var(--theme-fg), 0.55);
  text-decoration: underline;
  text-decoration-style: dotted;
}
.my-sites-menu-open-count:hover { color: rgb(var(--theme-fg)); }
/* Small popup naming a site's layouts (profile-panel.js's
   _showLayoutNamesPopup) — positioned next to whatever anchor opened it,
   same floating-box look as the menu popover above. */
.my-sites-layout-names-popup {
  position: fixed;
  z-index: 300;
  max-width: 220px;
  padding: 7px 10px;
  border-radius: var(--smallcorner);
  background: rgba(var(--lightTheme), 0.92);
  box-shadow: 0 4px 16px rgba(var(--blackRGB), 0.22);
  border: var(--glass-panel-border);
  font-size: 0.8125rem;
  color: rgb(var(--theme-fg));
}
body.tile-dark .my-sites-layout-names-popup {
  background: rgba(var(--darkTheme), 0.95);
}
.my-sites-layout-names-popup.hidden { display: none; }

/* Preset.svg, marking #segcreate-preset-dropdown specifically */
.segcreate-preset-icon svg,
.segcreate-src-icon svg {
    width: 0.9rem;
    height: 0.9rem;
    display: block;
    fill: currentColor;
}
/* Segment Parcel/Zone's controls stack (segment-mode.js's
   _openNewLayoutPickerPanel/_openZoneSegmentCreatePanel, #segcreate-*/
   #zonecreate-* ids alike, same markup shape) — Preset above Imagery
   source, one column. The Segment button itself lives in the panel's own
   bottom .sp-actions-row now (next to Cancel, same size via
   .sp-actions-equal-btn), not beside this stack. */
.segcreate-controls-stack {
    display: flex;
    flex-direction: column;
    gap: 21px;
    margin-bottom: 8px;
}
/* Doubles the gap before the Cancel/New Segmentation row specifically for
   this create panel — the general .sp-actions-row margin-top (10px,
   shared by every other Cancel/OK row sitewide) stays untouched. */
.segcreate-controls-stack ~ .sp-actions-row {
  margin-top: 20px;
}
/* Icon+text row, centered — same rule doing double duty  */
#segcreate-run-btn,
#zonecreate-run-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.segcreate-run-icon svg {
    width: 0.85rem;
    height: 0.85rem;
    display: block;
    fill: currentColor;
}

/* Free/Freemium/Paid badge  */
.pricing-badge {
  display: inline-block;
  margin-left: 2px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: middle;
}
.pricing-badge.pricing-free     { background: rgba(46, 160, 67, 0.18);  color: #2ea043; }
.pricing-badge.pricing-freemium { background: rgba(210, 153, 34, 0.18); color: #d29922; }
.pricing-badge.pricing-paid     { background: rgba(var(--theme-fg), 0.14); color: rgba(var(--theme-fg), 0.75); }

/* ── Premium (SkySat) button ─────────────────────────────────────────────── */
.button-premium {
  flex: 1; margin-top: 0;
  padding: 12px 25px;
  border: none;
  border-radius: var(--smallcorner);
  font-size: 18px; font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
  background-color: var(--highlight);
  color: #fff;
  letter-spacing: 0.01em;
}
.button-premium:hover  { background-color: var(--brownunsed1); }
.button-premium:active { opacity: 0.85; }

/* ── Paywall card ────────────────────────────────────────────────────────── */
.paywall-card {
  border-radius: var(--bigcorner);
  border: 1px solid rgba(209,146,67,0.35);
  padding: 18px 16px 16px;
  margin: 0;
  background: rgba(209,146,67,0.07);
}
.paywall-badge {
  display: inline-block;
  font-size: 0.625rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--highlight); color: #fff;
  border-radius: 4px; padding: 2px 7px; margin-bottom: 10px;
}
.paywall-title { font-size: 1.05em; font-weight: 700; margin: 0 0 4px; color: rgba(var(--theme-fg), 0.95); }
.paywall-sub   { font-size: 0.75rem; color: rgba(var(--theme-fg), 0.72); margin: 0 0 12px; }
.paywall-features {
  list-style: none; margin: 0 0 14px; padding: 0;
  font-size: 0.8125rem; display: flex; flex-direction: column; gap: 4px;
  color: rgba(var(--theme-fg), 0.85);
}
.paywall-features li::before { content: '✓ '; color: var(--highlight); font-weight: 700; }
.paywall-price {
  font-size: 0.8125rem; color: rgba(var(--theme-fg), 0.72);
  margin-bottom: 14px; padding-top: 10px;
  border-top: 1px solid rgba(209,146,67,0.2);
}
.paywall-price strong { color: rgba(var(--theme-fg), 0.95); }
.paywall-btn {
  width: 100%; padding: 10px;
  border: none; border-radius: var(--smallcorner);
  background: var(--highlight); color: #fff;
  font-size: 0.875rem; font-weight: 600; cursor: pointer;
  transition: background-color 0.2s;
}
.paywall-btn:hover { background: var(--brownunsed1); }

/* ── Tile-dark: panels are white, map controls flip to white ─────────────── */

/* Grip handle stays visible on white panel */
body.tile-dark #dash-sheet .sheet-grip-handle {
  background: rgba(var(--darkTheme), 0.18);
}

/* Point info: row border slightly stronger + link color flips on dark tiles */
body.tile-dark #point-info-body .po-row {
  border-bottom-color: rgba(var(--lightTheme), 0.10);
}
body.tile-dark #point-info-body .po-val a {
  color: #5abf8a;
}

/* ── Tile-dark: attribution bar ─────────────────────────────────────────── */
body.tile-dark .leaflet-control-attribution {
  background: rgba(var(--darkTheme), 0.42) !important;
  color: rgba(var(--lightTheme), 0.72) !important;
}
body.tile-dark .leaflet-control-attribution a {
  color: rgba(var(--lightTheme), 0.88) !important;
}

/* ── Tile-dark: dash-embed text — direct rgba values, no variable-chain dependency ── */
/* Body baseline: all inherited text (including SVG currentColor) becomes white */
body.dash-embed.tile-dark { color: rgba(var(--lightTheme), 0.9); }

/* Full-opacity foreground elements */
body.dash-embed.tile-dark .remote-header h2,
body.dash-embed.tile-dark .remote-area,
body.dash-embed.tile-dark .remote-btn-label,
body.dash-embed.tile-dark .result-table th,
body.dash-embed.tile-dark .result-table td,
body.dash-embed.tile-dark .status-msg,
body.dash-embed.tile-dark .layer-section-title,
body.dash-embed.tile-dark .swatch-legend,
body.dash-embed.tile-dark .soc-legend-labels,
body.dash-embed.tile-dark .rf-label,
body.dash-embed.tile-dark .rf-chart-label,
body.dash-embed.tile-dark .result-note       { color: rgba(var(--lightTheme), 0.9); }

/* Dimmed foreground elements */
body.dash-embed.tile-dark .level-label,
body.dash-embed.tile-dark .result-meta,
body.dash-embed.tile-dark .crumb-text,
body.dash-embed.tile-dark .crumb-arrow,
body.dash-embed.tile-dark .running-text,
body.dash-embed.tile-dark .rf-yaxis          { color: rgba(var(--lightTheme), 0.6); }
body.dash-embed.tile-dark .running-dim       { color: rgba(var(--lightTheme), 0.4); }
body.dash-embed.tile-dark .custom-dropdown-source-icon-wrap { color: rgba(var(--lightTheme), 0.45); }
body.dash-embed.tile-dark .remote-btn-label svg { fill: rgba(var(--lightTheme), 0.8); }
body.dash-embed.tile-dark .geosam-pill:not(.active)       { background-color: rgba(var(--lightTheme),0.12); color: rgba(var(--lightTheme),0.9); }
body.dash-embed.tile-dark .geosam-pill:hover:not(.active):not(.loading) { background-color: rgba(var(--lightTheme),0.22); }
body.dash-embed.tile-dark .geosam-pill.done  { color: var(--lightcolor); }
body.dash-embed.tile-dark .data-container    { background: transparent !important; }

/* ── Tile-dark: paywall card — text handled by --theme-fg; keep card bg/border ── */
body.dash-embed.tile-dark .paywall-card {
  border-color: rgba(var(--lightTheme), 0.15);
  background: rgba(var(--lightTheme), 0.05);
}
/* --- Terms Modal/Intro Panel --- */
.intro-frame-modal {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 90vw !important;
  max-width: 700px !important;
  height: 80vh !important;
  z-index: 2147483647 !important;
  background: white !important;
  border: 2px solid #888 !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25) !important;
  display: block !important;
}
#intro-frame-close-btn {
  position: fixed !important;
  top: max(calc(10vh + 12px), calc(env(safe-area-inset-top) + 8px)) !important;
  right: calc(5vw + 8px) !important;
  left: auto !important;
  transform: none !important;
  z-index: 2147483648 !important;
  font-size: 2rem !important;
  background: none !important;
  border: none !important;
  cursor: pointer !important;
  color: #444 !important;
  font-weight: bold !important;
}

@media (max-width: 768px) {
  #intro-frame-close-btn {
    top: max(calc(10vh + 8px), calc(env(safe-area-inset-top) + 6px)) !important;
    right: calc(5vw + 4px) !important;
  }
}


/* Responsive flex layout — shared by layer-charts-grid and tree-sections-grid */
#layer-charts-grid, .layer-charts-grid, .tree-sections-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
}
#layer-charts-grid, .layer-charts-grid { margin: 10px 0 0 0; }
#data-drawer, #plan-drawer {
  align-self: stretch;
  width: 100%;
}

/* ── View modes (slideup.js's .dash-view-btn row → 'boxview' postMessage) ── */

body[data-view="tab"] #layer-charts-grid,
body[data-view="tab"] .layer-charts-grid {
  gap: 0;
}
body[data-view="tab"] .mb-group-header {
  display: none;
}
body[data-view="tab"] #layer-charts-grid > .mb-group,
body[data-view="tab"] .layer-charts-grid > .mb-group {
  flex: 1 1 100% !important;
  max-width: 100% !important;
  min-width: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  display: none; /* only [open] shown — see the [open] rule below */
}
body[data-view="tab"] #layer-charts-grid > .mb-group[open],
body[data-view="tab"] .layer-charts-grid > .mb-group[open] {
  display: block;
}
body[data-view="tab"] {
  padding-bottom: 64px;
  padding-left: 8px;
  padding-right: 8px;
}
/* ── Standalone frame controller (parent document) ── */
#frame-ctrl-toggle {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200005;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: var(--glass-panel-border);
  background: var(--glass-panel-bg);
  backdrop-filter: blur(var(--glass-panel-blur));
  -webkit-backdrop-filter: blur(var(--glass-panel-blur));
  box-shadow: var(--map-element-shadow);
  color: rgb(var(--theme-fg));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
#frame-ctrl-toggle::before {
  content: '';
  display: block;
  width: 18px;
  height: 18px;
  background-color: currentColor;
  -webkit-mask-image: url('/static/icons/menu/ArrowRight.svg?v=1792024277');
  mask-image: url('/static/icons/menu/ArrowRight.svg?v=1792024277');
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
#frame-ctrl-toggle[hidden],
#frame-ctrl-panel[hidden] {
  display: none;
}
#sheet-nav-frame-row {
  position: absolute;
  top: 48px;
  left: 0;
  right: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  color: rgb(var(--theme-fg));
  font-family: Montserrat, Jost, Arial, sans-serif;
  font-size: 0.8125rem;
}
#sheet-nav-frame-row[hidden] {
  display: none;
}
#frame-ctrl-panel {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200005;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: min(420px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  padding: 6px 8px;
  border-radius: var(--bigcorner);
  border: var(--glass-panel-border);
  background: var(--glass-panel-bg);
  backdrop-filter: blur(var(--glass-panel-blur));
  -webkit-backdrop-filter: blur(var(--glass-panel-blur));
  box-shadow: var(--map-element-shadow);
  color: rgb(var(--theme-fg));
  font-family: Montserrat, Jost, Arial, sans-serif;
  font-size: 0.8125rem;
}
.frame-ctrl-scrubber {
  flex: 1 1 auto;
  min-width: 60px;
  -webkit-appearance: none;
  appearance: none;
  /* The native <input type="range">'s hit box is this element's own
     height — separate from the visible track, which is sized by the
     ::-webkit-slider-runnable-track/::-moz-range-track rules below (2px,
     unchanged). With no height set here it fell back to the UA default
     (~16-18px at this panel's 13px font-size), making the click/drag
     target along the bar's own vertical axis (y1-y2) feel thin. 24px
     widens just that invisible hit area; the thin track still renders
     the same, vertically centered within it. */
  height: 24px;
  border-radius: 1px;
  background: transparent;
  outline: none;
  cursor: pointer;
  accent-color: transparent;
}
.frame-ctrl-scrubber::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(var(--theme-fg), 0.65);
  cursor: pointer;
  border: none;
  box-shadow: none;
  /* WebKit anchors a styled thumb to the TOP of the track's own box by
     default, not its vertical center — with the track at 2px and the
     thumb taller than that (needed for an easy-to-grab hit target,
     since a range thumb's rendered box IS its hit area, nothing extra
     to enlarge), the thumb's center sat (thumb-height - track-height)/2
     below the line instead of on it. This negative margin is the
     standard fix: it pulls the thumb up by exactly that difference so
     its center lands on the track regardless of either size changing
     later. Firefox's own -moz-range-thumb (below) already centers
     itself on the track with no such offset needed. */
  margin-top: calc((2px - 20px) / 2);
  /* A styled thumb and an unstyled track sit in the same stacking
     context as any sibling in #frame-ctrl-panel that happens to
     overlap it — this keeps it on top so a larger grab target (above)
     can't end up losing the pointer to something drawn over it. */
  position: relative;
  z-index: 1;
}
.frame-ctrl-scrubber::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(var(--theme-fg), 0.65);
  cursor: pointer;
  border: none;
  position: relative;
  z-index: 1;
}
.frame-ctrl-scrubber::-moz-range-track {
  height: 2px;
  border-radius: 1px;
  background-color: rgba(var(--theme-fg), 0.28);
}
.frame-ctrl-scrubber::-moz-range-progress {
  height: 2px;
  border-radius: 1px;
  background-color: rgba(var(--theme-fg), 0.28);
}
.frame-ctrl-scrubber::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 1px;
  background-color: rgba(var(--theme-fg), 0.28);
}
.frame-ctrl-scrubber.has-year-ticks::-moz-range-track {
  background-color: transparent;
  background-image: repeating-linear-gradient(to right,
    rgba(var(--theme-fg), 0.28) 0, rgba(var(--theme-fg), 0.28) calc(var(--frame-year-tick, 100%) - 2px),
    transparent calc(var(--frame-year-tick, 100%) - 2px), transparent var(--frame-year-tick, 100%));
}
.frame-ctrl-scrubber.has-year-ticks::-webkit-slider-runnable-track {
  background-color: transparent;
  background-image: repeating-linear-gradient(to right,
    rgba(var(--theme-fg), 0.28) 0, rgba(var(--theme-fg), 0.28) calc(var(--frame-year-tick, 100%) - 2px),
    transparent calc(var(--frame-year-tick, 100%) - 2px), transparent var(--frame-year-tick, 100%));
}
.frame-ctrl-label {
  flex-shrink: 0;
  white-space: nowrap;
  opacity: 0.7;
}
.frame-ctrl-close {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: none;
  background: none;
  border-radius: 50%;
  color: rgb(var(--theme-fg));
  opacity: 0.6;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.frame-ctrl-close:hover { opacity: 1; }
.frame-ctrl-close::before {
  content: '';
  display: block;
  width: 12px;
  height: 12px;
  background-color: currentColor;
  -webkit-mask-image: url('/static/icons/menu/Close.svg?v=1792024277');
  mask-image: url('/static/icons/menu/Close.svg?v=1792024277');
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
}
/* Sections (map/chart/legend/statistics/... or input_layers/map/
   statistics/params — LayerUI.assembleBox's own output) stack vertically
   and, once they'd overflow the panel's visible height, continue in a
   new column instead of just growing the page taller — native CSS
   multi-column, not a hand-rolled masonry script. Needs a real bounded
   height to have a "bottom" to hit at all: Dock content otherwise just
   grows and the whole document scrolls (its previous behavior) — 64px
   matches this same rule's own padding-bottom (icon dock clearance);
   #dash-frame's own inset (parent doc) already starts this iframe's own
   body below the nav bar, so 100vh here is already the right top-to-
   bottom span, no separate top offset needed (see the comment on that
   inset for why). overflow-x auto/overflow-y hidden flips the scroll
   axis from vertical (page) to horizontal (columns) — that's the actual
   visible effect of this, not just a cosmetic tweak. break-inside:avoid
   on .layer-section (styles.css, its own rule) is the other half —
   without it a single section could get sliced across two columns
   mid-content instead of moving as one atomic unit. */
body[data-view="tab"] .layer-chart-content {
  padding-top: 0;
  height: calc(100vh - 64px);
  overflow-x: auto;
  /* auto, not hidden: a block that can't be split across columns (see the
     break-inside rules below) and is taller than a column used to be cut
     off at the bottom with no way to reach the rest — a long plan (Blue
     Carbon's Input section, its results, its notes) lost everything past
     the first screen. Now it scrolls, like Card view does. */
  overflow-y: auto;
  column-width: 300px;
  column-gap: 14px;
}
body[data-view="tab"] .status-msg-centered {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  /* Above .tab-icon-row (10001) and .tab-label-row (10001) so it's
     never partly hidden behind either. */
  z-index: 10003;
}
.tab-icon-row, .tab-label-row, .dock-reveal-strip, .dock-info-anchor { display: none; }
body[data-view="tab"] .dock-info-anchor {
  display: block;
  position: fixed;
  top: 8px;
  right: 8px;
  z-index: 10001;
}
/* The sheet's close/minimize/maximize stack (parent document) runs down the panel's
   edge nearest the panel's own inner side; the i button goes to the OPPOSITE side, the
   edge of the viewport — a left-docked panel puts it top-left, above the start of the
   content (params, ...), which gets room reserved so nothing sits under it. */
body[data-view="tab"][data-dock-side="left"] .dock-info-anchor { right: auto; left: 8px; }
body[data-view="tab"][data-dock-side="left"] .layer-chart-content,
body[data-view="tab"][data-dock-side="right"] .layer-chart-content { padding-top: 2.4rem; }
body[data-view="tab"] .tab-icon-row {
  display: flex;
  /* Glued to the bottom of the panel, like a real dock — not part of
     the scrolling content. */
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10001;
  align-items: flex-end; /* dock-style: icons grow upward, row doesn't jump */
  flex-wrap: nowrap;
  overflow: hidden;
  gap: 2px;
  padding: 8px 8px 6px 8px;
  cursor: grab;
  background: none;
  transform: translateY(100%);
  pointer-events: none;
  transition: transform 0.3s ease-out;
}
body[data-view="tab"] .tab-icon-row.dock-visible {
  transform: translateY(0);
  pointer-events: auto;
}
body[data-view="tab"] .tab-icon-row.dock-dragging {
  cursor: grabbing;
}
body[data-view="tab"] .dock-reveal-strip {
  display: block;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14px;
  z-index: 10000;
}
.tab-icon-btn {
  position: relative;
  width: 1.615rem;
  height: 1.615rem;
  flex: 0 0 auto;
  border: 0;
  background: var(--glass-button-bg);
  border-radius: calc(var(--smallcorner) * var(--font-scale));
  cursor: pointer;
  color: var(--control-glass-text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  font-size: 1rem;
  transition: width 0.15s ease-out, height 0.15s ease-out, font-size 0.15s ease-out;
}
.tab-icon-btn.active {
  background: transparent;
  color: #ffd60a;
}
.tab-icon-glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.tab-icon-glyph svg { width: 100%; height: 100%; fill: currentColor; }
.tab-icon-btn:hover {
  z-index: 2;
  /* Neutral "fill" highlight only — yellow is reserved for .active
     (the actually-chosen layer), not for hover. */
  background: var(--glass-button-hover-bg);
}
.dock-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: calc(var(--smallcorner) * var(--font-scale));
  background: var(--glass-button-bg);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  font-family: Montserrat, Jost, Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--control-glass-text);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-100% + 4px));
  transition: opacity 0.15s ease-out, transform 0.15s ease-out;
  z-index: 10002;
}
.dock-tooltip.visible {
  opacity: 1;
  transform: translate(-50%, -100%);
}
.tab-label-row .mb-group-info-btn {
  margin-left: 0;
}
.tab-label-row .mb-group-label {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tab-label-row .mb-group-resolution,
/* LayerUI.dropdown()'s own sibling resolution span (temperature/wind/
   humidity/hansen/...) — moved in next to its dropdown the same way. */
.tab-label-row .result-meta {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.55;
  white-space: nowrap;
  flex-shrink: 0;
}
/* The box's own source-picker dropdown (layers.js), moved in here right
   after the name. */
.tab-label-row .custom-dropdown {
  font-size: 0.8125rem;
  font-weight: 500;
  flex-shrink: 0;
}
body[data-view="tab"] [id$="-src-wrapper"] {
  display: none;
}
body[data-view="tab"] .layer-chart-content .custom-dropdown {
  display: none;
}

/* Compact (closed) items — this is "card" view's own sizing now (the
   default/no-data-view state), bumped up from the original 450px. */
#layer-charts-grid > .mb-group,
.layer-charts-grid > .mb-group,
.tree-sections-grid > .mb-group,
.tree-sections-grid > #viewer-wrap {
  flex: 1 1 auto;
  min-width: 120px;
  max-width: 620px;
}
/* Tree species panel (.tree-sections-grid) — unrelated to layers/plans
   below, still just plain "open = full panel width" the moment it opens. */
.tree-sections-grid > .mb-group[open] {
  flex: 1 1 100%;
  max-width: 100%;
}
#layer-charts-grid > .mb-group[open][data-card-full],
.layer-charts-grid > .mb-group[open][data-card-full] {
  flex: 1 1 100%;
  max-width: 100%;
}
#layer-charts-grid > .mb-group:only-child,
.layer-charts-grid > .mb-group:only-child {
  max-width: 100%;
}
#layer-charts-grid:has(> .mb-group[open]),
.layer-charts-grid:has(> .mb-group[open]) {
  margin-left: -12px;
  margin-right: -12px;
  width: calc(100% + 24px);
}
/* Slide-in animation for content when item opens */
#layer-charts-grid > .mb-group[open] > .layer-chart-content,
.layer-charts-grid > .mb-group[open] > .layer-chart-content,
.tree-sections-grid > .mb-group[open] > .mb-group-items {
  animation: layerContentOpen 0.26s ease both;
}
@keyframes layerContentOpen {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.layer-chart-box {
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.07), 0 4px 24px rgba(0,0,0,0.10);
  background: var(--lowlight, #f7f7f7);
  overflow: hidden;
  min-width: 0;
}
.layer-chart-box[open] {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12), 0 4px 24px rgba(0,0,0,0.13);
}
.layer-chart-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  padding: 10px 18px 10px 14px;
  background: #fff;
  border-bottom: 1px solid #eee;
  user-select: none;
}
.layer-chart-summary .triangle {
  display: inline-block;
  transition: transform 0.2s;
  margin-right: 8px;
}
.layer-chart-box[open] .layer-chart-summary .triangle {
  transform: rotate(90deg);
}
.layer-chart-content {
  padding: 8px 12px 12px 12px;
  background: transparent;
}
.layer-chart-content .data-container {
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* ── Segment mode ──────────────────────────────────────────────────────────── */
.segment-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 192px;
  height: 42px;
  padding: 0 24px;
  border: 1.5px solid var(--greendeforest1);
  border-radius: var(--smallcorner);
  background: transparent;
  color: var(--greendeforest1);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.segment-btn:hover {
  background: var(--greendeforest1);
  color: #fff;
}

/* Plan assignment button (zone's own view — assign/change its type) */
.plan-btn {
  background-image: none !important;
  background-color: var(--greendeforest1) !important;
  box-shadow: 0 2px 10px rgba(34, 139, 34, 0.4) !important;
}
.plan-btn:hover:not(.loading) {
  background-color: var(--greendeforest2) !important;
}

/* Parcel edit-mode focus mask */
#seg-focus-mask {
  position: fixed;
  z-index: 850;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.15s ease;
  /* Must match Leaflet's own .leaflet-zoom-animated transform-origin (its
     leaflet.css, "0 0") — during a zoom, segment-mode.js mirrors the exact
     transform the map's own tile pane gets onto this element, pivoted the
     same way, so the blurred hole scales in lockstep with the tiles underneath
     instead of the old hide-then-rebuild. A mismatched origin here would
     scale this element around its own center instead of the map's pivot
     point, drifting out of alignment with the tiles the instant it starts. */
  transform-origin: 0 0;
}
#seg-focus-mask.seg-focus-mask-visible { opacity: 1; }
#seg-focus-mask.seg-focus-mask-border-edit {
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#seg-focus-outer-mask {
  position: fixed;
  z-index: 852;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.25);
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.15s ease;
  transform-origin: 0 0; /* see #seg-focus-mask's own comment above */
}
#seg-focus-outer-mask.seg-focus-outer-mask-visible { opacity: 1; }
#seg-focus-border {
  position: fixed;
  z-index: 855;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  transform-origin: 0 0; /* see #seg-focus-mask's own comment */
}
#seg-focus-border.seg-focus-border-visible { opacity: 1; }
#seg-focus-border .seg-focus-parcel-border { stroke-opacity: 0.3; }
.seg-handle-rect { background: transparent !important; border: none !important; }

/* mapleaflet-nav.js's dropSearchPointMarker({pin:true}) */
.search-point-pin {
  width: 28px;
  height: 28px;
  background-color: rgb(var(--theme-fg));
  -webkit-mask-image: url('/static/icons/viewing/AddLocation.svg?v=1792024277');
  mask-image: url('/static/icons/viewing/AddLocation.svg?v=1792024277');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  cursor: pointer;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

/* static/js/raster-transform.js's live preview */
.raster-transform-preview {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0.85;
  cursor: move;
  pointer-events: auto;
  outline: 1px dashed rgba(var(--theme-fg), 0.5);
}
/* Handles — same visual language as zone-move's own .seg-handle-rect. */
.raster-transform-handle {
  width: 14px;
  height: 14px;
  cursor: pointer;
}
.raster-transform-handle-scale {
  /* Solid filled square  */
  background: rgb(var(--theme-fg));
  opacity: 0.85;
  cursor: nwse-resize;
}
.raster-transform-handle-rotate {
  /* Hollow ring, not a filled dot */
  background: transparent;
  border: 2px solid rgb(var(--theme-fg));
  border-radius: 50%;
  opacity: 0.85;
  cursor: grab;
}
.seg-bar-crumbs-btn {
  flex-shrink: 0;
  width: 1.5625rem;  /* 1.25rem + 25% */
  height: 1.5625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(var(--theme-fg), 0.35);
  background: transparent;
  color: rgb(var(--theme-fg));
  cursor: pointer;
  padding: 0;
}
.seg-bar-crumbs-btn::before {
  content: '';
  display: block;
  width: 0.9375rem;  /* 0.75rem + 25%, keeps the same fill ratio as the button above */
  height: 0.9375rem;
  background-color: currentColor;
  opacity: 0.85;
  -webkit-mask-image: url('/static/icons/menu/Button_Compass.svg?v=1792024277');
  mask-image: url('/static/icons/menu/Button_Compass.svg?v=1792024277');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.seg-bar-crumbs-btn:hover {
  background: rgba(var(--theme-fg), 0.1);
}
#seg-bar-crumbs-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0.625rem;
  /* Sized to its text (was a fixed 280px, which left dead space to the right
     of every short trail); capped so a very long trail wraps instead. */
  width: max-content;
  max-width: min(90vw, 520px);
  z-index: 9001;
  border-radius: var(--glass-panel-radius);
  background: var(--glass-panel-bg);
  backdrop-filter: blur(var(--glass-panel-blur));
  -webkit-backdrop-filter: blur(var(--glass-panel-blur));
  box-shadow: var(--glass-panel-shadow), var(--glass-panel-edge), var(--map-element-shadow);
  border: var(--glass-panel-border);
  font-family: Montserrat, Jost, Arial, sans-serif;
  font-size: var(--layer-box-kv-value-size);
  font-weight: var(--layer-box-kv-value-weight);
  padding: 10px 12px;
  color: rgb(var(--theme-fg));
}
#seg-bar-crumbs-popover .crumb-text--focus {
  color: rgb(var(--theme-fg));
}
#seg-bar-crumbs-popover .crumb-text--parcel {
  font-weight: 600;
}
#seg-bar-crumbs-popover .crumb-text--jumpable {
  padding: 2px 4px;
  margin: -2px -4px;
  border-radius: var(--smallcorner);
}
#seg-bar-crumbs-popover .crumb-text--jumpable:hover {
  background: rgba(var(--theme-fg), 0.1);
}
#seg-bar-crumbs-popover .crumb-summary:hover > .crumb-text:not(.crumb-text--jumpable):not(.crumb-text--focus) {
  color: rgba(var(--theme-fg), 0.9);
}
.seg-bar-kbd-active {
  background: rgba(var(--theme-fg), 0.1);
  outline: 1px solid rgba(var(--theme-fg), 0.3);
  outline-offset: -1px;
}
#seg-bar {
  display: none;
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.625rem;
  background: var(--glass-panel-bg);
  border: var(--glass-panel-border);
  border-radius: 24px;
  backdrop-filter: blur(var(--glass-panel-blur));
  -webkit-backdrop-filter: blur(var(--glass-panel-blur));
  box-shadow: var(--map-element-shadow);
  color: rgb(var(--theme-fg));
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  pointer-events: auto;
}
/* seg-bar's own Layouts dropdown  */
#seg-bar-picker .custom-dropdown-selected {
  padding: 3px 8px;
  background: transparent;
  border: none;
  font-size: 0.6875rem;
  font-weight: 500;
}
#seg-bar-picker .custom-dropdown-selected:hover {
  background: var(--control-glass-hover);
}
.seg-bar-name-track {
  display: inline-block;
  max-width: 7rem;
  overflow: hidden;
  vertical-align: bottom;
}
.seg-bar-name-text {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}
.seg-bar-name-text.seg-bar-marquee-active {
  max-width: none;
  text-overflow: clip;
  animation: seg-bar-marquee 3.2s ease-in-out infinite alternate;
}
@keyframes seg-bar-marquee {
  0%, 12% { transform: translateX(0); }
  88%, 100% { transform: translateX(var(--seg-bar-marquee-distance, 0)); }
}
#seg-bar-picker .custom-dropdown-option {
  padding: 5px 8px;
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--control-glass-text);
  border-bottom: 1px solid var(--control-glass-separator);
}
#seg-bar-picker .custom-dropdown-option:hover,
#seg-bar-picker .custom-dropdown-option.selected {
  background: var(--control-glass-hover);
}
#seg-bar-save,
#seg-bar-discard {
  padding: 3px 12px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  background: transparent;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}
#seg-bar-save { border-color: var(--greendeforest1); color: var(--greendeforest1); }
#seg-bar-save:hover,
#seg-bar-discard:hover { background: rgba(255,255,255,0.12); }

/* Unsaved-changes prompt (Save/Discard/Cancel) — same glass chrome as #seg-bar. */
.seg-unsaved-box {
  background: rgba(20,20,20,0.92);
  border: 1px solid var(--greendeforest1);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  padding: 18px 20px;
  max-width: 320px;
  color: #fff;
  font-size: 13px;
  text-align: center;
}
.seg-unsaved-box p { margin: 0 0 14px; line-height: 1.4; }
.seg-unsaved-box button {
  padding: 5px 14px;
  margin: 0 4px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  background: transparent;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}
.seg-unsaved-box button:hover { background: rgba(255,255,255,0.12); }

/* Draw hint bar (bottom of map) */
#seg-hint {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  padding: 7px 18px;
  background: rgba(0,0,0,0.72);
  border-radius: 20px;
  color: rgba(255,255,255,0.88);
  font-size: 12px;
  pointer-events: none;
  text-align: center;
  max-width: 80vw;
  backdrop-filter: blur(4px);
}

.sp-panel-body { padding: 4px 0; }
.sp-type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px;
  border-radius: var(--smallcorner);
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  opacity: 0.55;
  transition: opacity 0.12s, border-color 0.12s;
}
.sp-type-btn.selected {
  opacity: 1;
  border-color: currentColor;
}
.sp-type-btn img { width: 20px; height: 20px; }
.sp-type-btn span { font-size: 0.625rem; line-height: 1.1; text-align: center; }
.sp-actions-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  justify-content: center;
}
/* Opt-in for a .sp-actions-row's own pair of buttons. */
.sp-actions-equal-btn {
  flex: 1 1 0;
  text-align: center;
}
.sp-name-input {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 10px;
  border: 1px solid rgba(var(--theme-fg), 0.25);
  border-radius: var(--smallcorner);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.8125rem;
  outline: none;
}
/* The native <select> dropdown arrow (its own OS/browser chrome, not
   something this app draws) ignores `color` entirely — it rendered flat
   black regardless of which theme panel it sat on. color-scheme is the
   actual CSS mechanism for telling the browser which palette to render
   native form-control chrome in; without it, the browser has no way to
   know this app even HAS a dark mode, it just always draws light-mode
   control chrome by default. */
select.sp-name-input { color-scheme: light; }
body.tile-dark select.sp-name-input { color-scheme: dark; }
/* Shared with .profile-shortcut-btn (the profile page's Dashboard/
   Logout/Pitch Deck buttons, styles.css ~line 2487) — same plain-text
   button label everywhere it's used, so one rule instead of each
   button class separately repeating slightly different numbers. */
.sp-cancel-btn,
.profile-shortcut-btn {
  font-size: 0.8125rem;
  font-weight: 600;
}
.sp-cancel-btn {
  padding: 6px 14px;
  border-radius: var(--smallcorner);
  border: 1px solid rgba(var(--theme-fg), 0.25);
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease-in-out;
}
.sp-cancel-btn:hover { background: var(--glass-button-hover-bg); }

.li-place-btn {
  padding: 8px 20px;
  background-image: url('/static/logo/tribal_grey.jpg');
  background-size: 272px 370px;
  background-position: center;
  background-color: var(--darkcolor, #1a1a12);
  color: var(--white);
  border: none;
  border-radius: var(--smallcorner);
  cursor: pointer;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 3px rgba(var(--blackRGB), 0.6);
}
.li-place-btn:hover,
.li-place-btn:focus-visible {
  background-image: url('/static/logo/tribal_green.jpg');
  background-color: var(--darkcolor, #1a1a12);
  filter: brightness(1.15);
}
.li-place-btn:disabled { opacity: 0.35; cursor: default; }
.li-place-btn.loading  { opacity: 0.6; }

/* Analytics dashboard's Apply/Export CSV pair */
#apply-filter,
#export-csv {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
#export-csv svg {
  width: 0.85rem;
  height: 0.85rem;
  display: block;
  fill: currentColor;
}

/* Slide-up panel's Request/Open Land Studio action: larger + centered. */
body.dash-embed #layout-design-btn:not(.hidden) {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px auto !important;
  padding: 7px 17px;
  font-size: 0.9rem;
}

.seg-run-rename {
  margin-right: 6px;
  cursor: pointer;
  opacity: 0.5;
  font-style: normal;
}
.seg-run-delete {
  margin-right: 6px;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.15s;
}
.seg-run-delete:hover { opacity: 1; }
.seg-run-delete svg {
  width: 0.8rem;
  height: 0.8rem;
  display: block;
  fill: currentColor;
}
.sp-confirm-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.sp-confirm-row .result-meta {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 0.6875rem;
  white-space: normal;
}
/* Same light weight as the dropdown row text it's replacing (body's own
   default 300, e.g. "Hansen GFW") — .result-meta's own font-weight:400
   read noticeably bolder/heavier sitting in that exact spot. */
.custom-dropdown-option .sp-confirm-row .result-meta {
  font-weight: 300;
}
.sp-confirm-yes,
.sp-confirm-no {
  flex-shrink: 0;
  cursor: pointer;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--smallcorner);
  transition: background 0.15s, color 0.15s;
}
.sp-confirm-yes { color: var(--red); }
.sp-confirm-no  { color: rgba(var(--theme-fg), 0.6); }
.sp-confirm-yes:hover,
.sp-confirm-no:hover { background: rgba(var(--theme-fg), 0.08); }

/* Name prompt overlay */
#seg-dialog {
  background: var(--darkcolor, #1a1a1a);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 24px;
  min-width: 280px;
  max-width: 90vw;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
#seg-input {
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: var(--pill-fg);
  font-size: 14px;
  outline: none;
}
#seg-input:focus { border-color: var(--greendeforest1); }
#seg-cancel-btn, #seg-save-btn {
  padding: 7px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}
#seg-cancel-btn {
  background: rgba(255,255,255,0.08);
  color: var(--pill-fg);
}
#seg-cancel-btn:hover { background: rgba(255,255,255,0.14); }
#seg-save-btn {
  background: var(--greendeforest1);
  color: #fff;
}
#seg-save-btn:hover { background: var(--greendeforest2); }

@media (max-width: 768px) {
  #admin-requests-page {
    padding: 0;
    margin-top: 0;
  }
  #admin-requests-page .auth-forms {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
    width: 100%;
  }
  #admin-requests-page .admin-request-list {
    margin-left: -20px;
    margin-right: -20px;
  }
  #admin-requests-page .admin-request-list .prop-row {
    border-radius: 0;
    padding-left: 20px;
    padding-right: 20px;
  }
  #admin-requests-page #admin-queue .prop-row {
    flex-wrap: wrap;
  }
  #admin-requests-page .admin-approve-btn,
  #admin-requests-page .admin-deny-btn {
    flex: 1 1 100%;
    margin-top: 8px;
  }
}
body:has(#admin-requests-page) #mini-launcher {
  display: none;
}

/* ── PDD (Project Design Document) page — html/PDD.html — see context/Tech/design.md ── */
body.pdd-page {
  /* One shared multiplier every explicit font-size in this whole PDD
     block is wrapped in (calc(Npx * var(--pdd-font-scale))) — a single
     number to bump the whole document's type up or down, rather than
     hand-editing ~70 individual px values scattered across headings,
     tables, charts, captions and the cover. */
  --pdd-font-scale: 1.1;
  --pdd-green: #1f5b34;
  --pdd-green-soft: #e8f1ea;
  --pdd-text: #2b2b2b;
  --pdd-dim: #6b6b6b;
  --pdd-rule: #d9ddd9;
  background: #fff;
  color: var(--pdd-text);
  text-align: left;
  font-weight: 400;
  margin: 0;
  padding: 0;
  height: auto;
  min-height: 100vh;
  overflow: auto;
  /* Chromium's print renderer silently drops element background-colors
     (keeping text/borders) unless told to keep them exactly — the
     @page margin boxes above are drawn by the UA directly from the
     stylesheet and aren't subject to this, which is why toggling dark
     mode visibly recolored the 20mm margin band but left the actual
     page content area white regardless of pdd-dark. Without this, the
     switch only ever changed the margin, never "the entire report". */
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
/* Dark mode — carbon.js sends ?theme=dark whenever the app itself is in
   dark mode (body.tile-dark) when the report/PDF is generated. Same 5
   tokens the whole document is already built on (every .pdd-* rule below
   reads var(--pdd-green)/var(--pdd-dim)/var(--pdd-rule) rather than a
   literal), so redefining them here is what actually turns the WHOLE
   document dark, not just this page's own chrome — plus the handful of
   rules further down that used a literal color instead of one of these
   tokens (those get their own .pdd-dark override right where they live). */
body.pdd-page.pdd-dark {
  --pdd-green: #5fae83;
  --pdd-green-soft: rgba(95, 174, 131, 0.14);
  --pdd-text: #e4e4e4;
  --pdd-dim: #9a9a9a;
  --pdd-rule: #3a3a3a;
  background: #000;
}
/* The handful of rules below reach for a literal color instead of one of
   the 5 tokens above (a light grey card fill, a warn/error text color,
   ...) — each gets its own dark-mode value here, right where its light
   one lives structurally, same reasoning, just not expressible as a
   shared token since these colors aren't reused elsewhere. */
.pdd-dark .pdd-verdict-zero { background: #1c1c1c; border-left-color: #555; }
.pdd-dark line.pdd-gridline { stroke: #333; }
.pdd-dark .pdd-bar-bg { fill: #222; }
.pdd-dark .pdd-channel-img,
.pdd-dark .pdd-photo img,
.pdd-dark .pdd-bio-photo img { background: #1c1c1c; }
.pdd-dark .pdd-v-warn { color: #e0b34d; }
.pdd-dark .pdd-v-error { color: #e2685f; }
.pdd-dark .pdd-generic-map { background: #1c1c1c; }
.pdd-dark .pdd-form-input { background: #141414; color: var(--pdd-text); border-color: var(--pdd-rule); }
.pdd-dark .pdd-form-input::placeholder { color: var(--pdd-dim); }
/* Logo.png is black wordmark + green leaf on a white ground — a plain
   invert() would flip the green to its complementary magenta along with
   the black/white swap. Inverting RGB always rotates hue by exactly 180°,
   so hue-rotate(180deg) right after invert() cancels that rotation back
   out: white↔black swap correctly, and the green comes back at the SAME
   hue as the non-inverted logo (just lighter, which reads better on black). */
.pdd-dark .pdd-logo { filter: invert(1) hue-rotate(180deg); }
/* --pdd-cols: set inline on .pdd-wrap from config.REPORT_NUM_COLUMNS
   (html/PDD.html) — 430px per column is roughly .pdd-wrap's own old fixed
   860px/2, so 2 columns keeps today's width exactly and 3/4 widen the
   page to give the extra columns real room instead of squeezing them
   into the same 860px. */
.pdd-wrap { max-width: calc(430px * var(--pdd-cols, 2)); margin: 0 auto; padding: 28px 24px 64px; }
/* Charts and site photos: a denser, magazine-style flow instead of one
   figure per row — column-fill:auto (fill one column before starting the
   next) packs the condensed material tightly instead of leaving each
   column's tail as empty balanced whitespace. break-inside:avoid keeps a
   chart/photo from splitting across the column break (or a print page).
   auto ONLY actually works when the multicol container has a determinate
   height to fill against — true during print (Chromium has a real page
   height per column) but not on the plain scrolling screen view, where
   an auto-height container makes every browser just pile everything into
   column 1 forever and leave columns 2/3 empty (confirmed live: column-
   count computed correctly as 3, only one of the three ever got content)
   — balance doesn't need a height at all, it just splits by content
   amount, which is exactly what an auto-height on-screen block needs. */
.pdd-columns {
  column-count: var(--pdd-cols, 2);
  column-gap: 24px;
  column-fill: balance;
}
@media print {
  .pdd-columns { column-fill: auto; }
}
.pdd-columns > * { break-inside: avoid; }
/* Every figure — map, chart, photo, text — stays inside its own single
   column, no exceptions: max-width:100% (of the column, not the page)
   plus overflow-wrap on anything that could otherwise force the column
   wider than its own 1/3-of-the-page share (a long unbroken token in a
   note/caption, a table that doesn't shrink, an SVG that ignores its
   viewBox). A previous version let a map figure span 2 of the 3 columns
   for "more room" — removed: every column must actually measure a third
   of the page width, full stop. */
.pdd-columns > * {
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}
.pdd-logo { height: 64px; width: auto; display: block; margin-bottom: 16px; }
/* Front/back cover (html/REPORT.html) — print-only (see @media print
   below); on screen this would just be a giant full-page background
   image in the middle of a scrolling preview, dead weight there. Same
   tribal_green.jpg every .li-place-btn pill already uses as its own
   background-image, at full A4-page size instead of button-size — this
   file's own aspect ratio (815×1111) is already close enough to A4's
   own (1:1.414) that background-size:cover crops very little. Always
   this one green version regardless of pdd-dark — a cover is a brand
   moment, not reading content, so it doesn't follow the rest of the
   document's light/dark token swap (see REPORT.html's own comment). */
/* Unconditionally laid out (not display:none toggled to flex only
   inside @media print) — toggling display AND forcing a named-page
   break on the same element confused Chromium's pagination pass,
   confirmed live: the break silently never happened and this just
   vanished instead of becoming its own page. Hidden on SCREEN instead,
   the opposite way round — print always sees a normal, already-laid-out
   box, nothing about its display type changes between the two contexts. */
.pdd-cover {
  position: relative;
  page: pdd-cover;
  break-inside: avoid;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  width: 210mm;
  height: 297mm;
  box-sizing: border-box;
  padding: 16mm;
  background-image: url('/static/logo/tribal_green.jpg');
  /* Tiled at 42mm (28mm's own 50% coarser — still much finer than an
     earlier 70mm attempt). The black/white edge patches from that
     earlier attempt were blamed on 297mm not dividing evenly by the
     tile size at the time, but that diagnosis was wrong: CSS
     background-repeat tiles infinitely in every direction from the
     anchor point and always fully covers the box regardless of that
     ratio — confirmed by re-testing this exact setup in isolation,
     clean edge-to-edge with no gaps at any corner. The real cause back
     then was almost certainly the dark scrim gradient that used to sit
     over this pattern (removed since, see .pdd-cover-scrim below)
     reading as a patch against the tiled texture, not the tiling
     itself. */
  background-size: 42mm 42mm;
  background-repeat: repeat;
  background-position: center;
}
/* No scrim/shadow over the pattern — it reads cleanly enough on its own,
   and a darkening gradient over a tiled pattern looked like an unwanted
   shadow rather than a deliberate effect. Text contrast instead comes
   from text-shadow on .pdd-cover-text itself, below. */
.pdd-cover-text, .pdd-cover-logo { position: relative; z-index: 1; }
@media screen {
  .pdd-cover { display: none; }
}
.pdd-cover-front { break-after: page; }
.pdd-cover-back  { break-before: page; }
.pdd-cover-logo {
  width: 160px;
  height: auto;
  /* Logo.png is the app's own colored mark (dark on light, inverted
     for pdd-dark elsewhere) — forced to a flat white silhouette here
     instead, same as the brochure's own cover treatment, since it
     always sits on this one green texture regardless of document
     theme. */
  filter: brightness(0) invert(1);
}
.pdd-cover-front {
  justify-content: space-between;
  align-items: flex-start;
}
/* color:#fff set DIRECTLY on each piece below, not just once on this
   wrapper for the others to inherit — a plain `h1 { color: ... }`
   element-selector rule elsewhere in this file (for the document's
   OWN, non-cover headings) directly matches .pdd-cover-title too (it's
   still a real <h1>), and a directly-matching rule always beats an
   inherited one regardless of which side has the higher specificity —
   confirmed live, the title rendered in that other rule's dark green,
   completely unreadable against this own dark-ish green background. */
.pdd-cover-text {
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}
.pdd-cover-kicker {
  font-size: calc(13px * var(--pdd-font-scale));
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0.9;
  margin-bottom: 14px;
}
.pdd-cover-title {
  font-size: calc(40px * var(--pdd-font-scale));
  font-weight: 800;
  line-height: 1.12;
  color: #fff;
  margin: 0 0 14px;
  max-width: 150mm;
}
.pdd-cover-facts {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: calc(13px * var(--pdd-font-scale));
  font-weight: 500;
  color: #fff;
  opacity: 0.95;
  margin-bottom: 18px;
}
.pdd-cover-date {
  font-size: calc(14px * var(--pdd-font-scale));
  font-weight: 500;
  color: #fff;
  opacity: 0.95;
}
.pdd-cover-front .pdd-cover-logo { align-self: flex-end; }
.pdd-breadcrumb { font-size: calc(11px * var(--pdd-font-scale)); color: var(--pdd-dim); margin-bottom: 14px; letter-spacing: 0.02em; }
.pdd-breadcrumb span { margin: 0 6px; }
.pdd-header { border-bottom: 2px solid var(--pdd-green); padding-bottom: 16px; margin-bottom: 22px; }
.pdd-kicker { font-size: calc(11px * var(--pdd-font-scale)); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pdd-green); margin-bottom: 6px; }
.pdd-header h1 { font-size: calc(26px * var(--pdd-font-scale)); font-weight: 600; color: var(--pdd-green); margin: 0 0 6px; }
.pdd-meta { font-size: calc(12px * var(--pdd-font-scale)); color: var(--pdd-dim); }

.pdd-strip { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: calc(11px * var(--pdd-font-scale)); background: var(--pdd-green-soft); border-radius: 6px; padding: 12px 16px; margin-bottom: 26px; }
.pdd-strip-label { color: var(--pdd-dim); margin-bottom: 2px; }
.pdd-strip-val { font-weight: 600; font-size: calc(12px * var(--pdd-font-scale)); }
.pdd-mono, .pdd-mono-block { font-family: ui-monospace, Menlo, monospace; }
.pdd-strip .pdd-mono { font-size: calc(10px * var(--pdd-font-scale)); }

.pdd-section { margin-bottom: 32px; }
.pdd-section h2 { display: flex; align-items: baseline; gap: 10px; font-size: calc(15px * var(--pdd-font-scale)); font-weight: 600; color: var(--pdd-green); border-bottom: 1px solid var(--pdd-rule); padding-bottom: 6px; margin: 0 0 14px; }
.pdd-num { font-size: calc(12px * var(--pdd-font-scale)); font-weight: 600; color: #fff; background: var(--pdd-green); border-radius: 50%; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }

.pdd-kpis { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.pdd-kpi { flex: 1 1 150px; border: 1px solid var(--pdd-rule); border-radius: 6px; padding: 12px 16px; }
.pdd-kpi-val { font-size: calc(26px * var(--pdd-font-scale)); font-weight: 700; line-height: 1; color: var(--pdd-green); }
.pdd-kpi-unit { font-size: calc(11px * var(--pdd-font-scale)); color: var(--pdd-dim); margin-top: 3px; }
.pdd-kpi-label { font-size: calc(11px * var(--pdd-font-scale)); margin-top: 6px; }
.pdd-kpi-zero .pdd-kpi-val { color: var(--pdd-dim); }

.pdd-verdict { border-radius: 6px; padding: 12px 16px; font-size: calc(13px * var(--pdd-font-scale)); line-height: 1.5; }
.pdd-verdict strong { display: block; font-size: calc(14px * var(--pdd-font-scale)); font-weight: 700; margin-bottom: 3px; }
.pdd-verdict-positive { background: var(--pdd-green-soft); border-left: 4px solid var(--pdd-green); }
.pdd-verdict-zero { background: #f4f4f4; border-left: 4px solid #999; }

/* Price banner (html/REPORT.html) — screen-only (.no-print, same class
   the existing report-boundary download links use), states the report's
   real commercial value while REPORT_PAYWALL_ENFORCED is off, instead of
   silently handing it over for free with no price attached. */
.pdd-price-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0 0 20px; padding: 10px 16px; border-radius: 6px;
  background: #fff8e1; border-left: 4px solid #e8b923; font-size: calc(13px * var(--pdd-font-scale)); color: #5c4a00;
}
.pdd-dark .pdd-price-banner { background: #2a2410; border-left-color: #c79a1f; color: #e8d38a; }
.pdd-price-banner a { color: inherit; font-weight: 600; text-decoration: underline; white-space: nowrap; }

.pdd-figure { margin: 0 0 20px; }
.pdd-figure figcaption { font-size: calc(12px * var(--pdd-font-scale)); font-weight: 600; margin-bottom: 6px; }
/* Data/Plan sections' generic cards (app/routes_reports.py's
   _generic_result_card) — map thumbnail, legend swatches, everything else
   already has its own .pdd-svg/.pdd-table styling below. */
.pdd-generic-map { width: 100%; border-radius: 4px; display: block; margin-bottom: 6px; }
.pdd-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 8px; }
.pdd-legend-swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-right: 4px; }
.pdd-legend-label { font-size: calc(10px * var(--pdd-font-scale)); color: var(--pdd-dim); vertical-align: middle; }
.pdd-note { font-size: calc(10px * var(--pdd-font-scale)); color: var(--pdd-dim); margin-top: 4px; }
.pdd-svg { width: 100%; height: auto; display: block; }
line.pdd-gridline { stroke: #e3e6e3; stroke-width: 1; }
.pdd-axis { font-size: calc(9px * var(--pdd-font-scale)); fill: var(--pdd-dim); }
.pdd-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: calc(10px * var(--pdd-font-scale)); margin-top: 4px; }
.pdd-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.pdd-bar-text { font-size: calc(10px * var(--pdd-font-scale)); fill: var(--pdd-dim); }
.pdd-bar-bg { fill: #eef0ee; }

.pdd-channel { margin-bottom: 20px; border: 1px solid var(--pdd-rule); border-radius: 6px; overflow: hidden; }
.pdd-channel-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; font-size: calc(12px * var(--pdd-font-scale)); font-weight: 600; background: var(--pdd-green-soft); }
.pdd-channel-counter { font-size: calc(10px * var(--pdd-font-scale)); font-weight: 400; color: var(--pdd-dim); }
.pdd-channel-img { width: 100%; display: block; image-rendering: pixelated; background: #f4f4f4; }
.pdd-video { width: 100%; display: block; background: #000; }
.pdd-scrubber { padding: 8px 12px 10px; }
.pdd-scrubber input[type=range] { width: 100%; margin: 0; }
.pdd-frame-meta { display: flex; justify-content: space-between; font-size: calc(10px * var(--pdd-font-scale)); color: var(--pdd-dim); margin-top: 4px; }
.pdd-print-grid { display: none; }
.pdd-print-frame { margin: 0; text-align: center; font-size: calc(9px * var(--pdd-font-scale)); break-inside: avoid; }
.pdd-print-frame img { width: 100%; display: block; border-radius: 3px; }

.pdd-grid.pdd-mono-block, .pdd-section .pdd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; font-size: calc(12px * var(--pdd-font-scale)); }
.pdd-grid .k { color: var(--pdd-dim); }
.pdd-grid .v { font-weight: 500; }
.pdd-mono-block { font-size: calc(11px * var(--pdd-font-scale)); }

.pdd-todo-intro { font-size: calc(12px * var(--pdd-font-scale)); color: var(--pdd-dim); margin: 0 0 10px; }
.pdd-todo-list { display: grid; grid-template-columns: 1fr; gap: 6px; }
.pdd-todo-item { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; font-size: calc(12px * var(--pdd-font-scale)); padding: 7px 10px; border: 1px dashed var(--pdd-rule); border-radius: 4px; break-inside: avoid; }
.pdd-kv { width: 100%; border-collapse: collapse; font-size: calc(12px * var(--pdd-font-scale)); margin: 0 0 10px; }
.pdd-kv th { width: 28%; text-align: left; vertical-align: top; font-weight: 600; color: var(--pdd-green, #1f4d2b); padding: 5px 10px 5px 0; border-bottom: 1px solid var(--pdd-rule); }
@media print {
  /* A short label ("Project title", "Sectoral scope") that fit fine in
     the old single ~860px-wide column started wrapping one syllable per
     line once .pdd-wrap's own multi-column print layout (above) narrowed
     it to roughly a third of that — 28% of a narrower column is just
     too few px for some of these words. More width for the label,
     accordingly less for the value column; tables are short either way. */
  .pdd-kv th { width: 42%; }
}
.pdd-kv td { padding: 5px 0; border-bottom: 1px solid var(--pdd-rule); }
.pdd-table { width: 100%; border-collapse: collapse; font-size: calc(11px * var(--pdd-font-scale)); margin: 0 0 12px; }
.pdd-table th { text-align: left; font-weight: 600; color: var(--pdd-green, #1f4d2b); border-bottom: 2px solid var(--pdd-rule); padding: 4px 8px; }
.pdd-table td { padding: 3px 8px; border-bottom: 1px solid var(--pdd-rule); font-variant-numeric: tabular-nums; }
.pdd-table tr { break-inside: avoid; }
.pdd-table-narrow { width: auto; min-width: 50%; }
.pdd-total td { font-weight: 700; }
.pdd-h3 { font-size: calc(13px * var(--pdd-font-scale)); margin: 14px 0 6px; color: var(--pdd-green, #1f4d2b); }
.pdd-prose { font-size: calc(12px * var(--pdd-font-scale)); line-height: 1.55; margin: 0 0 8px; }
.pdd-list { font-size: calc(12px * var(--pdd-font-scale)); margin: 0 0 8px; padding-left: 20px; }
.pdd-note { font-size: calc(11px * var(--pdd-font-scale)); color: var(--pdd-dim); margin-top: 2px; }
.pdd-draft { font-size: calc(9px * var(--pdd-font-scale)); font-style: italic; text-transform: uppercase; letter-spacing: .04em; color: var(--pdd-dim); border: 1px solid var(--pdd-rule); border-radius: 3px; padding: 0 4px; margin-left: 4px; }
.pdd-downloads { display: flex; gap: 8px; align-items: center; font-size: calc(12px * var(--pdd-font-scale)); margin: 0 0 8px; }
.pdd-toc { margin: 0 0 20px; break-inside: avoid; }
.pdd-toc-title { font-size: calc(14px * var(--pdd-font-scale)); margin: 0 0 6px; color: var(--pdd-green, #1f4d2b); }
.pdd-toc-list { list-style: none; margin: 0; padding: 0; columns: 2; font-size: calc(12px * var(--pdd-font-scale)); line-height: 1.7; }
.pdd-toc-list a { color: inherit; text-decoration: none; white-space: pre; }
.pdd-form-field { margin: 0 0 12px; break-inside: avoid; }
.pdd-form-label { display: block; font-size: calc(12px * var(--pdd-font-scale)); font-weight: 600; color: var(--pdd-green, #1f4d2b); margin: 0 0 4px; }
.pdd-form-input { width: 100%; box-sizing: border-box; font: inherit; font-size: calc(12px * var(--pdd-font-scale)); line-height: 1.45; padding: 8px 10px; border: 1px solid var(--pdd-rule); border-radius: 4px; background: #fff; color: inherit; resize: vertical; }
.pdd-form-value { font-size: calc(12px * var(--pdd-font-scale)); line-height: 1.5; white-space: pre-wrap; }
.pdd-formbar { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.pdd-formbar-note, .pdd-formbar-status { font-size: calc(12px * var(--pdd-font-scale)); color: var(--pdd-dim); }
.pdd-todo-mark { flex: 0 0 auto; font-size: calc(10px * var(--pdd-font-scale)); font-style: italic; color: var(--pdd-dim); }
.pdd-verdict-list { margin: 0; padding-left: 18px; font-size: calc(12px * var(--pdd-font-scale)); line-height: 1.55; }
.pdd-verdict-list li { margin-bottom: 6px; }
.pdd-v-ok { color: var(--pdd-text); }
.pdd-v-warn { color: #8a5a00; }
.pdd-v-error { color: #a12626; }

/* .pdd-columns (this file's own multi-column rule, above) now drives the
   photo grid's own column count too — REPORT_NUM_COLUMNS, same as the
   charts section, instead of an independent auto-fill grid that ignored
   it. margin-bottom stands in for the old grid's row gap (column-gap
   alone doesn't add vertical spacing between stacked items). */
.pdd-photos { }
.pdd-photo { margin: 0 0 12px; break-inside: avoid; }
.pdd-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; display: block; background: #f4f4f4; }
.pdd-photo figcaption { font-size: calc(10px * var(--pdd-font-scale)); color: var(--pdd-dim); margin-top: 4px; word-break: break-all; }

/* Biodiversity chapter — one fixed 2-col matrix per species group (so it
   reads as 1x1/1x2/2x2/2x3 depending on how many photos that group has),
   no borders/table — the caption sits in the row gap, same spot the
   .pdd-photo figcaption already uses for the Photos chapter above.
   Deliberately NO break-inside:avoid-page on the grid itself (only on
   each individual .pdd-bio-photo below) — a 6-photo/3-row group is
   routinely taller than a single column, an impossible fit for
   "keep this whole block on one page/column" to honor; Chromium's print
   engine answered that impossible request by repeatedly failing to find
   room and emitting a long run of blank pages instead of ever placing
   it, confirmed live. Letting the grid split across a column/page
   boundary (same as every other multi-item flow in this document is
   already allowed to) fixes that — each single photo+caption still
   can't be split mid-way through, which is the constraint that
   actually matters. */
.pdd-bio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 16px; margin: 0 0 20px; }
.pdd-bio-photo { margin: 0; break-inside: avoid; }
.pdd-bio-photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 4px; display: block; background: #f4f4f4; }
.pdd-bio-photo figcaption { font-size: calc(10px * var(--pdd-font-scale)); color: var(--pdd-dim); margin-top: 4px; }
@media print {
  .pdd-bio-grid { gap: 3px 10px; }
  .pdd-bio-photo figcaption { font-size: calc(6.5px * var(--pdd-font-scale)); line-height: 1.3; }
}

.pdd-audit { font-size: calc(11px * var(--pdd-font-scale)); color: var(--pdd-dim); line-height: 1.7; }
.pdd-hash { font-size: calc(10px * var(--pdd-font-scale)); font-family: ui-monospace, Menlo, monospace; color: var(--pdd-dim); word-break: break-all; margin-top: 6px; }

.pdd-actions { margin-top: 32px; display: flex; gap: 12px; }
/* PDD page buttons (Save, Download boundary, Print, Back): the green tribal texture,
   like the app's other buttons. */
.pdd-btn {
  font: inherit; font-size: calc(12px * var(--pdd-font-scale)); font-weight: 600; color: #fff; text-decoration: none;
  background-color: var(--pdd-green);
  background-image: url('/static/logo/tribal_green.jpg'); background-size: 272px 370px; background-position: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  border: 0; border-radius: 6px; padding: 8px 18px; cursor: pointer; display: inline-block;
}
.pdd-btn:hover { filter: brightness(1.15); }

/* Receipt (PDD_receipt.html) — a short, till-roll-styled payment summary,
   not the full PDD: narrow fixed width, dashed rules, monospace amounts.
   Reuses body.pdd-page's own --pdd-* tokens (same dark-mode mechanism) so
   it never needs its own light/dark palette. */
.pdd-receipt-page { background: #f2f2ef; padding: 32px 0; }
.pdd-receipt-page.pdd-dark { background: #000; }
.pdd-receipt {
  max-width: 360px; margin: 0 auto; background: #fff; border-radius: 6px;
  padding: 28px 24px 22px; box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  text-align: center; color: var(--pdd-text);
}
.pdd-dark .pdd-receipt { background: #0e0e0e; box-shadow: none; border: 1px solid var(--pdd-rule); }
.pdd-receipt-logo { height: 34px; width: auto; margin: 0 auto 10px; display: block; }
.pdd-receipt-title { font-size: calc(16px * var(--pdd-font-scale)); font-weight: 700; color: var(--pdd-green); }
.pdd-receipt-sub { font-size: calc(10px * var(--pdd-font-scale)); color: var(--pdd-dim); margin-top: 2px; }
.pdd-receipt-rule { border-top: 1px solid var(--pdd-rule); margin: 14px 0; }
.pdd-receipt-rule-dashed { border-top-style: dashed; }
.pdd-receipt-meta { width: 100%; font-size: calc(11px * var(--pdd-font-scale)); text-align: left; border-collapse: collapse; }
.pdd-receipt-meta td { padding: 3px 0; }
.pdd-receipt-meta td:first-child { color: var(--pdd-dim); width: 40%; }
.pdd-receipt-meta td:last-child { text-align: right; }
.pdd-receipt-line-head, .pdd-receipt-line {
  display: grid; grid-template-columns: 1.3fr 0.9fr 0.9fr 1.1fr; gap: 4px;
  font-size: calc(11px * var(--pdd-font-scale)); padding: 4px 0; text-align: right;
}
.pdd-receipt-line-head { color: var(--pdd-dim); font-weight: 600; text-transform: uppercase; font-size: calc(9px * var(--pdd-font-scale)); letter-spacing: .03em; }
.pdd-receipt-line-head span:first-child, .pdd-receipt-line span:first-child { text-align: left; }
.pdd-receipt-line-base { font-weight: 700; color: var(--pdd-green); }
.pdd-receipt-total { display: flex; justify-content: space-between; font-size: calc(13px * var(--pdd-font-scale)); font-weight: 700; padding: 3px 0; }
.pdd-receipt-total-sub { font-size: calc(11px * var(--pdd-font-scale)); font-weight: 400; color: var(--pdd-dim); }
.pdd-receipt-note { font-size: calc(9px * var(--pdd-font-scale)); line-height: 1.6; color: var(--pdd-dim); text-align: left; margin: 0; }
.pdd-receipt-hash { font-size: calc(9px * var(--pdd-font-scale)); color: var(--pdd-dim); word-break: break-all; margin-top: 10px; }
.pdd-receipt-thanks { font-size: calc(10px * var(--pdd-font-scale)); font-weight: 600; color: var(--pdd-green); margin-top: 6px; letter-spacing: .04em; }

/* @page CSS always wins over the `margin`/`format` passed to Playwright's
   page.pdf() call (confirmed live — routes_reports.py's own margin:0 left/
   right had ZERO effect while this rule still said 12mm) — this IS the
   real source of truth for page size/margin, not the Python call.

   The page-number footer uses a plain CSS Paged Media margin box
   (@bottom-right's counter(page)/counter(pages)) instead of Playwright's
   own header_template/footer_template feature — confirmed in isolation
   that Playwright's header/footer ALWAYS leaves an unfixable ~5mm gap of
   true page-white between the real page edge and where its content
   starts, no matter what margin/height is requested (a Chromium quirk in
   that specific feature, independent of this app's CSS); a margin box's
   own background reaches the literal page edge with no such gap. The
   logo moved out of the repeating-per-page header entirely — it's now
   plain page content (PDD.html), shown once at the top of page 1, so it's
   just covered by body's own already-dark-aware background like
   everything else, no special-cased rendering system involved at all.

   Four named pages (light/dark need different literal colors — a margin
   box can't read this file's --pdd-* custom properties, and @page itself
   can't be scoped by a class selector the way a normal element can) —
   `page:` below assigns each body to the right one. */
/* Chromium silently drops a margin-at-rule entirely when it's written as a
   comma-separated group (@top-left, @top-center, ... { }) the way a normal
   CSS selector list works — confirmed in isolation: identical rule, only
   difference grouped vs separate, grouped never painted anything while
   separate rules (repetitive as they are) painted correctly every time.
   Each box below is its own rule for exactly that reason, not style. */
@page pdd-report-light {
  size: A4; margin: 20mm;
  /* Base fill for the WHOLE page box (content + every margin region),
     underneath the per-box rules below — Chromium's adjacent margin
     boxes (@top-left/@top-center/@top-right etc.) don't always tile
     perfectly edge-to-edge; a sub-pixel seam between two of them used to
     show through as a sliver of the page's own default white (on dark,
     a visible white stripe cutting across the margin — confirmed live).
     This makes that seam read as the same color as its neighbors either
     way, not a gap through to a different one underneath. */
  background: #fff;
  @top-left-corner   { content: ""; background: #fff; }
  @top-left          { content: ""; background: #fff; }
  @top-center        { content: ""; background: #fff; }
  @top-right         { content: ""; background: #fff; }
  @top-right-corner  { content: ""; background: #fff; }
  @bottom-left-corner  { content: ""; background: #fff; }
  @bottom-left          { content: ""; background: #fff; }
  @bottom-center        { content: ""; background: #fff; }
  @bottom-right-corner  { content: ""; background: #fff; }
  /* 8px * 1.8 = 14.4px. The logo (LogoSmall_dark.png, the same dark-
     mark variant every light-background context in this app already
     uses) is plain generated content, chained after the counters in the
     same content list — a margin box has no element of its own to size
     it through, so it renders at its native small-icon size as-is. */
  /* Literal px, not calc(var(--pdd-font-scale)) — a margin box can't read
     this file's custom properties (same established limitation as the
     --pdd-* color tokens, see this @page rule's own comment above);
     14.4px * 1.1 precomputed by hand instead. */
  @bottom-right { content: counter(page) " / " counter(pages) " " url('/static/logo/LogoSmall_dark.png'); background: #fff; color: #6b6b6b; font-size: 15.84px; font-family: -apple-system, sans-serif; padding-right: 12mm; }
}
@page pdd-report-dark {
  size: A4; margin: 20mm;
  /* See pdd-report-light's own comment on this same line — the actual
     fix for the white stripes across the dark page's margins. */
  background: #000;
  @top-left-corner   { content: ""; background: #000; }
  @top-left          { content: ""; background: #000; }
  @top-center        { content: ""; background: #000; }
  @top-right         { content: ""; background: #000; }
  @top-right-corner  { content: ""; background: #000; }
  @bottom-left-corner  { content: ""; background: #000; }
  @bottom-left          { content: ""; background: #000; }
  @bottom-center        { content: ""; background: #000; }
  @bottom-right-corner  { content: ""; background: #000; }
  @bottom-right { content: counter(page) " / " counter(pages) " " url('/static/logo/LogoSmall_light.png'); background: #000; color: #9a9a9a; font-size: 15.84px; font-family: -apple-system, sans-serif; padding-right: 12mm; }
}
@page pdd-receipt-light { size: A5; margin: 0mm; }
@page pdd-receipt-dark  { size: A5; margin: 0mm; }
/* Front/back cover (html/REPORT.html's .pdd-cover-front/-back) — true
   edge-to-edge bleed, so zero margin rather than this document's usual
   20mm; no page-number footer on these two, they aren't part of the
   numbered body. */
@page pdd-cover { size: A4; margin: 0mm; }
/* opening_photo/closing_photo (REPORT.html, .pdd-standalone-photo) — its
   own named page, same mechanism .pdd-cover already uses reliably,
   instead of break-before/after:page alone on a plain sibling exiting
   .pdd-wrap's multi-column flow. That combination (forced page break
   right after a 2-column, column-fill:auto container closes) reproduced
   as a real bug: a long run of entirely blank pages between the end of
   the document and this section, confirmed live with the main document
   ending anywhere from column 1 or column 2 depending on content length
   — isolated minimal repros of the same CSS never reproduced it, so
   this is presumably some edge case in Chromium's fragmentation engine
   triggered only at real-document scale, not something to chase further
   given a named page already reliably avoids it. */
@page pdd-standalone-photo { size: A4; margin: 0mm; }
body.pdd-page                    { page: pdd-report-light; }
body.pdd-page.pdd-dark           { page: pdd-report-dark; }
body.pdd-receipt-page            { page: pdd-receipt-light; }
body.pdd-receipt-page.pdd-dark   { page: pdd-receipt-dark; }
@media print {
  body.pdd-page { min-height: 0; overflow: visible; }
  /* Belt-and-suspenders on top of body.pdd-page's own print-color-adjust
     above — every descendant with its own background (cards, verdict
     boxes, chart tiles, the price banner) gets the same treatment
     explicitly, rather than relying on inheritance alone across engines. */
  body.pdd-page, body.pdd-page * { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .pdd-wrap { max-width: 100%; padding: 0; }
  /* The actual fix for "lots of page breaks" — before this, .pdd-wrap's
     own --pdd-cols (REPORT_NUM_COLUMNS) only drove the chart/photo
     gallery's OWN nested .pdd-columns sub-container; the chapters
     themselves (.pdd-section) were plain single-column flow, one
     section per row, full page width, each new page starting only once
     the page before it was completely full of ONE column's worth of
     text — a chapter a few lines too long to fit pushed its entire rest
     onto a mostly-empty new page. Multi-column flow on the wrap itself
     means a chapter that doesn't fit the rest of a column just continues
     in the NEXT column (same page, column-fill:auto packs forward)
     instead of forcing a whole new page — exactly like a newspaper/
     magazine, not one text block per sheet. Deliberately NOT paired
     with break-inside:avoid on .pdd-section itself — a chapter is
     allowed to straddle a column break (only its heading stays glued to
     what follows, via the existing h2 rule below), same as this file's
     own .pdd-columns comment already explains for its chart tiles. */
  .pdd-wrap { column-count: var(--pdd-cols, 2); column-gap: 32px; column-fill: auto; }
  /* Everything before the chapters themselves — logo, breadcrumb, title
     block, price banner, the stat strip, the table of contents — stays
     a full-width banner across every column, same as a magazine's own
     masthead/intro does above its column body. Without this they'd each
     get squeezed into column 1's own width alongside the real text. */
  .pdd-logo, .pdd-breadcrumb, .pdd-header, .pdd-formbar, .pdd-price-banner,
  .pdd-strip, .pdd-toc, .pdd-verdict-zero { column-span: all; }
  /* .pdd-columns' own column-count (its base, non-print rule above) was
     written back when .pdd-wrap itself was single-column and each
     section had to split ITS OWN content into columns independently —
     now that .pdd-wrap is the document-wide columnizer, every
     .pdd-columns nested inside a chapter (todo_chapter's own wrapper,
     among others) was splitting AGAIN inside each of .pdd-wrap's own
     columns: --pdd-cols:2 outside × 2 inside = each real page column
     visibly quartered (confirmed live — a 6-column table's header text
     wrapped one letter per "column" at that width). In print, .pdd-wrap
     already provides the real multi-column flow, so every nested
     .pdd-columns here just becomes a plain block instead — the on-
     screen version (no .pdd-wrap columning there at all) keeps its own
     column-count unchanged, this override is print-only. */
  .pdd-columns { column-count: 1; }
  /* A wide, many-column table (Net emission reductions, Data and
     parameters, …) squeezed into one single flow-column's share of the
     page is unreadable regardless of the fix above — these get the
     FULL page width, spanning every column .pdd-wrap has, same
     mechanism the masthead elements use just above. .pdd-table-narrow
     (a generic result card's plain 2-column key/value stats, and
     .pdd-kv's own leakage/permanence table, a different class
     entirely) is genuinely narrow and stays in its own column. */
  .pdd-table:not(.pdd-table-narrow) { column-span: all; }
  .no-print { display: none !important; }
  .pdd-figure, .pdd-channel { break-inside: avoid; }
  .pdd-section h2 { break-after: avoid; }
  .pdd-channel:has(.pdd-print-grid) .pdd-channel-body { display: none; }
  /* Sized for a ~400px .pdd-columns column (REPORT_NUM_COLUMNS=3), not the
     old full-page width — a 120px tile only fit ~5 across a full page and
     would fall back to ~1 per row in a column this narrow, turning one
     20-odd-frame animated channel into several pages on its own. 70px
     keeps 5+ frames per row so the whole matrix for one channel stays
     within roughly a column's own height. */
  .pdd-print-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 4px; padding: 8px; }
  .pdd-print-frame { font-size: calc(7px * var(--pdd-font-scale)); }
  /* Photos: a 2-column grid sized to ONE of .pdd-wrap's own flow-columns
     (not .pdd-columns' nested column-count, opted out of below, and not
     the full page either — this grid's own width IS the flow-column it
     sits in). Each photo keeps its real proportions instead of a forced
     square crop: landscape spans both grid columns (its full column
     width, real aspect ratio), portrait sits in just one so two
     portraits land side by side in the same row — which two end up next
     to each other follows photos_list's own per-parcel shuffle
     (carbon_report_page), not a separate pairing step here. */
  .pdd-photos { column-count: initial; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pdd-photo { margin: 0; }
  .pdd-photo img { width: 100%; display: block; }
  .pdd-photo figcaption { font-size: calc(7px * var(--pdd-font-scale)); line-height: 1.3; margin-top: 3px; }
  .pdd-photo-landscape { grid-column: 1 / -1; }
  .pdd-photo-landscape img { aspect-ratio: 16 / 9; object-fit: cover; }
  .pdd-photo-portrait img { aspect-ratio: 3 / 4; object-fit: cover; }
  /* Portrait AND genuinely high-resolution only (_pdd_layout_photos'
     own 2000px threshold) — its own dedicated page (break before AND
     after — this one photo must never share a page with the grid
     around it), tall enough to read as a real full-page photo. */
  .pdd-photo-full {
    grid-column: 1 / -1;
    break-before: page;
    break-after: page;
    margin: 0;
  }
  .pdd-photo-full img { aspect-ratio: 210 / 297; object-fit: cover; }
  .pdd-photo-full figcaption { font-size: calc(10px * var(--pdd-font-scale)); margin-top: 8px; }
  /* opening_photo (REPORT.html) — its own named page (page:
     pdd-standalone-photo, this file's own @page rule above — same
     mechanism .pdd-cover already uses), full 297mm, image+caption given
     fixed block heights (never flex — tried once, print-fragmentation
     engines handle flex+forced-breaks poorly) summing to under 297mm so
     there's no height ambiguity. Sits as a sibling BEFORE .pdd-wrap even
     starts — confirmed live this position/treatment renders cleanly. */
  .pdd-standalone-photo {
    page: pdd-standalone-photo;
    width: 210mm;
    height: 297mm;
    box-sizing: border-box;
    margin: 0;
    padding: 10mm;
    break-before: page;
    break-after: page;
  }
  .pdd-standalone-photo .pdd-photo-full,
  .pdd-closing-photo .pdd-photo-full {
    break-before: auto;
    break-after: auto;
  }
  .pdd-standalone-photo .pdd-photo-full img,
  .pdd-closing-photo .pdd-photo-full img {
    display: block;
    width: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    margin: 0;
  }
  .pdd-standalone-photo .pdd-photo-full img { height: 267mm; }
  .pdd-standalone-photo .pdd-photo-full figcaption,
  .pdd-closing-photo .pdd-photo-full figcaption {
    height: 10mm;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  /* closing_photo — NESTED as the last child inside .pdd-wrap now (see
     REPORT.html's own comment there) instead of a sibling placed right
     where .pdd-wrap's 2-column flow ends: that exact combination (a
     forced page break on the next sibling, right as an active
     multi-column fragmentation context closes) was a confirmed live
     bug — a long run of entirely blank pages, not reproducible in any
     isolated minimal test, so presumably a real Chromium fragmentation-
     engine edge case rather than anything wrong with this app's own
     CSS. Nested here, it uses the exact pattern the single featured
     high-res photo in the Photos chapter already uses successfully
     (.pdd-photo-full, break-before/after:page, inside the flow) —
     column-span:all so it still gets the full page width despite
     sitting inside .pdd-wrap's own 2 columns, and the ordinary
     pdd-report-light/dark page (20mm margins, 257mm usable height) —
     not its own named page, since it has to stay part of the same
     fragmentation context as everything around it, not exit it. */
  .pdd-closing-photo {
    column-span: all;
    break-before: page;
    break-after: page;
    margin: 0;
  }
  .pdd-closing-photo .pdd-photo-full img { height: 245mm; }
}


/* A zone's default plan: its icon before the zone name (seg bar zone list, zone tooltip). */
.zone-plan-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 5px;
  vertical-align: -0.15em;
  background-color: currentColor;
  -webkit-mask: var(--zone-plan-icon) center / contain no-repeat;
  mask: var(--zone-plan-icon) center / contain no-repeat;
  cursor: help;
}


/* Seg bar zone list: [plan icon][double-click-editable name][open-folder button] */
/* [plan icon][name] hover/click as ONE unit (.zone-entry) so the highlight covers the icon too. */
#seg-bar-crumbs-popover .zone-entry { display: inline-flex; align-items: center; cursor: pointer; padding: 2px 4px; margin: -2px -4px; border-radius: var(--smallcorner); }
#seg-bar-crumbs-popover .zone-entry:hover { background: rgba(var(--theme-fg), 0.1); }
#seg-bar-crumbs-popover .zone-entry .zone-plan-icon { cursor: pointer; flex-shrink: 0; }
#seg-bar-crumbs-popover .zone-name { cursor: pointer; white-space: nowrap; }
#seg-bar-crumbs-popover .zone-name-input {
  font: inherit; color: inherit; background: transparent;
  border: 1px solid rgba(var(--theme-fg), 0.35); border-radius: var(--smallcorner);
  padding: 1px 4px; min-width: 8rem;
}
/* The seam between two connected toolbars (toolbar.js's initMiniLauncher):
   an invisible hit strip along the shared edge; hovering it dashes the
   shared border itself (.tb-join-hover, above) and shows small scissors,
   clicking disconnects the pair. No extra line of its own. */
.tb-seam {
  position: fixed;
  z-index: 200008;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}
.tb-seam::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 16px; height: 16px;
  transform: translate(-50%, -50%);
  background-color: rgb(var(--theme-fg));
  -webkit-mask: url('/static/icons/menu/Disconnect.svg?v=1792024277') center / contain no-repeat;
  mask: url('/static/icons/menu/Disconnect.svg?v=1792024277') center / contain no-repeat;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.tb-seam:hover::after,
.tb-seam:focus-visible::after { opacity: 0.9; }

/* A connected pair of toolbars (toolbar.js sets data-join on each panel to
   the edge that touches the other one). On that edge: the corners tighten
   (reduced, not removed) and ONE border is drawn — by the later panel
   (right/lower); the other's shared border goes transparent so the 1px
   overlap shows a single line. At rest that line is an ordinary solid border;
   hovering the seam (toolbar.js adds .tb-join-hover to both panels) turns it
   dashed and brighter — the "weak link" cue, shown only when you're about to
   click it. */
.mini-launcher-panel[data-join="right"]  { border-top-right-radius: 4px;    border-bottom-right-radius: 4px;    border-right-color: transparent; }
.mini-launcher-panel[data-join="left"]   { border-top-left-radius: 4px;     border-bottom-left-radius: 4px; }
.mini-launcher-panel[data-join="bottom"] { border-bottom-left-radius: 4px;  border-bottom-right-radius: 4px;    border-bottom-color: transparent; }
.mini-launcher-panel[data-join="top"]    { border-top-left-radius: 4px;     border-top-right-radius: 4px; }
.mini-launcher-panel[data-join="left"].tb-join-hover { border-left-style: dashed; border-left-color: rgba(var(--theme-fg), 0.6); }
.mini-launcher-panel[data-join="top"].tb-join-hover  { border-top-style: dashed;  border-top-color: rgba(var(--theme-fg), 0.6); }
.mini-launcher-panel[data-join="right"] > .panel-bar { border-top-right-radius: 4px; }
.mini-launcher-panel[data-join="left"]  > .panel-bar { border-top-left-radius: 4px; }
.mini-launcher-panel[data-join="top"]   > .panel-bar { border-top-left-radius: 4px; border-top-right-radius: 4px; }

/* "visibility": "Off" (json/buttons.json, documented in app/config.py) —
   never shown in any state, for anyone; display:none frees the slot too, so
   the rest of the group's grid closes up around it. !important so no
   per-state rule above (Studio/Atlas/... — each of which sets display) can
   ever turn it back on. */
.btn-toggle[data-visibility="Off"],
.mini-launcher-block[data-visibility="Off"] {
  display: none !important;
}

/* Breadcrumb popover's enlarge toggle — the card strips' own round glassy
   .btn-info + .mb-group-max-btn icon rules do the look; only its place (a
   float in the popover's top-right corner, text wraps around it) and the
   Restore icon while enlarged are set here. zoom on .crumbs-body (not the
   popover) scales the text/arrows/icons 1.5x without moving the popover
   itself; no overflow rule, so there's never a scrollbar. */
#seg-bar-crumbs-popover .crumbs-max-btn {
  float: right;
  margin: -2px -4px 0 10px;
}
#seg-bar-crumbs-popover[data-enlarged="1"] .crumbs-body { zoom: 1.5; }
#seg-bar-crumbs-popover[data-enlarged="1"] .crumbs-max-btn::before {
  -webkit-mask-image: url('/static/icons/menu/Restore.svg?v=1792024277');
  mask-image: url('/static/icons/menu/Restore.svg?v=1792024277');
}
/* The layout name after the site name in the seg bar's dropdown trigger. */
.seg-bar-layout-name { opacity: 0.6; }
.seg-bar-zone-name { font-weight: 600; }

/* A plan's input layer that has no result yet — say so and offer to run it (never auto-runs). */
.plan-input-idle { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 4px 0; }
.plan-input-idle .plan-input-run { flex: 0 0 auto; }

/* Landbook Marketplace — layers.html's "List this zone for…" panel
   (html/layers.html's initMarketplaceListingPanel). */
#marketplace-listing-panel {
  margin: 10px 0 16px;
  padding: 10px 12px;
  border: 1px solid var(--midgrey);
  border-radius: var(--smallcorner);
}
.marketplace-listing-title { font-weight: 600; font-size: 0.85rem; margin-bottom: 6px; }
.marketplace-listing-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; padding: 3px 0; cursor: pointer;
}
.marketplace-listing-checkbox:disabled { cursor: not-allowed; }
.marketplace-listing-row:has(.marketplace-listing-checkbox:disabled) { opacity: 0.55; cursor: default; }
.marketplace-interest-title { font-weight: 600; font-size: 0.85rem; margin: 10px 0 6px; }
.marketplace-interest-row { font-size: 0.82rem; padding: 4px 0; border-top: 1px solid var(--lightgrey, #eee); }
.marketplace-interest-row:first-child { border-top: none; }
.marketplace-interest-message { opacity: 0.75; margin-top: 2px; }

/* Admin's invite rows — one letter-icon toggle per subsidiary
   (html/admin_requests.html's _subsidiaryToggleHtml). */
.admin-subsidiary-toggles { display: flex; gap: 4px; flex-shrink: 0; }
.admin-subsidiary-toggle-btn {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--midgrey); background: var(--white);
  color: var(--darkgrey); font-size: 0.7rem; font-weight: 700;
  cursor: pointer; line-height: 1; padding: 0;
}
.admin-subsidiary-toggle-btn.is-active {
  background: var(--green, #006B2C); border-color: var(--green, #006B2C); color: var(--white);
}
.admin-subsidiary-toggle-btn:disabled { opacity: 0.6; cursor: default; }
/* The 5th, larger "mother" circle (B2C Landbook access) — set apart
   from the four subsidiary icons by size and a left margin, since it
   gates something different (the whole My Sites app) rather than one
   more marketplace channel. */
.admin-subsidiary-toggle-btn--mother {
  width: 26px; height: 26px; font-size: 0.78rem; margin-left: 4px;
}
