/* brand.css - DormNamo mark + wordmark, line icons, chat button and the polished
   Discover page. Loaded last. Uses the site tokens, so light and dark both work. */

/* ---------- logo: arched double door + one-color wordmark ---------- */
.logo {
  gap: 9px;
  font:
    800 22px "Bricolage Grotesque",
    sans-serif;
  letter-spacing: -0.025em;
  color: var(--brand);
}
.logo:hover svg {
  animation: none;
}
.dn-mark {
  width: 24px;
  height: 28px;
  flex: none;
  overflow: visible;
  transition:
    transform 0.2s,
    filter 0.35s;
}
.dn-arch {
  fill: var(--brand);
}
.dn-in {
  fill: #fff; /* closed: shows as the thin seam between the leaves */
  transition: fill 0.3s ease;
}
.dn-knob {
  fill: #fff;
}
/* hover the logo: the double door swings open and warm light spills out */
.dn-leaf {
  transform-box: fill-box;
  transition: transform 0.5s cubic-bezier(0.3, 1.25, 0.5, 1);
}
.dn-l {
  transform-origin: left center;
}
.dn-r {
  transform-origin: right center;
}
.logo:hover .dn-l,
.logo:focus-visible .dn-l,
.ov-logo:hover .dn-l {
  transform: scaleX(0.3) skewY(-9deg);
}
.logo:hover .dn-r,
.logo:focus-visible .dn-r,
.ov-logo:hover .dn-r {
  transform: scaleX(0.3) skewY(9deg);
}
.logo:hover .dn-in,
.logo:focus-visible .dn-in,
.ov-logo:hover .dn-in {
  fill: var(--gold);
}
.logo:hover .dn-mark,
.logo:focus-visible .dn-mark,
.ov-logo:hover .dn-mark {
  transform: translateY(-1px);
  filter: drop-shadow(0 0 5px rgba(255, 200, 61, 0.75));
}
@media (prefers-reduced-motion: reduce) {
  .dn-leaf {
    transition-duration: 0.15s; /* still opens, without the springy swing */
    transition-timing-function: ease;
  }
}
/* "Namo" is yellow only on the dark Discover page; elsewhere the wordmark is one blue. */
body.dark .dn-word span {
  color: var(--gold);
}
body.dark .logo {
  color: #fff;
}
body.dark .dn-arch {
  fill: #fff;
}
body.dark .dn-in {
  fill: var(--bg);
}
body.dark .logo:hover .dn-in {
  fill: var(--gold);
}
body.dark .dn-knob {
  fill: var(--bg);
}
.ov-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--brand);
  font:
    800 26px "Bricolage Grotesque",
    sans-serif;
  letter-spacing: -0.025em;
}
.ov-logo .dn-mark {
  width: 27px;
  height: 31px;
}

/* footer text stays clear of the floating Ask Namo button */
footer .wrap {
  padding-right: 190px;
}
@media (max-width: 700px) {
  footer .wrap {
    padding-right: 20px;
    padding-bottom: 76px;
  }
}

/* ---------- icons ---------- */
.ic {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  vertical-align: -0.2em;
}
.menu button {
  display: flex;
  align-items: center;
  gap: 10px;
}
.menu button .ic {
  width: 17px;
  height: 17px;
  color: var(--mute);
}

/* ---------- Ask Namo button (both pages) ---------- */
.fab {
  border: 0;
  gap: 9px;
  padding: 12px 20px 12px 16px;
  font-weight: 700;
  animation: none;
  box-shadow: 0 10px 28px rgba(10, 47, 115, 0.28);
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.fab .ic {
  width: 20px;
  height: 20px;
}
.fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(10, 47, 115, 0.32);
}
body.dark .fab {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}
#chatX .ic {
  width: 18px;
  height: 18px;
}

/* ---------- Discover: swipe card ---------- */
.dpage .sw {
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.sw:after {
  display: none;
}
.sw .ph {
  height: 168px;
}
.sw .pct {
  font-size: 13px;
  padding: 5px 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.sw .ver {
  font-size: 12px;
}
.sw .cb {
  padding: 16px 18px 18px;
  gap: 14px;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent);
}
.sw-head h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.sw-sub {
  margin-top: 3px;
  font-size: 13px;
  color: var(--mute);
}
.sw-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.sw-row .price {
  font-size: 22px;
}
.sw-dist {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--mute);
  white-space: nowrap;
}
.sw-dist .ic {
  width: 15px;
  height: 15px;
}
.sw-fits {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
  font-size: 14px;
  line-height: 1.35;
}
.sw-fits li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}
.sw-fits .ic {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  padding: 2px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--goldink);
  stroke-width: 3;
  box-sizing: border-box;
}
.sw-none {
  margin: 0;
  font-size: 13px;
  color: var(--mute);
}
.sw-unv {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--goldink);
  background: #fff8e1;
  border: 1px solid #ffe39a;
}
.sw-unv .ic {
  width: 16px;
  height: 16px;
}
body.dark .sw-unv {
  color: #ffd76a;
  background: rgba(255, 200, 61, 0.08);
  border-color: rgba(255, 200, 61, 0.28);
}
.sw-spec {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.sw-spec dt {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mute);
}
.sw-spec dd {
  margin: 2px 0 0;
  font-size: 13.5px;
  font-weight: 600;
}
.sw-spec dd.unk {
  font-weight: 500;
  color: var(--mute);
  opacity: 0.75;
}
.sw .chips {
  gap: 6px;
}
.sw .chips .chip {
  cursor: default;
  font-size: 12px;
  padding: 4px 10px;
}
.sw-hint {
  flex: none;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 12px;
  color: var(--mute);
}

/* ---------- Discover: action rail ---------- */
.rail {
  gap: 14px;
}
.rail > button,
.more > summary {
  width: 54px;
  height: 54px;
  font-size: 0;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}
.rail .ic {
  width: 22px;
  height: 22px;
}
.more > summary .ic {
  stroke-width: 3.2;
}
.rail > button:hover,
.more > summary:hover {
  background: var(--card);
  border-color: var(--gold);
}
.more[open] > summary {
  border-color: var(--gold);
}
#dLike {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--goldink);
}
#dLike .ic {
  fill: currentColor;
}
#dLike:not(:disabled):hover {
  background: #ffbe1a;
}
.more .pop {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px;
  min-width: 170px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}
.more .pop button {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 14px;
}
.more .pop button .ic {
  width: 17px;
  height: 17px;
  color: var(--mute);
}
.more .pop button:hover:not(:disabled) {
  background: rgba(127, 160, 220, 0.14);
}
.more .pop kbd {
  margin-left: auto;
  font:
    600 11px Figtree,
    system-ui,
    sans-serif;
  color: var(--mute);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
}
@media (max-width: 520px) {
  .rail > button,
  .more > summary {
    width: 46px;
    height: 46px;
  }
  .rail .ic {
    width: 19px;
    height: 19px;
  }
}

/* ---------- Discover: stats + saved list ---------- */
.dstat {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  position: relative;
}
.dstat span {
  font-size: 12.5px;
  padding: 5px 12px;
  border-radius: 99px;
  color: var(--mute);
  background: var(--card);
  border: 1px solid var(--line);
}
.dstat b {
  color: var(--ink);
}
.saved {
  width: min(520px, 100%);
  margin-top: 14px;
  padding: 0 16px;
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.saved summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  list-style: none;
  font-weight: 700;
}
.saved summary::-webkit-details-marker {
  display: none;
}
.saved summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border: solid var(--mute);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin: 0 4px -2px 10px;
  transition: transform 0.2s;
}
.saved[open] summary::after {
  transform: rotate(-135deg);
  margin-bottom: -6px;
}
.saved summary b {
  margin-left: auto;
  min-width: 24px;
  text-align: center;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--gold);
  color: var(--goldink);
}
.saved .it {
  align-items: center;
  padding: 10px 0;
}
.saved .it:last-child {
  border-bottom: 0;
}
.it-n {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}
.it-n small {
  color: var(--mute);
}
.sv-tag {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--gold);
  color: var(--goldink);
}
.sv-tag.bm {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}
body:not(.dark) .sv-tag.bm {
  color: #8a6300;
  border-color: #e0a800;
}

/* ---------- Discover: cover flow ---------- */
/* discover.js lay()/put() place every card inline (transform, blur, opacity, z-index). The focused room sits in
   the middle; its neighbours stack behind it on both sides. Up = like, down = pass, sideways = browse.
   --lk / --ps (0..1) on .dpage light the card's Like / Pass label and the guides beside the deck. */
/* explicit columns: an auto grid track would shrink to the rail's width and squeeze the deck */
.dpage {
  grid-template-columns: minmax(0, 1fr);
}
.dpage .deckwrap {
  position: relative;
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 14px;
}
.dpage .deckwrap .deck {
  position: relative;
  width: 100%;
  max-width: none;
  height: clamp(420px, calc(100dvh - 290px), 640px);
  margin: 0;
  flex: none;
  /* the page scrolls from anywhere but the room in front (up / down there = like / pass, discover.js) */
  touch-action: pan-y;
  clip-path: inset(-100vh 0);
  perspective: 1600px;
}
.dpage .deckwrap .deck .sw.is-focus {
  touch-action: none;
}
/* a soft spotlight on the floor under the focused room */
.dpage .deckwrap .deck::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -26px;
  width: min(560px, 90%);
  height: 90px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(10, 47, 115, 0.1), transparent);
  filter: blur(6px);
  pointer-events: none;
}
/* position in the ranking: 03 / 24 with a thin progress line */
.dpos {
  display: flex;
  align-items: center;
  gap: 12px;
  font:
    700 12px/1 Figtree,
    system-ui,
    sans-serif;
  letter-spacing: 0.14em;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}
.dpos b {
  color: var(--ink);
}
.dpos i {
  position: relative;
  width: 120px;
  height: 2px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}
.dpos i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--dp, 0%);
  background: var(--gold);
  transition: width 0.34s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.dpage .sw {
  inset: 0 auto 0 50%;
  width: min(420px, calc(100% - 64px));
  transform: translate3d(-50%, 0, 0);
  border-radius: 24px;
  transform-origin: 50% 50%;
  will-change: transform, filter;
  backface-visibility: hidden;
}
.dpage .sw {
  background: #fff;
  border-color: var(--line);
}
.dpage .sw.side {
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(10, 47, 115, 0.08);
}
.dpage .sw.side .cb {
  overflow: hidden;
}
.dpage .sw.side .sw-hint {
  visibility: hidden;
}
.dpage .sw.is-focus {
  box-shadow: 0 24px 60px rgba(10, 47, 115, 0.16);
}
.sw img {
  -webkit-user-drag: none;
  pointer-events: none;
}
.dpage.dragging .sw {
  cursor: grabbing;
}

/* Like / Pass label on the focused card */
.sw-flag {
  position: absolute;
  left: 50%;
  z-index: 4;
  padding: 6px 12px;
  border-radius: 8px;
  font:
    700 12px/1 Figtree,
    system-ui,
    sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(8, 20, 44, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transform: translateX(-50%);
  pointer-events: none;
}
.sw-flag.l {
  bottom: 52px;
  opacity: var(--lk, 0);
  background: rgb(22, 163, 74);
}
.sw-flag.p {
  top: 14px;
  opacity: var(--ps, 0);
  background: rgb(220, 38, 38);
}

/* guides beside the strip: a thin arrow and one word (wide screens only) */
.dguide {
  position: absolute;
  top: 0;
  height: clamp(420px, calc(100dvh - 290px), 640px);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 64px;
  pointer-events: none;
  color: var(--mute);
}
.dguide.up {
  left: 12px;
}
.dguide.down {
  right: 12px;
}
.dguide .ic {
  width: 18px;
  height: 40px;
  stroke-width: 1.5;
  transition: transform 0.2s;
}
.dguide b {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.dguide.up {
  color: rgba(22, 163, 74, calc(0.7 + 0.3 * var(--lk, 0)));
}
.dguide.up .ic {
  transform: translateY(calc(var(--lk, 0) * -10px));
}
.dguide.down {
  color: rgba(220, 38, 38, calc(0.7 + 0.3 * var(--ps, 0)));
}
.dguide.down .ic {
  transform: translateY(calc(var(--ps, 0) * 10px));
}
@media (max-width: 1179px) {
  .dguide {
    display: none;
  }
}

/* compact hints at both ends of the position row (narrow screens, where the side panels are hidden) */
.dpos .dph {
  display: none;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
}
.dpos .dph .ic {
  width: 13px;
  height: 13px;
  stroke-width: 2.2;
}
.dpos .dph {
  font-weight: 700;
}
.dpos .dph.up {
  margin-right: 6px;
  color: rgba(22, 163, 74, calc(0.75 + 0.25 * var(--lk, 0)));
}
.dpos .dph.down {
  margin-left: 6px;
  color: rgba(220, 38, 38, calc(0.75 + 0.25 * var(--ps, 0)));
}
@media (max-width: 1179px) {
  .dpos .dph {
    display: inline-flex;
  }
}
@media (max-width: 420px) {
  .dpos {
    gap: 8px;
  }
  .dpos i {
    width: 54px;
  }
}

/* ---------- Discover: TikTok-style header (Saved | For you tabs, preferences icon) ---------- */
.vh {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.dpage .dhead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(1120px, 100%);
  margin-bottom: 8px;
}
.dtabs {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 26px;
}
.dtabs button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 2px 11px;
  border: 0;
  background: none;
  cursor: pointer;
  font:
    600 16px/1 Figtree,
    system-ui,
    sans-serif;
  color: var(--mute);
  opacity: 0.7;
  transition:
    color 0.2s,
    opacity 0.2s;
}
.dtabs button + button::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 50%;
  width: 1px;
  height: 13px;
  margin-top: -8px;
  background: var(--line);
}
.dtabs button:hover {
  opacity: 1;
}
.dtabs button[aria-selected="true"] {
  opacity: 1;
  color: var(--ink);
  font-weight: 800;
}
.dtabs button::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 24px;
  height: 3px;
  margin-left: -12px;
  border-radius: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.dtabs button[aria-selected="true"]::after {
  transform: scaleX(1);
}
.dtabs button:focus-visible {
  outline: 2px solid rgba(255, 200, 61, 0.6);
  outline-offset: 4px;
  border-radius: 6px;
}
#dSavedTab {
  min-width: 18px;
  padding: 3px 6px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 800;
  text-align: center;
  color: var(--goldink);
  background: var(--gold);
}
.dicon {
  grid-column: 3;
  justify-self: end;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.dicon:hover {
  border-color: var(--gold);
}
.dicon .ic {
  width: 19px;
  height: 19px;
}

/* Saved tab: the liked & bookmarked list takes the strip's place */
.dpage:not(.on-saved) .saved {
  display: none;
}
.dpage.on-saved .deckwrap,
.dpage.on-saved .dstat {
  display: none;
}
.dpage.on-saved .saved {
  margin-top: 6px;
  padding: 6px 16px;
}
.dpage.on-saved .saved summary {
  display: none;
}

/* phones: a shorter strip so the hints and buttons stay on screen */
@media (max-width: 560px) {
  .dpage .deckwrap .deck {
    height: clamp(380px, calc(100dvh - 250px), 600px);
  }
  .dtabs button {
    font-size: 15px;
  }
}

/* action rail: one row under the strip */
.dpage .rail {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.dpage .rail #dLike,
.dpage .rail #dPass {
  width: 60px;
  height: 60px;
}
.dpage .more .pop {
  right: auto;
  left: 50%;
  bottom: 64px;
  transform: translateX(-50%);
}

/* card surface + quieter scrollbar on the dark page */
body.dark .dpage .sw {
  background: linear-gradient(180deg, #11306a 0%, #0c2654 100%);
  border-color: rgba(157, 183, 230, 0.2);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
body.dark .sw .cb {
  scrollbar-color: rgba(157, 183, 230, 0.3) transparent;
}
body.dark .sw .cb::-webkit-scrollbar-thumb {
  background: rgba(157, 183, 230, 0.3);
}
body.dark .sw-hint {
  border-color: rgba(157, 183, 230, 0.16);
  background: rgba(0, 0, 0, 0.12);
}

/* keyboard focus only (no box around the deck on mouse clicks) */
.deck:focus {
  outline: none;
}
.deck:focus-visible {
  outline: 2px solid rgba(255, 200, 61, 0.55);
  outline-offset: 8px;
  border-radius: 26px;
}

/* ---------- page transitions (Rooms <-> Discover) ---------- */
/* from .01, not 0: browsers don't count content inside a fully transparent page as painted until a later
   redraw, which held back first-paint metrics by up to ~1 s. .01 looks identical and paints immediately. */
@keyframes pageIn {
  from {
    opacity: 0.01;
  }
  to {
    opacity: 1;
  }
}
body {
  animation: pageIn 0.35s ease backwards;
} /* backwards: lets go after, so the fade-out below works */
html.leaving body {
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* ---------- Namo chat panel ---------- */
.cpanel {
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow:
    0 24px 60px rgba(10, 47, 115, 0.22),
    0 2px 8px rgba(10, 47, 115, 0.08);
}
body.dark .cpanel {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

/* header: avatar, name, online line, close */
.cpanel > header {
  justify-content: flex-start;
  gap: 12px;
  padding: 14px 12px 14px 16px;
  background: linear-gradient(135deg, #0a47a9 0%, #0a2f73 100%);
}
.cpanel > header > div {
  flex: 1;
  min-width: 0;
}
.cpanel > header b {
  display: block;
  font:
    800 17px/1.2 "Bricolage Grotesque",
    sans-serif;
  letter-spacing: -0.01em;
}
.cpanel header small {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 500;
  opacity: 0.85;
}
.c-av {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--gold);
  color: var(--goldink);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}
.c-av .ic {
  width: 20px;
  height: 20px;
}
.c-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: #3ddc84;
  box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.25);
}
body.dark .c-av {
  background: rgba(90, 65, 0, 0.14);
  box-shadow: none;
}
#chatX {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: background 0.15s;
}
#chatX:hover {
  background: rgba(255, 255, 255, 0.15);
}
body.dark #chatX:hover {
  background: rgba(90, 65, 0, 0.12);
}
#chatX:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* messages: white bubbles on a soft tint */
.clog {
  padding: 16px 14px;
  gap: 10px;
  background: #f6f9fe;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
body.dark .clog {
  background: #0b2250;
}
.msg {
  padding: 10px 14px;
  line-height: 1.5;
}
.msg.me {
  border-bottom-right-radius: 6px;
  box-shadow: 0 2px 8px rgba(10, 71, 169, 0.22);
}
.msg.bot {
  border-bottom-left-radius: 6px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(10, 47, 115, 0.05);
}
body.dark .msg.bot {
  border-color: transparent;
  box-shadow: none;
}
.mini {
  border-width: 1px;
  background: #f6f9fe;
}

/* suggestion chips: one swipeable row, edges fade instead of a scrollbar */
.cchips {
  flex: none;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: var(--card);
  scrollbar-width: none;
  scroll-padding: 0 14px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 32px), transparent);
}
.cchips::-webkit-scrollbar {
  display: none;
}
.cchips button {
  flex: none;
  border: 1px solid transparent;
  background: #eef4fd;
  color: var(--brand);
  padding: 7px 13px;
  font:
    600 13px Figtree,
    system-ui,
    sans-serif;
  transition:
    background 0.15s,
    color 0.15s,
    transform 0.15s;
}
.cchips button:hover {
  background: var(--brand);
  color: #fff;
}
.cchips button:active {
  transform: scale(0.96);
}
.cchips button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}
body.dark .cchips button {
  background: #17397a;
  color: #fff;
}
body.dark .cchips button:hover {
  background: var(--gold);
  color: var(--goldink);
}

/* input row with a round send button */
#chatForm {
  flex: none;
  align-items: center;
  padding: 4px 12px 12px;
  gap: 8px;
  border-top: 0;
  background: var(--card);
}
#chatForm input {
  min-width: 0;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: #f6f9fe;
  font:
    500 14px Figtree,
    system-ui,
    sans-serif;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
}
#chatForm input::placeholder {
  color: var(--mute);
  opacity: 0.8;
}
#chatForm input:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(255, 200, 61, 0.35);
}
body.dark #chatForm input {
  background: #0b2250;
}
body.dark #chatForm input:focus {
  background: #0b2250;
}
#chatForm .c-send {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
#chatForm .c-send .ic {
  width: 19px;
  height: 19px;
  transform: translateX(-1px);
}
#chatForm .c-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(10, 71, 169, 0.3);
}
#chatForm .c-send:active {
  transform: scale(0.94);
}
@media (prefers-reduced-motion: reduce) {
  .cchips button,
  #chatForm .c-send {
    transition: none;
  }
}

/* ---------- hearts (shared/js/listings/hearts.js) vs stars ----------
   Hearts = saved / popularity, always red, never gold. Stars = quality, always gold. */
.hrt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: #fff;
  color: var(--ink);
  font:
    700 13px Figtree,
    system-ui,
    sans-serif;
  cursor: pointer;
  transition:
    transform 0.15s,
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}
.hrt .ic {
  width: 18px;
  height: 18px;
  flex: none;
  transition: transform 0.15s;
}
.hrt-n:empty {
  display: none;
}
.hrt:hover {
  border-color: #f2a5a5;
  color: #e5484d;
}
.hrt:hover .ic {
  transform: scale(1.12);
}
.hrt[aria-pressed="true"] {
  color: #e5484d;
  border-color: #f6c4c4;
  background: #fff1f1;
}
.hrt[aria-pressed="true"] .ic {
  fill: currentColor;
}
.hrt:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
/* heart: a short, quiet scale */
.hrt.pop .ic {
  animation: hrtPop 0.28s ease-out;
}
@keyframes hrtPop {
  50% {
    transform: scale(1.15);
  }
}
/* the whole pill gives a soft red ring */
.hrt.pop {
  animation: hrtHop 0.5s ease-out;
}
@keyframes hrtHop {
  0% {
    box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.45);
  }
  100% {
    transform: none;
    box-shadow: 0 0 0 12px rgba(229, 72, 77, 0);
  }
}
.card .ph .hrt-card.pop {
  animation: hrtHopCard 0.5s ease-out;
}
@keyframes hrtHopCard {
  0% {
    box-shadow:
      0 4px 12px rgba(10, 30, 80, 0.25),
      0 0 0 0 rgba(229, 72, 77, 0.5);
  }
  100% {
    transform: none;
    box-shadow:
      0 4px 12px rgba(10, 30, 80, 0.25),
      0 0 0 12px rgba(229, 72, 77, 0);
  }
}
/* un-heart: deflate and wobble */
.hrt.unpop .ic {
  animation: hrtDeflate 0.24s ease-out;
}
@keyframes hrtDeflate {
  50% {
    transform: scale(0.88);
  }
}
/* count rolls up / down */
.hrt-n.up {
  animation: hrtUp 0.4s cubic-bezier(0.3, 1.5, 0.5, 1);
}
.hrt-n.down {
  animation: hrtDown 0.35s ease;
}
@keyframes hrtUp {
  from {
    transform: translateY(70%);
    opacity: 0;
  }
}
@keyframes hrtDown {
  from {
    transform: translateY(-70%);
    opacity: 0;
  }
}

/* on a card photo: top right; "Verified" moves to the left, under "Featured" */
.card .ph .hrt-card {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 12px rgba(10, 30, 80, 0.25);
}
.card .ph .hrt-card[aria-pressed="true"] {
  background: #fff;
}
.card .ph .ver {
  right: auto;
  left: 10px;
}
.card .ph .tag + .ver {
  top: 40px;
}

/* in the dialog: beside the title */
.dlg-title .hrt-dlg {
  float: right;
  margin: 2px 0 8px 12px;
  height: 40px;
  padding: 0 14px;
}
.dlg-title .hrt-dlg .ic {
  width: 20px;
  height: 20px;
}

/* where the stars come from, and what hearts mean */
.rate {
  display: inline;
}
.rate-src {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--mute);
}
.hrt-line {
  font-size: 13px;
  color: var(--mute);
}

/* tenant star rating in the comment box (shared/js/listings/comments.js) */
.cm-rate {
  display: flex;
  align-items: center;
  gap: 4px 10px;
  flex-wrap: wrap;
  padding: 10px 14px 0;
}
.cm-rate-l {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.cm-rate-l small {
  font-weight: 500;
  color: var(--mute);
}
.cm-pick {
  display: inline-flex;
  gap: 2px;
}
.cm-pick button {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: #d3dcec;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition:
    color 0.12s,
    transform 0.12s;
}
.cm-pick button.on {
  color: #f5b301;
}
.cm-pick button:hover {
  transform: scale(1.15);
}
.cm-pick button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}
.cm-rate-v {
  font-size: 12.5px;
  font-weight: 700;
  color: #b88a00;
}
.cm-stars {
  display: inline-block;
  margin-top: 3px;
  font-size: 15px;
  letter-spacing: 1px;
  color: #f5b301;
}
.cm-stars i {
  font-style: normal;
  color: #d3dcec;
}

/* dark Discover page */
body.dark .hrt {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: var(--line);
}
body.dark .hrt[aria-pressed="true"] {
  background: rgba(229, 72, 77, 0.16);
  border-color: rgba(229, 72, 77, 0.5);
  color: #ff6b6f;
}
body.dark .cm-pick button {
  color: #2d4f8f;
}
body.dark .cm-pick button.on,
body.dark .cm-stars {
  color: var(--gold);
}
body.dark .cm-stars i {
  color: #2d4f8f;
}
body.dark .cm-rate-v {
  color: var(--gold);
}
.hrt-n {
  display: inline-block; /* so the count can roll */
}

/* Reduced motion (e.g. Windows "Animation effects" off): no motion, but still clear feedback: a gentle swell, a soft glow that
   fades in place, and the count fading in. */
@media (prefers-reduced-motion: reduce) {
  .hrt.pop,
  .card .ph .hrt-card.pop {
    animation: hrtGlowSoft 0.7s ease-out;
  }
  .hrt.pop .ic {
    animation: hrtSwellSoft 0.45s ease-out;
  }
  .hrt.unpop .ic {
    animation: hrtFadeSoft 0.4s ease;
  }
  .hrt-n.up,
  .hrt-n.down {
    animation: hrtFadeSoft 0.4s ease;
  }
}
@keyframes hrtSwellSoft {
  50% {
    transform: scale(1.18);
  }
}
@keyframes hrtFadeSoft {
  from {
    opacity: 0.35;
  }
}
@keyframes hrtGlowSoft {
  0% {
    box-shadow: 0 0 0 6px rgba(229, 72, 77, 0.35);
  }
  100% {
    box-shadow: 0 0 0 6px rgba(229, 72, 77, 0);
  }
}
/* ---------- Namo: quick replies, consent note, follow-up question (chat.js / insights.js) ---------- */
.msg .c-qr {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.msg .c-qr button {
  border: 1px solid var(--brand);
  background: #fff;
  color: var(--brand);
  border-radius: 99px;
  padding: 6px 13px;
  font:
    700 13px Figtree,
    system-ui,
    sans-serif;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}
.msg .c-qr button:first-child {
  background: var(--brand);
  color: #fff;
}
.msg .c-qr button:hover:not(:disabled) {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--goldink);
}
.msg .c-qr button:disabled {
  opacity: 0.45;
  cursor: default;
}
.msg .c-qr button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.msg .c-note {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--mute);
}
/* Namo's own guess, kept under a Gemini answer when Namo wasn't sure ("Or did you mean …? Just say yes.") */
.msg .c-alt {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--mute);
}
.msg .c-follow {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-weight: 600;
}
body.dark .msg .c-qr button {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold);
}
body.dark .msg .c-qr button:first-child {
  background: var(--gold);
  color: var(--goldink);
}

/* Namo replies worded by Google Gemini (shared/js/namo/namo-ai.js) carry a small, honest label */
.msg .c-ai::before {
  content: "✦ ";
  color: var(--gold);
}

/* ---------- Namo notifications (chat.js notify): count badge + preview bubble ---------- */
.fab {
  position: relative;
}
/* inline after "Ask Namo", so it never covers the button edge or the gold ring */
.fab .fab-badge {
  margin-left: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  border-radius: 99px;
  background: #e0313f;
  color: #fff;
  font:
    800 10px/1 Figtree,
    system-ui,
    sans-serif;
  font-variant-numeric: tabular-nums;
  transition: none;
}
.fab:hover .fab-badge {
  transform: none; /* chat.css tilts every .fab span on hover */
}
.fab-badge.pop {
  animation: badgePop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1);
}
@keyframes badgePop {
  from {
    transform: scale(0.3);
  }
}
/* a soft ring around the button while something is unread */
.fab.has-new::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 99px;
  border: 2px solid var(--gold);
  opacity: 0;
  animation: fabRing 2.4s ease-out 3;
  pointer-events: none;
}
@keyframes fabRing {
  0% {
    opacity: 0.9;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.25);
  }
}
.c-peek {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: min(300px, calc(100vw - 36px));
  display: flex;
  align-items: flex-start;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px 16px 4px 16px;
  box-shadow: 0 16px 36px rgba(10, 47, 115, 0.2);
}
.c-peek.in {
  animation: peekIn 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes peekIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
}
.c-peek-b {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 4px 12px 12px;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.c-peek-b .c-av {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--gold);
  color: var(--goldink);
}
.c-peek-b .c-av .ic {
  width: 17px;
  height: 17px;
}
.c-peek-m {
  display: grid;
  gap: 2px;
  font-size: 13.5px;
  line-height: 1.4;
}
.c-peek-m b {
  font-size: 12px;
  color: var(--brand);
}
.c-peek-x {
  flex: none;
  margin: 6px 6px 0 0;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--mute);
  cursor: pointer;
}
.c-peek-x .ic {
  width: 14px;
  height: 14px;
}
.c-peek-x:hover,
.c-peek-x:focus-visible {
  background: var(--bg);
  color: var(--ink);
  outline: none;
}
.c-peek-b:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: -3px;
  border-radius: 14px;
}
body.dark .c-peek {
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
}
@media (prefers-reduced-motion: reduce) {
  .fab-badge.pop,
  .c-peek.in,
  .fab.has-new::after {
    animation: none;
  }
}

/* ---------- nav: 4 tabs (Rooms, Discover, Landowners, Messages) ---------- */
.tabs a {
  position: relative;
  white-space: nowrap;
}
.nav-badge {
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  box-sizing: border-box;
  display: inline-grid;
  place-items: center;
  border-radius: 99px;
  background: #e0313f;
  color: #fff;
  font:
    800 10px/1 Figtree,
    system-ui,
    sans-serif;
}
@media (max-width: 1180px) {
  .tabs a {
    padding: 8px 13px;
  }
  .owner-link {
    display: none;
  }
}
/* narrow: icons only (the label stays in title and for screen readers) */
@media (max-width: 960px) {
  .tabs .tl {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .tabs a {
    padding: 8px 12px;
  }
  .nav-badge {
    position: absolute;
    top: 0;
    right: 0;
  }
}
.menu-roles {
  display: flex;
  gap: 4px;
  margin: 6px 0 4px;
}
.role-b {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 99px;
}
.role-b.role-student {
  background: #eef4fd;
  color: var(--brand);
}
.role-b.role-owner {
  background: #fff3cd;
  color: #7a5600;
}
.role-b.role-tenant {
  background: #e3f6eb;
  color: #1d7a46;
}
body.dark .role-b.role-student {
  background: rgba(157, 183, 230, 0.15);
  color: #cfe0ff;
}
body.dark .role-b.role-owner {
  background: rgba(255, 200, 61, 0.15);
  color: var(--gold);
}

/* avatars: a letter on a color made from the account id (details.js avatarHTML) */
.av {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: hsl(var(--av, 210) 65% 92%);
  color: hsl(var(--av, 210) 60% 30%);
  font:
    800 16px "Bricolage Grotesque",
    sans-serif;
}
.av.lg {
  width: 64px;
  height: 64px;
  font-size: 26px;
}
.av.sm {
  width: 30px;
  height: 30px;
  font-size: 13px;
}

/* landowner card in the listing dialog */
.own-card {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.own-card p {
  margin: 0;
}
.own-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.own-t {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.own-t b {
  color: var(--ink);
  font-size: 15.5px;
}
.own-t small {
  color: var(--mute);
  font-size: 12.5px;
}
.own-bio {
  font-size: 13.5px;
  line-height: 1.45;
  margin-top: 4px !important;
}
.own-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.own-acts .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.own-acts .ic {
  width: 16px;
  height: 16px;
}

/* ---------- Namo web search results (chat.js webResultsHTML) ---------- */
.c-web {
  margin: 8px 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  counter-reset: web;
}
.c-web li {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
ol.c-web li {
  counter-increment: web;
}
ol.c-web li > a:first-child::before {
  content: counter(web) ". ";
  color: var(--mute);
  font-weight: 700;
}
.c-web a {
  font-weight: 700;
  color: var(--brand);
  overflow-wrap: anywhere;
}
.c-web small {
  font-size: 12px;
  color: var(--mute);
  line-height: 1.35;
}
.c-web-l {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 2px;
}
.c-web-l a {
  font-size: 12px;
  font-weight: 600;
}
.c-web-more li {
  padding: 6px 10px;
}
body.dark .c-web a {
  color: #9fc1ff;
}

/* ---------- address: the fixed part under the barangay picker (utils.js placeLineHTML) ---------- */
.place-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 0 0;
  padding: 8px 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #f6f9fe;
  font-size: 12.5px;
  color: var(--mute);
}
.place-line .ic {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--brand);
}
.place-line b {
  color: var(--ink);
}
.dd-btn.bad,
input.bad-tel {
  border-color: #e53e3e !important;
  box-shadow: 0 0 0 4px rgba(229, 62, 62, 0.15) !important;
}
.c-web-h {
  display: block;
  margin: 10px 0 -2px;
  font-size: 12.5px;
  color: var(--ink);
}
/* social links: a compact two-column grid of chips */
.c-web-social {
  grid-template-columns: 1fr 1fr;
}
.c-web-social li {
  padding: 6px 9px;
}
.c-web-social small {
  font-size: 11px;
}
@media (max-width: 380px) {
  .c-web-social {
    grid-template-columns: 1fr;
  }
}
/* test bot: neutral slate, a line mark instead of an emoji */
.role-b.role-bot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #eef1f6;
  color: #3a4a63;
}
.role-b .ic {
  width: 12px;
  height: 12px;
}
.av.av-bot {
  background: #eef1f6;
  color: #3a4a63;
  box-shadow: inset 0 0 0 1px #d8dfea;
}
.av.av-bot .ic {
  width: 56%;
  height: 56%;
  stroke-width: 1.8;
}

/* Discover is a light page: plain white, no glow */
body[data-page="discover"] {
  background: #fff;
}
/* a faint green hue on the Like side (left) and red on the Pass side (right); each deepens as the card is
   swiped toward it (--lk / --ps from discover.js) */
body[data-page="discover"] .dpage:before,
body[data-page="discover"] .dpage:after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  width: auto;
  height: auto;
  border-radius: 0;
  translate: none;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
body[data-page="discover"] .dpage:before {
  background: radial-gradient(70% 110% at 0% 50%, rgba(22, 163, 74, 0.26), rgba(22, 163, 74, 0) 72%);
  opacity: calc(0.55 + 0.45 * var(--lk, 0));
}
body[data-page="discover"] .dpage:after {
  background: radial-gradient(70% 110% at 100% 50%, rgba(220, 38, 38, 0.22), rgba(220, 38, 38, 0) 72%);
  opacity: calc(0.55 + 0.45 * var(--ps, 0));
}
body[data-page="discover"] .dpage.dragging:before,
body[data-page="discover"] .dpage.dragging:after {
  transition: none;
}
body[data-page="discover"] .rail > button,
body[data-page="discover"] .more > summary {
  box-shadow: 0 4px 14px rgba(10, 47, 115, 0.1);
}
body[data-page="discover"] #dPass:not(:disabled):hover {
  color: rgb(220, 38, 38);
  border-color: rgba(220, 38, 38, 0.5);
}

/* ---------- Discover on phones ---------- */
@media (max-width: 560px) {
  /* room at the bottom so the Ask Namo button never covers the stats */
  body[data-page="discover"] .dpage {
    padding: 8px 12px 92px;
  }
  body[data-page="discover"] .dpage .dhead {
    margin-bottom: 4px;
  }
  body[data-page="discover"] .dpage .deckwrap {
    gap: 12px;
  }
  /* the hue reaches less far in on a narrow screen, so it stays at the edges */
  body[data-page="discover"] .dpage:before {
    background: radial-gradient(60% 80% at 0% 55%, rgba(22, 163, 74, 0.24), rgba(22, 163, 74, 0) 75%);
  }
  body[data-page="discover"] .dpage:after {
    background: radial-gradient(60% 80% at 100% 55%, rgba(220, 38, 38, 0.2), rgba(220, 38, 38, 0) 75%);
  }
  body[data-page="discover"] .rail {
    gap: 12px;
  }
  body[data-page="discover"] .rail > button,
  body[data-page="discover"] .more > summary {
    width: 46px;
    height: 46px;
  }
  body[data-page="discover"] .rail #dLike,
  body[data-page="discover"] .rail #dPass {
    width: 56px;
    height: 56px;
  }
  /* stats: one compact line */
  body[data-page="discover"] .dstat {
    gap: 6px;
    margin-top: 12px;
  }
  body[data-page="discover"] .dstat span {
    font-size: 11.5px;
    padding: 4px 10px;
  }
  body[data-page="discover"] .dstat span[title] {
    display: none;
  }
  /* blur is costly on phone GPUs: no spotlight blur, no backdrop blur on the label */
  body[data-page="discover"] .deck::before {
    filter: none;
  }
  body[data-page="discover"] .sw-flag {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* ---------- site footer (nav.js Nav.footer(): three link columns + a bottom bar) ---------- */
footer.site-foot {
  padding: 0;
  background: #f7faff;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 14.5px;
}
footer.site-foot .wrap {
  height: auto;
  padding: 0 20px;
}
footer.site-foot .sf-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  padding-top: 44px;
  padding-bottom: 30px;
}
.sf-cols h2 {
  margin: 0 0 14px;
  font:
    700 15px Figtree,
    system-ui,
    sans-serif;
  color: var(--ink);
}
.sf-cols ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}
.sf-cols a,
.sf-cols button,
.sf-legal a,
.sf-legal button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--ink);
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}
.sf-cols a:hover,
.sf-cols button:hover,
.sf-legal a:hover,
.sf-legal button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
footer.site-foot .sf-note {
  margin: 0 auto;
  padding-bottom: 18px;
  font-size: 13px;
  color: var(--mute);
}
footer.site-foot .sf-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 20px;
  padding-bottom: 26px;
  border-top: 1px solid var(--line);
}
.sf-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
}
.sf-legal > * + *::before {
  content: "·";
  margin: 0 9px;
  color: var(--mute);
  text-decoration: none;
  display: inline-block;
}
.sf-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-weight: 700;
}
.sf-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sf-meta .ic {
  width: 18px;
  height: 18px;
}
.sf-meta a {
  display: grid;
  place-items: center;
  color: var(--ink);
}
/* keep the bottom bar clear of the Ask Namo button */
@media (min-width: 701px) {
  footer.site-foot .sf-bar {
    padding-right: 190px;
  }
}
@media (max-width: 700px) {
  footer.site-foot .sf-cols {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 34px;
    padding-bottom: 22px;
  }
  footer.site-foot .sf-bar {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 90px;
  }
}
