    /* tokens, base styles, and the pill/toast/popup/corner primitives
       live in ../../shared/map-shell.css (linked before this sheet);
       this file keeps the global app's own layout and machinery */
    #map { position: fixed; inset: 0; }
    #hud {
      position: fixed; top: 12px; left: 12px; right: 12px; max-width: 520px;
      padding: 14px 16px; background: var(--panel); border: 1px solid rgba(255,255,255,0.06);
      border-radius: 12px; backdrop-filter: blur(12px); box-shadow: 0 8px 30px rgba(0,0,0,0.25); z-index: 10;
    }
    #hud h1 { margin: 0 0 4px; font-weight: 600; letter-spacing: -0.02em; font-size: 18px; }
    #hud p { margin: 0 0 10px; color: var(--muted); font-size: 13px; line-height: 1.4; }
    #hud .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
    #hud button {
      background: var(--accent); color: #0b0c10; border: none; border-radius: 15px; padding: 14px 18px;
      font-weight: 700; cursor: pointer; transition: transform 120ms ease, box-shadow 120ms ease; font-size: 20px;
    }
    #hud button.secondary { background: rgba(255,255,255,0.08); color: var(--text); }
    #hud button:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,0.25); }
    #legend { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
    .chip {
      display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted);
      background: rgba(255,255,255,0.05); padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.06);
    }
    .chip i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
    #dock {
      position: fixed; left: 50%; bottom: calc(var(--safe-bottom) + 64px); transform: translateX(-50%);
      display: flex; flex-direction: column; gap: 6px; z-index: 11;
      width: min(94dvw, 1120px);
      max-width: 94dvw;
    }
    .dock-panel {
      background: rgba(15, 23, 42, 0.62); border: 1px solid rgba(255,255,255,0.06);
      border-radius: 12px; padding: 6px 8px; backdrop-filter: blur(10px);
      box-shadow: 0 8px 18px rgba(0,0,0,0.24);
      width: 100%;
      opacity: 0.95;
    }
    .dock-row { display: flex; gap: 6px; flex-wrap: nowrap; align-items: center; min-height: 24px; width: 100%; }
    .dock-row input {
      flex: 1 1 auto; min-width: 0; background: rgba(255,255,255,0.08); border: 1px solid transparent;
      color: var(--text); padding: 14px 12px; border-radius: 12px; font-size: clamp(18px, 2.4vw, 22px);
    }
    .dock-row select {
      background: rgba(255,255,255,0.08);
      border: 1px solid rgba(255,255,255,0.08);
      color: var(--text);
      padding: 3px 8px;
      border-radius: 8px;
      font-size: clamp(11px, 2.7vw, 13px);
      min-width: 104px;
      flex-shrink: 0;
    }
    .dock-row input::placeholder { color: rgba(226,232,240,0.6); }
    .dock-row button {
      background: rgba(226, 232, 240, 0.16); color: #e2e8f0; border: 1px solid rgba(255,255,255,0.08);
      border-radius: 12px; padding: 7px 14px; font-weight: 700; cursor: pointer;
      transition: transform 120ms ease, box-shadow 120ms ease; font-size: clamp(16px, 3.2vw, 18px);
    }
    .dock-row button.secondary { background: rgba(255,255,255,0.12); color: var(--text); }
    .dock-row button:hover { transform: translateY(-1px); box-shadow: 0 8px 16px rgba(0,0,0,0.3); }
    .dock-cities-row { align-items: center; }
    .dock-cities {
      display: flex;
      gap: 6px;
      flex-wrap: nowrap;
      width: 100%;
      overflow-x: auto;
      overflow-y: hidden;
      padding-bottom: 4px;
      flex: 1;
      cursor: grab;
      touch-action: pan-x;
      overscroll-behavior-x: contain;
      scrollbar-width: thin;
      scrollbar-color: rgba(148,163,184,0.4) rgba(15,23,42,0.2);
      -webkit-overflow-scrolling: touch;
    }
    .dock-cities.dragging { cursor: grabbing; }
    .dock-cities::-webkit-scrollbar {
      height: 8px;
      background: rgba(15,23,42,0.2);
    }
    .dock-cities::-webkit-scrollbar-thumb {
      background: rgba(148,163,184,0.4);
      border-radius: 4px;
    }
    .dock-cities::-webkit-scrollbar-thumb:hover {
      background: rgba(148,163,184,0.6);
    }
    .dock-chip {
      background: rgba(148,163,184,0.14); color: var(--text); border: 1px solid rgba(255,255,255,0.05);
      padding: 3px 9px; border-radius: 999px; font-size: clamp(11px, 2.7vw, 13px); cursor: pointer;
      transition: transform 120ms ease, background 120ms ease;
    }
    .dock-chip:hover { transform: translateY(-1px); background: rgba(148,163,184,0.28); }
    .dock-row + .dock-row { margin-top: 4px; }
    .streetview {
      width: 100%;
      height: min(260px, 34vh);
      min-width: 180px;
      min-height: 160px;
      max-width: 100%;
      max-height: 72vh;
      border-radius: 10px;
      overflow: hidden;
      background: rgba(15, 23, 42, 0.8);
      color: #e2e8f0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      margin-top: 8px;
      resize: both;
      position: relative;
      cursor: default;
      touch-action: none;
    }
    .streetview.expanded {
      width: min(960px, 92vw);
      height: min(630px, 72vh);
    }
    /* popup skin comes from the shared sheet; the drag affordance is ours.
       popups drag by their body on every pointer type, so the content opts
       out of browser pan/zoom; interactive children keep native gestures
       via the drag-start exclusions, and .streetview declares its own
       touch-action for the pano */
    .maplibregl-popup-content {
      cursor: grab;
      touch-action: none;
    }
    .maplibregl-popup-content a,
    .maplibregl-popup-content button,
    .maplibregl-popup-content select,
    .maplibregl-popup-content input,
    .maplibregl-popup-content textarea { touch-action: auto; }
    .maplibregl-popup-content.dragging {
      cursor: grabbing;
    }
    /* outranks the shared sheet's scoped popup-action recipe (0,2,1) */
    .maplibregl-popup-content .popup-actions .streetview-expand {
      background: rgba(15, 23, 42, 0.85);
      border-color: rgba(255,255,255,0.2);
      color: #f8fafc;
      font-weight: 700;
      box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    }
    .popup-drag-toast {
      position: absolute;
      left: 50%;
      top: 10px;
      transform: translateX(-50%);
      padding: 6px 12px;
      border-radius: 999px;
      background: rgba(15, 23, 42, 0.88);
      border: 1px solid rgba(255,255,255,0.16);
      color: #e2e8f0;
      font-size: 12px;
      opacity: 0;
      transition: opacity 200ms ease;
      pointer-events: none;
      z-index: 2;
    }
    .popup-drag-toast.visible {
      opacity: 0.9;
    }
    .popup-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 6px;
      cursor: grab;
      user-select: none;
    }
    .popup-header.dragging { cursor: grabbing; }
    .popup-title {
      font-weight: 600;
      color: #e2e8f0;
      font-size: 14px;
    }
    .popup-drag-hint {
      font-size: 11px;
      color: #cbd5f5;
      letter-spacing: 0.02em;
    }
    .sv-resize-handle {
      position: absolute;
      right: 6px;
      bottom: 6px;
      width: 18px;
      height: 18px;
      background: rgba(15, 23, 42, 0.65);
      border: 1px solid rgba(255,255,255,0.55);
      border-radius: 5px;
      cursor: nwse-resize;
      z-index: 3;
      box-shadow: 0 2px 6px rgba(0,0,0,0.25);
      display: grid;
      place-items: center;
      color: #e2e8f0;
      font-size: 11px;
      line-height: 1;
      font-weight: 700;
      user-select: none;
      pointer-events: auto;
    }
    #corner-reset {
      --pill-bg: rgba(15, 23, 42, 0.6);
      --pill-border: rgba(255, 255, 255, 0.06);
      --pill-shadow: none;
      width: 69px;
      height: 69px;
      padding: 0;
      text-decoration: none;
      cursor: pointer;
      /* the set-north badge seats on the right (jb 2026-07-17): below the
         top-right wordmark on desktop; phones hide the wordmark, so the
         badge takes the corner itself (media rule below) */
      top: calc(var(--safe-top) + 34px);
      /* compass on demand: hidden until the map is rotated off north */
      display: none;
      align-items: center;
      justify-content: center;
    }
    #corner-reset.rotated { display: inline-flex; }
    #corner-reset svg {
      width: 50px;
      height: 50px;
      display: block;
    }
    /* the theme select rides in the wordmark pill, behind its own divider;
       the select hides on phones (map-shell.css), which fixes the theme to
       backdrop there (the credit fallback still guards it). select chrome
       comes from .shell-pill-select in the shared sheet. */
    #basemapSelect { max-width: 120px; }
    #tile-status {
      position: fixed;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      background: rgba(15, 23, 42, 1);
      border: 1px solid rgba(255,255,255,0.08);
      color: #e2e8f0;
      border-radius: 999px;
      padding: 3px 8px;
      font-size: 8px;
      opacity: 0;
      pointer-events: none;
      transition: opacity 200ms ease;
      z-index: 11;
    }
    #tile-status.visible { opacity: 0.5; }
    #onboard {
      position: fixed;
      left: var(--safe-left);
      top: calc(var(--safe-top) + 8px);
      z-index: 14;
      display: none;
      max-width: min(320px, 88vw);
      /* cap the card at the viewport and scroll inside it: long onboarding
         copy on small screens must never push the actions row (the close
         button) below a fixed, unscrollable card. vh first as the fallback,
         dvh where supported so the mobile url bar cannot hide the actions. */
      max-height: calc(100vh - var(--safe-top) - var(--safe-bottom) - 16px);
      max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 16px);
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior: contain;
      background: rgba(15, 23, 42, 0.78);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 16px;
      padding: 12px 14px;
      color: #e2e8f0;
      box-shadow: 0 12px 24px rgba(0,0,0,0.3);
    }
    #onboard.visible { display: block; }
    #onboard h3 {
      margin: 0 0 6px;
      font-size: 16px;
      font-weight: 600;
    }
    #onboard p {
      margin: 0 0 8px;
      font-size: 13px;
      color: #cbd5f5;
    }
    #onboard ul {
      margin: 0 0 10px;
      padding-left: 16px;
      font-size: 13px;
      color: #cbd5f5;
    }
    #onboard li { margin-bottom: 4px; }
    #onboard .onboard-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }
    #onboard .onboard-actions a,
    #onboard .onboard-actions button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 6px 10px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.12);
      background: rgba(15, 23, 42, 0.35);
      color: #e2e8f0;
      font-size: 12px;
      text-decoration: none;
      cursor: pointer;
    }
    #onboard .onboard-actions button {
      background: rgba(255,255,255,0.9);
      color: #0b0c10;
      border-color: rgba(15, 23, 42, 0.35);
      font-weight: 600;
    }
    #bottom-actions {
      display: flex;
      gap: 8px;
      align-items: center;
    }
    #dock-toggle,
    #near-me {
      padding: 12px 22px;
      font-size: 18px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      white-space: nowrap;
    }
    /* the data maps split pill: the main zone follows the map (resting
       label, or the offer for the country under the centre); the caret
       zone always opens the searchable country panel. padding lives on
       the zones so each is its own full-height target */
    #datamaps-pill {
      padding: 0;
      font-size: 18px;
      display: inline-flex;
      align-items: stretch;
      white-space: nowrap;
      overflow: hidden;
    }
    #datamaps-go {
      display: inline-flex;
      align-items: center;
      padding: 12px 12px 12px 22px;
      color: inherit;
      text-decoration: none;
      cursor: pointer;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      /* long country names ellipsise instead of breaking the row */
      max-width: min(52vw, 340px);
    }
    /* offers ellipsise the name, never the arrow: the shrinkable span
       carries the text and the arrow sits outside it */
    #datamaps-go .dm-offer-name {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    #datamaps-go .dm-offer-arrow { flex: none; margin-left: 6px; }
    #datamaps-caret {
      display: inline-flex;
      align-items: center;
      padding: 12px 16px 12px 10px;
      margin-left: 2px;
      background: none;
      border: none;
      border-left: 1px solid rgba(255, 255, 255, 0.18);
      color: inherit;
      font: inherit;
      font-size: 14px;
      cursor: pointer;
    }
    /* the caret zone names its object: the visible word says a menu of
       all countries lives here (field lesson: bare glyphs go
       undiscovered), and the glyph turns while the panel is open —
       state carried by the aria-expanded the switcher already sets */
    #datamaps-caret .dm-caret-word { margin-right: 5px; }
    #datamaps-caret .dm-caret-glyph { display: inline-block; transition: transform 120ms ease; }
    #datamaps-caret[aria-expanded="true"] .dm-caret-glyph { transform: rotate(180deg); }
    /* offering: the main zone names the country under the map centre and
       the pill wears the chrome's "go" colour: emerald glass, distinct
       from amber (caution) and the blue data ramp, and separable from
       both without colour vision */
    #datamaps-pill.offering {
      --pill-opacity: 1;
      background: rgba(6, 78, 59, 0.78);
      border-color: rgba(52, 211, 153, 0.55);
      color: #a7f3d0;
    }
    #datamaps-pill.offering:hover { background: rgba(6, 95, 70, 0.88); color: #d1fae5; }
    #datamaps-pill.offering #datamaps-caret { border-left-color: rgba(52, 211, 153, 0.45); }
    /* the census toggle dot (country pages, over home): filled blue —
       the data ramp's colour — while the choropleth is on, hollow when
       off; mirrors the near-me pill's dot idiom */
    .dm-dot {
      width: 11px;
      height: 11px;
      border-radius: 50%;
      border: 2px solid #94a3b8;
      background: transparent;
      box-sizing: border-box;
      flex: none;
      margin-right: 8px;
    }
    .dm-dot.on {
      border-color: #3b82f6;
      background: #3b82f6;
      box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35);
    }
    /* hint state (global map, far out over a data country): an
       instruction to zoom, not yet an offer, so the label dims */
    #datamaps-pill.hinting #datamaps-go { color: #94a3b8; }
    /* the pill names its action in full on desktop and by its object on
       phones, mirroring the census pill's long/short label swap */
    #datamaps-pill .dm-label-short { display: none; }
    /* phones: every resting pill shrinks as one (the filter chip too),
       and an overfull row wraps upward instead of running off-screen */
    @media (max-width: 640px) {
      #bottom-actions {
        flex-wrap: wrap;
        justify-content: center;
        max-width: 96vw;
      }
      #dock-toggle,
      #near-me,
      #filters-clear {
        padding: 10px 13px;
        font-size: 14px;
      }
      #datamaps-pill { font-size: 14px; }
      #datamaps-go {
        padding: 10px 8px 10px 13px;
        max-width: 56vw;
      }
      #datamaps-caret { padding: 10px 12px 10px 8px; font-size: 12px; }
      #datamaps-pill .dm-label-long { display: none; }
      #datamaps-pill .dm-label-short { display: inline; }
    }
    #near-me .nm-dot {
      width: 11px;
      height: 11px;
      border-radius: 50%;
      border: 2px solid #94a3b8;
      background: transparent;
      box-sizing: border-box;
      flex: none;
    }
    #near-me.active .nm-dot {
      border-color: #3b82f6;
      background: #3b82f6;
      box-shadow: 0 0 0 3px rgba(59,130,246,0.35);
    }
    /* the labelled near-me pill replaces the stock geolocate icon */
    .maplibregl-ctrl-group:has(.maplibregl-ctrl-geolocate) { display: none; }
    .maplibregl-ctrl button.maplibregl-ctrl-geolocate { display: none; }
    #counts-wrap {
      gap: 4px;
      pointer-events: none;
    }
    #counts-wrap > * {
      pointer-events: auto;
    }
    /* the drag wrap around the key bar and its panel (global map): keeps
       the pair centred as one column so a drag moves them together */
    #counts-wrap > #key-wrap {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
    }
    /* touch drag (phone parity with desktop): the draggable chrome opts
       out of browser pan/zoom so a touch drag reaches the page's pointer
       handlers instead of being claimed for scrolling, and a stalled touch
       must not pop text selection or the link callout. the onboarding card
       is absent from this set on purpose: it scrolls, and it is not
       draggable anywhere. */
    #counts-bar, #wordmark, #dock {
      touch-action: none;
      -webkit-user-select: none;
      user-select: none;
      -webkit-touch-callout: none;
    }
    #wordmark select { touch-action: auto; }
    /* the dock's own controls keep native touch and text behaviour: the
       search input must take a caret and a selection, and drags never
       start from inputs or selects anyway */
    #dock input, #dock select {
      touch-action: auto;
      -webkit-user-select: text;
      user-select: text;
    }
    /* the denomination key list scrolls on phones: touches there scroll it */
    #counts { touch-action: pan-y; }
    #counts-bar {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    #counts-toggle {
      --pill-shadow: 0 8px 16px rgba(0, 0, 0, 0.28);
      z-index: 12;
      /* compact pull-down: three palette dots and a caret, panel on tap */
      padding: 7px 14px;
      font-size: 14px;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      width: auto;
      min-width: 0;
      justify-content: center;
      letter-spacing: 0.01em;
      white-space: nowrap;
    }
    #counts-toggle .key-dot {
      width: 11px;
      height: 11px;
      border-radius: 50%;
      flex: none;
    }
    #counts-toggle .key-label {
      font-weight: 600;
      margin-left: 2px;
    }
    #counts-toggle .key-caret {
      color: #94a3b8;
      font-size: 12px;
    }
    #counts-toggle[disabled] { opacity: 0.45; cursor: default; }
    #counts {
      display: none;
      z-index: 11;
      background: rgba(15, 23, 42, 0.62);
      border: 1px solid rgba(255,255,255,0.06);
      border-radius: 24px;
      padding: 12px 16px;
      font-size: 20px;
      color: #e2e8f0;
      width: min(260px, 30vw);
      min-width: 236px;
    }
    #counts h3 {
      margin: 0 0 12px;
      font-size: 20px;
      font-weight: 600;
      letter-spacing: 0.01em;
    }
    #counts ul {
      list-style: none;
      padding: 0;
      margin: 0;
      display: grid;
      gap: 6px;
    }
    #countsHint {
      display: none;
      text-align: center;
      color: #cbd5f5;
      font-size: 18px;
      padding: 4px 0 12px;
    }
    #counts li {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      color: #cbd5f5;
      align-items: center;
    }
    #counts .legend {
      display: inline-flex;
      align-items: center;
      gap: 12px;
    }
    #counts .dot {
      width: 16px;
      height: 16px;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.25);
    }
    #counts .count-total {
      margin-top: 12px;
      font-weight: 600;
      color: #f1f5f9;
    }
    #corner-refresh {
      --pill-bg: rgba(15, 23, 42, 0.6);
      width: 55px;
      height: 55px;
      display: grid;
      place-items: center;
      cursor: pointer;
      padding: 0;
    }
    #corner-refresh svg {
      width: 26px;
      height: 26px;
      display: block;
    }
    #corner-refresh:hover { opacity: 1; }
    @media (max-width: 640px) {
      #hud { max-width: 94vw; }
      #dock {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 86dvw;
        max-width: 86dvw;
        /* sit above the pill row so the open panel hides no controls;
           the band wraps to two pill rows on phones since the data maps
           pill joined it, so the old 64px offset overlapped by 20px
           (measured at 430px, jb report 2026-07-17) */
        bottom: calc(var(--safe-bottom) + 92px);
      }
      #corner-refresh {
        width: 44px;
        height: 44px;
        /* the three-pill action row needs the whole bottom band on a
           phone, so the refresh button steps up out of its way */
        bottom: calc(var(--safe-bottom) + 60px);
      }
      #corner-refresh svg { width: 22px; height: 22px; }
      #onboard {
        left: 50%;
        transform: translateX(-50%);
        top: calc(var(--safe-top) + 10px);
        max-width: min(88vw, 360px);
      }
      .dock-cities-row { display: none; }
      #counts {
        display: none;
        width: min(86vw, 480px);
        top: 44px;
        bottom: auto;
        max-height: min(50vh, 480px);
        overflow-y: auto;
        padding: 12px 16px;
        font-size: 22px;
        opacity: 0.85;
      }
      #counts h3 { font-size: 22px; }
      #counts ul { gap: 6px; }
      #counts li { font-size: 22px; }
      #counts .dot { width: 12px; height: 12px; }
      #cityChips { display: none; }
      .dock-row { gap: 4px; }
      .dock-row input { padding: 12px 12px; font-size: 19px; }
      .dock-row button { padding: 5px 9px; font-size: clamp(11px, 3vw, 12px); }
      .dock-cities { gap: 6px; }
      .dock-chip { font-size: clamp(9px, 2.1vw, 11px); padding: 3px 6px; }
      #counts-toggle {
        gap: 9px;
        padding: 6px 20px;
        min-width: max-content;
      }
      .maplibregl-ctrl { transform: scale(0.85); transform-origin: bottom right; }
      #corner-reset {
        width: 54px;
        height: 54px;
        /* the wordmark hides on phones; the badge takes the corner */
        top: var(--safe-top);
      }
      #corner-reset svg {
        width: 44px;
        height: 44px;
      }
    }

/* larger blue dot on phones: easier to spot under a thumb */
@media (max-width: 640px) {
  .maplibregl-user-location-dot,
  .maplibregl-user-location-dot::before {
    width: 22px;
    height: 22px;
  }
  .maplibregl-user-location-dot::after {
    width: 28px;
    height: 28px;
    left: -3px;
    top: -3px;
    border-width: 3px;
  }
}

/* top-right wordmark: repo link plus an osm fix-map deep-link; the pill,
   corner seat, and entry dividers come from the shared sheet */
#wordmark {
  --pill-bg: rgba(15, 23, 42, 0.55);
  --pill-border: rgba(255, 255, 255, 0.06);
  --pill-shadow: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #cbd5e1;
  padding: 5px 12px;
  font-size: 12px;
  letter-spacing: 0.02em;
}
#wordmark a {
  color: #e2e8f0;
  text-decoration: none;
  white-space: nowrap;
}
#wordmark a:hover {
  color: #fff;
  text-decoration: underline;
}
/* phones: the shared sheet (map-shell.css) hides the whole wordmark pill
   below 640px — phones are exploration surfaces (jb ruling 2026-07-16) */

/* lazy street view: the popup shows a button until someone asks */
.streetview .sv-show {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: #e2e8f0;
  font-size: 13px;
  cursor: pointer;
}
.streetview .sv-show:hover { background: rgba(255,255,255,0.16); }

/* filter chips inside the search panel */
.dock-filters {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 2px 2px;
}
.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #e2e8f0;
  background: rgba(148,163,184,0.14);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 999px;
  padding: 3px 9px;
  cursor: pointer;
  user-select: none;
}
.filter-chip input {
  margin: 0;
  width: 13px;
  height: 13px;
  accent-color: #3b82f6;
}
.filter-chip .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}
.filter-chip.unchecked { opacity: 0.45; }
/* the denomination row nests under the christian chip */
#denom-filters {
  margin-left: 14px;
  border-left: 2px solid rgba(255,255,255,0.14);
  padding-left: 10px;
}
.dock-filters-row { min-height: 0; }
#filters-toggle {
  background: none;
  border: none;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  /* a real touch target: full row width, thumb-sized height */
  width: 100%;
  text-align: left;
  padding: 8px 6px;
  min-height: 36px;
}
#filters-toggle:hover { color: #fff; }
@media (max-width: 640px) {
  #filters-toggle {
    font-size: 15px;
    padding: 11px 6px;
    /* the id rule above outranks the class-based .shell-touch floor,
       so the thumb floor is restated here */
    min-height: 44px;
  }
}
#dock-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 6px;
  flex: none;
}
#dock-close:hover { color: #fff; }

/* the select-all / unselect-all box leads each filter row */
.filter-chip-all {
  background: rgba(59,130,246,0.16);
  border-color: rgba(59,130,246,0.35);
  font-weight: 600;
}

/* closed-panel filter indicator: count plus one-tap clear */
#filters-clear {
  --pill-bg: rgba(59, 130, 246, 0.22);
  --pill-border: rgba(59, 130, 246, 0.5);
  --pill-opacity: 1;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
#filters-clear:hover { background: rgba(59,130,246,0.32); }

