    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --white: #F8F9FA;
      --red: #dc2626;
      --red-light: #fee2e2;
      --green: #388e3c;
      --green-light: #e8f5e9;
    }

    html { scroll-behavior: smooth; }

    body {
      font-family: 'DM Sans', sans-serif;
      background: var(--white);
      color: var(--charcoal);
      line-height: 1.6;
    }

    /* ── NAV ── */
    nav {
      position: sticky;
      top: 0;
      z-index: 100;
      background: #fff;
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 48px;
      height: 64px;
    }

    .nav-logo {
      font-family: 'DM Serif Display', serif;
      font-size: 1.15rem;
      color: var(--teal);
      text-decoration: none;
      letter-spacing: -0.01em;
      white-space: nowrap;
      flex-shrink: 0;
    }

    .nav-view-toggle {
      display: flex;
      align-items: center;
      gap: 4px;
      background: var(--teal-light);
      border-radius: 8px;
      padding: 3px;
      flex-shrink: 0;
    }

    .nav-view-btn {
      display: flex;
      align-items: center;
      gap: 5px;
      padding: 5px 11px;
      border-radius: 6px;
      border: none;
      font-family: 'DM Sans', sans-serif;
      font-size: 0.775rem;
      font-weight: 600;
      cursor: pointer;
      color: var(--gray);
      background: transparent;
      text-decoration: none;
      white-space: nowrap;
      transition: all 0.15s;
    }

    .nav-view-btn.active {
      background: #fff;
      color: var(--teal);
      box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    }

    .nav-links {
      display: flex;
      gap: 4px;
      list-style: none;
      align-items: center;
    }

    .nav-links a {
      text-decoration: none;
      color: var(--gray);
      font-size: 0.875rem;
      font-weight: 500;
      padding: 6px 14px;
      border-radius: 6px;
      transition: background 0.15s, color 0.15s;
      white-space: nowrap;
    }

    .nav-links a:hover { background: var(--teal-light); color: var(--teal); }
    .nav-links a.active { background: var(--teal-light); color: var(--teal); }

    .nav-cta {
      background: var(--red) !important;
      color: #fff !important;
      border-radius: 8px !important;
      padding: 8px 18px !important;
    }
    .nav-cta:hover { opacity: 0.9; }

    /* nav-right removed - using grid layout */

    .nav-view-toggle {
      display: flex;
      align-items: center;
      gap: 4px;
      background: var(--teal-light);
      border-radius: 8px;
      padding: 3px;
    }

    .nav-view-btn {
      display: flex;
      align-items: center;
      gap: 5px;
      padding: 5px 11px;
      border-radius: 6px;
      border: none;
      font-family: 'DM Sans', sans-serif;
      font-size: 0.775rem;
      font-weight: 600;
      cursor: pointer;
      color: var(--gray);
      background: transparent;
      text-decoration: none;
      white-space: nowrap;
      transition: all 0.15s;
    }

    .nav-view-btn.active {
      background: #fff;
      color: var(--teal);
      box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    }

    /* ── PAGE HEADER ── */
    .page-header {
      background: linear-gradient(135deg, #f0fafa 0%, #fdf8f0 100%);
      border-bottom: 1px solid var(--border);
      padding: 56px 48px 48px;
      max-width: 1200px;
      margin: 0 auto;
    }

    .page-header-inner {
      max-width: 640px;
    }

    .page-tag {
      display: inline-block;
      background: var(--teal-light);
      color: var(--teal);
      font-size: 0.7rem;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      padding: 4px 12px;
      border-radius: 100px;
      margin-bottom: 16px;
    }

    .page-header h1 {
      font-family: 'DM Serif Display', serif;
      font-size: 2.5rem;
      line-height: 1.15;
      color: var(--charcoal);
      letter-spacing: -0.02em;
      margin-bottom: 12px;
    }

    .page-header p {
      font-size: 1rem;
      color: var(--gray);
      line-height: 1.7;
    }

    /* ── SEARCH PANEL ── */
    .search-wrapper {
      background: #fff;
      border-bottom: 1px solid var(--gray-light);
      padding: 32px 48px;
      position: sticky;
      top: 64px;
      z-index: 90;
      box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    }

    .search-inner {
      max-width: 1200px;
      margin: 0 auto;
      display: flex;
      gap: 16px;
      align-items: flex-end;
      flex-wrap: wrap;
    }

    .search-field {
      display: flex;
      flex-direction: column;
      gap: 6px;
      flex: 1;
      min-width: 200px;
      position: relative;
    }

    .search-field label {
      font-size: 0.75rem;
      font-weight: 600;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--gray);
    }

    .search-input-wrap {
      position: relative;
    }

    .search-input-wrap svg {
      position: absolute;
      left: 14px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--gray);
      pointer-events: none;
    }

    .search-field input {
      width: 100%;
      padding: 11px 14px 11px 42px;
      border: 1.5px solid var(--gray-light);
      border-radius: 8px;
      font-family: 'DM Sans', sans-serif;
      font-size: 0.9rem;
      color: var(--charcoal);
      background: #fff;
      transition: border-color 0.15s;
      outline: none;
    }

    .search-field input:focus { border-color: var(--teal); }
    .search-field input::placeholder { color: #9ca3af; }

    .dropdown {
      position: absolute;
      top: calc(100% + 4px);
      left: 0;
      right: 0;
      background: #fff;
      border: 1.5px solid var(--border);
      border-radius: 10px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.1);
      z-index: 200;
      max-height: 280px;
      overflow-y: auto;
      display: none;
    }

    .dropdown.open { display: block; }

    .dropdown-item {
      padding: 10px 16px;
      font-size: 0.875rem;
      cursor: pointer;
      color: var(--charcoal);
      transition: background 0.1s;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .dropdown-item:hover, .dropdown-item.highlighted {
      background: var(--teal-light);
      color: var(--teal);
    }

    .dropdown-item .dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--teal);
      flex-shrink: 0;
    }

    .dropdown-empty {
      padding: 16px;
      font-size: 0.875rem;
      color: var(--gray);
      text-align: center;
    }

    .btn-search {
      background: var(--teal);
      color: #fff;
      padding: 11px 28px;
      border-radius: 8px;
      border: none;
      font-family: 'DM Sans', sans-serif;
      font-size: 0.9rem;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.15s, transform 0.1s;
      white-space: nowrap;
      height: 44px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .btn-search:hover { background: var(--teal-dark); transform: translateY(-1px); }

    .btn-clear {
      background: transparent;
      color: var(--gray);
      padding: 11px 18px;
      border-radius: 8px;
      border: 1.5px solid var(--gray-light);
      font-family: 'DM Sans', sans-serif;
      font-size: 0.875rem;
      font-weight: 500;
      cursor: pointer;
      transition: border-color 0.15s, color 0.15s;
      height: 44px;
    }

    .btn-clear:hover { border-color: var(--teal); color: var(--teal); }

    .btn-near-me {
      background: transparent;
      color: var(--teal);
      padding: 11px 18px;
      border-radius: 8px;
      border: 1.5px solid var(--teal);
      font-family: 'DM Sans', sans-serif;
      font-size: 0.875rem;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.15s, color 0.15s, border-color 0.15s;
      height: 44px;
      display: flex;
      align-items: center;
      gap: 7px;
      white-space: nowrap;
      flex-shrink: 0;
    }

    .btn-near-me:hover { background: var(--teal-light); }

    .btn-near-me.loading {
      color: var(--gray);
      border-color: var(--gray-light);
      cursor: not-allowed;
      pointer-events: none;
    }

    .btn-near-me.active {
      background: var(--green-light);
      color: var(--green);
      border-color: #86efac;
    }

    .btn-near-me .spinner {
      width: 14px;
      height: 14px;
      border: 2px solid var(--gray-light);
      border-top-color: var(--gray);
      border-radius: 50%;
      animation: spin 0.7s linear infinite;
      flex-shrink: 0;
    }

    @keyframes spin { to { transform: rotate(360deg); } }

    .gps-error-msg {
      width: 100%;
      background: var(--red-light);
      border: 1px solid #fca5a5;
      border-radius: 8px;
      padding: 10px 14px;
      font-size: 0.825rem;
      color: var(--red);
      display: none;
      margin-top: 8px;
    }

    .gps-error-msg.show { display: block; }
    .results-wrapper {
      max-width: 1200px;
      margin: 0 auto;
      padding: 40px 48px 80px;
    }

    .results-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 24px;
      flex-wrap: wrap;
      gap: 12px;
    }

    .results-count {
      font-size: 0.875rem;
      color: var(--gray);
    }

    .results-count strong {
      color: var(--charcoal);
      font-weight: 600;
    }

    .active-filters {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .filter-tag {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      background: var(--teal-light);
      color: var(--teal);
      font-size: 0.75rem;
      font-weight: 600;
      padding: 4px 10px;
      border-radius: 100px;
    }

    /* ── RESULTS SECTION HEADERS ── */
    .results-section-header {
      margin-bottom: 16px;
      margin-top: 4px;
    }

    .results-section-title {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      font-size: 0.8rem;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      padding: 6px 14px;
      border-radius: 100px;
    }

    .results-section-title.green { background: var(--green-light); color: var(--green); }
    .results-section-title.teal { background: var(--teal-light); color: var(--teal); }
    .results-section-title.gray { background: var(--gray-light); color: var(--gray); }

    .results-section-divider {
      border: none;
      border-top: 1px solid var(--gray-light);
      margin: 28px 0;
    }

    .no-local-msg {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      background: var(--amber-light);
      border: 1.5px solid #fcd34d;
      border-radius: 10px;
      padding: 14px 18px;
      font-size: 0.875rem;
      color: #92400e;
      margin-bottom: 20px;
      line-height: 1.6;
    }

    .no-local-msg svg { flex-shrink: 0; margin-top: 2px; color: #92400e; }

    /* ── CLINIC CARDS ── */
    .clinic-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 20px;
      margin-bottom: 4px;
    }

    .clinic-card {
      background: #fff;
      border: 1px solid var(--gray-light);
      border-radius: 14px;
      padding: 24px;
      text-decoration: none;
      color: inherit;
      transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
      display: flex;
      flex-direction: column;
      gap: 0;
      cursor: pointer;
    }

    .clinic-card:hover {
      border-color: var(--teal);
      box-shadow: 0 6px 24px rgba(42,127,127,0.1);
      transform: translateY(-2px);
    }

    .clinic-card-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 12px;
    }

    .clinic-name {
      font-size: 1rem;
      font-weight: 600;
      color: var(--charcoal);
      line-height: 1.3;
    }

    .clinic-specialty-badge {
      display: inline-block;
      background: var(--teal-light);
      color: var(--teal);
      font-size: 0.7rem;
      font-weight: 600;
      padding: 3px 10px;
      border-radius: 100px;
      white-space: nowrap;
      flex-shrink: 0;
    }

    .clinic-meta {
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin-bottom: 16px;
    }

    .clinic-meta-row {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 0.825rem;
      color: var(--gray);
    }

    .clinic-meta-row svg { flex-shrink: 0; }

    .clinic-tags {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      margin-bottom: 16px;
    }

    .clinic-tag {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 0.7rem;
      font-weight: 500;
      padding: 3px 8px;
      border-radius: 6px;
    }

    .tag-english { background: var(--green-light); color: var(--green); }
    .tag-insurance { background: var(--amber-light); color: #b45309; }
    .tag-note { background: #f3e8ff; color: #7c3aed; }
    .tag-open { background: var(--green-light); color: var(--green); font-weight: 600; }
    .tag-closed { background: var(--red-light); color: var(--red); font-weight: 600; }

    .clinic-card-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding-top: 14px;
      border-top: 1px solid var(--gray-light);
      margin-top: auto;
    }

    .verified-badge {
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 0.72rem;
      color: var(--gray);
    }

    .clinic-link-btn {
      font-size: 0.8rem;
      font-weight: 600;
      color: var(--teal);
      display: flex;
      align-items: center;
      gap: 4px;
    }

    /* ── EMPTY STATE ── */
    .empty-state {
      text-align: center;
      padding: 80px 24px;
      display: none;
    }

    .empty-state.show { display: block; }

    .empty-icon {
      width: 64px;
      height: 64px;
      background: var(--teal-light);
      border-radius: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 20px;
    }

    .empty-state h3 {
      font-family: 'DM Serif Display', serif;
      font-size: 1.4rem;
      color: var(--charcoal);
      margin-bottom: 8px;
    }

    .empty-state p {
      font-size: 0.9rem;
      color: var(--gray);
      max-width: 360px;
      margin: 0 auto;
    }

    /* ── DEFAULT STATE (no search yet) ── */
    .default-state {
      text-align: center;
      padding: 80px 24px;
    }

    .default-icon {
      width: 72px;
      height: 72px;
      background: var(--teal-light);
      border-radius: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 24px;
    }

    .default-state h3 {
      font-family: 'DM Serif Display', serif;
      font-size: 1.6rem;
      color: var(--charcoal);
      margin-bottom: 10px;
    }

    .default-state p {
      font-size: 0.95rem;
      color: var(--gray);
      max-width: 400px;
      margin: 0 auto 32px;
    }

    .specialty-pills {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: center;
      max-width: 600px;
      margin: 0 auto;
    }

    .specialty-pill-btn {
      padding: 7px 16px;
      border-radius: 100px;
      border: 1.5px solid var(--border);
      background: #fff;
      font-family: 'DM Sans', sans-serif;
      font-size: 0.825rem;
      font-weight: 500;
      color: var(--gray);
      cursor: pointer;
      transition: border-color 0.15s, color 0.15s, background 0.15s;
    }

    .specialty-pill-btn:hover {
      border-color: var(--teal);
      color: var(--teal);
      background: var(--teal-light);
    }

    /* ── SUBMIT CORRECTION ── */
    .correction-bar {
      background: var(--amber-light);
      border-top: 1px solid #f0d080;
      padding: 16px 48px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
    }

    .correction-bar-inner {
      max-width: 1200px;
      margin: 0 auto;
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
    }

    .correction-text {
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 0.875rem;
      color: #92400e;
    }

    .btn-correction {
      background: var(--amber);
      color: #fff;
      padding: 8px 20px;
      border-radius: 8px;
      border: none;
      font-family: 'DM Sans', sans-serif;
      font-size: 0.825rem;
      font-weight: 600;
      cursor: pointer;
      transition: opacity 0.15s;
      white-space: nowrap;
    }

    .btn-correction:hover { opacity: 0.9; }

    /* ── CLINIC DETAIL POPUP ── */
    .clinic-popup-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.5);
      z-index: 600;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 88px 24px 24px;
      backdrop-filter: blur(2px);
    }

    .clinic-popup-overlay.open { display: flex; }

    .clinic-popup {
      background: #fff;
      border-radius: 20px;
      width: 100%;
      max-width: 680px;
      max-height: 88vh;
      overflow: hidden;
      box-shadow: 0 24px 80px rgba(0,0,0,0.2);
      animation: popupIn 0.2s ease;
      position: relative;
      display: flex;
      flex-direction: column;
    }

    /* sticky header so name is always visible while scrolling */
    .clinic-popup-header {
      padding: 28px 28px 20px;
      border-bottom: 1px solid var(--gray-light);
      position: sticky;
      top: 0;
      background: #fff;
      z-index: 10;
      border-radius: 20px 20px 0 0;
    }

    /* map embed */
    .popup-map {
      width: 100%;
      height: 200px;
      border: none;
      border-radius: 10px;
      display: block;
    }

    .popup-map-section {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    /* Mapbox interactive map */
    #popup-mapbox-container {
      width: 100%;
      height: 200px;
      border-radius: 10px;
      overflow: hidden;
      border: 1px solid var(--gray-light);
    }

    /* Custom Mapbox marker */
    .mapbox-clinic-marker {
      width: 36px;
      height: 36px;
      background: var(--teal);
      border: 3px solid #fff;
      border-radius: 50% 50% 50% 0;
      transform: rotate(-45deg);
      box-shadow: 0 2px 8px rgba(42,127,127,0.4);
      cursor: pointer;
    }

    .mapbox-clinic-marker::after {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%) rotate(45deg);
      width: 10px;
      height: 10px;
      background: #fff;
      border-radius: 50%;
    }

    /* Override Mapbox attribution to keep it subtle */
    .mapboxgl-ctrl-attrib {
      font-size: 10px !important;
    }

    /* hours table */
    .popup-hours-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.8rem;
    }

    .popup-hours-table tr { border-bottom: 1px solid var(--gray-light); }
    .popup-hours-table tr:last-child { border-bottom: none; }
    .popup-hours-table td { padding: 6px 0; }
    .popup-hours-table td:first-child { color: var(--gray); font-weight: 500; width: 90px; }
    .popup-hours-table td:last-child { color: var(--charcoal); }
    .popup-hours-closed { color: #dc2626 !important; }
    .popup-hours-english { color: var(--teal); font-weight: 600; }
    .popup-hours-note {
      font-size: 0.75rem;
      color: var(--gray);
      font-style: italic;
      margin-top: 6px;
      line-height: 1.5;
    }

    .clinic-popup-close {
      position: absolute;
      top: 20px;
      right: 20px;
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: var(--gray-light);
      border: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.15s;
      flex-shrink: 0;
    }

    .clinic-popup-close:hover { background: #d1d5db; }

    /* ── BOOKMARK BUTTON (popup header) ── */
    .btn-bookmark {
      position: absolute;
      top: 20px;
      right: 60px;
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: var(--gray-light);
      border: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.15s;
      flex-shrink: 0;
    }

    .btn-bookmark:hover { background: var(--teal-light); }

    .btn-bookmark svg {
      transition: stroke 0.2s, fill 0.2s;
    }

    .btn-bookmark.saved {
      background: var(--teal-light);
    }

    .btn-bookmark.saved svg {
      stroke: var(--teal);
      fill: var(--teal);
    }

    @keyframes bookmark-pop {
      0%   { transform: scale(1); }
      40%  { transform: scale(1.45); }
      70%  { transform: scale(0.9); }
      100% { transform: scale(1); }
    }

    .btn-bookmark.pop {
      animation: bookmark-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    /* ── SAVED CLINICS BUTTON (search bar) ── */
    .btn-saved {
      background: transparent;
      color: var(--teal);
      padding: 11px 18px;
      border-radius: 8px;
      border: 1.5px solid var(--teal);
      font-family: 'DM Sans', sans-serif;
      font-size: 0.875rem;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.15s;
      height: 44px;
      display: flex;
      align-items: center;
      gap: 7px;
      white-space: nowrap;
      flex-shrink: 0;
      position: relative;
    }

    .btn-saved:hover { background: var(--teal-light); }

    .saved-badge {
      position: absolute;
      top: -6px;
      right: -6px;
      background: var(--teal);
      color: #fff;
      font-size: 0.65rem;
      font-weight: 700;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      line-height: 1;
    }

    /* ── SAVED CLINICS OVERLAY ── */
    .saved-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.45);
      z-index: 300;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }

    .saved-overlay.open { display: flex; }

    .saved-modal {
      background: #fff;
      border-radius: 20px;
      width: 100%;
      max-width: 640px;
      max-height: 80vh;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      box-shadow: 0 20px 60px rgba(0,0,0,0.18);
    }

    .saved-modal-header {
      padding: 24px 28px 18px;
      border-bottom: 1px solid var(--gray-light);
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-shrink: 0;
    }

    .saved-modal-title {
      font-family: 'DM Serif Display', serif;
      font-size: 1.3rem;
      color: var(--charcoal);
      letter-spacing: -0.02em;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .saved-modal-close {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: var(--gray-light);
      border: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.15s;
      flex-shrink: 0;
    }

    .saved-modal-close:hover { background: #d1d5db; }

    .saved-modal-body {
      overflow-y: auto;
      flex: 1;
      padding: 20px 28px 28px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .saved-empty {
      text-align: center;
      padding: 40px 20px;
      color: var(--gray);
      font-size: 0.875rem;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
    }

    .saved-empty svg { color: var(--gray-light); }

    .saved-clinic-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 16px;
      border: 1.5px solid var(--gray-light);
      border-radius: 12px;
      gap: 12px;
      cursor: pointer;
      transition: border-color 0.15s, background 0.15s;
    }

    .saved-clinic-row:hover { border-color: var(--teal); background: var(--teal-light); }

    .saved-clinic-info { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }

    .saved-clinic-name {
      font-size: 0.9rem;
      font-weight: 600;
      color: var(--charcoal);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .saved-clinic-meta {
      font-size: 0.775rem;
      color: var(--gray);
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }

    .saved-open-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    .saved-open-dot.open   { background: var(--green); }
    .saved-open-dot.closed { background: var(--red); }

    .btn-unsave {
      background: none;
      border: none;
      cursor: pointer;
      color: var(--gray);
      padding: 4px;
      border-radius: 6px;
      display: flex;
      align-items: center;
      transition: color 0.15s;
      flex-shrink: 0;
    }

    .btn-unsave:hover { color: var(--red); }
      font-family: 'DM Serif Display', serif;
      font-size: 1.5rem;
      color: var(--charcoal);
      letter-spacing: -0.02em;
      margin-bottom: 8px;
      padding-right: 40px;
    }

    .clinic-popup-badges {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .clinic-popup-body {
      padding: 24px 28px;
      display: flex;
      flex-direction: column;
      gap: 20px;
      overflow-y: auto;
      flex: 1;
    }

    .popup-section {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .popup-section-label {
      font-size: 0.68rem;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--gray);
      margin-bottom: 2px;
    }

    .popup-info-row {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      font-size: 0.875rem;
      color: var(--charcoal);
      line-height: 1.5;
    }

    .popup-info-row svg { flex-shrink: 0; margin-top: 2px; color: var(--gray); }

    .popup-info-row a {
      color: var(--teal);
      text-decoration: none;
      font-weight: 500;
    }

    .popup-info-row a:hover { text-decoration: underline; }

    .popup-placeholder {
      font-size: 0.825rem;
      color: #9ca3af;
      font-style: italic;
    }

    .popup-divider {
      border: none;
      border-top: 1px solid var(--gray-light);
    }

    .popup-english-box {
      background: var(--green-light);
      border: 1px solid #86efac;
      border-radius: 10px;
      padding: 12px 16px;
      display: flex;
      align-items: flex-start;
      gap: 10px;
      font-size: 0.85rem;
      color: #166534;
      line-height: 1.6;
    }

    .popup-english-box svg { flex-shrink: 0; margin-top: 2px; }

    .popup-note-box {
      background: #f3e8ff;
      border: 1px solid #d8b4fe;
      border-radius: 10px;
      padding: 12px 16px;
      font-size: 0.825rem;
      color: #6b21a8;
      line-height: 1.6;
    }

    .popup-footer {
      padding: 16px 28px;
      border-top: 1px solid var(--gray-light);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
      background: var(--white);
      border-radius: 0 0 20px 20px;
    }

    .popup-verified {
      font-size: 0.75rem;
      color: var(--gray);
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .btn-popup-website {
      background: var(--teal);
      color: #fff;
      padding: 10px 20px;
      border-radius: 8px;
      text-decoration: none;
      font-size: 0.875rem;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 7px;
      transition: background 0.15s;
    }

    .btn-popup-website:hover { background: var(--teal-dark); }

    .btn-popup-correction {
      background: transparent;
      color: var(--gray);
      padding: 10px 16px;
      border-radius: 8px;
      border: 1.5px solid var(--gray-light);
      font-family: 'DM Sans', sans-serif;
      font-size: 0.825rem;
      cursor: pointer;
      transition: border-color 0.15s, color 0.15s;
    }

    .btn-popup-correction:hover { border-color: var(--teal); color: var(--teal); }

    /* ── COMMUNITY SECTION ── */
    .community-section {
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

    /* Reactions */
    .reaction-row {
      display: flex;
      gap: 10px;
      align-items: center;
    }

    .reaction-btn {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 5px;
      background: #fff;
      border: 1.5px solid var(--gray-light);
      border-radius: 10px;
      padding: 10px 18px;
      cursor: pointer;
      font-family: 'DM Sans', sans-serif;
      transition: border-color 0.15s, background 0.15s, transform 0.1s;
      flex: 1;
    }

    .reaction-btn:hover { border-color: var(--teal); background: var(--teal-light); transform: translateY(-1px); }

    .reaction-btn.selected-helpful  { border-color: var(--green); background: var(--green-light); }
    .reaction-btn.selected-neutral  { border-color: var(--amber); background: var(--amber-light); }
    .reaction-btn.selected-unhelpful { border-color: var(--red);  background: var(--red-light); }

    .reaction-btn svg { display: block; }

    .reaction-count {
      font-size: 0.8rem;
      font-weight: 700;
      color: var(--charcoal);
      line-height: 1;
    }

    .reaction-label {
      font-size: 0.68rem;
      color: var(--gray);
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }

    /* Comments */
    .comments-list {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .comment-item {
      background: var(--white);
      border: 1px solid var(--gray-light);
      border-radius: 10px;
      padding: 12px 14px;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .comment-meta {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .comment-avatar {
      width: 26px;
      height: 26px;
      border-radius: 50%;
      background: var(--teal-light);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .comment-author {
      font-size: 0.775rem;
      font-weight: 600;
      color: var(--charcoal);
    }

    .comment-date {
      font-size: 0.7rem;
      color: var(--gray);
      margin-left: auto;
    }

    .comment-body {
      font-size: 0.825rem;
      color: var(--charcoal);
      line-height: 1.6;
      padding-left: 34px;
    }

    .comments-empty {
      font-size: 0.825rem;
      color: var(--gray);
      font-style: italic;
      text-align: center;
      padding: 16px 0 4px;
    }

    .comments-loading {
      font-size: 0.825rem;
      color: var(--gray);
      text-align: center;
      padding: 12px 0;
    }

    /* Comment input */
    .comment-input-wrap {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .comment-textarea {
      width: 100%;
      padding: 10px 12px;
      border: 1.5px solid var(--gray-light);
      border-radius: 8px;
      font-family: 'DM Sans', sans-serif;
      font-size: 0.85rem;
      color: var(--charcoal);
      resize: none;
      outline: none;
      min-height: 72px;
      transition: border-color 0.15s;
      line-height: 1.5;
    }

    .comment-textarea:focus { border-color: var(--teal); }
    .comment-textarea::placeholder { color: #9ca3af; }

    .comment-submit-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .comment-char-count {
      font-size: 0.7rem;
      color: var(--gray);
    }

    .comment-char-count.over { color: var(--red); }

    .btn-comment-submit {
      background: var(--teal);
      color: #fff;
      padding: 8px 18px;
      border-radius: 7px;
      border: none;
      font-family: 'DM Sans', sans-serif;
      font-size: 0.825rem;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.15s;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .btn-comment-submit:hover { background: var(--teal-dark); }
    .btn-comment-submit:disabled { opacity: 0.5; cursor: not-allowed; }

    .comment-error {
      font-size: 0.775rem;
      color: var(--red);
      display: none;
    }

    .comment-error.show { display: block; }
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.4);
      z-index: 500;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 24px;
    }

    .modal-overlay.open { display: flex; }

    .modal {
      background: #fff;
      border-radius: 16px;
      padding: 36px;
      max-width: 480px;
      width: 100%;
      box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    }

    .modal h3 {
      font-family: 'DM Serif Display', serif;
      font-size: 1.4rem;
      color: var(--charcoal);
      margin-bottom: 6px;
    }

    .modal p {
      font-size: 0.875rem;
      color: var(--gray);
      margin-bottom: 24px;
    }

    .modal-field {
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin-bottom: 16px;
    }

    .modal-field label {
      font-size: 0.75rem;
      font-weight: 600;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--gray);
    }

    .modal-field input,
    .modal-field select,
    .modal-field textarea {
      padding: 10px 14px;
      border: 1.5px solid var(--gray-light);
      border-radius: 8px;
      font-family: 'DM Sans', sans-serif;
      font-size: 0.875rem;
      color: var(--charcoal);
      outline: none;
      transition: border-color 0.15s;
    }

    .modal-field input:focus,
    .modal-field select:focus,
    .modal-field textarea:focus { border-color: var(--teal); }

    .modal-field textarea { resize: vertical; min-height: 90px; }

    .modal-actions {
      display: flex;
      gap: 10px;
      margin-top: 24px;
    }

    .btn-modal-submit {
      flex: 1;
      background: var(--teal);
      color: #fff;
      padding: 11px;
      border-radius: 8px;
      border: none;
      font-family: 'DM Sans', sans-serif;
      font-size: 0.875rem;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.15s;
    }

    .btn-modal-submit:hover { background: var(--teal-dark); }

    .btn-modal-cancel {
      background: transparent;
      color: var(--gray);
      padding: 11px 20px;
      border-radius: 8px;
      border: 1.5px solid var(--gray-light);
      font-family: 'DM Sans', sans-serif;
      font-size: 0.875rem;
      cursor: pointer;
    }

    /* ── FOOTER ── */
    footer {
      background: var(--charcoal);
      color: rgba(255,255,255,0.6);
      padding: 32px 48px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 0.8rem;
      flex-wrap: wrap;
      gap: 16px;
    }

    footer a { color: rgba(255,255,255,0.6); text-decoration: none; }
    footer a:hover { color: #fff; }

    .footer-logo {
      font-family: 'DM Serif Display', serif;
      font-size: 1rem;
      color: #fff;
    }

    /* ── RESPONSIVE ── */
    
    /* ── MOBILE NAV ── */
    .hamburger {
      display: none;
      flex-direction: column;
      gap: 5px;
      cursor: pointer;
      padding: 6px;
      border: none;
      background: transparent;
      z-index: 200;
    }

    .hamburger span {
      display: block;
      width: 22px;
      height: 2px;
      background: var(--charcoal);
      border-radius: 2px;
      transition: all 0.25s ease;
    }

    .hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .hamburger.open span:nth-child(2) { opacity: 0; }
    .hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .mobile-sidebar {
      position: fixed;
      top: 0;
      right: -280px;
      width: 260px;
      height: 100vh;
      background: #fff;
      box-shadow: -4px 0 24px rgba(0,0,0,0.12);
      z-index: 999;
      transition: right 0.28s ease;
      display: flex;
      flex-direction: column;
      padding: 0;
    }

    .mobile-sidebar.open { right: 0; }

    .mobile-sidebar-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 20px 20px 16px;
      border-bottom: 1px solid var(--gray-light);
    }

    .mobile-sidebar-logo {
      font-family: 'DM Serif Display', serif;
      font-size: 1rem;
      color: var(--teal);
      text-decoration: none;
    }

    .mobile-sidebar-close {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: var(--gray-light);
      border: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.15s;
    }

    .mobile-sidebar-close:hover { background: #d1d5db; }

    .mobile-sidebar-links {
      display: flex;
      flex-direction: column;
      padding: 12px 12px;
      flex: 1;
      overflow-y: auto;
      gap: 2px;
    }

    .mobile-sidebar-links a {
      text-decoration: none;
      color: var(--charcoal);
      font-size: 0.95rem;
      font-weight: 500;
      padding: 12px 14px;
      border-radius: 8px;
      transition: background 0.15s, color 0.15s;
    }

    .mobile-sidebar-links a:hover { background: var(--teal-light); color: var(--teal); }
    .mobile-sidebar-links a.active { background: var(--teal-light); color: var(--teal); font-weight: 600; }

    .mobile-sidebar-links .sidebar-cta {
      background: var(--red) !important;
      color: #fff !important;
      margin-top: 8px;
      text-align: center;
    }

    .mobile-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.4);
      z-index: 998;
      display: none;
      backdrop-filter: blur(1px);
    }

    .mobile-overlay.open { display: block; }

    @media (max-width: 900px) {
      .nav-links { display: none; }
      .nav-view-toggle { display: none; }
      .hamburger { display: flex; }
    }

    @media (max-width: 900px) {
      nav { padding: 0 24px; }
      .nav-links { display: none; }
      .page-header { padding: 40px 24px 32px; }
      .search-wrapper { padding: 20px 24px; }
      .results-wrapper { padding: 24px 24px 60px; }
      .clinic-grid { grid-template-columns: 1fr; }
      .correction-bar { padding: 16px 24px; }
      footer { padding: 24px; flex-direction: column; text-align: center; }
    }

    /* ── MOBILE POPUP ── */
    @media (max-width: 600px) {
      /* Centered card overlay */
      .clinic-popup-overlay {
        padding: 20px 16px;
        align-items: center;
        justify-content: center;
      }

      /* Centered card: 92% wide, capped at 420px and 80vh, all rounded corners */
      .clinic-popup {
        width: 92%;
        max-width: 420px;
        max-height: 80vh;
        height: auto;
        border-radius: 20px;
        animation: popupIn 0.2s ease;
      }

      /* Header: tighter padding */
      .clinic-popup-header {
        padding: 16px 16px 14px;
        position: sticky;
        top: 0;
        z-index: 10;
        background: #fff;
        border-radius: 20px 20px 0 0;
      }

      /* No drag pill for centered card */
      .clinic-popup-header::before {
        display: none;
      }

      .clinic-popup-close {
        top: 16px;
        right: 16px;
      }

      .btn-bookmark {
        top: 16px;
        right: 52px;
      }

      /* Body: scrollable within the 80vh cap */
      .clinic-popup-body {
        padding: 16px 16px 24px;
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        flex: 1;
        min-height: 0;
      }

      /* Shrink map on mobile — saves a lot of space */
      #popup-mapbox-container {
        height: 150px;
      }

      /* Footer stays pinned at bottom */
      .popup-footer {
        position: sticky;
        bottom: 0;
        background: #fff;
        border-top: 1px solid var(--gray-light);
        padding: 12px 16px;
      }

      /* Search bar wraps on small screens */
      .search-inner {
        flex-wrap: wrap;
        gap: 8px;
      }

      .btn-near-me,
      .btn-saved {
        flex: 1;
        justify-content: center;
      }
    }
  
  /* =====================================================
     CLINIC FINDER — MOBILE BOTTOM LAYOUT FIXES
     ===================================================== */
  @media (max-width: 900px) {

    /* Specialty pills default state — remove excess bottom padding on mobile */
    .default-state {
      padding: 24px 16px !important;
    }

    /* Specialty pills — tighter spacing */
    .specialty-pills {
      gap: 6px !important;
    }

    /* Kill white gap below footer — body background matches footer */
    body {
      background: var(--charcoal) !important;
      padding-bottom: 0 !important;
      margin-bottom: 0 !important;
    }
    /* Keep the actual page content white */
    nav, .search-panel, .results-wrapper,
    #defaultState, #resultsSection, .correction-bar {
      background: var(--white, #fff);
    }

    /* Prevent the page from being scrollable past the footer */
    html, body {
      min-height: 100%;
      overflow-x: hidden;
    }
    .results-wrapper {
      padding: 20px 16px 40px !important;
    }

    /* Clinic grid: single column on mobile */
    .clinic-grid {
      grid-template-columns: 1fr !important;
      gap: 12px !important;
    }

    /* Correction bar: true full viewport width, escaping any parent max-width */
    .correction-bar {
      width: 100vw !important;
      margin-left: calc(-50vw + 50%) !important;
      padding: 20px 20px !important;
      box-sizing: border-box !important;
    }
    .correction-bar-inner {
      flex-direction: column !important;
      align-items: flex-start !important;
      gap: 10px !important;
      max-width: 100% !important;
    }
    .btn-correction {
      width: 100% !important;
      text-align: center !important;
      box-sizing: border-box !important;
    }

    /* Footer: true full viewport width */
    footer {
      width: 100vw !important;
      margin-left: calc(-50vw + 50%) !important;
      padding: 24px 20px !important;
      box-sizing: border-box !important;
      flex-direction: column !important;
      align-items: flex-start !important;
      gap: 12px !important;
    }

    /* Search panel on mobile */
    .search-section {
      padding: 20px 16px !important;
    }

  }

  /* =====================================================
     MOBILE-ONLY FIXES  (max-width: 900px)
     Zero effect on desktop — all rules inside media query
     ===================================================== */
  @media (max-width: 900px) {

    /* 1. Emergency Info button in mobile nav hamburger sidebar */
    .mobile-sidebar-links .sidebar-cta {
      display: block !important;
      background: var(--red, #dc2626) !important;
      color: #fff !important;
      border-radius: 8px !important;
      padding: 12px 16px !important;
      margin-top: 12px !important;
      text-align: center !important;
      font-weight: 600 !important;
    }

    /* 2. Footer — handled above in clinic-finder mobile layout fixes */

    /* 3. Submit-a-correction bar — handled above in clinic-finder mobile layout fixes */

    /* 4. Submit-a-correction MODAL — constrained, scrollable, not full-screen */
    .modal-overlay {
      padding: 16px !important;
      align-items: flex-end !important;
    }
    .modal {
      width: 100% !important;
      max-width: 100% !important;
      max-height: 88vh !important;
      overflow-y: auto !important;
      -webkit-overflow-scrolling: touch !important;
      border-radius: 20px 20px 0 0 !important;
      padding: 24px 20px !important;
    }

  }
