:root {
  color-scheme: light;
  --page: #f4f8ec;
  --surface: #ffffff;
  --surface-soft: #eaf3da;
  --surface-tint: #f3f8e7;
  --line: #e2ead4;
  --ink: #26331c;
  --muted: #71855b;
  --brand: #5f9433;
  --brand-strong: #3e6b22;
  --brand-soft: #eaf3da;
  --brand-mid: #cde3ac;
  --accent: #ED6A5A;
  --accent-soft: #FFE6DF;
  --info: #5b8aa6;
  --info-soft: #e8f1f5;
  --warn: #ED6A5A;
  --warn-soft: #FFE6DF;
  --danger: #c2544a;
  --danger-soft: #f9e9e7;
  --shadow-1: 0 2px 6px rgba(62, 86, 38, .06);
  --shadow-2: 0 6px 18px rgba(62, 86, 38, .10);
  --shadow-3: 0 14px 34px -12px rgba(62, 86, 38, .22);
  --radius-card: 20px;
  --radius-control: 16px;
  --transparency-hero: #234a34;
  --transparency-paper: #f5f1df;
  --transparency-copy: #d3dec9;
  --transparency-badge-line: rgba(245, 241, 223, .25);
  --transparency-orbit: rgba(230, 208, 142, .25);
  --tnr-hero-bg: #dce9c7;
  --tnr-hero-ink: #263c26;
  --tnr-hero-copy: #5c7353;
  --tnr-hero-kicker: #557744;
  --tnr-hero-ring: rgba(52, 92, 54, .2);
  --ink-soft: #435435;
  --surface-2: #f6faf0;
}

.theme-rose {
  color-scheme: light;
  --page: #fbf1f4;
  --surface: #fffdfd;
  --surface-soft: #f8e8ee;
  --surface-tint: #fbedf2;
  --line: #efd8e1;
  --ink: #512b3b;
  --muted: #896879;
  --brand: #a94269;
  --brand-strong: #702b47;
  --brand-soft: #f3dce5;
  --brand-mid: #e9b9cc;
  --accent: #ED6A5A;
  --accent-soft: #FFE6DF;
  --info: #657dad;
  --info-soft: #edf0f8;
  --warn: #ED6A5A;
  --warn-soft: #FFE6DF;
  --danger: #b65358;
  --danger-soft: #f8e8e9;
  --shadow-1: 0 2px 6px rgba(81, 43, 59, .06);
  --shadow-2: 0 6px 18px rgba(81, 43, 59, .10);
  --shadow-3: 0 14px 34px -12px rgba(81, 43, 59, .22);
  --transparency-hero: #4f293e;
  --transparency-paper: #fbf0df;
  --transparency-copy: #ead4dc;
  --transparency-badge-line: rgba(251, 240, 223, .28);
  --transparency-orbit: rgba(239, 190, 157, .26);
  --tnr-hero-bg: #f4dfe8;
  --tnr-hero-ink: #512b3b;
  --tnr-hero-copy: #896879;
  --tnr-hero-kicker: #8a3c5d;
  --tnr-hero-ring: rgba(112, 43, 71, .2);
  --ink-soft: #6d4355;
  --surface-2: #fcf4f7;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--page); overflow-x: clip; }

body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--page);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

@supports not (overflow: clip) {
  html { overflow-x: hidden; }
}

button, a { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: 0; background: none; color: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.app-root {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0 0 calc(84px + env(safe-area-inset-bottom));
  background: var(--page);
  color: var(--ink);
}

/* ---------- app header ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 10px 16px;
  background: var(--page);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  flex: 0 0 42px;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 800;
  font-size: 18px;
  box-shadow: var(--shadow-1);
}
.brand strong { display: block; font-size: 16px; line-height: 1.2; letter-spacing: -.01em; }
.brand small { display: block; margin-top: 1px; color: var(--muted); font-size: 12px; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  box-shadow: var(--shadow-1);
}
.theme-toggle-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }

/* ---------- page shell ---------- */
.page-content {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 14px 16px 24px;
}

/* ---------- route transition ----------
   Every route renders its own <main class="page-content">, so switching pages
   mounts a fresh node and this animation replays on each navigation — the same
   thing a native app does when pushing a screen. */
/* The direction comes from <html data-page-dir>, written by RouteTransition:
   "forward" (a deeper screen, e.g. a list → its detail) enters from the right
   like a pushed screen, "back" (returning to a shallower screen) enters from the
   left, and "swap"/"initial" (tab switches, cold start) only fades.

   A back slide starts to the left on purpose: in a left-to-right document,
   overflow past the left edge is not scrollable, so it can never produce a
   transient scrollbar. A forward slide comes from the right, where
   `overflow-x: clip` on <html> keeps that transient overflow unscrollable. */
/* A forward push brings the new screen in from one full viewport width, so it
   travels exactly as far as the outgoing snapshot travels in the other
   direction; the pair reads as one motion instead of a slide-away. `backwards`
   fill means the page is already parked at its start offset on the first
   painted frame, so it never flashes at the final position first. */
@keyframes page-slide-in-forward {
  from { opacity: 1; transform: translate3d(100%, 0, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes page-slide-in-back {
  from { opacity: 1; transform: translate3d(-100%, 0, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes page-fade-in {
  from { opacity: 0; transform: translate3d(0, 10px, 0) scale(.996); }
  to   { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes page-block-rise {
  from { opacity: 0; transform: translate3d(0, 8px, 0); }
  to   { opacity: 1; transform: none; }
}

/* `backwards` (not `both`) is deliberate: after the animation the page returns
   to its normal, untransformed state, so no leftover transform keeps a
   stacking context alive or extends the scrollable overflow of the document. */
.page-content {
  animation: page-fade-in .22s cubic-bezier(.22, .61, .36, 1) backwards;
}
html[data-page-dir="forward"] main.page-content {
  animation-name: page-slide-in-forward;
  animation-duration: .28s;
  animation-timing-function: cubic-bezier(.4, 0, .2, 1);
}
html[data-page-dir="back"] main.page-content {
  animation-name: page-slide-in-back;
  animation-duration: .28s;
  animation-timing-function: cubic-bezier(.4, 0, .2, 1);
}

/* A short stagger on the first blocks gives the cascade an app uses. Only the
   first six children animate: a list with 200 cards must not put 200 elements
   into an opacity/transform animation on a phone. */
.page-content > *:nth-child(-n + 6) {
  animation: page-block-rise .24s cubic-bezier(.22, .61, .36, 1) backwards;
}
.page-content > *:nth-child(1) { animation-delay: .02s; }
.page-content > *:nth-child(2) { animation-delay: .04s; }
.page-content > *:nth-child(3) { animation-delay: .06s; }
.page-content > *:nth-child(4) { animation-delay: .08s; }
.page-content > *:nth-child(5) { animation-delay: .1s; }
.page-content > *:nth-child(6) { animation-delay: .12s; }

/* The snapshot of the screen being left. It is a static clone, so it only has to
   slide out; the new screen slides in underneath it, which is what makes the
   transition read as a push instead of a flicker. It sits below the header
   (z-index 10) so the branding stays put while the content moves. */
.page-snapshot {
  position: fixed;
  right: 0;
  left: 0;
  z-index: 5;
  background: var(--page);
  pointer-events: none;
  will-change: transform;
}
.page-snapshot[data-exit="forward"] {
  animation: snapshot-out-left .28s cubic-bezier(.4, 0, .2, 1) forwards;
}
.page-snapshot[data-exit="back"] {
  animation: snapshot-out-right .28s cubic-bezier(.4, 0, .2, 1) forwards;
}
@keyframes snapshot-out-left {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-100%, 0, 0); }
}
@keyframes snapshot-out-right {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(100%, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  /* `html[data-page-dir] main.page-content` is more specific than a bare
     `.page-content`, so the direction rules are cancelled here too. */
  .page-content,
  .page-content > *,
  html[data-page-dir] main.page-content,
  .page-snapshot {
    animation: none !important;
  }
  .page-snapshot {
    display: none !important;
  }
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  padding: 11px 16px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  box-shadow: var(--shadow-1);
}
.search-ic { font-size: 15px; color: var(--brand); }
.search-ph { flex: 1; }
.search-note { flex-shrink: 0; color: var(--muted); font-size: 12px; }
.search-bar.pending { color: var(--muted); }

/* ---------- hero ---------- */
.hero-card {
  position: relative;
  overflow: hidden;
  padding: 18px 16px;
  border-radius: 24px;
  background: var(--surface-soft);
  box-shadow: var(--shadow-2);
}
.home-hero h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  padding-right: 96px;
  font-size: clamp(22px, 6vw, 26px);
  line-height: 1.28;
  font-weight: 800;
  letter-spacing: -.02em;
}
.hero-underline {
  display: inline-block;
  width: 64px;
  height: 8px;
  margin-top: 6px;
  border-radius: 99px;
  background: var(--brand-mid);
}
.home-hero p {
  position: relative;
  z-index: 1;
  margin: 10px 0 14px;
  padding-right: 96px;
  color: var(--muted);
  font-size: 12.5px;
}
.hero-paw {
  position: absolute;
  right: 10px;
  bottom: 2px;
  font-size: 64px;
  opacity: .35;
  transform: rotate(-12deg);
  pointer-events: none;
}
.hero-cta { position: relative; z-index: 1; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 11px 18px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
}
.button.primary {
  border-color: transparent;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 22px -10px rgba(78, 124, 34, .7);
}
.button.quiet { color: var(--brand-strong); background: transparent; border-color: var(--line); }

/* ---------- persona cards ---------- */
.persona-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 4px;
}
.persona {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 6px;
  border: 1.5px solid transparent;
  border-radius: 18px;
  background: var(--surface);
  color: var(--muted);
  box-shadow: var(--shadow-1);
  text-align: center;
}
.persona-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  margin-bottom: 4px;
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 800;
  font-size: 13px;
}
.persona strong { font-size: 13px; color: var(--ink); }
.persona small { font-size: 12px; }
.persona.active {
  border-color: var(--brand);
  background: var(--surface);
  color: var(--brand-strong);
  box-shadow: 0 10px 26px -12px rgba(95, 148, 51, .55);
}
.persona.active small { color: var(--brand-strong); }

/* ---------- section head ---------- */
.home-section { margin-top: 22px; }
.section-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}
.section-chip {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  place-items: center;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 800;
}
.section-copy { min-width: 0; flex: 1; }
.section-copy h2 { margin: 0; font-size: 16.5px; font-weight: 750; letter-spacing: -.01em; }
.section-copy p { margin: 1px 0 0; color: var(--muted); font-size: 11.5px; }
.section-more { color: var(--muted); font-size: 12px; }
/* The section head link is a real route, so make it look and read like one. */
a.section-more { white-space: nowrap; }
a.section-more:hover,
a.section-more:focus-visible { color: var(--brand); }

/* used by other pages */
.section-title { display: flex; align-items: center; gap: 10px; margin: 20px 0 10px; }
.section-mark { width: 4px; height: 20px; flex: 0 0 4px; border-radius: 99px; background: var(--brand); }
.section-title h2 { margin: 0; font-size: 17px; letter-spacing: -.015em; }
.section-title p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }

/* ---------- action grid ---------- */
.action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.action-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 76px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  box-shadow: var(--shadow-2);
}
.action-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 12px;
  background: var(--brand-soft);
}
.action-link.tone-warn .action-icon { background: var(--warn-soft); }
.action-link.tone-danger .action-icon { background: var(--danger-soft); }
.action-link.tone-info .action-icon { background: var(--info-soft); }
.action-copy { min-width: 0; flex: 1; }
.action-copy strong { display: block; font-size: 14px; font-weight: 700; }
.action-copy small {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
}
.action-arrow { flex-shrink: 0; color: var(--muted); font-size: 20px; }
/* A pending task's "即将上线" used to sit beside the title and squeezed the CJK
   text down to one character per line on narrow phones. It now takes its own
   line under the copy, so the title and subtitle get the full card width. */
.action-link.pending { flex-wrap: wrap; }
.action-link.pending .action-arrow {
  flex-basis: 100%;
  padding-top: 3px;
  text-align: right;
  color: var(--muted);
  font-size: 12px;
}
.button.disabled {
  opacity: .7;
  cursor: default;
  pointer-events: none;
}

/* ---------- hospital cards ---------- */
.hospital-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 82%;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
}
.hospital-card {
  display: flex;
  gap: 12px;
  padding: 14px;
  scroll-snap-align: start;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-2);
  color: inherit;
}
.hospital-thumb {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  place-items: center;
  border-radius: 16px;
  background: var(--info-soft);
  color: var(--info);
  font-weight: 800;
}
.hospital-info { min-width: 0; flex: 1; }
.hospital-info strong { display: block; font-size: 14px; font-weight: 700; }
.hospital-region { display: block; margin-top: 2px; color: var(--muted); font-size: 11.5px; }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.tag {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
}
.tag-plain { background: var(--surface-tint); color: var(--muted); }

/* ---------- adoption cards ---------- */
.adopt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.adopt-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-2);
}
.adopt-photo {
  display: grid;
  /* Tall enough that a 4:3 photo shows fully rather than being letterboxed to
     a sliver, while still keeping the two-column card compact. */
  aspect-ratio: 4 / 3;
  place-items: center;
  background: var(--surface-tint);
  color: var(--brand-strong);
  font-size: 26px;
  font-weight: 800;
}
.adopt-body { padding: 11px 12px 13px; }
.adopt-body strong { display: block; font-size: 14px; font-weight: 750; }
.adopt-meta { display: block; margin-top: 2px; color: var(--muted); font-size: 11.5px; }
.adopt-remark {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 6px;
  color: var(--ink);
  font-size: 11.5px;
  opacity: .85;
}
/* Card data of the legacy list module qURZbi: the cityZone badge sits on the
   photo, and the submitter + adoption-request count close the card. */
.adopt-photo-wrap { position: relative; }
.adopt-city {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 1;
  max-width: calc(100% - 14px);
  overflow: hidden;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 12px;
  line-height: 1.6;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adopt-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.adopt-title-row strong {
  /* Full names stay readable: wrap to two lines instead of ellipsising. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  font-weight: 750;
  word-break: break-word;
}
.adopt-title-row .adopt-meta { flex-shrink: 0; margin-top: 0; }
.adopt-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}
.adopt-submitter {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}
.adopt-submitter > :last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adopt-avatar { flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.adopt-requests { display: flex; align-items: center; flex-shrink: 0; gap: 3px; color: var(--danger); font-size: 11.5px; font-weight: 700; }
.adopt-heart { font-size: 12px; line-height: 1; }
/* An adopted cat keeps its card, but the request count is replaced by the
   module's 已领养 label so it cannot be mistaken for an available cat. */
.adopt-adopted { flex-shrink: 0; color: var(--muted); font-size: 11.5px; font-weight: 700; }
.adopt-card.adopted .adopt-photo { filter: saturate(.75); }
/* Detail-page people card: sender identity plus every current applicant's
   avatar. The strip scrolls horizontally on a phone and wraps on desktop, so
   "all" applicants stay reachable without stretching the page. */
.adoption-people { display: grid; gap: 16px; }
.fosterer-row { display: flex; min-width: 0; align-items: center; gap: 12px; }
.people-avatar {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 19px;
  font-weight: 700;
}
.people-avatar img { width: 100%; height: 100%; object-fit: cover; }
.fosterer-copy { display: grid; min-width: 0; gap: 3px; }
.people-role { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .06em; }
.fosterer-copy strong { overflow-wrap: anywhere; font-size: 16px; }
.people-history { color: var(--muted); font-size: 12px; }
.applicant-block { display: grid; gap: 8px; padding-top: 13px; border-top: 1px solid var(--line); }
.applicant-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.applicant-head strong { font-size: 15px; }
.applicant-count { color: var(--brand-strong); font-size: 12px; font-weight: 700; }
.applicant-strip {
  display: flex;
  gap: 8px;
  padding: 2px 2px 6px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.applicant-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 0 0 1px var(--line);
}
.applicant-avatar img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 760px) {
  .applicant-strip { flex-wrap: wrap; overflow: visible; }
}
.adopt-sorts { margin-top: 10px; }
.chip-label { align-self: center; color: var(--muted); font-size: 12px; }
/* ---------- hospital card (legacy list module YzuE3a layout) ---------- */
.hospital-card { display: block; }
.chip-plain { background: var(--surface-tint); color: var(--muted); }
.hospital-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.hospital-wechat { color: var(--muted); font-size: 11.5px; word-break: break-all; }
.hospital-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px 12px;
  margin: 10px 0 0;
  padding: 10px 0 0;
  border-top: 1px dashed var(--line);
}
.hospital-facts .fact { min-width: 0; }
.hospital-facts dt { color: var(--muted); font-size: 12px; }
.hospital-facts dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 12.5px;
  word-break: break-word;
}
.hospital-facts dd.fact-price { color: var(--warn); font-weight: 700; }
.hospital-facts dd .fact-warn { color: var(--danger); font-style: normal; font-size: 11.5px; }
.hospital-contact { margin-top: 9px; display: flex; flex-direction: column; gap: 2px; }
.contact-line { color: var(--muted); font-size: 11.5px; word-break: break-word; }
.contact-phone { color: var(--brand); font-weight: 700; }
.hospital-benefit {
  margin: 9px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 11.5px;
  line-height: 1.6;
  opacity: .9;
}
.hospital-benefit b { color: var(--ink); }
/* ---------- hospital map (legacy 医院地图 module jaiMzi) ---------- */
.map-entry { margin-bottom: 12px; }
.map-entry-card { display: flex; align-items: center; gap: 12px; color: inherit; }
.map-entry-card strong { font-size: 14px; }
.map-entry-card p { margin: 3px 0 0; color: var(--muted); font-size: 11.5px; }
.map-entry-arrow { margin-left: auto; color: var(--muted); font-size: 20px; }
.map-page-hero { margin-top: 14px; }
.map-page-hero p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.map-regions { margin: 12px 0; }
.map-key-note { margin: 10px 0; }
.map-canvas-card { padding: 8px; overflow: hidden; }
.hospital-map-canvas { width: 100%; height: min(62vh, 560px); min-height: 320px; border-radius: 12px; overflow: hidden; background: #e9f0e5; }
.hospital-distance { color: var(--brand-strong); font-variant-numeric: tabular-nums; }
.home-location-button { margin: -4px 0 10px; }
.location-note { margin: 4px 0 10px; }
.hospital-distance { align-self: flex-start; white-space: nowrap; }
.map-error { margin: 8px 8px 2px; color: var(--warn); font-size: 12px; }
/* The marker info window content is an HTML string built by tencent-map.js
   (the legacy marker content, petHospital module vuqQri). It carries its own
   box because the window uses enableCustom, so it must undo the map's default
   nowrap/centering and keep long operator text wrapped and scrollable. */
.map-info-window { position: relative; max-width: 250px; padding: 10px 12px; background: #fff; border-radius: 10px; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.28); color: #263424; font: 13px/1.6 sans-serif; text-align: left; white-space: normal; }
.map-info-close { position: absolute; top: 2px; right: 4px; padding: 2px 6px; border: 0; background: none; color: #888; font-size: 18px; line-height: 1; cursor: pointer; }
.map-info-body { max-height: 240px; overflow-y: auto; padding-right: 14px; }
.map-info-window a { color: #397522; font-weight: 700; }
.map-info-window .map-info-package { color: #b3341f; font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hospital-detail-map { width: 100%; height: 220px; margin: 10px 0; border-radius: 10px; overflow: hidden; background: #e9f0e5; }
@media (max-width: 359px) { .hospital-map-canvas { min-height: 280px; height: 48vh; } }
.map-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
/* ---------- narrow phones ----------
   Two action columns leave each card ~145px at 320px; with the icon and the
   label the copy collapses to one character per line, so the quick tasks go
   single-column on the smallest screens. The adoption card grid deliberately
   stays at two columns — that is the phone layout the design uses and the cards
   stay readable. */
@media (max-width: 359px) {
  .page-content { padding-right: 12px; padding-left: 12px; }
  .action-grid { grid-template-columns: minmax(0, 1fr); }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card { min-width: 0; padding-right: 7px; padding-left: 7px; }
  .metric-value { overflow-wrap: anywhere; font-size: clamp(16px, 5.5vw, 19px); }
}
/* Filters are collapsed by default (like the legacy panel button) and the
   active ones stay visible as removable chips. */
.filter-toggle-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.filter-toggle-row > .button { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; }
.filter-badge {
  display: inline-grid;
  min-width: 16px;
  height: 16px;
  place-items: center;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.active-filters { margin-bottom: 0; }
.chip-active-filter { border: 1px solid var(--brand); background: var(--brand-soft); color: var(--ink); }

/* ---------- metrics ---------- */
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.metric-card {
  padding: 13px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  text-align: center;
}
.metric-value {
  display: block;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--brand-strong);
  font-variant-numeric: tabular-nums;
}
.metric-label { display: block; margin-top: 2px; font-size: 12px; font-weight: 650; }
.metric-note { display: block; margin-top: 1px; color: var(--muted); font-size: 12px; }

.data-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; }

/* ---------- skeleton ---------- */
.skeleton { pointer-events: none; }
.sk-line {
  display: block;
  height: 12px;
  margin: 8px 0;
  border-radius: 99px;
  background: var(--brand-soft);
  opacity: .7;
}
.sk-line.w40 { width: 40%; }
.sk-line.w60 { width: 60%; }
.sk-line.w70 { width: 70%; }
.sk-line.w85 { width: 85%; }

/* ---------- shared components (other pages) ---------- */
.surface-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.surface-card p { margin: 0 0 10px; font-size: 13px; }
.surface-note { color: var(--muted); font-size: 12px !important; }
.entity-row { display: flex; align-items: center; gap: 11px; }
.entity-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 800;
}
.entity-copy { min-width: 0; flex: 1; }
.entity-copy strong, .entity-copy span { display: block; }
.entity-copy strong { font-size: 13px; }
.entity-copy span { margin-top: 2px; color: var(--muted); font-size: 12px; }
.hospital-avatar { background: var(--info-soft); color: var(--info); }
.cat-avatar { background: var(--accent-soft); color: var(--accent); }
.cats-overview-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 14px 2px 8px; }
.cats-overview-head h2 { margin: 2px 0 0; font-size: 20px; }
.cats-count { color: var(--muted); font-size: 12px; white-space: nowrap; }
.cats-source-note { margin: 0 2px 10px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.cats-list { display: grid; gap: 10px; }
.cat-card { padding: 12px; }
.cat-card-main { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.cat-avatar {
  display: grid;
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 24px;
  font-weight: 800;
}
.cat-avatar img { width: 100%; height: 100%; object-fit: contain; }
.cat-card-copy { min-width: 0; flex: 1; }
.cat-card-copy > strong { display: block; overflow-wrap: anywhere; font-size: 16px; }
.cat-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.cat-tags .tag { margin: 0; }
.tag-age { background: var(--info-soft); color: var(--info); }
.tag-status { background: var(--brand-soft); color: var(--brand-strong); }
.cat-facts { display: flex; flex-wrap: wrap; gap: 5px 12px; margin-top: 9px; }
.cat-facts span { color: var(--muted); font-size: 12px; }
.cat-facts b { margin-right: 4px; color: var(--ink); }
.cats-empty { display: grid; justify-items: center; gap: 8px; padding: 18px 8px; text-align: center; }
.cats-empty > strong { font-size: 15px; }
.cats-empty > span:not(.cats-empty-mark) { max-width: 300px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.cats-empty-mark { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 18px; background: var(--brand-soft); color: var(--brand-strong); font-size: 25px; font-weight: 800; }
.cats-actions { display: grid; gap: 8px; margin-top: 12px; }
.cat-loading { display: grid; gap: 10px; }
.cat-loading .skeleton { display: grid; gap: 9px; min-height: 108px; }
.rating { color: var(--accent); font-size: 13px; font-weight: 800; }
.text-link { display: inline-block; margin-top: 10px; color: var(--brand); font-size: 12px; font-weight: 700; }
.api-state { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; }
.api-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.timeline-item {
  position: relative;
  margin-left: 5px;
  padding: 4px 0 14px 17px;
  border-left: 1px solid var(--line);
}
.timeline-item:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline-item:before {
  position: absolute;
  top: 7px;
  left: -4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  content: "";
}
.timeline-item b, .timeline-item span { display: block; font-size: 12px; }
.timeline-item span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.rating-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.rating-list span { padding: 5px 8px; border-radius: 8px; background: var(--surface-soft); color: var(--muted); font-size: 12px; }
.public-metrics { margin-top: 20px; }
.metric-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.metric-row div { padding: 13px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.metric-row b, .metric-row span { display: block; }
.metric-row b { overflow-wrap: anywhere; font-size: 13px; }
.metric-row span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.eyebrow { color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.empty-state { padding: 28px 18px; text-align: center; }
.empty-state h1 { font-size: 22px; }
.empty-state p { color: var(--muted); }
.home-grid { display: grid; gap: 18px; }
.home-main, .home-side { min-width: 0; }

/* ---------- bottom nav ---------- */
.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: flex;
  justify-content: space-around;
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.nav-item { display: flex; min-width: 54px; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); }
.nav-glyph { font-size: 17px; font-weight: 700; }
.nav-label { font-size: 12px; font-weight: 600; }
.nav-item.active { color: var(--brand); }

@media (min-width: 760px) {
  .bottom-nav { bottom: 20px; }
  .action-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hospital-scroll { grid-auto-columns: 46%; }
  .adopt-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home-grid { grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); }
}

/* ---------- list surfaces (medical / rescue) ---------- */
.search-row { display: flex; gap: 8px; margin-bottom: 10px; }
.search-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  box-shadow: var(--shadow-1);
}
.search-input::placeholder { color: var(--muted); }
.button.compact { min-height: 44px; padding: 10px 16px; }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
}
.chip.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-strong); font-weight: 700; }

.list-count { margin: 4px 0 10px; color: var(--muted); font-size: 12px; }
.list-stack { display: grid; gap: 12px; }
.list-card { display: block; }
.list-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.list-card-head strong { font-size: 15px; font-weight: 750; }
.list-card-sub { display: block; margin-top: 4px; color: var(--muted); font-size: 11.5px; }
.rating.muted { color: var(--muted); font-weight: 600; font-size: 11.5px; }

/* ---------- detail pages ---------- */
.detail-hero { margin-bottom: 14px; }
.detail-hero h1 { margin: 4px 0 8px; font-size: clamp(21px, 5.5vw, 26px); font-weight: 800; letter-spacing: -.02em; }
.detail-hero .tag-row { margin-top: 4px; }

.rating-row { display: flex; align-items: center; gap: 14px; }
.rating-big {
  min-width: 72px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--brand-strong);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.rating-meta { min-width: 0; flex: 1; }
.rating-meta strong { display: block; font-size: 13.5px; }
.rating-meta span { display: block; margin-top: 2px; color: var(--muted); font-size: 11.5px; }

.kv-list { display: grid; gap: 10px; margin-bottom: 12px; }
.kv { display: flex; gap: 10px; align-items: flex-start; }
.kv span { flex: 0 0 48px; color: var(--muted); font-size: 12px; }
.kv b { min-width: 0; flex: 1; font-size: 13px; font-weight: 650; }

.card-title { margin: 0 0 10px; font-size: 15px; font-weight: 750; }

.action-link.pending { opacity: .62; cursor: default; }
.action-link.pending .action-arrow { font-size: 12px; }

.load-more-wrap { margin-top: 14px; display: grid; gap: 8px; }
.load-more-status { margin: 0; color: var(--muted); font-size: 12px; text-align: center; }

/* ---------- real hospital neutering terms ---------- */
.offer-chip {
  display: inline-block;
  margin-top: 9px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.offer-prices { display: flex; gap: 10px; margin-bottom: 10px; }
.offer-price {
  flex: 1;
  padding: 11px 12px;
  border-radius: 16px;
  background: var(--brand-soft);
}
.offer-price span { display: block; color: var(--muted); font-size: 12px; }
.offer-price b {
  display: block;
  margin-top: 3px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--brand-strong);
  font-variant-numeric: tabular-nums;
}
.offer-note { margin: 8px 0 0; font-size: 12.5px; line-height: 1.65; }

/* ---------- real recommended vets ---------- */
.vet-item { display: flex; gap: 11px; padding: 11px 0; border-top: 1px solid var(--line); }
.vet-item:first-of-type { border-top: 0; }
.vet-photo {
  position: relative;
  flex: 0 0 66px;
  display: grid;
  height: 66px;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: var(--surface-tint);
  color: var(--brand-strong);
  font-size: 17px;
  font-weight: 800;
}
.vet-copy { min-width: 0; flex: 1; }
.vet-copy .review-head strong { font-size: 14px; font-weight: 750; }
.vet-copy .surface-note { display: block; margin-top: 2px; }
.vet-intro {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.65;
  white-space: pre-line;
}

/* ---------- recent service review list ---------- */
.review-item {
  margin-top: 10px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.review-item:first-of-type { margin-top: 0; }
.review-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.reviewer-profile { display: flex; align-items: center; gap: 9px; min-width: 0; }
.reviewer-avatar {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 750;
}
.reviewer-avatar img { width: 100%; height: 100%; object-fit: cover; }
.reviewer-meta { display: grid; gap: 2px; min-width: 0; }
.reviewer-name {
  overflow: hidden;
  max-width: 150px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.review-date {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.review-score-badge {
  display: inline-flex;
  flex: none;
  align-items: baseline;
  gap: 1px;
  padding: 4px 9px 5px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-variant-numeric: tabular-nums;
}
.review-score-badge b { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.review-score-badge small { font-size: 12px; font-weight: 600; }

.review-comment {
  margin: 9px 0 0;
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.review-cost {
  display: inline-block;
  margin-top: 9px;
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--surface-tint);
  color: var(--muted);
  font-size: 11.5px;
}
.button.wide { width: 100%; }

.adopt-card { display: block; }
/* ---------- adoption profile archive, grouped by type ---------- */
.profile-groups { display: grid; gap: 12px; }
.profile-group {
  --profile-accent: var(--brand);
  padding: 12px 13px 13px;
  border-radius: 16px;
  background: var(--brand-soft);
}
.profile-group.basic { --profile-accent: var(--brand); }
.profile-group.location { --profile-accent: var(--info); background: var(--info-soft); }
.profile-group.health { --profile-accent: var(--warn); background: var(--warn-soft); }
.profile-group.listing { --profile-accent: var(--muted); background: var(--surface-tint); }

.profile-group-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .01em;
}
.profile-group-label::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--profile-accent);
}

.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px 12px; }
.profile-item { min-width: 0; }
.profile-item span { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; }
.profile-item b {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

/* ---------- extra legacy photos on the adoption detail ---------- */
.adopt-gallery { display: block; margin-bottom: 12px; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; }
.gallery-main { width: 100%; margin-bottom: 0; }
.gallery-cell {
  position: relative;
  flex: 1 1 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 14px;
  background: var(--surface-tint);
  color: var(--brand-strong);
  display: grid;
  place-items: center;
  font-weight: 800;
}
.gallery-cell .photo-img { position: absolute; inset: 0; }

/* ---------- photo boxes (legacy-origin backed, full image, graceful fallback) ----------
   object-fit: contain so the whole photo is visible. cover cropped faces and
   bodies out of frame, which is unacceptable for adoption/medical records. */
.adopt-photo { position: relative; overflow: hidden; }
.photo-glyph { display: block; }
.photo-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.detail-photo {
  position: relative;
  display: grid;
  height: auto;
  aspect-ratio: 4 / 3;
  place-items: center;
  overflow: hidden;
  margin-bottom: 12px;
  border-radius: 20px;
  background: var(--surface-tint);
  color: var(--brand-strong);
  font-size: 34px;
  font-weight: 800;
}

/* ---------- public love-card / reimbursement disclosure ---------- */
.support-split { display: flex; gap: 10px; margin-bottom: 10px; }
.support-block {
  flex: 1;
  min-width: 0;
  padding: 12px 13px;
  border-radius: 16px;
  background: var(--surface-tint);
}
.support-block .eyebrow { display: block; }
.support-amount {
  display: block;
  margin-top: 5px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--brand-strong);
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.support-sub { display: block; margin-top: 3px; color: var(--muted); font-size: 11.5px; }

.support-years { margin-top: 12px; }
.support-year-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.support-year-row:first-of-type { border-top: 0; }
.support-year-row > span:nth-child(1) { flex: 0 0 56px; }
.support-year-row > span:nth-child(2) { flex: 0 0 56px; color: var(--muted); }
.support-year-row > span:nth-child(3) { flex: 1; text-align: right; font-weight: 700; }
.support-year { font-weight: 700; }
.support-year-amount { color: var(--brand-strong); }
.support-year-head {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}
.support-year-head > span:nth-child(3) { font-weight: 600; }

/* Ranking rows carry a hospital name, so the first column must grow instead of
   using the fixed width the year tables need. */
.rank-row { align-items: baseline; text-decoration: none; color: inherit; }
.rank-row > span:nth-child(1) { flex: 1 1 auto; min-width: 0; font-weight: 650; }
.rank-row > span:nth-child(2) { flex: 0 0 52px; text-align: right; }
.rank-row > span:nth-child(3) { flex: 0 0 56px; text-align: right; }
.rank-head > span:nth-child(1) { flex: 1 1 auto; }
.rank-head > span:nth-child(2) { flex: 0 0 52px; text-align: right; }
.rank-head > span:nth-child(3) { flex: 0 0 56px; text-align: right; }

/* ---------- public transparency ---------- */
.transparency-hero {
  position: relative;
  overflow: hidden;
  min-height: 236px;
  padding: 25px 22px 22px;
  border-radius: 28px 28px 28px 10px;
  background: var(--transparency-hero);
  color: var(--transparency-paper);
  box-shadow: var(--shadow-3);
}
.transparency-hero::after {
  position: absolute;
  right: -46px;
  bottom: -92px;
  width: 240px;
  height: 240px;
  border: 1px solid var(--transparency-orbit);
  border-radius: 50%;
  content: "";
}
.transparency-orbit {
  position: absolute;
  right: -13px;
  bottom: -62px;
  width: 178px;
  height: 178px;
  border: 1px solid var(--transparency-orbit);
  border-radius: 50%;
  pointer-events: none;
}
.orbit-two { right: 20px; bottom: -34px; width: 122px; height: 122px; }
.transparency-kicker { color: var(--brand-mid); font-size: 12px; font-weight: 800; letter-spacing: .18em; }
.transparency-hero h1 { position: relative; z-index: 1; margin: 13px 0 8px; font-family: var(--font-sans); font-size: clamp(25px, 7vw, 31px); line-height: 1.3; letter-spacing: .02em; }
.transparency-hero p { position: relative; z-index: 1; max-width: 295px; margin: 0; color: var(--transparency-copy); font-size: 11.5px; line-height: 1.7; }
.environment-badge { position: absolute; top: 19px; right: 18px; z-index: 1; padding: 5px 9px; border: 1px solid var(--transparency-badge-line); border-radius: 999px; color: var(--transparency-paper); font-size: 12px; }
.transparency-total { position: relative; z-index: 2; margin: -14px 10px 0; padding: 17px; border-radius: 21px 21px 21px 7px; }
.transparency-total-head, .transparency-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.transparency-total-head h2, .transparency-section-head h2 { margin: 2px 0 0; font-size: 15px; font-weight: 750; }
.verified-mark { padding: 5px 9px; border-radius: 7px 7px 7px 2px; background: var(--brand-soft); color: var(--brand-strong); font-size: 12px; font-weight: 750; }
.transparency-primary-number { display: flex; align-items: baseline; gap: 6px; margin-top: 12px; }
.transparency-primary-number strong { color: var(--brand-strong); font-size: 43px; font-weight: 850; letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.transparency-primary-number span { color: var(--muted); font-size: 13px; }
.transparency-primary-caption { margin-top: 5px; color: var(--muted); font-size: 12px; }
.transparency-split { display: grid; grid-template-columns: 1fr 1px 1fr; align-items: center; gap: 14px; margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); }
.transparency-split div { display: flex; align-items: baseline; gap: 6px; }
.transparency-split strong { font-size: 19px; font-variant-numeric: tabular-nums; }
.transparency-split span { color: var(--muted); font-size: 12px; }
.transparency-split i { height: 24px; background: var(--line); }
.transparency-other { display: flex; align-items: baseline; gap: 5px; margin-top: 8px; color: var(--muted); font-size: 12px; }
.transparency-other strong { color: var(--ink); font-size: 12px; }
.transparency-section { margin-top: 25px; }
.transparency-section-head { margin-bottom: 10px; }
.transparency-section-head h2 { font-size: 17px; }
.record-count { color: var(--muted); font-size: 12px; }
.transparency-records { display: grid; gap: 9px; }
.transparency-record { padding: 13px 14px; border-radius: 16px 16px 16px 5px; }
.record-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.record-type { padding: 4px 8px; border-radius: 5px; font-size: 12px; font-weight: 750; }
.record-type.free { background: #eaf3da; color: #3e6b22; }
.record-type.paid { background: #FFE6DF; color: #B83B2B; }
.record-status { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
.record-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.record-card-id { margin-top: 9px; color: var(--ink); font-size: 12px; font-weight: 750; letter-spacing: .025em; font-variant-numeric: tabular-nums; }
.record-card-bottom { display: flex; align-items: center; gap: 9px; margin-top: 7px; color: var(--muted); font-size: 12px; }
.record-card-bottom strong { margin-left: auto; color: var(--ink); font-size: 12px; }
.transparency-definition, .transparency-limits { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; padding: 14px; }
.definition-icon { display: grid; width: 21px; height: 21px; flex: 0 0 21px; place-items: center; border-radius: 50%; background: var(--info-soft); color: var(--info); font-family: var(--font-sans); font-size: 13px; font-weight: 800; }
.transparency-definition h3, .transparency-limits h3 { margin: 0; font-size: 12px; }
.transparency-definition p, .transparency-limits p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.transparency-limits { display: block; border-style: dashed; box-shadow: none; }
.transparency-limits h3 { margin-top: 4px; }
.transparency-footer { display: grid; gap: 3px; margin: 13px 2px 0; color: var(--muted); font-size: 12px; }
.transparency-skeleton { display: grid; gap: 7px; margin-bottom: 12px; }
.transparency-empty { margin-top: 8px; }

/* ---------- TNR community directory ---------- */
.tnr-hero {
  position: relative;
  overflow: hidden;
  min-height: 218px;
  padding: 23px 20px;
  border-radius: 9px 28px 9px 28px;
  background: var(--tnr-hero-bg);
  color: var(--tnr-hero-ink);
}
.tnr-hero::before {
  position: absolute;
  right: -56px;
  bottom: -116px;
  width: 260px;
  height: 260px;
  border: 1px solid var(--tnr-hero-ring);
  border-radius: 50%;
  content: "";
}
.tnr-kicker { color: var(--tnr-hero-kicker); font-size: 12px; font-weight: 850; letter-spacing: .15em; }
.tnr-hero h1 { position: relative; z-index: 1; margin: 12px 0 8px; font-family: var(--font-sans); font-size: clamp(22px, 6.4vw, 28px); line-height: 1.4; letter-spacing: .015em; }
.tnr-hero p { position: relative; z-index: 1; margin: 0; color: var(--tnr-hero-copy); font-size: 12px; line-height: 1.65; }
.tnr-seal { position: absolute; right: 22px; top: 25px; display: grid; width: 54px; height: 54px; place-content: center; border: 1px solid var(--tnr-hero-ring); border-radius: 50%; color: var(--tnr-hero-kicker); font-family: var(--font-sans); font-size: 12px; line-height: 1.25; text-align: center; transform: rotate(9deg); }
@media (max-width: 479px) {
  .tnr-hero h1 { max-width: calc(100% - 68px); }
}
.tnr-filter-row { display: flex; gap: 7px; overflow-x: auto; margin: 1px 0 10px; padding: 2px 1px 5px; scrollbar-width: none; }
.tnr-filter-row::-webkit-scrollbar { display: none; }
.tnr-filter-row .chip { flex: 0 0 auto; }
.tnr-list-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 1px 10px; color: var(--muted); font-size: 12px; }
.tnr-list-heading strong { color: var(--brand-strong); font-size: 19px; font-variant-numeric: tabular-nums; }
.tnr-list-heading span:last-child { text-align: right; }
.tnr-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 359px) {
  .tnr-card-grid { grid-template-columns: minmax(0, 1fr); }
}
.tnr-community-card { position: relative; display: flex; min-width: 0; min-height: 148px; flex-direction: column; padding: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px 18px 18px 5px; background: var(--surface); box-shadow: var(--shadow-1); }
.tnr-community-card::after { position: absolute; right: -26px; bottom: -40px; width: 90px; height: 90px; border: 1px solid var(--line); border-radius: 50%; content: ""; pointer-events: none; }
.tnr-card-top { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.tnr-card-symbol { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 8px 8px 8px 2px; background: var(--brand-soft); color: var(--brand-strong); font-family: var(--font-sans); font-size: 13px; font-weight: 800; }
.tnr-public-status { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.tnr-public-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.tnr-community-card h3 { position: relative; z-index: 1; margin: 10px 0 0; overflow-wrap: anywhere; font-size: 13px; line-height: 1.45; }
.tnr-card-bottom { position: relative; z-index: 1; display: grid; gap: 3px; margin-top: auto; padding-top: 9px; color: var(--muted); font-size: 12px; }
.tnr-public-id { position: relative; z-index: 1; margin-top: 6px; color: var(--muted); font-size: 8px; letter-spacing: .035em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tnr-howto { margin-top: 20px; padding: 16px 14px; }
.tnr-howto h2 { margin: 3px 0 13px; font-size: 15px; }
.tnr-steps { display: grid; grid-template-columns: 1fr 12px 1fr 12px 1fr; align-items: center; gap: 3px; text-align: center; }
.tnr-steps div { display: grid; justify-items: center; gap: 2px; }
.tnr-steps b { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand-strong); font-family: var(--font-sans); font-size: 14px; }
.tnr-steps strong { font-size: 12px; }
.tnr-steps span { color: var(--muted); font-size: 8px; }
.tnr-steps i { height: 1px; background: var(--line); }
.tnr-privacy, .tnr-query-time { margin: 9px 2px 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.tnr-data-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 13px; padding: 13px; }
.tnr-note-mark { display: grid; width: 20px; height: 20px; flex: 0 0 20px; place-items: center; border-radius: 50%; background: var(--info-soft); color: var(--info); font-family: var(--font-sans); font-weight: 800; }
.tnr-data-note strong { font-size: 12px; }
.tnr-data-note p { margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.tnr-skeleton-card { min-height: 142px; padding: 12px; }

@media (min-width: 600px) {
  .tnr-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- WeChat login (/login, /me) ---------- */
.hint {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.hint:last-child { margin-bottom: 0; }
.button-link {
  display: inline-block;
  margin-top: 8px;
  padding: 9px 16px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.qr-block { display: grid; gap: 10px; justify-items: center; }

/* --- 我的猫: edit form, per-card actions and delete confirmation --------- */
.cat-form { display: grid; gap: 12px; }
.cat-field { display: grid; gap: 5px; }
.cat-label { color: var(--muted); font-size: 12px; font-weight: 700; }
.cat-field textarea, .cat-field input, .cat-field select {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-tint);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}
.cat-field input:focus, .cat-field select:focus, .cat-field textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.cat-field input.invalid, .cat-field select.invalid, .cat-field textarea.invalid { border-color: var(--danger); background: var(--danger-soft); }
.cat-hint { color: var(--muted); font-size: 12px; }
.cat-error { color: var(--danger); font-size: 12px; font-weight: 600; }
.cat-form-error {
  margin: 0;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12px;
}
.cat-form-actions { display: flex; gap: 10px; align-items: center; }
.cat-form-actions .button-link { margin-top: 0; border: 0; font: inherit; font-size: 13px; cursor: pointer; }
.cat-form-actions .button-link.solid { background: var(--brand); color: #fff; }
.cat-form-actions .button-link:not(.solid) { background: var(--surface-tint); color: var(--muted); }
.cat-form-actions .button-link[disabled] { opacity: .55; cursor: default; }
.cat-card-actions { display: flex; gap: 8px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); }
.cat-action {
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-tint);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.cat-action:active { background: var(--brand-soft); }
.cats-actions .action-link.primary-action { cursor: pointer; }
.cats-actions .action-link.primary-action .action-arrow { color: var(--brand); font-size: 16px; }
.cat-confirm {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border-radius: 11px;
  background: var(--danger-soft);
}
.cat-confirm > span { color: var(--ink); font-size: 12px; line-height: 1.55; }
.cat-confirm-actions { display: flex; gap: 8px; }
.cat-confirm-actions .button-link {
  margin-top: 0;
  padding: 7px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.cat-confirm-actions .button-link.danger { background: var(--danger); color: #fff; }
.cat-confirm-actions .button-link[disabled] { opacity: .55; cursor: default; }
/* The QR must stay square and crisp: a stretched or blurry code will not scan. */
.qr-image {
  width: 220px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  image-rendering: pixelated;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
  border: 1px solid var(--line, rgba(0, 0, 0, .08));
}
.entity-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
}
/* ---------- 近期完成记录 (legacy 公示 card: hospital + two photos) ---------- */
.record-card-hospital {
  display: block;
  margin-top: 8px;
  color: var(--text, inherit);
  font-weight: 600;
  text-decoration: none;
}
a.record-card-hospital { color: var(--brand-strong); }
.record-card-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.record-photo {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: var(--brand-soft);
}
/* contain, not cover: these are surgical records, and cropping a cat out of
   frame is not acceptable. */
.record-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.record-photo figcaption {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 12px;
}
/* The confirmation button on the phone's scan-result page. */
.scan-confirm {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}
.scan-confirm:disabled {
  opacity: .6;
}
/* ---------- header: brand on the left, the visitor on the right ---------- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.header-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 800;
  text-decoration: none;
}
.header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.header-avatar-initial { font-size: 15px; }
/* Placeholder keeps the layout from jumping while the session loads. */
.header-avatar-placeholder { opacity: .35; }
.header-login {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
/* The official logo is a square white-background JPEG, so the tile keeps its
   rounded shape and turns white to match it, and the artwork is contained
   rather than cropped. */
img.brand-mark {
  object-fit: contain;
  background: #fff;
  padding: 2px;
}
/* ---------- adoption detail: one gallery, thumbnails swap the big frame ----------
   The two keyframes are identical on purpose: switching the animation *name* by
   parity is what makes the browser replay it on every swap, where re-applying
   the same name would not restart anything. */
.gallery-main { margin-bottom: 8px; }
.gallery-thumbs { display: flex; gap: 8px; margin-bottom: 12px; }
button.gallery-cell {
  padding: 0;
  border: 0;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
button.gallery-cell:hover { transform: translateY(-2px); }
button.gallery-cell.active {
  box-shadow: 0 0 0 2px var(--brand), 0 6px 16px -8px rgba(95, 148, 51, .8);
}
button.gallery-cell:focus-visible { outline: 2px solid var(--brand-strong); outline-offset: 2px; }
.detail-photo-img.swap-a { animation: photo-swap-a .32s cubic-bezier(.22, .61, .36, 1); }
.detail-photo-img.swap-b { animation: photo-swap-b .32s cubic-bezier(.22, .61, .36, 1); }
@keyframes photo-swap-a {
  from { opacity: .25; transform: scale(1.03); }
  to   { opacity: 1;   transform: none; }
}
@keyframes photo-swap-b {
  from { opacity: .25; transform: scale(1.03); }
  to   { opacity: 1;   transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .detail-photo-img.swap-a,
  .detail-photo-img.swap-b { animation: none; }
  button.gallery-cell { transition: none; }
}

/* ---- 领养写侧：我要送养 / 我的送养 / 领养意向 ---------------------------- */
/* The publish form reuses .cat-form, so only the new pieces are styled here. */
.rescue-entries { display: flex; gap: 10px; margin: 4px 0 12px; }
.rescue-entries .button { flex: 1; }

.adoption-section {
  display: grid;
  gap: 12px;
  border: 0;
  border-top: 1px solid var(--line, rgba(0, 0, 0, .08));
  padding: 14px 0 0;
  margin: 0;
}
.adoption-section:first-of-type { border-top: 0; padding-top: 0; }
.adoption-section legend {
  font-size: 13px;
  font-weight: 700;
  padding: 0;
  margin-bottom: 2px;
}

.cat-choice { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.cat-choice input { accent-color: var(--brand); width: 16px; height: 16px; }

.cat-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: start;
  padding: 8px 14px;
  border: 1px dashed var(--brand);
  border-radius: 10px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.cat-file input { display: none; }

.adoption-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
}
/* contain, not cover: a cropped face makes an adoption photo useless. */
.adoption-photo {
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-tint);
}
.adoption-photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.intent-cat-photo, .my-adoption-photo {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--surface-tint);
}

.adoption-intent-card { display: grid; gap: 10px; }
.adoption-intent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.adoption-intent-head strong { font-size: 15px; }
.adoption-intent-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
/* A pressed heart is filled; an idle one is a light outline. */
.adoption-intent-count .adopt-heart { opacity: .35; }

/* The questionnaire sheet: a bottom overlay, drawn from the same tokens as the
   rest of the forms. The backdrop closes it; the sheet scrolls internally so a
   long set of questions never pushes the page. */
.intent-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(20, 32, 22, .45);
}
.intent-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 41;
  max-height: 84vh;
  overflow-y: auto;
  padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
  border-radius: 18px 18px 0 0;
  background: var(--surface);
  box-shadow: 0 -12px 32px rgba(0, 0, 0, .18);
}
.intent-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.intent-sheet-head strong { font-size: 16px; }
.intent-sheet-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-tint);
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}
.intent-form { margin-top: 8px; }
.cat-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
}
.cat-check input { flex: none; margin-top: 3px; }

.my-adoption-list { display: grid; gap: 10px; margin-bottom: 12px; }
.my-adoption {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  border-left: 3px solid var(--line, rgba(0, 0, 0, .08));
  background: var(--surface-tint);
}
.my-adoption-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.my-adoption-status { font-size: 12px; font-weight: 700; }
.my-adoption.pending { border-left-color: var(--warn); }
.my-adoption.pending .my-adoption-status { color: var(--warn); }
.my-adoption.live { border-left-color: var(--brand); }
.my-adoption.live .my-adoption-status { color: var(--brand); }
.my-adoption.done { border-left-color: var(--info); }
.my-adoption.done .my-adoption-status { color: var(--info); }
.my-adoption.rejected { border-left-color: var(--danger); }
.my-adoption.rejected .my-adoption-status { color: var(--danger); }
/* The reject reason is the one thing the submitter must act on, so it is the
   only element on the card that is given colour and weight of its own. */
.my-adoption-reason {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--danger);
}

/* The applications panel on one's own listing: answers only, no identity. */
.intent-applications {
  display: grid;
  gap: 8px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed var(--line, rgba(0, 0, 0, .12));
}
.intent-application-list { display: grid; gap: 10px; }
.applicant-history {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  color: var(--muted);
  font-size: 12px;
}
.applicant-history strong { color: var(--brand-strong); font-size: 12px; }
.intent-application {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line, rgba(0, 0, 0, .08));
}
.intent-answers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 6px 10px;
  margin: 0;
}
.intent-answers dt { color: var(--muted); font-size: 12px; font-weight: 700; }
.intent-answers dd { margin: 2px 0 0; font-size: 13px; }
.intent-answer-text {
  display: grid;
  gap: 2px;
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}
.intent-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.intent-tag {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--brand-soft, var(--surface-tint));
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
}

.section-title.small h3 { margin: 0; font-size: 15px; }

@media (max-width: 359px) {
  .rescue-entries { flex-direction: column; }
}


/* --- 站内沟通（领养双方聊天） ---------------------------------------------- */
.chat-list { display: grid; gap: 10px; }
.chat-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-1);
}
.chat-avatar {
  display: grid;
  flex: none;
  width: 44px;
  height: 44px;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 17px;
  font-weight: 800;
}
.chat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-item-copy { display: grid; gap: 2px; flex: 1; min-width: 0; }
.chat-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.chat-item-head strong { font-size: 14px; }
.chat-item-time { flex: none; color: var(--muted); font-size: 12px; }
.chat-item-preview {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-item-tags { display: flex; gap: 6px; align-items: center; }
.chat-tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 12px;
  font-weight: 700;
}
.chat-unread {
  display: grid;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.chat-thread-page { display: grid; gap: 10px; }
.chat-back { display: inline-block; color: var(--muted); font-size: 13px; text-decoration: none; }
.chat-thread-head {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.chat-thread-head strong { display: block; font-size: 15px; }
.chat-thread-state { color: var(--muted); font-size: 12px; }
.chat-bubbles { display: grid; gap: 10px; margin: 12px 0; }
.chat-bubble-row { display: flex; justify-content: flex-start; }
.chat-bubble-row.mine { justify-content: flex-end; }
.chat-bubble {
  display: grid;
  gap: 4px;
  max-width: 78%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-tint);
}
.chat-bubble.mine { background: var(--brand-soft); border-color: var(--brand-mid); }
.chat-bubble-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.chat-bubble-image {
  width: 100%;
  max-width: 220px;
  border-radius: 10px;
  background: var(--surface);
  object-fit: contain;
}
.chat-bubble-time { justify-self: end; color: var(--muted); font-size: 12px; }
.chat-sealed {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}
.chat-composer {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.chat-composer textarea {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-tint);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  resize: vertical;
}
.chat-composer textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.chat-composer-actions { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.chat-composer-actions .button-link { margin-top: 0; border: 0; font: inherit; font-size: 13px; cursor: pointer; }
.chat-composer-actions label.button-link { display: inline-block; }
.chat-composer-actions .button-link:not(.solid) { background: var(--surface-tint); color: var(--muted); }
.chat-composer-actions .button-link[disabled] { opacity: .55; cursor: default; }
.chat-file { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.chat-attachment {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--surface-tint);
}
.chat-attachment img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: var(--surface);
  object-fit: contain;
}
.chat-attachment .button-link { margin-top: 0; background: var(--surface); color: var(--danger); font-size: 12px; }

/* WeChat-like private inbox and conversation. Keep the visual language quiet:
   warm-white list, soft neutral message canvas, and familiar green sent bubbles. */
.wx-inbox-screen {
  width: min(100%, 760px);
  min-height: calc(100dvh - 64px - 84px - env(safe-area-inset-bottom));
  margin: 0 auto;
  background: var(--surface);
}
.page-content.wx-inbox-screen { padding: 0 0 24px; }
.wx-inbox-header {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  gap: 9px;
  padding: 10px 16px 9px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px);
}
.wx-inbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wx-inbox-heading h1 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.wx-inbox-heading p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.wx-inbox-add {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-tint);
  color: var(--ink);
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  text-decoration: none;
}
.wx-inbox-search {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #f1f1f1;
  color: #9a9a9a;
}
.wx-inbox-search:focus-within { outline: 2px solid var(--brand); outline-offset: 1px; }
.wx-search-icon { width: 14px; height: 14px; flex: 0 0 14px; }
.wx-inbox-search input { min-width: 0; flex: 1; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 13px; }
.wx-inbox-search input:focus { outline: 0; }
.wx-inbox-search input::placeholder { color: #9a9a9a; }
.wx-search-clear {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #c9c9c9;
  color: #fff;
  font-size: 13px;
  line-height: 1;
}
.wx-inbox-no-match { padding: 46px 16px; color: var(--muted); font-size: 13px; text-align: center; }
.wx-inbox-list { background: var(--surface); }
.wx-inbox-loading { display: grid; grid-template-columns: 56px 1fr; gap: 7px 12px; padding: 18px; }
.wx-inbox-loading .sk-line { height: 12px; align-self: center; }
.wx-inbox-loading .sk-line:nth-child(odd) { grid-row: span 2; width: 56px; height: 56px; border-radius: 8px; }
.wx-inbox-loading .sk-line:nth-child(3) { grid-column: 2; }
.chat-item {
  position: relative;
  min-height: 78px;
  gap: 12px;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 64%, transparent);
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
  transition: background .14s ease;
}
.chat-thread-head { min-height: 58px; padding-bottom: 4px; border-bottom: 0; }
.chat-item:hover, .chat-item:active { background: var(--surface-tint); }
.chat-avatar.inbox-avatar { width: 52px; height: 52px; border-radius: 8px; }
.chat-item-copy { align-self: stretch; align-content: center; gap: 5px; padding-right: 42px; }
.chat-item-head { align-items: center; }
.chat-item-head strong { overflow: hidden; font-size: 15px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.chat-item-time { color: var(--muted); font-size: 12px; }
.chat-item-preview { color: color-mix(in srgb, var(--ink) 56%, var(--muted)); font-size: 12px; }
.chat-item-tags { position: absolute; right: 16px; bottom: 19px; min-width: 18px; justify-content: flex-end; }
.chat-tag { padding: 2px 6px; background: var(--surface-tint); color: var(--muted); font-weight: 500; }
.chat-unread { min-width: 19px; height: 19px; padding: 0 5px; background: #fa5151; font-size: 12px; }
.wx-inbox-state { display: grid; min-height: 54vh; place-content: center; gap: 12px; padding: 24px; }
.wx-inbox-state .cats-empty { max-width: 340px; margin: 0; }
.wx-empty-mark {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  justify-self: center;
  border-radius: 22px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 28px;
  font-weight: 700;
}

.wx-chat-shell { display: contents; }
.wx-chat-screen {
  position: fixed;
  top: 0;
  bottom: calc(72px + env(safe-area-inset-bottom));
  z-index: 11;
  display: flex;
  width: min(100%, 760px);
  height: auto;
  flex-direction: column;
  margin: 0 auto;
  padding-top: calc(58px + env(safe-area-inset-top));
  padding-bottom: 0;
  overflow: hidden;
  background: #ededed;
  color: #191919;
}
.wx-chat-screen.page-content { width: min(100%, 760px); padding-right: 0; padding-left: 0; }
.wx-chat-screen.page-snapshot {
  position: fixed;
  top: 0 !important;
  right: auto;
  bottom: calc(72px + env(safe-area-inset-bottom));
  left: 50%;
  width: min(100%, 760px);
  height: auto;
  padding: calc(58px + env(safe-area-inset-top)) 0 0;
  overflow: hidden;
  transform: translateX(-50%);
}
.page-snapshot.chat-snapshot {
  position: fixed;
  right: auto;
  left: attr(data-chat-left px, 0px);
  width: attr(data-chat-width px, 100%);
  overflow: hidden;
}
.page-snapshot.chat-snapshot .wx-chat-log { overflow: hidden; }
.page-snapshot.chat-snapshot .wx-chat-composer,
.page-snapshot.chat-snapshot .wx-chat-archive,
.page-snapshot.chat-snapshot .bottom-nav { visibility: hidden; }
.wx-chat-screen.page-snapshot .wx-chat-log { overflow: hidden; }
.wx-chat-screen.page-snapshot::after { display: none; }
.wx-chat-screen.page-snapshot .bottom-nav { display: none; }
.wx-chat-screen.page-snapshot .wx-chat-composer,
.wx-chat-screen.page-snapshot .wx-chat-archive { visibility: hidden; }
.wx-chat-header {
  position: absolute;
  top: env(safe-area-inset-top);
  right: 0;
  left: 0;
  z-index: 2;
  display: grid;
  min-height: 58px;
  grid-template-columns: 76px minmax(0, 1fr) 76px;
  align-items: center;
  padding: 4px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  background: rgba(247, 247, 247, .96);
  backdrop-filter: blur(12px);
}
.wx-chat-back { display: inline-flex; min-width: 0; align-items: center; gap: 2px; color: #161616; text-decoration: none; }
.wx-back-chevron { font-family: Arial, sans-serif; font-size: 32px; line-height: 1; }
.wx-back-label { overflow: hidden; color: #576b95; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.wx-chat-title { display: grid; min-width: 0; justify-items: center; gap: 1px; }
.wx-chat-title strong { max-width: 100%; overflow: hidden; font-size: 15px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.wx-chat-title span { color: #999; font-size: 12px; }
.wx-chat-more {
  display: flex;
  width: 40px;
  height: 34px;
  justify-self: end;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  border-radius: 8px;
  background: none;
}
.wx-chat-more span { width: 5px; height: 5px; border-radius: 50%; background: #4a4a4a; }
.wx-chat-more:disabled { opacity: .35; }
.wx-chat-more:active { background: rgba(0, 0, 0, .06); }
.wx-chat-conversation { position: relative; display: flex; min-height: 0; flex: 1; flex-direction: column; }
.wx-chat-body { position: relative; display: flex; min-height: 0; flex: 1; }
.wx-new-message-pill {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #576b95;
  font-size: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .14);
}
.wx-pill-arrow { font-size: 13px; line-height: 1; }
.wx-chat-log {
  min-height: 0;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  overflow-anchor: none;
  padding: 16px 13px 22px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.wx-history-button {
  display: block;
  margin: 0 auto 18px;
  padding: 7px 13px;
  border: 1px solid rgba(0, 0, 0, .07);
  border-radius: 999px;
  background: rgba(255, 255, 255, .6);
  color: #8a8a8a;
  font-size: 12px;
}
.wx-history-button:disabled { opacity: .55; }
.wx-message-list { display: grid; min-height: 100%; align-content: end; gap: 15px; margin: 0; }
.wx-message-entry { display: grid; gap: 7px; }
.wx-time-divider {
  justify-self: center;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(0, 0, 0, .045);
  color: #a2a2a2;
  font-size: 12px;
  line-height: 1.3;
}
.wx-message-image-button { position: relative; z-index: 1; display: block; padding: 0; border: 0; background: none; cursor: zoom-in; }
.wx-message-row { display: flex; min-width: 0; align-items: flex-start; justify-content: flex-start; gap: 8px; }
.wx-message-row.mine { flex-direction: row-reverse; justify-content: flex-start; }
.wx-message-avatar { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; overflow: hidden; border-radius: 6px; background: #d8d8d8; color: #727272; font-size: 16px; font-weight: 650; }
.wx-message-avatar img { width: 100%; height: 100%; object-fit: cover; }
.wx-message-bubble {
  position: relative;
  display: grid;
  min-width: 28px;
  max-width: min(74%, 470px);
  gap: 4px;
  padding: 10px 12px;
  border: 0;
  border-radius: 4px 9px 9px 9px;
  background: #fff;
  overflow-wrap: anywhere;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .035);
}
.wx-message-bubble::before { position: absolute; top: 12px; left: -5px; width: 9px; height: 9px; transform: rotate(45deg); background: #fff; content: ""; }
.wx-message-bubble.mine { border-radius: 9px 4px 9px 9px; background: #95ec69; }
.wx-message-bubble.mine::before { right: -5px; left: auto; background: #95ec69; }
.wx-message-bubble p { position: relative; z-index: 1; margin: 0; color: #171717; font-size: 15px; line-height: 1.48; white-space: pre-wrap; }
.wx-message-image { position: relative; z-index: 1; display: block; width: auto; max-width: min(56vw, 240px); max-height: 320px; border-radius: 6px; object-fit: contain; }
.wx-message-bubble.image-only { padding: 0; background: transparent; box-shadow: none; }
.wx-message-bubble.image-only::before { display: none; }
.wx-chat-empty { display: grid; min-height: 40vh; align-content: center; justify-items: center; gap: 5px; color: #898989; text-align: center; }
.wx-chat-empty span { font-size: 14px; }
.wx-chat-empty small { font-size: 12px; }
.wx-chat-composer {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 60px;
  flex: 0 0 auto;
  gap: 7px;
  margin: 0;
  padding: 8px 10px;
  border-top: 1px solid rgba(0, 0, 0, .08);
  background: #f7f7f7;
}
.wx-composer-bar { display: flex; min-height: 44px; align-items: flex-end; gap: 8px; }
.wx-attach-button { position: relative; display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border: 1px solid #b8b8b8; border-radius: 50%; color: #333; }
.wx-attach-button:focus-within { outline: 3px solid #07c160; outline-offset: 2px; }
.wx-attach-button label { position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; }
.wx-attach-button:has(input:focus-visible) { outline: 3px solid #07c160; outline-offset: 2px; }
.wx-attach-button span { font-size: 27px; font-weight: 300; line-height: 1; }
.wx-chat-composer textarea { min-width: 0; min-height: 38px; max-height: 112px; flex: 1; padding: 8px 10px; border: 0; border-radius: 5px; background: #fff; color: #1a1a1a; font: inherit; font-size: 15px; line-height: 1.4; resize: none; overflow-y: hidden; }
.wx-chat-composer textarea:focus { outline: 0; }
.wx-send-button { min-height: 36px; flex: 0 0 auto; padding: 0 13px; border-radius: 5px; background: #07c160; color: #fff; font-size: 13px; font-weight: 600; }
.wx-send-button:disabled { background: #a5d9bb; color: rgba(255, 255, 255, .9); cursor: default; }
.wx-chat-error { padding: 6px 9px; border-radius: 5px; background: #fff2f0; color: #c33; font-size: 12px; }
.wx-pending-photo { position: relative; justify-self: start; display: flex; align-items: center; gap: 8px; padding: 5px 7px; border: 1px solid rgba(0, 0, 0, .08); border-radius: 8px; background: #fff; box-shadow: 0 4px 18px rgba(0, 0, 0, .1); }
.wx-pending-photo img { width: 54px; height: 54px; border-radius: 5px; object-fit: cover; }
.wx-pending-label { color: #7b7b7b; font-size: 12px; }
.wx-pending-photo button { display: grid; width: 21px; height: 21px; place-items: center; border: 0; border-radius: 50%; background: #555; color: #fff; font-size: 16px; line-height: 1; }
.wx-chat-archive { display: grid; justify-items: center; gap: 4px; margin: 0; padding: 13px 18px calc(15px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(0, 0, 0, .06); border-radius: 0; background: #f7f7f7; color: #7b7b7b; text-align: center; }
.wx-lock-mark { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; background: #e1e1e1; color: #858585; font-size: 12px; }
.wx-chat-archive p { margin: 0; font-size: 12px; }
.wx-chat-archive small { font-size: 12px; }
.wx-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, .38);
}
.wx-chat-sheet {
  display: grid;
  width: min(100%, 760px);
  gap: 13px;
  padding: 8px 20px calc(20px + env(safe-area-inset-bottom));
  border-radius: 14px 14px 0 0;
  background: #fff;
  color: #191919;
}
.wx-sheet-handle { justify-self: center; width: 38px; height: 4px; margin-bottom: 2px; border-radius: 999px; background: #d4d4d4; }
.wx-sheet-profile { display: flex; align-items: center; gap: 12px; }
.wx-sheet-avatar { width: 46px; height: 46px; flex: 0 0 46px; }
.wx-sheet-copy { display: grid; min-width: 0; gap: 2px; }
.wx-sheet-copy strong { font-size: 15px; }
.wx-sheet-copy small { color: #999; font-size: 12px; }
.wx-sheet-note { margin: 0; color: #7b7b7b; font-size: 12px; line-height: 1.5; }
.wx-sheet-action { display: block; padding: 12px; border-radius: 8px; background: #f1f1f1; color: #191919; font-size: 14px; text-align: center; text-decoration: none; }
.wx-sheet-close { padding: 10px; border: 0; border-radius: 8px; background: #f1f1f1; color: #576b95; font-size: 14px; }
.wx-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .92);
}
.wx-image-viewer img { max-width: 94vw; max-height: 88vh; object-fit: contain; }
.wx-image-viewer-close {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: 14px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 20px;
  line-height: 1;
}
.wx-chat-state { display: grid; min-height: 0; flex: 1; place-content: center; padding: 24px; background: #ededed; }
.wx-chat-state .cats-empty { max-width: 340px; }
.wx-chat-skeleton { align-content: start; gap: 12px; padding-top: 36px; }
@media (min-width: 760px) {
  .wx-chat-shell { display: block; }
  .wx-chat-shell > .bottom-nav { bottom: 20px; }
  .wx-inbox-screen { min-height: calc(100dvh - 64px - 84px); border-right: 1px solid var(--line); border-left: 1px solid var(--line); }
  .wx-chat-screen { top: 20px; bottom: 80px; height: auto; padding-top: 58px; padding-bottom: 0; border: 1px solid rgba(0, 0, 0, .08); border-radius: 10px; box-shadow: 0 12px 48px rgba(0, 0, 0, .12); }
  .wx-chat-screen.page-snapshot,
  .page-snapshot.chat-snapshot { top: 0 !important; bottom: 0; left: max(0px, calc((100% - 760px) / 2)); width: min(100%, 760px); padding-top: 58px; border: 1px solid rgba(0, 0, 0, .08); border-radius: 10px; }
  .wx-chat-header { top: 0; border-radius: 10px 10px 0 0; }
  .wx-chat-log { padding-right: 30px; padding-left: 30px; }
  .wx-chat-composer { padding-right: 18px; padding-left: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .wx-chat-log { scroll-behavior: auto; }
}

/* Standard friend graph: exact-code discovery and explicit consent. */
.friends-page { display: grid; gap: 12px; }
.friend-code-card { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px; border:1px solid var(--brand-mid); border-radius:18px 18px 18px 5px; background:linear-gradient(120deg,var(--brand-soft),var(--surface)); }
.friend-code-copy { display:grid; min-width:0; gap:4px; }
.friend-code-copy strong { color:var(--brand-strong); font-size:23px; letter-spacing:.1em; user-select:all; }
.friend-code-copy small { max-width:420px; color:var(--muted); font-size: 12px; }
.friend-code-mark { display:grid; width:42px; height:42px; flex:none; place-items:center; border-radius:14px; background:var(--brand); color:#fff; font-size:25px; }
.friend-section { display:grid; gap:12px; }
.friend-search-form { display:flex; align-items:center; gap:8px; }
.friend-search-form .search-input { min-width:0; font-family:ui-monospace,Consolas,monospace; letter-spacing:.08em; }
.friend-lookup-result,.friend-request-row,.friend-contact-row { display:flex; min-width:0; align-items:center; gap:10px; padding:10px 0; border-top:1px solid var(--line); }
.friend-avatar { display:grid; width:42px; height:42px; flex:none; place-items:center; overflow:hidden; border-radius:10px; background:var(--brand-soft); color:var(--brand-strong); font-size:16px; font-weight:700; }
.friend-avatar img { width:100%; height:100%; object-fit:cover; }
.friend-request-row .entity-copy,.friend-contact-row .entity-copy,.friend-lookup-result .entity-copy { flex:1; min-width:0; }
.friend-request-action { display:flex; flex:1 1 100%; flex-wrap:wrap; gap:7px; }
.friend-verification { width:100%; min-width:0; min-height:38px; padding:8px 10px; border:1px solid var(--line); border-radius:9px; background:var(--surface); color:var(--ink); font:inherit; font-size:12px; }
.friend-text-button { padding:7px 4px; color:var(--muted); font-size:12px; white-space:nowrap; }
.friend-text-button:hover { color:var(--danger); }
.friend-confirm { display:flex; align-items:center; gap:4px; }
.friend-notice { margin:0; color:var(--brand-strong); font-size:12px; }
@media (max-width:479px) {
  .friend-request-row,.friend-contact-row { flex-wrap:wrap; }
  .friend-request-row .entity-copy,.friend-contact-row .entity-copy { flex:1 1 calc(100% - 58px); }
  .friend-request-action { margin-left:52px; }
  .friend-contact-row > .button.compact { margin-left:52px; }
}

/* ---------- member registration / payment / renewal ---------- */
.member-fee {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-tint);
}
.member-fee-label { color: var(--muted); font-size: 12.5px; }
.member-fee-amount {
  color: var(--brand-strong);
  font-size: 30px;
  font-weight: 850;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}
.member-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.member-sms-row { display: flex; align-items: stretch; gap: 8px; }
.member-sms-row input { min-width: 0; flex: 1; }
.member-sms-button {
  flex: 0 0 auto;
  padding: 0 12px;
  border: 1px solid var(--brand-mid);
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.member-sms-button:disabled { opacity: .55; cursor: default; }
.pay-native, .pay-jsapi { display: grid; justify-items: center; gap: 10px; margin-top: 12px; }
.pay-qr {
  display: grid;
  place-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.pay-qr img { width: 200px; height: 200px; object-fit: contain; }
.pay-jsapi .button-link { margin-top: 0; }

.member-scene-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.member-scene-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 700;
}
.member-scene-title {
  color: var(--ink);
  font-size: 15px;
  font-weight: 750;
}
.member-scene-sub {
  width: 100%;
  margin: 2px 0 0;
}
.member-success-banner {
  margin-bottom: 12px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--brand-mid);
  background: linear-gradient(135deg, var(--brand-soft) 0%, #ffffff 100%);
  box-shadow: var(--shadow-1);
}
.member-success-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.member-success-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-strong);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}
.member-success-title {
  display: block;
  color: var(--brand-strong);
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 4px;
}
.member-success-desc {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.65;
}
.member-vip-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 12px;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid rgba(62, 107, 34, .22);
  background: radial-gradient(circle at 92% 14%, rgba(255, 255, 255, .55) 0%, transparent 46%),
              linear-gradient(135deg, #dceec2 0%, #eef7df 52%, #f8fbf2 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), var(--shadow-2);
}
.member-vip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.member-vip-badge {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--brand-strong);
}
.member-vip-state {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 11.5px;
  font-weight: 700;
}
.member-vip-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
}
.member-vip-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(62, 107, 34, .14);
}
.member-vip-item {
  display: grid;
  gap: 2px;
}
.member-vip-label {
  font-size: 11.5px;
  color: var(--muted);
}
.member-vip-value {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.member-vip-perks {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
}

/* === design-polish-20261026-member-success-ui === */

/* 顶部毛玻璃导航与桌面端悬浮胶囊 Dock */
.app-header {
  background: color-mix(in srgb, var(--surface) 86%, var(--page));
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
}
.bottom-nav {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  box-shadow: 0 -4px 20px rgba(38, 51, 28, .06);
}
.nav-item {
  min-width: 60px;
  padding: 5px 10px;
  border-radius: 14px;
  transition: color .16s ease, background-color .16s ease, transform .12s ease;
}
.nav-item.active {
  color: var(--brand-strong);
  background: var(--brand-soft);
  font-weight: 700;
}
.nav-label { font-size: 12px; font-weight: 600; }
@media (min-width: 760px) {
  .bottom-nav {
    bottom: 18px;
    width: min(92%, 520px);
    padding: 6px 10px;
    border: 1px solid var(--brand-mid);
    border-radius: 999px;
    box-shadow: 0 14px 36px -10px rgba(38, 51, 28, .18), 0 2px 8px rgba(38, 51, 28, .06);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
}

/* 补齐 .button.ghost、/me 登录卡片与全局卡片悬停微交互 */
.button.ghost, .button.quiet {
  border-color: var(--brand-mid);
  background: var(--surface);
  color: var(--brand-strong);
}
.button.ghost:hover, .button.quiet:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
}
a.action-link:hover, a.adopt-card:hover, a.hospital-card:hover, a.map-entry-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-mid);
  box-shadow: var(--shadow-3);
}
.action-link:has(.action-title) {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  border-color: var(--brand-mid);
  background: linear-gradient(135deg, var(--brand-soft) 0%, var(--surface) 100%);
}
.action-title { display: block; color: var(--brand-strong); font-size: 14px; font-weight: 800; }
.action-sub { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.45; }

/* 电子 VIP 会员卡面、费用收银条与刷新按钮实体化 */
.member-page { max-width: 640px; }
.member-vip-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid rgba(62, 107, 34, .22);
  background: radial-gradient(circle at 92% 14%, rgba(255, 255, 255, .55) 0%, transparent 46%),
              linear-gradient(135deg, #dceec2 0%, #eef7df 52%, #f8fbf2 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), var(--shadow-2);
}
.member-vip-meta {
  background: rgba(255, 255, 255, .86);
  border: 1px solid rgba(62, 107, 34, .14);
}
.member-fee {
  align-items: center;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-tint);
}
.pay-native button, .member-page button:not(.primary):not(.member-sms-button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 18px;
  border: 1.5px solid var(--brand-mid);
  border-radius: 999px;
  background: var(--surface);
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-1);
}

/* TNR / 公示页过小字号提亮 */
.tnr-public-id,
.tnr-steps span,
.tnr-card-bottom,
.transparency-footer {
  font-size: 11.5px;
}

/* ==========================================================================
   深圳猫网 V2 全站视觉与未定义组件完整修复补丁 (fix_all_pages.css)
   覆盖版本：newszcat-frontend-78c148c99322a3e6 / da75cc52b2a4725e
   解决问题：
   1. /coupons 绝育优惠券中心 14 个未定义 class 及原生丑陋 <select>/<input> 修复
   2. /me 个人中心 8 项双站互通资产统计 (.stat-grid / .stat-cell) 宫格卡片化修复
   3. 全站相邻 .surface-card 零间距粘连 (0px gap) 与底部悬浮 Dock 遮挡修复
   4. /rescue/adoptions/:id 领养详情页桌面端巨幅占位图 (546px) 与巨型缩略图 (237px) 比例收束
   5. /medical/hospitals/:id 医院详情页未定义评价筛选栏 (.section-heading-row / .filter-row) 与 .chip-active-filter 优先级修复
   6. /medical/map 医院地图页 .map-pin 列表卡片间距与双列布局优化
   7. /rescue/publish、/cats/new、/rescue/mine 表单控件自定义下拉箭头、桌面端双列与 .notice 提示框补齐
   8. /transparency、/friends、/chats 缺失类 (.support-head / .orbit-one / .section-heading-row) 补齐与桌面端宽屏适配
   ========================================================================== */

/* ---------- 1. 主题与全局容器节奏、桌面端宽屏与底部留白 ---------- */
.theme-leafy {
  color-scheme: light;
}

.page-content {
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

@media (min-width: 960px) {
  .page-content:not(.wx-inbox-screen):not(.wx-chat-screen):not(.member-page) {
    width: min(94%, 920px);
    padding: 20px 24px 104px;
  }
}

/* 修复全站相邻卡片 0px 粘连问题 */
.surface-card + .surface-card,
.surface-card + .form-card,
.form-card + .surface-card,
.surface-card + .stat-grid,
.stat-grid + .action-grid,
.surface-card + .action-grid,
.card-grid + .surface-card,
.surface-card + .card-grid,
.chip-row + .surface-card,
.chip-row + .card-grid,
.detail-hero + .surface-card {
  margin-top: 14px;
}

/* ---------- 2. /me 个人中心 8 项双站互通资产统计宫格 (.stat-grid / .stat-cell) ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

@media (max-width: 420px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
}

@media (min-width: 960px) {
  .stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }
}

.stat-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 74px;
  padding: 12px 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  box-shadow: var(--shadow-1);
  text-align: center;
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.stat-cell:hover {
  transform: translateY(-2px);
  border-color: var(--brand-mid);
  box-shadow: var(--shadow-2);
}

.stat-cell strong {
  display: block;
  color: var(--brand-strong);
  font-size: 22px;
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.stat-cell span {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.3;
}

/* ---------- 3. /coupons 家猫绝育优惠券中心全套组件与表单样式 ---------- */
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 750;
  color: var(--ink);
  letter-spacing: .03em;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-tint);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 750;
  line-height: 1.4;
  white-space: nowrap;
}

.badge.success {
  background: var(--brand-soft);
  color: var(--brand-strong);
  border: 1px solid var(--brand-mid);
}

.badge.info {
  background: var(--info-soft);
  color: var(--info);
  border: 1px solid color-mix(in srgb, var(--info) 24%, transparent);
}

.badge.warn {
  background: var(--warn-soft);
  color: var(--warn);
  border: 1px solid color-mix(in srgb, var(--warn) 24%, transparent);
}

.badge.danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 24%, transparent);
}

.detail-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.6;
}

.detail-list li {
  position: relative;
  padding-left: 14px;
}

.detail-list li::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.button.secondary {
  border-color: var(--brand-mid);
  background: var(--surface);
  color: var(--brand-strong);
  box-shadow: var(--shadow-1);
}

.button.secondary:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
}

/* 优惠券申领表单 (.form-card / .form-row-2 / .field / .checkbox-row) */
.form-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-2);
}

.form-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 560px) {
  .form-row-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field > span {
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 700;
}

/* 统一美化全站 input / select / textarea（覆盖 .field 与 .cat-field） */
.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea,
.cat-field input:not([type="checkbox"]):not([type="radio"]),
.cat-field select,
.cat-field textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background-color: var(--surface-tint);
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  line-height: 1.45;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.field select,
.cat-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%233e6b22' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  cursor: pointer;
}

.field textarea,
.cat-field textarea {
  min-height: 84px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.cat-field input:focus,
.cat-field select:focus,
.cat-field textarea:focus {
  outline: none;
  border-color: var(--brand);
  background-color: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent);
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-tint);
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.55;
  cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand);
  cursor: pointer;
}

.form-error {
  margin: 0 0 10px;
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
  border-radius: 12px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 650;
}

.member-feedback-banner {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--brand-mid);
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand-soft) 0%, var(--surface) 100%);
  box-shadow: var(--shadow-1);
}

.member-feedback-banner p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.6;
}

/* 我的优惠券列表卡片 (.card-grid / .card) */
.card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

@media (min-width: 860px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

.card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-2);
}

.card h3 {
  margin: 2px 0 4px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.card details {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-tint);
}

/* ---------- 4. /rescue/adoptions/:id 领养详情页桌面端巨图与缩略图比例收束 ---------- */
.adopt-gallery {
  margin-bottom: 14px;
}

.detail-photo {
  max-height: 380px;
}

.gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.gallery-cell {
  flex: 0 0 88px;
  width: 88px;
  height: 88px;
  max-width: 88px;
}

@media (max-width: 479px) {
  .gallery-cell {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    max-width: 72px;
  }
}

.fosterer-avatar {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.ended-adoption {
  border-color: var(--line);
  background: var(--surface-tint);
}

/* ---------- 5. /medical/hospitals/:id 医院详情页 & /medical/map 医院地图修复 ---------- */
.hospital-location-card {
  margin-bottom: 14px;
}

.section-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.section-heading-row .card-title {
  margin-bottom: 0;
}

.filter-row,
.service-review-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

/* 修复 .chip 覆盖 .chip-active-filter 的样式优先级问题 */
.chip.chip-active-filter {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 700;
}

.review-item--service {
  background: var(--surface-2);
}

.map-pin {
  margin-top: 12px;
}

.map-distance {
  color: var(--brand-strong);
  font-weight: 700;
}

/* ---------- 6. /rescue/publish、/cats/new、/transparency 等页面专有容器与提示框 ---------- */
.home-page,
.cats-page,
.cat-form-page,
.adoption-publish-page,
.my-adoptions-page {
  display: block;
}

@media (min-width: 760px) {
  .cat-form-page .cat-form,
  .adoption-publish-page .adoption-section {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
  }
  .cat-form-page .cat-form > .cat-form-error,
  .cat-form-page .cat-form > .cat-form-actions,
  .cat-form-page .cat-form > .cat-field:has(textarea),
  .adoption-publish-page .adoption-section > legend,
  .adoption-publish-page .adoption-section > .cat-hint,
  .adoption-publish-page .adoption-section > .cat-choice,
  .adoption-publish-page .adoption-section > .cat-field:has(textarea),
  .adoption-publish-page .adoption-section > .cat-file,
  .adoption-publish-page .adoption-section > .adoption-photos {
    grid-column: 1 / -1;
  }
}

.notice {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-tint);
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.55;
}

.notice.notice-ok {
  border-color: var(--brand-mid);
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 650;
}

.support-head {
  margin-bottom: 12px;
}

.orbit-one {
  right: -13px;
  bottom: -62px;
  width: 178px;
  height: 178px;
}

.friend-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.location-inline-status {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-strong);
}

.wx-history-pending {
  text-align: center;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--muted);
}

.member-success-banner.register,
.member-success-banner.renew {
  border: 1px solid var(--brand-mid);
}

/* ==========================================================================
   20261026-me-v3: /me 标准三段式个人中心、全局 ActionLink 矢量 SVG 图标与 TNR 指标闭环样式
   ========================================================================== */
.page-content {
  padding-top: 16px;
}

.page-content > .section-title:first-child {
  margin-top: 2px;
  margin-bottom: 10px;
}

/* 1. 全局 ActionLink 图标与列表规范（左侧 38x38 居中矢量 SVG，移动端单列通栏，桌面端双列） */
.action-grid,
.me-service-list {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px !important;
}

@media (min-width: 760px) {
  .action-grid,
  .me-service-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px 12px !important;
  }
}

.action-link {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 60px !important;
  padding: 12px 14px !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  background: var(--surface) !important;
  box-shadow: var(--shadow-1) !important;
  text-align: left !important;
  width: 100%;
}

.action-icon {
  width: 38px !important;
  height: 38px !important;
  flex: 0 0 38px !important;
  border-radius: 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  background: var(--brand-soft) !important;
  color: var(--brand-strong) !important;
}

.action-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

.action-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.action-copy strong {
  display: block;
  font-size: 14.5px !important;
  font-weight: 750 !important;
  line-height: 1.3 !important;
  color: var(--ink);
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

.action-copy small {
  display: block !important;
  margin-top: 2px !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  color: var(--muted);
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  -webkit-line-clamp: 1 !important;
}

.action-arrow {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0 !important;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.action-link.pending {
  opacity: .72;
  cursor: default;
  flex-wrap: nowrap !important;
}

.action-link.pending .action-arrow {
  flex-basis: auto !important;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-tint);
  color: var(--muted);
  font-size: 12px !important;
  font-weight: 600;
}

/* 2. /me 第一段：顶部「一体化会员与账户名片卡」（.me-hero-card，总高 <= 145px） */
.me-hero-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-1);
  padding: 12px 14px 8px;
  margin-bottom: 10px;
}

.me-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
}

.me-hero-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.me-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 18px;
  font-weight: 800;
  border: 1px solid var(--brand-mid);
}

.me-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.me-hero-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.me-hero-copy strong {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.me-card-pill {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.me-vip-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--brand-mid);
  background: var(--surface-tint);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.me-vip-btn:hover {
  background: var(--brand-soft);
}

.me-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.me-stat-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 2px 4px;
  text-decoration: none;
  text-align: center;
}

.me-stat-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 18%;
  right: 0;
  width: 1px;
  height: 64%;
  background: var(--line);
}

.me-stat-item strong {
  display: block;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.me-stat-item--zero strong {
  color: var(--ink-soft);
  font-weight: 700;
  opacity: .75;
}

.me-stat-item span {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--muted);
  white-space: nowrap;
}

/* 3. /me 第二段：「我的公益与医疗权益」单卡 4 列图标/数字横栏（.me-equity-card） */
.me-equity-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-1);
  padding: 11px 12px 10px;
  margin-bottom: 10px;
}

.me-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.me-card-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink);
  word-break: keep-all;
  overflow-wrap: normal;
  line-break: strict;
}

.me-card-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.me-equity-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.me-equity-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  border-radius: 10px;
  background: var(--surface-tint);
  text-decoration: none;
  text-align: center;
  transition: background-color .15s ease;
}

.me-equity-item:hover {
  background: var(--brand-soft);
}

.me-equity-item strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--brand-strong);
  font-variant-numeric: tabular-nums;
}

.me-equity-item--zero strong {
  color: var(--ink-soft);
  font-weight: 700;
}

.me-equity-item span {
  display: block;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* 4. /rescue/tnr 流浪猫绝育指标配额卡片与列表紧凑样式 */
.tnr-quota-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

@media (min-width: 760px) {
  .tnr-quota-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
}

.tnr-quota-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s ease, background-color .15s ease;
}

.tnr-quota-card.selected {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.tnr-quota-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 6px;
  min-width: 0;
}

.tnr-quota-region {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-strong);
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-tint);
  white-space: nowrap;
  flex: 0 1 auto;
  max-width: 100%;
}

.tnr-quota-num {
  font-size: 12px;
  font-weight: 800;
  color: var(--brand-strong);
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
  word-break: keep-all;
}

.tnr-quota-num.empty {
  color: var(--muted);
  font-weight: 600;
}

/* Mobile: keep CJK title unbroken; shrink quota badge so it stays inside the card */
@media (max-width: 759px) {
  .me-equity-card .me-card-head {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 4px 8px;
  }

  .me-equity-card .me-card-title {
    font-size: 12.5px;
    line-height: 1.35;
    word-break: keep-all;
    overflow-wrap: normal;
    line-break: strict;
  }

  .me-equity-card .me-card-sub {
    font-size: 12px;
  }

  .tnr-quota-card {
    padding: 9px 10px;
    gap: 5px;
  }

  .tnr-quota-region {
    font-size: 12px;
    padding: 1px 5px;
  }

  .tnr-quota-num {
    font-size: 12px;
    letter-spacing: -0.01em;
    line-height: 1.25;
  }

  .tnr-quota-name {
    font-size: 13px;
  }
}

.tnr-quota-name {
  font-size: 13.5px;
  font-weight: 750;
  color: var(--ink);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tnr-quota-meta {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 20261026-tnr-mobile-fix
 * Target: /rescue/tnr @ 390x844
 * Fixes QA: (1) summary subtitle mid-word wrap on indicator label
 *           (2) hospital quota badge overflow (~9-16px)
 * Desktop >=760px intentionally unchanged.
 */

.tnr-list-heading {
  flex-wrap: wrap;
  align-items: baseline;
  row-gap: 2px;
}

.tnr-list-heading span:last-child {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  word-break: keep-all;
  overflow-wrap: normal;
  line-break: strict;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 759px) {
  .tnr-list-heading {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 8px;
    row-gap: 2px;
    align-items: baseline;
  }

  .tnr-list-heading strong {
    grid-column: 1;
  }

  .tnr-list-heading span:last-child {
    grid-column: 1 / -1;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: keep-all;
    line-break: strict;
  }

  .tnr-quota-card {
    min-width: 0;
    overflow: hidden;
    padding: 10px;
  }

  .tnr-quota-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
  }

  .tnr-quota-region {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .tnr-quota-num {
    max-width: 100%;
    font-size: 12px;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .tnr-quota-name,
  .tnr-quota-meta {
    min-width: 0;
  }
}

@media (max-width: 360px) {
  .tnr-quota-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==========================================================================
   20261026-pc-responsive-v2: 深圳猫网 PC 桌面端（>=760px / >=960px / >=1280px）深度自适应补丁
   原则：移动端（<760px）零改动；
   桌面端核心改造：
   1. 将 .bottom-nav 从底部悬浮移入顶部 .app-header 居中（top:11px; bottom:auto），彻底消除遮挡末行卡片（如 /me 退出登录、/rescue/tnr 末行医院卡）与“手机底部 Tab 栏”违和感！
   2. 顶栏与主容器对齐并扩宽至 1160px（>=960px）/ 1240px（>=1280px），内页（含 /me/chats、/member 等）全面脱离 760px 窄条。
   3. 首页、医疗、TNR、个人中心、领养详情、透明公示、我的猫/好友全面升级 PC 多列网格与左右分栏。
   ========================================================================== */

/* ---------- 1. 桌面端导航栏上移至顶栏居中（零遮挡 + 原生 PC 顶部导航体验） ---------- */
@media (min-width: 960px) {
  .app-root {
    padding-bottom: 32px;
  }

  .app-header {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: 68px;
    padding-left: max(24px, calc((100vw - 1160px) / 2 + 24px));
    padding-right: max(24px, calc((100vw - 1160px) / 2 + 24px));
  }

  /* 将原本固定在底部的 .bottom-nav 嵌入顶部 Header 正中央，完全不遮挡页面底部任何卡片 */
  .bottom-nav {
    position: fixed;
    top: 11px;
    bottom: auto !important;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    z-index: 35;
    width: auto;
    max-width: calc(100vw - 460px);
    margin: 0;
    padding: 4px 8px;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 92%, var(--page));
    box-shadow: var(--shadow-1);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
  }

  .bottom-nav .nav-item {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: auto;
    padding: 7px 14px;
    border-radius: 999px;
    white-space: nowrap;
  }

  .bottom-nav .nav-glyph {
    font-size: 14px;
    line-height: 1;
  }

  .bottom-nav .nav-label {
    font-size: 13px;
    font-weight: 650;
    line-height: 1;
  }
}

@media (min-width: 1280px) {
  .app-header {
    padding-left: max(32px, calc((100vw - 1240px) / 2 + 28px));
    padding-right: max(32px, calc((100vw - 1240px) / 2 + 28px));
  }

  .bottom-nav .nav-item {
    padding: 7px 16px;
  }
}

/* ---------- 2. 桌面端全局主容器与各内页（含 /me/chats）扩宽，消除两侧大留白 ---------- */
@media (min-width: 960px) {
  /* 标准综合/列表页扩至 1160px，底部不再需要给悬浮 Dock 留 104px 空白 */
  .page-content:not(.wx-inbox-screen):not(.wx-chat-screen):not(.member-page):not(.cat-form-page):not(.adoption-publish-page) {
    width: min(94%, 1160px);
    padding: 24px 24px 48px;
  }

  /* 会员办理、新增猫咪、发布送养页扩至 960px 舒适桌面宽度 */
  .page-content.member-page,
  .page-content.cat-form-page,
  .page-content.adoption-publish-page {
    width: min(92%, 960px);
    max-width: 960px;
    padding: 24px 24px 48px;
  }

  /* 修复 QA 指出的 /me/chats (.wx-inbox-screen) 760px 单列窄条与两侧大留白问题：扩至 1040px 桌面卡片容器 */
  .wx-inbox-screen,
  .page-content.wx-inbox-screen {
    width: min(94%, 1040px);
    min-height: calc(100dvh - 116px);
    margin: 20px auto 40px;
    padding: 0 0 24px;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-2);
    overflow: hidden;
  }

  .wx-inbox-header {
    padding: 16px 24px 14px;
  }

  .chat-item {
    padding: 14px 24px;
  }

  /* 私信对话页 (.wx-chat-screen) 桌面端同样扩至 1040px */
  .wx-chat-screen.page-content {
    width: min(94%, 1040px);
    margin: 16px auto 32px;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-2);
    overflow: hidden;
  }
}

@media (min-width: 1280px) {
  .page-content:not(.wx-inbox-screen):not(.wx-chat-screen):not(.member-page):not(.cat-form-page):not(.adoption-publish-page) {
    width: min(92%, 1240px);
    padding: 28px 28px 56px;
  }

  .page-content.member-page,
  .page-content.cat-form-page,
  .page-content.adoption-publish-page,
  .wx-inbox-screen,
  .page-content.wx-inbox-screen,
  .wx-chat-screen.page-content {
    width: min(92%, 1080px);
    max-width: 1080px;
  }
}

/* ---------- 3. 首页（.home-page）：4 列快捷任务 + 3 列医院卡片 + Hero 宽屏化 ---------- */
@media (min-width: 760px) {
  /* 首页快捷任务恢复 4×2 宫格，不与 /me 个人中心冲突 */
  .home-page .action-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
}

@media (min-width: 960px) {
  .home-page .hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) auto;
    align-items: center;
    gap: 16px 28px;
    padding: 28px 32px;
  }

  .home-page .hero-card > .hero-cta {
    margin-top: 0;
    justify-self: end;
  }

  /* 首页附近可信医院从手机横滑条切换为 PC 3 列网格 */
  .home-page .hospital-scroll {
    grid-auto-flow: row;
    grid-auto-columns: unset;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    overflow-x: visible;
    padding-bottom: 0;
  }
}

/* ---------- 4. 医疗医院列表（/medical）与详情页（/medical/hospitals/:id）PC 双列化 ---------- */
@media (min-width: 960px) {
  /* 29 家合作医院列表：PC 端双列网格等高排布 */
  .list-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
  }

  .list-stack > .hospital-card,
  .list-stack > .list-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    margin-top: 0 !important;
  }

  .search-row {
    max-width: 680px;
  }

  /* 医院详情页「拨打电话」等全宽按钮在 PC 端收束为左对齐胶囊按钮 */
  .surface-card > a.button.primary.full,
  .surface-card > button.button.primary.full,
  .hospital-detail-map + .kv-list + a.button,
  .kv-list + a.button.primary {
    width: auto;
    min-width: 180px;
    max-width: 260px;
    display: inline-flex;
  }

  .hospital-detail-map {
    height: 300px;
  }
}

/* ---------- 5. 领养列表（/rescue）与领养详情（/rescue/adoptions/:id）PC 宽屏化 ---------- */
@media (min-width: 960px) {
  .adopt-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }

  /* 领养详情页相册：左大图 + 右竖排缩略图 */
  .adopt-gallery {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 104px;
    gap: 12px;
    align-items: start;
  }

  .adopt-gallery .detail-photo {
    max-height: 420px;
    margin-bottom: 0;
  }

  .adopt-gallery .gallery-thumbs {
    flex-direction: column;
    margin-top: 0;
    max-height: 420px;
    overflow-y: auto;
  }
}

/* ---------- 6. 绝育指标（/rescue/tnr）、优惠券（/coupons）、透明公示（/transparency） ---------- */
@media (min-width: 960px) {
  .tnr-quota-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .tnr-quota-card {
    padding: 14px 16px;
    gap: 8px;
  }

  /* 桌面端展示完整 2 行地址/特惠说明，不再单行省略 */
  .tnr-quota-meta {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.45;
    min-height: 2.9em;
  }

  .transparency-hero p,
  .tnr-hero p {
    max-width: 640px;
    font-size: 13px;
  }

  .transparency-records,
  .cats-list,
  .friend-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (min-width: 1280px) {
  /* 1280+ 宽屏下 TNR 29 家医院配额升级为 4 列 */
  .tnr-quota-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  /* /me 个人中心服务入口在 1280+ 升级为 3 列宫格 */
  .me-page .me-service-list {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px 14px !important;
  }
}

/* ---------- 7. /me 个人中心与 /member 会员中心桌面端双栏/舒展布局 ---------- */
@media (min-width: 960px) {
  .me-hero-card {
    padding: 18px 22px 14px;
    margin-bottom: 14px;
  }

  .me-equity-card {
    padding: 16px 20px 14px;
    margin-bottom: 14px;
  }

  .me-equity-grid {
    gap: 10px;
  }

  .me-equity-item {
    padding: 10px 8px;
  }

  /* 会员页：VIP 电子卡与办理/续费卡在桌面端支持左右并排 */
  .member-page {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
  }

  .member-page > .section-title,
  .member-page > .section-sub,
  .member-page > .member-feedback-banner,
  .member-page > .member-success-banner,
  .member-page > .surface-card:only-of-type {
    grid-column: 1 / -1;
  }

  .member-page > .surface-card,
  .member-page > .member-vip-card {
    margin-top: 0 !important;
  }
}

/* 1280+ 4列 TNR 配额卡与 3列 /me 服务卡防溢出加固 */
@media (min-width: 1280px) {
  .tnr-quota-card {
    min-width: 0;
    overflow: hidden;
  }

  .tnr-quota-num {
    font-size: 11.5px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .me-page .me-service-list .action-link {
    min-width: 0;
    overflow: hidden;
  }
}

/* 960px–1180px 中等宽屏：收紧左侧品牌副标题与中间导航内边距，严防顶栏碰擦 */
@media (min-width: 960px) and (max-width: 1180px) {
  .brand small {
    max-width: 168px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .bottom-nav .nav-item {
    padding: 6px 10px;
    gap: 5px;
  }
}

/* ==========================================================================
   20261027-ref-natural-design
   ========================================================================== */
    /* ============================================================
       SHARED DESIGN LANGUAGE COMPONENTS
       ============================================================ */
    .card-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px;
    }
    .card-head-left {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .card-head-left h3 {
      font-size: 15px;
      font-weight: 800;
      color: var(--ink-900);
    }
    .card-head-sub {
      font-size: 12px;
      color: var(--ink-400);
      margin-left: 4px;
    }
    .more-link {
      font-size: 11.5px;
      color: var(--ink-400);
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      gap: 2px;
    }
    .green-bar-ind {
      width: 4px;
      height: 15px;
      border-radius: 99px;
      background: var(--green-brand);
    }
    .tag-pill {
      font-size: 12px;
      padding: 2px 7px;
      border-radius: 6px;
      background: var(--bg-tag-green);
      color: var(--green-dark);
      font-weight: 600;
      white-space: nowrap;
    }
    .tag-pill.orange {
      background: var(--bg-tag-orange);
      color: var(--orange-warm);
    }
    .btn-green-pill {
      background: var(--green-brand);
      color: #FFFFFF;
      border: none;
      border-radius: 999px;
      padding: 7px 14px;
      font-size: 12px;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      white-space: nowrap;
    }
    .btn-outline-pill {
      background: #FFFFFF;
      border: 1.5px solid var(--green-brand);
      color: var(--green-dark);
      border-radius: 999px;
      padding: 6px 14px;
      font-size: 12px;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      white-space: nowrap;
    }

    /* Hero Banner in Reference Style (Soft Mint-Green + Paw Watermarks + Cat Photo + Original SZCAT Copy & CTAs) */
    .ref-hero-banner {
      background: linear-gradient(135deg, #F4F8EC 0%, #E7F1D8 100%);
      border-radius: 18px;
      padding: 18px 16px 16px;
      position: relative;
      overflow: hidden;
      display: grid;
      grid-template-columns: 1.32fr 0.68fr;
      align-items: center;
      border: 1px solid #DCE9C8;
    }
    .ref-hero-left {
      position: relative;
      z-index: 2;
    }
    .ref-hero-title {
      font-size: 18.5px;
      font-weight: 800;
      color: #2A2421;
      line-height: 1.32;
      margin-bottom: 6px;
    }
    .ref-hero-title span {
      color: var(--green-dark);
    }
    .ref-hero-sub {
      font-size: 12px;
      color: var(--ink-600);
      margin-bottom: 12px;
    }
    .ref-hero-btns {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }
    .ref-hero-cat {
      width: 100%;
      height: 118px;
      object-fit: cover;
      border-radius: 14px;
      position: relative;
      z-index: 2;
    }

    /* ============================================================
       LEFT: 390px MOBILE DEMO (Preserving Original 7-Section Arch)
       ============================================================ */
    .mobile-shell {
      width: 406px;
      background: var(--bg-canvas);
      border-radius: 38px;
      border: 6px solid #FFFFFF;
      box-shadow: 0 20px 50px rgba(45, 62, 20, 0.12);
      overflow: hidden;
    }

    .ios-bar {
      padding: 10px 24px 4px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 12.5px;
      font-weight: 700;
      color: var(--ink-900);
    }

    /* 1. Mobile Header + Search */
    .m-header {
      padding: 6px 16px 8px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .m-brand {
      display: flex;
      align-items: center;
      gap: 9px;
    }
    .m-brand img {
      width: 42px;
      height: 42px;
      object-fit: contain;
    }
    .m-brand-text h2 {
      font-size: 19px;
      font-weight: 800;
      color: #2C2623;
      line-height: 1.15;
    }
    .m-brand-text p {
      font-size: 12px;
      color: var(--ink-400);
    }
    .m-top-actions {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .m-bell-btn {
      position: relative;
      width: 32px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #2C2623;
    }
    .m-badge-num {
      position: absolute;
      top: 0px;
      right: 0px;
      background: var(--orange-warm);
      color: #FFFFFF;
      font-size: 12px;
      font-weight: 700;
      width: 15px;
      height: 15px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 1.5px solid var(--bg-canvas);
    }
    .m-user-circle {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: #E2EBDA;
      color: #6B8E4E;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .m-search {
      margin: 0 16px 10px;
      background: var(--bg-search);
      border-radius: 999px;
      padding: 7px 14px;
      display: flex;
      align-items: center;
      gap: 7px;
      color: var(--ink-400);
      font-size: 12px;
    }

    .m-card {
      margin: 0 16px 10px;
      background: var(--bg-card);
      border-radius: 18px;
      padding: 13px 14px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    }

    /* 2. Sunlight Ledger Strip (Reference Data Bar Style, Original Numbers) */
    .ledger-stats-grid {
      display: grid;
      grid-template-columns: 1.05fr 1fr 1.15fr;
      gap: 6px;
      padding-top: 2px;
    }
    .l-stat {
      display: flex;
      align-items: center;
      gap: 6px;
      border-right: 1px solid var(--line-soft);
      padding-right: 6px;
    }
    .l-stat:last-child {
      border-right: none;
      padding-right: 0;
    }
    .l-num {
      font-size: 14px;
      font-weight: 800;
      color: var(--green-dark);
      line-height: 1.15;
    }
    .l-num.orange {
      color: var(--orange-warm);
    }
    .l-lbl {
      font-size: 12px;
      color: var(--ink-400);
      margin-top: 1px;
    }

    /* 3. Six Core Public Welfare Mechanisms (2x3 Soft Inner Cards with Right Chevron) */
    .mech-grid-m {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
    }
    .mech-item {
      background: var(--bg-subcard);
      border-radius: 12px;
      padding: 9px 10px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .mech-left {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .mech-ico {
      width: 28px;
      height: 28px;
      border-radius: 8px;
      color: var(--green-brand);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .mech-left strong {
      display: block;
      font-size: 12px;
      font-weight: 700;
      color: var(--ink-900);
      line-height: 1.2;
    }
    .mech-left span {
      display: block;
      font-size: 12px;
      color: var(--ink-400);
      margin-top: 1px;
    }
    .chev {
      color: #B5BDB0;
      font-size: 12px;
    }

    /* 4. Hospital Monthly Quota (1 Highlighted General Pool + Clinic Photo Row) */
    .pool-banner {
      background: #F2F8EC;
      border: 1.5px solid var(--green-border);
      border-radius: 13px;
      padding: 10px 12px;
      margin-bottom: 9px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    .pool-left {
      display: flex;
      align-items: center;
      gap: 9px;
    }
    .pool-circle-ico {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: var(--green-brand);
      color: #FFFFFF;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .pool-left strong {
      display: block;
      font-size: 13px;
      font-weight: 800;
      color: var(--green-dark);
    }
    .pool-left span {
      font-size: 12px;
      color: var(--ink-600);
    }
    .pool-left span b {
      color: var(--orange-warm);
    }

    .hosp-row-m {
      background: var(--bg-subcard);
      border-radius: 12px;
      padding: 8px 10px;
      display: grid;
      grid-template-columns: 88px 1fr auto;
      gap: 9px;
      align-items: center;
    }
    .hosp-img-m {
      width: 88px;
      height: 56px;
      border-radius: 8px;
      object-fit: cover;
    }
    .hosp-info-m h4 {
      font-size: 12.5px;
      font-weight: 800;
      color: var(--ink-900);
      margin-bottom: 3px;
    }
    .hosp-meta-m {
      display: flex;
      align-items: center;
      gap: 4px;
      font-size: 12px;
      color: var(--ink-600);
      margin-bottom: 2px;
    }

    /* 5. Adoptable Cats (Horizontal Photo Cards with Original Names: 奶酪 / 糯米) */
    .adopt-grid-m {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 9px;
    }
    .adopt-card-m {
      background: var(--bg-subcard);
      border-radius: 12px;
      padding: 8px;
      display: grid;
      grid-template-columns: 60px 1fr;
      gap: 8px;
      align-items: center;
    }
    .adopt-photo-m {
      width: 60px;
      height: 72px;
      border-radius: 8px;
      object-fit: cover;
    }
    .adopt-right-m h4 {
      font-size: 12.5px;
      font-weight: 800;
      color: var(--ink-900);
    }
    .adopt-age-m {
      font-size: 12px;
      color: var(--ink-600);
      margin-bottom: 2px;
    }
    .adopt-note-m {
      font-size: 12px;
      color: var(--ink-400);
      line-height: 1.2;
      margin-bottom: 4px;
    }
    .adopt-btn-m {
      width: 100%;
      background: #FFFFFF;
      border: 1px solid var(--green-brand);
      color: var(--green-dark);
      border-radius: 999px;
      padding: 2px 0;
      font-size: 12px;
      font-weight: 700;
      text-align: center;
      display: block;
    }

    /* 6. Community Volunteer CTA Banner */
    .vol-cta-m {
      margin: 0 16px 10px;
      background: linear-gradient(135deg, #F2F8EC 0%, #E6F0DA 100%);
      border: 1px solid var(--green-border);
      border-radius: 16px;
      padding: 11px 14px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    .vol-cta-m h4 {
      font-size: 12.5px;
      font-weight: 800;
      color: var(--ink-900);
      margin-bottom: 2px;
    }
    .vol-cta-m p {
      font-size: 12px;
      color: var(--ink-600);
    }

    /* 7. Original 5-Tab Bottom Bar (首页 / 猫咪领养 / TNR绝育 / 定点医院 / 我的) */
    .m-tabbar {
      background: #FFFFFF;
      border-top: 1px solid var(--line-soft);
      padding: 7px 6px 5px;
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      text-align: center;
    }
    .tab-btn {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 2px;
      font-size: 12px;
      color: var(--ink-400);
      font-weight: 600;
    }
    .tab-btn.active {
      color: var(--green-brand);
      font-weight: 700;
    }
    .ios-home-bar {
      width: 116px;
      height: 4px;
      background: #252B22;
      border-radius: 99px;
      margin: 6px auto 3px;
    }

    /* ============================================================
       RIGHT: PC DESKTOP DEMO (Preserving Original 7-Section Arch)
       ============================================================ */
    .pc-shell {
      background: var(--bg-canvas);
      border-radius: 26px;
      border: 5px solid #FFFFFF;
      box-shadow: 0 20px 50px rgba(45, 62, 20, 0.10);
      overflow: hidden;
    }

    /* 1. PC Top Navbar (Original 5 Nav Links + Search Pill + Bell/User) */
    .pc-navbar {
      background: #FFFFFF;
      padding: 13px 26px;
      border-bottom: 1px solid var(--line-soft);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
    }
    .pc-brand {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .pc-brand img {
      height: 40px;
      width: auto;
    }
    .pc-brand-title h2 {
      font-size: 18.5px;
      font-weight: 800;
      color: #2C2623;
      line-height: 1.15;
    }
    .pc-brand-title p {
      font-size: 12px;
      color: var(--ink-400);
    }
    .pc-nav-links {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .pc-nav-item {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 7px 13px;
      border-radius: 999px;
      font-size: 13px;
      font-weight: 600;
      color: var(--ink-600);
    }
    .pc-nav-item.active {
      background: #F2F8EC;
      color: var(--green-dark);
      border: 1.5px solid var(--green-border);
      font-weight: 700;
    }
    .pc-search-wrap {
      flex: 0 1 220px;
      background: var(--bg-search);
      border-radius: 999px;
      padding: 7px 14px;
      display: flex;
      align-items: center;
      gap: 7px;
      font-size: 12px;
      color: var(--ink-400);
    }
    .pc-right-tools {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    /* PC Body Container */
    .pc-container {
      padding: 20px 26px 22px;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .pc-card {
      background: #FFFFFF;
      border-radius: 20px;
      padding: 16px 20px;
      box-shadow: 0 3px 12px rgba(0,0,0,0.02);
    }

    /* 2. PC Hero + Sunlight Ledger Bento */
    .pc-hero-grid {
      display: grid;
      grid-template-columns: 1.35fr 0.85fr;
      gap: 16px;
      align-items: stretch;
    }
    .pc-ledger-card {
      background: #FFFFFF;
      border-radius: 20px;
      padding: 18px 20px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      box-shadow: 0 3px 12px rgba(0,0,0,0.02);
    }
    .pc-ledger-main {
      background: #F2F8EC;
      border: 1.5px solid var(--green-border);
      border-radius: 14px;
      padding: 12px 15px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .pc-ledger-subgrid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-top: 10px;
    }
    .pc-ledger-mini {
      background: var(--bg-subcard);
      border-radius: 12px;
      padding: 10px 12px;
      display: flex;
      align-items: center;
      gap: 9px;
    }

    /* 3. PC Six Core Public Welfare Mechanisms (3x2 Grid) */
    .pc-mech-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
    }

    /* 4. PC Hospital Monthly Quota (1 General Pool + 2 Clinic Cards with Store Photo) */
    .pc-quota-grid {
      display: grid;
      grid-template-columns: 1.05fr 1fr 1fr;
      gap: 14px;
      align-items: stretch;
    }
    .pc-pool-box {
      background: #F2F8EC;
      border: 1.5px solid var(--green-border);
      border-radius: 16px;
      padding: 16px 18px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }
    .pc-clinic-box {
      background: var(--bg-subcard);
      border-radius: 16px;
      padding: 12px 14px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 10px;
    }
    .pc-clinic-top {
      display: grid;
      grid-template-columns: 88px 1fr;
      gap: 11px;
      align-items: center;
    }

    /* 5. PC Adoptable Cats (3 Horizontal Cards: 奶酪 / 糯米 / 团子) */
    .pc-adopt-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 14px;
    }
    .pc-adopt-card {
      background: var(--bg-subcard);
      border-radius: 14px;
      padding: 10px;
      display: grid;
      grid-template-columns: 80px 1fr;
      gap: 12px;
      align-items: center;
    }
    .pc-adopt-photo {
      width: 80px;
      height: 90px;
      border-radius: 10px;
      object-fit: cover;
    }

    /* 6. PC Community Volunteer CTA Banner & Footer */
    .pc-cta-banner {
      background: linear-gradient(135deg, #F2F8EC 0%, #E6F0DA 100%);
      border: 1.5px solid var(--green-border);
      border-radius: 18px;
      padding: 16px 22px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .pc-footer {
      padding: 4px 6px 0;
      display: flex;
      justify-content: space-between;
      font-size: 11.5px;
      color: var(--ink-400);
    }
  
    /* Strict Single-Line No-Wrap Rules for ALL Menus, Feature Titles, Headers, Tags & Buttons */
    .pc-brand, .pc-brand-title h2, .pc-brand-title p,
    .pc-nav-links, .pc-nav-item, .pc-search-wrap, .pc-right-tools,
    .m-brand-text h2, .m-brand-text p, .m-search,
    .tab-btn, .tab-btn span,
    .mech-left strong, .mech-left span,
    .card-head-left h3, .card-head-sub, .more-link,
    .l-num, .l-lbl, .pool-left strong, .pool-left span,
    .hosp-info-m h4, .hosp-meta-m, .adopt-right-m h4, .adopt-age-m, .adopt-note-m, .adopt-btn-m,
    .pc-clinic-box h4, .pc-adopt-card h4,
    .btn-green-pill, .btn-outline-pill, .tag-pill {
      white-space: nowrap !important;
      flex-shrink: 0;
    }
    .spec-header, .stage {
      max-width: 1580px !important;
    }
    .pc-navbar {
      padding: 13px 22px !important;
      gap: 12px !important;
    }
    .pc-nav-links {
      gap: 4px !important;
    }
    .pc-nav-item {
      padding: 7px 11px !important;
      font-size: 13px !important;
    }
    .pc-search-wrap {
      flex: 0 1 185px !important;
    }

  

/* Production Responsive Override (20261027-ref-natural-design) */
html, body {
  background: var(--bg-canvas) !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow-x: hidden;
}
.spec-header, .device-label, .ios-bar, .ios-home-bar {
  display: none !important;
}
.stage {
  display: block !important;
  max-width: 100% !important;
  margin: 0 !important;
}
.mobile-shell {
  width: 100% !important;
  max-width: 100% !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding-bottom: 68px !important;
  min-height: 100vh;
}
.m-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.03);
}
.pc-shell {
  display: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  min-height: 100vh;
}
.pc-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 28px 36px !important;
}
.pc-navbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

@media (min-width: 960px) {
  .mobile-shell {
    display: none !important;
  }
  .pc-shell {
    display: block !important;
  }
}


/* 20261027-ref-natural-design — 深圳猫网 SZCAT 原有7大业务架构 × 参考图温润自然设计语言（双端响应式生产样式表） */
:root,
html,
body {
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Noto Sans CJK SC", sans-serif;

  /* Reference Visual Design Language Tokens */
  --bg-canvas: #F5F7F2;        /* 温润灰绿米白画布底 */
  --bg-card: #FFFFFF;          /* 纯白大圆角主卡片 */
  --bg-subcard: #F7F9F4;       /* 柔雾绿内嵌子卡片底 */
  --bg-search: #EDF2E7;        /* 胶囊浅绿底 */
  --bg-tag-green: #EAF4E2;     /* 绿色状态胶囊底 */
  --bg-tag-orange: #FFF2EC;    /* 暖橙状态胶囊底 */

  --green-brand: #7AA127;      /* 猫爪生机草木绿（主胶囊按钮/实心图标/标题左侧竖条） */
  --green-dark: #4F6F19;       /* 深苔藓绿（强调数字/描边文字） */
  --green-light: #B8D483;      /* 猫爪水印浅绿 */
  --green-border: #A8C676;     /* 选中卡片柔绿描边 */

  --orange-warm: #F56C2D;      /* 温暖活力橙（特惠余量/通知角标/重点数字） */
  --ink-900: #252B22;          /* 主标题深炭褐绿 */
  --ink-600: #5A6256;          /* 正文暖灰 */
  --ink-400: #8D9589;          /* 辅助弱化灰 */
  --line-soft: #E6ECE0;        /* 柔和分割线 */

  /* Legacy SZCAT SPA Variable Mapping */
  --page: #F5F7F2 !important;
  --bg: #F5F7F2 !important;
  --surface: #FFFFFF !important;
  --surface-soft: #F7F9F4 !important;
  --surface-2: #F7F9F4 !important;
  --brand: #7AA127 !important;
  --brand-hover: #4F6F19 !important;
  --brand-strong: #4F6F19 !important;
  --brand-dark: #4F6F19 !important;
  --brand-soft: #F2F8EC !important;
  --brand-mid: #A8C676 !important;
  --accent: #F56C2D !important;
  --accent-soft: #FFF2EC !important;
  --ink: #252B22 !important;
  --ink-soft: #5A6256 !important;
  --muted: #8D9589 !important;
  --line: #E6ECE0 !important;
}

html, body {
  background: var(--bg-canvas) !important;
  color: var(--ink-900) !important;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ============================================================
   1. 顶栏导航与胶囊搜索栏 / 通知铃铛 / 个人头像
   ============================================================ */
.app-header,
.pc-navbar,
.m-header {
  background: #FFFFFF !important;
  border-bottom: 1px solid var(--line-soft) !important;
}

.brand-mark img,
.pc-brand img,
.m-brand img {
  height: 40px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.pc-nav-item {
  border-radius: 999px;
  color: var(--ink-600);
  font-weight: 600;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.pc-nav-item.active {
  background: #F2F8EC !important;
  color: var(--green-dark) !important;
  border: 1.5px solid var(--green-border) !important;
  font-weight: 700 !important;
}

/* 移动端 (<960px) 底部菜单栏与首页 .m-tabbar 视觉完全统一 */
@media (max-width: 959px) {
  .header-search-pill,
  .app-header .pc-search-wrap,
  .bottom-nav .nav-item-pc {
    display: none !important;
  }
  .bottom-nav .nav-item-mob {
    display: flex !important;
  }
  .bottom-nav {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    background: #FFFFFF !important;
    border: none !important;
    border-top: 1px solid var(--line-soft) !important;
    border-radius: 0 !important;
    padding: 7px 6px calc(5px + env(safe-area-inset-bottom)) !important;
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    text-align: center !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 100 !important;
  }
  .bottom-nav .nav-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    padding: 2px 0 !important;
    min-width: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--ink-400) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  .bottom-nav .nav-glyph {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 19px !important;
    height: 19px !important;
    font-size: 0 !important;
    line-height: 1 !important;
  }
  .bottom-nav .nav-glyph svg {
    width: 19px !important;
    height: 19px !important;
  }
  .bottom-nav .nav-label {
    font-size: 12px !important;
    font-weight: inherit !important;
    line-height: 1.2 !important;
  }
  .bottom-nav .nav-item.active {
    background: transparent !important;
    border: none !important;
    color: var(--green-brand) !important;
    font-weight: 700 !important;
  }
  .bottom-nav .nav-item.nav-item-pc {
    display: none !important;
  }
}

/* 桌面端 (>=960px) 顶部主导航与首页 .pc-navbar 完全对齐 */
@media (min-width: 960px) {
  .bottom-nav .nav-item-pc,
  .header-search-pill {
    display: inline-flex !important;
  }
  .bottom-nav .nav-item-mob {
    display: none !important;
  }
  .bottom-nav {
    position: fixed !important;
    top: 15px !important;
    bottom: auto !important;
    left: 46% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    z-index: 35 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .bottom-nav .nav-item {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    min-width: auto !important;
    padding: 7px 13px !important;
    border-radius: 999px !important;
    border: 1.5px solid transparent !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--ink-600) !important;
    background: transparent !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  .bottom-nav .nav-glyph {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 15px !important;
    height: 15px !important;
    font-size: 0 !important;
    line-height: 1 !important;
  }
  .bottom-nav .nav-glyph svg {
    width: 15px !important;
    height: 15px !important;
  }
  .bottom-nav .nav-label {
    font-size: 13px !important;
    font-weight: inherit !important;
    line-height: 1 !important;
  }
  .bottom-nav a.active,
  .bottom-nav .nav-item.active {
    background: #F2F8EC !important;
    color: var(--green-dark) !important;
    border: 1.5px solid var(--green-border) !important;
    font-weight: 700 !important;
  }
  .bottom-nav .nav-item.nav-item-mob {
    display: none !important;
  }
}

.m-user-circle.active,
.m-bell-btn.active {
  background: #F2F8EC !important;
  color: var(--green-dark) !important;
  border: 1.5px solid var(--green-border) !important;
  border-radius: 50% !important;
}

.pc-search-wrap,
.m-search,
.header-search-pill {
  background: var(--bg-search) !important;
  border-radius: 999px !important;
  padding: 7px 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--ink-400);
  border: 1px solid transparent;
  white-space: nowrap !important;
}

.m-bell-btn,
.header-bell-btn {
  position: relative;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2C2623;
  flex-shrink: 0;
}

.m-badge-num,
.header-badge-num {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--orange-warm) !important;
  color: #FFFFFF !important;
  font-size: 12px;
  font-weight: 700;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #FFFFFF;
}

.m-user-circle,
.header-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #E2EBDA !important;
  color: #6B8E4E !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ============================================================
   2. 通用大圆角白卡、柔雾绿子卡、胶囊按钮與标签
   ============================================================ */
.pc-card,
.m-card,
.section-card,
.card {
  background: var(--bg-card) !important;
  border-radius: 18px !important;
  border: none !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.02) !important;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}

.card-head-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.card-head-left h3,
.section-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink-900) !important;
  white-space: nowrap !important;
  flex-shrink: 0;
}

.card-head-sub {
  font-size: 12px;
  color: var(--ink-400);
  margin-left: 4px;
  white-space: nowrap !important;
  flex-shrink: 0;
}

.green-bar-ind {
  width: 4px;
  height: 15px;
  border-radius: 99px;
  background: var(--green-brand) !important;
  display: inline-block;
  flex-shrink: 0;
}

.more-link {
  font-size: 11.5px;
  color: var(--ink-400) !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap !important;
  flex-shrink: 0;
}

.tag-pill,
.badge,
.pill {
  font-size: 12px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--bg-tag-green) !important;
  color: var(--green-dark) !important;
  font-weight: 600;
  white-space: nowrap !important;
  flex-shrink: 0;
}

.tag-pill.orange,
.badge.orange,
.badge.warn {
  background: var(--bg-tag-orange) !important;
  color: var(--orange-warm) !important;
}

.btn-green-pill,
.button.primary,
button.primary {
  background: var(--green-brand) !important;
  color: #FFFFFF !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap !important;
  flex-shrink: 0;
  cursor: pointer;
}

.btn-outline-pill,
.button.ghost,
.button.outline,
.adopt-btn-m {
  background: #FFFFFF !important;
  border: 1.5px solid var(--green-brand) !important;
  color: var(--green-dark) !important;
  border-radius: 999px !important;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap !important;
  flex-shrink: 0;
  cursor: pointer;
}

/* ============================================================
   3. 首屏主视觉 + 阳光账本公示看板
   ============================================================ */
.ref-hero-banner,
.hero-card {
  background: linear-gradient(135deg, #F4F8EC 0%, #E7F1D8 100%) !important;
  border-radius: 18px !important;
  padding: 18px 16px 16px;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.32fr 0.68fr;
  align-items: center;
  gap: 12px;
  border: 1px solid #DCE9C8 !important;
}

.ref-hero-title {
  font-size: 18.5px;
  font-weight: 800;
  color: #2A2421;
  line-height: 1.32;
  margin-bottom: 6px;
}

.ref-hero-title span {
  color: var(--green-dark);
}

.ref-hero-sub {
  font-size: 11.5px;
  color: var(--ink-600);
  margin-bottom: 12px;
}

.ref-hero-btns {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  align-items: center;
}

.ref-hero-cat {
  width: 100%;
  height: 118px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

.pc-ledger-card {
  background: #FFFFFF !important;
  border-radius: 20px !important;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.02);
}

.pc-ledger-main,
.pool-banner,
.pc-pool-box {
  background: #F2F8EC !important;
  border: 1.5px solid var(--green-border) !important;
  border-radius: 14px !important;
}

.pc-ledger-subgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.pc-ledger-mini {
  background: var(--bg-subcard) !important;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.ledger-stats-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1.15fr;
  gap: 6px;
  padding-top: 2px;
}

.l-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  border-right: 1px solid var(--line-soft);
  padding-right: 6px;
}

.l-stat:last-child {
  border-right: none;
  padding-right: 0;
}

.l-num {
  font-size: 14px;
  font-weight: 800;
  color: var(--green-dark);
  line-height: 1.15;
  white-space: nowrap !important;
}

.l-num.orange {
  color: var(--orange-warm) !important;
}

.l-lbl {
  font-size: 12px;
  color: var(--ink-400);
  margin-top: 1px;
  white-space: nowrap !important;
}

/* ============================================================
   4. 六大核心公益机制（PC 3×2 / 手机 2×3 左图标+右标题简述+右箭头 ›）
   ============================================================ */
.mech-grid,
.mech-grid-m,
.pc-mech-grid,
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mech-item,
.action-card {
  background: var(--bg-subcard) !important;
  border-radius: 12px !important;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: none !important;
  box-shadow: none !important;
  text-decoration: none;
}

.mech-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mech-ico,
.action-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--green-brand) !important;
  background: transparent !important;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mech-left strong,
.action-title {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-900) !important;
  line-height: 1.2;
  white-space: nowrap !important;
}

.mech-left span,
.action-sub {
  display: block;
  font-size: 12px;
  color: var(--ink-400) !important;
  margin-top: 1px;
  white-space: nowrap !important;
}

.chev {
  color: #B5BDB0;
  font-size: 12px;
  flex-shrink: 0;
}

/* ============================================================
   5. 合作医院当月指标余量 & 同城待领养猫咪 & 社区义工横幅
   ============================================================ */
.pool-circle-ico {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green-brand) !important;
  color: #FFFFFF !important;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pc-clinic-box,
.hosp-row-m,
.hospital-card {
  background: var(--bg-subcard) !important;
  border-radius: 14px !important;
  border: none !important;
}

.hosp-img-m {
  width: 88px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.adopt-card-m,
.pc-adopt-card,
.adopt-card {
  background: var(--bg-subcard) !important;
  border-radius: 12px !important;
  border: none !important;
}

.vol-cta-m,
.pc-cta-banner {
  background: linear-gradient(135deg, #F2F8EC 0%, #E6F0DA 100%) !important;
  border: 1.5px solid var(--green-border) !important;
  border-radius: 16px !important;
}

/* ============================================================
   6. 【铁律】所有菜单名与功能名称强制单行不换行
   ============================================================ */
.pc-brand, .pc-brand-title h2, .pc-brand-title p,
.pc-nav-links, .pc-nav-item, .pc-search-wrap, .pc-right-tools,
.m-brand-text h2, .m-brand-text p, .m-search,
.tab-btn, .tab-btn span, .bottom-nav a, .bottom-nav span,
.mech-left strong, .mech-left span, .action-title, .action-sub,
.card-head-left h3, .card-head-sub, .more-link,
.l-num, .l-lbl, .pool-left strong, .pool-left span,
.hosp-info-m h4, .hosp-meta-m, .adopt-right-m h4, .adopt-age-m, .adopt-note-m, .adopt-btn-m,
.pc-clinic-box h4, .pc-adopt-card h4,
.btn-green-pill, .btn-outline-pill, .tag-pill, .button, .badge {
  white-space: nowrap !important;
  flex-shrink: 0;
}

/* ============================================================
   7. PC 桌面端 (>= 960px) 响应式布局升级
   ============================================================ */
@media (min-width: 960px) {
  .pc-hero-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.85fr;
    gap: 16px;
    align-items: stretch;
  }
  .ref-hero-banner {
    padding: 26px !important;
  }
  .ref-hero-title {
    font-size: 24px !important;
    margin-bottom: 8px !important;
  }
  .ref-hero-sub {
    font-size: 13px !important;
    margin-bottom: 18px !important;
  }
  .ref-hero-cat {
    height: 168px !important;
  }
  .mech-grid,
  .mech-grid-m,
  .pc-mech-grid,
  .quick-actions-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
  .mech-item,
  .action-card {
    padding: 13px 15px !important;
  }
  .mech-left strong,
  .action-title {
    font-size: 13.5px !important;
  }
  .mech-left span,
  .action-sub {
    font-size: 11.5px !important;
  }
  .pc-quota-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr 1fr;
    gap: 14px;
    align-items: stretch;
  }
  .pc-adopt-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}



/* Secondary SPA Pages Compatibility & App-Root Clean Spacing (20261027-ref-natural-design) */
.app-root {
  background: var(--bg-canvas) !important;
  color: var(--ink-900) !important;
}

.app-root:has(.pc-shell) {
  padding-bottom: 0 !important;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-title-wrap strong {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: #2C2623;
  line-height: 1.15;
  white-space: nowrap !important;
}

.brand-title-wrap small {
  display: block;
  font-size: 12px;
  color: var(--ink-400);
  white-space: nowrap !important;
}

.surface-card,
.form-card,
.me-hero-card,
.me-equity-card,
.tnr-quota-card,
.tnr-community-card,
.cat-card,
.friend-code-card,
.member-vip-card {
  background: var(--bg-card) !important;
  border-radius: 18px !important;
  border: 1px solid var(--line-soft) !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.02) !important;
}

.action-link,
.me-equity-item,
.me-stat-item {
  background: var(--bg-subcard) !important;
  border-radius: 12px !important;
  border: 1px solid var(--line-soft) !important;
}

.tnr-hero,
.transparency-hero,
.detail-hero {
  background: linear-gradient(135deg, #F4F8EC 0%, #E7F1D8 100%) !important;
  border: 1px solid #DCE9C8 !important;
  border-radius: 18px !important;
  color: var(--ink-900) !important;
}


/* ============================================================
   20261027-ref-natural-nav-v3:
   1. 阳光账本医院救助支持排名 4 列完整对齐
   2. 移动端顶栏、底部 5 项菜单栏、页内芯片/页签严格单行不换行
   ============================================================ */
.rank-row,
.rank-head {
  display: grid !important;
  grid-template-columns: minmax(140px, 1fr) 72px 80px 76px !important;
  align-items: center !important;
  gap: 8px !important;
}
.rank-row > span:nth-child(1),
.rank-head > span:nth-child(1) {
  text-align: left !important;
  font-weight: 700 !important;
  color: var(--ink-900) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.rank-row > span:nth-child(2),
.rank-head > span:nth-child(2),
.rank-row > span:nth-child(3),
.rank-head > span:nth-child(3),
.rank-row > span:nth-child(4),
.rank-head > span:nth-child(4) {
  text-align: right !important;
  white-space: nowrap !important;
}
.rank-row > span:nth-child(4) {
  color: var(--green-dark) !important;
  font-weight: 800 !important;
}

.chip-row,
.adopt-sorts,
.filter-toggle-row,
.rescue-entries {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none !important;
}
.chip-row::-webkit-scrollbar,
.adopt-sorts::-webkit-scrollbar,
.filter-toggle-row::-webkit-scrollbar,
.rescue-entries::-webkit-scrollbar {
  display: none !important;
}
.chip-row .chip,
.chip-row .chip-label,
.adopt-sorts .chip,
.adopt-sorts .chip-label,
.rescue-entries a,
.rescue-entries button {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  word-break: keep-all !important;
}

@media (max-width: 959px) {
  .app-header,
  .m-header {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }
  .app-header .brand,
  .m-header .m-brand {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
  }
  .app-header .header-actions,
  .m-header .m-top-actions {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    flex-shrink: 0 !important;
  }
  .bottom-nav,
  .m-tabbar {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-around !important;
    width: 100% !important;
    max-width: 100vw !important;
    padding: 6px 4px calc(5px + env(safe-area-inset-bottom)) !important;
  }
  .bottom-nav .nav-item,
  .m-tabbar .tab-btn {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    max-width: 20% !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow: hidden !important;
  }
  .bottom-nav .nav-item .nav-label,
  .m-tabbar .tab-btn span {
    display: block !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
  }
  .bottom-nav .nav-item.nav-item-pc {
    display: none !important;
  }
  .rank-row,
  .rank-head {
    grid-template-columns: minmax(110px, 1fr) 54px 62px 58px !important;
    font-size: 12px !important;
  }
}

/* ============================================================
   20261027-typo-format-v4:
   1. 全站统一无衬线字体栈 (--font-sans)，彻底清除衬线体
   2. 全站 4 级标准字阶 & 移动端最小字号下限 (正文/辅助 >= 12px，底部菜单 11px)
   3. 价格、配额、统计数字全局等宽对齐 (tabular-nums)
   4. 内页标题栏与单行排序+筛选栏紧凑对齐
   ============================================================ */
*,
*::before,
*::after,
html,
body,
h1, h2, h3, h4, h5, h6,
button, input, select, textarea,
.transparency-hero h1,
.tnr-hero h1,
.tnr-seal,
.tnr-card-symbol,
.tnr-steps b,
.tnr-note-mark,
.definition-icon {
  font-family: var(--font-sans) !important;
}

body,
table, th, td,
.l-num,
.me-equity-item strong,
.me-stat-item strong,
.tnr-quota-num,
.tnr-quota-meta,
.fact-price,
.fact dd,
.support-amount,
.support-year-row,
.support-year-row span,
.rank-row,
.rank-row span,
.transparency-primary-number,
.transparency-primary-number strong,
.transparency-split strong,
.record-card-bottom strong,
.tag-pill,
.badge,
.pill,
.chip,
.list-count,
.cats-count,
.record-count {
  font-variant-numeric: tabular-nums !important;
}

/* Tier 1: Page Main Title (18px mobile, 20px PC) */
.section-title {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 6px 0 12px !important;
}
.section-title h2 {
  font-size: 18px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  color: var(--ink-900) !important;
  margin: 0 !important;
}
.section-title p {
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
  color: var(--ink-600) !important;
  margin: 2px 0 0 !important;
  white-space: normal !important;
}
@media (min-width: 960px) {
  .section-title h2 {
    font-size: 20px !important;
  }
  .section-title p {
    font-size: 13px !important;
  }
}

/* Tier 2: Section & Card Title (15px ~ 16px) */
.card-head-left h3,
.card-title,
.me-card-title,
.tnr-quota-name,
.list-card-head strong {
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  color: var(--ink-900) !important;
}

/* Tier 4: Auxiliary Info, Badges, Labels & Meta (>= 12px) */
.l-lbl,
.adopt-city,
.tnr-quota-region,
.tnr-quota-meta,
.tnr-quota-num,
.me-card-sub,
.card-head-sub,
.eyebrow,
.transparency-kicker,
.tag-pill,
.badge,
.pill,
.chip,
.chip-label,
.more-link,
.contact-line,
.hospital-benefit,
.fact dt,
.cat-facts span,
.tag,
.record-type,
.record-status,
.record-card-bottom,
.support-sub,
.surface-note {
  font-size: 12px !important;
  line-height: 1.45 !important;
}

.m-badge-num,
.header-badge-num {
  font-size: 11.5px !important;
  width: 17px !important;
  height: 17px !important;
}

/* 移动端底部导航栏标签保持 11px 单行不换行 */
@media (max-width: 959px) {
  .bottom-nav .nav-item,
  .bottom-nav .nav-item .nav-label,
  .m-tabbar .tab-btn,
  .m-tabbar .tab-btn span {
    font-size: 11px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
  }
}
.tnr-quota-card .tnr-quota-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


/* ==========================================================================
   20261028-mobile-layout-8fixes:
   针对用户 3 张手机真机实拍图的 8 项排版截断、子元素溢出、头像变形与单列适配修复
   ========================================================================== */

/* 1. 全站顶栏右上角用户头像锁死正圆比例与描边（修复图 2 /rescue/tnr 顶栏忍者头像上半截消失变扁椭圆） */
.m-user-circle,
.header-user-avatar,
.header-avatar {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  flex: 0 0 32px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  padding: 0 !important;
  border: 1.5px solid var(--green-border, #DCE9C8) !important;
  background: #FFFFFF !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

.m-user-circle img,
.header-user-avatar img,
.header-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  display: block !important;
}

/* 2. 首页手机端（图 3）「合作医院当月指标」卡片防溢出（修复右侧「选定该院」按钮被切成「选定该」及孤字「观」折行） */
.hosp-row-m {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  display: grid !important;
  grid-template-columns: 72px minmax(0, 1fr) !important;
  gap: 8px 10px !important;
  align-items: center !important;
  padding: 10px 12px !important;
}

.hosp-img-m {
  width: 72px !important;
  height: 54px !important;
  border-radius: 8px !important;
  object-fit: cover !important;
  flex-shrink: 0 !important;
}

.hosp-info-m {
  min-width: 0 !important;
  width: 100% !important;
  overflow: hidden !important;
}

.hosp-info-m h4 {
  font-size: 13px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin: 0 0 3px 0 !important;
}

.hosp-meta-m {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 4px !important;
  min-width: 0 !important;
  white-space: normal !important;
}

.hosp-info-m div:last-child,
.hosp-info-m p {
  font-size: 12px !important;
  color: var(--ink-600) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* 将医院卡片右侧「选定该院」按钮放至卡片底部通栏，彻底杜绝 3 列横向撑爆 */
.hosp-row-m > .btn-green-pill,
.hosp-row-m > a:last-child {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  text-align: center !important;
  justify-content: center !important;
}

/* 3. 首页手机端（图 3）「同城待领养猫咪」卡片防溢出（修复 .adopt-card-m 被 nowrap 简介撑到 384px 捅穿屏幕右边界） */
.adopt-grid-m {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.adopt-card-m {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  display: grid !important;
  grid-template-columns: 68px minmax(0, 1fr) !important;
  gap: 10px !important;
  align-items: center !important;
  padding: 10px !important;
}

.adopt-photo-m {
  width: 68px !important;
  height: 76px !important;
  border-radius: 10px !important;
  object-fit: cover !important;
  flex-shrink: 0 !important;
}

.adopt-right-m {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.adopt-right-m h4,
.adopt-age-m,
.adopt-note-m {
  min-width: 0 !important;
  max-width: 100% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  flex-shrink: 1 !important;
}

.adopt-btn-m {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin-top: 3px !important;
  padding: 4px 10px !important;
}

/* 4. TNR 绝育页（图 2）：4 宫格统计数字防折行 + 区域筛选胶囊整词多行平铺防切半 + 手机端单列全宽医院卡片展示完整分院名与母猫价 */
.me-equity-item strong,
.tnr-hero-stats strong,
.tnr-stat-card strong,
.quota-summary-grid strong,
.summary-grid strong {
  white-space: nowrap !important;
  word-break: keep-all !important;
  font-size: clamp(13px, 3.6vw, 16px) !important;
  letter-spacing: -0.02em !important;
}

@media (max-width: 639px) {
  /* 区域筛选胶囊在手机端整词自然换行平铺，避免右侧「深圳宝安」被半截切成「深圳宝」 */
  .chip-row {
    flex-wrap: wrap !important;
    overflow-x: visible !important;
    gap: 6px !important;
  }

  /* 手机端医院配额卡片改为单列全宽，完整展示「母品牌（分院全称）」与「公猫 ¥100/只 · 母猫 ¥150/只」 */
  .tnr-quota-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
  }

  .tnr-quota-card {
    padding: 10px 12px !important;
  }

  .tnr-quota-name,
  .tnr-quota-meta {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.35 !important;
  }
}

/* 5. 个人中心 /me（图 1）：修复实名会员卡胶囊「至 202{」右侧截断 & 底部导航栏遮挡最后一张卡片 */
@media (max-width: 639px) {
  .me-hero-top {
    position: relative !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 6px 8px !important;
  }

  .me-hero-identity {
    width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 100% !important;
    align-items: flex-start !important;
  }

  .me-hero-copy {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    padding-right: 0 !important;
  }

  .me-hero-copy strong {
    padding-right: 78px !important;
  }

  .me-avatar {
    width: 42px !important;
    height: 42px !important;
    flex: 0 0 42px !important;
  }

  .me-card-pill {
    font-size: 11px !important;
    padding: 2px 7px !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    max-width: 100% !important;
  }

  .me-vip-btn {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    padding: 4px 9px !important;
    font-size: 11.5px !important;
  }
}

@media (max-width: 959px) {
  .app-root,
  .page-shell,
  main.page-content,
  .me-page {
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 16px)) !important;
  }
}
/* 20261029-ledger-360-fix: 首页阳光账本三格 ≤380px 防溢出，不截断数字 */
.ledger-stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; min-width: 0; }
.l-stat { min-width: 0 !important; overflow: hidden; }
.l-stat > div { min-width: 0; }
@media (max-width: 380px) {
  .ledger-stats-grid { gap: 4px !important; }
  .l-stat { gap: 4px !important; padding-right: 4px !important; }
  .l-stat svg, .l-stat .l-ico { width: 18px !important; height: 18px !important; flex-shrink: 0; }
  .l-num { font-size: 12.5px !important; letter-spacing: -0.02em; }
  .l-lbl { font-size: 11px !important; white-space: normal !important; word-break: keep-all; line-height: 1.3 !important; }
}

/* 20261029-cats-mobile-grid-fix
 * /cats 手机端 .pc-adopt-grid 仍用 PC 三列横铺，卡片 right≈466/925/1389，scrollWidth≫clientWidth
 * 移动断点强制单列自适应，禁止横向滚动铺卡；≥960 保持原 3 列
 */
@media (max-width: 959px) {
  .pc-adopt-grid,
  .cats-page .pc-adopt-grid,
  .page-content.cats-page .pc-adopt-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .pc-adopt-card,
  .cats-page .pc-adopt-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    grid-template-columns: 72px minmax(0, 1fr) !important;
  }

  .pc-adopt-photo {
    width: 72px !important;
    height: 80px !important;
    flex-shrink: 0 !important;
  }

  .pc-adopt-card h4,
  .pc-adopt-card p,
  .pc-adopt-card .adopt-note,
  .pc-adopt-card .adopt-meta {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

@media (min-width: 960px) {
  .pc-adopt-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
