/* Flicken — styles. Original Flicken code, MIT (see LICENSE).
   v19: Material 3 (M3) as the design language, implemented by hand as CSS
   custom properties. No M3 library, no web components, no external fonts.

   Rule: colour values appear ONLY in the token block below; every component
   rule references a token (tools/check_release.py warns otherwise). The green
   palette of v18 is kept; M3 roles organise it.
   v20: a dark palette follows the browser/system preference
   (prefers-color-scheme). It is a second token block directly after the
   first; no toggle, no stored preference. Map tiles stay light (decision
   2026-11-07, C08), so pins and clusters keep their own tokens. */

/* =====================================================================
   TOKENS
   ===================================================================== */
:root {
  /* ---- Colour roles (M3 names) ---- */
  --md-sys-color-primary: #0a6e4d;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #b2f0dc;
  --md-sys-color-on-primary-container: #075238;
  --md-sys-color-secondary-container: #e9f7f2;
  --md-sys-color-on-secondary-container: #075238;
  --md-sys-color-surface: #f4f7f5;
  --md-sys-color-surface-container-lowest: #ffffff;
  --md-sys-color-surface-container-low: #f7faf8;
  --md-sys-color-surface-container: #eef3f0;
  --md-sys-color-surface-variant: #e9f7f2;
  --md-sys-color-on-surface: #1d2421;
  --md-sys-color-on-surface-variant: #5c6b64;
  --md-sys-color-outline: #6f7d76;
  --md-sys-color-outline-variant: #dce5e0;
  --md-sys-color-error: #ba1a1a;
  --md-sys-color-on-error: #ffffff;
  --md-sys-color-error-container: #fff4f4;
  --md-sys-color-on-error-container: #8a1111;
  --md-sys-color-scrim: rgba(10, 30, 22, .55);

  /* ---- Flicken roles (same palette as v18, named by meaning) ---- */
  --fl-color-primary-strong: #075238;         /* header gradient end, footer */
  --fl-color-primary-outline: #cdeadd;        /* tonal tag and box borders */
  --fl-color-on-primary-soft: #eafff7;        /* secondary text on green */
  --fl-color-on-primary-faint: #c4e8d9;       /* small print on green */
  --fl-color-focus: #0b3d2c;                  /* focus ring on light surfaces */
  --fl-color-disabled: #8a9892;
  --fl-color-unavailable: #aab4af;            /* "not offered" options */
  --fl-color-info-container: #eef3ff;         /* brands, independence, notes */
  --fl-color-on-info-container: #23407f;
  --fl-color-info-outline: #d4e0ff;
  --fl-color-extra-container: #fff4e8;        /* additional services */
  --fl-color-on-extra-container: #9a5b16;
  --fl-color-extra-outline: #ffe2c2;
  --fl-color-access-container: #f1f3f6;       /* service options */
  --fl-color-on-access-container: #4a5568;
  --fl-color-access-outline: #dde2ea;
  --fl-color-warn-container: #fff6e5;         /* map tile notice, long links */
  --fl-color-on-warn-container: #7a4a00;
  --fl-color-warn-outline: #f2dcae;
  --fl-color-pending-container: #fff8e1;      /* "to be confirmed" */
  --fl-color-on-pending-container: #5a4300;
  --fl-color-pending-outline: #f0de9c;
  --fl-color-error-outline: #efb1b1;
  --fl-color-pin-active: #c4540a;             /* selected map pin */
  --fl-color-cluster: rgba(10, 110, 77, .25);
  /* v20: roles that must not follow the dark palette blindly. */
  --fl-color-header-start: #0a6e4d;           /* header gradient (= primary in light) */
  --fl-color-header-end: #075238;             /* header gradient end, footer */
  --fl-color-on-header: #ffffff;              /* text and outlines on header/footer */
  --fl-color-pin: #0a6e4d;                    /* pins and clusters sit on light tiles */
  --fl-color-pin-paper: #ffffff;
  --fl-color-on-pin: #ffffff;
  --fl-color-map-control: #ffffff;            /* zoom buttons, popups, attribution */
  --fl-color-on-map-control: #1d2421;
  --fl-color-map-attribution: rgba(255, 255, 255, .85);
  --fl-color-live-flash: #fff1c2;             /* results line: brief "updated" highlight */
  --fl-color-logo-mark: #0a6e4d;              /* the mark on its white square, both palettes */
  color-scheme: light dark;

  /* ---- Typography roles (system fonts; M3 type scale names) ---- */
  --md-sys-typescale-font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --md-sys-typescale-display-small: clamp(1.7rem, 4.5vw, 2.7rem);
  --md-sys-typescale-headline-small: 1.25rem;
  --md-sys-typescale-title-large: 1.15rem;
  --md-sys-typescale-title-medium: 1.05rem;
  --md-sys-typescale-title-small: .95rem;
  --md-sys-typescale-body-large: 1rem;
  --md-sys-typescale-body-medium: .92rem;
  --md-sys-typescale-body-small: .82rem;
  --md-sys-typescale-label-large: .92rem;
  --md-sys-typescale-label-medium: .8rem;
  --md-sys-typescale-label-small: .7rem;
  --md-sys-typescale-weight-regular: 400;
  --md-sys-typescale-weight-medium: 600;
  --md-sys-typescale-weight-bold: 700;
  --md-sys-typescale-weight-heavy: 800;

  /* ---- Shape scale ---- */
  --md-sys-shape-corner-none: 0;
  --md-sys-shape-corner-extra-small: 4px;
  --md-sys-shape-corner-small: 8px;
  --md-sys-shape-corner-medium: 12px;
  --md-sys-shape-corner-large: 16px;
  --md-sys-shape-corner-extra-large: 28px;
  --md-sys-shape-corner-full: 999px;

  /* ---- Spacing scale ---- */
  --fl-space-1: .25rem;
  --fl-space-2: .5rem;
  --fl-space-3: .75rem;
  --fl-space-4: 1rem;
  --fl-space-5: 1.25rem;
  --fl-space-6: 1.5rem;
  --fl-space-8: 2rem;
  --fl-content-max: 1120px;
  --fl-touch-target: 44px;

  /* ---- Elevation levels ---- */
  --md-sys-elevation-level0: none;
  --md-sys-elevation-level1: 0 1px 3px rgba(10, 40, 30, .08), 0 6px 20px rgba(10, 40, 30, .06);
  --md-sys-elevation-level2: 0 2px 6px rgba(10, 40, 30, .12), 0 10px 28px rgba(10, 40, 30, .08);
  --md-sys-elevation-level3: 0 20px 60px rgba(0, 0, 0, .3);
  --fl-pin-shadow: drop-shadow(0 1px 2px rgba(0, 0, 0, .35));
}

/* ---- v20 dark palette: same roles, values for prefers-color-scheme: dark.
   Only colour tokens change; components keep referencing the same names. */
@media (prefers-color-scheme: dark) {
  :root {
    --md-sys-color-primary: #74d6ad;
    --md-sys-color-on-primary: #00382a;
    --md-sys-color-primary-container: #8fe2bf;
    --md-sys-color-on-primary-container: #d3f8e7;
    --md-sys-color-secondary-container: #1d3a2f;
    --md-sys-color-on-secondary-container: #c4f1dc;
    --md-sys-color-surface: #0f1412;
    --md-sys-color-surface-container-lowest: #161d1a;
    --md-sys-color-surface-container-low: #1a221f;
    --md-sys-color-surface-container: #1f2925;
    --md-sys-color-surface-variant: #22302a;
    --md-sys-color-on-surface: #e2e8e4;
    --md-sys-color-on-surface-variant: #b3c0b9;
    --md-sys-color-outline: #8b9a93;
    --md-sys-color-outline-variant: #35433d;
    --md-sys-color-error: #ffb4ab;
    --md-sys-color-on-error: #690005;
    --md-sys-color-error-container: #3a1515;
    --md-sys-color-on-error-container: #ffdad6;
    --md-sys-color-scrim: rgba(0, 0, 0, .65);
    --fl-color-primary-strong: #9aeccb;
    --fl-color-primary-outline: #2e5444;
    --fl-color-on-primary-soft: #d6f5e8;
    --fl-color-on-primary-faint: #a6d6c2;
    --fl-color-focus: #a8f5d2;
    --fl-color-disabled: #6f7d76;
    --fl-color-unavailable: #5f6b66;
    --fl-color-info-container: #1c2742;
    --fl-color-on-info-container: #c6d6ff;
    --fl-color-info-outline: #34425f;
    --fl-color-extra-container: #33261a;
    --fl-color-on-extra-container: #ffc794;
    --fl-color-extra-outline: #4f3a27;
    --fl-color-access-container: #222831;
    --fl-color-on-access-container: #c8cfdb;
    --fl-color-access-outline: #363e4a;
    --fl-color-warn-container: #33290f;
    --fl-color-on-warn-container: #ffd78f;
    --fl-color-warn-outline: #4f3f19;
    --fl-color-pending-container: #332c0f;
    --fl-color-on-pending-container: #f3de92;
    --fl-color-pending-outline: #4f4418;
    --fl-color-error-outline: #6d2b2b;
    --fl-color-header-start: #0f2a20;
    --fl-color-header-end: #0a1f17;
    --fl-color-on-header: #ffffff;
    --fl-color-map-control: #161d1a;
    --fl-color-on-map-control: #e2e8e4;
    --fl-color-map-attribution: rgba(22, 29, 26, .9);
    --fl-color-live-flash: #3d3412;
    --md-sys-elevation-level1: 0 1px 3px rgba(0, 0, 0, .5), 0 6px 20px rgba(0, 0, 0, .35);
    --md-sys-elevation-level2: 0 2px 6px rgba(0, 0, 0, .55), 0 10px 28px rgba(0, 0, 0, .4);
  }
}

/* =====================================================================
   BASE
   ===================================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--md-sys-typescale-font);
  margin: 0; background: var(--md-sys-color-surface); color: var(--md-sys-color-on-surface);
  font-size: var(--md-sys-typescale-body-large);
  line-height: 1.55; -webkit-font-smoothing: antialiased;
}
a { color: var(--md-sys-color-primary); }
.hidden { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--fl-space-3); top: -4rem; z-index: 5000; background: var(--md-sys-color-surface-container-lowest); color: var(--fl-color-primary-strong); padding: .55rem .95rem; border-radius: var(--md-sys-shape-corner-small); font-weight: var(--md-sys-typescale-weight-bold); text-decoration: none; box-shadow: var(--md-sys-elevation-level1); }
.skip-link:focus { top: var(--fl-space-3); }
/* Visible focus everywhere: dark on light surfaces, white on the green header and footer. */
:focus-visible { outline: 3px solid var(--fl-color-focus); outline-offset: 2px; }
header.site :focus-visible, footer.site :focus-visible { outline-color: var(--md-sys-color-on-primary); }
[tabindex="-1"]:focus { outline: none; }
.card:focus-visible { outline: 3px solid var(--fl-color-focus); outline-offset: 2px; }
.panel h2[tabindex="-1"]:focus-visible { outline: 3px solid var(--fl-color-focus); outline-offset: 3px; border-radius: var(--md-sys-shape-corner-extra-small); }

/* =====================================================================
   HEADER (top app bar + hero)
   ===================================================================== */
header.site {
  background: linear-gradient(160deg, var(--fl-color-header-start) 0%, var(--fl-color-header-end) 100%);
  color: var(--fl-color-on-header);
}
/* Inside the green header and footer, "on primary" means on the header
   colour, also in the dark palette (v20). */
header.site, footer.site { --md-sys-color-on-primary: var(--fl-color-on-header); }
.nav {
  max-width: var(--fl-content-max); margin: 0 auto; padding: var(--fl-space-3) var(--fl-space-5);
  display: flex; align-items: center; justify-content: space-between; gap: var(--fl-space-4); flex-wrap: wrap;
}
.nav .brand { display: flex; align-items: center; gap: .6rem; color: var(--md-sys-color-on-primary); text-decoration: none; min-height: var(--fl-touch-target); }
.brand .logo {
  width: 34px; height: 34px; border-radius: 9px; background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-primary);
  display: grid; place-items: center; flex: none;
}
.brand .logo svg { width: 24px; height: 24px; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: var(--md-sys-typescale-weight-heavy); font-size: 1.35rem; letter-spacing: -.02em; }
.nav-links { display: flex; align-items: center; gap: var(--fl-space-2) var(--fl-space-4); flex-wrap: wrap; }
.nav-links a.navlink {
  color: var(--fl-color-on-primary-soft); text-decoration: none; font-weight: var(--md-sys-typescale-weight-medium);
  font-size: var(--md-sys-typescale-label-large); min-height: var(--fl-touch-target); display: inline-flex; align-items: center;
  border-bottom: 2px solid transparent;
}
.nav-links a.navlink:hover { color: var(--md-sys-color-on-primary); border-bottom-color: var(--fl-color-on-primary-faint); }
/* Outlined buttons on the green bar: For Shops, Install. */
.nav-links .cta, .install-btn {
  color: var(--md-sys-color-on-primary); font: inherit; font-weight: var(--md-sys-typescale-weight-bold); font-size: var(--md-sys-typescale-label-large);
  border: 1.5px solid var(--fl-color-on-primary-faint); border-radius: var(--md-sys-shape-corner-full); padding: 0 var(--fl-space-4);
  min-height: var(--fl-touch-target); background: transparent; cursor: pointer; transition: background .15s, color .15s;
}
.nav-links .cta:hover, .install-btn:hover { background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-primary); }
.hero { max-width: var(--fl-content-max); margin: 0 auto; padding: .6rem var(--fl-space-5) 2.4rem; text-align: center; }
.hero h1 { font-size: var(--md-sys-typescale-display-small); margin: .4rem 0 .6rem; letter-spacing: -.02em; }
.hero-line { margin: 0 auto; max-width: 60ch; font-size: var(--md-sys-typescale-body-large); color: var(--fl-color-on-primary-soft); text-wrap: balance; }
/* Static facts (footer since the sixth round): clearly non-interactive. */
.facts { list-style: none; padding: 0; margin: var(--fl-space-3) auto; max-width: 900px; display: flex; gap: var(--fl-space-2) 1.4rem; justify-content: center; flex-wrap: wrap; font-size: var(--md-sys-typescale-body-medium); color: var(--fl-color-on-primary-soft); }
.facts .fact { display: block; text-wrap: balance; }   /* v20: the mark stays with the first word when a fact wraps */
.facts .fact::before { content: "✓"; margin-right: .4rem; color: var(--md-sys-color-primary-container); font-weight: var(--md-sys-typescale-weight-heavy); }

/* Language switch (header and footer): segmented, 44 px targets. */
.lang-switch { display: inline-flex; gap: var(--fl-space-1); }
.lang-switch .lang-btn {
  border: 1px solid var(--fl-color-on-primary-faint); background: transparent; color: var(--fl-color-on-primary-soft);
  font: inherit; font-weight: var(--md-sys-typescale-weight-bold); font-size: var(--md-sys-typescale-label-medium); letter-spacing: .02em;
  min-width: var(--fl-touch-target); min-height: var(--fl-touch-target); padding: 0 var(--fl-space-2);
  border-radius: var(--md-sys-shape-corner-small); cursor: pointer; line-height: 1;
  transition: background .15s, color .15s, border-color .15s;
}
.lang-switch .lang-btn:hover { border-color: var(--md-sys-color-on-primary); color: var(--md-sys-color-on-primary); }
.lang-switch .lang-btn.active { background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-primary); border-color: var(--md-sys-color-surface-container-lowest); }

/* =====================================================================
   LAYOUT, TABS (segmented buttons), PANELS
   ===================================================================== */
main { max-width: var(--fl-content-max); margin: -1.6rem auto 0; padding: 0 var(--fl-space-5) 3rem; }
.tabs-wrap { display: flex; justify-content: center; }
.tabs {
  display: inline-flex; flex-wrap: wrap; justify-content: center; gap: var(--fl-space-1);
  background: var(--md-sys-color-surface-container-lowest); border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-full); padding: var(--fl-space-1); box-shadow: var(--md-sys-elevation-level1); margin: 0 auto 1.3rem;
}
.tab-btn {
  border: none; background: transparent; color: var(--md-sys-color-primary); cursor: pointer; font: inherit;
  min-height: var(--fl-touch-target); padding: 0 1.4rem; border-radius: var(--md-sys-shape-corner-full);
  font-weight: var(--md-sys-typescale-weight-bold); font-size: var(--md-sys-typescale-label-large); transition: background .15s, color .15s;
}
.tab-btn[aria-selected="true"] { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.tab-btn:hover[aria-selected="false"] { background: var(--md-sys-color-secondary-container); }
.tab-btn:focus-visible { outline-offset: 1px; }
.panel { background: var(--md-sys-color-surface-container-lowest); border-radius: var(--md-sys-shape-corner-large); box-shadow: var(--md-sys-elevation-level1); padding: var(--fl-space-6); }
.panel h2 { margin: 0 0 var(--fl-space-4); font-size: var(--md-sys-typescale-headline-small); }

/* =====================================================================
   BUTTONS (filled, outlined, text)
   ===================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--fl-space-2);
  border: 1px solid transparent; border-radius: var(--md-sys-shape-corner-full); min-height: var(--fl-touch-target);
  padding: 0 var(--fl-space-6); font: inherit; font-weight: var(--md-sys-typescale-weight-bold); font-size: var(--md-sys-typescale-label-large);
  cursor: pointer; text-decoration: none; transition: background .15s, box-shadow .15s, transform .1s;
}
.btn-primary { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.btn-primary:hover { box-shadow: var(--md-sys-elevation-level1); background: var(--fl-color-primary-strong); }
.btn-ghost { background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-primary); border-color: var(--md-sys-color-outline); }
.btn-ghost:hover { background: var(--md-sys-color-secondary-container); }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 0 var(--fl-space-4); font-size: var(--md-sys-typescale-body-small); }
.pill-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  font: inherit; font-size: var(--md-sys-typescale-label-large); font-weight: var(--md-sys-typescale-weight-bold); line-height: 1.2;
  color: var(--md-sys-color-primary); background: var(--md-sys-color-surface-container-lowest); border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-full); min-height: var(--fl-touch-target); padding: 0 var(--fl-space-5); cursor: pointer; transition: background .15s, color .15s;
}
.pill-btn:hover:not(:disabled) { background: var(--md-sys-color-secondary-container); color: var(--fl-color-primary-strong); }
.pill-btn:disabled { color: var(--fl-color-disabled); border-color: var(--md-sys-color-outline-variant); background: var(--md-sys-color-surface-container-low); cursor: not-allowed; }
.pill-btn .pager-arrow { font-size: 1.05em; }
button.linklike {
  text-align: left; border: none; background: none; padding: 0; font: inherit; color: var(--md-sys-color-primary);
  font-weight: var(--md-sys-typescale-weight-bold); cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}

/* =====================================================================
   TEXT FIELDS (outlined) AND COMBOBOX
   ===================================================================== */
.search-grid {
  display: grid; gap: var(--fl-space-3);
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: start;   /* label + control per field; hints grow downwards */
}
.field { display: flex; flex-direction: column; gap: var(--fl-space-1); position: relative; min-width: 0; }
.field label, .modal label, .contact-form label, .label-like {
  font-size: var(--md-sys-typescale-label-medium); font-weight: var(--md-sys-typescale-weight-bold);
  color: var(--md-sys-color-on-surface-variant); text-transform: uppercase; letter-spacing: .03em;
}
.field input, .field select, .field textarea, .combo input.combo-input,
.modal input, .modal select, .modal textarea, .contact-form input, .contact-form textarea {
  min-height: var(--fl-touch-target); padding: .55rem .75rem; border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-extra-small); font: inherit; font-size: var(--md-sys-typescale-body-large);
  background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-on-surface); width: 100%; max-width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus, .combo input.combo-input:focus,
.modal input:focus, .modal select:focus, .modal textarea:focus, .contact-form input:focus, .contact-form textarea:focus {
  outline: 2px solid var(--md-sys-color-primary); outline-offset: 0; border-color: var(--md-sys-color-primary);
}
.field select option:disabled, .modal select option:disabled { color: var(--fl-color-unavailable); }
.field textarea, .diy-grid textarea { resize: vertical; min-height: 64px; }
.modal textarea { resize: vertical; min-height: 80px; }
.contact-form textarea { resize: vertical; min-height: 8rem; }
[aria-invalid="true"] { border-color: var(--md-sys-color-error) !important; }
.loc-hint, .hint { font-size: var(--md-sys-typescale-body-small); color: var(--md-sys-color-on-surface-variant); line-height: 1.35; text-transform: none; letter-spacing: 0; font-weight: 500; }
.field .hint { margin-top: .1rem; }
.req, .opt-tag { text-transform: none; letter-spacing: 0; font-weight: var(--md-sys-typescale-weight-medium); color: var(--md-sys-color-on-surface-variant); }
.search-actions { display: flex; gap: var(--fl-space-2); flex-wrap: nowrap; align-items: stretch; }
/* Search and Reset: their own full-width row under the filters, side by side. */
.search-grid .field-actions { grid-column: 1 / -1; }
.search-actions .btn { flex: 0 0 auto; white-space: nowrap; }

.combo { position: relative; max-width: 100%; }
.combo input.combo-input { padding-right: 2rem; }
.combo input.combo-input.is-placeholder { font-style: italic; color: var(--md-sys-color-on-surface-variant); }
.combo .combo-caret { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--md-sys-color-on-surface-variant); font-size: .7rem; }
/* Menu (M3): surface container, level-2 elevation, 44 px items. */
.combo .combo-list {
  position: absolute; z-index: 40; top: calc(100% + 3px); left: 0; right: 0;
  background: var(--md-sys-color-surface-container-lowest); border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-extra-small); box-shadow: var(--md-sys-elevation-level2);
  max-height: 300px; overflow-y: auto; padding: var(--fl-space-1) 0; display: none;
}
.combo.open .combo-list { display: block; }
.combo .opt {
  min-height: var(--fl-touch-target); padding: .4rem .75rem; font-size: var(--md-sys-typescale-body-medium); cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: var(--fl-space-2);
}
.combo .opt:hover, .combo .opt.active { background: var(--md-sys-color-secondary-container); }
.combo .opt.all { font-style: italic; color: var(--md-sys-color-on-surface-variant); font-weight: var(--md-sys-typescale-weight-medium); }
.combo .opt.na { color: var(--fl-color-unavailable); cursor: default; }
.combo .opt.na:hover { background: transparent; }
.combo .opt .na-tag { font-size: .68rem; font-weight: var(--md-sys-typescale-weight-bold); color: var(--fl-color-unavailable); text-transform: uppercase; letter-spacing: .03em; }
.combo .opt .ok-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--md-sys-color-primary); flex: none; }
.combo .opt.opt-extra { color: var(--md-sys-color-on-surface); }
.combo .opt.opt-sentinel { font-weight: var(--md-sys-typescale-weight-medium); color: var(--fl-color-primary-strong); }
.combo .opt.sel { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.combo .opt.sel .ok-dot { background: var(--md-sys-color-on-primary); }
.combo .group-label {
  font-size: var(--md-sys-typescale-label-small); font-weight: var(--md-sys-typescale-weight-heavy); text-transform: uppercase; letter-spacing: .05em;
  color: var(--md-sys-color-on-surface-variant); padding: .6rem .75rem .25rem; border-top: 1px solid var(--md-sys-color-outline-variant);
}
.combo .group-label:first-of-type { border-top: none; }
.combo .combo-empty { padding: .6rem .75rem; color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-body-small); font-style: italic; }

/* Not-listed helper under the search form (brief 9.2) */
.notlisted { display: flex; flex-wrap: wrap; align-items: center; gap: var(--fl-space-2) var(--fl-space-3); margin: var(--fl-space-3) 0 0; }
.notlisted .hint { margin: 0; }
.notlisted-actions { display: flex; flex-wrap: wrap; gap: var(--fl-space-2); }
.notlisted-actions:empty { display: none; }
.result-meta { margin: var(--fl-space-4) 0 .6rem; color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-body-medium); font-weight: var(--md-sys-typescale-weight-medium); }

/* =====================================================================
   CHIPS AND TAGS
   Tags (spans on cards) are read-only labels; chips (buttons in dialogs
   and request forms) are M3 filter chips with 44 px targets.
   ===================================================================== */
.tagrow { display: flex; flex-wrap: wrap; gap: .35rem; }
.tag {
  font-size: .74rem; font-weight: var(--md-sys-typescale-weight-bold); padding: .22rem .55rem; border-radius: var(--md-sys-shape-corner-small);
  background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); border: 1px solid var(--fl-color-primary-outline);
}
.tag.brand { background: var(--fl-color-info-container); color: var(--fl-color-on-info-container); border-color: var(--fl-color-info-outline); }
/* Service families: repair capabilities are the headline (filled), extras
   and service options are labelled, quieter rows. */
.tag.service-core { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); border-color: var(--md-sys-color-primary); }
.tag.service { background: var(--fl-color-extra-container); color: var(--fl-color-on-extra-container); border-color: var(--fl-color-extra-outline); }
.tag.service-access { background: var(--fl-color-access-container); color: var(--fl-color-on-access-container); border-color: var(--fl-color-access-outline); }
.tag.more { background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-on-surface-variant); border-color: var(--md-sys-color-outline-variant); font-weight: var(--md-sys-typescale-weight-medium); }
.svcrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem var(--fl-space-2); }
.svcrow .svclabel, .chip-group-label {
  flex: none; font-size: var(--md-sys-typescale-label-small); font-weight: var(--md-sys-typescale-weight-heavy); letter-spacing: .04em;
  text-transform: uppercase; color: var(--md-sys-color-on-surface-variant);
}
/* v20 (sixth round): secondary card facts as compact text lines. */
.factrow { margin: 0; font-size: var(--md-sys-typescale-body-small); line-height: 1.4; color: var(--md-sys-color-on-surface); }
.factrow .factlabel { font-weight: var(--md-sys-typescale-weight-bold); color: var(--md-sys-color-on-surface-variant); }
.factrow .factmore { color: var(--md-sys-color-on-surface-variant); white-space: nowrap; }
.chip-group-label { width: 100%; margin: .35rem 0 -.1rem; }
.chips .chip-group-label:first-child { margin-top: 0; }
.chips { display: flex; flex-wrap: wrap; gap: var(--fl-space-2); margin-top: .2rem; }
.chip, button.chip {
  display: inline-flex; align-items: center; min-height: var(--fl-touch-target); padding: 0 var(--fl-space-3);
  font: inherit; font-size: var(--md-sys-typescale-body-small); font-weight: var(--md-sys-typescale-weight-bold);
  border-radius: var(--md-sys-shape-corner-small); cursor: pointer; user-select: none;
  background: var(--md-sys-color-surface-container-lowest); border: 1px solid var(--md-sys-color-outline); color: var(--md-sys-color-on-surface-variant);
}
.chip:hover { background: var(--md-sys-color-secondary-container); }
.chip[aria-pressed="true"] { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); border-color: var(--md-sys-color-primary); }
.chip[aria-pressed="true"]::before { content: "✓"; margin-right: .35rem; }
.chip.chip-sentinel { border-style: dashed; }

/* =====================================================================
   SHOP CARD (one component for directory, parts/tools picker, reuse picker)
   M3 outlined card.
   ===================================================================== */
.cards { display: grid; gap: var(--fl-space-4); grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); }
.card {
  border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-medium); padding: var(--fl-space-4) 1.15rem;
  background: var(--md-sys-color-surface-container-lowest); display: flex; flex-direction: column; gap: .55rem; min-width: 0;
}
.card h3 { margin: 0; font-size: var(--md-sys-typescale-title-medium); display: flex; align-items: center; gap: var(--fl-space-2); flex-wrap: wrap; overflow-wrap: anywhere; }
.card .loc { color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-body-medium); font-weight: var(--md-sys-typescale-weight-medium); }
.card .loc { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .55rem; }
.card .loc .maplink { margin-left: 0; }
.card .loc svg { width: 13px; height: 13px; vertical-align: -1px; margin-right: .2rem; }
.card .actions { margin-top: auto; display: flex; gap: var(--fl-space-2); padding-top: .4rem; flex-wrap: wrap; align-items: center; }
.card .actions a, .card .actions button {
  display: inline-flex; align-items: center; justify-content: center; min-height: var(--fl-touch-target);
  text-decoration: none; font: inherit; font-size: var(--md-sys-typescale-body-small); font-weight: var(--md-sys-typescale-weight-bold);
  border-radius: var(--md-sys-shape-corner-full); padding: 0 var(--fl-space-4); cursor: pointer; border: 1px solid var(--md-sys-color-outline);
}
/* Ask now = filled (primary), Contact details = outlined. */
.card .actions .ask, .map-pop-actions .pop-ask { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); border-color: var(--md-sys-color-primary); }
.card .actions .details, .map-pop-actions .pop-visit { background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-primary); border-color: var(--md-sys-color-outline); }
.card .actions .details:hover { background: var(--md-sys-color-secondary-container); }
.card .noemail { font-size: var(--md-sys-typescale-body-small); color: var(--md-sys-color-on-surface-variant); }
.card.card-active { outline: 2px solid var(--md-sys-color-primary); outline-offset: 2px; }
/* Picker context: the selection control replaces Ask now; selected = tonal. */
.card .pick-choose {
  display: inline-flex; align-items: center; gap: var(--fl-space-2); min-height: var(--fl-touch-target); padding: 0 var(--fl-space-4) 0 var(--fl-space-3);
  border: 1px solid var(--md-sys-color-primary); border-radius: var(--md-sys-shape-corner-full); cursor: pointer;
  font-size: var(--md-sys-typescale-body-small); font-weight: var(--md-sys-typescale-weight-bold); color: var(--md-sys-color-primary);
  text-transform: none; letter-spacing: 0; background: var(--md-sys-color-surface-container-lowest);
}
.card .pick-choose input { width: 18px; height: 18px; margin: 0; accent-color: var(--md-sys-color-primary); }
.card.card-selected { border-color: var(--md-sys-color-primary); background: var(--md-sys-color-secondary-container); box-shadow: inset 0 0 0 1px var(--md-sys-color-primary); }
.card.card-selected .pick-choose { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
/* Independence is self-declared by the shop, never verified by Flicken. */
.badge-indep-wrap { display: inline-flex; align-items: center; }
.badge-indep {
  font-size: .68rem; font-weight: var(--md-sys-typescale-weight-heavy); letter-spacing: .03em; text-transform: uppercase;
  background: var(--fl-color-info-container); color: var(--fl-color-on-info-container); border: 1px solid var(--fl-color-info-outline);
  border-radius: var(--md-sys-shape-corner-full); padding: .15rem .5rem; cursor: help;
}
.empty { padding: var(--fl-space-8); text-align: center; color: var(--md-sys-color-on-surface-variant); }
/* "On the map" button in the card's location line (inline text button). */
.maplink { margin-left: .55rem; border: none; background: none; padding: .2rem 0; font: inherit; font-size: var(--md-sys-typescale-body-small); font-weight: var(--md-sys-typescale-weight-bold); color: var(--md-sys-color-primary); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; white-space: nowrap; }
.maplink::before { content: "↑ "; text-decoration: none; }

/* Pagination below the cards */
.pager { display: flex; align-items: center; justify-content: space-between; gap: .6rem var(--fl-space-4); margin: var(--fl-space-5) 0 .2rem; flex-wrap: wrap; }
.pager-status { margin: 0; flex: 1 1 12rem; text-align: center; color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-body-medium); font-weight: var(--md-sys-typescale-weight-medium); }
.pager-btn { flex: none; }

/* =====================================================================
   MAP (Leaflet)
   ===================================================================== */
.map-wrap {
  position: relative; z-index: 0; isolation: isolate;   /* below the dialogs */
  margin: 0 0 var(--fl-space-5); border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-medium); overflow: hidden; background: var(--md-sys-color-secondary-container);
}
.map-bar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: var(--fl-space-2) .8rem; background: var(--md-sys-color-surface-container-lowest); border-bottom: 1px solid var(--md-sys-color-outline-variant); font-size: .85rem; color: var(--md-sys-color-on-surface-variant); }
.map-bar .map-title { font-weight: var(--md-sys-typescale-weight-medium); color: var(--md-sys-color-on-surface); }
.map-bar .map-count { margin-left: auto; }
.map-count .linklike { font-size: .85rem; }
#repairMap { width: 100%; height: 420px; background: var(--md-sys-color-secondary-container); }
.leaflet-container { font: inherit; }
.repair-pin { background: none; border: none; }
.repair-pin svg { display: block; filter: var(--fl-pin-shadow); }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background: var(--fl-color-cluster); }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div { background: var(--fl-color-pin); color: var(--fl-color-on-pin); font-weight: var(--md-sys-typescale-weight-medium); }
.leaflet-popup-content-wrapper { border-radius: var(--md-sys-shape-corner-medium); }
.leaflet-popup-content { margin: .7rem .9rem; font-size: var(--md-sys-typescale-body-medium); line-height: 1.35; }
.leaflet-popup-content .map-pop p { margin: 0 0 .3rem; }
.map-pop-name { font-weight: var(--md-sys-typescale-weight-bold); color: var(--md-sys-color-on-surface); margin: 0 0 .15rem; }
.map-pop-loc { color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-body-small); margin: 0 0 .35rem; }
.map-pop-addr { color: var(--md-sys-color-on-surface); font-size: var(--md-sys-typescale-body-small); margin: 0 0 .55rem; }
.map-pop-approx { color: var(--md-sys-color-on-surface-variant); font-style: italic; font-size: .76rem; margin: 0 0 .55rem; }
.map-pop-actions { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: var(--fl-space-2); }
.map-pop-actions a, .map-pop-actions button {
  font: inherit; font-size: var(--md-sys-typescale-label-medium); cursor: pointer; min-height: 36px;
  border-radius: var(--md-sys-shape-corner-full); padding: .32rem .7rem; border: 1px solid var(--md-sys-color-primary); text-decoration: none; line-height: 1.1;
}
.map-pop-actions .pop-list { background: var(--md-sys-color-surface-container-lowest); color: var(--fl-color-primary-strong); border: 1px dashed var(--md-sys-color-primary); }
.pop-chosen { font-size: var(--md-sys-typescale-label-medium); font-weight: var(--md-sys-typescale-weight-bold); color: var(--fl-color-primary-strong); }
.map-legend { font-size: .78rem; color: var(--md-sys-color-on-surface-variant); padding: .45rem .8rem; background: var(--md-sys-color-surface-container-lowest); border-top: 1px solid var(--md-sys-color-outline-variant); margin: 0; }
.map-warn { display: none; font-size: .84rem; color: var(--fl-color-on-warn-container); background: var(--fl-color-warn-container); border-bottom: 1px solid var(--fl-color-warn-outline); padding: var(--fl-space-2) .8rem; margin: 0; }
.map-wrap.tiles-failed .map-warn { display: block; }
.map-wrap.no-map #repairMap, .map-wrap.no-map .map-legend { display: none; }
.map-wrap.no-map .map-warn { display: block; }

/* =====================================================================
   DIALOGS (M3 dialog anatomy)
   ===================================================================== */
.modal-backdrop {
  position: fixed; inset: 0; background: var(--md-sys-color-scrim); display: none;
  align-items: flex-start; justify-content: center; padding: 4vh var(--fl-space-4); z-index: 4000; overflow-y: auto;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--md-sys-color-surface-container-lowest); border-radius: var(--md-sys-shape-corner-extra-large); max-width: 560px; width: 100%;
  box-shadow: var(--md-sys-elevation-level3); padding: var(--fl-space-6); animation: pop .15s ease;
}
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h3 { margin: 0 0 .2rem; font-size: var(--md-sys-typescale-headline-small); }
.modal h3 .badge-indep, .card h3 .badge-indep { margin-left: .45rem; vertical-align: middle; }
.modal .sub { color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-body-medium); margin: 0 0 1.1rem; }
.modal .mfield { display: flex; flex-direction: column; gap: var(--fl-space-1); margin-bottom: .9rem; }
.modal .row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.modal-actions { display: flex; gap: var(--fl-space-2); justify-content: flex-end; margin-top: 1.1rem; flex-wrap: wrap; }
.modal .close-x {
  float: right; border: none; background: none; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--md-sys-color-on-surface-variant);
  min-width: var(--fl-touch-target); min-height: var(--fl-touch-target); border-radius: var(--md-sys-shape-corner-full); margin: -.6rem -.6rem 0 0;
}
.modal .close-x:hover { background: var(--md-sys-color-secondary-container); }
.modal fieldset, .fs { border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-medium); padding: .8rem var(--fl-space-4) var(--fl-space-4); margin: 0 0 .9rem; min-width: 0; }
.modal legend, .fs legend { font-weight: var(--md-sys-typescale-weight-heavy); font-size: var(--md-sys-typescale-body-medium); padding: 0 .35rem; color: var(--fl-color-primary-strong); }
.modal fieldset .hint { margin: -.2rem 0 .7rem; }
.modal .checkline input { width: auto; min-height: 0; margin-top: .2rem; flex: none; }
.checkline { display: flex; gap: .6rem; align-items: flex-start; font-size: var(--md-sys-typescale-body-medium); color: var(--md-sys-color-on-surface); margin: .2rem 0 .9rem; }
.modal .checkline label { flex: 1 1 auto; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--md-sys-color-on-surface); font-size: var(--md-sys-typescale-body-medium); line-height: 1.45; }
.ask-options-hint { margin: -.4rem 0 .9rem; }
.recipient-box { background: var(--md-sys-color-secondary-container); border: 1px solid var(--fl-color-primary-outline); border-radius: var(--md-sys-shape-corner-small); padding: .55rem .75rem; font-size: var(--md-sys-typescale-body-medium); margin: 0 0 var(--fl-space-4); overflow-wrap: anywhere; }
.recipient-box .k { font-size: .72rem; font-weight: var(--md-sys-typescale-weight-heavy); letter-spacing: .04em; text-transform: uppercase; color: var(--fl-color-primary-strong); display: block; }
.err-summary { border: 1px solid var(--fl-color-error-outline); background: var(--md-sys-color-error-container); color: var(--md-sys-color-on-error-container); border-radius: var(--md-sys-shape-corner-small); padding: .6rem .8rem; font-size: var(--md-sys-typescale-body-small); margin: 0 0 .9rem; }
.err-summary:empty { display: none; }
.err-summary ul { margin: .3rem 0 0 1.1rem; padding: 0; }
.reason-note { font-size: var(--md-sys-typescale-body-small); color: var(--fl-color-on-info-container); background: var(--fl-color-info-container); border: 1px solid var(--fl-color-info-outline); border-radius: var(--md-sys-shape-corner-small); padding: var(--fl-space-2) .7rem; margin: -.3rem 0 .9rem; }

/* Shop details dialog */
.detail-list { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .55rem; }
.detail-list li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .6rem; align-items: baseline; font-size: var(--md-sys-typescale-body-medium); }
.detail-list .k { font-size: .74rem; font-weight: var(--md-sys-typescale-weight-heavy); letter-spacing: .04em; text-transform: uppercase; color: var(--md-sys-color-on-surface-variant); }
.detail-list a, .detail-list button.linklike { color: var(--md-sys-color-primary); font-weight: var(--md-sys-typescale-weight-bold); text-decoration: none; word-break: break-word; }
.detail-list a:hover, .detail-list button.linklike:hover { text-decoration: underline; }
.detail-list button.linklike { border: none; background: none; padding: 0; font: inherit; font-weight: var(--md-sys-typescale-weight-bold); cursor: pointer; text-align: left; }
.detail-list .sub-k { display: block; font-size: .78rem; color: var(--md-sys-color-on-surface-variant); font-weight: 500; }
.detail-list .sec { display: inline-block; margin-top: .15rem; font-size: var(--md-sys-typescale-body-small); font-weight: var(--md-sys-typescale-weight-medium); }
.detail-list .row-actions { display: flex; flex-wrap: wrap; gap: .3rem .9rem; align-items: baseline; }
.detail-none { color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-body-medium); margin: .8rem 0 0; }
.detail-indep { font-size: .86rem; background: var(--fl-color-info-container); border: 1px solid var(--fl-color-info-outline); color: var(--fl-color-on-info-container); border-radius: var(--md-sys-shape-corner-small); padding: var(--fl-space-2) .7rem; margin: .2rem 0 .6rem; }
.detail-h { margin: var(--fl-space-4) 0 0; padding-top: .7rem; border-top: 1px solid var(--md-sys-color-outline-variant); font-size: var(--md-sys-typescale-title-small, .95rem); }
.detail-offer { margin-top: .4rem; }
.detail-foot { margin-top: var(--fl-space-4); padding-top: .7rem; border-top: 1px solid var(--md-sys-color-outline-variant); font-size: var(--md-sys-typescale-body-small); color: var(--md-sys-color-on-surface-variant); display: grid; gap: .35rem; }
.detail-foot p { margin: 0; }

/* Prepared email view */
.prepared h4, .suggest-box h4 { margin: 0 0 .4rem; color: var(--fl-color-primary-strong); font-size: var(--md-sys-typescale-title-medium); }
.prepared .status { font-weight: var(--md-sys-typescale-weight-bold); margin: 0 0 var(--fl-space-2); }
.prepared p { margin: .4rem 0; }
.prepared details { margin-top: .9rem; border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-small); background: var(--md-sys-color-surface-container-lowest); padding: .55rem .75rem; }
.prepared summary { cursor: pointer; font-weight: var(--md-sys-typescale-weight-bold); color: var(--fl-color-primary-strong); min-height: var(--fl-touch-target); display: flex; align-items: center; }
.copy-block { display: grid; gap: var(--fl-space-1); margin: .7rem 0 0; }
.copy-head { display: flex; justify-content: space-between; align-items: center; gap: var(--fl-space-2); }
.copy-head .k { font-size: .72rem; font-weight: var(--md-sys-typescale-weight-heavy); letter-spacing: .04em; text-transform: uppercase; color: var(--md-sys-color-on-surface-variant); }
.copy-block textarea, .copy-block input { width: 100%; font: inherit; font-size: .86rem; padding: var(--fl-space-2) .6rem; border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-small); background: var(--md-sys-color-surface-container-low); color: var(--md-sys-color-on-surface); }
.copy-block textarea { min-height: 11rem; resize: vertical; }
.alt-contacts { display: flex; flex-wrap: wrap; gap: var(--fl-space-2); margin-top: .4rem; }
.alt-contacts a { display: inline-flex; align-items: center; min-height: var(--fl-touch-target); font-size: .86rem; font-weight: var(--md-sys-typescale-weight-bold); text-decoration: none; border: 1px solid var(--md-sys-color-outline); border-radius: var(--md-sys-shape-corner-full); padding: 0 var(--fl-space-4); color: var(--md-sys-color-primary); background: var(--md-sys-color-surface-container-lowest); }
.warn-note { font-size: .86rem; color: var(--fl-color-on-warn-container); background: var(--fl-color-warn-container); border: 1px solid var(--fl-color-warn-outline); border-radius: var(--md-sys-shape-corner-small); padding: var(--fl-space-2) .7rem; }
.pending-note { font-size: .86rem; color: var(--fl-color-on-pending-container); background: var(--fl-color-pending-container); border: 1px solid var(--fl-color-pending-outline); border-radius: var(--md-sys-shape-corner-small); padding: .55rem .75rem; margin: 0 0 var(--fl-space-4); }
.reveal-slot { margin: var(--fl-space-2) 0; }
.suggest-box { background: var(--md-sys-color-secondary-container); border: 1px solid var(--fl-color-primary-outline); border-radius: var(--md-sys-shape-corner-medium); padding: var(--fl-space-4); font-size: var(--md-sys-typescale-body-medium); margin-top: var(--fl-space-4); }
.suggest-box .tagrow { margin-top: var(--fl-space-2); }
.copy-status:empty { display: none; }

/* =====================================================================
   REQUEST FORMS (parts/tools, reuse) AND SHOP PICKER
   ===================================================================== */
#panel-diy > h2, #panel-recycle > h2 { text-align: center; }
.diy-intro { color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-body-medium); margin: 0 auto 1.1rem; max-width: 70ch; text-align: center; }
.diy-grid { display: grid; gap: .9rem; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.diy-grid .field.span2, .diy-grid .fs { grid-column: 1 / -1; }
.diy-grid .fs { margin: 0; }
.fs-grid { display: grid; gap: .9rem; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.fs-grid .span2 { grid-column: 1 / -1; }
.fs, .pick-col { min-width: 0; }
.pick-meta { font-size: var(--md-sys-typescale-body-small); color: var(--md-sys-color-on-surface-variant); margin: var(--fl-space-2) 0 0; }
.recipient-live { font-weight: var(--md-sys-typescale-weight-bold); color: var(--fl-color-primary-strong); margin: .7rem 0 0; overflow-wrap: anywhere; }
.recipient-live:empty { display: none; }
/* Same arrangement as the directory: the map above, then the shared shop
   cards in the same responsive grid (six per page). */
.pick-wrap { display: flex; flex-direction: column; gap: var(--fl-space-4); margin-top: .7rem; }
.pick-col { display: flex; flex-direction: column; }
.pick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--fl-space-4); grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); }
.pick-list > li { min-width: 0; display: flex; }
.pick-list > li > .card { flex: 1 1 auto; }
.pick-list .pick-empty { color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-body-medium); padding: var(--fl-space-2) .2rem; }
.pick-pager { margin: .7rem 0 0; }
.pick-pager .pager-status { flex-basis: 8rem; font-size: .85rem; }
.pick-map { order: -1; height: 340px; border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-medium); overflow: hidden; position: relative; z-index: 0; isolation: isolate; background: var(--md-sys-color-surface-container); }
.route-box { grid-column: 1 / -1; border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-medium); padding: .9rem var(--fl-space-4) var(--fl-space-4); background: var(--md-sys-color-surface-container-lowest); }
.route-box h3 { margin: 0 0 .4rem; font-size: var(--md-sys-typescale-title-medium); }
.route-box h3:focus { outline: none; }
.route-box p { margin: .35rem 0; font-size: var(--md-sys-typescale-body-medium); line-height: 1.5; }
.route-box .search-actions { margin-top: .7rem; }
.route-links { list-style: none; margin: .7rem 0 .3rem; padding: 0; display: flex; flex-wrap: wrap; gap: var(--fl-space-2); }
.route-links a { display: inline-flex; align-items: center; min-height: var(--fl-touch-target); padding: 0 var(--fl-space-4); border: 1px solid var(--md-sys-color-outline); border-radius: var(--md-sys-shape-corner-full); font-weight: var(--md-sys-typescale-weight-bold); text-decoration: none; color: var(--md-sys-color-primary); }
.route-links a:hover { background: var(--md-sys-color-secondary-container); }
#recReuse { grid-column: 1 / -1; display: grid; gap: inherit; min-width: 0; }
#recReuse.hidden { display: none !important; }
#recReuse .diy-intro { text-align: left; margin: 0 0 .7rem; max-width: none; }
#recEmpty { margin: .2rem 0 .6rem; }

/* =====================================================================
   INFORMATION PAGES, ABOUT, FOOTER
   ===================================================================== */
section.block, .docpage { max-width: var(--fl-content-max); margin: 2.4rem auto 0; padding: 0 var(--fl-space-5); }
.docpage { margin-top: var(--fl-space-8); }
.info-card { background: var(--md-sys-color-surface-container-lowest); border-radius: var(--md-sys-shape-corner-large); box-shadow: var(--md-sys-elevation-level1); padding: 1.8rem; }
.info-card h2 { margin-top: 0; }
.docpage .back, #about .back { display: inline-flex; align-items: center; min-height: var(--fl-touch-target); margin-bottom: var(--fl-space-2); font-weight: var(--md-sys-typescale-weight-bold); text-decoration: none; }
.docpage h2 { margin-top: 0; }
#about h2:focus, #about h3:focus { outline: none; }
.doc-body h3 { margin: var(--fl-space-6) 0 .45rem; font-size: var(--md-sys-typescale-title-medium); color: var(--fl-color-primary-strong); }
.doc-body h4 { margin: var(--fl-space-4) 0 .25rem; font-size: var(--md-sys-typescale-body-large); }
.doc-body h3 + .table-wrap, .doc-body h3 + p { margin-top: .3rem; }
.doc-body p, .doc-body li { max-width: 78ch; }
.doc-body li { margin: var(--fl-space-1) 0; }
.doc-body code { background: var(--md-sys-color-secondary-container); padding: .05rem .3rem; border-radius: var(--md-sys-shape-corner-extra-small); font-size: .9em; }
.doc-md { font-size: .84rem; color: var(--md-sys-color-on-surface-variant); margin-top: 1.6rem; border-top: 1px solid var(--md-sys-color-outline-variant); padding-top: .8rem; }
.table-wrap { overflow-x: auto; margin: .6rem 0; }
.lic-table { border-collapse: collapse; width: 100%; font-size: var(--md-sys-typescale-body-medium); }
.lic-table:has(thead) { min-width: 520px; }
.lic-table th, .lic-table td { text-align: left; vertical-align: top; border-top: 1px solid var(--md-sys-color-outline-variant); padding: .55rem .6rem; }
.lic-table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--md-sys-color-on-surface-variant); border-top: none; }
.lic-table tbody th { font-weight: var(--md-sys-typescale-weight-bold); width: 32%; }
.tbc { font-style: italic; color: var(--fl-color-on-pending-container); background: var(--fl-color-pending-container); border-radius: var(--md-sys-shape-corner-extra-small); padding: 0 var(--fl-space-1); }
footer.site .tbc { background: transparent; color: var(--md-sys-color-on-primary); }
.load-error { color: var(--md-sys-color-error); }
body.doc-mode main, body.doc-mode .back-to-search, body.doc-mode .hero { display: none; }

.about-lead { font-size: var(--md-sys-typescale-body-large); max-width: 75ch; }
.about-sub { margin: 1.9rem 0 .35rem; font-size: var(--md-sys-typescale-title-large); color: var(--md-sys-color-on-surface); }
.steps { display: grid; gap: var(--fl-space-4); grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: .8rem; }
ul.steps { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.step { background: var(--md-sys-color-secondary-container); border-radius: var(--md-sys-shape-corner-medium); padding: .9rem var(--fl-space-4); }
.step .n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); font-weight: var(--md-sys-typescale-weight-heavy); font-size: .85rem; }
.step p { margin: 0; font-size: var(--md-sys-typescale-body-medium); color: var(--md-sys-color-on-surface-variant); }
.step .more { margin: .55rem 0 0; font-size: .88rem; }
.mode-card .n svg { display: block; }
.steps.transp .n { font-size: .72rem; letter-spacing: -.02em; }
/* About cards: marker and title share one row; "Open" sits at its end. */
.info-card .step { display: grid; grid-template-columns: auto 1fr auto; align-items: center; align-content: start; column-gap: .6rem; row-gap: .35rem; }
.info-card .step > strong { margin: 0; line-height: 1.3; }
.info-card .step > p, .info-card .step > .more { grid-column: 1 / -1; margin: 0; }
.info-card .step > .more { margin-top: .15rem; }
.info-card .step .mode-open { padding: 0 var(--fl-space-4); font-size: var(--md-sys-typescale-body-small); justify-self: end; }
.contact-wrap { max-width: 44rem; }
.contact-wrap > p { margin: 0 0 var(--fl-space-2); color: var(--md-sys-color-on-surface-variant); }
.contact-routes { margin: 0 0 var(--fl-space-4) 1.1rem; padding: 0; font-size: var(--md-sys-typescale-body-medium); color: var(--md-sys-color-on-surface-variant); }
.contact-routes li { margin: .15rem 0; }
.contact-routes .linklike { font-size: inherit; }
.contact-form .mfield { display: flex; flex-direction: column; gap: var(--fl-space-1); margin-bottom: .9rem; }
.contact-form .hint { margin: 0 0 .8rem; }
#contactPrepared { background: var(--md-sys-color-secondary-container); border: 1px solid var(--fl-color-primary-outline); border-radius: var(--md-sys-shape-corner-medium); padding: var(--fl-space-4); font-size: var(--md-sys-typescale-body-medium); }
.behind { margin-top: 1.6rem; padding-top: .9rem; border-top: 1px solid var(--md-sys-color-outline-variant); font-size: .88rem; color: var(--md-sys-color-on-surface-variant); }
.behind h4 { margin: 0 0 var(--fl-space-1); font-size: var(--md-sys-typescale-body-medium); color: var(--md-sys-color-on-surface); }
.behind p { margin: .2rem 0; }
.behind .hint { display: block; margin-top: .15rem; }

.back-to-search { max-width: var(--fl-content-max); margin: 2.4rem auto 0; padding: 0 var(--fl-space-5); text-align: center; }
.back-to-search a {
  display: inline-flex; align-items: center; gap: var(--fl-space-2); min-height: var(--fl-touch-target); text-decoration: none;
  background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); font-weight: var(--md-sys-typescale-weight-bold); font-size: var(--md-sys-typescale-label-large);
  padding: 0 1.4rem; border-radius: var(--md-sys-shape-corner-full); box-shadow: var(--md-sys-elevation-level1);
}
.back-to-search a:hover { background: var(--fl-color-primary-strong); }

footer.site { background: var(--fl-color-header-end); color: var(--fl-color-on-primary-soft); text-align: center; padding: var(--fl-space-8) var(--fl-space-5) 2.4rem; margin-top: 2.6rem; font-size: var(--md-sys-typescale-body-medium); }
footer.site a { color: var(--md-sys-color-on-primary); }
footer.site .lang-switch { margin-bottom: var(--fl-space-4); }
.footer-id { margin: 0 0 .3rem; }
.footer-id strong { color: var(--md-sys-color-on-primary); font-size: var(--md-sys-typescale-title-medium); }
.footer-nav ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 1.2rem; padding: 0; margin: var(--fl-space-3) auto; max-width: 900px; }
.footer-nav a { color: var(--md-sys-color-on-primary); font-weight: var(--md-sys-typescale-weight-medium); display: inline-flex; align-items: center; min-height: var(--fl-touch-target); }
.footer-small { color: var(--fl-color-on-primary-faint); font-size: var(--md-sys-typescale-body-small); max-width: 82ch; margin: .55rem auto; }

/* =====================================================================
   RESPONSIVE (360 px floor, tablets, desktop)
   ===================================================================== */
@media (max-width: 760px) {
  .pick-map { height: 280px; }
}
@media (max-width: 640px) {
  /* Mode selector stays one segmented control with three equal parts. */
  .tabs-wrap { display: block; }
  .tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .2rem; width: 100%; border-radius: var(--md-sys-shape-corner-extra-large); padding: var(--fl-space-1); }
  .tab-btn { padding: .4rem .35rem; font-size: var(--md-sys-typescale-label-medium); line-height: 1.2; border-radius: 22px; min-height: 3rem; display: flex; align-items: center; justify-content: center; text-align: center; overflow-wrap: break-word; }
}
@media (max-width: 600px) {
  .nav { justify-content: center; }
  .panel { padding: var(--fl-space-4); }
  .info-card { padding: var(--fl-space-5) var(--fl-space-4); }
  .diy-grid, .fs-grid { grid-template-columns: minmax(0, 1fr); }
  .modal { padding: var(--fl-space-5) var(--fl-space-4); border-radius: var(--md-sys-shape-corner-large); }
  .modal .row2 { grid-template-columns: minmax(0, 1fr); }
  #repairMap { height: 320px; }
  .search-actions { flex-wrap: wrap; }
  .search-actions .btn { white-space: normal; flex: 1 1 auto; }
  /* v20 (sixth round): compact cards; the two actions share one row. */
  .cards { gap: var(--fl-space-3); }
  .card { padding: .75rem .9rem; gap: .4rem; }
  .card h3 { font-size: 1rem; line-height: 1.3; }
  .card .loc { font-size: var(--md-sys-typescale-body-small); }
  .tagrow { gap: .25rem; }
  .tag { font-size: .7rem; padding: .14rem .42rem; }
  .svcrow { gap: .2rem var(--fl-space-2); }
  .card .actions { flex-wrap: nowrap; padding-top: .2rem; }
  .card .actions a, .card .actions button, .card .actions .pick-choose { flex: 1 1 0; min-width: 0; text-align: center; justify-content: center; padding: 0 var(--fl-space-3); line-height: 1.2; }
  .card .actions .noemail { flex: 1 1 0; }
  .lic-table { font-size: .86rem; }
}
@media (max-width: 480px) {
  .detail-list li { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  .pager-status { order: -1; flex-basis: 100%; }
  .pager-btn { flex: 1 1 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .modal { animation: none; }
}

/* =====================================================================
   v20 — compact small-screen layout, live results line, map touch mode,
   dark-palette support for third-party map controls.
   Breakpoints are content-based (when the wide bar no longer fits), not a
   device size. All colours come from the token blocks.
   ===================================================================== */

/* ---- Header: compact bar parts (hidden on wide screens) ---- */
.nav-compact { display: none; align-items: center; gap: var(--fl-space-2); }
.lang-select {
  min-height: var(--fl-touch-target); padding: 0 var(--fl-space-3); font: inherit; font-weight: var(--md-sys-typescale-weight-bold);
  font-size: var(--md-sys-typescale-label-large); color: var(--fl-color-on-header); background: transparent;
  border: 1.5px solid var(--fl-color-on-primary-faint); border-radius: var(--md-sys-shape-corner-small); cursor: pointer; max-width: 9.5rem;
}
.lang-select option { color: var(--md-sys-color-on-surface); background: var(--md-sys-color-surface-container-lowest); }
.menu-btn {
  display: inline-flex; align-items: center; gap: .4rem; min-height: var(--fl-touch-target); padding: 0 var(--fl-space-3);
  font: inherit; font-weight: var(--md-sys-typescale-weight-bold); font-size: var(--md-sys-typescale-label-large);
  color: var(--fl-color-on-header); background: transparent; border: 1.5px solid var(--fl-color-on-primary-faint);
  border-radius: var(--md-sys-shape-corner-small); cursor: pointer;
}
.menu-btn[aria-expanded="true"] { background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-primary); border-color: var(--md-sys-color-surface-container-lowest); }
.footer-shops { margin: var(--fl-space-2) auto 0; line-height: 1.35; text-wrap: balance; }
.footer-shops .linklike { padding: 0; text-align: center; }
button.linklike.on-primary { color: var(--fl-color-on-header); font-size: inherit; min-height: var(--fl-touch-target); }

/* Compact bar: narrow screens, and short screens such as phones in landscape. */
@media (max-width: 640px), (max-height: 500px) {
  .nav { flex-wrap: nowrap; justify-content: space-between; padding: var(--fl-space-2) var(--fl-space-4); gap: var(--fl-space-2); }
  .brand { min-width: 0; flex: 0 1 auto; overflow: hidden; }
  .brand .logo { flex: 0 0 auto; }
  .brand-text { min-width: 0; overflow: hidden; }
  .brand-name { font-size: 1.2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-compact { display: flex; flex: 0 0 auto; }
  .lang-select { max-width: none; padding: 0 var(--fl-space-2) 0 var(--fl-space-3); }
  /* The wide-screen links become the Menu panel: same elements, stacked. */
  .nav { position: relative; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch; gap: var(--fl-space-2);
    position: absolute; top: 100%; left: var(--fl-space-3); right: var(--fl-space-3); z-index: 1200;
    background: var(--fl-color-header-end); border: 1px solid var(--fl-color-on-primary-faint);
    border-radius: var(--md-sys-shape-corner-medium); padding: var(--fl-space-3); box-shadow: var(--md-sys-elevation-level2);
  }
  .nav-links.open a.navlink, .nav-links.open .cta, .nav-links.open .install-btn {
    display: flex; align-items: center; padding: 0 var(--fl-space-4); border: 1.5px solid var(--fl-color-on-primary-faint);
    border-radius: var(--md-sys-shape-corner-small); color: var(--fl-color-on-header); font-size: var(--md-sys-typescale-label-large);
  }
  .nav-links .lang-switch { display: none; }   /* replaced by the selector in the bar */
  .hero { padding: .1rem var(--fl-space-4) 2.1rem; }
  .hero h1 { margin: .2rem 0 .3rem; font-size: clamp(1.3rem, 5.8vw, 1.55rem); line-height: 1.25; }
  .hero-line { font-size: var(--md-sys-typescale-body-medium); line-height: 1.35; }
  .facts { gap: .1rem .8rem; font-size: var(--md-sys-typescale-body-small); }
  .facts .fact { white-space: nowrap; }
}
/* Very narrow header or large text: first the Menu button keeps only its
   icon (its name stays for screen readers), then the wordmark gives way to
   the logo. Container queries in rem follow the header width and text size. */
.nav { container-type: inline-size; }
@container (max-width: 17.5rem) {
  .menu-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
}
@container (max-width: 14.5rem) { .brand-name { display: none; } }
/* Logo square and active language stay white on the header in both palettes. */
.brand .logo { background: var(--fl-color-on-header); color: var(--fl-color-logo-mark); }
header.site .lang-switch .lang-btn.active, footer.site .lang-switch .lang-btn.active { background: var(--fl-color-on-header); color: var(--fl-color-logo-mark); border-color: var(--fl-color-on-header); }

/* ---- Search form ----
   Wide screens: all five fields in the grid; the "More filters" group is
   transparent to the grid and its toggle is hidden.
   Small screens: one full-width column. Device and Location first; Brand,
   Service and Shop name behind "More filters" (count of active ones shown). */
.more-toggle-field { display: none; }
.more-filters { display: contents; }
.more-toggle {
  display: flex; align-items: center; gap: var(--fl-space-2); width: 100%; min-height: var(--fl-touch-target);
  padding: 0 var(--fl-space-3) 0 var(--fl-space-4); font: inherit; font-weight: var(--md-sys-typescale-weight-bold);
  font-size: var(--md-sys-typescale-label-large); color: var(--md-sys-color-primary); text-align: left;
  background: transparent; border: 1.5px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-corner-small); cursor: pointer;
}
.more-toggle:hover { background: var(--md-sys-color-surface-container); }
.more-count:not(:empty) {
  padding: .1rem .55rem; border-radius: var(--md-sys-shape-corner-full); font-size: var(--md-sys-typescale-body-small);
  background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary);
}
.more-chevron { margin-left: auto; flex: 0 0 auto; transition: transform .18s ease-out; }
.more-toggle[aria-expanded="true"] .more-chevron { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .more-chevron { transition: none; } }
@media (max-width: 600px) {
  .panel h2 { margin-bottom: var(--fl-space-3); }
  #repairForm.search-grid { grid-template-columns: minmax(0, 1fr); gap: var(--fl-space-3); }
  #repairForm .more-toggle-field { display: flex; }
  #repairForm .more-filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--fl-space-3); }
  #repairForm .more-filters[hidden] { display: none; }
  #repairForm .search-actions .btn { flex: 1 1 0; }
  /* Hints stay available to screen readers (aria-describedby) and appear
     visually while the field is in use. */
  #repairForm .loc-hint { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  #repairForm .field:focus-within .loc-hint { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
  #repairForm .combo input.combo-input, #repairForm input { text-overflow: ellipsis; }
  #repairMapWrap { margin-top: var(--fl-space-4); }
}
/* "Not listed?" helper: only shown while a device or brand filter is active. */
.notlisted.is-empty { display: none; }

/* ---- Map: legend, touch mode ---- */
.touch-only { display: none; }
.touch-ui .touch-only { display: inline; }
.touch-block { display: none; }
.touch-ui .touch-block { display: block; }
.map-move-ctl.leaflet-control { margin: var(--fl-space-2); }
.map-move-btn {
  display: inline-flex; align-items: center; gap: .35rem; min-height: var(--fl-touch-target); padding: 0 var(--fl-space-4);
  font: inherit; font-weight: var(--md-sys-typescale-weight-bold); font-size: var(--md-sys-typescale-label-large);
  background: var(--fl-color-map-control); color: var(--md-sys-color-primary); border: 1.5px solid var(--md-sys-color-primary);
  border-radius: var(--md-sys-shape-corner-full); box-shadow: var(--md-sys-elevation-level1); cursor: pointer;
}
.map-move-btn.is-on { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.map-active { outline: 3px solid var(--md-sys-color-primary); outline-offset: -3px; }
@media (max-width: 600px) {
  #repairMap { height: min(320px, 46vh); }
  .map-bar { font-size: .8rem; }
}

/* ---- Live results line under the map ---- */
.results-bar {
  display: flex; align-items: flex-start; gap: var(--fl-space-3); margin: var(--fl-space-3) 0 var(--fl-space-4);
  padding: var(--fl-space-3) var(--fl-space-4); border-radius: var(--md-sys-shape-corner-medium);
  background: var(--md-sys-color-secondary-container);
}
.results-arrow { font-weight: var(--md-sys-typescale-weight-heavy); color: var(--md-sys-color-primary); font-size: 1.15rem; line-height: 1.4; }
.results-text { min-width: 0; }
.results-bar .result-meta { margin: 0; color: var(--md-sys-color-on-surface); font-size: var(--md-sys-typescale-body-large); font-weight: var(--md-sys-typescale-weight-bold); }
.results-live { margin: .1rem 0 0; font-size: var(--md-sys-typescale-body-small); color: var(--md-sys-color-on-surface-variant); }
.results-bar .linklike { font-size: inherit; }
@keyframes fl-results-flash { from { background: var(--fl-color-live-flash); } to { background: var(--md-sys-color-secondary-container); } }
.results-bar.flash { animation: fl-results-flash 1.4s ease-out; }
@media (prefers-reduced-motion: reduce) { .results-bar.flash { animation: none; } }

/* ---- Footer: compact, every link kept ---- */
@media (max-width: 600px) {
  .back-to-search { margin-top: var(--fl-space-6); }
  footer.site { padding: var(--fl-space-5) var(--fl-space-4) var(--fl-space-5); margin-top: var(--fl-space-6); }
  .footer-nav ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--fl-space-3); margin: var(--fl-space-2) 0; text-align: left; }
  .footer-nav a { line-height: 1.25; }
  .footer-small { text-align: left; margin: var(--fl-space-2) 0; }
  footer.site .lang-switch { margin-bottom: 0; }
}

/* ---- Leaflet controls and popups follow the palette (tiles stay light) ---- */
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--md-sys-color-surface-container-lowest); color: var(--md-sys-color-on-surface); }
.leaflet-bar a, .leaflet-bar a:hover { background-color: var(--fl-color-map-control); color: var(--fl-color-on-map-control); border-bottom-color: var(--md-sys-color-outline-variant); }
.leaflet-bar a.leaflet-disabled { background-color: var(--md-sys-color-surface-container); color: var(--fl-color-disabled); }
.leaflet-container .leaflet-control-attribution { background: var(--fl-color-map-attribution); color: var(--fl-color-on-map-control); }
.leaflet-container .leaflet-control-attribution a { color: var(--md-sys-color-primary); }
/* v20: Leaflet's standard compact attribution size, so it keeps to one line on phones. */
.leaflet-container .leaflet-control-attribution { font-size: .75rem; line-height: 1.4; }
.leaflet-container a.leaflet-popup-close-button { color: var(--md-sys-color-on-surface-variant); }

/* v20 "Give it away": curated organisations, grouped by what happens to the
   device. Native <details> keeps the list short on phones and works with
   keyboard and screen readers without script. */
.gift-box { margin-bottom: var(--fl-space-4); }
.gift-meta:empty { display: none; }
.gift-group { border-top: 1px solid var(--md-sys-color-outline-variant); }
.gift-group:last-of-type { border-bottom: 1px solid var(--md-sys-color-outline-variant); }
.gift-group > summary { display: flex; align-items: center; gap: var(--fl-space-2); min-height: var(--fl-touch-target); cursor: pointer; font-weight: var(--md-sys-typescale-weight-bold); color: var(--md-sys-color-primary); }
.gift-group > summary::-webkit-details-marker { display: none; }
.gift-group > summary { list-style: none; }
.gift-group > summary::before { content: "▸"; display: inline-block; width: 1em; transition: transform .15s ease; }
.gift-group[open] > summary::before { transform: rotate(90deg); }
.gift-count { font-weight: var(--md-sys-typescale-weight-regular, 400); color: var(--md-sys-color-on-surface-variant); font-size: var(--md-sys-typescale-body-small); }
.gift-count::before { content: "("; } .gift-count::after { content: ")"; }
.gift-list { list-style: none; margin: 0 0 var(--fl-space-3); padding: 0; display: grid; gap: var(--fl-space-3); }
@media (min-width: 52rem) { .gift-list { grid-template-columns: 1fr 1fr; } }
.gift-item { padding: .6rem .8rem; border: 1px solid var(--md-sys-color-outline-variant); border-radius: var(--md-sys-shape-corner-small); background: var(--md-sys-color-surface); }
.gift-item p { margin: .2rem 0; }
.gift-name { line-height: 1.35; }
.gift-place { display: inline-block; font-size: var(--md-sys-typescale-body-small); color: var(--md-sys-color-on-surface-variant); }
.gift-item a { display: inline-flex; align-items: center; min-height: var(--fl-touch-target); font-weight: var(--md-sys-typescale-weight-bold); }
.gift-before { margin-top: var(--fl-space-3); }
@media (prefers-reduced-motion: reduce) { .gift-group > summary::before { transition: none; } }
.gift-item p:last-child { margin-bottom: 0; }
.gift-item a { min-height: 2.25rem; }
