/* ==========================================================================
   झाडांचा नकाशा · Zaadancha Naksha
   Light-first, Nordic. Paper, hairlines, air. The map is the ground; every
   other surface stays quiet. Fonts vendored, no trackers, no storage.
   ========================================================================== */

/* Tiro Devanagari Marathi (Tiro Typeworks) — a serif cut specifically for
   Marathi. Display and prose. Inter carries figures and small labels. */
@font-face {
  font-family: "Tiro";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("vendor/fonts/tiro-dev.woff2") format("woff2");
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF;
}
@font-face {
  font-family: "Tiro";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("vendor/fonts/tiro-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2039-203A, U+2122;
}
@font-face {
  font-family: "Tiro";
  font-style: italic; font-weight: 400; font-display: swap;
  src: url("vendor/fonts/tiro-latin-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2039-203A, U+2122;
}
@font-face {
  font-family: "InterVar";
  font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("vendor/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2039-203A, U+2122;
}

:root {
  color-scheme: light;

  --paper:    #FAF9F6;
  --surface:  #FFFFFF;
  --raised:   #F4F3EE;
  --sunk:     #EFEEE7;
  --hair:     rgba(28,32,26,.085);
  --hair-2:   rgba(28,32,26,.17);

  --ink:   #1C201A;
  --ink-2: #5B6357;
  --ink-3: #6E7668;

  --accent:      #4A6B4F;
  --accent-ink:  #FFFFFF;
  --accent-soft: #EAEFE4;

  --gold:      #8A6524;
  --gold-soft: #F3EBDC;
  --blue:      #3F5E7C;
  --blue-soft: #E4EAEF;

  /* density: one hue, pale sage to deep forest */
  --d0:#EAEFE4; --d1:#D3E0C9; --d2:#B5CBA9; --d3:#93B287; --d4:#708F66; --d5:#4E6B48;

  /* native / introduced / unknown, separated by lightness not hue */
  --nat:   #4E6B48;
  --intro: #B5CBA9;
  --unk:   #EAE9E2;
  --unk-e: #CFCEC4;

  --seg-track: #EFEEE7;
  --seg-on:    #FFFFFF;

  --r-sm: 8px; --r: 12px; --r-lg: 18px;
  --pad: 20px;
  --sheet-radius: 20px;

  --lift: 0 1px 1px rgba(28,32,26,.04), 0 6px 22px rgba(28,32,26,.07);

  --serif: "Tiro", Georgia, "Noto Serif Devanagari", "Nirmala UI", serif;
  --ui:    "InterVar", system-ui, -apple-system, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper:   #161814;
  --surface: #1C1F1A;
  --raised:  #22261E;
  --sunk:    #121410;
  --hair:    rgba(237,239,232,.10);
  --hair-2:  rgba(237,239,232,.20);

  --ink:   #EDEFE8;
  --ink-2: #A7AF9F;
  --ink-3: #838B7C;

  --accent:      #8FB396;
  --accent-ink:  #161814;
  --accent-soft: #26301F;

  --gold:      #C79A4E;
  --gold-soft: #2B2519;
  --blue:      #8AA8C4;
  --blue-soft: #1B2530;

  --d0:#232A21; --d1:#33402F; --d2:#47573F; --d3:#5D7253; --d4:#7C946E; --d5:#A3BC94;

  --nat:   #A3BC94;
  --intro: #47573F;
  --unk:   #262A22;
  --unk-e: #454C40;

  --seg-track: #121410;
  --seg-on:    #2A2F25;

  --lift: 0 1px 1px rgba(0,0,0,.3), 0 6px 22px rgba(0,0,0,.35);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; overscroll-behavior: none; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
a { color: var(--accent); text-decoration-thickness: .5px; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- map ---- */
#map { position: fixed; inset: 0; z-index: 0; background: var(--paper); }
.leaflet-container { font: inherit; background: var(--paper); outline: none; }
.leaflet-control-container .leaflet-top { display: none; }
.leaflet-control-attribution {
  background: color-mix(in srgb, var(--surface) 84%, transparent) !important;
  color: var(--ink-3) !important; font-size: 9.5px !important;
  padding: 2px 7px !important; border-radius: 8px 0 0 0;
  backdrop-filter: blur(10px);
}
.leaflet-control-attribution a { color: var(--ink-2) !important; }

/* ------------------------------------------------------------ top bar ---- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  padding: max(12px, env(safe-area-inset-top)) 14px 0;
  display: flex; align-items: flex-start; gap: 10px; pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.brandrow { display: flex; align-items: center; gap: 7px; }

.brand-chip {
  display: inline-flex; align-items: center; gap: 9px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid var(--hair);
  border-radius: 100px; padding: 8px 16px 8px 12px;
  box-shadow: var(--lift); width: fit-content;
}
.brand-chip .leaf { width: 20px; height: 20px; flex: 0 0 auto; color: var(--accent); }
.brand-chip h1 {
  font-family: var(--serif); font-weight: 400; font-size: 1.08rem;
  margin: 0; letter-spacing: .005em; white-space: nowrap;
}

.honest {
  display: block; text-align: left;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(16px);
  border: 1px solid var(--hair); border-left: 2px solid var(--gold);
  border-radius: var(--r-sm); padding: 7px 12px;
  font-family: var(--serif);
  font-size: .74rem; line-height: 1.45; color: var(--ink-2);
  box-shadow: var(--lift); max-width: min(74vw, 400px);
}
.honest b { color: var(--ink); }
.honest .more { display: none; margin-top: 6px; color: var(--ink-3); }
.honest[aria-expanded="true"] .more { display: block; }
.honest .caret { color: var(--gold); font-size: .6rem; white-space: nowrap; }
.honest > span:first-child { display: inline; }

.toolstack { margin-left: auto; display: flex; flex-direction: column; gap: 7px; align-items: flex-end; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: 100px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid var(--hair); box-shadow: var(--lift);
  font-family: var(--serif); font-size: .84rem; color: var(--ink-2);
  transition: color .18s, border-color .18s;
}
.pill .swatch { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.pill[data-k="grid"]  .swatch { background: var(--d4); }
.pill[data-k="rare"]  .swatch { background: var(--gold); }
.pill[data-k="giant"] .swatch { background: var(--blue); }
.pill[aria-pressed="true"] { color: var(--ink); border-color: var(--hair-2); }
.pill.icon { width: 36px; padding: 0; justify-content: center; font-size: .9rem; }
.pill.lang { font-family: var(--ui); font-size: .68rem; font-weight: 600; letter-spacing: .06em; padding: 0 11px; }

/* --------------------------------------------------------------- legend -- */
.legend {
  position: fixed; left: 14px; z-index: 25; bottom: calc(var(--peek, 128px) + 16px);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(16px); border: 1px solid var(--hair);
  border-radius: var(--r); padding: 10px 12px; box-shadow: var(--lift);
  transition: opacity .3s, transform .3s;
}
.legend[hidden] { display: block; opacity: 0; transform: translateY(6px); pointer-events: none; }
.legend .lt { font-family: var(--serif); font-size: .76rem; color: var(--ink-2); margin-bottom: 7px; }
.ramp { display: flex; width: 132px; height: 7px; border-radius: 4px; overflow: hidden; }
.ramp i { flex: 1; }
.rampscale { display: flex; justify-content: space-between; font-family: var(--ui);
  font-size: .58rem; color: var(--ink-3); margin-top: 5px; font-variant-numeric: tabular-nums; letter-spacing: .04em; }

.zoomhint {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 26;
  bottom: calc(var(--peek, 128px) + 18px);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(16px); border: 1px solid var(--hair);
  border-radius: 100px; padding: 8px 16px;
  font-family: var(--serif); font-size: .8rem; color: var(--ink-2);
  box-shadow: var(--lift); white-space: nowrap; max-width: 92vw;
  overflow: hidden; text-overflow: ellipsis;
}

/* ---------------------------------------------------------------- sheet -- */
#sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(100dvh - 172px);
  display: flex; flex-direction: column;
  background: var(--surface);
  border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
  border-top: 1px solid var(--hair);
  box-shadow: 0 -14px 44px rgba(28,32,26,.10);
  transform: translateY(var(--sheet-y, 60dvh));
  transition: transform .46s cubic-bezier(.32,.72,0,1);
  touch-action: none;
}
:root[data-theme="dark"] #sheet { box-shadow: 0 -14px 44px rgba(0,0,0,.45); }
#sheet.dragging { transition: none; }

.grab { padding: 10px 0 4px; display: flex; justify-content: center; cursor: grab; flex: 0 0 auto; }
.grab::before { content: ""; width: 34px; height: 3px; border-radius: 2px; background: var(--hair-2); }

.rail { flex: 0 0 auto; display: flex; gap: 4px; padding: 6px var(--pad) 12px; overflow-x: auto; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail button {
  flex: 0 0 auto; font-family: var(--serif); font-size: .88rem;
  padding: 7px 14px; border-radius: 100px; color: var(--ink-3);
  white-space: nowrap; min-height: 36px;
  transition: color .18s, background .18s;
}
.rail button[aria-selected="true"] { color: var(--accent-ink); background: var(--accent); }

.peekline {
  flex: 0 0 auto; padding: 0 var(--pad) 16px;
  display: flex; align-items: baseline; gap: 10px;
  color: var(--ink-2); font-family: var(--serif); font-size: .84rem;
}
.peekline b {
  font-family: var(--ui); font-size: 1.05rem; color: var(--ink);
  font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}

.panels {
  flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 2px var(--pad) calc(44px + env(safe-area-inset-bottom));
  overscroll-behavior: contain; transition: opacity .22s;
}
#sheet.at-peek .panels { opacity: 0; pointer-events: none; }
.panel[hidden] { display: none; }

/* ------------------------------------------------------------ typography */
.eyebrow {
  font-family: var(--ui); font-size: .62rem; font-weight: 600;
  letter-spacing: .17em; text-transform: uppercase; color: var(--ink-3);
  margin: 0 0 10px;
}
.h { font-family: var(--serif); font-weight: 400; font-size: 1.5rem;
  line-height: 1.25; letter-spacing: -.005em; margin: 0 0 6px; }
.sub { font-family: var(--serif); color: var(--ink-2); font-size: .92rem; margin: 0 0 22px; }

.hero { padding: 4px 0 26px; border-bottom: 1px solid var(--hair); margin-bottom: 24px; }
.hero .big {
  font-family: var(--ui); font-size: clamp(2.8rem, 14vw, 3.9rem);
  font-weight: 600; letter-spacing: -.045em; line-height: .95;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.hero .cap { font-family: var(--serif); font-size: 1.02rem; color: var(--ink-2); margin-top: 8px; }

/* metric strip: hairline separated, no boxes */
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 24px; }
.metric { padding: 0 12px; border-left: 1px solid var(--hair); }
.metric:first-child { padding-left: 0; border-left: 0; }
.metric .v { font-family: var(--ui); font-size: 1.24rem; font-weight: 600;
  letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.metric .k { font-family: var(--serif); font-size: .76rem; color: var(--ink-3); margin-top: 2px; }

.card { background: var(--raised); border: 1px solid var(--hair);
  border-radius: var(--r-lg); padding: 15px 16px; margin-bottom: 12px; }
.card.flush { padding: 0; overflow: hidden; background: transparent; border-color: transparent; }

/* rows: hairlines, no card chrome */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { display: flex; align-items: center; gap: 14px;
  padding: 13px 0; border-bottom: 1px solid var(--hair); }
.rows > li:last-child { border-bottom: 0; }
.rows button.row { all: unset; display: flex; align-items: center; gap: 14px; width: 100%; cursor: pointer; }
.rank { flex: 0 0 22px; text-align: right; font-family: var(--ui);
  font-size: .78rem; font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.grow { flex: 1 1 auto; min-width: 0; }
.nm { font-family: var(--serif); font-size: 1rem; line-height: 1.35; }
.sci { font-family: var(--serif); font-style: italic; font-size: .76rem; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.val { flex: 0 0 auto; text-align: right; font-family: var(--ui); font-weight: 600;
  font-size: .92rem; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.val small { display: block; font-family: var(--serif); font-weight: 400; font-size: .7rem;
  color: var(--ink-3); letter-spacing: 0; margin-top: 1px; }

.meter { height: 2px; border-radius: 1px; background: var(--hair); margin-top: 8px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent); }

.tag { display: inline-block; font-family: var(--ui); font-size: .6rem; font-weight: 600;
  padding: 2px 8px; border-radius: 100px; vertical-align: 2px; letter-spacing: .04em; }
.tag.native     { background: var(--accent-soft); color: var(--accent); }
.tag.non_native { background: var(--sunk); color: var(--ink-2); }
.tag.unknown    { background: transparent; color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--hair-2); }

.seg { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; margin: 6px 0 14px; }
.seg i { display: block; }
.segkey { display: flex; flex-wrap: wrap; gap: 7px 18px; font-family: var(--serif); font-size: .82rem; color: var(--ink-2); }
.segkey span { display: inline-flex; align-items: center; gap: 7px; }
.segkey b { font-family: var(--ui); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.sw { width: 8px; height: 8px; border-radius: 2px; flex: 0 0 auto; }

/* month scroller */
.months { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  padding: 2px var(--pad) 18px; margin: 0 calc(var(--pad) * -1); }
.months::-webkit-scrollbar { display: none; }
.months button {
  flex: 0 0 auto; min-width: 60px; padding: 9px 13px; border-radius: var(--r);
  border: 1px solid var(--hair); background: transparent; color: var(--ink-2);
  font-family: var(--serif); font-size: .86rem;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  transition: background .18s, color .18s, border-color .18s;
}
.months button .n { font-family: var(--ui); font-size: .56rem; color: var(--ink-3);
  font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.months button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.months button[aria-pressed="true"] .n { color: color-mix(in srgb, var(--accent-ink) 68%, transparent); }
.months button[data-now="1"]:not([aria-pressed="true"]) { border-color: color-mix(in srgb, var(--accent) 42%, transparent); }

/* fact cards: hairline separated, no boxes */
.fact { border-top: 1px solid var(--hair); padding: 26px 0 22px; }
.fact:first-child { border-top: 0; padding-top: 6px; }
.fact .fnum { font-family: var(--ui); font-size: clamp(2.5rem, 13vw, 3.3rem);
  font-weight: 600; letter-spacing: -.045em; line-height: .95;
  color: var(--accent); font-variant-numeric: tabular-nums; }
.fact .fmr { font-family: var(--serif); font-size: 1.18rem; line-height: 1.35; margin: 12px 0 0; }
.fact .fen { font-family: var(--serif); color: var(--ink-2); font-size: .92rem; margin: 8px 0 0; }
.acts { display: flex; gap: 9px; margin-top: 18px; flex-wrap: wrap; }
.btn {
  height: 40px; padding: 0 18px; border-radius: 100px;
  border: 1px solid var(--hair-2); color: var(--ink);
  font-family: var(--serif); font-size: .88rem;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background .18s, border-color .18s;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn:active { transform: translateY(.5px); }

.segctl { display: flex; gap: 3px; padding: 3px; margin-bottom: 20px;
  background: var(--seg-track); border-radius: var(--r); }
.segctl button { flex: 1; min-height: 36px; border-radius: var(--r-sm);
  font-family: var(--serif); font-size: .88rem; color: var(--ink-2);
  transition: background .18s, color .18s; }
.segctl button[aria-pressed="true"] { background: var(--seg-on); color: var(--ink); box-shadow: 0 1px 2px rgba(28,32,26,.07); }

/* treasure hero */
.treasure { border-radius: var(--r-lg); padding: 20px; margin-bottom: 16px;
  background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 24%, transparent); }
.treasure.giant { background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 24%, transparent); }
.treasure .tk { font-family: var(--ui); font-size: .62rem; font-weight: 600;
  letter-spacing: .17em; text-transform: uppercase; color: var(--gold); }
.treasure.giant .tk { color: var(--blue); }
.treasure .tn { font-family: var(--serif); font-size: 1.44rem; margin: 8px 0 1px; line-height: 1.2; }
.treasure .ts { font-family: var(--serif); font-style: italic; font-size: .82rem; color: var(--ink-3); }
.treasure .tstat { display: flex; gap: 26px; margin-top: 16px; }
.treasure .tstat .v { font-family: var(--ui); font-size: 1.26rem; font-weight: 600;
  letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.treasure .tstat .k { font-family: var(--serif); font-size: .72rem; color: var(--ink-3); }

/* pollen */
.pnote { font-family: var(--serif); font-size: .8rem; color: var(--gold); margin-top: 6px; line-height: 1.45; }
.warncard {
  margin-top: 18px; padding: 16px; border-radius: var(--r-lg);
  background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 22%, transparent);
  font-family: var(--serif); font-size: .84rem; line-height: 1.6; color: var(--ink-2);
}
.warncard b { color: var(--gold); }
.warncard p { margin: 8px 0 0; }
.warncard a { color: var(--gold); }

.pchart { display: flex; align-items: flex-end; gap: 4px; height: 96px;
  padding: 12px 12px 0; border: 1px solid var(--hair); border-radius: var(--r-lg); }
.pchart .pbar { flex: 1; height: 100%; display: flex; flex-direction: column;
  justify-content: flex-end; align-items: center; gap: 6px; padding: 0; min-width: 0; }
.pchart .pbar i { display: block; width: 100%; border-radius: 2px 2px 0 0;
  background: var(--d2); transition: background .18s; }
.pchart .pbar span { font-family: var(--ui); font-size: .56rem; color: var(--ink-3); letter-spacing: .04em; }
.pchart .pbar.on i { background: var(--gold); }
.pchart .pbar.on span { color: var(--gold); font-weight: 700; }

/* ward picker + generated documents */
.pickwrap { display: block; margin: 2px 0 6px; }
.pickwrap > span { display: block; font-family: var(--ui); font-size: .62rem; font-weight: 600;
  letter-spacing: .17em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.pickwrap select {
  width: 100%; min-height: 48px; padding: 0 16px;
  border-radius: var(--r); border: 1px solid var(--hair-2);
  background-color: transparent; color: var(--ink);
  font-family: var(--serif); font-size: 1.02rem; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%),
                    linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 21px) 22px, calc(100% - 16px) 22px;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.doc { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--hair); }
.doct { font-family: var(--serif); font-size: 1.16rem; }
.docbody {
  font-family: var(--serif); font-size: .86rem; line-height: 1.75; color: var(--ink-2);
  white-space: pre-wrap; word-break: break-word;
  max-height: 300px; overflow-y: auto;
  background: var(--sunk); border: 1px solid var(--hair);
  border-radius: var(--r); padding: 16px; margin: 0;
}

/* credits + signature */
.made { margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--hair); }
.made .mk { font-family: var(--ui); font-size: .62rem; font-weight: 600;
  letter-spacing: .17em; text-transform: uppercase; color: var(--ink-3); }
.made .sig { font-family: var(--serif); font-style: italic; font-size: 2.05rem;
  margin: 12px 0 4px; line-height: 1.1; color: var(--ink); }
.made .mr2 { font-family: var(--serif); font-size: .9rem; color: var(--ink-2); margin: 0 0 18px; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.links a {
  display: inline-flex; align-items: center; height: 36px; padding: 0 15px;
  border-radius: 100px; border: 1px solid var(--hair-2);
  color: var(--ink); text-decoration: none;
  font-family: var(--serif); font-size: .86rem;
  transition: border-color .18s;
}
.links a:hover { border-color: var(--ink-3); }
.links a.key { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* botanical rule */
.botrule { display: flex; align-items: center; gap: 14px; margin: 32px 0 6px; }
.botrule::before, .botrule::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
.botrule svg { width: 30px; height: 30px; color: var(--accent); opacity: .55; flex: 0 0 auto; }

.foot { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--hair);
  font-family: var(--serif); font-size: .8rem; color: var(--ink-3); line-height: 1.65; }
.foot p { margin: 0 0 9px; }

/* popup */
.leaflet-popup-content-wrapper {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--hair); border-radius: var(--r-lg);
  box-shadow: var(--lift); padding: 2px;
}
.leaflet-popup-content { margin: 14px 16px; font: inherit; }
.leaflet-popup-tip { background: var(--surface); border: 1px solid var(--hair); }
.leaflet-container a.leaflet-popup-close-button { color: var(--ink-3); }
.pop .pt { font-family: var(--serif); font-size: 1.2rem; line-height: 1.25; }
.pop .ps { font-family: var(--serif); font-style: italic; font-size: .78rem; color: var(--ink-3); margin-bottom: 10px; }
.pop table { border-collapse: collapse; font-size: .82rem; width: 100%; }
.pop td { padding: 3px 0; }
.pop td:first-child { color: var(--ink-3); padding-right: 18px; font-family: var(--serif); white-space: nowrap; }
.pop td:last-child { text-align: right; font-family: var(--ui); font-variant-numeric: tabular-nums; }

/* boot */
#boot {
  position: fixed; inset: 0; z-index: 90; background: var(--paper);
  display: grid; place-content: center; gap: 18px; justify-items: center;
  transition: opacity .45s; text-align: center; padding: 26px;
}
#boot.gone { opacity: 0; pointer-events: none; }
#boot .bl { font-family: var(--serif); font-size: 1.22rem; color: var(--ink); }
#boot .bs { font-family: var(--ui); font-size: .68rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-3); }
#boot .sprout { width: 46px; height: 46px; color: var(--accent); }
#boot .sprout path { stroke-dasharray: 70; stroke-dashoffset: 70; animation: draw 2s ease-in-out infinite; }
#boot .sprout path:nth-child(2) { animation-delay: .3s; }
#boot .sprout path:nth-child(3) { animation-delay: .6s; }
@keyframes draw { 0% { stroke-dashoffset: 70; } 45%,100% { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  #boot .sprout path { animation: none; stroke-dashoffset: 0; }
  #sheet { transition: none; }
}

.err {
  margin: 0 0 16px; padding: 16px; border-radius: var(--r-lg);
  background: color-mix(in srgb, #B4524A 8%, var(--raised));
  border: 1px solid color-mix(in srgb, #B4524A 30%, transparent);
  font-family: var(--serif); font-size: .88rem;
}
.err code { display: block; margin-top: 10px; font-size: .76rem; color: var(--ink-2); word-break: break-all; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------------------- desktop -- */
@media (min-width: 880px) {
  #sheet {
    top: 0; bottom: 0; right: 0; left: auto;
    width: 452px; height: 100dvh; transform: none !important;
    border-radius: 0; border-top: 0; border-left: 1px solid var(--hair);
    box-shadow: none;
  }
  .grab, .peekline { display: none; }
  .rail { padding-top: 20px; }
  #map { right: 452px; }
  .topbar { right: 468px; }
  .legend { bottom: 34px; }
  .panels { padding-top: 4px; }
}
