/* ============================================================================
   humanconnect — visual identity: "field notes on a map".
   Paper surfaces, ink text, marigold accent, one serif display face
   (Fraunces, self-hosted) for the wordmark and event names. Hairline borders
   and crisp shadows — no glassmorphism, no gradients.
   ========================================================================== */

@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 550;
  font-display: swap;
  src: url('../fonts/fraunces-italic.woff2') format('woff2');
}

:root {
  --paper: #faf9f6;
  --paper-2: #efece6;
  --ink: #232120;
  --ink-soft: #6f6a63;
  --line: rgba(35, 33, 32, 0.13);
  --accent: #0f9d6b;
  --accent-deep: #047857;
  /* Emerald is the ONE signature colour — reserved for primary actions.
     Both endpoints clear 4.5:1 with white text (5.48:1 and 7.68:1). */
  --grad: linear-gradient(135deg, #047857, #065f46);
  --cta: #232120;
  --cta-ink: #faf9f6;
  --ring-neutral: #8a8279; /* warm slate for clusters / neutral rings */
  --shadow: 0 1px 2px rgba(35, 38, 43, 0.08), 0 10px 28px rgba(35, 38, 43, 0.14);
  --r: 12px;
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  /* Height of the floating top chrome — anything anchored below the header
     (banners, the search panel) offsets from this, so the two stay in sync
     when the header wraps to two rows on phones. */
  --chrome-top: 72px;
}

/* Dark palette. Applies when the OS prefers dark AND the user hasn't forced
   light, OR when the user explicitly picks dark via the header toggle. The
   [data-theme] selector outranks the bare :root above, so a manual choice
   always wins over the OS. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1a1917;
    --paper-2: #262421;
    --ink: #e9e6e0;
    --ink-soft: #a09a90;
    --line: rgba(233, 230, 224, 0.13);
    --accent: #34d399;
    --accent-deep: #34d399;
    --grad: linear-gradient(135deg, #047857, #065f46);
    --cta: #e9e6e0;
    --cta-ink: #1a1917;
    --ring-neutral: #7c756b;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px rgba(0, 0, 0, 0.5);
  }
}
:root[data-theme="dark"] {
  --paper: #1a1917;
  --paper-2: #262421;
  --ink: #e9e6e0;
  --ink-soft: #a09a90;
  --line: rgba(233, 230, 224, 0.13);
  --accent: #34d399;
  --accent-deep: #34d399;
  --grad: linear-gradient(135deg, #047857, #065f46);
  --cta: #e9e6e0;
  --cta-ink: #1a1917;
  --ring-neutral: #7c756b;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

/* Slim, subtle scrollbars — never the chunky OS default */
* {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--ink) 26%, transparent) transparent;
}
*::-webkit-scrollbar { width: 7px; height: 7px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--ink) 24%, transparent);
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--ink) 40%, transparent);
}
*::-webkit-scrollbar-corner { background: transparent; }

/* The HTML `hidden` attribute must ALWAYS win. Without this, any rule that
   sets `display` on an element (e.g. `.banner { display:flex }`) overrides the
   browser's built-in [hidden]{display:none} — author CSS beats the UA sheet —
   and the element renders even though JS set it hidden. That exact bug kept
   the demo-mode banner permanently visible over the live site. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

#map { position: fixed; inset: 0; background: var(--paper); }

button { font: inherit; border: 0; cursor: pointer; color: inherit; background: none; }

/* ---------------------------------------------------------------------------
   Masthead
--------------------------------------------------------------------------- */
.header {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top));
  left: 12px;
  right: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  z-index: 1000;
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 14px 11px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  pointer-events: auto;
  /* Must be allowed to shrink: the actions are fixed-size, and without this
     the pill's intrinsic width pushes them off-screen entirely on phones. */
  min-width: 0;
}

.brand .dot {
  align-self: center;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
  60%      { box-shadow: 0 0 0 7px transparent; }
}

.brand h1 {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 550;
  font-size: 19px;
  letter-spacing: 0.01em;
  /* Last-resort truncation on very narrow devices — the buttons stay reachable
     no matter what, which the wordmark's full width must never cost. */
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The .online TLD, styled as part of the wordmark so the domain sticks */
.tld {
  font-style: normal;
  font-family: system-ui, sans-serif;
  font-weight: 700;
  color: var(--accent-deep);
  letter-spacing: -0.01em;
}

.brand .count {
  font-size: 12px;
  color: var(--ink-soft);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Never shrink and never wrap: every control here must stay tappable. */
.header .actions { display: flex; gap: 8px; pointer-events: auto; flex: 0 0 auto; }

.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}
.icon-btn:active { transform: scale(0.93); }
.icon-btn svg { width: 20px; height: 20px; stroke: var(--ink); fill: none; }

/* Theme toggle shows the CURRENT theme's icon (sun = light, moon = dark).
   Driven by the same theme logic as the palette, so it never flashes. */
#theme-btn .ic-moon { display: none; }
#theme-btn .ic-sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #theme-btn .ic-sun { display: none; }
  :root:not([data-theme="light"]) #theme-btn .ic-moon { display: block; }
}
:root[data-theme="dark"] #theme-btn .ic-sun { display: none; }
:root[data-theme="dark"] #theme-btn .ic-moon { display: block; }

/* Narrow screens. Measured: the brand pill wants ~363px and the four controls
   194px, so one row needs ~589px of viewport. Below that they cannot share a
   row without either shrinking the wordmark to ~11px or pushing controls
   off-screen — which is exactly what used to happen (theme, my-location and
   about were unreachable on every common phone). So wrap instead: pill on the
   first row, controls right-aligned on the second. Nothing hidden, nothing
   truncated, 44px touch targets intact. */
@media (max-width: 600px) {
  :root { --chrome-top: 122px; } /* two rows measure 107px; plus a little air */
  .header { flex-wrap: wrap; }
  .brand { flex: 0 1 auto; }
  .brand h1 { font-size: 16px; }
  .header .actions { margin-left: auto; } /* right-align on its own row */
}

/* ---------------------------------------------------------------------------
   Start button
--------------------------------------------------------------------------- */
.fab {
  position: fixed;
  right: 16px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: var(--r);
  background: var(--grad);
  color: #fff;
  border: 0;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 2px 6px rgba(6, 95, 70, 0.35), 0 10px 28px rgba(6, 95, 70, 0.25);
  transition: transform 0.15s ease;
}
.fab:active { transform: scale(0.96); }
.fab .plus {
  font-size: 18px;
  line-height: 1;
  color: #fff;
  font-weight: 400;
}

/* ---------------------------------------------------------------------------
   Map pins — circle face, category ring, cartographic stem
--------------------------------------------------------------------------- */
.hc-marker { background: none; border: 0; }

.hc-pin {
  --d: 36px;
  --ring: #6d6a63;
  position: absolute;
  width: var(--d);
  height: var(--d);
  /* anchor = tip of the stem */
  transform: translate(-50%, calc(-100% - 7px));
  display: grid;
  place-items: center;
  background: var(--paper);
  border: 3px solid var(--ring);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(20, 22, 26, 0.3);
  transition: width 0.5s cubic-bezier(0.34, 1.4, 0.5, 1), height 0.5s cubic-bezier(0.34, 1.4, 0.5, 1);
  animation: pin-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}
.hc-pin::after {
  /* the stem */
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  translate: -50% -1px;
  width: 0;
  height: 0;
  border: 6px solid transparent;
  border-top: 9px solid var(--ring);
  border-bottom: 0;
}
@keyframes pin-pop {
  from { scale: 0.2; opacity: 0; }
  to   { scale: 1; opacity: 1; }
}

.hc-pin .e {
  font-size: calc(var(--d) * 0.5);
  line-height: 1;
  transition: font-size 0.5s cubic-bezier(0.34, 1.4, 0.5, 1);
}

.hc-pin .n {
  position: absolute;
  top: -7px;
  right: -9px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  font-weight: 800;
  border-radius: 999px;
  border: 2px solid var(--paper);
  font-style: normal;
  font-variant-numeric: tabular-nums;
}
.hc-pin .n.bump { animation: bump 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes bump {
  0% { scale: 1; }
  40% { scale: 1.45; }
  100% { scale: 1; }
}

/* Cluster bubble: how many plans are in this area */
.hc-cluster {
  --d: 44px;
  position: absolute;
  width: var(--d);
  height: var(--d);
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: var(--paper);
  border: 3px solid var(--ring-neutral);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(20, 26, 22, 0.3);
  cursor: pointer;
}
.hc-cluster b {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 550;
  font-size: calc(var(--d) * 0.34);
  line-height: 1.05;
  color: var(--ink);
}
.hc-cluster span {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
}

.hc-draft-pin {
  position: absolute;
  transform: translate(-50%, -90%);
  font-size: 34px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
  animation: draft-bob 1.2s ease-in-out infinite;
}
@keyframes draft-bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6px; }
}

/* ---------------------------------------------------------------------------
   Bottom sheets
--------------------------------------------------------------------------- */
.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 110%);
  width: min(480px, 100%);
  max-height: min(78vh, 640px);
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -6px 40px rgba(20, 22, 26, 0.28);
  z-index: 1100;
  /* visibility flips after the slide-out finishes; instantly on open */
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.25, 1), visibility 0s linear 0.3s;
  padding-bottom: env(safe-area-inset-bottom);
  visibility: hidden;
}
.sheet.open {
  transform: translate(-50%, 0);
  visibility: visible;
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.25, 1), visibility 0s;
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 18px 6px;
}

.sheet-close {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 14px;
}

.sheet-body {
  overflow-y: auto;
  padding: 0 18px 18px;
  overscroll-behavior: contain;
}

/* --- create sheet ---------------------------------------------------------*/
#create-preview {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 550;
  font-size: 24px;
  letter-spacing: 0.005em;
  min-height: 30px;
}
#create-preview.empty { color: var(--ink-soft); }

#create-hint { margin: 4px 0 0; font-size: 13px; color: var(--ink-soft); }

.field-label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 16px 0 8px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.field-label .opt { font-weight: 500; text-transform: none; letter-spacing: 0; }

.chip-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
  padding: 2px;
  /* Hide this inner scrollbar (the sheet keeps one slim bar) and fade the
     bottom edge so it's clear the list continues. */
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent);
          mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent);
}
.chip-grid::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.1s ease, background 0.15s ease, border-color 0.15s ease;
}
.chip:active { transform: scale(0.94); }
/* Neutral (ink) selection keeps the composer calm; activity chips override
   this with their own category colour below, which is where colour belongs. */
.chip.sel {
  background: var(--cta);
  border-color: var(--cta);
  color: var(--cta-ink);
}
.chip .em { font-size: 15px; }

/* Comfortable touch targets on touch devices */
@media (pointer: coarse) {
  .chip { padding: 11px 14px; }
}

.no-match { margin: 6px 2px; font-size: 13px; color: var(--ink-soft); }

.search {
  width: 100%;
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}
.search:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.search::placeholder { color: var(--ink-soft); }

.cta {
  width: 100%;
  margin-top: 16px;
  padding: 15px;
  border-radius: var(--r);
  background: var(--grad);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  transition: transform 0.12s ease, opacity 0.15s ease;
}
.cta:active:not(:disabled) { transform: scale(0.98); }
.cta:disabled { opacity: 0.4; cursor: not-allowed; }

/* --- detail sheet ----------------------------------------------------------*/
.detail-top { display: flex; align-items: center; gap: 14px; }

#detail-emoji {
  --ring: var(--accent);
  flex: none;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  font-size: 26px;
  background: var(--paper);
  border: 3px solid var(--ring);
  border-radius: 50%;
}

#detail-title {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 550;
  font-size: 23px;
  letter-spacing: 0.005em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 5px;
  font-size: 13.5px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
#detail-joins { font-weight: 700; color: var(--accent-deep); }

.mine-tag {
  margin: 8px 0 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-deep);
}

.detail-actions { display: flex; gap: 10px; margin-top: 16px; }

#join-btn {
  flex: 1;
  padding: 15px;
  border-radius: var(--r);
  background: var(--grad);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  transition: transform 0.12s ease;
}
#join-btn:active:not(:disabled) { transform: scale(0.97); }
#join-btn:disabled {
  background: color-mix(in srgb, var(--accent) 14%, var(--paper));
  color: var(--accent-deep);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  cursor: default;
}

.ghost-btn {
  flex: none;
  padding: 15px 16px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.report { margin: 14px 0 2px; text-align: center; display: flex; justify-content: center; gap: 18px; }
#report-btn, #remove-btn {
  font-size: 12.5px;
  color: var(--ink-soft);
  text-decoration: underline;
  padding: 6px;
}
/* Removal is destructive — quiet, but unmistakably so. */
#remove-btn { color: #b3564b; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #remove-btn { color: #e08a80; }
}
:root[data-theme="dark"] #remove-btn { color: #e08a80; }
:root[data-theme="light"] #remove-btn { color: #b3564b; }

/* Address line in the detail sheet — links out to Google Maps */
#detail-place {
  display: inline-block;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--ink-soft);
  text-decoration: none;
}
#detail-place:hover { color: var(--ink); text-decoration: underline; }
#detail-place:empty { display: none; }

/* ---------------------------------------------------------------------------
   Place search
--------------------------------------------------------------------------- */
.search-panel {
  position: fixed;
  top: calc(var(--chrome-top) + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, calc(100vw - 24px));
  z-index: 995; /* above banners, below sheets */
}
#search-input {
  width: 100%;
  padding: 11px 14px;
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  outline: none;
}
#search-input:focus { border-color: var(--accent-deep); }
#search-input::placeholder { color: var(--ink-soft); }
#search-results {
  list-style: none;
  margin: 6px 0 0;
  padding: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  max-height: min(46vh, 330px);
  overflow-y: auto;
}
#search-results li.note {
  padding: 12px 10px;
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
}
#search-results button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border-radius: 7px;
  color: var(--ink);
  font-size: 14px;
}
#search-results button strong { font-weight: 600; }
#search-results button span {
  display: block;
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 1px;
}
#search-results button:hover,
#search-results li.active button { background: var(--paper-2); }

/* ---------------------------------------------------------------------------
   Toasts, banner, onboarding
--------------------------------------------------------------------------- */
#toasts {
  position: fixed;
  top: calc(76px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2000;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}

.toast {
  padding: 11px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow);
  opacity: 0;
  translate: 0 -8px;
  transition: opacity 0.25s ease, translate 0.25s ease;
  text-align: center;
}
.toast.show { opacity: 1; translate: 0 0; }

.banner {
  position: fixed;
  top: calc(var(--chrome-top) + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 24px);
  padding: 9px 12px 9px 14px;
  background: var(--paper);
  border: 1px solid var(--accent);
  border-left: 4px solid var(--accent);
  color: var(--ink);
  border-radius: 10px;
  font-size: 13px;
  z-index: 990;
  box-shadow: var(--shadow);
}
.banner button { color: var(--ink-soft); font-size: 15px; padding: 2px 6px; }

.banner-warn {
  border-color: #d97706;
  border-left-color: #d97706;
}

/* Empty-viewport nudge, centred over the map */
.empty-note {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100vw - 48px);
  padding: 14px 18px;
  background: var(--card, var(--paper));
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  font-size: 14px;
  color: var(--ink-soft);
  text-align: center;
  z-index: 800;
  pointer-events: none;
}
.empty-note strong { color: var(--ink); }

.onboard {
  position: fixed;
  bottom: calc(92px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 16px;
  max-width: calc(100vw - 24px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 600;
  z-index: 990;
  animation: onboard-in 0.5s cubic-bezier(0.34, 1.3, 0.5, 1) 0.8s backwards;
}
@keyframes onboard-in {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.onboard button { color: var(--ink-soft); font-size: 15px; padding: 2px 6px; }

/* ---------------------------------------------------------------------------
   About dialog
--------------------------------------------------------------------------- */
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  max-width: min(440px, calc(100vw - 32px));
  padding: 26px;
  box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(20, 22, 26, 0.5); }
dialog h2 {
  margin: 0 0 2px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 550;
  font-size: 24px;
}
dialog .tagline { margin: 0 0 14px; color: var(--accent-deep); font-weight: 700; font-size: 13.5px; }
dialog p, dialog li { font-size: 14px; line-height: 1.55; }
dialog ul { padding-left: 20px; margin: 8px 0; }
dialog .fine { font-size: 12px; color: var(--ink-soft); margin-top: 14px; }
dialog .cta { margin-top: 16px; }

/* ---------------------------------------------------------------------------
   Leaflet chrome
--------------------------------------------------------------------------- */
.leaflet-control-zoom {
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  overflow: hidden;
  box-shadow: var(--shadow) !important;
  margin-bottom: calc(24px + env(safe-area-inset-bottom)) !important;
}
.leaflet-control-zoom a {
  background: var(--paper) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}
.leaflet-control-attribution {
  background: color-mix(in srgb, var(--paper) 78%, transparent) !important;
  color: var(--ink-soft) !important;
  font-size: 10px !important;
}
.leaflet-control-attribution a { color: var(--ink-soft) !important; }

@media (max-width: 520px) {
  .brand h1 { font-size: 17px; }
  .brand { padding: 9px 12px 10px; }
  .fab span.label { display: none; }
  .fab { padding: 15px 16px; }
  .fab .plus { font-size: 20px; }
}
