/**
 * DiaperGuys App Revamp — mobile-first discovery layer
 * Sniffies map energy + Grindr grid + DG branding
 */

/* ---- Safe area + page padding ---- */
body.theme-grid {
  --dg-nav-height: 56px;
  --dg-header-height: 56px;
  --dg-mobile-header-height: 56px;
  --dg-bottom-nav-height: 56px;
  --dg-safe-top: env(safe-area-inset-top, 0px);
  --dg-safe-bottom: env(safe-area-inset-bottom, 0px);
  --dg-safe-bottom-pad: max(8px, env(safe-area-inset-bottom, 0px));
  --dg-header-total: calc(var(--dg-header-height) + var(--dg-safe-top));
  --dg-page-pad-bottom: calc(var(--dg-nav-height) + var(--dg-safe-bottom-pad) + 12px);
}

@media (min-width: 992px) {
  body.theme-grid {
    --dg-header-height: 74px;
    --dg-mobile-header-height: 74px;
    --dg-bottom-nav-height: 56px;
  }
}

body.theme-grid.page-grid:not(.page-map):not(.nearby-map-mode),
body.theme-grid.page-messages,
body.theme-grid.page-index,
body.theme-grid.page-watch,
body.theme-grid.page-reels,
body.theme-grid.page-groups,
body.theme-grid.page-events,
body.theme-grid.page-search,
body.theme-grid.page-static,
body.theme-grid.page-contact,
body.theme-grid.page-directory,
body.theme-grid.page-support {
  padding-bottom: var(--dg-page-pad-bottom) !important;
}

body.theme-grid.page-reels,
body.theme-grid.page-watch {
  padding-bottom: 0 !important;
}

body.theme-grid.nearby-map-mode,
body.theme-grid.page-map {
  padding-bottom: var(--dg-nav-height, 56px) !important;
  overflow: hidden;
}

/* Dedicated /map page — explicit height chain (Leaflet needs non-zero #js_grid-map) */
body.theme-grid.nearby-map-mode .main-wrapper,
body.theme-grid.page-map .main-wrapper {
  min-height: 0;
  height: calc(100dvh - var(--dg-header-height, 56px));
  max-height: calc(100dvh - var(--dg-header-height, 56px));
  overflow: hidden;
  background: #0a0e14;
}

body.theme-grid.nearby-map-mode .dg-map-page,
body.theme-grid.page-map .dg-map-page {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Dedicated /map shell — explicit height (canonical id: #js_grid-map) */
body.theme-grid.page-map .dg-map-shell,
body.theme-grid.nearby-map-mode .dg-map-shell,
body.theme-grid .nearby-page--map-only .dg-map-shell {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--dg-header-height, 74px));
  min-height: 520px;
  overflow: hidden;
}

body.theme-grid.nearby-map-mode .dg-map-shell .grid-map-panel--fullscreen,
body.theme-grid.page-map .dg-map-shell .grid-map-panel--fullscreen {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  margin: 0 !important;
  pointer-events: auto;
  overflow: hidden !important;
}

body.theme-grid.page-map .grid-map-panel--fullscreen .grid-map-panel__inner,
body.theme-grid.nearby-map-mode .grid-map-panel--fullscreen .grid-map-panel__inner {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

/* ---- Compact mobile header ---- */
@media (max-width: 991px) {
  body.theme-grid {
    padding-top: var(--dg-header-total) !important;
  }

  body.theme-grid .main-header {
    box-sizing: border-box;
    padding-top: var(--dg-safe-top);
    height: auto !important;
    min-height: var(--dg-header-total) !important;
  }

  body.theme-grid .main-header .logo-wrapper img,
  body.theme-grid .main-header .logo img {
    max-height: 28px !important;
    width: auto;
  }

  body.theme-grid .main-header .navbar .nav-link,
  body.theme-grid .main-header .navbar-icon {
    padding: 6px 8px !important;
  }
}

/* ---- Bottom nav (single system) ---- */
body.theme-grid .footer-bottom-bar.grid-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  box-sizing: border-box;
  height: auto;
  min-height: calc(var(--dg-nav-height) + var(--dg-safe-bottom-pad));
  margin: 0 !important;
  border-radius: 0 !important;
  transform: none !important;
  padding-bottom: var(--dg-safe-bottom-pad);
  background: rgba(0, 0, 0, 0.92) !important;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;
}

body.theme-grid .grid-bottom-nav .footer-bottom-bar-links {
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  height: 100%;
  max-width: 520px;
  margin: 0 auto;
}

body.theme-grid .grid-bottom-nav .footer-bottom-bar-links > .link {
  flex: 1;
  min-width: 0;
}

body.theme-grid .grid-bottom-nav .footer-bottom-bar-links > .link > a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 100%;
  padding: 6px 4px;
  color: rgba(255, 255, 255, 0.55) !important;
  text-decoration: none;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

body.theme-grid .grid-bottom-nav .footer-bottom-bar-links > .link.active > a,
body.theme-grid .grid-bottom-nav .footer-bottom-bar-links > .link > a:hover {
  color: #fff !important;
}

body.theme-grid .grid-bottom-nav .footer-bottom-bar-links > .link.active > a svg {
  stroke: #fff;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.35));
}

body.theme-grid .grid-bottom-nav .title {
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Hide legacy stock bottom nav if it leaks */
body.theme-grid .footer-bottom-bar:not(.grid-bottom-nav) {
  display: none !important;
}

/* Logged-in X theme: header .x-sidebar already includes _sidebar.tpl.
   Hide the in-page duplicate and let the main column use the full row. */
body.theme-xgrid:not(.visitor) .sg-offcanvas-sidebar {
  display: none !important;
}
body.theme-xgrid:not(.visitor) .sg-offcanvas-mainbar {
  flex: 0 0 100% !important;
  max-width: 100% !important;
  width: 100% !important;
}


/* ---- Nearby 2-column mobile grid ---- */
body.theme-grid .nearby-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

@media (min-width: 768px) {
  body.theme-grid .nearby-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    padding: 16px;
  }
}

/* Padded Orbit — public affinity matches, intentionally excluding demographic fields. */
body.theme-grid .dg-profile-orbits {
  overflow: hidden;
  background: linear-gradient(150deg, rgba(9, 22, 34, .94), rgba(19, 15, 38, .9));
}
body.theme-grid .dg-profile-orbits__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom-color: rgba(126, 226, 235, .16);
}
body.theme-grid .dg-profile-orbits__head > i { color: #82e7eb; font-size: 1.1rem; transform: rotate(42deg); }
body.theme-grid .dg-profile-orbits__eyebrow { display: block; color: #8bdde7; font-size: .63rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
body.theme-grid .dg-profile-orbits__body { padding: 12px; }
body.theme-grid .dg-profile-orbits__body > p { margin: 0 0 12px; color: var(--grid-muted); font-size: .75rem; }
body.theme-grid .dg-profile-orbit { display: grid; grid-template-columns: minmax(0, 1fr) 124px; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.08); }
body.theme-grid .dg-profile-orbit:first-of-type { border-top: 0; }
body.theme-grid .dg-profile-orbit__label { min-width: 0; }
body.theme-grid .dg-profile-orbit__label strong, body.theme-grid .dg-profile-orbit__label span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.theme-grid .dg-profile-orbit__label strong { font-size: .8rem; color: #effcff; }
body.theme-grid .dg-profile-orbit__label span { color: #9fdde5; font-size: .73rem; }
body.theme-grid .dg-profile-orbit__space { position: relative; width: 124px; height: 78px; grid-column: 2; grid-row: 1 / span 2; overflow: hidden; border-radius: 14px; background: radial-gradient(circle at center, rgba(41, 188, 204, .17), transparent 24%), radial-gradient(circle at 18% 20%, rgba(191, 132, 255, .18), transparent 2px), #0a111c; }
body.theme-grid .dg-profile-orbit__space::before { content: ''; position: absolute; inset: 0; opacity: .42; background-image: radial-gradient(#c5fbff 1px, transparent 1.5px); background-size: 17px 17px; }
body.theme-grid .dg-profile-orbit__ring { position: absolute; left: 50%; top: 50%; border: 1px solid rgba(119, 237, 242, .32); border-radius: 50%; transform: translate(-50%, -50%) rotate(-18deg); }
body.theme-grid .dg-profile-orbit__ring--one { width: 86px; height: 34px; }
body.theme-grid .dg-profile-orbit__ring--two { width: 57px; height: 65px; border-color: rgba(196, 140, 255, .25); }
body.theme-grid .dg-profile-orbit__station { position: absolute; left: 50%; top: 50%; z-index: 2; width: 28px; height: 28px; display: grid; place-items: center; border: 2px solid #bdfeff; border-radius: 50%; color: #08131d; background: #83e8eb; box-shadow: 0 0 16px rgba(129, 231, 235, .75); transform: translate(-50%, -50%); font-size: .7rem; }
body.theme-grid .dg-profile-orbit__person { --angle: 0deg; position: absolute; z-index: 3; left: 50%; top: 50%; width: 25px; height: 25px; overflow: hidden; border: 2px solid #0a111c; border-radius: 50%; box-shadow: 0 0 0 1px rgba(154, 237, 241, .7); transform: translate(-50%, -50%) rotate(var(--angle)) translateX(39px) rotate(calc(var(--angle) * -1)); animation: dg-orbit-float 5.4s ease-in-out infinite; }
body.theme-grid .dg-profile-orbit__person img { width: 100%; height: 100%; object-fit: cover; }
body.theme-grid .dg-profile-orbit__person--1 { --angle: 0deg; animation-delay: -.2s; }
body.theme-grid .dg-profile-orbit__person--2 { --angle: 58deg; animation-delay: -1.1s; }
body.theme-grid .dg-profile-orbit__person--3 { --angle: 118deg; animation-delay: -2.4s; }
body.theme-grid .dg-profile-orbit__person--4 { --angle: 180deg; animation-delay: -.8s; }
body.theme-grid .dg-profile-orbit__person--5 { --angle: 235deg; animation-delay: -3.1s; }
body.theme-grid .dg-profile-orbit__person--6 { --angle: 292deg; animation-delay: -1.7s; }
body.theme-grid .dg-profile-orbit__person--7 { --angle: 330deg; animation-delay: -2.7s; }
body.theme-grid .dg-profile-orbit__person--8 { --angle: 25deg; animation-delay: -4.1s; }
body.theme-grid .dg-profile-orbit__count { grid-column: 1; color: var(--grid-muted); font-size: .68rem; }
body.theme-grid .dg-profile-orbit__open { grid-column: 1; width: max-content; color: #91e9ec; font-size: .7rem; font-weight: 700; text-decoration: none; }
body.theme-grid .dg-profile-orbit__open:hover { color: #fff; }
@keyframes dg-orbit-float { 50% { margin-top: -3px; filter: brightness(1.15); } }
@media (prefers-reduced-motion: reduce) { body.theme-grid .dg-profile-orbit__person { animation: none; } }

body.theme-grid .dg-orbit-page { max-width:1100px; margin:0 auto; padding:18px 0 40px; }
body.theme-grid .dg-orbit-page__back { display:inline-flex; gap:8px; align-items:center; margin-bottom:14px; color:var(--grid-muted); font-weight:700; text-decoration:none; }
body.theme-grid .dg-orbit-page__back:hover { color:#92e9ec; }
body.theme-grid .dg-orbit-page__hero { position:relative; min-height:300px; overflow:hidden; padding:36px; background:radial-gradient(circle at 72% 55%,rgba(86,221,231,.2),transparent 25%),radial-gradient(circle at 20% 10%,rgba(165,111,255,.2),transparent 35%),#09101b; }
body.theme-grid .dg-orbit-page__stars { position:absolute; inset:0; opacity:.45; background-image:radial-gradient(#e3feff 1px,transparent 1.5px); background-size:24px 24px; }
body.theme-grid .dg-orbit-page__copy { position:relative; z-index:2; max-width:46%; }
body.theme-grid .dg-orbit-page__copy > span { color:#9eeff0; font-size:.72rem; font-weight:800; letter-spacing:.14em; text-transform:uppercase; }
body.theme-grid .dg-orbit-page__copy h2 { margin:8px 0; color:#fff; font-size:clamp(1.65rem,4vw,3rem); }
body.theme-grid .dg-orbit-page__copy p { color:#c5d7dd; font-size:1rem; }
body.theme-grid .dg-orbit-page__copy small { color:#90cad2; }
body.theme-grid .dg-orbit-page__constellation { position:absolute; right:4%; top:50%; width:340px; height:260px; transform:translateY(-50%); }
body.theme-grid .dg-orbit-page__constellation::before,body.theme-grid .dg-orbit-page__constellation::after { content:''; position:absolute; left:50%; top:50%; border:1px solid rgba(126,242,245,.35); border-radius:50%; transform:translate(-50%,-50%) rotate(-18deg); }
body.theme-grid .dg-orbit-page__constellation::before { width:270px; height:100px; } body.theme-grid .dg-orbit-page__constellation::after { width:135px; height:225px; border-color:rgba(201,148,255,.3); }
body.theme-grid .dg-orbit-page__core { position:absolute; left:50%; top:50%; z-index:2; display:grid; place-items:center; width:58px; height:58px; border:3px solid #c8ffff; border-radius:50%; color:#071119; background:#83e9ec; box-shadow:0 0 30px rgba(128,232,235,.85); transform:translate(-50%,-50%); }
body.theme-grid .dg-orbit-page__orb { --angle:0deg; position:absolute; left:50%; top:50%; z-index:3; width:48px; height:48px; border:3px solid #0a111c; border-radius:50%; object-fit:cover; box-shadow:0 0 0 1px #8ceaf0; transform:translate(-50%,-50%) rotate(var(--angle)) translateX(115px) rotate(calc(var(--angle) * -1)); }
body.theme-grid .dg-orbit-page__orb--1{--angle:0deg}.dg-orbit-page__orb--2{--angle:48deg}.dg-orbit-page__orb--3{--angle:96deg}.dg-orbit-page__orb--4{--angle:144deg}.dg-orbit-page__orb--5{--angle:192deg}.dg-orbit-page__orb--6{--angle:240deg}.dg-orbit-page__orb--7{--angle:288deg}.dg-orbit-page__orb--8{--angle:336deg}
body.theme-grid .dg-orbit-page__members { display:grid; grid-template-columns:repeat(auto-fill,minmax(116px,1fr)); gap:12px; margin-top:18px; }
body.theme-grid .dg-orbit-page__member { display:grid; gap:7px; place-items:center; min-width:0; padding:12px 8px; border:1px solid var(--grid-border); border-radius:14px; color:var(--grid-text); background:var(--grid-surface); text-decoration:none; transition:.15s ease; }
body.theme-grid .dg-orbit-page__member:hover { border-color:#83e8ed; color:#fff; transform:translateY(-2px); }
body.theme-grid .dg-orbit-page__member img { width:58px; height:58px; border-radius:50%; object-fit:cover; } body.theme-grid .dg-orbit-page__member span { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.78rem; font-weight:700; }
body.theme-grid .dg-orbit-page__empty { padding:30px; text-align:center; color:var(--grid-muted); }
@media (max-width:650px) { body.theme-grid .dg-orbit-page__hero { min-height:390px; padding:25px; } body.theme-grid .dg-orbit-page__copy { max-width:100%; } body.theme-grid .dg-orbit-page__constellation { right:50%; top:auto; bottom:4px; transform:translateX(50%) scale(.86); } }

/* Themed mini-galaxies — each affinity gets a distinct adult-space world. */
body.theme-grid .dg-profile-orbits__body { display:grid; gap:12px; }
body.theme-grid .dg-profile-orbit { position:relative; display:block; min-height:172px; padding:16px; overflow:hidden; border:1px solid rgba(154,235,241,.22); border-radius:18px; color:#fff; background:#0b1320; text-decoration:none; transition:transform .2s ease,border-color .2s ease; }
body.theme-grid .dg-profile-orbit:hover { color:#fff; border-color:#9ceff2; transform:translateY(-3px); }
body.theme-grid .dg-profile-orbit__label { position:relative; z-index:4; max-width:53%; padding-top:5px; }
body.theme-grid .dg-profile-orbit__label strong { font-size:.92rem; } body.theme-grid .dg-profile-orbit__label > span:last-child { color:rgba(238,252,255,.8); font-size:.76rem; }
body.theme-grid .dg-profile-orbit__eyebrow { margin-bottom:4px; color:#a9fbfc; font-size:.58rem !important; font-weight:800; letter-spacing:.11em; text-transform:uppercase; }
body.theme-grid .dg-profile-orbit__space { right:6px; left:auto; top:7px; width:155px; height:155px; border-radius:50%; background:radial-gradient(circle at center,rgba(89,218,233,.2),transparent 25%),#07101a; }
body.theme-grid .dg-profile-orbit__space::before { opacity:.58; background-size:14px 14px; }
body.theme-grid .dg-profile-orbit__ring--one { width:123px; height:48px; } body.theme-grid .dg-profile-orbit__ring--two { width:70px; height:112px; }
body.theme-grid .dg-profile-orbit__station { width:38px; height:38px; font-size:.9rem; }
body.theme-grid .dg-profile-orbit__person { width:31px; height:31px; transform:translate(-50%,-50%) rotate(var(--angle)) translateX(57px) rotate(calc(var(--angle) * -1)); }
body.theme-grid .dg-profile-orbit__count { position:absolute; z-index:4; bottom:13px; left:16px; color:#b8f9fb; font-size:.7rem; }
body.theme-grid .dg-profile-orbit__open { display:none; }
body.theme-grid .dg-profile-orbit--rocket { background:radial-gradient(circle at 80% 25%,rgba(125,231,235,.28),transparent 20%),radial-gradient(circle at 16% 90%,rgba(135,96,255,.33),transparent 42%),#101027; }
body.theme-grid .dg-profile-orbit--padded { background:radial-gradient(circle at 78% 36%,rgba(105,227,242,.28),transparent 24%),linear-gradient(135deg,#102833,#0b1420 64%,#242142); }
body.theme-grid .dg-profile-orbit--water { background:radial-gradient(circle at 78% 32%,rgba(74,214,255,.34),transparent 20%),linear-gradient(145deg,#062f4a,#0c1a3c 58%,#18114d); }
body.theme-grid .dg-profile-orbit--water .dg-profile-orbit__ring { border-color:rgba(107,220,255,.55); } body.theme-grid .dg-profile-orbit--water .dg-profile-orbit__station { background:#55cfff; box-shadow:0 0 21px rgba(85,207,255,.8); }
body.theme-grid .dg-profile-orbit--stinker { background:radial-gradient(circle at 75% 35%,rgba(199,237,89,.22),transparent 20%),radial-gradient(circle at 16% 90%,rgba(137,86,45,.42),transparent 48%),#1d1d12; }
body.theme-grid .dg-profile-orbit--stinker .dg-profile-orbit__ring { border-color:rgba(207,235,105,.47); } body.theme-grid .dg-profile-orbit--stinker .dg-profile-orbit__station { background:#cfe75e; box-shadow:0 0 21px rgba(207,231,94,.72); }
body.theme-grid .dg-profile-orbit--pup { background:radial-gradient(circle at 78% 30%,rgba(255,187,112,.28),transparent 20%),linear-gradient(145deg,#3a1d20,#171225 66%,#142b3c); }
body.theme-grid .dg-profile-orbit--pup .dg-profile-orbit__station { background:#ffc177; box-shadow:0 0 21px rgba(255,193,119,.75); }
body.theme-grid .dg-profile-orbit--pride { background:linear-gradient(135deg,#301555,#14305b 38%,#135a51 65%,#653633); }
body.theme-grid .dg-profile-orbit--pride .dg-profile-orbit__station { background:#ffb3dd; box-shadow:0 0 21px rgba(255,179,221,.74); }
body.theme-grid .dg-profile-orbit--pacifier { background:radial-gradient(circle at 78% 30%,rgba(244,185,255,.35),transparent 20%),linear-gradient(145deg,#2a1641,#121a43 64%,#183a47); }
body.theme-grid .dg-profile-orbit--pacifier .dg-profile-orbit__station { background:#eeb8ff; box-shadow:0 0 21px rgba(238,184,255,.75); }
body.theme-grid .dg-orbit-page__hero--rocket { background:radial-gradient(circle at 72% 55%,rgba(86,221,231,.2),transparent 25%),radial-gradient(circle at 20% 10%,rgba(165,111,255,.2),transparent 35%),#09101b; }
body.theme-grid .dg-orbit-page__hero--padded { background:radial-gradient(circle at 72% 55%,rgba(69,224,240,.25),transparent 27%),radial-gradient(circle at 20% 10%,rgba(110,138,255,.22),transparent 36%),#071d2b; }
body.theme-grid .dg-orbit-page__hero--water { background:radial-gradient(circle at 72% 55%,rgba(67,204,255,.32),transparent 27%),linear-gradient(135deg,#072f4c,#101b58); }
body.theme-grid .dg-orbit-page__hero--stinker { background:radial-gradient(circle at 72% 55%,rgba(203,235,93,.25),transparent 28%),linear-gradient(135deg,#342512,#1b1e13); }
body.theme-grid .dg-orbit-page__hero--pup { background:radial-gradient(circle at 72% 55%,rgba(255,182,105,.25),transparent 28%),linear-gradient(135deg,#42221f,#1d1731); }
body.theme-grid .dg-orbit-page__hero--pride { background:linear-gradient(135deg,#3d155d,#193b73 42%,#14685d 70%,#6e3b35); }
body.theme-grid .dg-orbit-page__hero--pacifier { background:radial-gradient(circle at 72% 55%,rgba(236,179,255,.3),transparent 28%),linear-gradient(135deg,#31194b,#142c50); }

/* ---- Interactive Padded Orbit galaxy explorer ----
 * One answer opens one world. The visible constellation is the primary
 * explorer; the conventional profile list lives in the optional star chart.
 */
body.theme-grid .dg-orbit-page { max-width:1180px; margin:0 auto; padding:22px 0 56px; }
body.theme-grid .dg-orbit-page__back { position:relative; z-index:2; display:inline-flex; gap:8px; align-items:center; margin:0 0 14px; color:var(--grid-muted); font-weight:800; text-decoration:none; }
body.theme-grid .dg-orbit-page__back:hover { color:#b8fcff; }
body.theme-grid .dg-orbit-page__galaxy {
  --dg-orbit-accent:#8beaf0;
  --dg-orbit-accent-soft:rgba(139,234,240,.24);
  --dg-orbit-ink:#07121e;
  position:relative;
  display:grid;
  grid-template-columns:minmax(280px,.86fr) minmax(430px,1.38fr);
  min-height:548px;
  margin:0;
  overflow:hidden;
  isolation:isolate;
  border:1px solid rgba(157,235,242,.26);
  border-radius:24px;
  background:#09101b;
  box-shadow:0 18px 42px rgba(0,0,0,.24);
}
body.theme-grid .dg-orbit-page__galaxy::before {
  content:'';
  position:absolute;
  z-index:-2;
  inset:0;
  opacity:.76;
  background-image:radial-gradient(rgba(238,253,255,.95) 1px,transparent 1.55px),radial-gradient(rgba(174,214,255,.72) 1px,transparent 1.6px),radial-gradient(rgba(255,255,255,.5) 1px,transparent 1.4px);
  background-position:0 0,19px 31px,68px 14px;
  background-size:62px 62px,91px 91px,137px 137px;
}
body.theme-grid .dg-orbit-page__stars,
body.theme-grid .dg-orbit-page__atmosphere { position:absolute; inset:0; pointer-events:none; }
body.theme-grid .dg-orbit-page__stars { z-index:-1; overflow:hidden; }
body.theme-grid .dg-orbit-page__star { position:absolute; width:4px; height:4px; border-radius:50%; background:#fff; box-shadow:0 0 16px 4px rgba(215,253,255,.56); }
body.theme-grid .dg-orbit-page__star--one { top:17%; right:18%; }
body.theme-grid .dg-orbit-page__star--two { top:71%; left:13%; width:3px; height:3px; }
body.theme-grid .dg-orbit-page__star--three { top:29%; left:53%; width:5px; height:5px; }
body.theme-grid .dg-orbit-page__star--four { right:8%; bottom:12%; width:3px; height:3px; }
body.theme-grid .dg-orbit-page__atmosphere { z-index:0; opacity:.92; }
body.theme-grid .dg-orbit-page__copy { position:relative; z-index:3; align-self:start; padding:42px 12px 34px 38px; }
body.theme-grid .dg-orbit-page__eyebrow { display:block; margin-bottom:8px; color:var(--dg-orbit-accent); font-size:.67rem; font-weight:900; letter-spacing:.15em; text-transform:uppercase; }
body.theme-grid .dg-orbit-page__copy h2 { max-width:410px; margin:0; color:#fff; font-size:clamp(2rem,3.9vw,3.7rem); line-height:.97; letter-spacing:-.045em; }
body.theme-grid .dg-orbit-page__copy p { max-width:365px; margin:14px 0 5px; color:#d8e5e9; font-size:1rem; line-height:1.45; }
body.theme-grid .dg-orbit-page__copy p strong { color:#fff; }
body.theme-grid .dg-orbit-page__copy small { color:rgba(220,245,248,.72); font-size:.78rem; }
body.theme-grid .dg-orbit-page__controls { display:flex; flex-wrap:wrap; align-items:center; gap:10px 14px; max-width:385px; margin-top:24px; color:rgba(235,250,252,.73); font-size:.72rem; line-height:1.35; }
body.theme-grid .dg-orbit-page__controls > span { display:inline-flex; align-items:center; gap:6px; }
body.theme-grid .dg-orbit-page__controls > span i { color:var(--dg-orbit-accent); }
body.theme-grid .dg-orbit-page__controls .btn { border-color:rgba(255,255,255,.58); border-radius:999px; color:#111; font-size:.7rem; font-weight:800; white-space:nowrap; }
body.theme-grid .dg-orbit-page__constellation {
  position:relative;
  z-index:2;
  grid-column:2;
  grid-row:1;
  min-height:548px;
  overflow:hidden;
  outline:0;
  touch-action:pan-y;
}
body.theme-grid .dg-orbit-page__constellation::before,
body.theme-grid .dg-orbit-page__constellation::after { content:''; position:absolute; pointer-events:none; }
body.theme-grid .dg-orbit-page__constellation::before { inset:13% 9%; border:1px dashed rgba(227,254,255,.15); border-radius:48% 52% 46% 54%; transform:rotate(-12deg); }
body.theme-grid .dg-orbit-page__constellation::after { inset:28% 21%; border:1px solid var(--dg-orbit-accent-soft); border-radius:50%; filter:blur(.1px); }
body.theme-grid .dg-orbit-page__constellation:focus-visible { box-shadow:inset 0 0 0 2px var(--dg-orbit-accent); }
body.theme-grid .dg-orbit-page__constellation.is-dragging { cursor:grabbing; }
body.theme-grid .dg-orbit-page__orbit { position:absolute; top:50%; left:50%; border:1px solid var(--dg-orbit-accent-soft); border-radius:50%; pointer-events:none; transform:translate(-50%,-50%) rotate(-16deg); }
body.theme-grid .dg-orbit-page__orbit--one { width:38%; height:28%; border-color:rgba(255,255,255,.25); }
body.theme-grid .dg-orbit-page__orbit--two { width:62%; height:46%; }
body.theme-grid .dg-orbit-page__orbit--three { width:84%; height:63%; border-style:dashed; opacity:.9; }
body.theme-grid .dg-orbit-page__core {
  position:absolute;
  top:51%;
  left:50%;
  z-index:4;
  display:grid;
  width:96px;
  height:96px;
  place-items:center;
  overflow:hidden;
  border:2px solid rgba(255,255,255,.84);
  border-radius:50%;
  color:#07121d;
  background:radial-gradient(circle at 35% 27%,#fff 0 4%,var(--dg-orbit-accent) 25%,#5abecf 66%,#17394c 100%);
  box-shadow:0 0 0 8px rgba(255,255,255,.04),0 0 36px var(--dg-orbit-accent-soft),inset -11px -12px 17px rgba(0,0,0,.25);
  transform:translate(-50%,-50%);
}
body.theme-grid .dg-orbit-page__core i { position:relative; z-index:2; font-size:1.8rem; text-shadow:0 1px 0 rgba(255,255,255,.44); }
body.theme-grid .dg-orbit-page__core::before,
body.theme-grid .dg-orbit-page__core::after { content:''; position:absolute; pointer-events:none; }
body.theme-grid .dg-orbit-page__core::before { inset:10px; border:1px solid rgba(255,255,255,.45); border-radius:50%; }
body.theme-grid .dg-orbit-page__core::after { width:140%; height:22px; bottom:3px; left:-20%; opacity:.72; border-radius:50%; background:rgba(4,25,38,.36); transform:rotate(-22deg); }
body.theme-grid .dg-orbit-page__planet {
  position:absolute;
  top:var(--dg-orbit-y,50%);
  left:var(--dg-orbit-x,50%);
  z-index:5;
  width:54px;
  height:54px;
  padding:0;
  overflow:visible;
  cursor:pointer;
  border:3px solid rgba(7,16,27,.96);
  border-radius:50%;
  outline:0;
  background:#0a121e;
  box-shadow:0 0 0 1px var(--dg-orbit-accent),0 8px 18px rgba(0,0,0,.42);
  transform:translate(-50%,-50%);
  transition:top .58s cubic-bezier(.22,.8,.2,1),left .58s cubic-bezier(.22,.8,.2,1),transform .18s ease,box-shadow .18s ease;
}
body.theme-grid .dg-orbit-page__planet img { display:block; width:100%; height:100%; border-radius:50%; object-fit:cover; }
body.theme-grid .dg-orbit-page__planet-halo { position:absolute; z-index:-1; inset:-7px; border:1px solid var(--dg-orbit-accent-soft); border-radius:50%; opacity:.45; }
body.theme-grid .dg-orbit-page__planet-label { position:absolute; left:50%; bottom:-25px; min-width:max-content; max-width:122px; overflow:hidden; padding:3px 7px; border:1px solid rgba(255,255,255,.17); border-radius:999px; color:#fff; background:rgba(5,12,19,.86); box-shadow:0 5px 14px rgba(0,0,0,.35); font-size:.63rem; font-weight:800; line-height:1.1; text-overflow:ellipsis; white-space:nowrap; opacity:0; pointer-events:none; transform:translate(-50%,3px); transition:opacity .18s ease,transform .18s ease; }
body.theme-grid .dg-orbit-page__planet:hover,
body.theme-grid .dg-orbit-page__planet:focus-visible,
body.theme-grid .dg-orbit-page__planet.is-selected { z-index:8; box-shadow:0 0 0 3px rgba(255,255,255,.3),0 0 0 7px var(--dg-orbit-accent-soft),0 12px 25px rgba(0,0,0,.5); transform:translate(-50%,-50%) scale(1.16); }
body.theme-grid .dg-orbit-page__planet:hover .dg-orbit-page__planet-label,
body.theme-grid .dg-orbit-page__planet:focus-visible .dg-orbit-page__planet-label,
body.theme-grid .dg-orbit-page__planet.is-selected .dg-orbit-page__planet-label { opacity:1; transform:translate(-50%,0); }
body.theme-grid .dg-orbit-page__flightdeck {
  position:absolute;
  right:28px;
  bottom:28px;
  z-index:12;
  width:min(360px,calc(100% - 56px));
  padding:19px;
  border:1px solid var(--dg-orbit-accent-soft);
  border-radius:19px;
  color:#fff;
  background:linear-gradient(140deg,rgba(15,26,39,.95),rgba(5,10,18,.92));
  box-shadow:0 20px 42px rgba(0,0,0,.46);
  backdrop-filter:blur(16px);
  opacity:0;
  transform:translateY(12px);
  transition:opacity .2s ease,transform .2s ease;
}
body.theme-grid .dg-orbit-page__flightdeck.is-open { opacity:1; transform:translateY(0); }
body.theme-grid .dg-orbit-page__deck-close { position:absolute; top:9px; right:9px; display:grid; width:30px; height:30px; place-items:center; cursor:pointer; border:0; border-radius:50%; color:#dce8ec; background:rgba(255,255,255,.1); }
body.theme-grid .dg-orbit-page__deck-close:hover,
body.theme-grid .dg-orbit-page__deck-close:focus-visible { color:#07121e; background:var(--dg-orbit-accent); outline:0; }
body.theme-grid .dg-orbit-page__deck-person { display:flex; align-items:center; gap:11px; min-width:0; padding-right:28px; }
body.theme-grid .dg-orbit-page__deck-person img { width:49px; height:49px; flex:0 0 49px; border:2px solid var(--dg-orbit-accent); border-radius:50%; object-fit:cover; }
body.theme-grid .dg-orbit-page__deck-person span { display:block; color:var(--dg-orbit-accent); font-size:.61rem; font-weight:900; letter-spacing:.12em; text-transform:uppercase; }
body.theme-grid .dg-orbit-page__deck-person strong { display:block; overflow:hidden; color:#fff; font-size:1.08rem; text-overflow:ellipsis; white-space:nowrap; }
body.theme-grid .dg-orbit-page__flightdeck p { margin:13px 0 15px; color:#c9d6dc; font-size:.81rem; }
body.theme-grid .dg-orbit-page__deck-actions { display:flex; gap:8px; }
body.theme-grid .dg-orbit-page__deck-actions .btn { flex:1; border-radius:11px; font-size:.75rem; font-weight:800; }
body.theme-grid .dg-orbit-page__deck-actions .btn-primary { border-color:var(--dg-orbit-accent); color:#07131d; background:var(--dg-orbit-accent); }
body.theme-grid .dg-orbit-page__deck-actions .btn-outline-light { border-color:rgba(255,255,255,.28); }
body.theme-grid .dg-orbit-page__roster { margin-top:14px; overflow:hidden; border:1px solid var(--grid-border); border-radius:17px; background:rgba(14,22,32,.62); }
body.theme-grid .dg-orbit-page__roster summary { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:16px 18px; cursor:pointer; color:#eaf5f8; font-weight:800; list-style:none; }
body.theme-grid .dg-orbit-page__roster summary::-webkit-details-marker { display:none; }
body.theme-grid .dg-orbit-page__roster summary span { display:inline-flex; align-items:center; gap:8px; }
body.theme-grid .dg-orbit-page__roster summary i { color:var(--dg-orbit-accent); }
body.theme-grid .dg-orbit-page__roster summary small { color:var(--grid-muted); font-size:.73rem; }
body.theme-grid .dg-orbit-page__roster[open] summary { border-bottom:1px solid var(--grid-border); background:rgba(255,255,255,.035); }
body.theme-grid .dg-orbit-page__members { display:grid; grid-template-columns:repeat(auto-fill,minmax(104px,1fr)); gap:10px; padding:14px; }
body.theme-grid .dg-orbit-page__member { display:grid; gap:7px; place-items:center; min-width:0; padding:10px 7px; border:1px solid rgba(255,255,255,.1); border-radius:13px; color:var(--grid-text); background:rgba(255,255,255,.025); text-decoration:none; transition:transform .16s ease,border-color .16s ease; }
body.theme-grid .dg-orbit-page__member:hover { border-color:var(--dg-orbit-accent); color:#fff; transform:translateY(-2px); }
body.theme-grid .dg-orbit-page__member img { width:51px; height:51px; border-radius:50%; object-fit:cover; }
body.theme-grid .dg-orbit-page__member span { max-width:100%; overflow:hidden; font-size:.72rem; font-weight:800; text-overflow:ellipsis; white-space:nowrap; }
body.theme-grid .dg-orbit-page__empty { padding:30px; text-align:center; color:var(--grid-muted); }

/* Every galaxy has a different shape language, not merely a color swap. */
body.theme-grid .dg-orbit-page__galaxy--rocket { --dg-orbit-accent:#bceefe; --dg-orbit-accent-soft:rgba(188,238,254,.3); background:radial-gradient(circle at 79% 43%,rgba(120,217,255,.23),transparent 23%),radial-gradient(circle at 23% 101%,rgba(162,113,255,.32),transparent 40%),linear-gradient(135deg,#11102e,#081524 63%,#162246); }
body.theme-grid .dg-orbit-page__galaxy--rocket .dg-orbit-page__atmosphere { background:linear-gradient(116deg,transparent 41%,rgba(162,112,255,.14) 43%,transparent 48%),radial-gradient(ellipse at 72% 56%,rgba(130,225,255,.22),transparent 29%); }
body.theme-grid .dg-orbit-page__galaxy--rocket .dg-orbit-page__core { border-radius:47% 53% 50% 50%; }
body.theme-grid .dg-orbit-page__galaxy--rocket .dg-orbit-page__core::before { inset:13px 33px; border-radius:42% 42% 50% 50%; background:rgba(255,255,255,.18); }

body.theme-grid .dg-orbit-page__galaxy--padded { --dg-orbit-accent:#8be9f4; --dg-orbit-accent-soft:rgba(139,233,244,.3); background:radial-gradient(circle at 78% 49%,rgba(76,219,245,.25),transparent 26%),linear-gradient(141deg,#0a2b38,#0c1828 62%,#21304f); }
body.theme-grid .dg-orbit-page__galaxy--padded .dg-orbit-page__atmosphere { background:repeating-linear-gradient(48deg,transparent 0 23px,rgba(157,247,255,.065) 24px 25px),repeating-linear-gradient(-42deg,transparent 0 23px,rgba(157,247,255,.055) 24px 25px); mask-image:radial-gradient(ellipse at 69% 55%,#000 0 43%,transparent 74%); }
body.theme-grid .dg-orbit-page__galaxy--padded .dg-orbit-page__core::before { inset:7px; border-radius:37% 63% 61% 39%; background:repeating-linear-gradient(45deg,rgba(255,255,255,.27) 0 2px,transparent 2px 8px); }
body.theme-grid .dg-orbit-page__galaxy--padded .dg-orbit-page__orbit--two { border-width:5px; border-color:rgba(141,236,247,.18); }

body.theme-grid .dg-orbit-page__galaxy--water { --dg-orbit-accent:#69d8ff; --dg-orbit-accent-soft:rgba(105,216,255,.3); background:radial-gradient(ellipse at 75% 52%,rgba(64,218,255,.29),transparent 26%),linear-gradient(135deg,#053651,#0c2253 58%,#191550); }
body.theme-grid .dg-orbit-page__galaxy--water .dg-orbit-page__atmosphere { background:repeating-radial-gradient(ellipse at 73% 54%,rgba(102,226,255,.18) 0 1px,transparent 2px 37px); opacity:.66; }
body.theme-grid .dg-orbit-page__galaxy--water .dg-orbit-page__orbit { border-radius:50%; transform:translate(-50%,-50%); }
body.theme-grid .dg-orbit-page__galaxy--water .dg-orbit-page__core::after { height:27px; background:rgba(2,39,73,.46); transform:rotate(0); }

body.theme-grid .dg-orbit-page__galaxy--stinker { --dg-orbit-accent:#d9ed78; --dg-orbit-accent-soft:rgba(217,237,120,.26); background:radial-gradient(circle at 73% 42%,rgba(220,238,108,.23),transparent 19%),radial-gradient(ellipse at 21% 100%,rgba(146,79,45,.38),transparent 48%),linear-gradient(135deg,#392513,#1c2517 62%,#25221b); }
body.theme-grid .dg-orbit-page__galaxy--stinker .dg-orbit-page__atmosphere { background:radial-gradient(circle at 68% 45%,rgba(210,239,103,.17) 0 8%,transparent 9% 15%,rgba(185,115,60,.16) 16% 25%,transparent 26%),radial-gradient(circle at 88% 63%,rgba(226,237,128,.14),transparent 23%); filter:blur(5px); }
body.theme-grid .dg-orbit-page__galaxy--stinker .dg-orbit-page__orbit { border-style:dotted; }
body.theme-grid .dg-orbit-page__galaxy--stinker .dg-orbit-page__core { border-radius:43% 57% 49% 51%; }

body.theme-grid .dg-orbit-page__galaxy--pup { --dg-orbit-accent:#ffc17c; --dg-orbit-accent-soft:rgba(255,193,124,.28); background:radial-gradient(circle at 73% 48%,rgba(255,184,103,.24),transparent 24%),linear-gradient(135deg,#4a241e,#1e1831 63%,#123444); }
body.theme-grid .dg-orbit-page__galaxy--pup .dg-orbit-page__atmosphere { background:radial-gradient(circle at 61% 27%,rgba(255,220,159,.23) 0 3px,transparent 4px),radial-gradient(circle at 69% 23%,rgba(255,220,159,.23) 0 3px,transparent 4px),radial-gradient(circle at 65% 19%,rgba(255,220,159,.23) 0 6px,transparent 7px),linear-gradient(116deg,transparent 45%,rgba(255,185,112,.13) 46% 47%,transparent 49%); }
body.theme-grid .dg-orbit-page__galaxy--pup .dg-orbit-page__orbit--three { border-width:3px; border-style:double; }
body.theme-grid .dg-orbit-page__galaxy--pup .dg-orbit-page__core::before { inset:19px; border:0; border-radius:42% 42% 48% 48%; background:rgba(255,255,255,.21); }

body.theme-grid .dg-orbit-page__galaxy--pride { --dg-orbit-accent:#ffb6df; --dg-orbit-accent-soft:rgba(255,182,223,.29); background:linear-gradient(137deg,#3f155b,#19467e 37%,#14675c 61%,#754033); }
body.theme-grid .dg-orbit-page__galaxy--pride .dg-orbit-page__atmosphere { background:linear-gradient(112deg,transparent 21%,rgba(255,141,204,.27) 38%,rgba(117,194,255,.25) 49%,rgba(126,255,190,.23) 61%,transparent 79%); filter:blur(17px); opacity:.7; }
body.theme-grid .dg-orbit-page__galaxy--pride .dg-orbit-page__orbit { border-color:rgba(255,255,255,.35); }
body.theme-grid .dg-orbit-page__galaxy--pride .dg-orbit-page__core { background:conic-gradient(from 30deg,#ff98ca,#f7d27d,#9ae5b3,#7ad0ff,#bb9bff,#ff98ca); }

body.theme-grid .dg-orbit-page__galaxy--pacifier { --dg-orbit-accent:#efbbff; --dg-orbit-accent-soft:rgba(239,187,255,.3); background:radial-gradient(circle at 72% 45%,rgba(241,183,255,.3),transparent 23%),linear-gradient(135deg,#321a4d,#132d52 63%,#143b46); }
body.theme-grid .dg-orbit-page__galaxy--pacifier .dg-orbit-page__atmosphere { background:radial-gradient(circle at 69% 37%,rgba(255,255,255,.22) 0 5px,transparent 6px),radial-gradient(circle at 80% 61%,rgba(235,184,255,.19) 0 9px,transparent 10px),radial-gradient(circle at 57% 72%,rgba(146,224,255,.17) 0 5px,transparent 6px); }
body.theme-grid .dg-orbit-page__galaxy--pacifier .dg-orbit-page__orbit--one { border-width:4px; border-color:rgba(239,187,255,.21); }
body.theme-grid .dg-orbit-page__galaxy--pacifier .dg-orbit-page__core::before { inset:21px 14px; border-radius:50% 50% 44% 44%; background:rgba(255,255,255,.25); }

body.theme-grid .dg-orbit-page__galaxy--caregiver { --dg-orbit-accent:#ffd47e; --dg-orbit-accent-soft:rgba(255,212,126,.27); background:radial-gradient(circle at 72% 46%,rgba(255,214,126,.22),transparent 23%),linear-gradient(135deg,#322316,#101f39 64%,#233c45); }
body.theme-grid .dg-orbit-page__galaxy--caregiver .dg-orbit-page__atmosphere { background:linear-gradient(62deg,transparent 39%,rgba(255,214,126,.2) 40% 43%,transparent 45%),linear-gradient(-53deg,transparent 58%,rgba(133,202,255,.15) 59% 61%,transparent 63%); }
body.theme-grid .dg-orbit-page__galaxy--caregiver .dg-orbit-page__orbit--one { border-width:3px; border-style:double; }

body.theme-grid .dg-orbit-page__galaxy.has-motion .dg-orbit-page__atmosphere { animation:dg-orbit-atmosphere 14s ease-in-out infinite alternate; }
body.theme-grid .dg-orbit-page__galaxy.has-motion .dg-orbit-page__orbit--three { animation:dg-orbit-ring 26s linear infinite; }
body.theme-grid .dg-orbit-page__galaxy.has-motion .dg-orbit-page__planet-halo { animation:dg-orbit-pulse 3.8s ease-in-out var(--dg-orbit-delay,0s) infinite; }
@keyframes dg-orbit-atmosphere { from { transform:translate3d(-1.5%,0,0) scale(1); } to { transform:translate3d(1.5%,-1%,0) scale(1.04); } }
@keyframes dg-orbit-ring { from { transform:translate(-50%,-50%) rotate(-16deg); } to { transform:translate(-50%,-50%) rotate(344deg); } }
@keyframes dg-orbit-pulse { 50% { opacity:.9; transform:scale(1.16); } }
@media (prefers-reduced-motion:reduce) { body.theme-grid .dg-orbit-page__galaxy *,body.theme-grid .dg-orbit-page__galaxy *::before,body.theme-grid .dg-orbit-page__galaxy *::after { animation:none !important; transition:none !important; } }
@media (max-width:920px) {
  body.theme-grid .dg-orbit-page__galaxy { grid-template-columns:1fr; min-height:0; }
  body.theme-grid .dg-orbit-page__copy { grid-column:1; padding:30px 28px 18px; }
  body.theme-grid .dg-orbit-page__constellation { grid-column:1; grid-row:2; min-height:440px; }
  body.theme-grid .dg-orbit-page__flightdeck { position:relative; right:auto; bottom:auto; grid-column:1; grid-row:3; width:auto; margin:0 20px 20px; }
}
@media (max-width:560px) {
  body.theme-grid .dg-orbit-page { padding-top:14px; }
  body.theme-grid .dg-orbit-page__galaxy { border-radius:19px; }
  body.theme-grid .dg-orbit-page__copy { padding:26px 19px 14px; }
  body.theme-grid .dg-orbit-page__copy h2 { font-size:2.05rem; }
  body.theme-grid .dg-orbit-page__controls { margin-top:17px; }
  body.theme-grid .dg-orbit-page__constellation { min-height:360px; }
  body.theme-grid .dg-orbit-page__planet { width:45px; height:45px; }
  body.theme-grid .dg-orbit-page__core { width:76px; height:76px; }
  body.theme-grid .dg-orbit-page__core i { font-size:1.45rem; }
  body.theme-grid .dg-orbit-page__flightdeck { margin:0 13px 13px; padding:16px; }
  body.theme-grid .dg-orbit-page__deck-actions { flex-direction:column; }
  body.theme-grid .dg-orbit-page__members { grid-template-columns:repeat(3,minmax(0,1fr)); }
}

/* ---- Profile-picture activity posts ---- */
body.theme-grid .post .dg-profile-picture-activity {
  margin-top: 12px;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #080b0e;
}

body.theme-grid .post .dg-profile-picture-activity__link {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #080b0e;
}

body.theme-grid .post .dg-profile-picture-activity img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
  margin: 0;
}

/* Compact icon controls keep the discovery card readable at every width. */
.dg-feed-people__actions .dg-feed-people__icon-btn.dg-btn {
  min-width: 0;
  padding: 8px;
  color: #fff !important;
}

.dg-feed-people__actions .dg-feed-people__action-icon,
.dg-feed-people__actions .dg-feed-people__action-icon svg {
  display: block;
  color: #fff !important;
  fill: currentColor !important;
}

/* ---- Nearby cards ---- */
body.theme-grid .nearby-grid-tile {
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  aspect-ratio: 3 / 4;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

body.theme-grid .nearby-grid-tile.is-online-user {
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.15);
}

body.theme-grid .nearby-grid-tile.is-stale-user {
  opacity: 0.55;
  filter: saturate(0.7);
}

body.theme-grid .nearby-grid-tile.is-stale-user:hover {
  opacity: 0.75;
}

body.theme-grid .nearby-grid-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.22);
}

body.theme-grid .nearby-grid-tile.is-placeholder .nearby-tile-avatar img {
  object-fit: contain;
  padding: 18%;
  background: #111;
}

body.theme-grid .nearby-tile-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  z-index: 4;
}

body.theme-grid .nearby-tile-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 0.6rem;
  backdrop-filter: blur(8px);
}

body.theme-grid .nearby-tile-display-name {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.theme-grid .nearby-tile-handle {
  font-size: 0.68rem;
  opacity: 0.72;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Default avatar (DG branded placeholder) ---- */
body.theme-grid .nearby-grid-tile.is-placeholder .nearby-tile-avatar::after,
body.theme-grid .grid-map-marker-wrap.is-placeholder .grid-map-marker__avatar {
  background-color: #111 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none'%3E%3Ccircle cx='32' cy='32' r='30' stroke='%23ffffff' stroke-opacity='0.25' stroke-width='2'/%3E%3Ctext x='32' y='38' text-anchor='middle' fill='%23ffffff' fill-opacity='0.7' font-family='system-ui,sans-serif' font-size='16' font-weight='700'%3EDG%3C/text%3E%3C/svg%3E") !important;
  background-size: cover !important;
  background-position: center !important;
}

body.theme-grid .nearby-grid-tile.is-placeholder .nearby-tile-avatar img {
  opacity: 0;
}

/* ---- Map markers (Sniffies-inspired) ---- */
.leaflet-div-icon.grid-map-marker-wrap,
.leaflet-div-icon.grid-map-cluster-wrap {
  background: transparent !important;
  border: none !important;
  overflow: visible !important;
}

.leaflet-div-icon.grid-map-marker-wrap {
  width: 48px !important;
  height: 48px !important;
}

.leaflet-div-icon.grid-map-marker-wrap--you {
  width: 48px !important;
  height: 58px !important;
}

.dg-map-marker {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 48px;
  box-sizing: border-box;
}

.dg-map-marker__ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid transparent;
  pointer-events: none;
}

.dg-map-marker-online .dg-map-marker__ring {
  border-color: rgba(52, 211, 153, 0.65);
  animation: dg-marker-pulse 1.8s ease-in-out infinite;
}

.dg-map-marker-recent .dg-map-marker__ring {
  border-color: rgba(255, 255, 255, 0.35);
  animation: dg-marker-breathe 3s ease-in-out infinite;
}

.dg-map-marker-stale {
  opacity: 0.45;
  filter: saturate(0.65);
}

.dg-map-marker__avatar {
  display: block;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px;
  min-height: 44px;
  max-width: 44px;
  max-height: 44px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  object-position: center center;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  background: #111;
}

.dg-map-marker-you .dg-map-marker__avatar {
  width: 48px;
  height: 48px;
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25), 0 6px 18px rgba(0, 0, 0, 0.5);
}

.dg-map-marker__you-label {
  margin-top: 2px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dg-map-marker__badges {
  position: absolute;
  bottom: -2px;
  right: -2px;
  display: flex;
  gap: 2px;
}

.dg-map-marker__badge {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes dg-marker-pulse {
  0%, 100% { transform: scale(0.92); opacity: 0.5; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes dg-marker-breathe {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.75; }
}

@media (prefers-reduced-motion: reduce) {
  .dg-map-marker-online .dg-map-marker__ring,
  .dg-map-marker-recent .dg-map-marker__ring {
    animation: none;
  }
}

/* ---- Map empty state (card only — do not paint over tiles) ---- */
.grid-map-empty {
  position: absolute;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: transparent;
  pointer-events: none;
}

.grid-map-empty.x-hidden {
  display: none !important;
}

.grid-map-empty__card {
  max-width: 340px;
  text-align: center;
  padding: 28px 22px;
  border-radius: 18px;
  background: rgba(12, 12, 12, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}

.grid-map-empty__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.grid-map-empty__sub {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.88rem;
  margin-bottom: 18px;
  line-height: 1.45;
}

.grid-map-empty__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---- Profile tray (conversion point) ---- */
body.theme-grid .nearby-tray-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

body.theme-grid .nearby-tray-actions .js_tray-message {
  grid-column: 1 / -1;
}

body.theme-grid .nearby-tray-actions .js_tray-pat {
  grid-column: 1 / -1;
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  color: #fff !important;
  font-weight: 700;
}

body.theme-grid .nearby-tray-actions .js_tray-profile {
  grid-column: 1 / -1;
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: rgba(255, 255, 255, 0.85) !important;
}

/* ---- Suggested people discovery actions ---- */
.dg-feed-people__actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 8px 10px;
}

.dg-feed-people__actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.dg-feed-people__btn {
  display: block;
  width: 100%;
  padding: 7px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
}

.dg-feed-people__btn--primary {
  grid-column: 1 / -1;
  background: #fff;
  color: #000;
  border-color: #fff;
}

.dg-feed-people__btn--pat {
  grid-column: 1 / -1;
}

body.theme-grid.page-messages .chat-form,
body.theme-grid.page-messages .panel-messages .card-footer,
body.theme-grid.page-messages .conversation-body + .publisher {
  padding-bottom: calc(var(--dg-nav-height) + var(--dg-safe-bottom)) !important;
}

body.theme-grid.page-messages .chat-widget {
  bottom: calc(var(--dg-nav-height) + var(--dg-safe-bottom) + 8px) !important;
}

/* ---- Profile quick actions bar ---- */
body.theme-grid.page-profile .profile-buttons-wrapper {
  background: rgba(8, 8, 8, 0.92) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 16px !important;
  margin-top: 0 !important;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
}

body.theme-grid.page-profile .profile-buttons-wrapper .btn-primary {
  font-weight: 700;
}

body.theme-grid.page-profile .profile-name-wrapper {
  margin-bottom: 0 !important;
}

body.theme-grid.page-profile .dg-profile-badge-bar {
  padding: 8px 16px 0;
  margin-top: -4px;
}

body.theme-grid.page-profile .profile-header .profile-avatar-wrapper {
  z-index: 2;
}

body.theme-grid.page-profile .profile-header .profile-cover-wrapper {
  min-height: 120px !important;
  max-height: 180px !important;
}

/* The desktop avatar is 200px; reserve enough header height for the entire
   circle instead of clipping it at the cover boundary. */
@media (min-width: 992px) {
  body.theme-grid.page-profile .profile-header .profile-cover-wrapper {
    min-height: 260px !important;
    max-height: 260px !important;
  }
}

@media (max-width: 991px) {
  body.theme-grid.page-profile .profile-header .profile-cover-wrapper {
    min-height: 80px !important;
    max-height: 120px !important;
  }
}

/* ---- Location panel copy ---- */
body.theme-grid .grid-filter-privacy-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.65);
}

/* ---- Discovery filter pills ---- */
.dg-filter-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.dg-filter-section__title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.dg-filter-clear {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0;
}

.dg-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dg-filter-pill {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.dg-filter-pill:hover {
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.dg-filter-pill.is-active,
.dg-filter-pill-active {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.dg-filter-pill.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* Mobile filter drawer */
.dg-mobile-filters {
  padding: 0 12px 10px;
}

.dg-mobile-filters__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}

.dg-mobile-filters__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-size: 0.65rem;
}

.dg-mobile-filters__drawer {
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Map HUD — Sniffies-style overlay ON the map */
.dg-map-hud,
.grid-map-hud--overlay {
  z-index: 1000;
}

.dg-map-hud {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.dg-map-hud__left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 140px);
  pointer-events: auto;
}

.dg-map-hud__icons {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
  flex-shrink: 0;
}

.grid-map-hud--bottom {
  top: auto;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  left: 10px;
  right: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  max-width: calc(100vw - 20px);
}

.dg-map-mode-toggle {
  display: inline-flex;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 12, 18, 0.88);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.dg-map-mode-btn {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 9px 12px;
  line-height: 1;
  cursor: pointer;
}

.dg-map-mode-btn.is-active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.dg-map-mode-btn--ghost {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 12, 18, 0.88);
  padding: 8px 12px;
}

.dg-map-radius-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 12, 18, 0.88);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  margin: 0;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.dg-map-radius-pill__prefix {
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
}

.dg-map-radius-pill__select {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.dg-map-radius-pill__label {
  white-space: nowrap;
}

.dg-map-explore-status,
.dg-map-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 12, 18, 0.88);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.dg-map-status-pill.is-loading .js_dg-map-status-text::after {
  content: '…';
}

.dg-map-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 12, 18, 0.88);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.dg-map-icon-btn:hover {
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
}

.grid-map-hud__mode {
  display: inline-flex;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 8, 8, 0.82);
  backdrop-filter: blur(8px);
}

.grid-map-hud__mode-btn {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 7px 10px;
  line-height: 1;
}

.grid-map-hud__mode-btn.is-active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.grid-map-hud__mode-btn:hover {
  color: #fff;
}

.grid-map-hud__explore-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.65);
  padding: 0 4px;
  white-space: nowrap;
}

.grid-map-hud__btn--text {
  width: auto;
  min-width: 0;
  padding: 7px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 999px;
}

/* Sniffies-style Cruise This Area (bottom center) */
.dg-map-search-area {
  position: absolute;
  left: 50%;
  bottom: calc(148px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 1100;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #111;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  pointer-events: auto;
  cursor: pointer;
}

.dg-map-search-area:hover {
  background: #fff;
  border-color: #fff;
  color: #111;
}

.dg-map-search-area.x-hidden {
  display: none !important;
  pointer-events: none;
}

.dg-map-search-area .fa {
  color: #111;
  opacity: 0.95;
}

.dg-map-cluster--server {
  min-width: 48px;
  min-height: 48px;
}

.dg-map-cluster--server .dg-map-cluster__rings {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.dg-map-cluster--server .dg-map-cluster__ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.28);
  animation: dg-cluster-pulse 2.6s ease-out infinite;
}

.dg-map-cluster--server .dg-map-cluster__ring--delay {
  animation-delay: 1.3s;
}

.dg-map-cluster--server.dg-map-cluster--online .dg-map-cluster__ring {
  border-color: rgba(52, 211, 153, 0.5);
}

@keyframes dg-cluster-pulse {
  0% {
    transform: scale(0.88);
    opacity: 0.85;
  }
  100% {
    transform: scale(1.75);
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .dg-map-hud {
    left: 8px;
    right: 72px;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }

  .dg-map-hud__left {
    max-width: 100%;
  }

  .dg-map-mode-btn,
  .dg-map-radius-pill,
  .dg-map-explore-status {
    font-size: 0.68rem;
    padding: 8px 10px;
  }

  .dg-map-icon-btn {
    width: 40px;
    height: 40px;
  }

  .dg-map-search-area {
    bottom: calc(132px + env(safe-area-inset-bottom, 0px));
    max-width: calc(100vw - 88px);
    font-size: 0.78rem;
    padding: 9px 14px;
  }
}

/* ---- Dedicated /map fullscreen: tiles fill viewport, no black overlay ---- */
body.theme-grid.nearby-map-mode .grid-map-panel--fullscreen {
  background: transparent !important;
}

body.theme-grid.nearby-map-mode .grid-map-wrap--fullscreen,
body.theme-grid.page-map .grid-map-wrap--fullscreen {
  display: grid;
  grid-template-areas: "map";
  grid-template-rows: 1fr;
  grid-template-columns: 1fr;
  position: relative;
  width: 100%;
  height: calc(100dvh - var(--dg-header-height, 70px) - var(--dg-nav-height, 56px));
  min-height: calc(100dvh - var(--dg-header-height, 70px) - var(--dg-nav-height, 56px));
  overflow: hidden;
  background: #0f1e35;
}

body.theme-grid.nearby-map-mode .grid-map-wrap--fullscreen .grid-map-stage,
body.theme-grid.nearby-map-mode .grid-map-wrap--fullscreen .grid-map-overlays,
body.theme-grid.page-map .grid-map-wrap--fullscreen .grid-map-stage,
body.theme-grid.page-map .grid-map-wrap--fullscreen .grid-map-overlays {
  grid-area: map;
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body.theme-grid.nearby-map-mode .grid-map-wrap--fullscreen .grid-map-stage,
body.theme-grid.page-map .grid-map-wrap--fullscreen .grid-map-stage {
  z-index: 1;
  isolation: isolate;
}

body.theme-grid.page-map .grid-map-wrap--fullscreen .grid-map-overlays,
body.theme-grid.nearby-map-mode .grid-map-wrap--fullscreen .grid-map-overlays {
  z-index: 3;
  pointer-events: none;
  overflow: visible;
  background: transparent !important;
}

body.theme-grid.nearby-map-mode .grid-map-wrap--fullscreen .grid-map-overlays > * {
  pointer-events: auto;
}

/* Leaflet host — #js_grid-map is canonical; #js-grid-map supported for legacy DOM */
body.theme-grid.page-map .grid-map-wrap--fullscreen .grid-map-stage,
body.theme-grid.nearby-map-mode .grid-map-wrap--fullscreen .grid-map-stage,
body.theme-grid .nearby-page--map-only .grid-map-wrap--fullscreen .grid-map-stage {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 520px !important;
}

body.theme-grid.page-map #js_grid-map,
body.theme-grid.page-map #js-grid-map,
body.theme-grid.page-map .grid-map-wrap--fullscreen .leaflet-container,
body.theme-grid.nearby-map-mode #js_grid-map,
body.theme-grid.nearby-map-mode #js-grid-map,
body.theme-grid.nearby-map-mode .grid-map-wrap--fullscreen .leaflet-container,
body.theme-grid .nearby-page--map-only #js_grid-map,
body.theme-grid .nearby-page--map-only #js-grid-map,
body.theme-grid .nearby-page--map-only .grid-map-wrap--fullscreen .leaflet-container {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 520px !important;
  background: #0f1e35;
}

@media (max-width: 768px) {
  body.theme-grid.page-map .dg-map-shell,
  body.theme-grid.nearby-map-mode .dg-map-shell,
  body.theme-grid .nearby-page--map-only .dg-map-shell {
    height: calc(100dvh - var(--dg-mobile-header-height, 76px) - var(--dg-bottom-nav-height, 86px) - var(--dg-safe-bottom, 0px));
    min-height: 420px;
  }

  body.theme-grid.page-map #js_grid-map,
  body.theme-grid.page-map #js-grid-map,
  body.theme-grid.page-map .grid-map-wrap--fullscreen .leaflet-container,
  body.theme-grid.nearby-map-mode #js_grid-map,
  body.theme-grid.nearby-map-mode #js-grid-map,
  body.theme-grid.nearby-map-mode .grid-map-wrap--fullscreen .leaflet-container,
  body.theme-grid .nearby-page--map-only #js_grid-map,
  body.theme-grid .nearby-page--map-only #js-grid-map,
  body.theme-grid .nearby-page--map-only .grid-map-wrap--fullscreen .leaflet-container,
  body.theme-grid.page-map .grid-map-wrap--fullscreen .grid-map-stage,
  body.theme-grid.nearby-map-mode .grid-map-wrap--fullscreen .grid-map-stage,
  body.theme-grid .nearby-page--map-only .grid-map-wrap--fullscreen .grid-map-stage {
    min-height: 420px !important;
  }
}

/* Bottom nav: hidden on desktop (top header nav); visible on mobile/tablet */
@media (min-width: 992px) {
  body.theme-grid .footer-bottom-bar.grid-bottom-nav {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  body.theme-grid.nearby-map-mode,
  body.theme-grid.page-map,
  body.theme-grid.page-grid {
    padding-bottom: 0 !important;
  }

  body.theme-grid.nearby-map-mode .dg-map-shell,
  body.theme-grid.page-map .dg-map-shell,
  body.theme-grid .nearby-page--map-only .dg-map-shell {
    height: calc(100vh - var(--dg-header-height, 74px));
    min-height: 520px;
  }

  body.theme-grid.nearby-map-mode .grid-map-wrap--fullscreen,
  body.theme-grid.page-map .grid-map-wrap--fullscreen {
    height: 100%;
    min-height: 100%;
  }
}

/* Mobile: bottom nav with Nearby / Map / Feed quick access */
@media (max-width: 991.98px) {
  body.theme-grid .footer-bottom-bar.grid-bottom-nav,
  body.theme-grid .footer-bottom-bar.grid-bottom-nav.x-hidden,
  body.theme-grid.nearby-map-mode .footer-bottom-bar.grid-bottom-nav,
  body.theme-grid.page-map .footer-bottom-bar.grid-bottom-nav,
  body.theme-grid.page-grid .footer-bottom-bar.grid-bottom-nav {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  body.theme-grid.nearby-map-mode .dg-map-shell,
  body.theme-grid.page-map .dg-map-shell,
  body.theme-grid .nearby-page--map-only .dg-map-shell {
    height: calc(100dvh - var(--dg-mobile-header-height, 56px) - var(--dg-bottom-nav-height, 56px) - var(--dg-safe-bottom, 0px));
  }

  body.theme-grid.nearby-map-mode .grid-map-wrap--fullscreen,
  body.theme-grid.page-map .grid-map-wrap--fullscreen {
    height: calc(100dvh - var(--dg-header-height, 56px) - var(--dg-nav-height, 56px) - var(--dg-safe-bottom, 0px));
    min-height: calc(100dvh - var(--dg-header-height, 56px) - var(--dg-nav-height, 56px) - var(--dg-safe-bottom, 0px));
  }

  body.theme-grid.nearby-map-mode .grid-map-wrap--fullscreen .dg-map-hud,
  body.theme-grid.page-map .grid-map-wrap--fullscreen .dg-map-hud {
    bottom: calc(var(--dg-nav-height, 56px) + 16px + env(safe-area-inset-bottom, 0px));
  }

  body.theme-grid.dg-chat-drawer-open .chat-widget.chat-box.dg-chat-from-discovery {
    bottom: calc(var(--dg-nav-height, 56px) + env(safe-area-inset-bottom, 0px));
    height: min(72dvh, calc(100dvh - var(--dg-header-height, 56px) - var(--dg-nav-height, 56px) - env(safe-area-inset-bottom, 0px) - 48px));
  }

  body.theme-grid.page-map .chat-box.dg-chat-from-discovery.dg-chat-minimized,
  body.theme-grid.nearby-map-mode .chat-box.dg-chat-from-discovery.dg-chat-minimized {
    bottom: calc(var(--dg-nav-height, 56px) + 88px + env(safe-area-inset-bottom, 0px));
  }
}

/* Desktop /map HUD position */
@media (min-width: 992px) {
  body.theme-grid.nearby-map-mode .grid-map-wrap--fullscreen .dg-map-hud,
  body.theme-grid.page-map .grid-map-wrap--fullscreen .dg-map-hud {
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    z-index: 1000;
  }
}

/* Hide legacy corner controls outside overlays — HUD has locate/refresh */
body.theme-grid.nearby-map-mode .grid-map-wrap--fullscreen > .grid-map-controls:not(.grid-map-controls--overlay) {
  display: none !important;
}

body.theme-grid.nearby-map-mode .grid-map-wrap--fullscreen .grid-map-empty {
  z-index: 600;
}

body.theme-grid.nearby-map-mode .grid-map-wrap--fullscreen .dg-map-filter-sheet {
  z-index: 1001;
}

body.theme-grid.nearby-map-mode .grid-map-wrap--fullscreen .grid-map-profile-strip {
  z-index: 1000;
}

@media (min-width: 992px) {
  body.theme-grid.nearby-map-mode .grid-map-wrap--fullscreen .dg-map-hud,
  body.theme-grid.page-map .grid-map-wrap--fullscreen .dg-map-hud {
    bottom: 24px;
    left: 24px;
    right: 24px;
  }
}

/* Right rail — locate + grid (Sniffies-style) */
.dg-map-rail {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.dg-map-rail__btn,
.dg-map-rail__link {
  pointer-events: auto;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 1.15rem;
  text-decoration: none;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
  cursor: pointer;
}

.dg-map-rail__btn:hover,
.dg-map-rail__link:hover {
  color: rgba(255, 255, 255, 0.85);
  transform: scale(1.06);
}

/* Leaflet zoom — Sniffies right-side stack */
body.theme-grid.page-map .grid-map-wrap--fullscreen .leaflet-top.leaflet-right,
body.theme-grid.nearby-map-mode .grid-map-wrap--fullscreen .leaflet-top.leaflet-right {
  top: auto;
  bottom: calc(50% + 60px);
  right: 6px;
  transform: none;
}

body.theme-grid.page-map .grid-map-wrap--fullscreen .leaflet-control-zoom,
body.theme-grid.nearby-map-mode .grid-map-wrap--fullscreen .leaflet-control-zoom {
  border: none;
  background: transparent;
  box-shadow: none;
  margin: 0;
}

body.theme-grid.page-map .grid-map-wrap--fullscreen .leaflet-control-zoom a,
body.theme-grid.nearby-map-mode .grid-map-wrap--fullscreen .leaflet-control-zoom a {
  background: transparent !important;
  border: none !important;
  color: #fff !important;
  font-size: 1.35rem !important;
  font-weight: 300 !important;
  width: 42px !important;
  height: 36px !important;
  line-height: 36px !important;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
}

body.theme-grid.page-map .grid-map-wrap--fullscreen .leaflet-control-zoom a:hover,
body.theme-grid.nearby-map-mode .grid-map-wrap--fullscreen .leaflet-control-zoom a:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px;
}

body.theme-grid.page-map .grid-map-wrap--fullscreen .leaflet-container,
body.theme-grid.nearby-map-mode .grid-map-wrap--fullscreen .leaflet-container,
body.theme-grid .nearby-page--map-only .grid-map-wrap--fullscreen .leaflet-container {
  overflow: hidden !important;
}

/* Marker pane must stay visible — overflow:hidden here clips all map pins */
body.theme-grid.page-map .grid-map-wrap--fullscreen .leaflet-marker-pane,
body.theme-grid.nearby-map-mode .grid-map-wrap--fullscreen .leaflet-marker-pane,
body.theme-grid .nearby-page--map-only .grid-map-wrap--fullscreen .leaflet-marker-pane {
  z-index: 650 !important;
  overflow: visible !important;
  pointer-events: auto !important;
}

body.theme-grid.page-map .grid-map-wrap--fullscreen .leaflet-overlay-pane,
body.theme-grid.nearby-map-mode .grid-map-wrap--fullscreen .leaflet-overlay-pane,
body.theme-grid .nearby-page--map-only .grid-map-wrap--fullscreen .leaflet-overlay-pane {
  overflow: visible !important;
}

body.theme-grid.page-map .leaflet-div-icon img,
body.theme-grid.nearby-map-mode .leaflet-div-icon img,
body.theme-grid.page-map .dg-map-marker__avatar,
body.theme-grid.nearby-map-mode .dg-map-marker__avatar,
body.theme-grid.page-map .grid-map-marker__avatar,
body.theme-grid.nearby-map-mode .grid-map-marker__avatar {
  display: block;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  object-fit: cover !important;
  object-position: center center !important;
  border-radius: 50% !important;
}

body.theme-grid.page-map .grid-map-profile-strip__item,
body.theme-grid.nearby-map-mode .grid-map-profile-strip__item,
body.theme-grid.page-map .dg-map-cruise-strip__item,
body.theme-grid.nearby-map-mode .dg-map-cruise-strip__item {
  display: block;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  overflow: hidden !important;
  line-height: 0;
  font-size: 0;
  background: #111;
  appearance: none;
  -webkit-appearance: none;
}

/* Mobile-only cruise row (Sniffies-style) — never on desktop */
@media (min-width: 992px) {
  body.theme-grid.page-map #js_map-profile-strip,
  body.theme-grid.nearby-map-mode #js_map-profile-strip,
  body.theme-grid.page-map .dg-map-cruise-strip,
  body.theme-grid.nearby-map-mode .dg-map-cruise-strip,
  body.theme-grid.page-map .grid-map-profile-strip,
  body.theme-grid.nearby-map-mode .grid-map-profile-strip {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
  }
}

@media (max-width: 991px) {
  body.theme-grid.nearby-map-mode .grid-map-profile-strip,
  body.theme-grid.page-map .grid-map-profile-strip,
  body.theme-grid.nearby-map-mode .dg-map-cruise-strip,
  body.theme-grid.page-map .dg-map-cruise-strip {
    position: absolute !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    top: auto !important;
    display: flex !important;
    align-items: center;
    max-width: min(92vw, 420px);
    max-height: 64px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: flex-start;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(8, 8, 8, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
    pointer-events: auto;
    contain: layout paint;
    z-index: 1000;
  }

  body.theme-grid.nearby-map-mode .grid-map-profile-strip__item,
  body.theme-grid.page-map .grid-map-profile-strip__item,
  body.theme-grid.nearby-map-mode .dg-map-cruise-strip__item,
  body.theme-grid.page-map .dg-map-cruise-strip__item {
    flex: 0 0 44px;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    margin-left: -8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  }

  body.theme-grid.nearby-map-mode .grid-map-profile-strip__item img,
  body.theme-grid.page-map .grid-map-profile-strip__item img,
  body.theme-grid.nearby-map-mode .dg-map-cruise-strip__item img,
  body.theme-grid.page-map .dg-map-cruise-strip__item img {
    display: block;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    object-fit: cover;
    object-position: center center;
    border-radius: 50%;
  }

  body.theme-grid.nearby-map-mode .grid-map-profile-strip__item:first-child,
  body.theme-grid.page-map .grid-map-profile-strip__item:first-child,
  body.theme-grid.nearby-map-mode .dg-map-cruise-strip__item:first-child,
  body.theme-grid.page-map .dg-map-cruise-strip__item:first-child {
    margin-left: 0;
  }
}

/* ---- Desktop map polish (≥992px) ---- */
@media (min-width: 992px) {
  body.theme-grid.nearby-map-mode .dg-map-page,
  body.theme-grid.page-map .dg-map-page {
    background: #0a0e14;
  }

  body.theme-grid .dg-map-status-pill {
    font-size: 0.82rem;
    padding: 10px 16px;
    letter-spacing: 0.01em;
  }

  body.theme-grid .dg-map-icon-btn {
    width: 46px;
    height: 46px;
    font-size: 1.05rem;
  }

  body.theme-grid.page-map .grid-map-wrap--fullscreen .leaflet-top.leaflet-right,
  body.theme-grid.nearby-map-mode .grid-map-wrap--fullscreen .leaflet-top.leaflet-right {
    right: 14px;
  }
}

body.theme-grid.page-map .nearby-tray.x-hidden,
body.theme-grid.nearby-map-mode .nearby-tray.x-hidden {
  display: none !important;
  visibility: hidden !important;
}

/* Safety: grid tiles must never appear on dedicated map view */
body.theme-grid.page-map .nearby-grid,
body.theme-grid.nearby-map-mode .nearby-grid,
body.theme-grid.page-map .nearby-grid-tile,
body.theme-grid.nearby-map-mode .nearby-grid-tile {
  display: none !important;
}

/* Profile drawer must overlay map — never participate in page document flow */
body.theme-grid.page-map .nearby-tray,
body.theme-grid.nearby-map-mode .nearby-tray {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2500 !important;
  pointer-events: none;
}

body.theme-grid.page-map .nearby-tray-content,
body.theme-grid.nearby-map-mode .nearby-tray-content {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  max-height: 92vh;
}

@media (min-width: 768px) {
  body.theme-grid.page-map .nearby-tray-content,
  body.theme-grid.nearby-map-mode .nearby-tray-content {
    left: 50% !important;
    right: auto !important;
    width: min(440px, 100%);
    transform: translate(-50%, 100%);
  }

  body.theme-grid.page-map .nearby-tray:not(.x-hidden) .nearby-tray-content,
  body.theme-grid.nearby-map-mode .nearby-tray:not(.x-hidden) .nearby-tray-content {
    transform: translate(-50%, 0);
  }
}

.dg-map-filter-sheet {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(120px + env(safe-area-inset-bottom, 0px));
  z-index: 1001;
  max-height: 52vh;
  overflow: hidden;
  padding: 0;
  border-radius: 14px;
  background: rgba(8, 12, 20, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
}

.dg-map-filter-sheet.x-hidden {
  display: none !important;
}

.dg-filter-drawer {
  display: flex;
  flex-direction: column;
  max-height: inherit;
  min-height: 0;
}

.dg-filter-drawer__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dg-filter-drawer__title {
  font-weight: 700;
  font-size: 0.95rem;
  flex: 1;
}

.dg-filter-drawer__close {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.75);
  padding: 4px 8px;
}

.dg-filter-drawer__body {
  overflow: auto;
  padding: 10px 14px 12px;
  flex: 1;
}

.dg-filter-drawer__foot {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.dg-filter-group {
  margin-bottom: 10px;
}

.dg-filter-group__title {
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 8px;
}

@media (min-width: 992px) {
  .dg-map-filter-sheet {
    position: fixed;
    left: 0;
    top: var(--dg-header-height, 74px);
    bottom: 0;
    right: auto;
    width: min(340px, 34vw);
    max-height: none;
    border-radius: 0;
    border-left: 0;
    border-top: 0;
    border-bottom: 0;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.35);
  }

  body.theme-grid.nearby-map-mode .dg-map-filter-sheet:not(.x-hidden) ~ .grid-map-stage,
  body.theme-grid.page-map .dg-map-filter-sheet:not(.x-hidden) {
    /* map stays visible to the right */
  }
}

/* Legacy top filter bar removed from map HUD */
.grid-map-hud--filters {
  display: none !important;
}

/* ---- Badge chips ---- */
.dg-badge,
body.theme-grid .dg-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
}

.dg-badge-looking { border-color: rgba(52, 211, 153, 0.35); color: #6ee7b7; }
.dg-badge-padded { border-color: rgba(96, 165, 250, 0.35); color: #93c5fd; }
.dg-badge-host { border-color: rgba(251, 191, 36, 0.35); color: #fcd34d; }
.dg-badge-travel { border-color: rgba(167, 139, 250, 0.35); color: #c4b5fd; }
.dg-badge-abdl,
.dg-badge-dl,
.dg-badge-diaper-boy,
.dg-badge-daddy,
.dg-badge-creator,
.dg-badge-friends { border-color: rgba(255, 255, 255, 0.2); }
.dg-badge-video { border-color: rgba(248, 113, 113, 0.35); color: #fca5a5; }
.dg-badge-reels { border-color: rgba(244, 114, 182, 0.35); color: #f9a8d4; }
.dg-badge-photos { border-color: rgba(255, 255, 255, 0.22); }
.dg-badge-more { opacity: 0.75; }

.nearby-tile-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.nearby-tile-chip-row .dg-badge {
  font-size: 0.55rem;
  padding: 2px 6px;
}

.nearby-tray-badges,
.nearby-tray-media {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 4px;
}

.dg-media-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.75);
}

/* Profile badge bar */
.dg-profile-badge-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 12px;
}

/* Profile edit intent toggles */
.dg-profile-intent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 768px) {
  .dg-profile-intent-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.dg-intent-toggle {
  display: block;
  margin: 0;
  cursor: pointer;
}

.dg-intent-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.dg-intent-toggle__card {
  display: block;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dg-intent-toggle__card strong {
  display: block;
  font-size: 0.85rem;
}

.dg-intent-toggle__card small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
}

.dg-intent-toggle input:checked + .dg-intent-toggle__card {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
}

/* Suggested people badges */
.dg-feed-people__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

/* Map clusters */
.grid-map-cluster-wrap {
  background: transparent !important;
  border: 0 !important;
}

.dg-map-cluster {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 16, 24, 0.94);
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5), 0 0 14px rgba(255, 255, 255, 0.08);
}

.dg-map-cluster--size-lg {
  width: 58px;
  height: 58px;
}

.dg-map-cluster--size-xl {
  width: 68px;
  height: 68px;
}

.dg-map-cluster--online {
  border-color: rgba(52, 211, 153, 0.75);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.25);
}

.dg-map-cluster--recent {
  border-color: rgba(255, 255, 255, 0.4);
}

.dg-map-cluster__count {
  position: relative;
  z-index: 2;
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.dg-map-cluster--size-lg .dg-map-cluster__count {
  font-size: 1rem;
}

.dg-map-cluster--size-xl .dg-map-cluster__count {
  font-size: 1.12rem;
}

.dg-map-marker__badge--online {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.6);
}

.dg-map-marker__intent {
  position: absolute;
  bottom: -2px;
  right: -2px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  font-size: 0.55rem;
  line-height: 14px;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .dg-map-marker-online .dg-map-marker__ring,
  .dg-map-marker-recent .dg-map-marker__ring {
    animation: none !important;
  }
}

/* Settings — Map Visibility / Antarctica Mode */
body.theme-grid .dg-map-privacy-card__icon {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0.5rem;
}

body.theme-grid .dg-map-privacy-card__title {
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--grid-text, #fff);
}

body.theme-grid .dg-map-privacy-card__fun {
  font-size: 0.85rem;
}

/* Discovery chat drawer — reuse Sngine chat_box on Map/Nearby/Feed */
body.theme-grid.page-map.dg-chat-drawer-open::before,
body.theme-grid.nearby-map-mode.dg-chat-drawer-open::before {
  display: none;
}

body.theme-grid.dg-chat-drawer-open::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1190;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  pointer-events: none;
}

body.theme-grid.dg-chat-drawer-open .chat-widget.chat-box.dg-chat-from-discovery {
  display: block !important;
  z-index: 1200;
  pointer-events: auto;
}

body.theme-grid .chat-box.dg-chat-from-discovery.dg-chat-minimized {
  max-height: none;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

body.theme-grid .chat-box.dg-chat-from-discovery.dg-chat-minimized .chat-widget-content {
  display: none !important;
}

body.theme-grid .chat-box.dg-chat-from-discovery.dg-chat-minimized .chat-widget-head {
  border-radius: 999px;
  border-bottom: none;
  min-height: 48px;
  padding: 8px 12px;
  cursor: pointer;
}

body.theme-grid .chat-box.dg-chat-from-discovery .js_dg-chat-minimize {
  opacity: 0.85;
}

body.theme-grid .chat-box.dg-chat-from-discovery .js_dg-chat-minimize:hover {
  opacity: 1;
}

body.theme-grid.dg-chat-drawer-open .chat-widget.chat-box.dg-chat-from-discovery .chat-widget-content {
  display: flex !important;
  flex-direction: column;
}

body.theme-grid.dg-chat-drawer-open .chat-widget.chat-box.dg-chat-from-discovery .js_scroller {
  flex: 1 1 auto;
  min-height: 120px;
  overflow-y: auto;
}

@media (max-width: 991px) {
  body.theme-grid.dg-chat-drawer-open .chat-widget.chat-box.dg-chat-from-discovery {
    left: 0;
    right: 0;
    bottom: calc(var(--dg-nav-height, 56px) + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-width: none;
    height: min(72dvh, calc(100dvh - var(--dg-nav-height, 56px) - env(safe-area-inset-bottom, 0px) - 48px));
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.55);
  }

  body.theme-grid.page-map .chat-box.dg-chat-from-discovery.dg-chat-minimized,
  body.theme-grid.nearby-map-mode .chat-box.dg-chat-from-discovery.dg-chat-minimized {
    left: 12px;
    right: auto;
    bottom: calc(var(--dg-nav-height, 56px) + 88px + env(safe-area-inset-bottom, 0px));
    width: auto;
    min-width: 180px;
    max-width: min(260px, calc(100vw - 24px));
    height: auto;
    border-radius: 999px;
  }

  body.theme-grid.dg-chat-drawer-open .chat-widget.chat-box.dg-chat-from-discovery .chat-widget-content {
    max-height: calc(100% - 60px);
  }

  body.theme-grid.dg-chat-drawer-open .chat-widget.chat-box.dg-chat-from-discovery .chat-form {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

@media (min-width: 992px) {
  body.theme-grid.dg-chat-drawer-open .chat-widget.chat-box.dg-chat-from-discovery {
    right: 72px;
    bottom: 16px;
    width: 360px;
    max-height: min(560px, calc(100dvh - 96px));
  }

  /* Map: keep chat left so pins, zoom, and profile rail stay clear */
  body.theme-grid.page-map.dg-chat-drawer-open .chat-widget.chat-box.dg-chat-from-discovery,
  body.theme-grid.nearby-map-mode.dg-chat-drawer-open .chat-widget.chat-box.dg-chat-from-discovery {
    left: 24px;
    right: auto;
    bottom: 88px;
    width: min(340px, calc(100vw - 200px));
    max-height: min(480px, calc(100dvh - 180px));
  }

  body.theme-grid.page-map .chat-box.dg-chat-from-discovery.dg-chat-minimized,
  body.theme-grid.nearby-map-mode .chat-box.dg-chat-from-discovery.dg-chat-minimized {
    width: auto;
    min-width: 200px;
    max-width: min(280px, calc(100vw - 48px));
  }

  body.theme-grid.dg-chat-drawer-open .chat-widget.chat-box.dg-chat-from-discovery .chat-widget-content {
    max-height: calc(100% - 60px);
  }
}



/* ==== DG Nearby Grindr cards 2026-08-01 ==== */
/* One full-bleed photo tile; @handle only; dense mobile grid */
body.theme-grid .nearby-grid {
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
  padding: 10px 10px 24px;
}
body.theme-grid .nearby-grid-tile {
  position: relative !important;
  aspect-ratio: 3 / 4 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  background: #0b0f16 !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  box-shadow: none !important;
  transform: none !important;
}
body.theme-grid .nearby-grid-tile:hover,
body.theme-grid .nearby-grid-tile.is-active {
  transform: translateY(-2px) !important;
  border-color: rgba(255,255,255,0.28) !important;
  box-shadow: 0 8px 22px rgba(0,0,0,0.35) !important;
}
body.theme-grid .nearby-grid-tile::before {
  display: none !important;
}
body.theme-grid .nearby-tile-avatar {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  z-index: 1 !important;
  background: #0b0f16;
}
body.theme-grid .nearby-tile-avatar img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center 18% !important;
  opacity: 1 !important;
  padding: 0 !important;
  filter: none !important;
  transform: none !important;
}
body.theme-grid .nearby-grid-tile.is-placeholder .nearby-tile-avatar img {
  object-fit: cover !important;
  padding: 0 !important;
  opacity: 0.35 !important;
}
body.theme-grid .nearby-grid-tile.is-placeholder .nearby-tile-avatar::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 0;
}
body.theme-grid .nearby-tile-overlay {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  top: auto !important;
  z-index: 3 !important;
  padding: 28px 8px 8px !important;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.45) 55%, rgba(0,0,0,0) 100%) !important;
  pointer-events: none;
}
body.theme-grid .nearby-tile-display-name,
body.theme-grid .nearby-tile-meta,
body.theme-grid .nearby-tile-chip-row,
body.theme-grid .nearby-tile-bio,
body.theme-grid .nearby-tile-name {
  display: none !important;
}
body.theme-grid .nearby-tile-distance {
  position: static !important;
  margin: 0 0 4px !important;
}
body.theme-grid .nearby-tile-handle-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
body.theme-grid .nearby-tile-handle {
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: #fff !important;
  opacity: 1 !important;
  line-height: 1.15 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
body.theme-grid .nearby-tile-age {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.78);
}
body.theme-grid .nearby-tile-badges {
  z-index: 4;
}
body.theme-grid .nearby-tray-avatar,
body.theme-grid .nearby-tray-avatar.x-hidden {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}
@media (max-width: 768px) {
  body.theme-grid .nearby-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
    padding: 8px 8px 20px !important;
  }
  body.theme-grid .nearby-grid-tile {
    aspect-ratio: 3 / 4 !important;
    border-radius: 8px !important;
  }
  body.theme-grid .nearby-tile-overlay {
    padding: 22px 6px 6px !important;
  }
  body.theme-grid .nearby-tile-handle {
    font-size: 0.7rem !important;
  }
  body.theme-grid .nearby-distance-badge {
    font-size: 9px !important;
    padding: 1px 5px !important;
  }
}
@media (min-width: 992px) {
  body.theme-grid .nearby-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    gap: 10px !important;
  }
}

/* ==== DG mobile filters one-sheet 2026-08-01 ==== */
/* Nearby grid: ONE filter UI on phone/PWA — hide sticky desktop sidebar */
@media (max-width: 991.98px) {
  body.theme-grid .grid-page--grid > .grid-page__body > .grid-filters,
  body.theme-grid .nearby-page.grid-page--grid .grid-filters {
    display: none !important;
  }

  body.theme-grid .grid-page--grid .grid-main {
    padding-top: 8px;
  }
}

/* Standalone PWA (narrow) — same consolidation */
@media (display-mode: standalone) and (max-width: 991.98px) {
  body.theme-grid .nearby-page.grid-page--grid .grid-filters {
    display: none !important;
  }
}

.dg-mobile-filters {
  position: sticky;
  top: calc(var(--dg-header-height, 56px) + env(safe-area-inset-top, 0px));
  z-index: 40;
  padding: 8px 10px 10px;
  background: linear-gradient(180deg, rgba(11, 15, 22, 0.96) 0%, rgba(11, 15, 22, 0.88) 70%, rgba(11, 15, 22, 0) 100%);
}

.dg-mobile-filters__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(20, 24, 34, 0.92);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.dg-mobile-filters__toggle[aria-expanded="true"] .dg-mobile-filters__chevron {
  transform: rotate(180deg);
}

.dg-mobile-filters__chevron {
  margin-left: auto;
  font-size: 0.75rem;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.dg-mobile-filters__count:not(.x-hidden) {
  margin-left: 0;
}

.dg-mobile-filters__sheet {
  position: fixed;
  inset: 0;
  z-index: 1080;
  pointer-events: none;
}

.dg-mobile-filters__sheet:not(.x-hidden) {
  pointer-events: auto;
}

.dg-mobile-filters__sheet.x-hidden,
.dg-mobile-filters__sheet[hidden] {
  display: none !important;
}

.dg-mobile-filters__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.dg-mobile-filters__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(78vh, 640px);
  display: flex;
  flex-direction: column;
  background: #12161f;
  border-radius: 18px 18px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: none;
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.45);
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}

.dg-mobile-filters__sheet.is-open .dg-mobile-filters__panel {
  transform: translateY(0);
}

.dg-mobile-filters__grabber {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  margin: 10px auto 4px;
  flex-shrink: 0;
}

.dg-mobile-filters__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px 10px;
  flex-shrink: 0;
}

.dg-mobile-filters__panel-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}

.dg-mobile-filters__close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dg-mobile-filters__panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 14px 12px;
}

.dg-mobile-filters__section {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dg-mobile-filters__section-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 8px;
}

.dg-mobile-filters__loc-btn {
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
}

.dg-mobile-filters__panel-foot {
  flex-shrink: 0;
  padding: 10px 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Inside mobile sheet, hide redundant drawer chrome from shared pills tpl */
.dg-mobile-filters__panel .dg-filter-drawer__head {
  display: none;
}

.dg-mobile-filters__panel .dg-filter-drawer {
  max-height: none;
}

body.dg-mobile-filters-open {
  overflow: hidden;
}
/* DiaperGuys: readable glass chat popups */
body.theme-grid .chat-widget.chat-box {
  background: rgba(13, 16, 21, 0.96) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.56) !important;
  backdrop-filter: blur(20px) saturate(120%);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
}
body.theme-grid .chat-widget.chat-box .chat-widget-head {
  background: rgba(20, 23, 29, 0.98) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}
body.theme-grid .chat-widget.chat-box .chat-widget-content,
body.theme-grid .chat-widget.chat-box .chat-conversations {
  background: rgba(11, 13, 17, 0.94) !important;
  color: rgba(255, 255, 255, 0.94) !important;
}
body.theme-grid .chat-widget.chat-box .chat-form {
  background: rgba(20, 23, 29, 0.98) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
}
body.theme-grid .chat-widget.chat-box .chat-form-message {
  background: rgba(255, 255, 255, 0.10) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
}
body.theme-grid .chat-widget.chat-box .chat-form-message::placeholder,
body.theme-grid .chat-widget.chat-box .conversation .time,
body.theme-grid .chat-widget.chat-box .conversation .translate {
  color: rgba(255, 255, 255, 0.68) !important;
}
/* The inner .text element is the message bubble. Keep the body transparent so
   translator and timestamp metadata never create a second rectangular bubble. */
body.theme-grid .chat-widget.chat-box .conversation .conversation-body {
  background: transparent !important;
  color: inherit !important;
}
body.theme-grid .chat-widget.chat-box .conversation-body .translate {
  clear: both;
  padding-top: 2px;
  line-height: 1.3;
}
/* DiaperGuys: readable photo lightbox */
body.theme-grid .lightbox {
  background: rgba(0, 0, 0, 0.93) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
body.theme-grid .lightbox-container,
body.theme-grid .lightbox-preview {
  background: #050607 !important;
}
body.theme-grid .lightbox-data {
  background: rgba(16, 19, 24, 0.98) !important;
  color: rgba(255, 255, 255, 0.94) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}
body.theme-grid .lightbox-data .post,
body.theme-grid .lightbox-data .post-footer,
body.theme-grid .lightbox-data .publisher,
body.theme-grid .lightbox-data .comment {
  background: transparent !important;
}


/* ==== DG profile header alignment — 2026-08-23 ====
   A profile without a cover should still look intentional, with one shared content baseline. */
@media (min-width: 768px) {
  body.theme-grid .profile-header .profile-cover-wrapper:not(:has(img)) {
    background:
      radial-gradient(75% 135% at 7% 105%, rgba(255, 255, 255, 0.08), transparent 58%),
      radial-gradient(55% 110% at 92% -10%, rgba(255, 255, 255, 0.05), transparent 62%),
      linear-gradient(135deg, #141414 0%, #070707 56%, #101010 100%);
  }

  body.theme-grid .profile-header .profile-cover-wrapper:not(:has(img))::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.12), transparent 48%, rgba(0, 0, 0, 0.25));
  }

  body.theme-grid .profile-header .profile-avatar-wrapper {
    top: auto !important;
    /* Keep the entire avatar above the header boundary and the profile tabs. */
    bottom: 24px !important;
  }

  body.theme-grid .profile-header .profile-name-wrapper {
    top: auto !important;
    bottom: 26px;
  }

  body.theme-grid .profile-header .profile-buttons-wrapper {
    top: auto !important;
    bottom: 22px;
  }
}

/* ==== DG Nearby discovery workspace 2026-09-07 ==== */
/* Dense profile browsing with DiaperGuys controls and one responsive filter surface. */
body.theme-grid .dg-nearby-discovery {
  --dg-nearby-accent: #ffffff;
  --dg-nearby-accent-strong: #ffffff;
  --dg-nearby-surface: #0b0f14;
  --dg-nearby-surface-2: #121820;
  --dg-nearby-border: rgba(255, 255, 255, 0.11);
  min-height: calc(100dvh - var(--dg-header-height, 74px));
  padding: 0 0 calc(var(--dg-page-pad-bottom, 72px) + 12px) !important;
  background:
    radial-gradient(circle at 8% -12%, rgba(255, 255, 255, 0.06), transparent 26rem),
    #050708;
}

body.theme-grid .dg-nearby-toolbar {
  position: sticky;
  top: var(--dg-header-height, 74px);
  z-index: 70;
  border-bottom: 1px solid var(--dg-nearby-border);
  background: rgba(5, 7, 8, 0.94);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
}

body.theme-grid .dg-nearby-toolbar__primary {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px clamp(12px, 2vw, 24px) 8px;
}

body.theme-grid .dg-nearby-toolbar__title-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

body.theme-grid .dg-nearby-toolbar__title {
  margin: 0;
  color: #fff;
  font-size: clamp(1.22rem, 2vw, 1.65rem);
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.025em;
}

body.theme-grid .dg-nearby-location-status {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(229, 238, 244, 0.64);
  font-size: 0.72rem;
  font-weight: 650;
  white-space: nowrap;
}

body.theme-grid .dg-nearby-location-status i {
  color: var(--dg-nearby-accent);
}

body.theme-grid .dg-nearby-location-status.is-updating i {
  animation: dg-nearby-spin 0.8s linear infinite;
}

body.theme-grid .dg-nearby-location-status.is-success {
  color: #e5e7eb;
}

body.theme-grid .dg-nearby-location-status.is-error {
  color: #fda4af;
}

body.theme-grid .dg-nearby-toolbar__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

body.theme-grid .dg-nearby-action {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0;
  padding: 0 13px;
  border: 1px solid var(--dg-nearby-border);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9) !important;
  background: rgba(255, 255, 255, 0.055);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1;
  text-decoration: none !important;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

body.theme-grid .dg-nearby-action:hover,
body.theme-grid .dg-nearby-action:focus-visible {
  border-color: rgba(255, 255, 255, 0.64);
  color: #fff !important;
  background: rgba(255, 255, 255, 0.12);
}

body.theme-grid .dg-nearby-action:disabled {
  opacity: 0.65;
  cursor: wait;
}

body.theme-grid .dg-nearby-action.is-loading i {
  animation: dg-nearby-spin 0.8s linear infinite;
}

body.theme-grid .dg-nearby-action--icon {
  width: 44px;
  padding: 0;
}

body.theme-grid .dg-nearby-filter-count {
  min-width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  color: #051012;
  background: var(--dg-nearby-accent);
  font-size: 0.65rem;
  font-weight: 900;
}

body.theme-grid .dg-nearby-quick-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 clamp(12px, 2vw, 24px) 10px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

body.theme-grid .dg-nearby-quick-filters::-webkit-scrollbar {
  display: none;
}

body.theme-grid .dg-nearby-quick-pill {
  min-height: 38px;
  flex: 0 0 auto;
  padding: 0 15px;
  border: 1px solid var(--dg-nearby-border);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  background: #13181e;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 750;
  cursor: pointer;
}

body.theme-grid .dg-nearby-quick-pill:hover,
body.theme-grid .dg-nearby-quick-pill:focus-visible {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

body.theme-grid .dg-nearby-quick-pill--nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none !important;
}

body.theme-grid .dg-nearby-quick-pill--nav i {
  color: var(--dg-nearby-accent);
}

body.theme-grid .dg-nearby-quick-pill.is-active,
body.theme-grid .dg-nearby-quick-pill.dg-filter-pill-active {
  border-color: var(--dg-nearby-accent);
  color: #061416;
  background: var(--dg-nearby-accent);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

body.theme-grid .dg-nearby-main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 3px;
}

body.theme-grid .dg-nearby-discovery #js_nearby-container {
  width: 100%;
}

body.theme-grid .dg-nearby-discovery .nearby-grid {
  width: 100%;
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)) !important;
  gap: 3px !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.theme-grid .dg-nearby-discovery .nearby-grid.x-hidden {
  display: none !important;
}

body.theme-grid .dg-nearby-discovery .nearby-grid-tile {
  min-width: 0;
  aspect-ratio: 3 / 4 !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: var(--dg-nearby-surface-2) !important;
  box-shadow: none !important;
  isolation: isolate;
  content-visibility: auto;
  contain-intrinsic-size: 190px 254px;
  transform: none !important;
}

body.theme-grid .dg-nearby-discovery .nearby-grid-tile:hover,
body.theme-grid .dg-nearby-discovery .nearby-grid-tile.is-active {
  border: 0 !important;
  box-shadow: inset 0 0 0 2px var(--dg-nearby-accent) !important;
  transform: none !important;
}

body.theme-grid .dg-nearby-discovery .nearby-grid-tile.is-stale-user {
  opacity: 1 !important;
  filter: none !important;
}

body.theme-grid .dg-nearby-discovery .nearby-grid-tile.is-stale-user:hover {
  opacity: 1 !important;
}

body.theme-grid .dg-nearby-discovery .nearby-grid-tile:focus-visible {
  z-index: 4;
  outline: 3px solid var(--dg-nearby-accent);
  outline-offset: -3px;
}

body.theme-grid .dg-nearby-discovery .nearby-tile-avatar img {
  object-position: center 20% !important;
  transition: transform 0.22s ease !important;
}

@media (hover: hover) and (pointer: fine) {
  body.theme-grid .dg-nearby-discovery .nearby-grid-tile:hover .nearby-tile-avatar img {
    transform: scale(1.025) !important;
  }
}

body.theme-grid .dg-nearby-discovery .nearby-tile-overlay {
  padding: 44px 10px 10px !important;
  background: linear-gradient(to top, rgba(2, 4, 6, 0.94) 0%, rgba(2, 4, 6, 0.55) 48%, transparent 100%) !important;
}

body.theme-grid .dg-nearby-discovery .nearby-tile-handle {
  font-size: 0.86rem !important;
  letter-spacing: -0.01em;
}

body.theme-grid .dg-nearby-discovery .nearby-tile-age {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.76rem;
}

body.theme-grid .dg-nearby-discovery .nearby-distance-badge {
  padding: 3px 7px !important;
  border: 0 !important;
  color: rgba(255, 255, 255, 0.82) !important;
  background: rgba(3, 6, 9, 0.66) !important;
  font-size: 0.65rem !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.theme-grid .dg-nearby-discovery .nearby-tile-badges {
  display: none !important;
}

body.theme-grid .dg-nearby-discovery .nearby-tile-badges .nearby-tile-badge:nth-child(n + 2) {
  display: none;
}

body.theme-grid .dg-nearby-discovery .nearby-tile-verified {
  color: #061416;
  background: var(--dg-nearby-accent);
}

body.theme-grid .dg-nearby-state-card {
  max-width: 620px;
  margin: 28px auto !important;
  border-color: var(--dg-nearby-border) !important;
  background: rgba(11, 15, 20, 0.9) !important;
}

/* Shared filter sheet: right drawer on desktop, bottom sheet on touch layouts. */
body.theme-grid .dg-nearby-filter-sheet {
  position: fixed;
  inset: var(--dg-header-height, 74px) 0 0;
  z-index: 1085;
}

body.theme-grid .dg-nearby-filter-sheet .dg-mobile-filters__backdrop {
  background: rgba(0, 0, 0, 0.54);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

body.theme-grid .dg-nearby-filter-sheet .dg-mobile-filters__panel {
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  width: min(390px, 100%);
  max-height: none;
  border: 0;
  border-left: 1px solid var(--dg-nearby-border);
  border-radius: 18px 0 0 18px;
  background: #0d1218;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.52);
  transform: translateX(100%);
}

body.theme-grid .dg-nearby-filter-sheet.is-open .dg-mobile-filters__panel {
  transform: translateX(0);
}

body.theme-grid .dg-nearby-filter-sheet .dg-mobile-filters__panel-head {
  min-height: 60px;
  padding: 10px 16px;
}

body.theme-grid .dg-nearby-filter-clear {
  min-height: 36px;
  margin-left: auto;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  color: var(--dg-nearby-accent);
  background: transparent;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

body.theme-grid .dg-nearby-filter-sheet .dg-mobile-filters__close {
  width: 44px;
  height: 44px;
}

body.theme-grid .dg-nearby-filter-sheet .dg-mobile-filters__panel-body {
  padding: 0 16px 16px;
}

body.theme-grid .dg-nearby-filter-sheet .dg-filter-drawer__head,
body.theme-grid .dg-nearby-filter-sheet .dg-filter-drawer__foot {
  display: none !important;
}

body.theme-grid .dg-nearby-filter-sheet .dg-filter-drawer {
  max-height: none;
}

body.theme-grid .dg-nearby-filter-sheet .dg-mobile-filters__panel-foot {
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(13, 18, 24, 0.96);
}

body.theme-grid .dg-nearby-filter-sheet .dg-mobile-filters__panel-foot .btn {
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  color: #071315;
  background: var(--dg-nearby-accent);
  font-weight: 850;
}

body.theme-grid .dg-nearby-location-card {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
}

body.theme-grid .dg-nearby-location-card__copy {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.76rem;
  line-height: 1.45;
}

body.theme-grid .dg-nearby-location-card .dg-mobile-filters__loc-btn {
  min-height: 46px;
  margin: 0 0 10px;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.1);
}

body.theme-grid .dg-nearby-visibility-toggle {
  min-height: 44px;
  margin: 0;
}

body.theme-grid .dg-nearby-filter-sheet .dg-filter-pill {
  min-height: 40px;
}

/* Profile details: centered discovery lightbox on desktop, familiar bottom sheet on mobile/PWA. */
@media (min-width: 992px) {
  body.theme-grid .dg-nearby-filter-sheet .dg-mobile-filters__grabber,
  body.theme-grid .nearby-tray .nearby-tray-grabber {
    display: none;
  }

  body.theme-grid .nearby-tray {
    top: var(--dg-header-height, 74px) !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: auto !important;
    height: auto !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(18px, 3vw, 42px);
    z-index: 2500 !important;
  }

  body.theme-grid .nearby-tray-backdrop {
    top: var(--dg-header-height, 74px) !important;
    right: 0 !important;
    background: rgba(0, 3, 8, 0.78) !important;
    backdrop-filter: blur(12px) saturate(82%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(82%) !important;
  }

  body.theme-grid .nearby-tray-content,
  body.theme-grid.page-map .nearby-tray-content,
  body.theme-grid.nearby-map-mode .nearby-tray-content {
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
    grid-template-rows: 58px minmax(0, 1fr);
    width: min(1220px, calc(100vw - 64px)) !important;
    height: min(780px, calc(100dvh - var(--dg-header-height, 74px) - 48px)) !important;
    max-width: 1220px !important;
    max-height: calc(100dvh - var(--dg-header-height, 74px) - 48px) !important;
    min-height: 520px;
    margin: auto;
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, 0.13) !important;
    border-radius: 24px !important;
    background: #0b1016 !important;
    box-shadow: 0 34px 100px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(255, 255, 255, 0.04) !important;
    opacity: 0;
    transform: translateY(18px) scale(0.975) !important;
    transition: opacity 0.2s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1) !important;
  }

  body.theme-grid .nearby-tray.is-open .nearby-tray-content,
  body.theme-grid.page-map .nearby-tray.is-open .nearby-tray-content,
  body.theme-grid.nearby-map-mode .nearby-tray.is-open .nearby-tray-content {
    opacity: 1;
    transform: translateY(0) scale(1) !important;
  }

  body.theme-grid .nearby-tray-hero {
    grid-column: 1;
    grid-row: 1 / -1;
    width: 100%;
    height: 100% !important;
    min-width: 0;
    min-height: 0 !important;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    background: #070a0e;
  }

  body.theme-grid .nearby-tray-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
  }

  body.theme-grid #js_nearby-tray .nearby-tray-hero::after {
    display: none !important;
  }

  body.theme-grid .nearby-tray-header {
    grid-column: 2;
    grid-row: 1;
    z-index: 4;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(11, 16, 22, 0.94);
  }

  body.theme-grid .nearby-tray-body {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 22px 26px 30px !important;
    scrollbar-color: rgba(255, 255, 255, 0.42) transparent;
    background: #0d1116;
  }

  body.theme-grid .nearby-tray-body::-webkit-scrollbar {
    width: 8px;
  }

  body.theme-grid .nearby-tray-body::-webkit-scrollbar-thumb {
    border: 2px solid #0b1016;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
  }

  body.theme-grid .nearby-tray-title-row h4 {
    font-size: clamp(1.45rem, 2vw, 1.9rem);
  }

  body.theme-grid .nearby-tray-name {
    margin-bottom: 18px;
  }

  body.theme-grid .nearby-tray-actions {
    position: sticky;
    top: -22px;
    z-index: 3;
    margin: 0 -4px 18px;
    padding: 12px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(180deg, #0b1016 72%, rgba(11, 16, 22, 0));
  }

  body.theme-grid .nearby-tray-actions .btn-primary {
    flex-basis: 100%;
    min-height: 50px;
    border-radius: 14px;
    font-size: 0.95rem;
  }

  body.theme-grid .nearby-tray-stats,
  body.theme-grid .nearby-tray .nearby-tray-stats-list {
    gap: 10px;
  }

  body.theme-grid .nearby-tray .nearby-stat-item {
    min-height: 66px;
    padding: 11px 13px;
    border-color: rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.045);
  }

  body.theme-grid .nearby-tray-section {
    margin: 18px 0;
  }

  body.theme-grid .nearby-tray-bio {
    border-color: rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.045);
  }
}

body.nearby-tray-open {
  overflow: hidden;
}

body.theme-grid .nearby-tile-avatar .nearby-online-dot,
body.theme-grid .dg-nearby-pat-card .nearby-online-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  bottom: auto;
  width: 12px;
  height: 12px;
  border: 2px solid #071015;
  border-radius: 50%;
  background: #20e37b;
  box-shadow: 0 0 0 2px rgba(32, 227, 123, 0.18), 0 0 14px rgba(32, 227, 123, 0.68);
  z-index: 8;
}

body.theme-grid .nearby-tray-online-text:not(.is-online) {
  display: none !important;
}

body.theme-grid .nearby-tray-online-text.is-online {
  display: inline-block !important;
  width: 11px;
  min-width: 11px;
  height: 11px;
  min-height: 11px !important;
  margin: 0 2px;
  border: 2px solid #071015;
  border-radius: 50%;
  background: #20e37b;
  box-shadow: 0 0 0 2px rgba(32, 227, 123, 0.16), 0 0 12px rgba(32, 227, 123, 0.58);
  font-size: 0;
}

body.theme-grid .dg-nearby-discovery #js_see-more {
  width: min(520px, calc(100% - 24px));
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 18px auto 28px !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08) !important;
}

body.theme-grid .dg-nearby-discovery #js_see-more:hover,
body.theme-grid .dg-nearby-discovery #js_see-more:focus-visible {
  border-color: rgba(255, 255, 255, 0.56) !important;
  background: rgba(255, 255, 255, 0.15) !important;
  transform: none;
}

/* Received Diaper Pats: centered gallery on desktop, bottom sheet on mobile. */
body.theme-grid .dg-nearby-pats-panel {
  position: fixed;
  inset: var(--dg-header-height, 74px) 0 0;
  z-index: 2600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 3vw, 42px);
}

body.theme-grid .dg-nearby-pats-panel.x-hidden {
  display: none !important;
}

body.theme-grid .dg-nearby-pats-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 3, 8, 0.78);
  backdrop-filter: blur(12px) saturate(82%);
  -webkit-backdrop-filter: blur(12px) saturate(82%);
}

body.theme-grid .dg-nearby-pats-dialog {
  position: relative;
  width: min(1040px, calc(100vw - 64px));
  height: min(760px, calc(100dvh - var(--dg-header-height, 74px) - 48px));
  max-height: calc(100dvh - var(--dg-header-height, 74px) - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 24px;
  color: #f5fbfc;
  background: #0b1016;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.72);
  opacity: 0;
  transform: translateY(18px) scale(0.975);
  transition: opacity 0.2s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

body.theme-grid .dg-nearby-pats-panel.is-open .dg-nearby-pats-dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

body.theme-grid .dg-nearby-pats-head {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(14, 20, 27, 0.96);
}

body.theme-grid .dg-nearby-pats-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

body.theme-grid .dg-nearby-pats-icon {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 14px;
  color: #071315;
  background: var(--dg-nearby-accent);
}

body.theme-grid .dg-nearby-pats-heading h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

body.theme-grid .dg-nearby-pats-heading p {
  margin: 2px 0 0;
  color: rgba(230, 241, 244, 0.64);
  font-size: 0.79rem;
}

body.theme-grid .dg-nearby-pats-close {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.06);
}

body.theme-grid .dg-nearby-pats-body {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px;
}

body.theme-grid .dg-nearby-pats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

body.theme-grid .dg-nearby-pat-card {
  position: relative;
  min-width: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  background: #101720;
  cursor: pointer;
}

body.theme-grid .dg-nearby-pat-card:hover,
body.theme-grid .dg-nearby-pat-card:focus-visible {
  border-color: rgba(255, 255, 255, 0.58);
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.16);
}

body.theme-grid .dg-nearby-pat-card > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 18%;
}

body.theme-grid .dg-nearby-pat-overlay {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 36px 10px 10px;
  text-align: left;
  background: linear-gradient(to top, rgba(2, 4, 6, 0.94), rgba(2, 4, 6, 0));
}

body.theme-grid .dg-nearby-pat-label {
  color: var(--dg-nearby-accent);
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.theme-grid .dg-nearby-pat-name {
  overflow: hidden;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.theme-grid .dg-nearby-pat-name small {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.72rem;
}

body.theme-grid .dg-nearby-pat-verified {
  position: absolute;
  top: 9px;
  left: 9px;
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #071315;
  background: var(--dg-nearby-accent);
  z-index: 8;
}

body.theme-grid .dg-nearby-pats-loading,
body.theme-grid .dg-nearby-pats-empty {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: rgba(230, 241, 244, 0.66);
  text-align: center;
}

body.theme-grid .dg-nearby-pats-empty > i {
  color: var(--dg-nearby-accent);
  font-size: 1.8rem;
}

body.theme-grid .dg-nearby-pats-empty strong {
  color: #fff;
  font-size: 1rem;
}

body.theme-grid .dg-nearby-pats-empty span {
  max-width: 320px;
  font-size: 0.82rem;
}


/* Pats modal: loading, empty, error, and the list are mutually exclusive. */
body.theme-grid .dg-nearby-pats-error {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: rgba(230, 241, 244, 0.78);
  text-align: center;
  padding: 24px 16px;
}

body.theme-grid .dg-nearby-pats-error strong {
  max-width: 360px;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}

body.theme-grid .dg-nearby-pats-loading.x-hidden,
body.theme-grid .dg-nearby-pats-empty.x-hidden,
body.theme-grid .dg-nearby-pats-error.x-hidden,
body.theme-grid .dg-nearby-pats-grid.x-hidden,
body.theme-grid .dg-nearby-pats-foot.x-hidden {
  display: none !important;
}

body.theme-grid .dg-nearby-pats-foot {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  background: #0d131a;
}

body.theme-grid .dg-nearby-pats-foot .btn {
  min-width: 180px;
  min-height: 44px;
  border: 0;
  color: #071315;
  background: var(--dg-nearby-accent);
}

body.dg-nearby-pats-open {
  overflow: hidden;
}

body.theme-grid .nearby-tray-close,
body.theme-grid .nearby-tray-photo-nav {
  min-width: 44px;
  min-height: 44px;
}

body.theme-grid .nearby-tray-header {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px !important;
}

body.theme-grid .nearby-tray-profile-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body.theme-grid .nearby-tray-profile-nav__button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

body.theme-grid .nearby-tray-profile-nav__button:hover,
body.theme-grid .nearby-tray-profile-nav__button:focus-visible {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

body.theme-grid .nearby-tray-profile-nav__button:disabled {
  opacity: 0.3;
  cursor: default;
}

body.theme-grid .nearby-tray-actions .btn {
  min-height: 46px;
}

body.theme-grid .nearby-tray-actions .btn-primary {
  border: 0 !important;
  color: #071315 !important;
  background: var(--dg-nearby-accent, #ffffff) !important;
  box-shadow: none !important;
}

body.theme-grid .nearby-tray-actions .btn-primary:hover {
  color: #020808 !important;
  background: #ffffff !important;
  transform: none !important;
}

body.theme-grid .nearby-tray-details-disclosure > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

@media (max-width: 991.98px) {
  body.theme-grid .dg-nearby-discovery {
    min-height: calc(100dvh - var(--dg-mobile-header-height, 56px) - var(--dg-bottom-nav-height, 56px));
  }

  body.theme-grid .dg-nearby-toolbar {
    top: var(--dg-mobile-header-height, 56px);
  }

  body.theme-grid .dg-nearby-toolbar__primary {
    min-height: 58px;
    gap: 8px;
    padding: 8px 10px 6px;
  }

  body.theme-grid .dg-nearby-location-status {
    display: none;
  }

  body.theme-grid .dg-nearby-action {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 50%;
  }

  body.theme-grid .dg-nearby-action > span:not(.dg-nearby-filter-count) {
    display: none;
  }

  body.theme-grid .dg-nearby-filter-count {
    position: absolute;
    top: -3px;
    right: -3px;
  }

  body.theme-grid .dg-nearby-toolbar__actions .dg-nearby-action {
    position: relative;
  }

  body.theme-grid .dg-nearby-quick-filters {
    gap: 7px;
    padding: 0 10px 9px;
  }

  body.theme-grid .dg-nearby-quick-pill {
    min-height: 36px;
    padding: 0 13px;
    font-size: 0.72rem;
  }

  body.theme-grid .dg-nearby-main {
    padding: 2px;
  }

  body.theme-grid .dg-nearby-discovery .nearby-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 2px !important;
  }

  body.theme-grid .dg-nearby-discovery .nearby-grid-tile {
    border-radius: 3px !important;
    contain-intrinsic-size: 124px 166px;
  }

  body.theme-grid .dg-nearby-discovery .nearby-tile-overlay {
    padding: 34px 7px 7px !important;
  }

  body.theme-grid .dg-nearby-discovery .nearby-tile-handle {
    font-size: 0.72rem !important;
  }

  body.theme-grid .dg-nearby-discovery .nearby-tile-age {
    font-size: 0.67rem;
  }

  body.theme-grid .dg-nearby-filter-sheet {
    inset: 0 0 calc(var(--dg-bottom-nav-height, 56px) + env(safe-area-inset-bottom, 0px));
  }

  body.theme-grid .dg-nearby-filter-sheet .dg-mobile-filters__panel {
    top: auto;
    left: 0;
    width: 100%;
    max-height: min(
      calc(86dvh - var(--dg-bottom-nav-height, 56px) - env(safe-area-inset-bottom, 0px)),
      calc(760px - var(--dg-bottom-nav-height, 56px) - env(safe-area-inset-bottom, 0px))
    );
    padding-bottom: 0;
    border: 1px solid var(--dg-nearby-border);
    border-bottom: 0;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }

  body.theme-grid .dg-nearby-filter-sheet.is-open .dg-mobile-filters__panel {
    transform: translateY(0);
  }

  body.theme-grid .dg-nearby-filter-sheet .dg-mobile-filters__panel-foot {
    padding-bottom: 12px;
  }

  body.theme-grid .nearby-tray {
    bottom: calc(var(--dg-bottom-nav-height, 56px) + env(safe-area-inset-bottom, 0px)) !important;
  }

  body.theme-grid .nearby-tray-content {
    width: 100% !important;
    max-width: none !important;
    max-height: min(88dvh, calc(100dvh - var(--dg-mobile-header-height, 56px) - var(--dg-bottom-nav-height, 56px))) !important;
    border-radius: 20px 20px 0 0 !important;
  }

  body.theme-grid .nearby-tray-hero {
    height: min(42dvh, 380px);
    min-height: 230px;
  }

  body.theme-grid .dg-nearby-pats-panel {
    inset: 0 0 calc(var(--dg-bottom-nav-height, 56px) + env(safe-area-inset-bottom, 0px));
    align-items: flex-end;
    padding: 0;
  }

  body.theme-grid .dg-nearby-pats-dialog {
    width: 100%;
    height: min(86dvh, 760px);
    max-height: calc(100dvh - var(--dg-mobile-header-height, 56px) - var(--dg-bottom-nav-height, 56px));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }

  body.theme-grid .dg-nearby-pats-panel.is-open .dg-nearby-pats-dialog {
    transform: translateY(0);
  }

  body.theme-grid .dg-nearby-pats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
  }

  body.theme-grid .dg-nearby-pat-card {
    border-radius: 5px;
  }
}

@media (min-width: 600px) and (max-width: 991.98px) {
  body.theme-grid .dg-nearby-discovery .nearby-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
  }
}

@media (max-width: 359.98px) {
  body.theme-grid .dg-nearby-discovery .nearby-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.theme-grid .dg-nearby-toolbar__title {
    font-size: 1.08rem;
  }
}

@media (min-width: 1600px) {
  body.theme-grid .dg-nearby-discovery .nearby-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-grid .dg-nearby-discovery *,
  body.theme-grid .nearby-tray-content,
  body.theme-grid .dg-nearby-filter-sheet .dg-mobile-filters__panel {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

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

@media (min-width: 768px) {
  body.theme-grid .profile-header .profile-cover-wrapper:not(:has(img)) {
    background:
      radial-gradient(75% 135% at 7% 105%, rgba(255, 255, 255, 0.08), transparent 58%),
      radial-gradient(55% 110% at 92% -10%, rgba(255, 255, 255, 0.05), transparent 62%),
      linear-gradient(135deg, #141414 0%, #070707 56%, #101010 100%) !important;
  }
}

/* DG nearby overlay click guard 2026-09-08 */
body.theme-grid .nearby-tray.x-hidden,
body.theme-grid .nearby-tray[hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
body.theme-grid .nearby-tray:not(.x-hidden):not([hidden]) {
  pointer-events: auto;
}

/* ==== DG site glass chrome 2026-10-29 ====
   Black/white glass for header, nav, menus, modals, settings, messages,
   notifications, and forums. Profile cover photos and user page backgrounds
   are left alone: this block does not set a background image, and it does
   not paint .profile-cover-wrapper. */
body.theme-grid {
  --dg-site-accent: rgba(255, 255, 255, 0.72);
  --dg-site-accent-soft: rgba(255, 255, 255, 0.10);
  --dg-site-accent-border: rgba(255, 255, 255, 0.18);
  --dg-site-border: rgba(255, 255, 255, 0.12);
  --brand-primary: #ffffff;
  --brand-secondary: #e5e7eb;
  --brand-accent: rgba(255, 255, 255, 0.72);
  --brand-accent-soft: rgba(255, 255, 255, 0.55);
  accent-color: #fff;
}

body.theme-grid .main-header {
  background: rgba(0, 0, 0, 0.82) !important;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--dg-site-border);
  box-shadow: none !important;
}

body.theme-grid .main-header .search-wrapper .form-control:focus {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

body.theme-grid .grid-header-nav__badge,
body.theme-grid .navbar-wrapper .counter.blue,
body.theme-grid .navbar-wrapper .counter.purple {
  background: #fff !important;
  color: #111 !important;
}

body.theme-grid .x-form-tools,
body.theme-grid .publisher-tools-tab {
  color: rgba(255, 255, 255, 0.72) !important;
  fill: rgba(255, 255, 255, 0.72) !important;
}

body.theme-grid .x-form-tools:hover,
body.theme-grid .publisher-tools-tab:hover {
  color: #fff !important;
  fill: #fff !important;
}

body.theme-grid .dropdown-menu {
  background: rgba(12, 12, 12, 0.86) !important;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: rgba(255, 255, 255, 0.92);
}

body.theme-grid .dropdown-item {
  color: rgba(255, 255, 255, 0.82);
}

body.theme-grid .dropdown-item:hover,
body.theme-grid .dropdown-item:focus,
body.theme-grid .dropdown-item.active {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

body.theme-grid .modal-content {
  background: linear-gradient(165deg, rgba(22, 22, 22, 0.88), rgba(0, 0, 0, 0.78)) !important;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

body.theme-grid .modal-header,
body.theme-grid .modal-footer {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

body.theme-grid .modal-content .btn-close {
  filter: invert(1) grayscale(1);
}

body.theme-grid .btn-main,
body.theme-grid a.btn-main {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.72) !important;
  color: #111 !important;
}

body.theme-grid:not(.page-profile) .nav-pills .nav-link.active,
body.theme-grid:not(.page-profile) .nav-tabs .nav-link.active,
body.theme-grid .list-group-item.active {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: #fff !important;
}

body.theme-grid .page-link {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.82);
}

body.theme-grid .page-item.active .page-link {
  background: #fff !important;
  border-color: #fff !important;
  color: #111 !important;
}

body.theme-grid.page-messages .feeds-item.active,
body.theme-grid.page-messages .feeds-item:hover {
  background: rgba(255, 255, 255, 0.06) !important;
}

body.theme-grid.page-forums .card,
body.theme-grid.page-forums .forum-category,
body.theme-grid.page-forums .forum-thread {
  border-color: rgba(255, 255, 255, 0.12);
}

body.theme-grid .profile-cover-wrapper img,
body.theme-grid .js_position-cover-cropped,
body.theme-grid .js_position-cover-full,
body.theme-grid .js_photo-position-mover {
  background-color: transparent;
}

/* ==== DG map tile contrast 2026-10-29 ====
   Leaflet + CARTO dark_all (martin tiles, restyled 2026-10-26) paints land
   near #090909 and streets/labels only a few steps lighter, so the basemap
   reads as a near-black sheet. Lift tile images only. Markers, HUD, glass
   chrome, and the empty-state card are not filtered and are not covered. */
body.theme-grid .leaflet-tile-pane img.leaflet-tile {
  filter: brightness(2.55) contrast(1.08) saturate(1.05);
}

body.theme-grid.page-map .grid-map-wrap--fullscreen .leaflet-container,
body.theme-grid.nearby-map-mode .grid-map-wrap--fullscreen .leaflet-container,
body.theme-grid .nearby-page--map-only .grid-map-wrap--fullscreen .leaflet-container,
body.theme-grid.page-index .dg-feed-map-preview-card .leaflet-container {
  background: #171717;
}
