:root {
  --paper: #faf7f2;
  --surface: #ffffff;
  --tint: #f3ede4;
  --tint-2: #e9e1d5;
  --ink: #1e1b18;
  --ink-2: #49433d;
  --muted: #787169;
  --line: #eae3d8;
  --line-strong: #d9cfc0;
  --terracotta: #b85032;
  --terracotta-dark: #933c23;
  --apricot: #f9ede4;
  --apricot-line: #edd4c2;
  --moss: #2e624a;
  --moss-soft: #ecf5f0;
  --moss-line: #c7e0d3;
  --ochre: #8e5c17;
  --ochre-soft: #fbf3e4;
  --ochre-line: #eed9b2;
  --danger: #a43429;
  --danger-soft: #fceeea;
  --shadow-soft: 0 6px 22px rgba(48, 34, 22, 0.055);
  --shadow-card: 0 2px 10px rgba(48, 34, 22, 0.04);
  --radius-sm: 11px;
  --radius: 18px;
  --radius-lg: 24px;
  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-display: 'SF Pro Display', 'PingFang SC', 'Songti SC', Georgia, serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }

body.pg-app {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
}

button, input, select, textarea { font: inherit; touch-action: manipulation; }
button { cursor: pointer; }
a { color: var(--terracotta); }
[hidden] { display: none !important; }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 2px;
}

/* Sticky Top Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.app-header-inner {
  width: min(100%, 1160px);
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pet-avatar-switcher {
  border: 0;
  background: transparent;
  padding: 2px 10px 2px 2px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  color: var(--ink);
  transition: background-color 140ms ease;
}

.pet-avatar-switcher:hover { background: var(--tint); }

.pet-portrait-ring {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #e7a387 0%, #c66443 100%);
  box-shadow: 0 3px 10px rgba(184, 80, 50, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pet-portrait-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fffaf4;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pet-portrait-inner svg,
.pet-portrait-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pet-switcher-copy strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.pet-switcher-copy small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

.desktop-nav {
  display: flex;
  gap: 4px;
}

.dnav-item {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all 140ms ease;
}

.dnav-item:hover { color: var(--ink); background: var(--tint); }
.dnav-item.is-active { color: var(--terracotta); background: var(--apricot); }

.header-right { display: flex; align-items: center; gap: 10px; }
.brand-watermark { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; color: var(--muted); }

.me-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: var(--shadow-card);
}

.me-btn-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--terracotta);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  border: 1.5px solid var(--paper);
}

.me-btn:hover { border-color: var(--terracotta); color: var(--terracotta); }
.me-btn svg { width: 18px; height: 18px; }

/* Permanently Pinned Global Search Dock on Home */
.pinned-search-dock {
  position: sticky;
  top: 63px;
  z-index: 25;
  background: rgba(250, 247, 242, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(234, 227, 216, 0.85);
}

.pinned-search-inner {
  width: min(100%, 1160px);
  margin: 0 auto;
  padding: 9px 24px 11px;
}

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

.global-search-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 8px 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-soft);
}

.global-search-bar:focus-within {
  border-color: var(--terracotta);
  box-shadow: 0 6px 22px rgba(184, 80, 50, 0.12);
}

.global-search-bar svg { width: 17px; height: 17px; color: var(--muted); flex-shrink: 0; }
.global-search-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: var(--ink);
  padding: 4px 0;
}

.search-clear-btn {
  border: 0;
  background: var(--tint);
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 600;
}

.search-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 35;
  max-height: 400px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: 0 18px 42px rgba(32, 24, 16, 0.16);
}

.search-group-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin: 8px 0 4px;
}

.search-group-label:first-child { margin-top: 0; }

.search-hit {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  color: var(--ink);
  font-size: 13.5px;
}

.search-hit:hover { background: var(--tint); }
.search-hit small { color: var(--muted); font-size: 11.5px; flex-shrink: 0; }

/* Main Container */
.app-main {
  flex: 1 1 auto;
  width: min(100%, 1160px);
  margin: 0 auto;
  padding: 20px 24px 48px;
}

.tab-view { display: none; }
.tab-view.is-active { display: block; }

.app-footer {
  margin-top: 32px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* Floating Compare Bar */
.compare-float-bar {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 32;
  width: min(calc(100% - 24px), 520px);
  background: #231f1c;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: 0 14px 36px rgba(24, 18, 14, 0.28);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.compare-float-actions { display: flex; gap: 8px; align-items: center; }
.compare-float-clear { border: 0; background: transparent; color: #bfb7ae; font-size: 12.5px; padding: 4px 6px; }
.compare-float-go { border: 0; background: var(--terracotta); color: #ffffff; padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 650; }
.compare-float-go:disabled { opacity: 0.45; cursor: not-allowed; }

/* Mobile Bottom Nav (Hidden on Desktop) */
.mobile-tabbar { display: none; }

/* Common Components */
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--terracotta); margin: 0 0 4px; }
.page-title { margin: 0; font-family: var(--font-display); font-size: 26px; font-weight: 700; line-height: 1.28; letter-spacing: -0.02em; }
.section-bar { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 22px 0 11px; }
.section-bar h2 { margin: 0; font-size: 16px; font-weight: 700; }
.link-btn { border: 0; background: transparent; color: var(--terracotta); font-size: 13px; font-weight: 600; padding: 2px 4px; text-decoration: none; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px; margin-bottom: 12px; box-shadow: var(--shadow-card); }

.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--tint); color: var(--ink-2); border: 1px solid var(--line); }
.tag-moss { background: var(--moss-soft); color: var(--moss); border-color: var(--moss-line); }
.tag-terra { background: var(--apricot); color: var(--terracotta); border-color: var(--apricot-line); }
.tag-ochre { background: var(--ochre-soft); color: var(--ochre); border-color: var(--ochre-line); }

/* Homepage Hub */
.home-welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.home-welcome p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.paw-accent { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--terracotta); background: var(--apricot); padding: 5px 11px; border-radius: 999px; white-space: nowrap; }

.hero-portal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }

.hero-portal {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  min-height: 146px;
  text-align: left;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-soft);
  transition: transform 140ms ease, border-color 140ms ease;
}

.hero-portal:hover { transform: translateY(-2px); border-color: var(--terracotta); }
.hero-portal.is-ai { background: linear-gradient(145deg, #fff5ee 0%, #ffffff 74%); border-color: #efd7c8; }
.hero-portal.is-shop { background: linear-gradient(145deg, #eef6f1 0%, #ffffff 74%); border-color: #cde2d6; }
.hero-portal-deco { position: absolute; right: -6px; bottom: -8px; width: 76px; height: 76px; opacity: 0.14; pointer-events: none; }
.hero-portal-icon { width: 38px; height: 38px; border-radius: 12px; background: var(--surface); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 3px 10px rgba(32, 24, 16, 0.06); margin-bottom: 10px; }
.hero-portal.is-ai .hero-portal-icon { color: var(--terracotta); }
.hero-portal.is-shop .hero-portal-icon { color: var(--moss); }
.hero-portal-icon svg { width: 20px; height: 20px; }
.hero-portal strong { display: block; font-size: 17px; color: var(--ink); line-height: 1.25; }
.hero-portal small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.service-dock-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 16px 12px; box-shadow: var(--shadow-card); margin-bottom: 16px; }
.service-dock-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 10px; }
.service-dock-head strong { font-size: 14px; }
.dock-expand-btn { border: 0; background: var(--tint); color: var(--ink-2); border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 600; }
.dock-expand-btn:hover { background: var(--apricot); color: var(--terracotta); }
.service-dock-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.service-dock-extra { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-strong); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }

.dock-item { border: 0; background: transparent; padding: 8px 4px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ink); }
.dock-item:hover { background: var(--paper); }
.dock-ico { width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; }
.dock-ico.tone-warm { background: #faeee6; color: #b85032; }
.dock-ico.tone-sage { background: #eaf4ee; color: #2e624a; }
.dock-ico.tone-sky { background: #ebf2fa; color: #2f5b8f; }
.dock-ico.tone-amber { background: #fbf2e1; color: #9a6419; }
.dock-ico svg { width: 20px; height: 20px; }
.dock-item span { font-size: 12.5px; font-weight: 600; }

.home-digest { padding: 14px 16px; border-radius: var(--radius); background: var(--tint); border: 1px solid var(--line); margin-bottom: 12px; }
.home-digest p { margin: 5px 0 0; font-size: 13.5px; color: var(--ink-2); }

.teaser-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.teaser-card { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 13px 15px; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 10px; box-shadow: var(--shadow-card); }
.teaser-card:hover { border-color: var(--line-strong); }
.teaser-card strong { display: block; font-size: 14px; color: var(--ink); margin-top: 4px; }
.teaser-card small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Shop (Compact 4-col Desktop / 2-col Mobile) */
.search-bar { display: flex; gap: 8px; margin: 12px 0; }
.search-bar input { flex: 1; min-width: 0; border: 1px solid var(--line-strong); border-radius: 12px; padding: 9px 12px; background: var(--surface); font-size: 15px; }
.pill-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding: 0 2px 6px;
  margin-bottom: 8px;
  scrollbar-width: none;
}
.pill-strip::-webkit-scrollbar { display: none; }
.filter-pill {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  scroll-snap-align: start;
}
.filter-pill.is-active { background: var(--ink); border-color: var(--ink); color: #ffffff; }
.sort-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; font-size: 12.5px; color: var(--muted); }
.sort-controls {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  scrollbar-width: none;
}
.sort-controls::-webkit-scrollbar { display: none; }
.sort-chip { border: 0; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; padding: 4px 8px; border-radius: 8px; white-space: nowrap; flex-shrink: 0; }
.sort-chip.is-active { background: var(--tint); color: var(--ink); }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.prod-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-card); transition: border-color 140ms ease, transform 120ms ease; }
.prod-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.prod-visual { height: 96px; background: var(--tint); display: flex; align-items: center; justify-content: center; position: relative; cursor: pointer; }
.prod-visual svg { width: 58px; height: 58px; }
.prod-cat-badge { position: absolute; left: 7px; top: 7px; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); color: var(--ink-2); border: 1px solid var(--line); }
.prod-fav { position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.92); color: var(--muted); font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }
.prod-fav.is-saved { color: var(--terracotta); border-color: var(--apricot-line); }
.prod-body { padding: 9px 10px 8px; display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; cursor: pointer; }
.prod-brand { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod-body h3 { margin: 0; font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 35px; }
.prod-price { font-size: 12.5px; font-weight: 700; color: var(--terracotta); margin-top: auto; padding-top: 2px; }
.prod-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); padding: 5px 6px; gap: 6px; }
.prod-actions button {
  border: 1px solid rgba(60, 48, 36, 0.08);
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 4px;
  border-radius: 9px;
  white-space: nowrap;
  transition: transform 120ms ease, background 120ms ease;
}
.prod-actions button:active { transform: scale(0.96); }
.prod-actions button.is-selected { background: rgba(46, 98, 74, 0.12); border-color: rgba(46, 98, 74, 0.22); color: var(--moss); }
.prod-actions .ask-ai-btn { color: #8f381f; background: rgba(184, 80, 50, 0.1); border-color: rgba(184, 80, 50, 0.18); }

.shop-commerce-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.shop-commerce-bar .btn { min-height: 34px; padding: 5px 11px; font-size: 12.5px; }
.test-banner {
  margin: 0 0 12px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--ochre-soft);
  border: 1px solid var(--ochre-line);
  color: var(--ochre);
  font-size: 12.5px;
  line-height: 1.5;
}
.error-box {
  padding: 14px;
  border-radius: 14px;
  background: var(--danger-soft);
  border: 1px solid #f0c9c3;
  color: var(--danger);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.post-video {
  width: 100%;
  max-height: 320px;
  border-radius: 12px;
  background: #141210;
  border: 1px solid var(--line);
  display: block;
}
.care-details {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--line-strong);
  font-size: 12.5px;
}
.care-details summary {
  cursor: pointer;
  color: var(--terracotta);
  font-weight: 600;
}
.home-reminder-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius);
  background: var(--apricot);
  border: 1px solid var(--apricot-line);
  margin-bottom: 14px;
  font-size: 13px;
}
.home-reminder-banner strong { color: var(--terracotta-dark); display: block; }
.home-reminder-banner small { color: var(--ink-2); }

/* Option A "我的" Compact Mobile Layout, Editable Cover/Avatar, Segmented Controls & Prominent Community Social Bar */
.me-hero-card {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(60, 48, 36, 0.09);
  box-shadow: var(--shadow-soft);
  margin-bottom: 12px;
}
.me-cover-banner {
  position: relative;
  height: 116px;
  background-color: #ede6dc;
  background-size: cover;
  background-position: center;
  cursor: pointer;
}
.me-cover-banner.has-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 16, 12, 0.06) 0%, rgba(20, 16, 12, 0.28) 100%);
  pointer-events: none;
}
.me-cover-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  gap: 6px;
}
.glass-pill {
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  color: var(--ink);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(32, 24, 16, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: transform 120ms ease, background 120ms ease;
}
.glass-pill:active { transform: scale(0.95); }
.me-hero-body {
  padding: 0 15px 14px;
  position: relative;
}
.me-hero-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: -32px;
  margin-bottom: 8px;
}
.me-avatar-btn {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 3px solid var(--surface);
  padding: 0;
  background: var(--apricot);
  box-shadow: 0 6px 18px rgba(32, 24, 16, 0.16);
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.me-avatar-btn img, .me-avatar-btn svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.me-avatar-edit-dot {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #fff;
}
.me-hero-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.me-hero-name-row strong { font-size: 17px; font-weight: 700; color: var(--ink); }
.me-hero-bio { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* Compact Taobao/XHS-style 4-Icon Horizontal Order Strip (stays compact 4-col even on 390px mobile!) */
.me-compact-card {
  background: var(--surface);
  border: 1px solid rgba(60, 48, 36, 0.09);
  border-radius: 18px;
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
}
.me-compact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.me-compact-head strong { font-size: 14px; font-weight: 700; color: var(--ink); }
.me-compact-head small { font-size: 11px; color: var(--muted); }
.me-compact-head > div strong { display: block; line-height: 1.25; }
.me-compact-head > div small { display: block; margin-top: 2px; line-height: 1.3; }
.me-order-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.me-order-item {
  position: relative;
  border: 0;
  background: transparent;
  padding: 6px 2px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: var(--ink);
  transition: background 120ms ease, transform 120ms ease;
}
.me-order-item:hover { background: var(--paper); }
.me-order-item:active { transform: scale(0.95); }
.me-order-ico {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--tint);
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.me-order-ico svg { width: 19px; height: 19px; }
.me-order-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--terracotta);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  border: 1.5px solid var(--surface);
}
.me-order-item span { font-size: 11.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }

/* Compact Pet Notebook Hub inside "我的" (3x2 grid, opens clean Push Sheet) */
.me-pet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 13px;
  background: var(--paper);
  border: 1px solid var(--line);
  margin-bottom: 10px;
}
.me-nb-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.me-nb-tile {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #fbf8f3 100%);
  border-radius: 14px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(32, 24, 16, 0.04);
  transition: transform 120ms ease, border-color 140ms ease;
}
.me-nb-tile:hover { border-color: var(--apricot-line); background: var(--apricot); }
.me-nb-tile:active { transform: scale(0.96); }
.me-nb-tile strong { font-size: 12.5px; font-weight: 650; color: var(--ink); }
.me-nb-tile small { font-size: 10.5px; color: var(--muted); }

/* Sticky Community Top Bar (keeps DM & Channels always reachable even while scrolling!) */
.sticky-comm-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sticky-comm-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex: 1 1 auto;
  min-width: 0;
  padding: 3px;
  border-radius: 12px;
  background: rgba(60, 48, 36, 0.075);
  gap: 2px;
}
.sticky-comm-tabs::-webkit-scrollbar { display: none; }
.sticky-comm-tab {
  border: 0;
  background: transparent;
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--muted);
  white-space: nowrap;
  flex: 0 0 auto;
  transition: all 140ms ease;
}
.sticky-comm-tab.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(32, 24, 16, 0.09);
}
.sticky-dm-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(184, 80, 50, 0.2);
  background: rgba(184, 80, 50, 0.1);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  color: #8f381f;
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(184, 80, 50, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition: transform 120ms ease, background 120ms ease;
}
.sticky-dm-btn:active { transform: scale(0.95); }
.sticky-post-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(184, 80, 50, 0.34);
  background: rgba(184, 80, 50, 0.76);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(184, 80, 50, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.38);
  transition: transform 120ms ease, background 120ms ease;
}
.sticky-post-btn:hover { background: rgba(172, 68, 40, 0.84); }
.sticky-post-btn:active { transform: scale(0.95); }

/* iOS Segmented Control (for Gender 不选/女/男 etc.) */
.seg-control {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 3px;
  border-radius: 12px;
  background: rgba(60, 48, 36, 0.08);
  margin: 6px 0 12px;
}
.seg-opt {
  border: 0;
  background: transparent;
  padding: 8px 6px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  transition: all 140ms ease;
}
.seg-opt.is-on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(32, 24, 16, 0.1), 0 0.5px 1px rgba(32, 24, 16, 0.06);
}

/* Cover & User Avatar Pickers */
.cover-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 12px;
}
.cover-swatch {
  height: 44px;
  border-radius: 10px;
  border: 2px solid transparent;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.cover-swatch.is-picked { border-color: var(--ink); box-shadow: 0 0 0 2px #fff inset; }

.loc-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(60, 48, 36, 0.14);
  background: linear-gradient(180deg, #ffffff 0%, #faf6f0 100%);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(32, 24, 16, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 120ms ease;
}
.loc-pill:hover { border-color: var(--terracotta); color: var(--terracotta); }
.loc-pill:active { transform: scale(0.96); }

.climate-tip-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #eef6f1 0%, #f8fbf9 100%);
  border: 1px solid var(--moss-line);
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--ink-2);
  box-shadow: var(--shadow-card);
}
.climate-tip-card strong { display: block; color: var(--moss); margin-bottom: 2px; font-size: 13.5px; }

.breed-hero-card p { margin: 8px 0 4px; font-size: 13.5px; color: var(--ink-2); }
.spot-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.load-more-wrap { text-align: center; margin-top: 16px; }

/* Journal, Menu Groups, Pet Fund & Album */
.subtabs {
  display: flex;
  flex-wrap: nowrap;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  background: var(--tint);
  padding: 4px;
  border-radius: 13px;
  gap: 4px;
  margin: 10px 0 14px;
}
.subtabs::-webkit-scrollbar { display: none; }
.subtab {
  border: 0;
  background: transparent;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
  scroll-snap-align: start;
}
.subtab.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 2px 6px rgba(32, 24, 16, 0.07); }

.menu-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; box-shadow: var(--shadow-card); }
.menu-row { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; color: var(--ink); min-height: 50px; }
.menu-row:last-child { border-bottom: 0; }
.menu-row:hover { background: var(--paper); }
.menu-row-left strong { display: block; font-size: 14px; font-weight: 600; }
.menu-row-left small { display: block; font-size: 12px; color: var(--muted); }
.menu-row-right { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; flex-shrink: 0; max-width: 48%; text-align: right; }
.menu-chevron { font-size: 16px; color: #a9a29a; }

.me-profile-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border-radius: var(--radius); background: var(--tint); border: 1px solid var(--line); margin-bottom: 12px; }
.me-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.me-stat-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 13px; padding: 10px 8px; text-align: center; }
.me-stat-btn strong { display: block; font-size: 17px; color: var(--ink); }
.me-stat-btn small { font-size: 11.5px; color: var(--muted); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.calc-inputs, .calc-outputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 10px 0; }
.calc-inputs label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.calc-inputs input { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 10px; font-size: 16px; font-weight: 700; background: var(--paper); }
.calc-out { background: var(--tint); border: 1px solid var(--line); border-radius: 12px; padding: 11px; text-align: center; }
.calc-out small { display: block; font-size: 11.5px; color: var(--muted); }
.calc-out strong { display: block; font-size: 18px; color: var(--terracotta); margin-top: 2px; }
.weight-svg { width: 100%; height: 116px; display: block; }
.timeline { display: grid; gap: 8px; }
.tl-row { padding: 8px 11px; border-left: 3px solid var(--terracotta); background: var(--paper); border-radius: 0 10px 10px 0; font-size: 13px; }
.tl-row small { display: block; color: var(--muted); font-size: 11px; }

/* Pet Fund */
.fund-hero { background: linear-gradient(145deg, #25201c 0%, #3a3029 100%); color: #faf7f2; border-radius: var(--radius-lg); padding: 18px 20px; margin-bottom: 12px; box-shadow: var(--shadow-soft); }
.fund-hero-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.fund-hero small { font-size: 12px; color: #cec5ba; }
.fund-big-num { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin: 4px 0 12px; font-variant-numeric: tabular-nums; }
.fund-horizons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.fund-horizons strong { display: block; font-size: 15px; margin-top: 2px; }
.fund-bar { height: 9px; border-radius: 999px; overflow: hidden; display: flex; background: var(--tint); margin: 10px 0 8px; }
.fund-seg-food { background: #b85032; }
.fund-seg-care { background: #d4944c; }
.fund-seg-med { background: #2e624a; }
.fund-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12.5px; color: var(--ink-2); }
.fund-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.fund-grid-2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 10px 0; }
.fund-grid-2 label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.fund-grid-2 input { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 10px; font-size: 15px; font-weight: 700; background: var(--paper); }
.plan-preset-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 10px 0 12px; }
.preset-btn { border: 1.5px solid var(--line-strong); background: var(--paper); border-radius: 12px; padding: 10px 8px; text-align: center; color: var(--ink); }
.preset-btn strong { display: block; font-size: 13.5px; }
.preset-btn small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.preset-btn.is-active { border-color: var(--terracotta); background: var(--apricot); }
.goal-track { height: 9px; border-radius: 999px; background: var(--tint); overflow: hidden; margin: 8px 0 6px; }
.goal-fill { height: 100%; background: var(--moss); border-radius: 999px; }

/* Upgraded Album */
.compare-photo-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 10px 0; }
.photo-frame { border-radius: 13px; padding: 13px; min-height: 116px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); }
.photo-frame.is-before { background: linear-gradient(145deg, #f3ece2 0%, #e7ddd0 100%); }
.photo-frame.is-after { background: linear-gradient(145deg, #eaf4ee 0%, #d8ebdf 100%); }
.photo-frame small { font-size: 11.5px; color: var(--muted); }
.photo-frame strong { font-size: 13.5px; color: var(--ink); }
.vault-card { border: 1px dashed var(--line-strong); background: #fdfbf7; border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; }
.milestone-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 13px; background: var(--paper); border: 1px solid var(--line); margin-bottom: 8px; }
.milestone-badge { min-width: 60px; padding: 4px 6px; border-radius: 9px; background: var(--apricot); color: var(--terracotta); font-size: 11px; font-weight: 700; text-align: center; flex-shrink: 0; white-space: pre-line; }

/* Community */
.comm-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 15px; display: flex; flex-direction: column; gap: 9px; box-shadow: var(--shadow-card); }
.post-author { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.author-btn { border: 0; background: transparent; padding: 0; display: flex; align-items: center; gap: 8px; text-align: left; color: inherit; }
.author-ava { width: 32px; height: 32px; border-radius: 50%; background: var(--tint-2); color: var(--ink); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.author-btn strong { display: block; font-size: 13.5px; line-height: 1.2; }
.author-btn small { display: block; font-size: 11.5px; color: var(--muted); }
.video-cover { position: relative; border: 0; width: 100%; height: 164px; border-radius: 14px; overflow: hidden; padding: 14px; text-align: left; color: #ffffff; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(135deg, #3c342e 0%, #6d5243 52%, #9a654b 100%); }
.video-cover.is-teal { background: linear-gradient(135deg, #254538 0%, #3d6d59 55%, #5c8e78 100%); }
.video-play-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 17px; padding-left: 3px; }
.video-meta-row { display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; }
.video-pill { background: rgba(0, 0, 0, 0.45); padding: 3px 8px; border-radius: 999px; font-weight: 600; }
.post-title-btn { border: 0; background: transparent; padding: 0; text-align: left; font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.post-excerpt { margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
.post-evidence-strip { display: flex; flex-wrap: wrap; gap: 5px 10px; padding: 7px 10px; border-radius: 10px; background: var(--tint); font-size: 12px; color: var(--ink-2); }
.post-linked-prod { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 11px; border: 1px solid var(--line); background: var(--paper); font-size: 12.5px; }
.post-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 8px; margin-top: auto; font-size: 12.5px; color: var(--muted); }
.post-foot button { border: 0; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; padding: 4px 8px; border-radius: 8px; }
.post-foot button.is-liked { color: var(--terracotta); background: var(--apricot); }
.unread-dot { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--terracotta); color: #ffffff; font-size: 11px; font-weight: 700; }
.chat-row { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; color: var(--ink); }
.chat-row:last-child { border-bottom: 0; }
.chat-row-main { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.chat-row-copy { min-width: 0; flex: 1; }
.chat-row-copy strong { display: block; font-size: 14px; }
.chat-row-copy small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-thread { display: flex; flex-direction: column; gap: 8px; }
.dm-bubble { max-width: 82%; padding: 9px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.55; background: var(--surface); border: 1px solid var(--line); align-self: flex-start; }
.dm-bubble.is-mine { align-self: flex-end; background: var(--apricot); border-color: var(--apricot-line); }
.dm-bubble small { display: block; font-size: 10.5px; color: var(--muted); margin-top: 3px; }

/* Micro-Editors & Buttons */
.avatar-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 8px 0 14px; }
.avatar-opt { border: 2px solid var(--line); background: var(--surface); border-radius: 14px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; color: var(--ink-2); }
.avatar-opt.is-picked { border-color: var(--terracotta); background: var(--apricot); }
.chip-select-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.chip-toggle { border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; }
.chip-toggle.is-on { border-color: var(--terracotta); background: var(--apricot); color: var(--terracotta); }
.bcs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0 14px; }
.bcs-opt { border: 1.5px solid var(--line-strong); background: var(--surface); border-radius: 12px; padding: 10px; text-align: left; color: var(--ink); }
.bcs-opt strong { display: block; font-size: 13.5px; }
.bcs-opt small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.bcs-opt.is-on { border-color: var(--moss); background: var(--moss-soft); }

.supply-mini { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.supply-mini strong { display: block; font-size: 13.5px; }
.supply-mini small { display: block; font-size: 11.5px; color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  padding: 5px 11px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: -0.01em;
  border: 1px solid rgba(60, 48, 36, 0.11);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(32, 24, 16, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 120ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 140ms ease, background 140ms ease, border-color 140ms ease;
}
.dialog-foot .btn { min-height: 40px; padding: 7px 14px; font-size: 13.5px; border-radius: 12px; }
.btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(60, 48, 36, 0.2);
  box-shadow: 0 3px 10px rgba(32, 24, 16, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
.btn:active:not(:disabled) { transform: scale(0.965); }
.btn-primary {
  background: rgba(184, 80, 50, 0.76);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-color: rgba(184, 80, 50, 0.32);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(184, 80, 50, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.38);
}
.btn-primary:hover:not(:disabled) {
  background: rgba(170, 67, 39, 0.85);
  box-shadow: 0 6px 20px rgba(184, 80, 50, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.42);
}
.btn-soft {
  background: rgba(184, 80, 50, 0.1);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-color: rgba(184, 80, 50, 0.18);
  color: #8f381f;
  box-shadow: 0 1px 3px rgba(184, 80, 50, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}
.btn-soft:hover:not(:disabled) {
  background: rgba(184, 80, 50, 0.16);
  border-color: rgba(184, 80, 50, 0.28);
}
.btn-moss {
  background: rgba(46, 98, 74, 0.11);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-color: rgba(46, 98, 74, 0.22);
  color: var(--moss);
  box-shadow: 0 1px 3px rgba(46, 98, 74, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}
.btn-danger {
  background: rgba(176, 52, 40, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-color: rgba(176, 52, 40, 0.34);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(164, 52, 41, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-danger-soft {
  background: rgba(164, 52, 41, 0.09);
  backdrop-filter: saturate(160%) blur(12px);
  border-color: rgba(164, 52, 41, 0.2);
  color: var(--danger);
}

/* High-Craft iOS-Inspired Select Dropdowns & Inputs */
select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  height: 38px;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
  background-color: var(--surface);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%236c6258' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 14px 14px;
  padding: 0 34px 0 11px !important;
  border: 1px solid rgba(60, 48, 36, 0.16) !important;
  border-radius: 11px !important;
  box-shadow: 0 1px 2px rgba(32, 24, 16, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: border-color 140ms ease, box-shadow 140ms ease;
  cursor: pointer;
}
select::-ms-expand, select::picker-icon { display: none; }
select:hover { border-color: rgba(60, 48, 36, 0.28) !important; }
select:focus {
  border-color: var(--terracotta) !important;
  box-shadow: 0 0 0 3.5px rgba(184, 80, 50, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  outline: none;
}
.form-field input:focus, .form-field textarea:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3.5px rgba(184, 80, 50, 0.13);
  outline: none;
}

/* Search History Chips (Home dropdown + Shop/Friends inline) */
.search-history-inline {
  margin: -4px 0 12px;
  padding: 9px 11px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.sh-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}
.sh-title { font-size: 12px; font-weight: 700; color: var(--muted); }
.sh-clear-all {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
}
.sh-clear-all:hover { color: var(--danger); background: var(--danger-soft); }
.sh-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.sh-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 6px 3px 10px;
  border-radius: 999px;
  background: var(--tint);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-2);
}
.sh-chip-text {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 1px 2px;
  font-size: 12.5px;
}
.sh-chip-del {
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}
.sh-chip-del:hover { color: var(--danger); background: var(--danger-soft); }

/* Real Album & Community Photos + DM Product Cards */
.album-photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 8px 0; }
.album-photo-single { margin: 8px 0; }
.album-img, .post-img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--tint);
  display: block;
}
.dm-product-card {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  color: var(--ink);
}
.dm-product-card strong { display: block; font-size: 13px; }
.dm-product-card small { display: block; font-size: 11px; color: var(--muted); }
.empty-box {
  padding: 18px 14px;
  border-radius: 14px;
  border: 1px dashed var(--line-strong);
  background: var(--paper);
  color: var(--muted);
  text-align: center;
  font-size: 13.5px;
}
.row-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ledger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.ledger-row:last-child { border-bottom: 0; }
.ledger-del { border: 0; background: transparent; color: var(--muted); font-size: 12px; padding: 3px 7px; border-radius: 6px; }
.ledger-del:hover { color: var(--danger); background: var(--danger-soft); }
.file-preview-img { max-width: 100%; max-height: 140px; border-radius: 10px; border: 1px solid var(--line); margin-top: 6px; display: block; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.note-box { margin: 10px 0 0; padding: 9px 11px; border-radius: 11px; background: var(--ochre-soft); border: 1px solid var(--ochre-line); color: var(--ochre); font-size: 12.5px; }
.form-field { display: block; margin-bottom: 10px; font-size: 12.5px; color: var(--muted); }
.form-field input, .form-field select, .form-field textarea { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-strong); background-color: var(--surface); color: var(--ink); font-size: 16px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.toggle-row:last-child { border-bottom: 0; }
.toggle-row input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--terracotta); }

/* Push Dialog */
.preview-dialog { width: min(94vw, 780px); max-height: 88dvh; padding: 0; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--paper); overflow: hidden; }
.preview-dialog[open] { display: flex; flex-direction: column; }
.preview-dialog::backdrop { background: rgba(24, 20, 16, 0.48); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.dialog-head-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dialog-back { border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); border-radius: 9px; padding: 5px 10px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.dialog-head h2 { margin: 0; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dialog-close { border: 1px solid var(--line-strong); background: var(--tint); border-radius: 9px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; flex-shrink: 0; }
.dialog-body { padding: 16px; overflow-y: auto; flex: 1 1 auto; font-size: 14px; line-height: 1.65; }
.dialog-foot { padding: 10px 16px; background: var(--surface); border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; }
.dialog-body h3 { margin: 14px 0 6px; font-size: 14.5px; }
.dialog-body h3:first-child { margin-top: 0; }
.dialog-body table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 8px 0 12px; background: var(--surface); }
.dialog-body th, .dialog-body td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.dialog-body th { background: var(--tint); }
.comment-item { padding: 9px 11px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 8px; font-size: 13px; }
.comment-item small { color: var(--muted); display: block; font-size: 11.5px; }

.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 60; background: #231f1c; color: #ffffff; padding: 9px 16px; border-radius: 999px; font-size: 13px; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24); }

/* Mobile Responsive */
@media (max-width: 768px) {
  .app-header-inner { padding: 9px 14px; }
  .desktop-nav, .brand-watermark { display: none; }
  .pinned-search-dock { top: 61px; }
  .pinned-search-inner { padding: 8px 14px 10px; }
  .app-main { padding: 14px 14px 96px; overflow-x: clip; }
  .page-title { font-size: 22px; }
  .hero-portal-grid { gap: 10px; }
  .hero-portal { padding: 15px 13px; min-height: 128px; }
  .hero-portal strong { font-size: 15.5px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .grid-2, .post-grid, .teaser-grid { grid-template-columns: 1fr; }
  .fund-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc-inputs, .calc-outputs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .plan-preset-row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 8px;
  }
  .plan-preset-row::-webkit-scrollbar { display: none; }
  .plan-preset-row .preset-btn { min-width: 112px; flex-shrink: 0; }
  .comm-top { flex-wrap: nowrap; gap: 8px; }
  .comm-top .subtabs { flex: 1 1 auto; min-width: 0; margin: 4px 0 8px; }
  .comm-top .btn { flex-shrink: 0; white-space: nowrap; padding: 6px 11px; font-size: 12.5px; }
  .compare-float-bar { bottom: 84px; }
  .mobile-tabbar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 35;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: saturate(190%) blur(22px);
    -webkit-backdrop-filter: saturate(190%) blur(22px);
    border: 1px solid rgba(60, 48, 36, 0.08);
    border-radius: 999px;
    box-shadow: 0 8px 28px rgba(32, 24, 16, 0.11), 0 1px 2px rgba(32, 24, 16, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.92);
    padding: 5px 6px;
  }
  .mtab {
    border: 0;
    background: transparent;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 2px;
    border-radius: 999px;
    text-decoration: none;
    transition: background 140ms ease, color 140ms ease, transform 120ms ease;
  }
  .mtab:active { transform: scale(0.94); }
  .mtab svg { width: 20px; height: 20px; }
  .mtab.is-active {
    background: rgba(184, 80, 50, 0.11);
    color: var(--terracotta);
  }
  .mtab-ai .ai-orb { width: 38px; height: 24px; border-radius: 999px; background: rgba(184, 80, 50, 0.12); color: var(--terracotta); display: inline-flex; align-items: center; justify-content: center; }
  .mtab-ai .ai-orb svg { width: 16px; height: 16px; }
  .preview-dialog { width: 100vw; max-width: 100vw; height: 92dvh; max-height: 92dvh; margin-top: auto; border-radius: 22px 22px 0 0; }
}

/* =========================================================
   COMPETITOR-BEATING UPGRADE:
   1. A–Z Breed Directory Picker
   2. Upgraded "我的宠物" Visual Dashboard & Quick Record Sheets
   3. X-Style Community Timeline, Post Detail, Lightbox & FAB
   ========================================================= */

/* 1. A–Z Breed Directory Picker */
.breed-top-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.breed-switch-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(60, 48, 36, 0.1);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  box-shadow: 0 3px 12px rgba(32, 24, 16, 0.05);
  color: var(--ink);
  font-size: 14px;
  transition: transform 120ms ease, border-color 140ms ease;
}
.breed-switch-trigger:active { transform: scale(0.97); }
.breed-switch-arrow {
  font-size: 12px;
  font-weight: 600;
  color: var(--terracotta);
  background: rgba(184, 80, 50, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
}
.breed-empty-hero {
  background: var(--surface);
  border: 1px solid rgba(60, 48, 36, 0.06);
  border-radius: 22px;
  padding: 36px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(32, 24, 16, 0.045);
}
.breed-empty-paw { font-size: 38px; opacity: 0.72; }
.breed-empty-hero strong { font-size: 16px; color: var(--ink); }
.breed-empty-hero small { font-size: 12.5px; color: var(--muted); max-width: 260px; margin-bottom: 6px; }
.breed-search-wrap { margin-bottom: 12px; }
.breed-search-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(60, 48, 36, 0.1);
  background: #f3efe9;
  font-size: 14px;
  color: var(--ink);
}
.breed-search-input:focus {
  background: #fff;
  border-color: var(--terracotta);
  outline: none;
  box-shadow: 0 0 0 3px rgba(184, 80, 50, 0.12);
}
.breed-mine-banner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 16px;
  border: 1px solid rgba(184, 80, 50, 0.22);
  background: linear-gradient(135deg, #fff5ee 0%, #fffaf6 100%);
  text-align: left;
  margin-bottom: 14px;
}
.breed-mine-banner strong { display: block; font-size: 13.5px; color: var(--ink); }
.breed-mine-banner small { display: block; font-size: 11.5px; color: var(--muted); }
.breed-sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}
.breed-sec-head strong { font-size: 14px; color: var(--ink); }
.breed-sec-head small { font-size: 11px; color: var(--muted); }
.breed-hot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin-bottom: 14px;
}
.breed-hot-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(60, 48, 36, 0.07);
  background: #fff;
  text-align: left;
  transition: transform 110ms ease, border-color 140ms ease;
}
.breed-hot-item:active { transform: scale(0.97); }
.breed-hot-item.is-picked { border-color: var(--terracotta); background: #fff6f1; }
.breed-hot-item strong { font-size: 13.5px; color: var(--ink); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breed-hot-item small { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.breed-rank-badge {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ece7df;
  color: var(--muted);
  flex-shrink: 0;
}
.breed-rank-badge.rank-1 { background: #e85a5a; color: #fff; }
.breed-rank-badge.rank-2 { background: #ea8838; color: #fff; }
.breed-rank-badge.rank-3 { background: #eab738; color: #fff; }
.breed-sp-tabs {
  display: flex;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.breed-sp-tab {
  border: 0;
  background: transparent;
  padding: 8px 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  position: relative;
}
.breed-sp-tab.is-on { color: var(--ink); }
.breed-sp-tab.is-on::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2.5px;
  border-radius: 999px;
  background: var(--terracotta);
}
.breed-count-line { font-size: 11.5px; color: var(--muted); margin: 4px 0 6px; }
.breed-az-shell {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  position: relative;
}
.breed-az-list { flex: 1 1 auto; min-width: 0; }
.breed-az-letter {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--terracotta);
  padding: 6px 2px 4px;
}
.breed-az-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 7px;
  border-radius: 15px;
  border: 1px solid rgba(60, 48, 36, 0.07);
  background: #fff;
  text-align: left;
  box-shadow: 0 2px 8px rgba(32, 24, 16, 0.03);
  transition: transform 110ms ease, border-color 140ms ease;
}
.breed-az-card:active { transform: scale(0.985); }
.breed-az-card.is-picked { border-color: var(--terracotta); background: #fff7f2; }
.breed-az-card strong { display: block; font-size: 14px; color: var(--ink); }
.breed-az-card small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.breed-az-right { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; font-size: 13px; }
.breed-post-cnt { font-size: 11.5px; color: var(--muted); }
.breed-az-index {
  position: sticky;
  top: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 2px;
  flex-shrink: 0;
}
.breed-az-idx-btn {
  border: 0;
  background: transparent;
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
}
.breed-az-idx-btn:hover, .breed-az-idx-btn:active { background: rgba(184, 80, 50, 0.14); color: var(--terracotta); }

/* 2. Upgraded "我的宠物" Visual Dashboard & Quick Record Sheets */
.me-pet-showcase {
  background: var(--surface);
  border: 1px solid rgba(60, 48, 36, 0.065);
  border-radius: 20px;
  padding: 13px 14px;
  margin-bottom: 12px;
  box-shadow: 0 4px 18px rgba(32, 24, 16, 0.045);
}
.pet-switch-pill {
  border: 1px solid rgba(60, 48, 36, 0.11);
  background: #faf7f2;
  color: var(--ink);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 650;
}
.pet-dash-hero {
  border-radius: 20px;
  padding: 14px;
  background: linear-gradient(165deg, #fde8d6 0%, #fff4ea 48%, #fffaf5 100%);
  border: 1px solid rgba(226, 178, 140, 0.35);
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(184, 110, 62, 0.08);
}
.pet-dash-hero.is-compact { margin-bottom: 10px; }
.pet-dash-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.pet-care-tray {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 11px 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.85);
}
.pet-care-circle-btn {
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 2px;
  border-radius: 12px;
  transition: transform 120ms ease, background 120ms ease;
}
.pet-care-circle-btn:active { transform: scale(0.94); }
.pet-care-orb {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(32, 24, 16, 0.08);
}
.pet-care-orb svg { width: 20px; height: 20px; }
.pet-care-circle-btn.is-amber .pet-care-orb { background: #fff1dc; color: #d4821a; }
.pet-care-circle-btn.is-mint .pet-care-orb { background: #e3f5ec; color: #207d57; }
.pet-care-circle-btn.is-sky .pet-care-orb { background: #e5f1fc; color: #266fb8; }
.pet-care-circle-btn strong { font-size: 12.5px; color: var(--ink); }
.pet-care-circle-btn small { font-size: 11px; color: var(--muted); }
.pet-care-circle-btn small.is-alert { color: var(--danger); font-weight: 700; }
.pet-care-circle-btn small.is-soon { color: var(--terracotta); font-weight: 650; }
.pet-hero-prompt {
  width: 100%;
  margin-top: 10px;
  padding: 10px 13px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-2);
  box-shadow: 0 2px 8px rgba(32, 24, 16, 0.04);
}
.pet-hero-prompt strong { font-size: 12.5px; color: var(--terracotta); flex-shrink: 0; }
.pet-mini-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.pet-mini-pill {
  border: 1px solid rgba(60, 48, 36, 0.08);
  background: #faf7f2;
  color: var(--ink-2);
  border-radius: 11px;
  padding: 8px 4px;
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
  transition: transform 110ms ease, background 120ms ease;
}
.pet-mini-pill:active { transform: scale(0.95); background: var(--apricot); }

.pet-bento-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.pet-bento-card {
  border: 1px solid rgba(60, 48, 36, 0.065);
  background: #fff;
  border-radius: 18px;
  padding: 13px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  box-shadow: 0 3px 14px rgba(32, 24, 16, 0.04);
  transition: transform 120ms ease;
}
.pet-bento-card:active { transform: scale(0.97); }
.pet-bento-card strong { display: block; font-size: 14px; color: var(--ink); }
.pet-bento-card small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.pet-bento-ico {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.pet-bento-ico.is-amber { background: #fff3df; }
.pet-bento-ico.is-terra { background: #fbeae3; }

.pet-weight-card {
  background: #fff;
  border: 1px solid rgba(60, 48, 36, 0.065);
  border-radius: 20px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(32, 24, 16, 0.045);
}
.pet-weight-main {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}
.pet-weight-left small { display: block; font-size: 11.5px; color: var(--muted); }
.pet-weight-num { display: flex; align-items: baseline; gap: 3px; margin: 4px 0 6px; }
.pet-weight-num strong { font-size: 28px; font-weight: 750; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.pet-weight-num span { font-size: 12px; color: var(--muted); }
.pet-status-chip {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-2);
  background: #f3efe9;
  padding: 3px 8px;
  border-radius: 999px;
}
.pet-weight-chart {
  border-radius: 14px;
  border: 1px dashed rgba(60, 48, 36, 0.14);
  background: #fcfaf7;
  min-height: 76px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pet-sparkline-svg { width: 100%; height: 64px; display: block; }
.pet-weight-empty { text-align: center; padding: 8px 6px; }
.pet-weight-empty strong { display: block; font-size: 12.5px; color: var(--ink-2); }
.pet-weight-empty small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.pet-mint-cta {
  width: 100%;
  border: 1px solid rgba(46, 98, 74, 0.16);
  background: linear-gradient(90deg, #edf8f2 0%, #f4fbf7 100%);
  color: #1f5c41;
  border-radius: 13px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 650;
  transition: transform 110ms ease;
}
.pet-mint-cta:active { transform: scale(0.98); }

.pet-care-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.pet-tinted-card {
  border: 1px solid rgba(60, 48, 36, 0.06);
  border-radius: 18px;
  padding: 13px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 3px 12px rgba(32, 24, 16, 0.035);
  transition: transform 120ms ease;
}
.pet-tinted-card:active { transform: scale(0.97); }
.pet-tinted-card.is-mint { background: linear-gradient(155deg, #edf9f2 0%, #ffffff 78%); border-color: rgba(46, 98, 74, 0.14); }
.pet-tinted-card.is-sky { background: linear-gradient(155deg, #eef5fd 0%, #ffffff 78%); border-color: rgba(38, 111, 184, 0.14); }
.pet-tinted-card.is-peach { background: linear-gradient(155deg, #fff3e8 0%, #ffffff 78%); border-color: rgba(184, 80, 50, 0.14); }
.pet-tinted-card.is-warm { background: linear-gradient(155deg, #f7f2ec 0%, #ffffff 78%); border-color: rgba(60, 48, 36, 0.1); }
.pet-tinted-card strong { font-size: 14.5px; color: var(--ink); }
.pet-tinted-card small { font-size: 11.5px; color: var(--muted); min-height: 16px; }
.pet-tinted-foot {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-2);
}
.pet-tinted-act { font-weight: 700; color: var(--terracotta); }

.pet-list-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(60, 48, 36, 0.065);
  margin-bottom: 10px;
  box-shadow: 0 2px 10px rgba(32, 24, 16, 0.035);
}
.pet-list-bar-main { border: 0; background: transparent; padding: 0; text-align: left; flex: 1; min-width: 0; }
.pet-list-bar-main strong { display: block; font-size: 14px; color: var(--ink); }
.pet-list-bar-main small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* Structured Quick-Fill Forms (Competitor Images 4 & 5 polish) */
.qform-card {
  background: #fff;
  border: 1px solid rgba(60, 48, 36, 0.07);
  border-radius: 18px;
  padding: 4px 14px;
  margin-bottom: 12px;
  box-shadow: 0 3px 14px rgba(32, 24, 16, 0.04);
}
.qform-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(60, 48, 36, 0.06);
}
.qform-row:last-child { border-bottom: 0; }
.qform-row strong { font-size: 14px; color: var(--ink); flex-shrink: 0; }
.qform-block {
  padding: 11px 0;
  border-bottom: 1px solid rgba(60, 48, 36, 0.06);
}
.qform-block:last-child { border-bottom: 0; }
.qform-block > strong { display: block; font-size: 14px; color: var(--ink); margin-bottom: 8px; }
.qform-block > .qform-row { padding: 0 0 8px; border-bottom: 0; }
.qform-inline-seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 11px;
  background: #f3efe9;
  gap: 2px;
}
.qform-seg-btn {
  border: 0;
  background: transparent;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.qform-seg-btn.is-on {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(32, 24, 16, 0.1);
}
.qform-input-inline, .qform-date-inline, .qform-select-inline {
  border: 1px solid rgba(60, 48, 36, 0.12);
  background: #f7f4ef;
  border-radius: 11px;
  padding: 7px 11px;
  font-size: 14px;
  color: var(--ink);
  max-width: 62%;
}
.qform-input-full, .qform-textarea {
  width: 100%;
  border: 1px solid rgba(60, 48, 36, 0.1);
  background: #f7f4ef;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14.5px;
  color: var(--ink);
}
.qform-input-full:focus, .qform-textarea:focus, .qform-input-inline:focus {
  background: #fff;
  border-color: var(--terracotta);
  outline: none;
}
.qform-chip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}
.qform-chip {
  border: 1.5px solid rgba(60, 48, 36, 0.08);
  background: #f7f4ef;
  color: var(--ink-2);
  border-radius: 12px;
  padding: 9px 6px;
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  transition: all 130ms ease;
}
.qform-chip.is-on {
  border-color: #d98245;
  background: #fff6ec;
  color: #a64622;
  box-shadow: 0 2px 8px rgba(184, 80, 50, 0.1);
}
.qform-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.qform-mode-btn {
  border: 1.5px solid rgba(60, 48, 36, 0.08);
  background: #f7f4ef;
  color: var(--ink-2);
  border-radius: 13px;
  padding: 11px 10px;
  font-size: 13.5px;
  font-weight: 650;
}
.qform-mode-btn.is-on {
  border-color: #d98245;
  background: #fff6ec;
  color: #a64622;
}
.qform-next-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
}
.qform-next-row small { font-size: 12px; color: var(--muted); }

/* iOS Pill Switch */
.ios-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 27px;
  flex-shrink: 0;
}
.ios-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.ios-switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #ddd6cc;
  transition: background 180ms ease;
  cursor: pointer;
}
.ios-switch-track::after {
  content: "";
  position: absolute;
  top: 2.5px;
  left: 2.5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
  transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
.ios-switch input:checked + .ios-switch-track { background: rgba(184, 80, 50, 0.82); }
.ios-switch input:checked + .ios-switch-track::after { transform: translateX(19px); }

/* 3. X-Style Community Timeline Cards, Immersive Post Detail, Lightbox & FAB */
.xpost-card {
  background: #fff;
  border: 1px solid rgba(60, 48, 36, 0.065);
  border-radius: 18px;
  padding: 14px 15px 10px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  box-shadow: 0 3px 14px rgba(32, 24, 16, 0.04);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.xpost-card:hover { border-color: rgba(184, 80, 50, 0.2); box-shadow: 0 6px 20px rgba(32, 24, 16, 0.065); }
.xpost-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.xpost-ava {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f6e7dc 0%, #edd5c3 100%);
  color: #7c381f;
  font-size: 14px;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(184, 80, 50, 0.15);
}
.xpost-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.xpost-topic-pill {
  border: 0;
  background: rgba(184, 80, 50, 0.09);
  color: #933c21;
  font-size: 11.5px;
  font-weight: 650;
  padding: 3px 9px;
  border-radius: 999px;
}
.xpost-body-btn {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  font-size: 15px;
  line-height: 1.62;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}
.xpost-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  border-top: 1px solid rgba(60, 48, 36, 0.06);
  padding-top: 7px;
  margin-top: 2px;
}
.xpost-act {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 4px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 120ms ease, color 120ms ease, transform 110ms ease;
}
.xpost-act:hover { background: #f7f4ef; color: var(--ink); }
.xpost-act:active { transform: scale(0.93); }
.xpost-act.is-liked { color: #d64545; background: rgba(214, 69, 69, 0.08); }
.xpost-act.is-saved { color: #c47d1e; background: rgba(196, 125, 30, 0.1); }

/* X-Style Post Detail */
.xdetail-author-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(60, 48, 36, 0.07);
  margin-bottom: 12px;
}
.xdetail-body {
  font-size: 15.5px;
  line-height: 1.72;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 10px 0 12px;
}
.xdetail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid rgba(60, 48, 36, 0.07);
  border-bottom: 1px solid rgba(60, 48, 36, 0.07);
  font-size: 12.5px;
  color: var(--muted);
  margin: 10px 0;
}
.xdetail-stats strong { color: var(--ink); font-weight: 700; }
.xcomment-row {
  display: flex;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(60, 48, 36, 0.06);
}
.xcomment-row:last-child { border-bottom: 0; }
.xcomment-body { flex: 1; min-width: 0; }
.xcomment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}
.xcomment-head strong { font-size: 13px; color: var(--ink); }
.xcomment-head small { font-size: 11px; color: var(--muted); }
.xcomment-text { font-size: 14px; line-height: 1.55; color: var(--ink-2); word-break: break-word; }
.xcomment-reply-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 0 0;
}
.xcomment-reply-btn:hover { color: var(--terracotta); }

/* Pure Translucent Frosted Glass Circular Bubble + Cross FAB */
.comm-fab {
  position: fixed;
  right: 16px;
  bottom: 84px;
  z-index: 30;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.2px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.56);
  backdrop-filter: saturate(200%) blur(22px);
  -webkit-backdrop-filter: saturate(200%) blur(22px);
  color: var(--terracotta);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 26px rgba(32, 24, 16, 0.14), 0 1px 3px rgba(32, 24, 16, 0.06), inset 0 1.5px 1px rgba(255, 255, 255, 0.95);
  transition: transform 130ms ease, background 140ms ease, box-shadow 140ms ease;
}
.comm-fab svg { width: 24px; height: 24px; }
.comm-fab:hover { background: rgba(255, 255, 255, 0.78); box-shadow: 0 10px 30px rgba(184, 80, 50, 0.18), inset 0 1.5px 1px rgba(255, 255, 255, 0.98); }
.comm-fab:active { transform: scale(0.92); }
@media (min-width: 769px) { .comm-fab { bottom: 28px; right: 28px; } }

/* Crisp Circular Glass Icon Buttons (No verbose text clutter!) */
.icon-glass-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(32, 24, 16, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 120ms ease, background 130ms ease, color 130ms ease;
}
.icon-glass-btn svg { width: 17px; height: 17px; }
.icon-glass-btn:hover { background: rgba(255, 255, 255, 0.92); color: var(--terracotta); }
.icon-glass-btn:active { transform: scale(0.92); }
.icon-glass-btn.is-dm {
  width: 38px;
  height: 38px;
  border-color: rgba(184, 80, 50, 0.2);
  background: rgba(184, 80, 50, 0.1);
  color: #8f381f;
}
.icon-glass-btn.is-danger { color: var(--danger); background: rgba(164, 52, 41, 0.08); border-color: rgba(164, 52, 41, 0.16); }
.icon-dot-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--terracotta);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  border: 1.5px solid #fff;
}

.xpost-act svg { width: 17px; height: 17px; flex-shrink: 0; }
.xpost-topic-pill.is-loc {
  background: rgba(46, 98, 74, 0.09);
  color: var(--moss);
}

/* Original PetGuide Unified "伴宠空间" Card & Moss Editorial Identity */
.pg-pet-hub-card {
  background: var(--surface);
  border: 1px solid rgba(46, 98, 74, 0.13);
  border-top: 3px solid rgba(46, 98, 74, 0.55);
  border-radius: 20px;
  padding: 13px 14px;
  margin-bottom: 12px;
  box-shadow: 0 4px 18px rgba(32, 24, 16, 0.05);
}
.pg-pet-id-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  background: #faf7f2;
  border: 1px solid rgba(60, 48, 36, 0.07);
  margin-bottom: 10px;
}
.pg-telemetry-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.pg-tele-cell {
  border: 1px solid rgba(60, 48, 36, 0.07);
  background: linear-gradient(180deg, #ffffff 0%, #faf8f4 100%);
  border-radius: 14px;
  padding: 9px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: transform 110ms ease, border-color 130ms ease;
}
.pg-tele-cell:active { transform: scale(0.96); }
.pg-tele-cell small { font-size: 10.5px; color: var(--muted); }
.pg-tele-cell strong { font-size: 15px; font-weight: 750; color: var(--ink); font-variant-numeric: tabular-nums; }
.pg-tele-cell span { font-size: 10.5px; color: var(--moss); font-weight: 600; }

.pg-care-pill-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 10px;
}
.pg-care-pill {
  border: 1px solid rgba(60, 48, 36, 0.08);
  background: #f6f3ee;
  border-radius: 11px;
  padding: 7px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-size: 11.5px;
  color: var(--ink-2);
}
.pg-care-pill strong { font-size: 11.5px; color: var(--ink); }
.pg-care-pill span { font-size: 11px; color: var(--muted); font-weight: 600; }
.pg-care-pill.is-alert { background: #fdf0ee; border-color: rgba(164, 52, 41, 0.22); }
.pg-care-pill.is-alert span { color: var(--danger); }
.pg-care-pill.is-soon { background: #fdf5ee; border-color: rgba(184, 80, 50, 0.22); }
.pg-care-pill.is-soon span { color: var(--terracotta); }

.pg-space-nav4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(60, 48, 36, 0.06);
}
.pg-space-nav-btn {
  border: 0;
  background: transparent;
  padding: 5px 2px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 650;
  color: var(--ink-2);
}
.pg-space-nav-btn:hover { background: var(--paper); }
.pg-space-nav-ico {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: rgba(46, 98, 74, 0.08);
  color: var(--moss);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pg-space-nav-ico svg { width: 18px; height: 18px; }

.pg-space-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.pg-moss-card {
  border-radius: 18px;
  padding: 15px 16px;
  background: linear-gradient(145deg, #214736 0%, #2d5c46 65%, #376c53 100%);
  color: #f6faf7;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(33, 71, 54, 0.18);
}
.pg-moss-card small { display: block; font-size: 10.5px; letter-spacing: 0.06em; color: rgba(246, 250, 247, 0.72); }
.pg-moss-card strong { display: block; font-size: 17px; font-weight: 700; margin-top: 3px; color: #fff; }
.pg-moss-ai-btn {
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.pg-moss-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pg-moss-pill {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #eef6f1;
}
.pg-quick-care-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.pg-qcare-btn {
  border: 1px solid rgba(60, 48, 36, 0.08);
  border-radius: 14px;
  padding: 10px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pg-qcare-btn strong { font-size: 13px; color: var(--ink); }
.pg-qcare-btn small { font-size: 11px; color: var(--muted); }
.pg-qcare-btn.is-mint { background: #edf8f2; border-color: rgba(46, 98, 74, 0.16); }
.pg-qcare-btn.is-sky { background: #eef5fc; border-color: rgba(38, 111, 184, 0.16); }
.pg-qcare-btn.is-amber { background: #fff4e8; border-color: rgba(184, 80, 50, 0.16); }

/* Unified One-Page Pet Profile Editor */
.pg-edit-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(145deg, #faf6f0 0%, #ffffff 100%);
  border: 1px solid rgba(60, 48, 36, 0.08);
  margin-bottom: 12px;
}
.pg-pet-ava-upload {
  position: relative;
  width: 66px;
  height: 66px;
  flex-shrink: 0;
  cursor: pointer;
}
.pg-pet-ava-preview {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  overflow: hidden;
  border: 2.5px solid #fff;
  box-shadow: 0 4px 14px rgba(32, 24, 16, 0.14);
}
.pg-pet-ava-preview img, .pg-pet-ava-preview .pet-portrait-ring { width: 100%; height: 100%; object-fit: cover; display: block; }
.pg-ava-cam-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(35, 31, 28, 0.85);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}
.pg-ava-cam-dot svg { width: 12px; height: 12px; }
.pg-edit-name-col { flex: 1; min-width: 0; }
.pg-edit-name-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.pg-name-input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(60, 48, 36, 0.12);
  background: #fff;
  border-radius: 11px;
  padding: 8px 11px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.pg-form-sec-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin: 12px 2px 6px;
  letter-spacing: 0.02em;
}

/* Mainstream Social Post Composer */
.pub-media-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.pub-media-tile {
  position: relative;
  min-height: 82px;
  border-radius: 15px;
  border: 1.5px dashed rgba(60, 48, 36, 0.18);
  background: #faf7f2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  padding: 10px;
}
.pub-media-tile small { font-size: 10.5px; color: var(--muted); font-weight: 400; }
.pub-media-tile.has-file { border-style: solid; border-color: var(--terracotta); background: #fff7f2; }
.pub-textarea {
  width: 100%;
  border: 0;
  background: #faf7f2;
  border-radius: 15px;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  resize: vertical;
  min-height: 108px;
}
.pub-textarea:focus { outline: none; background: #fff; box-shadow: 0 0 0 2px rgba(184, 80, 50, 0.15); }
.pub-tag-wrap { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0 4px; }
.pub-tag-pill {
  border: 1px solid rgba(60, 48, 36, 0.1);
  background: #f5f1ea;
  color: var(--ink-2);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
}
.pub-tag-pill.is-on {
  border-color: rgba(184, 80, 50, 0.35);
  background: rgba(184, 80, 50, 0.11);
  color: #933c21;
}

/* Social Homepage, Avatar Zoom Lightbox & Pet Showcase Cards */
.cover-home-hint {
  position: absolute;
  left: 12px;
  top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: saturate(170%) blur(14px);
  -webkit-backdrop-filter: saturate(170%) blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 650;
  cursor: pointer;
}
.cover-corner-pill {
  position: absolute;
  right: 12px;
  bottom: 10px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 650;
}
.me-name-edit-btn {
  border: 0;
  background: transparent;
  padding: 2px 0;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  text-align: left;
  cursor: pointer;
}
.me-name-edit-btn strong { font-size: 17.5px; font-weight: 750; color: var(--ink); }
.me-name-cue { font-size: 12px; color: var(--muted); opacity: 0.75; }
.me-name-edit-btn:hover .me-name-cue { color: var(--terracotta); opacity: 1; }

.ava-lightbox-frame {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.48);
  background: #f5ede3;
}
.ava-lightbox-frame img, .ava-lightbox-frame svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.ava-lightbox-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.social-pets-sec {
  background: #fff;
  border: 1px solid rgba(60, 48, 36, 0.065);
  border-radius: 18px;
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: 0 3px 12px rgba(32, 24, 16, 0.035);
}
.social-pet-strip {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 10px;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.social-pet-strip::-webkit-scrollbar { display: none; }
.social-pet-card {
  flex: 0 0 112px;
  border: 1px solid rgba(60, 48, 36, 0.08);
  background: linear-gradient(180deg, #ffffff 0%, #faf7f2 100%);
  border-radius: 16px;
  padding: 11px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
  transition: transform 120ms ease, border-color 140ms ease;
}
.social-pet-card:active { transform: scale(0.95); }
.social-pet-card:hover { border-color: rgba(46, 98, 74, 0.3); }
.social-pet-ava { width: 54px; height: 54px; }
.social-pet-ava .pet-portrait-ring { width: 54px; height: 54px; }
.social-pet-card strong { font-size: 13px; color: var(--ink); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.social-pet-card small { font-size: 10.5px; color: var(--muted); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pet-showcase-modal-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 14px;
  border-radius: 20px;
  background: linear-gradient(160deg, #faf6ef 0%, #ffffff 100%);
  border: 1px solid rgba(60, 48, 36, 0.07);
  margin-bottom: 12px;
}
.pet-showcase-photo {
  width: 132px;
  height: 132px;
  border-radius: 28px;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 0 10px 26px rgba(32, 24, 16, 0.14);
}
.pet-showcase-photo img, .pet-showcase-photo .pet-portrait-ring { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; }
.pet-showcase-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.pet-showcase-title strong { font-size: 18px; font-weight: 750; color: var(--ink); }

/* Compact Circular + Add Button (no verbose text clutter!) */
.icon-plus-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(184, 80, 50, 0.28);
  background: rgba(184, 80, 50, 0.72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(184, 80, 50, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.36);
  transition: transform 120ms ease, background 130ms ease;
}
.icon-plus-btn svg { width: 17px; height: 17px; }
.icon-plus-btn:active { transform: scale(0.92); }

/* Merged Single Photo/Video Tile + Title Input + Nearby Distance + Pet Home */
.pub-media-single {
  width: 100%;
  min-height: 92px;
  border-radius: 16px;
  border: 1.5px dashed rgba(60, 48, 36, 0.18);
  background: #faf7f2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  padding: 12px;
  margin-bottom: 10px;
}
.pub-media-single small { font-size: 11px; color: var(--muted); font-weight: 400; }
.pub-media-single.has-file { border-style: solid; border-color: rgba(184, 80, 50, 0.45); background: #fff8f4; padding: 6px; }
.pub-title-input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(60, 48, 36, 0.1);
  background: transparent;
  padding: 8px 4px 10px;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.pub-title-input:focus { outline: none; border-bottom-color: var(--terracotta); }

.xpost-title {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  font-size: 15.5px;
  font-weight: 750;
  color: var(--ink);
  line-height: 1.4;
}
.xdetail-title {
  margin: 8px 0 4px;
  font-size: 17.5px;
  font-weight: 750;
  color: var(--ink);
  line-height: 1.4;
}
.xpost-dist-badge {
  font-size: 11px;
  font-weight: 650;
  color: var(--moss);
  background: rgba(46, 98, 74, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.xpost-author-line {
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-wrap: wrap;
}
.xpost-author-dist {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--moss);
  white-space: nowrap;
}
.xpost-topic-pill.is-lost {
  background: rgba(184, 80, 50, 0.14);
  color: #9b361a;
}
.xpost-topic-pill.is-adopt {
  background: rgba(46, 98, 74, 0.14);
  color: var(--moss);
}
.pethome-hero {
  background: linear-gradient(155deg, #fff5ec 0%, #f7fbf8 100%);
  border: 1px solid rgba(184, 80, 50, 0.15);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 3px 14px rgba(32, 24, 16, 0.04);
}
.pethome-hero strong { display: block; font-size: 15px; color: var(--ink); }
.pethome-hero small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.pethome-tip {
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
  padding-top: 8px;
  border-top: 1px solid rgba(60, 48, 36, 0.07);
}

/* Global Polish: Hide floating nav/FAB behind open sheets, bottom-align shop cards, fade pill-strip, clear community FAB */
body:has(.preview-dialog[open]) .mobile-tabbar,
body:has(.preview-dialog[open]) .comm-fab {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}
.preview-dialog { z-index: 80; }
.preview-dialog::backdrop {
  background: rgba(24, 20, 16, 0.44);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.prod-card {
  display: flex;
  flex-direction: column;
}
.prod-card .prod-actions {
  margin-top: auto;
  padding-top: 8px;
}
.pill-strip {
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 92%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0%, #000 92%, transparent 100%);
  padding-right: 16px;
}
.pg-pet-id-bar.is-clickable {
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.pg-pet-id-bar.is-clickable:hover { background: #f5efe6; border-color: rgba(46, 98, 74, 0.22); }
.pg-space-grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.pg-space-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(60, 48, 36, 0.075);
  background: linear-gradient(180deg, #ffffff 0%, #faf8f4 100%);
  text-align: left;
  transition: transform 110ms ease, border-color 130ms ease, background 130ms ease;
}
.pg-space-tile:hover { border-color: rgba(46, 98, 74, 0.28); background: #f8fbf9; }
.pg-space-tile:active { transform: scale(0.97); }
.pg-space-tile.is-alert { border-color: rgba(164, 52, 41, 0.26); background: #fdf6f5; }
.pg-space-tile-copy { min-width: 0; flex: 1; }
.pg-space-tile-copy strong { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.pg-space-tile-copy small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-space-tile.is-alert .pg-space-tile-copy small { color: var(--danger); font-weight: 600; }

@media (max-width: 768px) {
  #viewCommunity { padding-bottom: 64px; }
  .hero-portal { display: flex; flex-direction: column; justify-content: space-between; }
  .hero-portal strong { font-size: 14.5px; white-space: nowrap; }
}

/* Fullscreen Image Lightbox */
.xlightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(16, 14, 12, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.xlightbox img {
  max-width: 100%;
  max-height: 82dvh;
  border-radius: 14px;
  object-fit: contain;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}
.xlightbox-close {
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
