
  .cmp-tog { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; padding: 7px 12px 7px 9px; border-radius: 999px; border: 1px solid var(--line-strong, rgba(28,24,16,.2)); background: transparent; font: 600 12.5px/1 var(--sans); color: var(--ink-soft); cursor: pointer; }
  .card-foot .cmp-tog { margin: 0 0 0 auto; }
  .cmp-tog .cmp-box { width: 15px; height: 15px; border-radius: 4px; border: 1.5px solid currentColor; display: grid; place-items: center; }
  .cmp-tog.on { background: var(--ink, #1c1810); border-color: var(--ink, #1c1810); color: #FBF7EE; }
  .cmp-tog.on .cmp-box::after { content: ""; width: 8px; height: 4px; border: solid currentColor; border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px); }
  .cmp-tog:disabled { opacity: .4; cursor: not-allowed; }
  .cmp-tog:focus-visible { outline: 2px solid var(--cedar, #8A5A37); outline-offset: 2px; }
  .cmp-tray { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 80; width: min(880px, calc(100vw - 24px));
    background: var(--ink, #1c1810); color: #FBF7EE; border-radius: 20px; padding: 10px 10px 10px 16px; box-shadow: 0 18px 44px -16px rgba(20,16,10,.65); }
  .cmp-tray[hidden] { display: none; }
  .cmp-tray-in { display: flex; align-items: center; gap: 12px; }
  .cmp-chips { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
  .cmp-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 240px; padding: 6px 6px 6px 12px; border-radius: 999px; background: rgba(251,247,238,.12); font-size: 13px; font-weight: 600; }
  .cmp-chip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cmp-chip button { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(251,247,238,.16); color: #FBF7EE; cursor: pointer; font-size: 15px; line-height: 1; }
  .cmp-hint { font-size: 12.5px; color: rgba(251,247,238,.65); }
  .cmp-acts { display: flex; gap: 6px; flex: none; }
  .cmp-clear { border: 0; background: none; color: rgba(251,247,238,.75); font: 600 13px var(--sans); cursor: pointer; padding: 10px; }
  .cmp-go { border: 0; border-radius: 999px; padding: 12px 20px; background: #FBF7EE; color: var(--ink, #1c1810); font: 700 14px var(--sans); cursor: pointer; }
  .cmp-go:disabled { opacity: .45; cursor: default; }
  body.cmp-on .rm-open { bottom: calc(max(18px, env(safe-area-inset-bottom)) + 84px) !important; }
  .cmp-dlg { position: fixed; inset: 0; z-index: 300; background: rgba(20,16,10,.55); display: grid; place-items: center; padding: 20px; }
  .cmp-dlg[hidden] { display: none; }
  body.cmp-lock { overflow: hidden; }
  .cmp-box-in { width: min(1100px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--paper, #FAF6EC); border-radius: 24px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.6); overflow: hidden; }
  .cmp-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 8px; }
  .cmp-head h2 { font-family: var(--display); font-weight: 400; font-size: 30px; letter-spacing: -.01em; }
  .cmp-head h2 em { color: var(--cedar, #8A5A37); }
  .cmp-close { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong, rgba(28,24,16,.2)); background: transparent; font-size: 22px; cursor: pointer; color: var(--ink); }
  .cmp-scroll { overflow: auto; padding: 0 24px 6px; }
  .cmp-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
  .cmp-table th, .cmp-table td { padding: 12px 14px; vertical-align: top; text-align: left; border-bottom: 1px solid var(--line, rgba(28,24,16,.12)); }
  .cmp-table thead th { position: sticky; top: 0; z-index: 1; background: var(--paper, #FAF6EC); font-family: var(--display); font-weight: 400; font-size: 19px; line-height: 1.2; min-width: 200px; }
  .cmp-table thead th a { color: var(--ink); text-decoration: none; }
  .cmp-table thead th a:hover { text-decoration: underline; }
  .cmp-table tbody th { width: 150px; font-size: 12.5px; font-weight: 700; color: var(--muted); position: sticky; left: 0; background: var(--paper, #FAF6EC); }
  .cmp-table td { color: var(--ink); line-height: 1.45; }
  .cmp-table td small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
  .cmp-table ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
  .cmp-courses b { display: block; font-weight: 600; }
  .cmp-na { color: var(--muted); opacity: .7; }
  .cmp-tag { display: inline-block; margin: 0 4px 4px 0; padding: 4px 9px; border-radius: 999px; background: rgba(138,90,55,.1); color: #6B4227; font-size: 12.5px; font-weight: 600; }
  .cmp-en { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
  .cmp-en-open, .cmp-en-rolling { background: rgba(74,93,79,.14); color: #34483B; }
  .cmp-en-waitlist { background: rgba(214,164,93,.22); color: #6B4C1E; }
  .cmp-en-closed { background: rgba(28,24,16,.07); color: var(--ink-soft); }
  .cmp-table tfoot td { border-bottom: 0; }
  .cmp-view { display: inline-block; padding: 10px 16px; border-radius: 999px; background: var(--ink, #1c1810); color: #FBF7EE; text-decoration: none; font-weight: 600; font-size: 13.5px; }
  .cmp-note { margin: 0; padding: 10px 24px 18px; font-size: 12.5px; color: var(--muted); }
  @media (max-width: 640px) {
    .cmp-tray { padding: 10px; border-radius: 18px; }
    .cmp-tray-in { flex-direction: column; align-items: stretch; gap: 8px; }
    .cmp-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .cmp-chips::-webkit-scrollbar { display: none; }
    .cmp-chip { flex: none; max-width: 70vw; font-size: 12.5px; }
    .cmp-hint { flex: none; }
    .cmp-acts { justify-content: space-between; }
    .cmp-go { flex: 1; }
    #listingsGrid .cmp-tog { padding: 5px 8px 5px 6px; font-size: 11px; margin-top: 6px; }
    .cmp-dlg { padding: 0; }
    .cmp-box-in { max-height: 100vh; height: 100%; border-radius: 0; }
    .cmp-head { padding: max(14px, env(safe-area-inset-top)) 16px 6px; }
    .cmp-head h2 { font-size: 24px; }
    .cmp-scroll { padding: 0 0 6px 16px; }
    .cmp-table thead th { min-width: 170px; font-size: 16px; }
    .cmp-table tbody th { width: 96px; min-width: 96px; font-size: 11.5px; }
    .cmp-table th, .cmp-table td { padding: 10px; }
  }

  /* ===== 2nd and 3rd filter rows (specific modality, then training level) ===== */
  .mod-row { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 0 8px; padding: 10px 12px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); }
  .mod-row::-webkit-scrollbar { display: none; }
  .mod-row[hidden] { display: none; }
  .mod-row > * { flex: none; }
  .mr-k { font: 800 10.5px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--cedar); padding: 0 8px 0 4px; white-space: nowrap; }
  .mod-pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: 600 13px var(--sans); cursor: pointer; white-space: nowrap; transition: background .2s, border-color .2s, color .2s; }
  .mod-pill i { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); }
  .mod-pill:hover { border-color: var(--ink); }
  .mod-pill.active { background: var(--ink); border-color: var(--ink); color: var(--cream); }
  .mod-pill.active i { color: #E9C98F; }
  .mod-pill.empty { opacity: .45; }
  .lvl-row { margin-left: 22px; position: relative; background: transparent; border-style: dashed; }
  .lvl-row::before { content: ""; position: absolute; left: -14px; top: -9px; width: 10px; height: 26px; border-left: 1.5px solid var(--line-strong, rgba(28,24,16,.25)); border-bottom: 1.5px solid var(--line-strong, rgba(28,24,16,.25)); border-bottom-left-radius: 8px; }
  .lvl-row .mod-pill.active { background: var(--cedar); border-color: var(--cedar); }
  .search-row + .sub-filter-row { margin-top: 14px !important; }
  /* trust badges on the cards */
  .card-flags .cf { white-space: nowrap; flex: none; }
  .card-flags .cf-rank { background: #1C1810; color: #E9C98F; }
  .card-flags .cf-pop { background: rgba(187,94,60,0.13); color: #8E4227; }
  .card-flags .cf-cert { background: rgba(201,149,62,0.18); color: #6B4C1E; }
  html.sg-dark .card-flags .cf-rank { background: #E9C98F; color: #1C1810; }
  @media (max-width: 640px) {
    #listingsGrid .card-flags { display: flex !important; gap: 4px; margin: 0 0 6px; }
    #listingsGrid .card-flags .cf { font-size: 10px; padding: 4px 6px; gap: 3px; }
    #listingsGrid .card-flags .cf svg { width: 11px; height: 11px; }
    .mod-row { margin-left: -16px; margin-right: -16px; border-radius: 0; border-left: 0; border-right: 0; padding: 9px 16px; }
    .lvl-row { margin-left: -16px; }
    .lvl-row::before { display: none; }
  }

  /* ===== trust badges on the photo's top-left corner: #1 in …, Most popular, Certified, Licensed ===== */
  .card-badges { position: absolute; left: 10px; top: 10px; z-index: 3; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; max-width: calc(100% - 60px); pointer-events: none; }
  .card-badges .cf { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px 5px 8px; border-radius: 999px; font: 700 11.5px/1 var(--sans); white-space: nowrap; background: rgba(251,247,238,.92); color: var(--ink); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 4px 12px -6px rgba(0,0,0,.45); }
  .card-badges .cf svg { width: 13px; height: 13px; flex: none; }
  .card-badges .cf-rank { background: #1C1810; color: #F2EBDD; } .card-badges .cf-rank svg { color: #E9C98F; }
  .card-badges .cf-rank.cf-first { color: #E9C98F; }
  .card-badges .cf-pop { background: #A9512F; color: #FBF7EE; }
  .card-badges .cf-cert { color: #6B4C1E; } .card-badges .cf-cert svg { color: #C9953E; }
  .card-badges .cf-lic { color: #34483B; } .card-badges .cf-lic svg { color: #4A5D4F; }
  /* the category label moves to the bottom-right of the photo so the badges own the top-left */
  .listings .card-img:has(.card-badges) .card-chip { top: auto; bottom: 10px; left: auto; right: 10px; max-width: calc(100% - 20px); }
  @media (max-width: 640px) {
    #listingsGrid .card-badges { left: 5px; top: 5px; gap: 3px; max-width: calc(100% - 36px); }
    #listingsGrid .card-badges .cf { font-size: 9px; padding: 3px 6px 3px 5px; gap: 3px; }
    #listingsGrid .card-badges .cf svg { width: 9px; height: 9px; }
  }

  /* Community & access: same look as the "Bathhouses & saunas" row — boxed, with the small uppercase label */
  .quick-feats { margin: 0 0 14px !important; padding: 10px 12px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); gap: 6px !important; }
  .quick-feats .qf-label { font: 800 10.5px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--cedar); padding: 0 8px 0 4px; white-space: nowrap; }
  .quick-feats .qf-chip { padding: 7px 13px; border: 1px solid var(--line); color: var(--ink); font: 600 13px var(--sans); line-height: 1; }
  .quick-feats .qf-chip:hover { border-color: var(--ink); }
  .quick-feats .qf-chip.on { background: var(--ink); border-color: var(--ink); color: var(--cream); }
  @media (max-width: 640px) {
    .quick-feats { flex-direction: row !important; align-items: center !important; margin-left: -16px !important; margin-right: -16px !important; border-radius: 0; border-left: 0; border-right: 0; padding: 9px 0 9px 16px; overflow: hidden; }
    .quick-feats .qf-row { margin-right: 0; padding-right: 16px; }
  }

  /* Filters button lives inside the search bar, between the location and Discover */
  .search-combined .search-filters { height: auto !important; flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 0 20px; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); font: 600 14px var(--sans); cursor: pointer; }
  .search-combined .search-filters:hover { background: var(--cream-2); }
  .search-combined .search-filters[aria-expanded="true"] { background: var(--cream-2); }
  @media (max-width: 640px) {
    .search-combined { flex-direction: row !important; flex-wrap: wrap; }
    .search-combined .search-input { flex: 1 1 100%; }
    /* phones: search, then Filters, then location, then Discover — each on its own row */
    .search-combined .search-input { order: 1; }
    .search-combined .search-filters { order: 2; flex: 1 1 100%; justify-content: flex-start; border-left: 0; border-top: 1px solid var(--line); padding: 14px 22px; }
    .search-combined .search-loc { order: 3; flex: 1 1 100%; width: 100% !important; min-width: 0; }
    .search-combined .search-discover { order: 4; flex: 1 1 100%; }
  }

  /* card location pin: the same filled pin as the homepage */
  .listings .card-loc svg { color: var(--cedar, #8A5A37); }
  /* a short description under the name on tablets and phones */
  .card-tagline { display: none; }
  /* a 2-line description on every screen size */
  .listings .card-tagline { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 4px 0 8px; font-size: 13.5px; line-height: 1.4; color: var(--ink-soft, #5b5246); min-height: 2.8em; }
  @media (max-width: 1024px) {
    .listings .card-tagline { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 4px 0 8px; font-size: 13px; line-height: 1.4; color: var(--ink-soft, #5b5246); min-height: 2.8em; }
  }
  @media (max-width: 640px) {
    #listingsGrid .card-tagline { -webkit-line-clamp: 2; margin: 3px 0 5px; font-size: 11px; line-height: 1.32; min-height: 2.64em; }
  }

  /* the listing's main category on the photo gets a fine 1px outline */
  .listings .card-chip { border: 1px solid var(--cedar, #8A5A37); }
  html.sg-dark .listings .card-chip { border-color: #E9C98F; }
