/* ============================================================
   Trash Tribes — map application shell
   ============================================================ */

.app-body { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }

/* ---------- header ---------- */
.app-head {
  height: var(--head-h); flex: none; z-index: 60;
  display: flex; align-items: center; gap: 16px; padding: 0 18px;
  background: var(--card); border-bottom: 1.5px solid var(--line);
}
.app-head .brand-name { display: inline; }
.head-spacer { flex: 1; }
.head-right { display: flex; align-items: center; gap: 12px; font-family: var(--sans); font-size: .86rem; }
.who { color: var(--ink-soft); display: flex; align-items: center; gap: 8px; }
.who-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  background: var(--moss); color: #fff; font-family: var(--sans); font-weight: 600;
  font-size: .76rem; display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- mode switch ----------
   A deliberate mode, not click ambiguity: browsing opens the read-only
   panel, drawing places points. Same separation the app's Track tab and
   Flag FAB establish in the PRD. */
.modebar { display: inline-flex; border: 1.5px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.modebar button {
  font-family: var(--sans); font-size: .86rem; padding: 8px 15px;
  background: var(--card); color: var(--ink-soft); border: none; cursor: pointer;
  border-right: 1.5px solid var(--line); display: inline-flex; align-items: center; gap: 7px;
  transition: background .13s, color .13s;
}
.modebar button:last-child { border-right: none; }
.modebar button:hover { background: var(--paper-deep); }
.modebar button.active { background: var(--green); color: var(--paper-warm); }
.modebar button.active.risk { background: var(--seg-risk); }
.mode-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .55; }
.modebar button.active .mode-dot { opacity: 1; }

/* ---------- map ---------- */
.map-stage { flex: 1; position: relative; min-height: 0; }
#map { position: absolute; inset: 0; }
.map-stage.drawing .mapboxgl-canvas-container { cursor: crosshair; }

/* instruction rail under the header while a draw mode is active */
.mode-hint {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 20; font-family: var(--sans); font-size: .85rem;
  background: var(--ink); color: var(--paper-warm);
  padding: 9px 17px; border-radius: 999px; box-shadow: var(--shadow-md);
  display: none; align-items: center; gap: 10px; max-width: min(620px, calc(100% - 32px));
}
.mode-hint.show { display: flex; }
.mode-hint.risk { background: var(--seg-risk); }
.mode-hint kbd {
  font-family: var(--mono); font-size: .74rem; background: rgba(255,255,255,.18);
  padding: 2px 6px; border-radius: 3px;
}

/* ---------- floating panels ---------- */
.panel {
  position: absolute; z-index: 25; width: 320px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-md); display: flex; flex-direction: column;
  max-height: calc(100% - 28px);
}
.panel-right { top: 14px; right: 14px; }
.panel-left  { top: 14px; left: 14px; }
.panel-head {
  padding: 15px 18px 12px; border-bottom: 1.5px solid var(--line-soft);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.panel-head h3 { font-size: 1.12rem; line-height: 1.25; }
.panel-meta { font-family: var(--sans); font-size: .75rem; color: var(--ink-faint); margin-top: 3px; }
.panel-body { padding: 14px 18px; overflow-y: auto; }
.panel-foot { padding: 12px 18px; border-top: 1.5px solid var(--line-soft); display: flex; gap: 9px; }
.panel-foot .btn { flex: 1; }
.panel-close {
  background: none; border: none; cursor: pointer; color: var(--ink-faint);
  font-size: 1.3rem; line-height: 1; padding: 0 2px; flex: none;
}
.panel-close:hover { color: var(--ink); }

/* ---------- detail panel content ---------- */
/* Two verges, two records — the panel shows one at a time and this is how
   you cross to the other, never a merged view by default. */
.side-switch { display: flex; border: 1.5px solid var(--line); border-radius: var(--r-sm); overflow: hidden; margin-bottom: 12px; }
.side-switch button {
  flex: 1; font-family: var(--sans); font-size: .78rem; padding: 7px 4px; cursor: pointer;
  background: var(--card); color: var(--ink-soft); border: none; border-right: 1.5px solid var(--line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.side-switch button:last-child { border-right: none; flex: 0 0 58px; }
.side-switch button:hover { background: var(--paper-deep); }
.side-switch button.on { background: var(--green); color: var(--paper-warm); }

.stat-row { display: flex; gap: 18px; margin: 12px 0 6px; font-family: var(--sans); }
.stat { flex: 1; }
.stat-v { font-family: var(--serif); font-size: 1.4rem; font-weight: 700; line-height: 1.1; }
.stat-l { font-size: .72rem; color: var(--ink-faint); letter-spacing: .04em; text-transform: uppercase; margin-top: 2px; }

.hist { margin-top: 8px; border-top: 1.5px solid var(--line-soft); }
.hist-item { padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-family: var(--sans); }
.hist-item:last-child { border-bottom: none; }
.hist-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.hist-date { font-size: .84rem; font-weight: 600; }
.hist-by { font-size: .78rem; color: var(--ink-soft); margin-top: 2px; }
.hist-detail { font-size: .76rem; color: var(--ink-faint); margin-top: 4px; }
/* a record you can click to see that trip on its own */
.hist-item[data-session] { cursor: pointer; margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: var(--r-sm); }
.hist-item[data-session]:hover { background: color-mix(in srgb, var(--green) 6%, transparent); }
.hist-item.isolated {
  background: color-mix(in srgb, var(--gold) 13%, transparent);
  box-shadow: inset 3px 0 0 var(--gold-soft);
}
.isolate-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-family: var(--sans); font-size: .8rem; margin-bottom: 12px;
  padding: 8px 12px; border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--gold) 13%, transparent);
  border-left: 3px solid var(--gold-soft); color: var(--ink-soft);
}
.isolate-bar.hidden { display: none; }


.hist-actions { display: flex; gap: 14px; margin-top: 7px; flex-wrap: wrap; }
.hist-actions .linkbtn { font-size: .78rem; }
.linkbtn.danger { color: var(--danger); }
.linkbtn.danger:hover { color: var(--danger); opacity: .8; }

.section-note {
  font-family: var(--sans); font-size: .76rem; color: var(--ink-soft);
  background: var(--paper-deep); border-radius: var(--r-sm); padding: 8px 10px; margin-top: 8px;
}

/* ---------- draft panel (Log a Pick) ---------- */
.clickmode { display: flex; border: 1.5px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.clickmode button {
  flex: 1; font-family: var(--sans); font-size: .8rem; padding: 7px 6px; cursor: pointer;
  background: var(--card); color: var(--ink-soft); border: none;
  border-right: 1.5px solid var(--line);
}
.clickmode button:last-child { border-right: none; }
.clickmode button.on { background: var(--green); color: var(--paper-warm); }
.clickmode-hint {
  font-family: var(--sans); font-size: .74rem; color: var(--ink-faint);
  margin: 7px 0 12px; line-height: 1.45;
}

.draft-list { display: flex; flex-direction: column; gap: 9px; }
.draft-item {
  border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px;
  font-family: var(--sans); display: flex; align-items: flex-start; gap: 10px;
}
.draft-item .d-body { flex: 1; min-width: 0; }
.draft-item .d-road { font-size: .88rem; font-weight: 600; }
.draft-item .d-meta { font-size: .75rem; color: var(--ink-faint); margin-top: 2px; }
.draft-item .d-split {
  font-size: .72rem; color: var(--green); margin-top: 4px;
  display: inline-flex; align-items: center; gap: 5px;
}
.draft-remove {
  background: none; border: none; cursor: pointer; color: var(--ink-faint);
  font-size: 1rem; line-height: 1; padding: 2px;
}
.draft-remove:hover { color: var(--danger); }
.draft-empty {
  font-family: var(--sans); font-size: .84rem; color: var(--ink-faint);
  border: 1.5px dashed var(--line); border-radius: var(--r-sm);
  padding: 18px 14px; text-align: center; line-height: 1.5;
}
.draft-total {
  font-family: var(--sans); font-size: .8rem; color: var(--ink-soft);
  margin-top: 12px; padding-top: 10px; border-top: 1.5px solid var(--line-soft);
  display: flex; justify-content: space-between;
}

/* ---------- confirm sheet ----------
   A right-hand sheet, not a centred modal: the picker needs to keep
   seeing the roads they just drew while they say what happened on them. */
.confirm-sheet {
  position: absolute; top: 0; right: 0; bottom: 0; width: 400px; z-index: 40;
  background: var(--card); border-left: 1.5px solid var(--line);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.3,.7,.3,1);
}
.confirm-sheet.open { transform: none; }
.cs-head { padding: 18px 22px 14px; border-bottom: 1.5px solid var(--line-soft); }
.cs-head h2 { font-size: 1.3rem; }
.cs-steps { display: flex; gap: 8px; margin-top: 12px; font-family: var(--sans); font-size: .74rem; }
.cs-step {
  flex: 1; padding: 6px 0 0; border-top: 3px solid var(--line);
  color: var(--ink-faint); letter-spacing: .03em;
}
.cs-step.active { border-top-color: var(--green); color: var(--green); font-weight: 600; }
.cs-step.done { border-top-color: var(--moss); color: var(--moss); }
.cs-body { flex: 1; overflow-y: auto; padding: 18px 22px; }
/* The footer is a column now: the running total stacks above the two
   buttons so it is always in view, whatever the list is doing. */
.cs-foot { padding: 14px 22px; border-top: 1.5px solid var(--line-soft); display: flex;
  flex-direction: column; gap: 10px; }
.cs-foot-row { display: flex; gap: 10px; }
.cs-foot .btn { flex: 1; }
.cs-foot .alloc-sum { margin: 0; }

/* per-road allocation cards */
.alloc-card {
  border: 1.5px solid var(--line); border-radius: var(--r-md);
  padding: 14px 16px; margin-bottom: 13px; transition: border-color .15s, box-shadow .15s;
}
.alloc-card.focused { border-color: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 12%, transparent); }
.alloc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.alloc-road { font-size: 1rem; font-weight: 700; }
.alloc-len { font-family: var(--sans); font-size: .74rem; color: var(--ink-faint); flex: none; }
.alloc-splitnote { font-family: var(--sans); font-size: .73rem; color: var(--green); margin-top: 3px; }

/* segmented option pickers */
.opts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.opt {
  font-family: var(--sans); font-size: .8rem; padding: 6px 11px;
  border: 1.5px solid var(--line); border-radius: var(--r-sm);
  background: var(--card); color: var(--ink-soft); cursor: pointer;
  transition: background .13s, color .13s, border-color .13s;
}
.opt:hover { border-color: var(--moss); color: var(--ink); }
.opt.on { background: var(--green); border-color: var(--green); color: var(--paper-warm); }
.opt.on.risk { background: var(--seg-risk); border-color: var(--seg-risk); }

.bag-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.bag-step {
  width: 32px; height: 32px; flex: none; border-radius: var(--r-sm);
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink);
  font-size: 1.05rem; cursor: pointer; line-height: 1;
}
.bag-step:hover { border-color: var(--green); color: var(--green); }
.bag-val {
  width: 74px; text-align: center; font-family: var(--sans); font-size: .95rem;
  padding: 7px 4px; border: 1.5px solid var(--line); border-radius: var(--r-sm);
  background: var(--card); color: var(--ink);
}
.bag-unit { font-family: var(--sans); font-size: .8rem; color: var(--ink-faint); }

.alloc-sum {
  font-family: var(--sans); font-size: .86rem; padding: 11px 14px;
  border-radius: var(--r-sm); margin-top: 4px; display: flex;
  justify-content: space-between; align-items: center; gap: 10px;
}
.alloc-sum.ok   { background: color-mix(in srgb, var(--green) 12%, transparent); color: var(--green); }
.alloc-sum.off  { background: color-mix(in srgb, var(--danger) 11%, transparent); color: var(--danger); }
.alloc-sum b { font-family: var(--serif); font-size: 1rem; }

/* ---------- legend ---------- */
.app-legend {
  position: absolute; left: 14px; bottom: 14px; z-index: 20;
  background: color-mix(in srgb, var(--card) 95%, transparent);
  border: 1.5px solid var(--line); border-radius: var(--r-sm);
  padding: 9px 13px; display: flex; gap: 15px; flex-wrap: wrap;
  font-family: var(--sans); font-size: .77rem; box-shadow: var(--shadow-sm);
}
.zoom-note { color: var(--ink-faint); border-left: 1.5px solid var(--line); padding-left: 14px; }

/* style switcher */
.style-switch {
  position: absolute; right: 14px; bottom: 14px; z-index: 20;
  display: inline-flex; border: 1.5px solid var(--line); border-radius: var(--r-sm);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.style-switch button {
  font-family: var(--sans); font-size: .76rem; padding: 6px 11px; cursor: pointer;
  background: var(--card); color: var(--ink-soft); border: none; border-right: 1.5px solid var(--line);
}
.style-switch button:last-child { border-right: none; }
.style-switch button.active { background: var(--green); color: var(--paper-warm); }

/* ---------- auth ---------- */
.auth-tabs { display: flex; gap: 0; margin: 18px 0 4px; border-bottom: 1.5px solid var(--line); }
.auth-tab {
  flex: 1; background: none; border: none; cursor: pointer; padding: 10px 0;
  font-family: var(--sans); font-size: .9rem; color: var(--ink-faint);
  border-bottom: 2.5px solid transparent; margin-bottom: -1.5px;
}
.auth-tab.active { color: var(--green); border-bottom-color: var(--green); font-weight: 600; }
.sheet-brand { text-align: center; margin-bottom: 6px; }
.sheet-brand .tagline {
  font-family: var(--serif); font-style: italic; color: var(--ink-soft);
  font-size: .92rem; margin-top: 8px;
}

/* consent blocks — the privacy stance gets its own affirmative step,
   never folded into a single "I agree to everything" checkbox */
.consent { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.consent-block {
  border: 1.5px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: var(--r-sm); padding: 13px 15px; background: var(--paper-warm);
}
.consent-block h4 { font-size: .92rem; margin-bottom: 6px; }
.consent-block p { font-family: var(--sans); font-size: .8rem; color: var(--ink-soft); line-height: 1.55; }
.chk {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 10px;
  font-family: var(--sans); font-size: .82rem; cursor: pointer; line-height: 1.5;
}
.chk input { margin-top: 3px; flex: none; width: 16px; height: 16px; accent-color: var(--green); }
.placeholder-tag {
  font-family: var(--sans); font-size: .7rem; font-style: normal;
  color: var(--gold); border: 1px dashed var(--gold); border-radius: 3px;
  padding: 1px 5px; margin-left: 5px; white-space: nowrap;
}

/* ---------- onboarding ---------- */
.onboard-slide { display: none; }
.onboard-slide.active { display: block; }
.onboard-visual {
  height: 128px; border-radius: var(--r-md); margin-bottom: 18px;
  background: var(--paper-deep); border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.onboard-dots { display: flex; gap: 7px; justify-content: center; margin-top: 18px; }
.onboard-dots i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--line);
  display: block; transition: background .2s, width .2s;
}
.onboard-dots i.on { background: var(--green); width: 20px; border-radius: 4px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .app-head { gap: 10px; padding: 0 12px; }
  .app-head .brand-name { display: none; }
  .modebar button { padding: 8px 11px; font-size: .8rem; }
  .who span:not(.who-avatar) { display: none; }
  .panel { width: calc(100% - 24px); max-height: 46%; }
  .panel-left { top: auto; bottom: 14px; left: 12px; }
  .panel-right { top: 62px; right: 12px; }
  .confirm-sheet { width: 100%; }
  .app-legend { font-size: .72rem; gap: 10px; padding: 7px 10px; }
  .zoom-note { display: none; }
}

/* ============================================================
   Bulk GPX import
   ============================================================ */
.imp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }

.imp-drop {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  margin: 18px 0 6px; padding: 26px 18px; cursor: pointer;
  border: 2px dashed var(--line); border-radius: var(--r-md);
  background: color-mix(in srgb, var(--green) 4%, transparent);
  text-align: center; transition: border-color .15s, background .15s;
}
.imp-drop:hover, .imp-drop.over {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green) 10%, transparent);
}

.imp-list { display: flex; flex-direction: column; gap: 12px; margin: 14px 0 4px; }
.imp-row {
  border: 1.5px solid var(--line); border-radius: var(--r-md);
  padding: 13px 15px; background: var(--card);
}
.imp-row.saved { opacity: .62; }
.imp-row.error, .imp-row.empty { border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.imp-row-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.imp-code {
  font-family: var(--sans); font-size: .72rem; letter-spacing: .08em;
  color: var(--ink-faint); margin-top: 2px;
}
.imp-badge {
  font-family: var(--sans); font-size: .7rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  padding: 3px 9px; border-radius: 999px; flex: none;
  background: var(--paper-deep); color: var(--ink-soft);
}
.imp-badge.ok { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.imp-badge.check { background: color-mix(in srgb, var(--gold) 20%, transparent); color: var(--gold-soft); }
.imp-badge.bad { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.imp-badge.work { background: var(--paper-deep); color: var(--ink-faint); }

.imp-facts, .imp-roads { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.imp-facts span {
  font-family: var(--sans); font-size: .78rem; color: var(--ink-soft);
}
.imp-facts span + span::before { content: "·"; margin-right: 6px; color: var(--ink-faint); }
.imp-roads span {
  font-family: var(--sans); font-size: .75rem;
  padding: 2px 8px; border-radius: 999px;
  background: var(--paper-deep); color: var(--ink-soft);
}
.imp-flag {
  font-family: var(--sans); font-size: .8rem; line-height: 1.45;
  margin-top: 8px; padding-left: 11px; border-left: 2.5px solid var(--line);
  color: var(--ink-soft);
}
.imp-flag.check { border-left-color: var(--gold); }
.imp-flag.bad { border-left-color: var(--danger); }
.imp-row-foot { display: flex; align-items: center; gap: 14px; margin-top: 12px; }

/* the imported-track facts, shown on step 1 of the save flow */
.gpx-facts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin: 4px 0 16px; padding: 13px 15px;
  border-radius: var(--r-md); border: 1.5px solid var(--line);
  background: color-mix(in srgb, var(--green) 5%, transparent);
}
.gpx-facts div { text-align: center; }
.gpx-facts b { display: block; font-size: 1.05rem; }
.gpx-facts span {
  font-family: var(--sans); font-size: .7rem; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ink-faint);
}

/* ============================================================
   What was collected
   ============================================================ */
.lit-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.lit-chip {
  font-family: var(--sans); font-size: .8rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink-soft);
  transition: border-color .12s, background .12s, color .12s;
}
.lit-chip:hover { border-color: var(--green); color: var(--ink); }
.lit-chip.on {
  border-color: var(--green); color: var(--green);
  background: color-mix(in srgb, var(--green) 11%, transparent);
  font-weight: 600;
}
.lit-rank {
  display: inline-flex; align-items: center; justify-content: center;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--green); color: var(--paper-warm);
  font-size: .68rem; font-weight: 700;
}
.lit-order {
  display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px;
  font-family: var(--sans); font-size: .8rem; color: var(--ink-soft);
}
.lit-order strong { color: var(--ink); font-weight: 600; }
.shake { animation: litShake .34s; }
@keyframes litShake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* a collapsible optional block in the save flow */
.opt-block { margin-top: 18px; border-top: 1.5px solid var(--line); padding-top: 14px; }
.opt-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: var(--serif); font-size: 1rem; color: var(--ink); text-align: left;
}
.opt-toggle .opt-caret { font-family: var(--sans); font-size: .8rem; color: var(--ink-faint); }
.opt-body { margin-top: 13px; }
.opt-body.hidden { display: none; }

/* Trim and Fill sit side by side — they are opposites of one gesture. */
.fix-row { display: flex; gap: 8px; margin-top: 10px; }
.fix-row .btn { flex: 1; }

/* A bridged stretch is not a road, and must never look like one. */
.draft-item.is-bridge, .alloc-card.is-bridge {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--gold) 55%, var(--line));
}

/* A percentage in tens. "Not recorded" is a real answer, distinct from
   zero, so the readout says so until the slider is actually moved. */
.pct-row { display: flex; align-items: center; gap: 12px; }
.pct-row input[type="range"] { flex: 1; accent-color: var(--green); min-width: 0; }
.pct-row input[type="range"][data-unset] { opacity: .55; }
.pct-out {
  font-family: var(--sans); font-size: .86rem; font-weight: 600;
  min-width: 86px; text-align: right; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.pct-out.unset { color: var(--ink-faint); font-weight: 400; font-size: .8rem; }
.pct-clear { font-size: .76rem; }
.lit-mats { margin-top: 4px; }

/* ============================================================
   Add to the record — one button, three ways in
   ============================================================ */
.addmenu { position: relative; }
.add-caret { font-size: .7rem; opacity: .8; }
.addmenu-list {
  position: absolute; top: calc(100% + 7px); left: 0; z-index: 120;
  min-width: 270px; padding: 6px;
  background: var(--card); border: 1.5px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 2px;
}
.addmenu-list.hidden { display: none; }
.addmenu-list button {
  display: flex; flex-direction: column; gap: 2px; text-align: left;
  padding: 10px 12px; border: none; border-radius: var(--r-sm);
  background: none; cursor: pointer; font-family: var(--sans);
}
.addmenu-list button:hover, .addmenu-list button:focus-visible {
  background: color-mix(in srgb, var(--green) 10%, transparent);
}
.addmenu-list strong { font-size: .9rem; color: var(--ink); font-weight: 600; }
.addmenu-list span { font-size: .78rem; color: var(--ink-faint); line-height: 1.4; }
.addmenu-list button.risk:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.addmenu-list button.risk strong { color: var(--danger); }

/* Secondary destinations in the map header. */
.headlink {
  font-family: var(--sans); font-size: .86rem; color: var(--ink-soft);
  text-decoration: none; white-space: nowrap;
}
.headlink:hover { color: var(--green); }
@media (max-width: 900px) { .headlink { display: none; } }

/* The shared header. Written once in ui.js and mounted into whichever
   container a page provides, so eight pages cannot drift apart. */
.nav-account { display: inline-flex; align-items: center; gap: 14px; }
.site-nav .nav-account { margin-left: 6px; padding-left: 16px; border-left: 1.5px solid var(--line); }
.site-nav a.here, .headlinks a.here { color: var(--green); font-weight: 600; }
.headlinks { display: inline-flex; align-items: center; gap: 18px; }
.headlinks a {
  font-family: var(--sans); font-size: .86rem; color: var(--ink-soft);
  text-decoration: none; white-space: nowrap;
}
.headlinks a:hover { color: var(--green); }
.app-nav { display: flex; align-items: center; gap: 16px; }
.navlink { font-family: var(--sans); font-size: .86rem; color: var(--gold-soft); text-decoration: none; }
@media (max-width: 1100px) { .headlinks a:not(.here) { display: none; } }
