:root {
  --directory-green: #0b8065;
  --directory-green-dark: #07664f;
  --directory-ink: #15372d;
  --directory-muted: #6f7f79;
  --directory-line: #d5e8e0;
  --directory-soft: #edf8f3;
}

body:has(.search-page),
body:has(.guest-list) {
  background-color: #fbfefc !important;
  background-image: linear-gradient(45deg, rgba(11, 128, 101, .04) 25%, transparent 25%, transparent 75%, rgba(11, 128, 101, .04) 75%), linear-gradient(-45deg, rgba(11, 128, 101, .04) 25%, transparent 25%, transparent 75%, rgba(11, 128, 101, .04) 75%) !important;
  background-size: 120px 120px !important;
  background-position: 0 0, 60px 60px !important;
  color: var(--directory-ink) !important;
}

body:has(.search-page) .site-header,
body:has(.guest-list) .site-header {
  position: relative;
  z-index: 5;
  max-width: 1340px;
  margin: 0 auto 24px;
  padding: 16px 24px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--directory-line);
  border-radius: 0 0 24px 24px;
  box-shadow: 0 12px 28px rgba(11, 72, 56, .06);
  backdrop-filter: blur(16px);
}

body:has(.search-page) .brand,
body:has(.guest-list) .brand { color: var(--directory-ink); }
body:has(.search-page) .brand-mark,
body:has(.guest-list) .brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--directory-green);
  color: #fff;
}
body:has(.search-page) .top-actions,
body:has(.guest-list) .top-actions { gap: 8px; }
body:has(.search-page) .top-actions .btn,
body:has(.guest-list) .top-actions .btn {
  border: 1px solid var(--directory-line);
  border-radius: 999px;
  color: var(--directory-green);
  background: #fff;
}
body:has(.search-page) .top-actions .btn:last-child,
body:has(.guest-list) .top-actions .btn:last-child {
  background: var(--directory-green);
  color: #fff;
  border-color: var(--directory-green);
}

body:has(.search-page) .container,
body:has(.guest-list) .container {
  max-width: 1280px;
}
body:has(.search-page) .page-heading,
body:has(.guest-list) .page-heading { margin-bottom: 32px; }
body:has(.search-page) .page-heading h1,
body:has(.guest-list) .page-heading h1 {
  color: var(--directory-ink);
  font-size: clamp(38px, 5vw, 68px);
  letter-spacing: -.065em;
  line-height: .98;
}
body:has(.search-page) .page-heading .muted,
body:has(.guest-list) .page-heading .muted { color: var(--directory-muted); font-size: 18px; }
body:has(.search-page) .pill,
body:has(.guest-list) .pill {
  color: var(--directory-green);
  background: var(--directory-soft);
  border: 1px solid var(--directory-line);
  border-radius: 999px;
}

body:has(.search-page) .filter-card {
  padding: 24px;
  background: rgba(255, 255, 255, .95);
  border: 1px solid var(--directory-line);
  border-radius: 28px;
  box-shadow: 0 16px 34px rgba(11, 72, 56, .07);
}
body:has(.search-page) .filter-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}
body:has(.search-page) .filter-card label { color: var(--directory-ink); }
body:has(.search-page) .filter-card input,
body:has(.search-page) .filter-card select {
  min-height: 48px;
  width: 100%;
  padding: 0 14px;
  color: var(--directory-ink);
  background: #fff;
  border: 1px solid var(--directory-line);
  border-radius: 14px;
}
body:has(.search-page) .filter-actions { gap: 12px; margin-top: 22px; }
body:has(.search-page) .filter-actions .btn { border-radius: 999px; }
body:has(.search-page) .filter-actions .btn:not(.light) { background: var(--directory-green); border-color: var(--directory-green); color: #fff; }
body:has(.search-page) .filter-actions .btn.light { color: var(--directory-green); border-color: var(--directory-line); background: #fff; }
body:has(.search-page) .section-title { color: var(--directory-ink); }
body:has(.search-page) .section-title .muted { color: var(--directory-muted); }

body:has(.search-page) .profile-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 24px;
}
body:has(.search-page) .profile {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--directory-line);
  border-radius: 28px;
  box-shadow: 0 12px 28px rgba(11, 72, 56, .07);
}
body:has(.search-page) .profile-media {
  height: 360px !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  border-radius: 28px !important;
}
body:has(.search-page) .profile-media > img,
body:has(.search-page) .profile-media .avatar-reference-image,
body:has(.search-page) .profile-media .avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
body:has(.search-page) .profile-body {
  position: absolute !important;
  left: 16px !important;
  right: 16px !important;
  bottom: 16px !important;
  width: auto !important;
  padding: 14px 16px !important;
  background: rgba(255, 255, 255, .95) !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 18px rgba(11, 72, 56, .1);
}
body:has(.search-page) .profile-body h3,
body:has(.search-page) .profile-body strong { color: var(--directory-ink); }
body:has(.search-page) .profile-goal { color: var(--directory-green); background: var(--directory-soft); border-radius: 999px; }
body:has(.search-page) .online-dot.is-online { background: #17a673; }
body:has(.search-page) .online-dot.is-offline { background: #a9b7b2; }

body:has(.guest-list) .guest-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
body:has(.guest-list) .guest-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 18px;
  color: var(--directory-ink);
  background: rgba(255, 255, 255, .95);
  border: 1px solid var(--directory-line);
  border-radius: 24px;
  box-shadow: 0 10px 24px rgba(11, 72, 56, .06);
}
body:has(.guest-list) .guest-row:hover { transform: translateY(-2px); box-shadow: 0 16px 30px rgba(11, 72, 56, .1); }
body:has(.guest-list) .guest-avatar {
  flex: 0 0 70px;
  width: 70px;
  height: 70px;
  overflow: hidden;
  background: var(--directory-soft);
  border: 1px solid var(--directory-line);
  border-radius: 50%;
}
body:has(.guest-list) .guest-avatar img { width: 100%; height: 100%; object-fit: cover; }
body:has(.guest-list) .guest-info { min-width: 0; }
body:has(.guest-list) .guest-info h3 { margin: 0 0 6px; color: var(--directory-ink); font-size: 20px; }
body:has(.guest-list) .guest-info p { margin: 0; color: var(--directory-muted); }
body:has(.guest-list) .empty-state.card { background: #fff; border: 1px solid var(--directory-line); border-radius: 28px; box-shadow: 0 12px 28px rgba(11, 72, 56, .07); }

body:has(.search-page) .bottom-nav,
body:has(.guest-list) .bottom-nav {
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--directory-line);
  box-shadow: 0 10px 28px rgba(11, 72, 56, .08);
}
body:has(.search-page) .bottom-nav a.active,
body:has(.guest-list) .bottom-nav a.active { color: var(--directory-green); }

@media (max-width: 900px) and (min-width: 761px) {
  body:has(.search-page) .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body:has(.search-page) .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  body:has(.search-page) .site-header,
  body:has(.guest-list) .site-header { margin: 0 12px 18px; padding: 12px 14px; border-radius: 0 0 20px 20px; }
  body:has(.search-page) .container,
  body:has(.guest-list) .container { padding-left: 16px; padding-right: 16px; }
  body:has(.search-page) .page-heading h1,
  body:has(.guest-list) .page-heading h1 { font-size: 38px; }
  body:has(.search-page) .filter-card { padding: 16px; border-radius: 22px; }
  body:has(.search-page) .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  body:has(.search-page) .filter-actions { flex-wrap: wrap; }
  body:has(.search-page) .filter-actions .btn { flex: 1 1 100%; }
  body:has(.search-page) .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px; }
  body:has(.search-page) .profile { border-radius: 20px; }
  body:has(.search-page) .profile-media { height: 220px !important; min-height: 220px !important; border-radius: 20px !important; }
  body:has(.search-page) .profile-body { left: 8px !important; right: 8px !important; bottom: 8px !important; padding: 7px 8px !important; border-radius: 12px !important; }
  body:has(.search-page) .profile-body h3,
  body:has(.search-page) .profile-body strong { font-size: 16px; line-height: 1.05; }
  body:has(.search-page) .profile-goal { font-size: 10px; line-height: 1.15; }
  body:has(.guest-list) .guest-list { grid-template-columns: 1fr; gap: 12px; }
  body:has(.guest-list) .guest-row { padding: 14px; border-radius: 20px; }
}


/* Keep the filter controls full-width inside the redesigned panel. */
body:has(.search-page) .filter-grid {
  width: 100% !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px;
}
body:has(.search-page) .filter-grid label { min-width: 0; }
@media (max-width: 900px) and (min-width: 761px) {
  body:has(.search-page) .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 760px) {
  body:has(.search-page) .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

body:has(.search-page) .filter-card { display: block !important; }


/* Mobile search composition matching the profile screen. */
@media (max-width: 760px) {
  body:has(.search-page) {
    min-width: 0;
    overflow-x: hidden;
  }
  body:has(.search-page) #pwa-banner,
  body:has(.search-page) .pwa-smart-banner { display: none !important; }
  body:has(.search-page) .search-page {
    width: 100%;
    padding: 0 12px 112px !important;
  }
  body:has(.search-page) .page-heading {
    margin: 0 !important;
    padding: 24px 18px 10px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--directory-line);
    border-bottom: 0;
    border-radius: 28px 28px 0 0;
  }
  body:has(.search-page) .page-heading h1 {
    margin: 0 0 12px;
    color: var(--directory-green);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(32px, 9vw, 39px);
    font-weight: 600;
    letter-spacing: -.045em;
    line-height: 1.05;
  }
  body:has(.search-page) .page-heading h1::before {
    content: '♙';
    display: inline-block;
    margin-right: 9px;
    font-family: Arial, sans-serif;
    font-size: .76em;
    vertical-align: .08em;
  }
  body:has(.search-page) .page-heading .muted {
    margin: 0;
    color: #5b8592;
    font-size: 17px;
    line-height: 1.35;
  }
  body:has(.search-page) .filter-card {
    margin: 0 !important;
    padding: 12px 18px 18px !important;
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--directory-line);
    border-top: 0;
    border-radius: 0 0 28px 28px;
    box-shadow: 0 14px 30px rgba(11, 72, 56, .08);
  }
  body:has(.search-page) .filter-grid {
    display: grid !important;
    width: 100% !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
  body:has(.search-page) .filter-grid label {
    position: relative;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    min-height: 84px;
    padding: 11px 30px 10px 46px !important;
    color: #527c86;
    background: rgba(255, 255, 255, .72);
    border: 1px solid #c8e1dc;
    border-radius: 18px;
    font-size: 13px;
    line-height: 1.15;
  }
  body:has(.search-page) .filter-grid label::before {
    position: absolute;
    left: 13px;
    top: 50%;
    width: 25px;
    color: var(--directory-green);
    font-family: Georgia, serif;
    font-size: 24px;
    line-height: 1;
    text-align: center;
    transform: translateY(-53%);
  }
  body:has(.search-page) .filter-grid label:nth-child(1)::before { content: '♙'; }
  body:has(.search-page) .filter-grid label:nth-child(2)::before { content: '⌖'; }
  body:has(.search-page) .filter-grid label:nth-child(3)::before { content: '♡'; }
  body:has(.search-page) .filter-grid label:nth-child(4)::before { content: '⌂'; }
  body:has(.search-page) .filter-grid label:nth-child(5)::before,
  body:has(.search-page) .filter-grid label:nth-child(6)::before { content: '▣'; }
  body:has(.search-page) .filter-grid label:nth-child(7)::before { content: '♙'; }
  body:has(.search-page) .filter-grid label:nth-child(8)::before { content: '☾'; }
  body:has(.search-page) .filter-grid label::after {
    content: '⌄';
    position: absolute;
    right: 12px;
    top: 50%;
    color: var(--directory-green);
    font-size: 18px;
    transform: translateY(-42%);
  }
  body:has(.search-page) .filter-grid input,
  body:has(.search-page) .filter-grid select {
    width: 100% !important;
    min-width: 0;
    min-height: 24px !important;
    margin: 4px 0 0;
    padding: 0 !important;
    color: #1d5060 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    font-size: 16px;
    line-height: 1.2;
    appearance: none;
  }
  body:has(.search-page) .filter-grid input::placeholder { color: #1d5060; opacity: .92; }
  body:has(.search-page) .filter-actions {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 18px !important;
  }
  body:has(.search-page) .filter-actions .btn,
  body:has(.search-page) .filter-actions button {
    width: 100%;
    min-height: 54px;
    border-radius: 17px !important;
    font-size: 16px;
  }
  body:has(.search-page) .filter-actions button {
    background: var(--directory-green) !important;
    border-color: var(--directory-green) !important;
    box-shadow: 0 10px 18px rgba(11, 128, 101, .16);
  }
  body:has(.search-page) .filter-actions .btn.light {
    color: var(--directory-green);
    background: transparent;
    border: 1px solid #9bd0c5;
  }
  body:has(.search-page) .section-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 8px;
    margin: 28px 4px 14px;
  }
  body:has(.search-page) .section-title h2 {
    margin: 0;
    color: var(--directory-green);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -.04em;
  }
  body:has(.search-page) .section-title .muted { color: #5b8592; font-size: 15px; }
  body:has(.search-page) .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
  body:has(.search-page) .profile {
    padding: 10px;
    background: rgba(255, 255, 255, .9);
    border: 1px solid #cfe5df;
    border-radius: 20px;
    box-shadow: 0 8px 18px rgba(11, 72, 56, .06);
  }
  body:has(.search-page) .profile > a { display: block; }
  body:has(.search-page) .profile-media {
    height: 132px !important;
    min-height: 132px !important;
    padding: 0 !important;
    background: var(--directory-soft);
    border-radius: 16px !important;
  }
  body:has(.search-page) .profile-media > img,
  body:has(.search-page) .profile-media .avatar-reference-image,
  body:has(.search-page) .profile-media .avatar {
    border-radius: 16px;
  }
  body:has(.search-page) .profile-media::after {
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    color: var(--directory-green);
    background: rgba(255, 255, 255, .9);
    border-radius: 50%;
  }
  body:has(.search-page) .profile-body {
    position: static !important;
    width: auto !important;
    padding: 9px 3px 1px !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
  body:has(.search-page) .profile-body h3 {
    margin: 0 0 5px;
    color: #17475a;
    font-size: 16px;
    line-height: 1.08;
  }
  body:has(.search-page) .profile-body p {
    margin: 3px 0 0;
    color: #5b8592;
    font-size: 12px;
    line-height: 1.2;
  }
  body:has(.search-page) .profile-body p:not(.profile-goal)::before { content: '⌖'; margin-right: 4px; color: var(--directory-green); }
  body:has(.search-page) .profile-body .profile-goal {
    padding: 0;
    color: #5b8592;
    background: transparent;
    border-radius: 0;
  }
  body:has(.search-page) .profile-body .profile-goal::before { content: '♡'; margin-right: 4px; color: var(--directory-green); }
  body:has(.search-page) .online-dot {
    top: 8px;
    left: 8px;
    max-width: calc(100% - 52px);
    padding: 5px 7px;
    overflow: hidden;
    color: #26756f;
    background: rgba(236, 249, 244, .94);
    border-radius: 999px;
    font-size: 9px;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body:has(.search-page) .online-dot.is-offline {
    animation: none !important;
    box-shadow: none !important;
  }
  body:has(.search-page) .online-dot.is-online { animation: nxOnlineBadgePulse 2.4s ease-in-out infinite; }
  body:has(.search-page) .bottom-nav {
    left: 12px;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 30;
    border-radius: 24px;
  }
}

@media (max-width: 760px) {
  body:has(.search-page) .profile-media { width: 100% !important; }
}


/* Exact compact profile-card geometry from the supplied mobile reference. */
@media (max-width: 760px) {
  body:has(.search-page) .profile {
    min-height: 0 !important;
    height: auto !important;
    padding: 10px !important;
    overflow: visible;
  }
  body:has(.search-page) .profile-media {
    position: relative;
    width: 70px !important;
    height: 70px !important;
    min-width: 70px !important;
    min-height: 70px !important;
    overflow: visible !important;
    border-radius: 15px !important;
  }
  body:has(.search-page) .profile-media > img,
  body:has(.search-page) .profile-media .avatar-reference-image,
  body:has(.search-page) .profile-media .avatar {
    width: 70px !important;
    height: 70px !important;
    border-radius: 15px !important;
    object-fit: cover;
  }
  body:has(.search-page) .profile-media::after { display: none !important; }
  body:has(.search-page) .profile::after {
    content: '♡';
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: var(--directory-green);
    background: rgba(255, 255, 255, .92);
    border-radius: 50%;
    font-size: 25px;
    line-height: 1;
  }
  body:has(.search-page) .online-dot {
    top: 8px !important;
    left: 78px !important;
    z-index: 3;
    max-width: 76px !important;
    padding: 5px 7px !important;
    font-size: 9px !important;
  }
  body:has(.search-page) .profile-body {
    min-height: 0;
    padding: 9px 3px 1px !important;
  }
  body:has(.search-page) .profile-body h3 {
    margin: 0 0 5px !important;
    font-size: 16px !important;
    line-height: 1.05 !important;
  }
  body:has(.search-page) .profile-body p {
    margin: 3px 0 0 !important;
    font-size: 12px !important;
    line-height: 1.18 !important;
  }
}

/* Final reference header refinement: mobile directory pages only */
@media (max-width: 700px){
  body:has(.search-page) .site-header,
  body:has(.guest-list) .site-header{
    width:100% !important;
    height:74px !important;
    min-height:74px !important;
    margin:0 !important;
    padding:10px 16px 8px 68px !important;
    border-radius:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    box-sizing:border-box !important;
  }
  body:has(.search-page) .site-header .brand,
  body:has(.guest-list) .site-header .brand{
    position:relative !important;
    display:flex !important;
    align-items:center !important;
    gap:8px !important;
    width:auto !important;
    height:52px !important;
    margin:0 !important;
    color:#07513d !important;
  }
  body:has(.search-page) .site-header .brand-mark,
  body:has(.guest-list) .site-header .brand-mark{
    position:relative !important;
    display:block !important;
    flex:0 0 48px !important;
    width:48px !important;
    height:48px !important;
    border:0 !important;
    border-radius:0 !important;
    background:
      linear-gradient(#07513d,#07513d) 22px 3px / 3px 12px no-repeat,
      linear-gradient(#07513d,#07513d) 17px 3px / 13px 3px no-repeat !important;
    color:transparent !important;
  }
  body:has(.search-page) .site-header .brand-mark::before,
  body:has(.guest-list) .site-header .brand-mark::before{
    content:"" !important;
    position:absolute !important;
    left:10px !important;
    top:17px !important;
    width:28px !important;
    height:24px !important;
    border:3px solid #07513d !important;
    border-bottom:0 !important;
    border-radius:18px 18px 0 0 !important;
    box-sizing:border-box !important;
  }
  body:has(.search-page) .site-header .brand-mark::after,
  body:has(.guest-list) .site-header .brand-mark::after{
    content:"" !important;
    position:absolute !important;
    left:6px !important;
    top:40px !important;
    width:37px !important;
    height:3px !important;
    background:#07513d !important;
    box-shadow:0 4px 0 #07513d !important;
  }
  body:has(.search-page) .site-header .brand > span:nth-child(2),
  body:has(.guest-list) .site-header .brand > span:nth-child(2){
    align-self:flex-start !important;
    margin-top:5px !important;
    font-size:24px !important;
    line-height:1 !important;
    font-weight:800 !important;
    letter-spacing:-.7px !important;
    white-space:nowrap !important;
  }
  body:has(.search-page) .site-header .brand::after,
  body:has(.guest-list) .site-header .brand::after{
    content:"Светлый путь к семье" !important;
    position:absolute !important;
    left:56px !important;
    top:33px !important;
    color:#78a6a1 !important;
    font-size:14px !important;
    line-height:1 !important;
    font-weight:500 !important;
    letter-spacing:.1px !important;
    white-space:nowrap !important;
  }
  body:has(.search-page) .site-header .top-actions,
  body:has(.guest-list) .site-header .top-actions{
    display:flex !important;
    align-items:center !important;
    gap:8px !important;
    margin-left:auto !important;
  }
  body:has(.search-page) .site-header .top-actions a[href="profile.php"],
  body:has(.guest-list) .site-header .top-actions a[href="profile.php"]{
    position:relative !important;
    display:inline-flex !important;
    flex:0 0 42px !important;
    width:42px !important;
    height:42px !important;
    padding:0 !important;
    border:1px solid rgba(122,170,128,.18) !important;
    border-radius:50% !important;
    background:rgba(255,255,255,.58) !important;
    color:transparent !important;
    font-size:0 !important;
    box-sizing:border-box !important;
  }
  body:has(.search-page) .site-header .top-actions a[href="profile.php"]::before,
  body:has(.guest-list) .site-header .top-actions a[href="profile.php"]::before{
    content:"" !important;
    width:16px !important;
    height:16px !important;
    border:3px solid #07513d !important;
    border-radius:50% !important;
    transform:translate(-2px,-2px) !important;
    box-sizing:border-box !important;
  }
  body:has(.search-page) .site-header .top-actions a[href="profile.php"]::after,
  body:has(.guest-list) .site-header .top-actions a[href="profile.php"]::after{
    content:"" !important;
    position:absolute !important;
    width:12px !important;
    height:3px !important;
    background:#07513d !important;
    border-radius:3px !important;
    transform:translate(8px,9px) rotate(45deg) !important;
  }
  body:has(.search-page) .site-header .top-actions a.islam-head,
  body:has(.guest-list) .site-header .top-actions a.islam-head{
    position:relative !important;
    display:inline-flex !important;
    flex:0 0 42px !important;
    width:42px !important;
    height:42px !important;
    padding:0 !important;
    border:1px solid rgba(122,170,128,.18) !important;
    border-radius:50% !important;
    background:rgba(255,255,255,.58) !important;
    color:transparent !important;
    font-size:0 !important;
    box-sizing:border-box !important;
  }
  body:has(.search-page) .site-header .top-actions a.islam-head::before,
  body:has(.guest-list) .site-header .top-actions a.islam-head::before{
    content:"" !important;
    width:23px !important;
    height:3px !important;
    border-radius:3px !important;
    background:#07513d !important;
    box-shadow:0 -8px 0 #07513d,0 8px 0 #07513d !important;
  }
}

/* Compact final header geometry */
@media (max-width:700px){
  body:has(.search-page) .site-header,
  body:has(.guest-list) .site-header{position:relative !important;}
  body:has(.search-page) .site-header .brand,
  body:has(.guest-list) .site-header .brand{
    position:absolute !important;
    left:60px !important;
    top:11px !important;
    flex:0 0 210px !important;
    width:210px !important;
    max-width:210px !important;
  }
  body:has(.search-page) .site-header .brand-mark::before,
  body:has(.guest-list) .site-header .brand-mark::before,
  body:has(.search-page) .site-header .brand-mark::after,
  body:has(.guest-list) .site-header .brand-mark::after{display:block !important;}
  body:has(.search-page) .site-header .brand > span:nth-child(2),
  body:has(.guest-list) .site-header .brand > span:nth-child(2){font-size:22px !important;}
  body:has(.search-page) .site-header .top-actions,
  body:has(.guest-list) .site-header .top-actions{
    position:absolute !important;
    right:16px !important;
    top:16px !important;
    margin:0 !important;
  }
}

/* Reference-scale mobile layout pass */
@media (max-width:760px){
  body:has(.search-page) main.search-page{margin-left:5px !important;margin-right:5px !important;padding-left:12px !important;padding-right:12px !important;}
  body:has(.search-page) .page-heading{padding:14px 14px 6px !important;border-radius:24px 24px 0 0 !important;border-bottom:0 !important;}
  body:has(.search-page) .page-heading .pill{display:none !important;}
  body:has(.search-page) .page-heading h1{font-size:27px !important;line-height:1.02 !important;letter-spacing:-.045em !important;margin:0 0 6px !important;white-space:nowrap !important;}
  body:has(.search-page) .page-heading .muted{font-size:17px !important;line-height:1.35 !important;}
  body:has(.search-page) .filter-card{padding:10px 14px 14px !important;border-radius:0 0 24px 24px !important;}
  body:has(.search-page) .filter-grid{gap:9px !important;}
  body:has(.search-page) .filter-grid label{height:44px !important;min-height:44px !important;padding:5px 24px 5px 36px !important;border-radius:17px !important;font-size:12px !important;line-height:1.05 !important;}
  body:has(.search-page) .filter-grid label::before{left:10px !important;font-size:19px !important;}
  body:has(.search-page) .filter-grid label::after{right:10px !important;font-size:16px !important;}
  body:has(.search-page) .filter-grid label select,
  body:has(.search-page) .filter-grid label input{height:auto !important;min-height:0 !important;padding:0 !important;font-size:15px !important;line-height:1.05 !important;}
  body:has(.search-page) .filter-actions{gap:8px !important;margin-top:12px !important;padding:0 !important;}
  body:has(.search-page) .filter-actions button,
  body:has(.search-page) .filter-actions .btn{min-height:38px !important;height:38px !important;border-radius:18px !important;padding:0 10px !important;font-size:15px !important;}
  body:has(.search-page) .filter-actions button::before{content:'⌕';display:inline-block;margin-right:8px;font-size:24px;line-height:0;vertical-align:-3px;}
  body:has(.search-page) .filter-actions .btn::before{content:'☷';display:inline-block;margin-right:8px;font-size:20px;line-height:0;vertical-align:-2px;}
  body:has(.search-page) .section-title{margin:16px 0 10px !important;}
  body:has(.search-page) .section-title h2{font-size:24px !important;line-height:1 !important;}
  body:has(.search-page) .section-title h2::before{content:'♧';display:inline-block;margin-right:8px;font-family:Arial,sans-serif;font-size:.9em;vertical-align:-.05em;}
  body:has(.search-page) .section-title .muted{font-size:14px !important;}
  body:has(.search-page) .profile-grid{gap:9px !important;}
  body:has(.search-page) .profile{padding:8px !important;border-radius:18px !important;}
  body:has(.search-page) .profile-body{padding:7px 2px 1px !important;}
  body:has(.search-page) .profile-body h3{font-size:15px !important;}
  body:has(.search-page) .bottom-nav{height:52px !important;min-height:52px !important;padding:4px !important;border-radius:26px !important;}
  body:has(.search-page) .bottom-nav a{height:42px !important;min-height:42px !important;padding:2px 1px !important;font-size:9px !important;line-height:10px !important;}
  body:has(.search-page) .bottom-nav a span{font-size:20px !important;line-height:20px !important;}
  body:has(.search-page) .bottom-nav a.active{border:0 !important;background:#e4f4ea !important;color:#0b7059 !important;border-radius:24px !important;}
}

/* Reference alignment and field rendering */
@media (max-width:760px){
  body:has(.search-page) main.search-page{width:calc(100% + 14px) !important;max-width:none !important;}
  body:has(.search-page) .page-heading{padding:10px 16px 2px !important;}
  body:has(.search-page) .page-heading h1{font-size:25px !important;line-height:1.04 !important;letter-spacing:-.055em !important;}
  body:has(.search-page) .filter-card{padding:8px 14px 10px !important;}
  body:has(.search-page) .filter-grid{gap:8px !important;}
  body:has(.search-page) .filter-grid label{height:42px !important;min-height:42px !important;padding:4px 24px 4px 36px !important;justify-content:flex-start !important;}
  body:has(.search-page) .filter-grid label::before{top:50% !important;transform:translateY(-50%) !important;}
  body:has(.search-page) .filter-grid label::after{top:50% !important;transform:translateY(-50%) !important;}
  body:has(.search-page) .filter-grid label select,
  body:has(.search-page) .filter-grid label input{display:block !important;width:100% !important;height:17px !important;min-height:17px !important;margin:1px 0 0 !important;font-size:15px !important;line-height:17px !important;overflow:hidden !important;text-overflow:ellipsis !important;white-space:nowrap !important;}
  body:has(.search-page) .filter-actions{margin-top:10px !important;gap:7px !important;}
  body:has(.search-page) .filter-actions button,
  body:has(.search-page) .filter-actions .btn{height:36px !important;min-height:36px !important;border-radius:17px !important;font-size:14px !important;}
  body:has(.search-page) .section-title{margin:14px 0 9px !important;}
  body:has(.search-page) .section-title h2{font-family:Georgia,'Times New Roman',serif !important;font-size:24px !important;font-weight:600 !important;letter-spacing:-.04em !important;}
  body:has(.search-page) .bottom-nav{height:50px !important;min-height:50px !important;}
  body:has(.search-page) .bottom-nav a{height:40px !important;min-height:40px !important;font-size:9px !important;}
  body:has(.search-page) .bottom-nav a span{font-size:19px !important;line-height:19px !important;}
}

/* Final horizontal fit and results icon */
@media (max-width:760px){
  body:has(.search-page) main.search-page{width:calc(100% - 8px) !important;}
  body:has(.search-page) .section-title h2::before{
    content:"" !important;
    width:28px !important;
    height:28px !important;
    margin-right:8px !important;
    background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='none' stroke='%23075b49' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='9' r='4'/%3E%3Ccircle cx='22' cy='10' r='3.5'/%3E%3Cpath d='M3.5 26c.7-5.2 3.2-8 7.5-8s6.8 2.8 7.5 8'/%3E%3Cpath d='M17 25c.5-3.8 2.5-6 5.5-6 3 0 5 2.2 5.5 6'/%3E%3C/svg%3E") center/contain no-repeat !important;
    font-size:0 !important;
    vertical-align:-7px !important;
  }
}

/* Compact profile cards: override legacy specificity without changing markup */
@media (max-width:760px){
  body.site-main .profile-grid .profile{padding:8px !important;border-radius:18px !important;}
  body.site-main .profile-grid .profile-body{position:static !important;width:auto !important;min-height:0 !important;padding:4px 2px 2px !important;background:transparent !important;box-shadow:none !important;border-radius:0 !important;}
  body.site-main .profile-grid .profile-body h3{margin:0 0 2px !important;font-size:15px !important;line-height:15px !important;}
  body.site-main .profile-grid .profile-body p{margin:2px 0 0 !important;font-size:11px !important;line-height:12px !important;}
  body.site-main .profile-grid .profile-body .profile-goal{margin-top:3px !important;line-height:12px !important;}
}

/* Final icon and color polish */
@media (max-width:760px){
  body.site-main .filter-card{border-top:0 !important;}
  body.site-main .filter-grid label{color:#527c86 !important;}
  body.site-main .filter-grid label:nth-child(2)::before{
    content:"" !important;width:21px !important;height:21px !important;left:9px !important;top:50% !important;transform:translateY(-58%) rotate(-45deg) !important;border:2px solid #07866d !important;border-radius:50% 50% 50% 0 !important;background:transparent !important;
  }
  body.site-main .filter-grid label:nth-child(2)::after{right:10px !important;top:50% !important;transform:translateY(-50%) !important;}
  body.site-main .filter-grid label:nth-child(4)::before{
    content:"" !important;width:22px !important;height:20px !important;left:9px !important;top:50% !important;transform:translateY(-50%) !important;border:2px solid #07866d !important;border-bottom:0 !important;border-radius:14px 14px 0 0 !important;background:linear-gradient(#07866d,#07866d) 50% 100%/27px 2px no-repeat !important;
  }
  body.site-main .filter-grid label:nth-child(5)::before,
  body.site-main .filter-grid label:nth-child(6)::before{
    content:"" !important;width:22px !important;height:20px !important;left:9px !important;top:50% !important;transform:translateY(-50%) !important;border:2px solid #07866d !important;border-radius:4px !important;background:linear-gradient(#07866d,#07866d) 0 5px/100% 2px no-repeat !important;
  }
  body.site-main .filter-actions .btn::before{
    content:"" !important;width:24px !important;height:18px !important;margin-right:8px !important;background:linear-gradient(#08725d,#08725d) 0 2px/24px 2px no-repeat,linear-gradient(#08725d,#08725d) 0 9px/24px 2px no-repeat,linear-gradient(#08725d,#08725d) 0 16px/24px 2px no-repeat !important;vertical-align:-4px !important;
  }
  body.site-main .filter-actions .btn::after{content:"" !important;}
}

/* Keep the bottom navigation inside narrow mobile viewports */
@media (max-width:760px){
  body.site-main .bottom-nav{left:12px !important;right:12px !important;width:auto !important;min-width:0 !important;max-width:none !important;box-sizing:border-box !important;}
  body.site-main .bottom-nav a{flex:1 1 0 !important;width:auto !important;min-width:0 !important;max-width:none !important;}
}

/* Use the visual viewport for fixed navigation on narrow devices */
@media (max-width:760px){
  body.site-main .bottom-nav{left:12px !important;right:auto !important;width:calc(100vw - 24px) !important;}
}
