
  .sg-cookie {
    position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(8px);
    width: min(640px, calc(100vw - 32px));
    background: var(--paper); border: 1px solid var(--line-strong);
    border-radius: 18px; box-shadow: 0 24px 60px -20px rgba(28, 24, 16, 0.45);
    padding: 22px 24px; z-index: 9000;
    font-family: var(--sans);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
  }
  .sg-cookie.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }
  .sg-cookie h3 { font-family: var(--display); font-weight: 400; font-size: 19px; color: var(--ink); margin: 0 0 6px; letter-spacing: -0.01em; }
  .sg-cookie p { font-size: 13.5px; line-height: 1.6; color: var(--muted); margin: 0; }
  .sg-cookie p a { color: var(--cedar); text-decoration: underline; text-underline-offset: 2px; }
  .sg-cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; align-items: center; }
  .sg-cookie-btn {
    font-family: var(--sans); font-size: 13px; font-weight: 600; cursor: pointer;
    padding: 11px 20px; border-radius: 999px; border: 1px solid var(--line-strong);
    background: transparent; color: var(--ink); transition: all 0.2s ease;
  }
  .sg-cookie-btn:hover { border-color: var(--ink); }
  .sg-cookie-btn.primary { background: var(--ink); color: var(--cream); border-color: var(--ink); }
  .sg-cookie-btn.primary:hover { background: var(--cedar-deep); border-color: var(--cedar-deep); }
  .sg-cookie-btn.link { border: none; padding: 11px 6px; color: var(--cedar); text-decoration: underline; text-underline-offset: 2px; margin-left: auto; }
  .sg-cookie-btn.link:hover { color: var(--cedar-deep); }
  /* preferences panel */
  .sg-cookie-prefs { display: none; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
  .sg-cookie.show-prefs .sg-cookie-prefs { display: block; }
  .sg-cookie.show-prefs .sg-cookie-btn.link { display: none; }
  .sg-pref-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .sg-pref-row:last-child { border-bottom: none; }
  .sg-pref-text b { display: block; font-size: 13.5px; color: var(--ink); font-weight: 600; margin-bottom: 3px; }
  .sg-pref-text small { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
  .sg-pref-locked { font-size: 12px; font-weight: 600; color: var(--sage); white-space: nowrap; padding-top: 2px; }
  /* toggle */
  .sg-toggle { position: relative; width: 42px; height: 24px; flex-shrink: 0; margin-top: 1px; }
  .sg-toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
  .sg-toggle span { position: absolute; inset: 0; background: var(--cream-2); border: 1px solid var(--line-strong); border-radius: 999px; transition: background 0.2s ease; }
  .sg-toggle span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); box-shadow: 0 1px 3px rgba(28,24,16,0.3); transition: transform 0.2s ease; }
  .sg-toggle input:checked + span { background: var(--sage); border-color: var(--sage); }
  .sg-toggle input:checked + span::after { transform: translateX(18px); }
  .sg-toggle input:focus-visible + span { outline: 2px solid var(--cedar); outline-offset: 2px; }
  @media (max-width: 520px) {
    .sg-cookie { bottom: 12px; padding: 20px; }
    .sg-cookie-actions { gap: 8px; }
    .sg-cookie-btn { flex: 1 1 auto; text-align: center; }
    .sg-cookie-btn.link { flex-basis: 100%; margin-left: 0; text-align: center; }
  }
  @media (prefers-reduced-motion: reduce) {
    .sg-cookie { transition: opacity 0.2s ease, visibility 0.2s; transform: translateX(-50%); }
    .sg-cookie.is-open { transform: translateX(-50%); }
  }

  /* cookie notice: big "Got it" that fills the row, "What we store" as a matching outline button */
  .sg-cookie .sg-cookie-actions { display: flex; flex-wrap: nowrap; gap: 10px; align-items: stretch; margin-top: 18px; }
  .sg-cookie #sgCookieAccept { flex: 1 1 auto; padding: 15px 24px; font-size: 15px; font-weight: 700; letter-spacing: .01em; }
  .sg-cookie #sgCookieManage { flex: 0 0 auto; margin-left: 0; padding: 15px 22px; font-size: 14px; border: 1.5px solid rgba(28,24,16,.42) !important; border-radius: 999px !important; background: transparent; text-decoration: none; color: var(--ink); -webkit-appearance: none; appearance: none; }
  .sg-cookie #sgCookieManage:hover { border-color: var(--ink); color: var(--ink); }
  .sg-cookie.show-prefs #sgCookieManage { display: none; }
  @media (max-width: 1024px) {
    .sg-cookie .sg-cookie-actions { flex-wrap: wrap; }
    .sg-cookie #sgCookieAccept, .sg-cookie #sgCookieManage { flex: 1 1 100%; text-align: center; }
  }

  /* featured cards: 2 per row on phones — stacked (photo on top) so they fit */
  @media (max-width: 640px) {
    #homeListings.hc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
    #homeListings .card.hc { flex-direction: column !important; align-items: stretch; gap: 10px; padding: 8px 8px 12px !important; border-radius: 18px !important; }
    #homeListings .card.hc .card-img.hc-av { flex: 0 0 auto !important; width: 100% !important; height: auto !important; aspect-ratio: 1 / 0.82 !important; border-radius: 14px !important; }
    #homeListings .card.hc .hc-av .card-img-link, #homeListings .card.hc .hc-av img { border-radius: 11px !important; }
    #homeListings .card.hc .hc-dot { right: 8px; bottom: 8px; }
    #homeListings .card.hc .hc-tx { padding: 0 4px; }
    #homeListings .card.hc .hc-meta { font-size: 10.5px; }
    #homeListings .card.hc .hc-meta .hc-sep, #homeListings .card.hc .hc-meta .hc-loc { display: block; }
    #homeListings .card.hc .hc-meta .hc-sep { display: none; }
    #homeListings .card.hc .hc-name { font-size: 15.5px; line-height: 1.2; margin: 4px 0 4px; align-items: flex-start; }
    #homeListings .card.hc .hc-name .card-title-link { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    #homeListings .card.hc .hc-desc { font-size: 12px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    #homeListings .card.hc .hc-arr { display: none; }
  }

  /* cities marquee — smooth, seamless loop on phones & tablets:
     spacing lives on each tile (not flex gap) so the -50% jump lands exactly,
     the move is GPU-composited, and the edge fade is a cheap overlay instead of a mask */
  .cities-marquee { -webkit-mask-image: none !important; mask-image: none !important; }
  .cities-marquee .cities-grid {
    gap: 0 !important; padding-right: 0 !important;
    will-change: transform; backface-visibility: hidden; transform: translate3d(0,0,0);
    animation-name: sg-city-drift !important;
  }
  .cities-marquee .cities-grid > .city-tile { margin-right: 14px; }
  @keyframes sg-city-drift { from { transform: translate3d(0,0,0); } to { transform: translate3d(-50%,0,0); } }
  .cities-marquee.is-offscreen .cities-grid { animation-play-state: paused; }
  /* only pause on real hover (mouse) or keyboard focus — a tap on a phone no longer freezes it */
  .cities-marquee:hover .cities-grid, .cities-marquee:focus-within .cities-grid { animation-play-state: running; }
  @media (hover: hover) and (pointer: fine) { .cities-marquee:hover .cities-grid { animation-play-state: paused; } }
  .cities-marquee:has(:focus-visible) .cities-grid { animation-play-state: paused; }
  /* phones & tablets: the drifting row wins over the swipe-row rules */
  @media (max-width: 1024px) {
    #cities .cities-marquee { overflow: hidden; }
    #cities .cities-marquee .cities-grid { overflow: visible !important; scroll-snap-type: none !important; touch-action: pan-y; }
  }
  @media (max-width: 820px) {
    .cities-marquee .cities-grid > .city-tile { margin-right: 12px; }
    .city-tile:hover { transform: none; box-shadow: none; }
  }
  /* verified badge sits right after the last word of the business name (names wrap onto 2 lines) */
  @media all {
    #homeListings .card.hc .hc-name { display: block !important; }
    #homeListings .card.hc .hc-name .card-title-link { display: inline !important; white-space: normal !important; overflow: visible !important; -webkit-line-clamp: unset; }
    #homeListings .card.hc .hc-name .verify-badge { display: inline-flex !important; vertical-align: -2px; margin-left: 5px; white-space: nowrap; }
  }
  /* business names in bold; category above in small capitals */
  #homeListings .card.hc .hc-name, #homeListings .card.hc .hc-name .card-title-link { font-weight: 600 !important; }
  @media (min-width: 1200px) { #homeListings .card.hc .hc-name { font-size: 16px !important; letter-spacing: -.015em; } }
  #homeListings .card.hc .hc-meta .cc-cat { text-transform: uppercase; letter-spacing: .08em; font-size: 10.5px; }
  /* the main category gets a fine 1px rounded outline */
  #homeListings .cc-cat, .card-catloc .cc-cat { background: #F1E3CC; color: var(--cedar-deep, #6B4326); display: inline-block; padding: 3px 9px; border: 1px solid var(--cedar, #8A5A37); border-radius: 999px; line-height: 1.3; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
  html.sg-dark #homeListings .cc-cat { border-color: #E9C98F; background: rgba(233,201,143,.16); color: #F1DFBC; }
  /* category label on practitioner & space cards: smaller, cream text on cedar */
  #homeListings .card.hc .hc-meta .cc-cat, #homeListings .cc-cat, .card-catloc .cc-cat { background: var(--cedar, #8A5A37); color: #F2EBDD; border: 1px solid #D6A45D; box-shadow: 0 0 0 2px rgba(214,164,93,.18); padding: 2px 8px 1px; font-size: 9px; font-weight: 800; letter-spacing: .1em; line-height: 1.35; }
  html.sg-dark #homeListings .cc-cat { background: #E9C98F; color: #1C1810; border-color: #F1DFBC; }
  @media (max-width: 640px) { #homeListings .card.hc .hc-meta .cc-cat, #homeListings .cc-cat { font-size: 8.5px !important; padding: 3px 7px 2px !important; letter-spacing: .08em !important; } }
  /* names: at most 2 lines on every screen (the badge stays glued to the last word) */
  #homeListings .card.hc .hc-name { display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  #homeListings .card.hc .hc-glue { white-space: nowrap; }
  #homeListings .card.hc .hc-glue .verify-badge { display: inline-flex; vertical-align: -2px; margin-left: 5px; color: var(--sage, #4A5D4F); }

  /* event date boxes: one line on tablets and phones */
  @media (max-width: 1024px) {
    .event-filters { flex-wrap: nowrap; gap: 8px; }
    .ev-filter { flex: 1 1 0; min-width: 0; padding: 11px 12px 12px; border-radius: 13px; }
    .ev-filter-label { font-size: 9px; letter-spacing: .12em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .ev-filter-range { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  }
  @media (max-width: 640px) {
    .event-filters { overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; margin-left: -16px; margin-right: -16px; padding: 2px 16px 6px; }
    .event-filters::-webkit-scrollbar { display: none; }
    .ev-filter { flex: 0 0 auto; min-width: 116px; scroll-snap-align: start; padding: 10px 12px 11px; }
    .ev-filter-range { font-size: 14px; }
  }

  /* instant results with photos */
  .combo-person .cp-ph { position: relative; flex: none; width: 40px; height: 40px; border-radius: 10px; overflow: hidden; background: var(--cream-2); display: grid; place-items: center; }
  .combo-person .cp-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .combo-person .cp-ini { font-style: normal; font-family: var(--display); font-size: 19px; color: var(--cedar-deep); }
  .combo-person .cp-ini.on-cover { position: absolute; left: 6px; bottom: 2px; color: #FBF7EE; font-size: 17px; }
  .combo-option.combo-all { font-weight: 600; color: var(--cedar-deep, #6B4326); border-top: 1px solid var(--line); border-radius: 0 0 9px 9px; margin-top: 4px; }
  .search-combo[data-field="need"] .combo-panel { max-height: 440px; }
