/* Treegens Earth - Google Earth-style UI */
:root {
  --lime-1: #d3e165;
  --lime-2: #b6bf56;
  --lime-3: #989c46;
  --bark-1: #3a2f19;
  --bark-2: #1e0f09;
  --panel: rgba(32, 33, 36, 0.92);
  --panel-solid: #202124;
  --panel-2: #2d2e31;
  --txt: #e8eaed;
  --txt-2: #9aa0a6;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #c6d453;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.5), 0 4px 16px rgba(0,0,0,.35);
  --font: 'Roboto', 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  /* viewport-fit=cover paints the globe under the notch/home indicator;
     chrome uses these so Fund, search and the sheet stay tappable. */
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; background: #000; }
body { font-family: var(--font); color: var(--txt); }
button { font-family: var(--font); cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: var(--font); }

#globe { position: fixed; inset: 0; }
#globe canvas { outline: none; }
#globe .cesium-viewer, #globe .cesium-widget, #globe .cesium-widget canvas { width: 100%; height: 100%; }
#globe .cesium-viewer-bottom { display: none; } /* credits render in our attribution bar instead */

/* HTML pin overlay, projected by Cesium each frame */
#markers { position: fixed; inset: 0; z-index: 10; pointer-events: none; overflow: hidden; }
#markers .marker { position: absolute; }

/* Cesium credits, restyled to match the attribution bar */
#cesium-credits { pointer-events: auto; }
#cesium-credits .cesium-credit-logoContainer, #cesium-credits .cesium-credit-expand-link { display: none !important; }
#cesium-credits, #cesium-credits a { color: rgba(255,255,255,.55); font-size: 11px; text-decoration: none; }

/* ---------- Loading splash ---------- */
#splash {
  position: fixed; inset: 0; z-index: 100; background: #000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  transition: opacity .8s ease;
}
#splash.hide { opacity: 0; pointer-events: none; }
#splash img { width: min(420px, 70vw); }
#splash .bar {
  width: min(320px, 60vw); height: 3px; border-radius: 2px; background: rgba(255,255,255,.14); overflow: hidden;
}
#splash .bar i {
  display: block; height: 100%; width: 40%; border-radius: 2px;
  background: linear-gradient(90deg, var(--lime-1), var(--lime-3));
  animation: load 1.2s ease-in-out infinite;
}
@keyframes load { 0% { transform: translateX(-100%);} 100% { transform: translateX(350%);} }
#splash p { color: var(--txt-2); font-size: 13px; letter-spacing: .4px; }

/* ---------- Top-left: search pill ---------- */
.searchbar {
  position: fixed; top: max(16px, var(--safe-t)); left: max(16px, var(--safe-l)); z-index: 40;
  display: flex; align-items: center; gap: 4px;
  background: var(--panel); backdrop-filter: blur(12px);
  border-radius: 24px; box-shadow: var(--shadow);
  height: 48px; padding: 0 8px 0 6px; width: min(392px, calc(100vw - 32px));
}
.searchbar .logo-chip { display: flex; align-items: center; padding: 0 4px 0 6px; }
.searchbar .logo-chip img { height: 26px; display: block; }
.searchbar input {
  flex: 1; background: none; border: none; outline: none; color: var(--txt);
  font-size: 15px; min-width: 0;
}
.searchbar input::placeholder { color: var(--txt-2); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--txt-2); flex: none; transition: background .15s;
}
.icon-btn:hover { background: rgba(255,255,255,.08); color: var(--txt); }
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; }

.search-results {
  position: fixed; top: calc(56px + max(16px, var(--safe-t))); left: max(16px, var(--safe-l)); z-index: 40; width: min(392px, calc(100vw - 32px));
  background: var(--panel-solid); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; display: none;
  max-height: calc(100dvh - 56px - max(16px, var(--safe-t)) - 16px - var(--safe-b));
}
.search-results.open { display: block; }
.search-empty { margin: 0; padding: 14px 16px; font-size: 13.5px; color: var(--txt-2); line-height: 1.45; }
.search-results button {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 11px 16px; font-size: 14px; color: var(--txt);
}
.search-results button:hover { background: rgba(255,255,255,.07); }
.search-results .pin-ico { color: var(--accent); flex: none; display: flex; }
.search-results .pin-ico svg { width: 18px; height: 18px; fill: currentColor; }
.search-results .sub { color: var(--txt-2); font-size: 12px; margin-left: auto; padding-left: 8px; white-space: nowrap; }

/* ---------- Left rail ---------- */
.rail {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 30; width: 64px;
  background: rgba(18, 19, 20, 0.82); backdrop-filter: blur(10px);
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 80px;
  border-right: 1px solid rgba(255,255,255,.05);
}
.rail button {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--txt-2); position: relative; transition: background .15s, color .15s;
}
.rail button:hover, .rail button.active { background: rgba(198, 212, 83, .14); color: var(--accent); }
.rail button svg { width: 22px; height: 22px; fill: currentColor; }
.rail button .tip {
  position: absolute; left: 58px; top: 50%; transform: translateY(-50%);
  background: #111; color: var(--txt); font-size: 12px; padding: 5px 10px; border-radius: 6px;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; box-shadow: var(--shadow);
}
.rail button:hover .tip { opacity: 1; }
.rail .spacer { flex: 1; }

/* ---------- Stats HUD (top right) ---------- */
.hud {
  position: fixed; top: max(16px, var(--safe-t)); right: max(16px, var(--safe-r)); z-index: 30;
  display: flex; gap: 10px; align-items: center;
}
.hud .stat {
  background: var(--panel); backdrop-filter: blur(12px); border-radius: 24px;
  box-shadow: var(--shadow); padding: 8px 16px; display: flex; flex-direction: column; align-items: flex-end;
}
.hud .stat b { font-size: 16px; color: var(--accent); font-weight: 500; letter-spacing: .3px; }
.hud .stat span { font-size: 10.5px; color: var(--txt-2); text-transform: uppercase; letter-spacing: .8px; }
.hud .fund-cta {
  height: 48px; padding: 0 22px; border-radius: 24px; font-size: 14.5px; font-weight: 600;
  background: linear-gradient(180deg, var(--lime-1), var(--lime-3)); color: var(--bark-2);
  box-shadow: var(--shadow); display: flex; align-items: center; gap: 8px; transition: transform .15s, filter .15s;
}
.hud .fund-cta:hover { transform: translateY(-1px); filter: brightness(1.06); }
.hud .fund-cta svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- Bottom-right nav controls ---------- */
.nav-controls {
  position: fixed; right: max(16px, var(--safe-r)); bottom: calc(24px + var(--safe-b)); z-index: 30;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.nav-controls .compass {
  width: 44px; height: 44px; border-radius: 50%; background: var(--panel); box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center; transition: transform .3s;
}
.nav-controls .zoombox {
  background: var(--panel); backdrop-filter: blur(12px); border-radius: 22px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden;
}
.nav-controls .zoombox button {
  width: 44px; height: 44px; font-size: 22px; color: var(--txt-2); display: flex; align-items: center; justify-content: center;
}
.nav-controls .zoombox button:hover { color: var(--txt); background: rgba(255,255,255,.07); }
.nav-controls .zoombox hr { border: none; border-top: 1px solid var(--line); margin: 0 10px; }

/* Honest note on legacy field-team sites: these predate the on-chain
   per-planter split, and the panel says so rather than implying otherwise. */
.payout-note {
  margin: 10px 0 2px; padding: 9px 11px; border-radius: 9px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  color: var(--txt-2); font-size: 11.5px; line-height: 1.5;
}
.payout-note a { color: var(--accent); text-decoration: none; }
.payout-note a:hover { text-decoration: underline; }

/* ---------- Attribution (bottom center) ---------- */
.attribution {
  position: fixed; bottom: 8px; left: 50%; transform: translateX(-50%); z-index: 20;
  color: rgba(255,255,255,.55); font-size: 11px; letter-spacing: .2px; text-shadow: 0 1px 2px #000;
  pointer-events: none; white-space: nowrap;
}

/* The credit line is ~660px wide and centred, so under roughly 1400px it ran
   into the bottom-left wordmark ("fund planters directly" sat on top of
   "Imagery: Sentinel-2"). Below that, give it its own band between the
   wordmark and the right-hand nav controls and let it wrap instead of
   overlapping. Imagery credits are required, so it wraps rather than
   truncating. */
@media (max-width: 1400px) {
  .attribution {
    left: 340px; right: 76px; transform: none;
    white-space: normal; text-align: center; line-height: 1.35;
  }
}

/* Bottom-left wordmark */
.wordmark {
  position: fixed; left: 76px; bottom: calc(12px + var(--safe-b)); z-index: 20; pointer-events: none;
  display: flex; align-items: baseline; gap: 7px; text-shadow: 0 1px 3px #000;
}
.wordmark b { font-size: 17px; font-weight: 500; color: #fff; letter-spacing: .2px; }
.wordmark span { font-size: 11.5px; color: rgba(255,255,255,.65); }

/* ---------- Globe pin markers ---------- */
.marker { transform: translate(-50%, -100%); cursor: pointer; pointer-events: auto; will-change: left, top; }
.marker .pin {
  display: flex; flex-direction: column; align-items: center; filter: drop-shadow(0 3px 6px rgba(0,0,0,.6));
  transition: transform .18s ease;
}
.marker:hover .pin { transform: scale(1.18) translateY(-2px); }
.marker .count {
  background: linear-gradient(180deg, var(--lime-1), var(--lime-2));
  color: var(--bark-2); font-size: 11.5px; font-weight: 700; letter-spacing: .2px;
  padding: 4px 9px; border-radius: 12px; white-space: nowrap; margin-bottom: 2px;
  border: 1.5px solid rgba(30, 15, 9, .35);
}
.marker svg.drop { width: 26px; height: 34px; display: block; }
.marker .pulse {
  position: absolute; left: 50%; bottom: -7px; width: 26px; height: 10px; transform: translateX(-50%);
  border-radius: 50%; background: radial-gradient(ellipse, rgba(211,225,101,.55), transparent 70%);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse { 0%,100% { opacity: .5; transform: translateX(-50%) scale(1);} 50% { opacity: 1; transform: translateX(-50%) scale(1.5);} }

/* ---------- Site knowledge panel (left card, Google Earth style) ---------- */
.panel {
  position: fixed; top: 80px; left: 80px; bottom: 24px; z-index: 35; width: min(400px, calc(100vw - 96px));
  background: var(--panel-solid); border-radius: 14px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateX(-120%); opacity: 0; visibility: hidden;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .3s, visibility 0s linear .35s;
}
/* Closed panel keeps its empty #p-name heading and every field/button out of
   the accessibility tree and tab order until a site is opened and JS fills
   them - visibility (not display) is used so the slide/fade transition still
   plays, and the visibility switch is delayed on close so the fade is seen. */
.panel.open { transform: translateX(0); opacity: 1; visibility: visible; transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .3s; }
.panel-scroll { overflow-y: auto; overscroll-behavior: contain; flex: 1; }
.panel-scroll::-webkit-scrollbar { width: 8px; }
.panel-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 4px; }

/* Title block only. It used to be a 180px stock photo with the name burned over
   it; the panel now leads with the plot's own footage instead. */
.panel .hero { position: relative; flex: none; padding: 16px 56px 12px 18px; }
/* Field-team tally vs machine count of the same AFTER clip. */
.ai-count { margin-top: 10px; background: var(--panel-2); border-radius: 10px; padding: 12px; }
.ai-count-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.ai-fig b { font-size: 22px; }
.ai-fig b { display: block; font-size: 16px; font-weight: 500; color: var(--txt); }
.ai-fig span { font-size: 10.5px; color: var(--txt-2); text-transform: uppercase; letter-spacing: .5px; line-height: 1.3; display: block; margin-top: 2px; }
.ai-note { font-size: 11.5px; color: var(--txt-2); margin-top: 9px; line-height: 1.45; }
.ai-watch {
  margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-size: 12px; font-weight: 500; padding: 7px 12px; border-radius: 14px;
  background: rgba(138,180,248,.12); color: #8ab4f8; border: 1px solid rgba(138,180,248,.25);
}
.ai-watch:hover { background: rgba(138,180,248,.2); }

.panel .hero .close {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center;
}
.panel .hero .close:hover { background: rgba(0,0,0,.8); }
.panel .hero .title { position: static; }
.panel .hero .title h2 { font-size: 21px; font-weight: 500; }
.panel .hero .title p { font-size: 13px; color: #cfd2d6; margin-top: 2px; }

.panel .body { padding: 14px 18px 18px; }

.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 500;
  padding: 5px 10px; border-radius: 14px; letter-spacing: .2px;
  background: rgba(198,212,83,.12); color: var(--accent); border: 1px solid rgba(198,212,83,.25);
}
.badge svg { width: 13px; height: 13px; fill: currentColor; }
.badge.blue { background: rgba(138,180,248,.12); color: #8ab4f8; border-color: rgba(138,180,248,.25); }
/* Awaiting verification: amber, matching its pin on the globe. */
.badge.pending { background: rgba(232,207,114,.13); color: #e8cf72; border-color: rgba(232,207,114,.3); }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.fact { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; }
.fact b { display: block; font-size: 16px; font-weight: 500; color: var(--txt); }
.fact span { font-size: 11px; color: var(--txt-2); text-transform: uppercase; letter-spacing: .6px; }

.progress { margin-bottom: 16px; }
.progress .track { height: 6px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; }
.progress .fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--lime-1), var(--lime-3)); transition: width .8s ease; }
.progress .lbl { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--txt-2); margin-top: 5px; }

.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--txt-2); margin: 18px 0 10px; display: flex; align-items: center; gap: 8px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* Before / after videos */
.ba-toggle { display: flex; background: var(--panel-2); border-radius: 20px; padding: 3px; margin-bottom: 10px; }
.ba-toggle button {
  flex: 1; padding: 7px 0; border-radius: 17px; font-size: 12.5px; font-weight: 600; color: var(--txt-2);
  transition: background .2s, color .2s;
}
.ba-toggle button.active { background: linear-gradient(180deg, var(--lime-1), var(--lime-2)); color: var(--bark-2); }
.ba-video { position: relative; border-radius: 12px; overflow: hidden; background: #000; aspect-ratio: 16/10; }
/* Empty state: a plot with no real footage of its own shows this, never another plot's clip */
.ba-video.empty { background: var(--panel-2); }
.ba-empty {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px; text-align: center; padding: 18px 22px;
}
.ba-empty[hidden] { display: none; }
.ba-empty svg { fill: var(--txt-2); opacity: .55; }
.ba-empty b { font-size: 13px; color: var(--txt); }
.ba-empty span { font-size: 11.5px; line-height: 1.5; color: var(--txt-2); max-width: 30ch; }
/* Where this clip was filmed - shown under the player so the Drive iframe can't cover it */
.ba-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px;
  font-family: 'SF Mono', ui-monospace, monospace; font-size: 10px; color: var(--txt-2);
}
.ba-meta[hidden] { display: none; }
.ba-meta .stamp {
  background: var(--panel-2); color: var(--txt); font-family: var(--font);
  font-size: 10px; font-weight: 600; letter-spacing: .5px; padding: 3px 8px; border-radius: 5px;
}
.ba-meta #ba-date { margin-left: auto; }

.planter-note {
  display: flex; gap: 10px; align-items: flex-start; background: var(--panel-2); border-radius: 10px;
  padding: 11px 12px; font-size: 12.5px; color: var(--txt-2); line-height: 1.5; margin-top: 14px;
}
.planter-note svg { width: 16px; height: 16px; fill: var(--accent); flex: none; margin-top: 1px; }
.planter-note b { color: var(--txt); font-weight: 500; }

.panel .foot {
  flex: none; padding: 12px 18px; padding-bottom: max(12px, var(--safe-b));
  border-top: 1px solid var(--line); background: var(--panel-solid);
  display: flex; gap: 10px;
}
.btn-fund {
  flex: 1; height: 44px; border-radius: 22px; font-size: 14.5px; font-weight: 600;
  background: linear-gradient(180deg, var(--lime-1), var(--lime-3)); color: var(--bark-2);
  display: flex; align-items: center; justify-content: center; gap: 8px; transition: filter .15s;
}
.btn-fund:hover { filter: brightness(1.07); }
.btn-fund svg { width: 17px; height: 17px; fill: currentColor; }
/* Not yet purchasable (pending verification, or already funded): the button
   states why instead of offering an action that cannot complete. */
.btn-fund.is-disabled {
  background: rgba(255,255,255,.07); color: rgba(255,255,255,.55);
  cursor: default; font-weight: 500;
}
.btn-fund.is-disabled:hover { filter: none; }
.btn-ghost {
  height: 44px; padding: 0 16px; border-radius: 22px; font-size: 13.5px; font-weight: 500;
  color: var(--accent); border: 1px solid rgba(198,212,83,.4);
}
.btn-ghost:hover { background: rgba(198,212,83,.1); }

/* ---------- Fund modal ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.6); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: max(20px, var(--safe-t)) 20px max(20px, var(--safe-b));
  opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .25s, visibility 0s linear .25s;
}
/* visibility (not display:none) keeps the fade transition; it also takes every
   closed modal's headings, inputs and buttons out of the accessibility tree
   and tab order, instead of leaving them focusable underneath the live page. */
.overlay.open { opacity: 1; pointer-events: auto; visibility: visible; transition: opacity .25s; }
.modal {
  width: 440px; max-width: 100%; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto;
  background: var(--panel-solid); border-radius: 18px; box-shadow: 0 8px 40px rgba(0,0,0,.6);
  transform: translateY(16px) scale(.98); transition: transform .25s;
}
.overlay.open .modal { transform: none; }
.modal-head { padding: 20px 22px 0; display: flex; justify-content: space-between; align-items: flex-start; }
.modal-head h3 { font-size: 19px; font-weight: 500; }
.modal-head p { font-size: 12.5px; color: var(--txt-2); margin-top: 3px; }
.modal-body { padding: 16px 22px 22px; }

/* Scope chooser: shown only when a buyable planting's panel is open. */
.fund-scope { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.fund-scope button {
  padding: 10px 8px; border-radius: 12px; background: var(--panel-2);
  border: 1.5px solid transparent; color: var(--txt-2);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 13px; font-weight: 600;
}
.fund-scope button small { font-size: 10px; font-weight: 500; opacity: .75; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fund-scope button.active { border-color: var(--lime-2); color: var(--txt-1); }
.fund-scope button:hover { border-color: var(--lime-3); }

.freq-toggle { display: flex; background: var(--panel-2); border-radius: 22px; padding: 3px; margin-bottom: 16px; }
.freq-toggle button { flex: 1; padding: 9px 0; border-radius: 19px; font-size: 13px; font-weight: 600; color: var(--txt-2); }
.freq-toggle button.active { background: linear-gradient(180deg, var(--lime-1), var(--lime-2)); color: var(--bark-2); }
.freq-toggle button small { display: block; font-size: 10px; font-weight: 500; opacity: .75; }

.amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 12px; }
.amounts button {
  padding: 12px 4px; border-radius: 12px; background: var(--panel-2); border: 1.5px solid transparent;
  display: flex; flex-direction: column; align-items: center; gap: 2px; transition: border-color .15s, background .15s;
  position: relative;
}
.amounts button .pop {
  position: absolute; top: -7px; left: 50%; transform: translateX(-50%);
  font-style: normal; font-size: 8px; font-weight: 700; letter-spacing: .6px;
  background: linear-gradient(180deg, var(--lime-1), var(--lime-3)); color: var(--bark-2);
  padding: 2px 7px; border-radius: 7px; white-space: nowrap;
}
a.badge { text-decoration: none; cursor: pointer; }
a.badge:hover { filter: brightness(1.25); }
.amounts button b { font-size: 16px; font-weight: 600; color: var(--txt); }
.amounts button span { font-size: 10.5px; color: var(--txt-2); }
.amounts button.active { border-color: var(--accent); background: rgba(198,212,83,.1); }
.amounts button.active span { color: var(--accent); }

.custom-amt { position: relative; margin-bottom: 14px; }
.custom-amt span.cur { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--txt-2); font-size: 15px; }
.custom-amt input {
  width: 100%; background: var(--panel-2); border: 1.5px solid transparent; border-radius: 12px;
  padding: 12px 12px 12px 30px; color: var(--txt); font-size: 15px; outline: none;
}
.custom-amt input:focus { border-color: var(--accent); }
.custom-amt .trees-out { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--accent); font-weight: 600; }

.split-note {
  display: flex; align-items: center; gap: 10px; background: rgba(198,212,83,.08); border: 1px solid rgba(198,212,83,.2);
  border-radius: 10px; padding: 10px 12px; font-size: 12px; color: var(--txt-2); line-height: 1.45; margin-bottom: 16px;
}
.split-note b { color: var(--accent); font-size: 15px; }

.pay-btn {
  width: 100%; height: 48px; border-radius: 12px; font-size: 15px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 9px;
  transition: filter .15s, transform .1s;
}
.pay-btn:active { transform: scale(.99); }
.pay-btn.apple { background: #fff; color: #000; }
.pay-btn.google { background: #000; color: #fff; border: 1px solid rgba(255,255,255,.35); }
.pay-btn.card { background: var(--panel-2); color: var(--txt); font-weight: 500; font-size: 13.5px; height: 42px; }
.pay-btn:hover { filter: brightness(.94); }
.pay-btn.google:hover, .pay-btn.card:hover { filter: brightness(1.25); }
.pay-btn svg { height: 22px; }
.pay-secure { text-align: center; font-size: 10.5px; color: var(--txt-2); display: flex; align-items: center; justify-content: center; gap: 5px; }
.tgn-path {
  display: block; margin-top: 12px; padding: 10px 14px; border-radius: 10px;
  background: rgba(198,212,83,.07); border: 1px dashed rgba(198,212,83,.3);
  font-size: 11.5px; line-height: 1.5; color: var(--txt-2); text-decoration: none;
  text-align: center; transition: background .15s;
}
.tgn-path:hover { background: rgba(198,212,83,.13); }
.tgn-path b { color: var(--accent); }
.pay-secure svg { width: 11px; height: 11px; fill: var(--txt-2); }
#pr-button { margin-bottom: 9px; }

/* Success state */
.success { text-align: center; padding: 8px 0 4px; }
.success .ring {
  width: 76px; height: 76px; margin: 6px auto 16px; border-radius: 50%;
  background: linear-gradient(180deg, var(--lime-1), var(--lime-3)); color: var(--bark-2);
  display: flex; align-items: center; justify-content: center; animation: pop .5s cubic-bezier(.2,1.6,.4,1);
}
.success .ring svg { width: 38px; height: 38px; fill: currentColor; }
@keyframes pop { 0% { transform: scale(.3); opacity: 0;} 100% { transform: scale(1); opacity: 1;} }
.success h3 { font-size: 20px; font-weight: 500; margin-bottom: 6px; }
.success p { font-size: 13px; color: var(--txt-2); line-height: 1.55; }
.success .receipt {
  margin: 16px 0; background: var(--panel-2); border-radius: 12px; padding: 13px 16px; text-align: left;
}
.success .receipt div { display: flex; justify-content: space-between; font-size: 12.5px; padding: 4px 0; color: var(--txt-2); }
.success .receipt div b { color: var(--txt); font-weight: 500; }
.success .receipt div.hl b { color: var(--accent); }

/* ---------- About modal ---------- */
.about-list { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.about-item { display: flex; gap: 13px; align-items: flex-start; }
.about-item .ic {
  width: 40px; height: 40px; border-radius: 12px; flex: none; display: flex; align-items: center; justify-content: center;
  background: rgba(198,212,83,.12); color: var(--accent);
}
.about-item .ic svg { width: 20px; height: 20px; fill: currentColor; }
.about-item b { display: block; font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.about-item p { font-size: 12.5px; color: var(--txt-2); line-height: 1.5; }

/* ---------- Welcome card ---------- */
.welcome-card { text-align: center; padding: 30px 30px 24px; width: 460px; }
.welcome-card .w-logo { height: 44px; margin-bottom: 16px; }
.welcome-card h2 { font-size: 23px; font-weight: 500; line-height: 1.25; margin-bottom: 10px; }
.welcome-card .w-sub { font-size: 13.5px; color: var(--txt-2); line-height: 1.55; margin-bottom: 18px; }
.w-points { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; text-align: left; }
.w-points div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  background: var(--panel-2); border-radius: 10px; padding: 10px 14px;
}
.w-points b { font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.w-points span { font-size: 11.5px; color: var(--txt-2); text-align: right; }
.welcome-card .w-explore { width: 100%; margin-bottom: 9px; }
.welcome-card .w-fund { width: 100%; }

/* ---------- Camera status readout ---------- */
.camstat {
  position: fixed; right: 16px; bottom: 208px; z-index: 20; pointer-events: none;
  font-family: 'SF Mono', ui-monospace, monospace; font-size: 10.5px; text-align: right;
  color: rgba(255,255,255,.62); text-shadow: 0 1px 2px #000; line-height: 1.5; white-space: pre-line;
}

/* Planting pins. Lime = verified by the verifier majority and fundable; amber =
   still pending verification, and deliberately not for sale. The label carries
   ✅/⏳ too, so the state does not rest on colour alone. */
.pin-verified .count { background: linear-gradient(180deg, var(--lime-1), var(--lime-2)); border-color: rgba(30,15,9,.35); }
.pin-pending .count { background: linear-gradient(180deg, #e8cf72, #c9a227); border-color: rgba(40,30,5,.35); }
.pin-pending .pulse { background: radial-gradient(ellipse, rgba(232,207,114,.5), transparent 70%); }

/* Hide pin count chips at far zoom (declutter); reveal on hover */
#markers.far .marker .count { display: none; }
#markers.far .marker:hover .count { display: block; }

/* Success extras */
.nudge { font-size: 11.5px; color: var(--txt-2); margin: -6px 0 12px; line-height: 1.5; }

/* Live supporters ticker (real Stripe data only). Clickable: it opens the
   recent-activity feed, so it gets pointer events and a hover state. */
.liveticker {
  position: fixed; left: 76px; bottom: calc(42px + var(--safe-b)); z-index: 20; pointer-events: none; cursor: pointer;
  background: rgba(18,19,20,.78); backdrop-filter: blur(8px);
  color: var(--txt); font-size: 12px; padding: 7px 14px; border-radius: 16px;
  border: 1px solid rgba(198,212,83,.25); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .4s, transform .4s, visibility 0s linear .4s;
}
/* role="button" tabindex="0" is static in the markup, so before any funding
   data arrives this stays out of the tab order and AT tree rather than
   sitting as a focusable, empty, unlabelled stop on the page. */
.liveticker.show { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); transition: opacity .4s, transform .4s; }
.liveticker.show:hover { border-color: rgba(198,212,83,.55); }

/* Real funded count inside site panel */
.funded-line {
  display: flex; align-items: center; font-size: 12.5px; color: var(--accent);
  background: rgba(198,212,83,.08); border: 1px solid rgba(198,212,83,.2);
  border-radius: 10px; padding: 9px 12px; margin-bottom: 4px;
}
.funded-line b { margin-left: 4px; }

.eco-links {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px;
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--txt-2);
}
.eco-links a {
  color: var(--accent); text-decoration: none; padding: 5px 12px;
  border: 1px solid rgba(198,212,83,.28); border-radius: 999px; transition: background .15s;
}
.eco-links a:hover { background: rgba(198,212,83,.1); }
.about-foot { font-size: 12px; color: var(--txt-2); margin-top: 16px; text-align: center; }
.about-foot a { color: var(--accent); text-decoration: none; }
.about-foot a:hover { text-decoration: underline; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: calc(28px + var(--safe-b)); left: 50%; transform: translate(-50%, 80px); z-index: 70;
  background: #111; color: var(--txt); font-size: 13px; padding: 12px 20px; border-radius: 10px;
  box-shadow: var(--shadow); transition: transform .3s cubic-bezier(.2,.8,.2,1); max-width: calc(100vw - 40px);
}
.toast.show { transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .rail { display: none; }
  .wordmark { left: 14px; }
  .hud { top: auto; bottom: calc(84px + var(--safe-b)); right: 12px; flex-direction: column; align-items: flex-end; }
  .hud .stat { display: none; }
  .panel {
    top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 72vh; border-radius: 18px 18px 0 0;
    transform: translateY(110%);
  }
  .panel.open { transform: translateY(0); }
  /* 90px sat on the HUD Fund button (same corner, same z-index). Compass
     stays in the thumb zone, above the home indicator; Fund sits above the live ticker. */
  .nav-controls { bottom: calc(24px + var(--safe-b)); }
  .attribution { display: none; }
  .camstat { display: none; }
  .welcome-card { width: 100%; }
  .liveticker { left: 12px; right: auto; bottom: calc(42px + var(--safe-b)); font-size: 11px; max-width: calc(100vw - 90px); }
}

/* Touch phones pinch-zoom the globe. The +/- cluster was covering Fund Trees. */
@media (max-width: 720px) and (hover: none) {
  .nav-controls .zoombox { display: none; }
}
/* A narrow desktop window still has a mouse wheel; keep zoom and put Fund back at the top. */
@media (max-width: 720px) and (hover: hover) {
  .hud { top: max(16px, var(--safe-t)); bottom: auto; }
}


/* ---------- embed mode: chrome-free globe for treegens.org ---------- */
body.embed .searchbar,
body.embed .search-results,
body.embed .rail,
body.embed .hud,
body.embed .wordmark { display: none !important; }
body.embed #splash { display: none; }
body.embed .zoombox { display: none !important; } /* the orb pans only */ /* the parent's poster is the loading state */
body.embed .attribution { font-size: 9px; opacity: .5; padding: 4px 8px; }
body.embed #splash p { font-size: 13px; }


/* The per-clip "field video" pins are gone with the Google Drive field log:
   a planting is now one pin that opens its own two clips. */

/* ================= 2026-07-30 UX round ================= */

/* These blocks set their own display, which silently defeats the `hidden`
   attribute the JS toggles - restate it with priority. */
.legend[hidden], .activity[hidden], .tour-hud[hidden],
.p-timeline[hidden], .impact-note[hidden], .price-why[hidden] { display: none !important; }

/* Pin legend + status filters (bottom-left, above the wordmark) */
.legend {
  position: fixed; left: 76px; bottom: calc(76px + var(--safe-b)); z-index: 20;
  display: flex; gap: 6px;
}
.legend button {
  display: flex; align-items: center; gap: 5px;
  background: rgba(18,19,20,.78); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.14); border-radius: 14px;
  color: var(--txt-2); font-size: 11.5px; padding: 5px 11px; cursor: pointer;
  transition: opacity .2s, border-color .2s;
}
.legend button b { font-weight: 600; color: var(--txt-2); }
.legend button.on { color: var(--txt); border-color: rgba(198,212,83,.4); }
.legend button.on b { color: var(--accent); }
.legend button:not(.on) { opacity: .45; text-decoration: line-through; }

/* Recent activity feed (expands from the ticker) */
.activity {
  position: fixed; left: 76px; bottom: calc(78px + var(--safe-b)); z-index: 40;
  width: min(340px, calc(100vw - 96px));
  background: var(--panel); border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px; box-shadow: var(--shadow); overflow: hidden;
}
.activity-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 8px 10px 16px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.activity-head b { font-size: 13.5px; font-weight: 500; }
.activity-body { max-height: 300px; overflow-y: auto; padding: 6px; }
.activity-row {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 8px 10px; border-radius: 9px; color: var(--txt); font-size: 12.5px;
}
.activity-row:hover:not(:disabled) { background: rgba(255,255,255,.06); }
.activity-row:disabled { cursor: default; }
.activity-row .ico { flex: none; }
.activity-row .txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-row .when { flex: none; color: var(--txt-2); font-size: 11px; }
.activity-empty { padding: 14px 16px; color: var(--txt-2); font-size: 12.5px; }

/* Tour progress (bottom-center while touring) */
.tour-hud {
  position: fixed; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translateX(-50%); z-index: 40;
  display: flex; align-items: center; gap: 12px;
  background: rgba(18,19,20,.85); backdrop-filter: blur(8px);
  border: 1px solid rgba(198,212,83,.3); border-radius: 20px; padding: 8px 14px;
  box-shadow: var(--shadow);
}
.tour-dots { display: flex; gap: 6px; }
.tour-dots i {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.22); transition: background .3s, transform .3s;
}
.tour-dots i.on { background: var(--accent); transform: scale(1.25); }
.tour-dots i.seen { background: rgba(198,212,83,.45); }
.tour-hud button {
  font-size: 12px; font-weight: 600; color: var(--txt); cursor: pointer;
  padding: 5px 11px; border-radius: 13px; background: rgba(255,255,255,.08);
}
.tour-hud button:hover { background: rgba(255,255,255,.16); }
#tour-skip { color: var(--accent); }

/* Filmed → Verified → Funded micro-timeline in the site panel */
.p-timeline {
  display: flex; gap: 4px; margin: 2px 0 16px;
}
.p-timeline .tl-step {
  flex: 1; position: relative; text-align: center; padding-top: 13px;
}
.p-timeline .tl-step i {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,.18); border: 2px solid rgba(255,255,255,.25);
}
.p-timeline .tl-step::before {
  content: ''; position: absolute; top: 4px; right: 50%; width: 100%; height: 2px;
  background: rgba(255,255,255,.12); z-index: -1;
}
.p-timeline .tl-step:first-child::before { display: none; }
.p-timeline .tl-step.done i { background: var(--accent); border-color: var(--accent); }
.p-timeline .tl-step.done::before { background: rgba(198,212,83,.4); }
.p-timeline .tl-step b { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--txt-2); }
.p-timeline .tl-step.done b { color: var(--txt); }
.p-timeline .tl-step span { display: block; font-size: 11px; color: var(--txt-2); margin-top: 1px; }
.p-timeline .tl-step.done span { color: var(--accent); }

/* Share button beside the panel close - and room for both over the title */
.panel .hero .close.share { right: 52px; }
.panel .hero { padding-right: 98px; }

/* COMPARE wipe: land clip under, planting clip over, draggable divider */
#ba-compare-box { position: absolute; inset: 0; background: #000; }
#ba-compare-box video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
#ba-compare-box .cmp-top { position: absolute; inset: 0; will-change: clip-path; }
#ba-compare-box .cmp-divider {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px;
  background: var(--accent); box-shadow: 0 0 8px rgba(0,0,0,.7); pointer-events: none;
}
#ba-compare-box .cmp-divider::after {
  content: '◂ ▸'; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  background: var(--accent); color: var(--bark-2); font-size: 10px; font-weight: 700;
  padding: 4px 7px; border-radius: 11px; white-space: nowrap;
}
#ba-compare-box .cmp-lbl {
  position: absolute; top: 8px; font-size: 10px; font-weight: 700; letter-spacing: .8px;
  background: rgba(0,0,0,.55); color: #fff; padding: 3px 8px; border-radius: 9px; pointer-events: none;
}
#ba-compare-box .cmp-lbl.l { left: 8px; }
#ba-compare-box .cmp-lbl.r { right: 8px; }
#ba-compare-box .cmp-range {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; margin: 0;
}

/* Monthly impact projection in the fund modal */
.impact-note {
  background: rgba(198,212,83,.09); border: 1px solid rgba(198,212,83,.25);
  color: var(--txt); font-size: 12.5px; border-radius: 10px;
  padding: 8px 12px; margin-bottom: 14px;
}
.impact-note b { color: var(--accent); }

/* Why the two per-tree prices differ (fund + buy modals) */
.price-why { font-size: 11.5px; color: var(--txt-2); line-height: 1.45; margin: -4px 0 12px; }
.buy-chain {
  font-size: 11.5px; color: var(--txt-2); line-height: 1.45; margin: -2px 0 12px; text-align: center;
}
.buy-chain a { color: #8ab4f8; text-decoration: none; }
.buy-chain a:hover { text-decoration: underline; }

/* Accessible list view of every planting */
.list-rows { list-style: none; margin: 0; padding: 0; }
.list-rows li {
  display: flex; align-items: stretch; gap: 8px; margin-bottom: 8px;
}
.list-rows .list-open {
  flex: 1; min-width: 0; text-align: left; padding: 10px 12px; border-radius: 11px;
  background: var(--panel-2); color: var(--txt); border: 1px solid transparent;
}
.list-rows .list-open:hover { border-color: rgba(198,212,83,.4); }
.list-rows .list-open b { display: block; font-size: 13.5px; font-weight: 500; }
.list-rows .list-open span { display: block; font-size: 11.5px; color: var(--txt-2); margin-top: 1px; }
.list-rows .list-open .st.ok { color: var(--accent); }
.list-rows .list-open .st.pend { color: #e8cf72; }
.list-rows .list-fund {
  flex: none; align-self: center; padding: 9px 13px; border-radius: 11px;
  background: linear-gradient(180deg, var(--lime-1), var(--lime-2)); color: var(--bark-2);
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.list-rows .list-fund:hover { filter: brightness(1.06); }

/* ================= 2026-08-16 conversion round ================= */

/* Splash: real status line + an escape hatch for slow or low-end devices */
#splash-skip {
  margin-top: -6px; padding: 9px 18px; border-radius: 18px;
  font-size: 12.5px; font-weight: 500; color: var(--accent);
  border: 1px solid rgba(198,212,83,.4); background: none; cursor: pointer;
}
#splash-skip:hover { background: rgba(198,212,83,.1); }
#splash-skip[hidden] { display: none; }

/* Featured planting card: the default first impression. One verified, fundable
   planting with its proof and one primary action - or the honest state of the
   review queue when nothing is fundable yet. */
.featured {
  position: fixed; left: 50%; bottom: calc(40px + var(--safe-b)); transform: translateX(-50%); z-index: 45;
  width: min(400px, calc(100vw - 24px));
  background: var(--panel-solid); border: 1px solid rgba(198,212,83,.3);
  border-radius: 14px; box-shadow: var(--shadow); overflow: hidden;
}
.featured[hidden] { display: none !important; }
.feat-close {
  position: absolute; top: 8px; right: 8px; z-index: 2; width: 30px; height: 30px;
  border-radius: 50%; background: rgba(0,0,0,.5); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.feat-close:hover { background: rgba(0,0,0,.8); }
.featured video {
  display: block; width: 100%; aspect-ratio: 16/8; object-fit: cover; background: #000;
}
.feat-inner { padding: 12px 14px 14px; }
.feat-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 4px;
}
.feat-title { font-size: 15.5px; font-weight: 500; line-height: 1.3; }
.feat-sub { font-size: 12px; color: var(--txt-2); margin-top: 2px; line-height: 1.45; }
.feat-sub a { color: #8ab4f8; text-decoration: none; }
.feat-sub a:hover { text-decoration: underline; }
.feat-split {
  font-size: 11.5px; color: var(--txt-2); line-height: 1.45; margin-top: 8px;
  background: rgba(198,212,83,.07); border: 1px solid rgba(198,212,83,.18);
  border-radius: 9px; padding: 7px 10px;
}
.feat-split b { color: var(--accent); }
.feat-actions { display: flex; gap: 8px; margin-top: 11px; }
.feat-actions .btn-fund { height: 40px; font-size: 13.5px; }
.feat-actions .btn-ghost { height: 40px; font-size: 12.5px; padding: 0 13px; white-space: nowrap; }

/* First-visit 3-step guide pill. z-index 46 sits above the featured card (45)
   and the site panel (35); pointer-events none lets Fund this planting
   receive taps through the bar. Next / Done / dismiss opt back in. */
.guide {
  position: fixed; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translateX(-50%); z-index: 46;
  display: flex; align-items: center; gap: 11px;
  width: max-content; max-width: calc(100vw - 20px);
  background: rgba(18,19,20,.92); backdrop-filter: blur(8px);
  border: 1px solid rgba(198,212,83,.35); border-radius: 22px; padding: 9px 12px 9px 16px;
  box-shadow: var(--shadow);
  pointer-events: none;
}
.guide[hidden] { display: none !important; }
.guide-dots { display: flex; gap: 5px; flex: none; }
.guide-dots i {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,.22); transition: background .3s, transform .3s;
}
.guide-dots i.on { background: var(--accent); transform: scale(1.3); }
.guide-dots i.seen { background: rgba(198,212,83,.45); }
.guide-txt { font-size: 12.5px; line-height: 1.4; color: var(--txt); min-width: 0; }
.guide-txt b { color: var(--accent); font-weight: 600; }
#guide-next {
  flex: none; font-size: 12px; font-weight: 700; color: var(--bark-2);
  background: linear-gradient(180deg, var(--lime-1), var(--lime-2));
  padding: 7px 13px; border-radius: 15px;
  pointer-events: auto;
}
#guide-next:hover { filter: brightness(1.06); }
.guide-x {
  flex: none; width: 28px; height: 28px; border-radius: 50%; color: var(--txt-2);
  display: flex; align-items: center; justify-content: center;
  pointer-events: auto;
}
.guide-x:hover { background: rgba(255,255,255,.1); color: var(--txt); }

/* Desktop: keep the featured/panel Fund row above the bottom guide pill.
   Phones already park the pill under the search bar (reset in the 720px query). */
body.has-guide .featured { bottom: calc(78px + var(--safe-b)); }
body.has-guide .panel .foot { padding-bottom: calc(62px + var(--safe-b)); }

/* Section headers inside the list view: fundable work first, the review queue
   after it, each stating exactly what its status means. */
.list-sec { list-style: none; margin: 14px 0 8px; }
.list-rows li.list-sec:first-child { margin-top: 2px; }
.list-sec b {
  display: block; font-size: 12px; font-weight: 600; letter-spacing: .8px;
  text-transform: uppercase; color: var(--txt);
}
.list-sec span { display: block; font-size: 11.5px; color: var(--txt-2); line-height: 1.45; margin-top: 2px; }
.list-empty { list-style: none; font-size: 12.5px; color: var(--txt-2); padding: 4px 2px 8px; line-height: 1.5; }

/* List-mode: the globe could not start (or was skipped), so the list IS the
   page - not an error dialog over a black void. */
.list-note {
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  background: rgba(138,180,248,.08); border: 1px solid rgba(138,180,248,.22);
  border-radius: 10px; padding: 9px 12px; margin-bottom: 12px;
  font-size: 12px; color: var(--txt-2); line-height: 1.45;
}
.list-note[hidden] { display: none; }
#list-retry {
  flex: none; font-size: 11.5px; font-weight: 600; color: #8ab4f8;
  border: 1px solid rgba(138,180,248,.35); border-radius: 13px; padding: 6px 11px;
}
#list-retry:hover { background: rgba(138,180,248,.12); }
#list-retry[hidden] { display: none; }
body.list-mode #globe,
body.list-mode #markers,
body.list-mode .nav-controls,
body.list-mode .camstat,
body.list-mode .legend,
body.list-mode .liveticker,
body.list-mode .attribution,
body.list-mode #near-me,
body.list-mode .guide { display: none !important; }
body.list-mode { background: #131314; }
body.list-mode #list-overlay {
  position: fixed; inset: 0; opacity: 1; pointer-events: auto;
  background: none; backdrop-filter: none;
  align-items: stretch; justify-content: center;
  padding: calc(68px + max(16px, var(--safe-t))) 12px calc(16px + var(--safe-b));
}
body.list-mode #list-overlay .modal {
  width: min(600px, 100%); max-height: none; box-shadow: none;
  background: none; border-radius: 0; transform: none;
}
body.list-mode #list-close { display: none; }
/* the panel must sit over the list page when a row opens it */
body.list-mode .panel { z-index: 62; }
body.list-mode .featured { z-index: 61; }

/* Reduced motion: the JS already skips the orbit, auto-rotate and count-up;
   this quiets the purely decorative CSS animation too. */
@media (prefers-reduced-motion: reduce) {
  .marker .pulse { animation: none; }
  #splash .bar i { animation: none; }
  .panel, .overlay, .modal, .toast, .liveticker { transition: none; }
}

/* Mobile: keep the headline stat - it is the page's social proof - and place
   the new chrome where thumbs can reach it */
@media (max-width: 720px) {
  /* !important: renderStats sets an inline display on the funded stat, which
     would otherwise defeat the mobile hide */
  .hud .stat { display: none !important; }
  .hud .stat:first-child {
    display: flex !important; flex-direction: row; align-items: baseline; gap: 5px;
    background: rgba(18,19,20,.78); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.14); border-radius: 13px; padding: 5px 11px;
  }
  .hud .stat:first-child b { font-size: 13.5px; }
  .hud .stat:first-child span { font-size: 9px; }
  .legend { left: 12px; bottom: calc(74px + var(--safe-b)); }
  .activity { left: 12px; bottom: calc(76px + var(--safe-b)); width: calc(100vw - 24px); }
  .tour-hud { bottom: calc(10px + var(--safe-b)); max-width: calc(100vw - 20px); }
  .panel .hero .close.share { right: 50px; }
  /* The featured card is the primary CTA while it is up - the floating HUD
     fund button underneath it would be a second, worse-targeted one. */
  .featured { bottom: calc(12px + var(--safe-b)); }
  .featured video { aspect-ratio: 16/7; }
  body.has-featured .hud { display: none; }
  body.has-featured .nav-controls { display: none; }
  /* the guide pill must never cover the panel's own Fund button, or the
     search bar once the notch pushes that bar down */
  .guide { bottom: auto; top: calc(56px + max(16px, var(--safe-t))); flex-wrap: wrap; padding: 9px 12px; }
  .guide-txt { font-size: 12px; }
  body.has-guide .featured { bottom: calc(12px + var(--safe-b)); }
  body.has-guide .panel .foot { padding-bottom: max(12px, var(--safe-b)); }
  body.list-mode #list-overlay { padding: calc(60px + max(16px, var(--safe-t))) 10px calc(110px + var(--safe-b)); }
}
