/* 全局基础 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

/* ===== 统一线条图标 ===== */
.icon {
  display: inline-block;
  width: 22px; height: 22px;
  vertical-align: middle;
  flex-shrink: 0;
  color: currentColor;
}
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }
.icon-xl { width: 40px; height: 40px; }
/* 让按钮内的图标和文字垂直对齐 */
button .icon { color: currentColor; vertical-align: middle; }

:root {
  --primary: #FFD93D;          /* 主色：蛋黄 / 小鸡黄 */
  --primary-deep: #FFB627;     /* 深色按钮黄 */
  --primary-soft: #FFF2B8;     /* 浅黄底色 */
  --primary-glow: #FFE873;     /* 高光黄 */
  --bg: #FFFBF0;               /* 页面底色：奶油白 */
  --bg-soft: #FFF8E1;          /* 略深奶油 */
  --cream: #FFF6E0;            /* 暖奶油（占位/分隔） */
  --card: #FFFFFF;             /* 卡片纯白 */
  --text: #1F1A14;             /* 主文本：暖黑 */
  --text-mid: #6E6357;         /* 次要文本：暖灰 */
  --text-light: #B5A892;       /* 弱化文本：浅奶咖 */
  --line: #FFF0CF;             /* 分割线：奶油 */
  --pink: #FFE0E6;
  --green: #D5EFDC;
  --shadow: 0 6px 18px rgba(255, 182, 39, 0.08);
  --shadow-lg: 0 12px 30px rgba(255, 167, 39, 0.14);
  --radius-card: 26px;
  --radius-pill: 999px;
}
html, body { overflow-x: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  padding-bottom: 80px;
}

/* 顶部导航 */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  background: rgba(255, 251, 240, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: none;
}
/* 仅首页显示全局 topbar；其它页面有自己的 page-head */
body:has(#pageHome.active) .topbar { display: flex; }
.topbar { display: none; }
.logo {
  font-size: 19px; font-weight: 800; letter-spacing: 0.3px; color: var(--text);
  display: inline-flex; align-items: center; gap: 6px;
}
.logo-icon { color: var(--primary-deep); }
.topbar-coin {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px;
  background: var(--primary);
  border: none; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 800; color: #6A4A0A;
  box-shadow: 0 4px 12px rgba(255, 201, 60, 0.3);
  cursor: pointer; transition: transform 0.15s;
}
.topbar-coin:active { transform: scale(0.95); }

/* 定位按钮 */
.topbar-loc {
  display: inline-flex; align-items: center; gap: 4px;
  background: transparent; border: none; cursor: pointer;
  font-size: 13px; font-weight: 800; color: var(--text);
  line-height: 1.05; text-align: left;
  padding: 4px 2px;
  flex-shrink: 0;
}
.topbar-loc:active { transform: scale(0.95); }
.loc-pin { width: 16px; height: 16px; color: var(--text); flex-shrink: 0; }
.loc-arrow { font-size: 11px; color: var(--text-mid); margin-left: 1px; }

/* 搜索框 */
.topbar-search {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  background: var(--card);
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.topbar-search:active { transform: scale(0.99); }
.search-icon {
  width: 16px; height: 16px; flex-shrink: 0;
  color: var(--text-mid);
}
.search-placeholder {
  font-size: 13px; color: var(--text-light); flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-weight: 500;
}
.search-cam {
  width: 17px; height: 17px; flex-shrink: 0;
  color: var(--text-mid);
}

/* 钱包/购物车按钮 */
.topbar-cart {
  position: relative;
  background: transparent; border: none; cursor: pointer;
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text);
  flex-shrink: 0;
}
.topbar-cart:active { transform: scale(0.9); }
.topbar-cart svg { width: 24px; height: 24px; }
.cart-badge {
  position: absolute; top: -2px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: #FF6B35; color: #fff;
  border-radius: 999px;
  font-size: 10px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 4px rgba(255,107,53,0.4);
}

/* ============ 主 banner（黄色插画） ============ */
.hero-banner {
  position: relative;
  margin: 4px 16px 14px;
  padding: 22px 22px 24px;
  background: linear-gradient(135deg, #FFE352 0%, #FFD93D 60%, #FFC93C 100%);
  border-radius: 26px;
  box-shadow: 0 10px 28px rgba(255, 201, 60, 0.28);
  overflow: hidden;
  display: flex; align-items: center; gap: 8px;
  cursor: pointer;
  border: none; width: calc(100% - 32px);
  text-align: left;
}
.hero-banner:active { transform: scale(0.99); }
.hero-banner::before {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -10px;
  height: 60%;
  background: radial-gradient(ellipse at 60% 100%, #95C97A 0%, rgba(149, 201, 122, 0) 70%);
  pointer-events: none;
}
.hero-text { flex: 1; min-width: 0; position: relative; z-index: 2; }
.hero-text h1 {
  font-size: 20px; font-weight: 900; color: var(--text);
  line-height: 1.3; letter-spacing: 0.5px;
}
.hero-shout {
  display: inline-block;
  margin-top: 10px;
  font-size: 22px; font-weight: 900; color: var(--text);
  letter-spacing: 1px;
}
.hero-mascot {
  width: 130px; height: auto;
  flex-shrink: 0;
  position: relative; z-index: 2;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.12));
}
.hero-stamp {
  position: absolute;
  top: 14px; right: 16px;
  background: #E94B3C; color: #fff;
  font-size: 9px; font-weight: 900;
  padding: 4px 9px; border-radius: 4px;
  letter-spacing: 1px;
  transform: rotate(8deg);
  box-shadow: 0 3px 8px rgba(233, 75, 60, 0.35);
  z-index: 3;
}

/* ============ 遛宠 Hero · 动态场景 ============ */
.stroll-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  min-height: 90px;
}
.stroll-fly-wrap {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 28px;
  pointer-events: none;
}
.stroll-fly-wrap .stroll-fly {
  position: absolute;
  top: 0; left: 18%;
  font-size: 17px;
  animation: hero-fly-anim 4.5s ease-in-out infinite;
}
.stroll-fly-wrap .stroll-fly.f2 {
  left: 52%; font-size: 14px;
  animation-delay: -1.6s;
}
.stroll-fly-wrap .stroll-fly.f3 {
  left: 74%; font-size: 12px;
  animation-delay: -3.1s;
}
@keyframes hero-fly-anim {
  0%, 100% { transform: translateY(0) scaleX(1); }
  50%       { transform: translateY(-10px) scaleX(-1); }
}
.stroll-hero-char { font-size: 54px; line-height: 1; position: relative; z-index: 2; }
.stroll-hero-arm  { font-size: 20px; margin-bottom: -12px; z-index: 3; }
.stroll-hero-back {
  font-size: 16px; margin-bottom: 2px;
  align-self: flex-start; margin-left: 6px; z-index: 1;
}
.stroll-hero-leash     { font-size: 11px; margin-top: -2px; opacity: 0.7; }
.stroll-hero-leash-pet { font-size: 24px; }

/* ============ 异形快捷卡（左 1 大 + 右 2 叠） ============ */
.combo-cards {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 10px;
  margin: 0 16px 18px;
}
.combo-card {
  position: relative;
  border: none; cursor: pointer;
  border-radius: 20px;
  padding: 14px 14px;
  text-align: left;
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden;
  transition: transform 0.15s;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}
.combo-card:active { transform: scale(0.97); }
.combo-text h3 {
  font-size: 15px; font-weight: 900; color: var(--text);
  letter-spacing: 0.3px;
}
.combo-text p {
  margin-top: 4px;
  font-size: 11px; color: var(--text-mid); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.combo-emoji {
  font-size: 38px; line-height: 1;
  align-self: flex-end;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.12));
  position: relative;
}
/* 左 · 大卡 */
.combo-big {
  min-height: 168px;
  background: linear-gradient(160deg, #FFE352 0%, #FFD93D 70%, #FFC93C 100%);
}
.combo-big-emoji {
  font-size: 52px;
  align-self: center;
  margin: 8px auto 0;
}
.combo-big-emoji .combo-emoji-2 {
  font-size: 36px;
  margin-left: -8px;
  display: inline-block;
}
/* 右 · 叠两张 */
.combo-stack { display: flex; flex-direction: column; gap: 10px; }
.combo-mini {
  flex: 1;
  flex-direction: row; align-items: center;
  padding: 12px 14px;
  min-height: 79px;
}
.combo-mini .combo-text { flex: 1; min-width: 0; }
.combo-mini .combo-emoji { font-size: 32px; align-self: center; }
.combo-mini-pink { background: linear-gradient(135deg, #FFEFD5 0%, #FFE0B2 100%); }
.combo-mini-blue { background: linear-gradient(135deg, #E3F2FF 0%, #D6EAFF 100%); }
.combo-tag-new {
  position: absolute; top: -4px; right: -16px;
  background: #4CAF50; color: #fff;
  font-size: 8px; font-weight: 900;
  padding: 2px 5px; border-radius: 4px;
  letter-spacing: 0.5px;
}

/* ============ 4 圆形分类入口 ============ */
.round-cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: 0 16px 18px;
}
.round-cat {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: transparent; border: none; cursor: pointer;
  padding: 4px 2px;
  transition: transform 0.15s;
}
.round-cat:active { transform: scale(0.92); }
.round-cat-circle {
  width: 60px; height: 60px;
  border-radius: 22px;
  background: var(--card);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; line-height: 1;
  box-shadow: 0 8px 18px rgba(255, 167, 39, 0.16), inset 0 0 0 1px rgba(255, 217, 61, 0.25);
}
.round-cat-label {
  font-size: 12px; font-weight: 700; color: var(--text);
}

/* ============ 内容分组标题 ============ */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 6px 18px 12px;
  gap: 10px;
}
.section-title {
  font-size: 18px; font-weight: 900; color: var(--text);
  letter-spacing: 0.5px;
}
.section-sub {
  font-size: 11.5px; color: var(--text-light); font-weight: 500;
  margin-top: 2px;
}
.section-more {
  background: transparent; border: none; cursor: pointer;
  font-size: 12px; color: var(--text-mid); font-weight: 600;
  padding: 4px 6px;
}
.section-more:active { transform: scale(0.95); }
.coin-box {
  display: flex; align-items: center; gap: 5px;
  background: var(--primary);
  padding: 7px 14px; border-radius: var(--radius-pill);
  font-weight: 700; color: var(--text);
  box-shadow: 0 4px 12px rgba(255, 201, 60, 0.35);
}
.coin-icon { font-size: 16px; }
.coin-label { font-size: 12px; color: #6A4A0A; font-weight: 600; }

/* 页面切换 */
.page { display: none; min-height: 100vh; }
.page.active { display: block; animation: fadeIn 0.3s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ===== 由弹窗升级而来的二级页通用 shell =====
   保留原 .modal-card 内部排版，只把 modal 容器特性（最大宽高、圆角、动效）中和掉，
   不动 padding，让各 *-card 自己的 padding 规则继续生效 */
.page-modal { background: var(--bg); padding-bottom: 32px; }
.page-modal .modal-card,
.page-modal .chat-card {
  width: 100%; max-width: 520px;
  margin: 0 auto;
  max-height: none; height: auto;
  border-radius: 0;
  box-shadow: none;
  animation: none;
}
.page-modal .modal-card { background: var(--card); }
.page-modal .modal-close { display: none; }
/* 弹窗里的 sticky tabs（如 profile-tabs）原以 modal-card 为滚动容器，
   现在容器变成整页，sticky 顶应贴到 page-head 之下 */
.page-modal .profile-tabs { top: 64px; }
.page-modal .social-modal-tabs { top: 64px; }
/* 全屏分类页：去掉原 cat-sheet 的内边距重叠 */
.page-modal .cat-sheet { padding: 16px; }
.page-modal .cat-sheet-head { padding-top: 0; }
.page-modal .cat-sheet-head .modal-close { display: none; }
/* chat 页：撑满屏，input 钉底 */
#pageChat.page-modal { padding-bottom: 0; min-height: 100vh; display: none; }
#pageChat.page-modal.active { display: flex; flex-direction: column; }
#pageChat .chat-card {
  flex: 1; min-height: 0;
  max-width: 520px;
  padding: 0;
}
#pageChat .chat-head { display: none; }
.chat-page-head-info {
  display: inline-flex; align-items: center; gap: 10px;
  flex: 1; min-width: 0;
}
.chat-page-head-text {
  display: inline-flex; flex-direction: column;
  line-height: 1.2;
}
/* comment 页：撑满，输入框钉底 */
#pageComment.page-modal { padding-bottom: 0; min-height: 100vh; display: none; }
#pageComment.page-modal.active { display: flex; flex-direction: column; }
#pageComment .comment-card {
  flex: 1; min-height: 0;
  max-width: 520px;
  display: flex; flex-direction: column;
  width: 100%; margin: 0 auto;
  background: var(--card);
}
#pageComment .comment-card .comment-list { flex: 1; min-height: 0; overflow-y: auto; }
#pageComment .comment-input-bar { border-radius: 0; }
#pageWallet { padding-bottom: 0; }
/* 浮窗模式下的 modal 仍正常工作（confirm / unlock / sharePet / dressSaved 保留为弹窗） */

/* Banner —— 手绘插画风格，对齐参考图 */
.banner {
  position: relative;
  margin: 12px 16px 18px;
  padding: 22px 22px 24px;
  background: var(--primary);
  border-radius: var(--radius-card);
  box-shadow: 0 10px 30px rgba(255, 201, 60, 0.25);
  overflow: hidden;
  display: flex; align-items: center; gap: 12px;
}
.banner-text { flex: 1; min-width: 0; position: relative; z-index: 2; }
.banner h1 {
  font-size: 22px; font-weight: 800; color: var(--text);
  line-height: 1.3;
}
.banner p { margin-top: 8px; font-size: 12.5px; color: #5A4A1A; font-weight: 600; }
.banner-mascot {
  width: 130px; height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.08));
}

/* 标签 */
.tabs {
  display: flex; gap: 8px; padding: 4px 16px 14px;
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 9px 16px; border-radius: var(--radius-pill);
  background: var(--card); border: none;
  font-size: 13px; color: var(--text-mid); font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.tab .icon { color: var(--text-mid); }
.tab.active {
  background: linear-gradient(135deg, #FFE873 0%, #FFD93D 100%);
  color: #5A3A05;
  box-shadow: 0 6px 16px rgba(255, 182, 39, 0.35);
  font-weight: 800;
}
.tab.active .icon { color: #5A3A05; }

/* 瀑布流 */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px; padding: 0 16px;
}
.card {
  background: var(--card); border-radius: 18px;
  overflow: hidden; box-shadow: var(--shadow);
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
  animation: cardIn 0.4s backwards;
  display: flex; flex-direction: column;
}
.card:active { transform: scale(0.97); }
.card:hover { box-shadow: var(--shadow-lg); }
@keyframes cardIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.card-img-wrap { position: relative; }
.card-img {
  width: 100%; aspect-ratio: 1;
  object-fit: cover; background: #F5F5F5;
  display: block;
}
.card-badge {
  position: absolute; top: 10px; left: 10px;
  padding: 4px 10px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700; color: white;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.video-badge { background: rgba(0,0,0,0.7); }
.audio-badge { background: var(--primary); color: var(--text); }
.video-player {
  width: 100%; margin-bottom: 12px;
  border-radius: 14px; overflow: hidden;
  background: #000;
}
.card-body {
  padding: 12px 12px 14px;
  display: flex; flex-direction: column;
  flex: 1; min-width: 0;
}
.card-title {
  font-size: 13.5px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: 8px; gap: 6px;
}
.card-cat {
  font-size: 11px; color: #6A4A0A; font-weight: 600;
  background: var(--primary-soft); padding: 3px 9px; border-radius: var(--radius-pill);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0; max-width: 100%;
}
.card-price {
  font-size: 14px; font-weight: 800; color: #FF6B35;
  display: inline-flex; align-items: center; gap: 3px;
  flex-shrink: 0;
}
.card-price-coin {
  width: 16px; height: 16px; display: block;
  filter: drop-shadow(0 1px 2px rgba(31,19,8,0.25));
}
.card-price-coin-sm { width: 13px; height: 13px; }
.card-sales {
  font-size: 11px; color: var(--text-light);
  margin-top: 4px;
  display: inline-flex; align-items: center; gap: 3px;
  flex-wrap: wrap;
}

/* 萌宠属性标签：性别 / 年龄 / 性格 */
.pet-tags {
  display: flex; flex-wrap: wrap; gap: 5px;
  margin-top: 8px;
  min-height: 44px; align-content: flex-start;
}
.pet-tag {
  font-size: 10px; line-height: 1;
  padding: 4px 9px; border-radius: var(--radius-pill);
  background: var(--primary-soft); color: #6A4A0A;
  font-weight: 600; white-space: nowrap;
}
.tag-gender { background: #E3F2FF; color: #2D7BB5; }
.tag-age    { background: #F3EAFE; color: #7A4FB8; }
.tag-trait  { background: #FFE8EE; color: #C8456E; }

/* 详情弹窗内的标签居中显示 */
.modal-card .pet-tags {
  justify-content: center;
  margin: 8px 0 4px;
}
.modal-card .pet-tag { font-size: 12px; padding: 4px 10px; }

/* 商品详情页 */
#pageDetail { padding-bottom: 100px; }
.detail-body { padding: 16px 16px 20px; }
.detail-cover {
  width: 100%; aspect-ratio: 1;
  object-fit: cover; border-radius: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  background: #FFF3D8;
}
.detail-card {
  background: white; border-radius: 20px;
  padding: 20px; box-shadow: var(--shadow);
}
.detail-card h3 { font-size: 19px; font-weight: 800; color: var(--text); }
.pet-name-row {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 10px; padding: 6px 12px;
  background: linear-gradient(135deg, #FFF4D6 0%, #FFE4A8 100%);
  border-radius: 999px;
  font-size: 13px;
}
.pet-name-label { color: var(--text-light); font-weight: 600; }
.pet-name-value { color: var(--text); font-weight: 800; }
.detail-meta {
  display: flex; gap: 12px; margin-top: 8px;
  font-size: 13px; color: var(--text-light);
}
.detail-card .pet-tags { margin-top: 12px; }
.detail-card .pet-tag { font-size: 12px; padding: 4px 10px; }
.detail-price-row { margin-top: 16px; }
.detail-bar {
  position: fixed; left: 0; right: 0; bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.06);
  z-index: 50;
}
.detail-bar .buy-btn { margin-top: 0; }

/* 悬浮按钮 */
.fab {
  position: fixed; right: 16px; bottom: 96px;
  display: flex; align-items: center; gap: 6px;
  padding: 14px 22px;
  background: linear-gradient(135deg, #FFE873 0%, #FFD93D 60%, #FFB627 100%);
  color: #5A3A05;
  font-weight: 900; font-size: 14px;
  border: 2px solid #FFFFFF;
  border-radius: var(--radius-pill);
  box-shadow: 0 12px 28px rgba(255, 167, 39, 0.45), 0 0 0 4px rgba(255, 217, 61, 0.18);
  cursor: pointer; z-index: 50;
  animation: fabFloat 2.5s ease-in-out infinite;
}
@keyframes fabFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.fab span:first-child { font-size: 18px; }
.fab .icon { color: #5A3A05; }

/* 底部导航 */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-around;
  background: rgba(255, 252, 242, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 10px 0 14px;
  border-top: 1px solid var(--line);
  z-index: 99;
  box-shadow: 0 -6px 22px rgba(255, 182, 39, 0.06);
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none;
  font-size: 11px; color: var(--text-light);
  cursor: pointer; padding: 6px 14px;
  border-radius: 16px; transition: all 0.2s;
}
.nav-item .icon { color: var(--text-light); transition: color 0.2s; }
.nav-item.active { color: var(--text); font-weight: 800; background: var(--primary-soft); }
.nav-item.active .icon {
  color: var(--primary-deep);
  stroke-width: 2;
}
/* 选中态指示条 */
.nav-item { position: relative; }
.nav-item.active::before {
  content: '';
  position: absolute; top: -2px;
  left: 50%; transform: translateX(-50%);
  width: 22px; height: 3px;
  background: var(--primary-deep);
  border-radius: 99px;
}

/* 页面头部 */
.page-head {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: rgba(255, 251, 240, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: none;
}
.back {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--card); border: none;
  font-size: 22px; cursor: pointer; color: var(--text);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
}
.page-head h2 { font-size: 17px; font-weight: 800; color: var(--text); }

/* 发布表单 */
.publish-form { padding: 16px; }
.form-group { margin-bottom: 22px; }
.form-group label {
  display: block; font-size: 14px; font-weight: 700; color: var(--text);
  margin-bottom: 10px;
}
.form-group input[type="text"],
.form-group input[type="number"] {
  width: 100%; padding: 14px 16px;
  border: 2px solid transparent; border-radius: 14px;
  background: var(--card); font-size: 14px; color: var(--text);
  outline: none; transition: border 0.2s;
  box-shadow: var(--shadow);
}
.form-group input:focus { border-color: var(--primary-deep); }

.type-picker, .cat-picker, .price-picker {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.type-btn, .cat-btn, .price-btn {
  flex: 1; min-width: 70px;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 11px; border-radius: 14px;
  background: var(--card); border: 2px solid transparent;
  font-size: 13px; cursor: pointer; color: var(--text-mid);
  transition: all 0.2s; font-weight: 600;
  box-shadow: var(--shadow);
}
.type-btn .icon, .cat-btn .icon { color: var(--text-mid); }
.type-btn.active, .cat-btn.active, .price-btn.active {
  background: var(--primary);
  border-color: var(--text);
  color: var(--text); font-weight: 800;
}
.type-btn.active .icon, .cat-btn.active .icon { color: var(--text); }
#customPrice { margin-top: 8px; }

.upload-box {
  position: relative;
  width: 100%; aspect-ratio: 16 / 10;
  background: var(--card); border: 2px dashed #C9C9B0;
  border-radius: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.upload-tip {
  display: flex; flex-direction: column; align-items: center;
  color: var(--text-light); gap: 8px;
}
.upload-icon { font-size: 36px; color: var(--primary-deep); font-weight: 300; }
#previewImg { width: 100%; height: 100%; object-fit: cover; }

/* 发布·宠物小故事模块 */
.story-group .story-templates {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 10px;
}
.story-tpl-btn {
  padding: 8px 12px;
  border-radius: 999px;
  border: 2px solid transparent;
  background: var(--card);
  font-size: 12px; font-weight: 600;
  color: var(--text-mid);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.18s;
}
.story-tpl-btn:active { transform: scale(0.96); }
.story-tpl-btn.active {
  background: linear-gradient(135deg, #FFE9F2 0%, #FFF1C4 100%);
  border-color: var(--text);
  color: var(--text);
  font-weight: 800;
}
#storyInput {
  width: 100%;
  min-height: 92px;
  padding: 14px 16px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: var(--card);
  font-size: 14px;
  color: var(--text);
  outline: none;
  resize: vertical;
  font-family: inherit;
  line-height: 1.65;
  box-shadow: var(--shadow);
  transition: border 0.2s;
}
#storyInput:focus { border-color: var(--primary-deep); }
.story-counter {
  text-align: right;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-light);
}

.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--primary-deep); }
.check span { font-size: 13px; color: var(--text-mid); }

.submit-btn {
  width: 100%; padding: 18px;
  background: linear-gradient(135deg, #FFE873 0%, #FFD93D 60%, #FFB627 100%);
  color: #5A3A05;
  font-size: 16px; font-weight: 900;
  border: none; border-radius: 22px; cursor: pointer;
  box-shadow: 0 12px 28px rgba(255, 167, 39, 0.4);
  margin-top: 24px;
  letter-spacing: 0.8px;
}
.submit-btn:active { transform: scale(0.98); }

/* 个人中心 · 头像（嵌入合并卡顶部） */
.me-id-avatar {
  position: relative;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFE9F2 0%, #FFF1C4 50%, #E2F4DC 100%);
  border: 3px solid #fff;
  box-shadow: 0 6px 16px rgba(255, 180, 200, 0.35);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
  transition: transform 0.18s;
  flex-shrink: 0;
}
.me-id-avatar:active { transform: scale(0.94); }
.me-id-avatar-emoji {
  font-size: 36px; line-height: 1;
}
.me-id-avatar-edit {
  position: absolute; right: -2px; bottom: -2px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--text); color: var(--primary);
  font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.me-id-mid { flex: 1; min-width: 0; }
.me-id-name-row {
  display: inline-flex; align-items: center; gap: 6px;
}
.me-id-name {
  font-size: 17px; font-weight: 800; color: var(--text);
  max-width: 180px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.me-id-name-edit {
  background: none; border: none; cursor: pointer;
  font-size: 14px; padding: 2px 4px; opacity: 0.6;
}
.me-id-name-edit:active { opacity: 1; }
.me-id-tip {
  margin-top: 4px; font-size: 11.5px; color: var(--text-light);
}
.me-id-social {
  display: flex; align-items: center; gap: 14px;
  margin-top: 8px;
}
.me-id-social-item {
  display: inline-flex; align-items: baseline; gap: 4px;
  background: none; border: none; padding: 2px 0;
  cursor: pointer;
  font-family: inherit;
}
.me-id-social-item:active { transform: scale(0.95); }
.me-id-social-num {
  font-size: 15px; font-weight: 800; color: var(--text);
  letter-spacing: 0.2px;
}
.me-id-social-label {
  font-size: 11.5px; color: var(--text-light); font-weight: 600;
}
.me-id-social-sep {
  width: 1px; height: 14px; background: var(--line);
}

/* 个人中心 */
.my-card {
  margin: 0 16px 16px;
  background: var(--primary);
  border-radius: var(--radius-card); padding: 22px;
  box-shadow: 0 10px 28px rgba(255, 201, 60, 0.3);
  position: relative; overflow: hidden;
}
.my-card-merged {
  margin: 16px 16px 16px;
  padding: 18px 20px 20px;
}
.my-id-row {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  position: relative;
}
.my-card-merged .me-id-avatar {
  background: linear-gradient(135deg, #FFFFFF 0%, #FFF6D6 60%, #FFE9F2 100%);
  border-color: rgba(255, 255, 255, 0.95);
}
.my-card::before {
  content: '🐾'; position: absolute;
  right: -10px; top: -14px;
  font-size: 110px; opacity: 0.1;
  transform: rotate(15deg);
}
.my-coin { display: flex; align-items: center; gap: 16px; position: relative; }
.coin-big {
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border-radius: 18px;
  color: var(--primary-deep);
}
.coin-big .icon { color: var(--primary-deep); stroke-width: 2; }
.coin-big .b-coin-svg { width: 56px; height: 56px; }
.coin-num-big { font-size: 34px; font-weight: 800; color: var(--text); line-height: 1; }
.coin-tip { font-size: 12px; color: #6A4A0A; font-weight: 600; margin-top: 4px; }
.my-stats {
  display: flex; justify-content: space-around;
  margin-top: 22px; padding-top: 18px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  position: relative;
}
.stat { text-align: center; color: var(--text); }
.stat-num { font-size: 22px; font-weight: 800; }
.stat div:last-child { font-size: 12px; opacity: 0.75; font-weight: 600; }

.my-tabs {
  display: flex; padding: 0 16px; gap: 8px;
  margin-bottom: 14px;
}
.my-tab {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 11px;
  background: var(--card); border: none; border-radius: 14px;
  font-size: 13px; cursor: pointer;
  color: var(--text-mid); font-weight: 600;
  box-shadow: var(--shadow);
}
.my-tab .icon { color: var(--text-mid); }
.my-tab.active {
  background: var(--text); color: var(--primary); font-weight: 800;
}
.my-tab.active .icon { color: var(--primary); }
.my-list {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 12px; padding: 0 16px;
}
.empty {
  grid-column: 1 / -1;
  text-align: center; padding: 60px 20px;
  color: var(--text-light);
}
.empty-icon { font-size: 48px; margin-bottom: 8px; }

.card-action {
  display: block; width: 100%;
  margin-top: 10px; padding: 7px;
  background: var(--primary-soft); color: #6A4A0A;
  border: none; border-radius: 10px;
  font-size: 12px; cursor: pointer; font-weight: 700;
}

/* 弹窗 */
.modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, 0.5);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal.show { display: flex; animation: modalIn 0.2s; }
@keyframes modalIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  width: 100%; max-width: 360px; max-height: 90vh;
  background: white; border-radius: 24px;
  padding: 22px; overflow-y: auto;
  position: relative;
  animation: cardUp 0.3s;
}
@keyframes cardUp { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.06); border: none;
  font-size: 22px; cursor: pointer; line-height: 1;
  z-index: 1; color: var(--text-mid);
}
.modal-img {
  width: 100%; aspect-ratio: 1;
  object-fit: cover; border-radius: 16px;
  margin-bottom: 14px;
}
.modal-card h3 { font-size: 18px; font-weight: 800; color: var(--text); }
.modal-meta {
  display: flex; gap: 12px; margin-top: 8px;
  font-size: 12px; color: var(--text-light);
}
.modal-price { margin-top: 16px; }
.price-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(160deg, #1F1408 0%, #2C1E0C 100%);
  padding: 9px 16px 9px 9px; border-radius: var(--radius-pill);
  font-family: var(--v2-serif, "Source Han Serif SC", "PingFang SC", serif);
  font-weight: 800; color: #FFE8B0;
  letter-spacing: 0.6px;
  box-shadow: 0 6px 14px -8px rgba(26, 18, 8, 0.55);
  border: 1px solid rgba(255, 215, 138, 0.28);
}
.price-tag .b-coin-svg,
.price-tag .card-price-coin {
  width: 24px; height: 24px; display: block;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.45));
}
/* 统一 B 货币徽章 SVG 尺寸 */
.b-coin-svg { width: 56px; height: 56px; display: block; filter: drop-shadow(0 4px 10px rgba(31,19,8,0.45)); }
.b-coin-svg-sm { width: 22px; height: 22px; }
.buy-btn {
  width: 100%; padding: 16px;
  margin-top: 18px;
  background: linear-gradient(135deg, #FFE873 0%, #FFD93D 60%, #FFB627 100%);
  color: #5A3A05;
  font-size: 15px; font-weight: 900;
  border: none; border-radius: 22px; cursor: pointer;
  box-shadow: 0 10px 26px rgba(255, 167, 39, 0.42);
  letter-spacing: 0.6px;
}

.confirm-card { text-align: center; padding: 34px 26px; }
.confirm-icon { font-size: 52px; margin-bottom: 14px; }
.confirm-card p { font-size: 15px; line-height: 1.8; color: var(--text-mid); }
.confirm-card b { color: var(--primary-deep); font-size: 20px; }
.confirm-actions { display: flex; gap: 12px; margin-top: 22px; }
.cancel-btn, .ok-btn {
  flex: 1; padding: 13px; border: none; border-radius: 14px;
  font-size: 14px; font-weight: 700; cursor: pointer;
}
.cancel-btn { background: #FFF3D8; color: var(--text-mid); }
.ok-btn {
  background: linear-gradient(135deg, #FFE873 0%, #FFD93D 60%, #FFB627 100%);
  color: #5A3A05; font-weight: 900;
  box-shadow: 0 8px 18px rgba(255, 167, 39, 0.36);
}

.unlock-card { text-align: center; }
.unlock-success {
  font-size: 20px; font-weight: 800; color: var(--text);
  margin-bottom: 12px;
}
.unlock-img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 16px; margin-bottom: 12px;
}
.unlock-content {
  text-align: left; padding: 14px;
  background: var(--bg-soft); border-radius: 14px;
  margin-top: 12px; font-size: 13px;
  color: var(--text);
}
.unlock-text { white-space: pre-wrap; word-break: break-word; }
.unlock-story {
  background: linear-gradient(135deg, #FFF1F4 0%, #FFF8E1 60%, #F0F8EE 100%);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px dashed #E9C7C0;
  position: relative;
}
.unlock-story::before {
  content: '🐾';
  position: absolute; top: -10px; left: 14px;
  background: var(--card);
  padding: 0 6px;
  font-size: 14px;
}
.unlock-story-head {
  font-size: 13px; font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: 0.4px;
}
.unlock-story-body {
  font-size: 13.5px; line-height: 1.75;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

/* 详情页·故事预览 */
.detail-story {
  margin-top: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #FFF7E5 0%, #FFEEF4 100%);
  border-radius: 14px;
  border: 1px dashed #E9C7C0;
  position: relative;
}
.detail-story-head {
  font-size: 13px; font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.detail-story-body {
  font-size: 13px; line-height: 1.7;
  color: var(--text-mid);
  white-space: pre-wrap;
  word-break: break-word;
}
.audio-player {
  background: var(--primary);
  padding: 14px; border-radius: 14px; margin-bottom: 10px;
}
.audio-tip {
  font-size: 13px; font-weight: 700;
  color: var(--text); margin-bottom: 10px; text-align: center;
}
.audio-player audio { display: block; width: 100%; }

/* 爪印爆裂动效 */
.paw-burst {
  position: fixed; pointer-events: none;
  font-size: 22px; z-index: 9999;
  transform: translate(-50%, -50%);
  animation: pawBurst 0.8s ease-out forwards;
}
@keyframes pawBurst {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.6); }
  60% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.2) rotate(20deg);
  }
}
.unlock-actions { display: flex; gap: 8px; margin-top: 18px; }
.action-btn {
  flex: 1; padding: 11px;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  background: #FFF3D8; color: var(--text);
  border: none; border-radius: 12px;
  font-size: 13px; cursor: pointer; font-weight: 700;
}
.action-btn.primary {
  background: var(--primary); color: var(--text);
}

/* 云撸贡献榜 */
.rank-tabs {
  display: flex; gap: 8px;
  padding: 16px 16px 14px;
  overflow-x: auto; scrollbar-width: none;
}
.rank-tabs::-webkit-scrollbar { display: none; }
.rank-tab {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 9px 14px; border-radius: var(--radius-pill);
  background: var(--card); border: none;
  font-size: 13px; color: var(--text-mid); font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.rank-tab .icon { color: var(--text-mid); }
.rank-tab.active {
  background: var(--text); color: var(--primary);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
.rank-tab.active .icon { color: var(--primary); }

/* 等级筛选 chips */
.rank-tier-filter {
  display: flex; gap: 8px;
  padding: 0 16px 14px;
  overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.rank-tier-filter::-webkit-scrollbar { display: none; }
.tier-chip {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 12px; border-radius: var(--radius-pill);
  background: var(--card);
  border: 1.5px solid transparent;
  font-size: 12px; font-weight: 700; color: var(--text-mid);
  cursor: pointer; transition: all 0.18s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  white-space: nowrap;
}
.tier-chip:active { transform: scale(0.96); }
.tier-chip.active {
  color: #fff;
  background: var(--text);
  border-color: var(--text);
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
.tier-chip.tier-chip-legend.active {
  background: linear-gradient(135deg, #B388FF, #FF80AB);
  border-color: #B388FF;
  box-shadow: 0 4px 14px rgba(179,136,255,0.5);
}
.tier-chip.tier-chip-master.active {
  background: linear-gradient(135deg, #FFD16A, #F5A623);
  color: #5A3D1A;
  border-color: #F5A623;
  box-shadow: 0 4px 14px rgba(245,166,35,0.45);
}
.tier-chip.tier-chip-premium.active {
  background: linear-gradient(135deg, #B3E5FC, #4FC3F7);
  color: #0D47A1;
  border-color: #4FC3F7;
  box-shadow: 0 4px 14px rgba(79,195,247,0.45);
}
.tier-chip.tier-chip-advanced.active {
  background: linear-gradient(135deg, #FFE0B2, #FFB74D);
  color: #6D4C0F;
  border-color: #FFB74D;
  box-shadow: 0 4px 14px rgba(255,183,77,0.45);
}
.tier-chip.tier-chip-newbie.active {
  background: #ECECEC;
  color: #555;
  border-color: #BDBDBD;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* 等级榜空态 */
.rank-empty {
  text-align: center;
  padding: 40px 20px 32px;
  margin: 0 16px;
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.rank-empty-icon { font-size: 44px; line-height: 1; }
.rank-empty-text {
  margin-top: 10px;
  font-size: 14px; font-weight: 700; color: var(--text);
}
.rank-empty-sub {
  margin-top: 4px;
  font-size: 12px; color: var(--text-light);
}

/* 三甲领奖台 */
.podium {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 10px; padding: 16px 16px 0;
  margin-bottom: 16px;
}
.podium-item {
  flex: 1; max-width: 110px;
  background: var(--card); border-radius: 16px 16px 0 0;
  padding: 12px 8px 14px;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
  animation: cardIn 0.5s backwards;
}
.podium-1 { animation-delay: 0.15s; }
.podium-2 { animation-delay: 0.05s; }
.podium-3 { animation-delay: 0.25s; }
.podium-medal {
  font-size: 22px; line-height: 1;
}
.podium-avatar {
  font-size: 38px; margin-top: 6px;
  width: 58px; height: 58px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary);
  border-radius: 50%;
  margin-left: auto; margin-right: auto;
  box-shadow: 0 4px 12px rgba(255, 201, 60, 0.35);
}
.podium-name {
  font-size: 12px; font-weight: 700; color: var(--text);
  margin-top: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.podium-score {
  font-size: 14px; font-weight: 800; color: #FF6B35;
  margin-top: 4px;
}
.podium-bar {
  margin: 10px -8px -14px;
  border-radius: 0 0 12px 12px;
}
.podium-1 {
  margin-top: -12px;
  background: var(--primary);
}
.podium-1 .podium-bar { height: 22px; background: var(--primary-deep); }
.podium-2 .podium-bar { height: 14px; background: linear-gradient(135deg, #D8D8D0, #B8B8A8); }
.podium-3 .podium-bar { height: 8px; background: linear-gradient(135deg, #E8B98A, #C99060); }
.podium-item.is-me {
  outline: 2px solid var(--text);
  outline-offset: -2px;
}

/* 榜单列表 */
.rank-list {
  margin: 0 16px;
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.rank-list-head {
  display: grid; grid-template-columns: 50px 1fr 90px;
  align-items: center;
  padding: 12px 16px;
  font-size: 12px; color: var(--text-mid); font-weight: 600;
  background: var(--primary-soft);
}
.rank-list-head span:last-child { text-align: right; }
.rank-row {
  display: grid; grid-template-columns: 50px 1fr 90px;
  align-items: center;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
}
.rank-row.is-me {
  background: var(--primary-soft);
}
.rank-num {
  font-size: 16px; font-weight: 700;
  color: var(--text-light);
}
.rank-user {
  display: flex; align-items: center; gap: 10px;
  min-width: 0;
}
.rank-avatar {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary);
  border-radius: 50%;
  font-size: 22px; flex-shrink: 0;
}
.rank-user-info { min-width: 0; }
.rank-name {
  font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.me-tag {
  display: inline-block;
  padding: 1px 6px; margin-left: 4px;
  background: var(--text); color: var(--primary);
  font-size: 10px; border-radius: 6px; font-weight: 700;
  vertical-align: middle;
}
.rank-badge {
  font-size: 11px; color: var(--text-light);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ===== 等级标签：传奇/资深/优质/进阶/新人 ===== */
.tier-tag {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 1px 6px;
  font-size: 10px; font-weight: 700;
  border-radius: 8px;
  vertical-align: middle;
  margin-left: 4px;
  white-space: nowrap;
}
.tier-tag-legend {
  background: linear-gradient(135deg, #B388FF, #FF80AB);
  color: white;
  box-shadow: 0 0 8px rgba(179, 136, 255, 0.5);
}
.tier-tag-master {
  background: linear-gradient(135deg, #FFD16A, #F5A623);
  color: #5A3D1A;
  box-shadow: 0 0 6px rgba(245, 166, 35, 0.4);
}
.tier-tag-premium {
  background: linear-gradient(135deg, #B3E5FC, #4FC3F7);
  color: #0D47A1;
}
.tier-tag-advanced {
  background: linear-gradient(135deg, #FFE0B2, #FFB74D);
  color: #6D4C0F;
}
.tier-tag-newbie {
  background: #ECECEC;
  color: #888;
}

/* 三甲领奖台等级专属光晕 */
.podium-item.tier-legend {
  background: linear-gradient(160deg, #F3E7FF, #FFE0F0) !important;
  box-shadow: 0 0 24px rgba(179, 136, 255, 0.4), var(--shadow);
}
.podium-item.tier-master {
  background: linear-gradient(160deg, #FFF1C4, #FFD89B) !important;
}
.podium-item.tier-premium {
  background: linear-gradient(160deg, #E1F5FE, #B3E5FC) !important;
}

/* 列表行根据等级微调左侧色条 */
.rank-row { position: relative; }
.rank-row::before {
  content: ''; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0;
}
.rank-row.tier-row-legend::before { background: linear-gradient(180deg, #B388FF, #FF80AB); }
.rank-row.tier-row-master::before { background: linear-gradient(180deg, #FFD16A, #F5A623); }
.rank-row.tier-row-premium::before { background: linear-gradient(180deg, #4FC3F7, #B3E5FC); }
.rank-row.tier-row-advanced::before { background: linear-gradient(180deg, #FFB74D, #FFE0B2); }
.rank-row.tier-row-newbie::before { background: #DDD; }

/* 头像描边按等级区分 */
.tier-avatar-legend { box-shadow: 0 0 0 2px #B388FF, 0 0 10px rgba(179,136,255,0.6); }
.tier-avatar-master { box-shadow: 0 0 0 2px #F5A623; }
.tier-avatar-premium { box-shadow: 0 0 0 2px #4FC3F7; }
.tier-avatar-advanced { box-shadow: 0 0 0 2px #FFB74D; }

/* Keep 式成就徽章 */
.podium-achv {
  display: flex; justify-content: center; gap: 4px;
  margin-top: 6px;
  font-size: 14px; line-height: 1;
  min-height: 18px;
}
.rank-achv {
  display: flex; gap: 4px; flex-wrap: wrap;
  margin-top: 4px;
}
.achv-chip {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px 8px;
  background: var(--primary-soft);
  border: 1px solid #F5E29A;
  border-radius: var(--radius-pill);
  font-size: 10px; color: #6A4A0A;
  font-weight: 700;
  white-space: nowrap;
}
.rank-score { text-align: right; }
.rank-score-num {
  font-size: 17px; font-weight: 800; color: #FF6B35;
}
.rank-score-sub {
  font-size: 10px; color: var(--text-light);
  margin-top: 2px;
}

/* ===== 我的排名 · 全屏 hero ===== */
.page-rank { background: var(--bg); position: relative; }
.page-rank .page-head-overlay {
  position: absolute; top: 0; left: 0; right: 0;
  background: transparent;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.page-rank .page-head-overlay h2,
.page-rank .page-head-overlay .back { color: #fff; }
.page-rank .page-head-overlay .back {
  background: rgba(255,255,255,0.18);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}

.rank-hero {
  position: relative;
  margin: 0; padding: 64px 18px 18px;
  color: #fff;
  overflow: hidden;
}
.rank-hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, #2A2620 0%, #4A3F2C 60%, #6B5A36 100%);
  z-index: 0;
}
.rank-hero-bg.tier-hero-legend  { background: linear-gradient(160deg, #3D2E5C, #6E4A8A 60%, #B388FF); }
.rank-hero-bg.tier-hero-master  { background: linear-gradient(160deg, #3A2A12, #7A5418 55%, #F5A623); }
.rank-hero-bg.tier-hero-premium { background: linear-gradient(160deg, #0D2E47, #1F5C8A 55%, #4FC3F7); }
.rank-hero-bg.tier-hero-advanced{ background: linear-gradient(160deg, #3A2A12, #7A5418 55%, #FFB74D); }
.rank-hero-bg.tier-hero-newbie  { background: linear-gradient(160deg, #2A2620, #4A3F2C 60%, #6B5A36); }
.rank-hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(120px 120px at 92% 8%, rgba(255,255,255,0.18), transparent 70%),
    radial-gradient(180px 180px at 0% 100%, rgba(255,255,255,0.08), transparent 70%);
  pointer-events: none;
}
.rank-hero-inner { position: relative; z-index: 1; }

.rank-hero-top {
  display: flex; align-items: center; gap: 14px;
  cursor: pointer;
}
.rank-hero-avatar {
  width: 60px; height: 60px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary); border-radius: 50%;
  font-size: 32px; flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}
.rank-hero-mid { flex: 1; min-width: 0; }
.rank-hero-title { font-size: 18px; font-weight: 800; }
.rank-hero-title .tier-tag { margin-left: 6px; }
.rank-hero-tip { font-size: 12px; opacity: 0.78; margin-top: 4px; }
.rank-hero-right { text-align: right; flex-shrink: 0; }
.rank-hero-num {
  font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.85);
}
.rank-hero-num b {
  font-size: 28px; font-weight: 900; color: var(--primary);
  margin: 0 2px;
  text-shadow: 0 2px 8px rgba(255,201,60,0.4);
}
.rank-hero-score { font-size: 11px; opacity: 0.7; margin-top: 2px; }

.rank-hero-badges {
  margin-top: 18px;
  display: flex; gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.rank-hero-badges::-webkit-scrollbar { display: none; }
.hero-badge-group {
  flex: 0 0 calc((100% - 16px) / 3);
  min-width: calc((100% - 16px) / 3);
  scroll-snap-align: start;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(6px);
  border-radius: 14px;
  padding: 10px 10px 9px;
  cursor: pointer;
  transition: all 0.18s;
  text-align: left;
  color: #fff;
}
.hero-badge-group:active { transform: scale(0.96); }
.hero-badge-group:hover { background: rgba(255,255,255,0.16); }
.hero-badge-group-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11.5px; font-weight: 700;
}
.hero-badge-group-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-badge-group-count {
  font-size: 11px; color: var(--primary); font-weight: 800;
  background: rgba(255,201,60,0.18);
  padding: 1px 7px; border-radius: 999px;
  flex-shrink: 0; margin-left: 4px;
}
.hero-badge-pips {
  display: flex; gap: 4px; margin-top: 8px; align-items: center;
}
.hero-badge-pip {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  font-size: 13px;
  filter: grayscale(1) opacity(0.45);
}
.hero-badge-pip.on {
  background: linear-gradient(135deg, #FFD66B, #FFB347);
  filter: none;
  box-shadow: 0 2px 6px rgba(255,201,60,0.45);
}
.hero-badge-more {
  font-size: 10px; font-weight: 700;
  color: rgba(255,255,255,0.65);
  margin-left: 2px;
}

/* ===== 徽章图鉴弹窗 ===== */
.badges-modal-card {
  width: 92%; max-width: 420px;
  padding: 20px 18px 16px;
  max-height: 80vh; overflow-y: auto;
}
.badges-modal-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px;
}
.badges-modal-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #FFD66B, #FFB347);
  border-radius: 14px;
  font-size: 26px;
  box-shadow: 0 6px 14px rgba(255, 201, 60, 0.35);
}
.badges-modal-head h3 {
  font-size: 16px; font-weight: 800; color: var(--text);
}
.badges-modal-sub {
  font-size: 12px; color: var(--text-mid); margin-top: 2px;
}
.badges-modal-progress {
  height: 6px; background: var(--line);
  border-radius: 999px; overflow: hidden;
  margin-bottom: 14px;
}
.badges-modal-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #FFD66B, #FFB347);
  border-radius: 999px;
  transition: width 0.4s;
}
.badges-modal-tabs {
  display: flex; gap: 6px; margin-bottom: 14px;
}
.badges-modal-tab {
  flex: 1;
  padding: 8px 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12px; font-weight: 700;
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.15s;
}
.badges-modal-tab.active {
  background: var(--text); color: var(--primary);
  border-color: var(--text);
}
.badges-modal-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
.badge-cell {
  position: relative;
  padding: 14px 10px 12px;
  background: var(--card);
  border-radius: 14px;
  border: 1px solid var(--line);
  text-align: center;
  transition: all 0.2s;
}
.badge-cell.unlocked {
  background: linear-gradient(160deg, #FFF8E1, #FFE9B5);
  border-color: #F5D573;
  box-shadow: 0 4px 12px rgba(255, 201, 60, 0.22);
}
.badge-cell.locked .badge-cell-icon { filter: grayscale(1) opacity(0.4); }
.badge-cell-icon {
  font-size: 36px; line-height: 1;
  margin-bottom: 6px;
  position: relative; display: inline-block;
}
.badge-lock {
  position: absolute; right: -6px; bottom: -2px;
  font-size: 14px;
  filter: none;
}
.badge-cell-name {
  font-size: 13px; font-weight: 800; color: var(--text);
}
.badge-cell.locked .badge-cell-name { color: var(--text-light); }
.badge-cell-desc {
  font-size: 10.5px; color: var(--text-mid);
  margin-top: 3px; line-height: 1.4;
  min-height: 28px;
}
.badge-cell-progress {
  height: 4px; background: var(--line);
  border-radius: 999px; overflow: hidden;
  margin-top: 8px;
}
.badge-cell-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #FFD66B, #FFB347);
  border-radius: 999px;
}
.badge-cell-status {
  font-size: 10px; font-weight: 700;
  color: var(--text-light);
  margin-top: 4px;
}
.badge-cell-status.earned {
  color: #B8860B;
}

/* ===== 钱包 / 充值 ===== */
.my-coin { cursor: pointer; user-select: none; }
.my-coin:active { transform: scale(0.98); transition: transform 0.1s; }
.coin-recharge-arrow {
  margin-left: auto;
  background: rgba(255,255,255,0.85);
  color: #6A4A0A; font-weight: 700; font-size: 13px;
  padding: 6px 12px; border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.wallet-card {
  width: 88%; max-width: 380px;
  padding: 22px 20px 18px;
}
.wallet-head {
  background: linear-gradient(135deg, #FFD66B 0%, #FFB347 100%);
  border-radius: 16px;
  padding: 16px 18px;
  color: var(--text);
  position: relative; overflow: hidden;
  margin-bottom: 18px;
}
.wallet-head::after {
  content: ''; position: absolute;
  right: -18px; bottom: -22px;
  width: 110px; height: 110px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><defs><radialGradient id='g' cx='35%25' cy='32%25' r='72%25'><stop offset='0%25' stop-color='%23FFEFB3'/><stop offset='55%25' stop-color='%23F5B43A'/><stop offset='100%25' stop-color='%23B66C0A'/></radialGradient></defs><circle cx='16' cy='16' r='14' fill='url(%23g)' stroke='%238C4A03' stroke-width='1'/><circle cx='16' cy='16' r='11' fill='none' stroke='%23FFD978' stroke-width='0.8'/><text x='16' y='22' text-anchor='middle' font-size='16' font-weight='900' fill='%237A3B02' font-family='sans-serif'>币</text></svg>");
  background-size: contain; background-repeat: no-repeat;
  opacity: 0.28; transform: rotate(-12deg);
  pointer-events: none;
}
.wallet-head-tag {
  display: inline-block;
  background: rgba(255,255,255,0.6);
  font-size: 11px; font-weight: 700;
  padding: 2px 10px; border-radius: 999px;
  color: #6A4A0A;
}
.wallet-balance {
  margin-top: 8px;
  display: flex; align-items: baseline; gap: 6px;
}
.wallet-coin { display: inline-flex; align-items: center; }
.wallet-coin-svg { width: 38px; height: 38px; display: block; filter: drop-shadow(0 3px 6px rgba(31,19,8,0.35)); margin-right: 4px; }
.wallet-balance-num { font-size: 30px; font-weight: 800; line-height: 1; }
.wallet-balance-unit { font-size: 13px; font-weight: 700; color: #6A4A0A; }
.wallet-head-sub { font-size: 11px; color: #6A4A0A; margin-top: 6px; opacity: 0.85; }

.wallet-section-title {
  font-size: 13px; font-weight: 700; color: var(--text);
  margin: 12px 2px 10px;
}
.wallet-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.wallet-pkg {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 6px 10px;
  background: #FFF8E7;
  border: 2px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.wallet-pkg.active {
  border-color: var(--primary);
  background: #FFEFC1;
  box-shadow: 0 4px 12px rgba(255, 201, 60, 0.35);
}
.wallet-pkg-coins {
  font-size: 14px; font-weight: 800; color: var(--text);
  display: inline-flex; align-items: center; gap: 5px;
}
.wallet-pkg-coin-svg { width: 24px; height: 24px; display: block; filter: drop-shadow(0 2px 4px rgba(31,19,8,0.28)); }
.wallet-pkg-yuan {
  font-size: 12px; font-weight: 700; color: #B07A1A;
}
.wallet-pkg-tag {
  position: absolute; top: -7px; right: -4px;
  background: #FF6B6B; color: white;
  font-size: 10px; font-weight: 800;
  padding: 2px 7px; border-radius: 999px;
  box-shadow: 0 2px 6px rgba(255,107,107,0.4);
}

.wallet-pay {
  display: flex; flex-direction: column; gap: 8px;
}
.wallet-pay-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: #FAFAFA; border-radius: 12px;
  font-size: 14px; font-weight: 600; color: var(--text);
  cursor: pointer;
}
.wallet-pay-item input { accent-color: var(--primary); }
.wallet-pay-icon { font-size: 18px; }
.wallet-pay-logo { width: 26px; height: 26px; display: block; border-radius: 6px; flex-shrink: 0; }

.wallet-pay-btn {
  width: 100%;
  margin-top: 16px;
  padding: 13px 0;
  background: var(--primary);
  border: none; border-radius: 999px;
  font-size: 15px; font-weight: 800; color: var(--text);
  box-shadow: 0 6px 16px rgba(255, 201, 60, 0.4);
  cursor: pointer;
}
.wallet-pay-btn:disabled { opacity: 0.65; cursor: not-allowed; }
.wallet-tip {
  margin-top: 10px;
  font-size: 11px; color: #999; text-align: center;
}

/* Toast */
.toast {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8); color: white;
  padding: 12px 20px; border-radius: 12px;
  font-size: 14px; z-index: 999;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.toast.show { opacity: 1; }

/* ===== 消息页 ===== */
.nav-icon-wrap { position: relative; display: inline-block; }
.nav-dot {
  position: absolute; top: -2px; right: -8px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: #FF5A5A; color: #fff;
  border-radius: 999px; border: 2px solid #fff;
  font-size: 10px; font-weight: 700; line-height: 14px;
  text-align: center;
}

.msg-friend-find {
  margin-left: auto;
  width: 36px; height: 36px; border-radius: 50%;
  border: none; background: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text);
  cursor: pointer; box-shadow: 0 4px 12px rgba(255, 201, 60, 0.4);
}
.msg-friend-find .icon { color: var(--text); stroke-width: 2.4; }

.msg-tabs {
  display: flex; gap: 8px; padding: 8px 16px 14px;
  position: sticky; top: 64px; z-index: 40;
  background: rgba(255, 251, 240, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.msg-tab {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 11px;
  background: var(--card); border: none; border-radius: 14px;
  font-size: 13px; cursor: pointer;
  color: var(--text-mid); font-weight: 600;
  transition: all 0.2s;
  box-shadow: var(--shadow);
}
.msg-tab .icon { color: var(--text-mid); }
.msg-tab.active {
  background: var(--text); color: var(--primary);
  font-weight: 800;
}
.msg-tab.active .icon { color: var(--primary); }

.msg-section { padding: 0 12px 90px; }

/* 会话列表 */
.chat-list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  background: var(--card); border-radius: 16px;
  margin-bottom: 10px; cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.15s;
}
.chat-list-item:active { transform: scale(0.98); }
.chat-avatar {
  position: relative; flex-shrink: 0;
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
}
.chat-avatar.online::after {
  content: ''; position: absolute;
  right: 0; bottom: 2px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #4ECB71; border: 2px solid #fff;
}
.chat-info { flex: 1; min-width: 0; }
.chat-info-top {
  display: flex; justify-content: space-between; align-items: center;
}
.chat-info-name { font-size: 14px; font-weight: 600; }
.chat-info-time { font-size: 11px; color: var(--text-light); }
.chat-info-last {
  margin-top: 4px; font-size: 12px; color: var(--text-light);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-unread {
  flex-shrink: 0; min-width: 20px; height: 20px;
  padding: 0 6px; border-radius: 999px;
  background: #FF5A5A; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 20px;
  text-align: center;
}

/* 好友卡片 */
.friend-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  background: var(--card); border-radius: 16px;
  margin-bottom: 10px; box-shadow: var(--shadow);
}
.friend-info { flex: 1; min-width: 0; }
.friend-name { font-size: 14px; font-weight: 600; }
.friend-sign {
  margin-top: 4px; font-size: 12px;
  color: var(--text-light); line-height: 1.5;
}
.friend-say-btn {
  flex-shrink: 0; padding: 9px 18px;
  background: var(--text); color: var(--primary);
  font-size: 12px; font-weight: 800;
  border: none; border-radius: var(--radius-pill); cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

/* 宠友圈动态 */
.moment-card {
  background: var(--card); border-radius: 16px;
  padding: 14px; margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.moment-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.moment-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.moment-name { font-size: 13px; font-weight: 600; }
.moment-time { font-size: 11px; color: var(--text-light); margin-top: 2px; }
.moment-text {
  font-size: 13px; line-height: 1.6;
  margin-bottom: 10px; word-break: break-word;
}
.moment-img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 12px; background: #F5F5F5; display: block;
}
.moment-actions {
  display: flex; gap: 16px; margin-top: 10px;
  font-size: 13px; color: var(--text-light);
}
.moment-act {
  display: flex; align-items: center; gap: 4px;
  background: none; border: none; cursor: pointer;
  font-size: 13px; color: var(--text-light);
}
.moment-act.liked { color: #FF5A5A; font-weight: 600; }

/* 聊天弹窗 */
.modal-chat { padding: 0; align-items: stretch; }
.chat-card {
  width: 100%; height: 100%; max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
  display: flex; flex-direction: column;
  animation: chatIn 0.25s;
}
@keyframes chatIn { from { transform: translateY(100%); } to { transform: none; } }
.chat-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.chat-head-info {
  display: flex; align-items: center; gap: 10px;
  flex: 1; min-width: 0;
}
.chat-head-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.chat-head-name { font-size: 15px; font-weight: 600; }
.chat-head-status { font-size: 11px; color: var(--text-light); margin-top: 1px; }

.chat-body {
  flex: 1; overflow-y: auto;
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.chat-row { display: flex; gap: 8px; max-width: 80%; }
.chat-row.them { align-self: flex-start; }
.chat-row.me { align-self: flex-end; flex-direction: row-reverse; }
.chat-row .chat-avatar {
  width: 32px; height: 32px; font-size: 18px;
}
.chat-bubble {
  padding: 10px 14px; border-radius: 16px;
  font-size: 14px; line-height: 1.5;
  word-break: break-word; white-space: pre-wrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.chat-row.them .chat-bubble {
  background: var(--card); color: var(--text);
  border-top-left-radius: 4px;
}
.chat-row.me .chat-bubble {
  background: var(--primary);
  color: var(--text);
  border-top-right-radius: 4px;
  font-weight: 500;
}

/* 聊天里的宠物卡片 */
.chat-pet-card {
  display: flex; gap: 10px;
  width: 220px;
  background: var(--card);
  border-radius: 14px; overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.chat-row.me .chat-pet-card { background: var(--primary-soft); }
.chat-pet-card img {
  width: 80px; height: 80px; flex-shrink: 0;
  object-fit: cover;
}
.chat-pet-info {
  flex: 1; min-width: 0;
  padding: 8px 8px 8px 0;
  display: flex; flex-direction: column; justify-content: space-between;
}
.chat-pet-title {
  font-size: 13px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.chat-pet-meta {
  font-size: 12px; color: #FF6B35; font-weight: 800;
  display: inline-flex; align-items: center; gap: 4px;
}

.chat-empty {
  text-align: center; color: var(--text-light);
  padding: 40px 20px; font-size: 13px;
}

.chat-input-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  background: var(--card);
  border-top: 1px solid var(--line);
}
.chat-share-btn {
  flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary);
  border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text);
}
.chat-share-btn .icon { color: var(--text); }
.chat-input-bar input {
  flex: 1; padding: 11px 16px;
  background: var(--bg-soft); border: none; border-radius: var(--radius-pill);
  font-size: 14px; outline: none; color: var(--text);
}
.chat-send-btn {
  flex-shrink: 0; padding: 10px 18px;
  background: var(--text); color: var(--primary);
  font-size: 13px; font-weight: 800;
  border: none; border-radius: var(--radius-pill); cursor: pointer;
}

/* 分享宠物选择 */
.share-tip {
  font-size: 12px; color: var(--text-light);
  margin: 6px 0 12px;
}
.share-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  max-height: 60vh; overflow-y: auto;
}
.share-item {
  background: var(--bg); border-radius: 12px; overflow: hidden;
  cursor: pointer; transition: transform 0.15s;
}
.share-item:active { transform: scale(0.96); }
.share-item img {
  width: 100%; aspect-ratio: 1; object-fit: cover; display: block;
}
.share-item-title {
  padding: 6px 8px; font-size: 12px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 桌面适配 */
@media (min-width: 768px) {
  body {
    max-width: 480px; margin: 0 auto;
    box-shadow: 0 0 60px rgba(0,0,0,0.08);
    min-height: 100vh;
    background: var(--bg);
  }
  .grid, .my-list { grid-template-columns: repeat(2, 1fr); }
}

/* ===== 个人中心：趣味玩法入口 ===== */
.my-fun { padding: 0 16px; margin-bottom: 18px; }
.fun-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; font-weight: 800; color: var(--text);
  margin: 4px 4px 10px;
}
.fun-title-tip { font-size: 11px; color: var(--text-light); font-weight: 600; }
.fun-entry {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 18px 18px 20px;
  border-radius: var(--radius-card);
  cursor: pointer; overflow: hidden;
  transition: transform 0.18s;
  box-shadow: 0 12px 28px rgba(99, 76, 197, 0.32);
}
.fun-entry:active { transform: scale(0.98); }
.dressup-entry {
  background: linear-gradient(135deg, #7C5CFF 0%, #9B6BFF 50%, #C084FC 100%);
  color: #fff;
}
.dressup-entry::before {
  content: ''; position: absolute;
  width: 130px; height: 130px; border-radius: 50%;
  background: rgba(255,255,255,0.12);
  top: -40px; right: -30px;
}
.dressup-entry::after {
  content: '✨'; position: absolute;
  top: 12px; right: 14px; font-size: 18px;
  animation: twinkle 2.4s infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}
.fun-entry-text { position: relative; z-index: 2; }
.fun-entry-tag {
  display: inline-block;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(255,255,255,0.22);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.5px; margin-bottom: 6px;
}
.fun-entry-title { font-size: 19px; font-weight: 800; line-height: 1.2; }
.fun-entry-sub {
  margin-top: 4px; font-size: 12px;
  opacity: 0.92; font-weight: 500;
}
.fun-entry-btns {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; flex-wrap: wrap;
}
.fun-entry-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px; border-radius: 999px;
  background: #fff; color: #7C5CFF;
  font-size: 12px; font-weight: 800;
  border: none; cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, background 0.15s;
}
.fun-entry-btn-upload {
  background: rgba(255,255,255,0.22);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.5);
}
.fun-entry-btn-upload:active { transform: scale(0.94); background: rgba(255,255,255,0.35); }
.fun-pet-photo {
  position: absolute; inset: 6px;
  width: calc(100% - 12px); height: calc(100% - 12px);
  border-radius: 50%; object-fit: cover;
  border: 3px solid rgba(255,255,255,0.85);
  box-shadow: 0 4px 12px rgba(0,0,0,0.22);
  z-index: 1;
}
.fun-entry-pet {
  position: relative;
  width: 92px; height: 92px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.fun-pet-base { font-size: 64px; line-height: 1; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.18)); }
.fun-pet-acc { position: absolute; line-height: 1; }
.fun-pet-glasses { font-size: 22px; top: 28px; left: 36px; }
.fun-pet-hat { font-size: 28px; top: -2px; left: 28px; transform: rotate(-12deg); }

/* ===== 换装游戏页 ===== */
.dressup-head { background: linear-gradient(135deg, #7C5CFF, #C084FC); color: #fff; }
.dressup-head h2 { color: #fff; }
.dressup-back {
  background: rgba(255,255,255,0.22) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12) !important;
  width: 36px; height: 36px;
}
.dressup-back:active { transform: scale(0.94); background: rgba(255,255,255,0.35) !important; }
.dressup-help {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.25); color: #fff;
  border: none; font-weight: 800; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  margin-left: auto; margin-right: 4px;
  font-size: 14px;
}
.dressup-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.22); color: #fff;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s, background 0.15s;
}
.dressup-close:hover { background: rgba(255,255,255,0.35); }
.dressup-close:active { transform: scale(0.92); }

.dressup-stage {
  position: relative;
  margin: 14px 16px;
  height: 280px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.stage-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #FCE7F3 0%, #DDD6FE 100%);
  transition: background 0.3s;
}
.stage-pet {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.stage-pet .layer {
  position: absolute;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  pointer-events: none;
  transition: transform 0.2s;
}
.layer-base { font-size: 150px; z-index: 2; filter: drop-shadow(0 8px 14px rgba(0,0,0,0.15)); }
.layer-photo {
  z-index: 2;
  width: 200px; height: 200px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,0.85);
  box-shadow: 0 8px 22px rgba(0,0,0,0.22);
  background: #fff;
}
.photo-clear {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(80px, -98px);
  width: 28px; height: 28px;
  padding: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.55); color: #fff;
  border: 2px solid #fff;
  cursor: pointer; z-index: 6;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: background 0.15s, transform 0.1s;
}
.photo-clear svg { display: block; pointer-events: none; }
.photo-clear:hover { background: rgba(0,0,0,0.78); }
.photo-clear:active { transform: translate(80px, -98px) scale(0.9); }
.layer-hat { font-size: 70px; z-index: 4; transform: translateY(-86px) rotate(-8deg); }
.layer-glasses { font-size: 50px; z-index: 3; transform: translateY(-22px); }
.layer-collar { font-size: 44px; z-index: 3; transform: translateY(50px); }
.layer-acc { font-size: 56px; z-index: 5; transform: translate(72px, 38px) rotate(15deg); }
.layer-bgItem { font-size: 80px; z-index: 1; opacity: 0.5; transform: translate(-90px, -70px); }

.stage-tip {
  position: absolute; bottom: 12px; left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.9);
  color: #6B4FE5; font-size: 12px; font-weight: 700;
  padding: 5px 14px; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* 宠物切换 */
.pet-switch {
  display: flex; gap: 8px; padding: 0 16px 12px;
  overflow-x: auto; scrollbar-width: none;
}
.pet-switch::-webkit-scrollbar { display: none; }
.pet-pill {
  flex-shrink: 0;
  padding: 8px 16px; border-radius: 999px;
  background: var(--card); border: none;
  font-size: 13px; color: var(--text-mid); font-weight: 700;
  cursor: pointer; transition: all 0.15s;
  box-shadow: var(--shadow);
}
.pet-pill.active {
  background: linear-gradient(135deg, #7C5CFF, #C084FC);
  color: #fff;
  box-shadow: 0 4px 12px rgba(124, 92, 255, 0.4);
}
.pet-pill.pet-upload {
  background: linear-gradient(135deg, #FFE4B5, #FFD1A8);
  color: #8B5A2B;
  border: 1.5px dashed #E07B39;
}
.pet-pill.pet-upload.active {
  background: linear-gradient(135deg, #E07B39, #D45D1F);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(224, 123, 57, 0.45);
}

/* 道具分类 */
.dressup-tabs {
  display: flex; gap: 6px; padding: 0 16px 10px;
  overflow-x: auto; scrollbar-width: none;
}
.dressup-tabs::-webkit-scrollbar { display: none; }
.dress-tab {
  flex-shrink: 0;
  padding: 8px 14px; border-radius: 12px;
  background: var(--card); border: none;
  font-size: 13px; color: var(--text-mid); font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.dress-tab.active {
  background: var(--text); color: var(--primary);
}

/* 道具网格 */
.dressup-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; padding: 0 16px 14px;
}
.dress-item {
  aspect-ratio: 1;
  background: var(--card); border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; cursor: pointer;
  border: 2px solid transparent;
  box-shadow: var(--shadow);
  transition: transform 0.15s, border-color 0.15s;
  position: relative;
}
.dress-item:active { transform: scale(0.94); }
.dress-item.selected {
  border-color: #7C5CFF;
  background: linear-gradient(135deg, #F3F0FF, #FAF5FF);
}
.dress-item.selected::after {
  content: '✓'; position: absolute;
  top: 4px; right: 6px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #7C5CFF; color: #fff;
  font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.dress-item.dress-none { font-size: 14px; color: var(--text-light); font-weight: 700; }
.dress-item-name {
  position: absolute; bottom: 4px; left: 0; right: 0;
  font-size: 9px; color: var(--text-light);
  font-weight: 600; text-align: center;
  white-space: nowrap;
}

/* 操作按钮 */
.dressup-actions {
  display: flex; gap: 8px; padding: 6px 16px 18px;
}
.dress-act-btn {
  flex: 1; padding: 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border: none; border-radius: 14px;
  background: var(--card); color: var(--text);
  font-size: 13px; font-weight: 700;
  cursor: pointer; box-shadow: var(--shadow);
  transition: transform 0.15s;
}
.dress-act-btn:active { transform: scale(0.97); }
.dress-act-btn.primary {
  background: linear-gradient(135deg, #7C5CFF, #C084FC);
  color: #fff;
  box-shadow: 0 6px 16px rgba(124, 92, 255, 0.4);
}
.dress-act-btn.full { width: 100%; flex: none; margin-top: 6px; }

/* 保存成功弹窗 */
.dress-saved-card { text-align: center; }
.dress-saved-icon { font-size: 48px; margin-bottom: 6px; }
.dress-saved-stage {
  margin: 12px 0;
  height: 200px; border-radius: 18px;
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #FCE7F3, #DDD6FE);
}
.dress-saved-stage .stage-pet { position: absolute; inset: 0; }
.dress-saved-reward {
  display: inline-block;
  padding: 8px 16px; border-radius: 999px;
  background: var(--primary-soft); color: #6A4A0A;
  font-size: 13px; font-weight: 800;
  margin: 6px 0 14px;
}

/* ===== 草稿箱 ===== */
.pet-pill.pet-drafts {
  position: relative;
  background: linear-gradient(135deg, #EDE9FE, #DDD6FE);
  color: #5B3FD9;
  border: 1.5px solid rgba(124, 92, 255, 0.35);
}
.pet-pill.pet-drafts:active { transform: scale(0.96); }
.pet-drafts-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px;
  margin-left: 4px;
  border-radius: 999px;
  background: #FF5A5F; color: #fff;
  font-size: 10px; font-weight: 800; line-height: 1;
}
.dress-drafts-card { max-width: 380px; }
.dress-drafts-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 10px; padding-right: 30px; margin-bottom: 12px;
}
.dress-drafts-sub {
  font-size: 12px; color: var(--text-light);
  margin-top: 4px; line-height: 1.5;
}
.dress-drafts-clear {
  flex-shrink: 0;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 90, 95, 0.1); color: #E0484E;
  border: none; font-size: 12px; font-weight: 700;
  cursor: pointer;
}
.dress-drafts-clear:active { transform: scale(0.95); }
.dress-drafts-list {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-height: 60vh; overflow-y: auto;
  padding: 2px;
}
.draft-tile {
  cursor: pointer;
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.15s;
}
.draft-tile:active { transform: scale(0.97); }
.draft-thumb {
  position: relative;
  width: 100%; aspect-ratio: 1;
  background: linear-gradient(135deg, #FCE7F3, #DDD6FE);
  overflow: hidden;
}
.draft-thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.draft-accs {
  position: absolute; left: 6px; bottom: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  font-size: 13px; line-height: 1;
  letter-spacing: 1px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.draft-del {
  position: absolute; top: 6px; right: 6px;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0,0,0,0.55); color: #fff;
  border: none; cursor: pointer;
  font-size: 16px; font-weight: 700; line-height: 22px;
  padding: 0;
}
.draft-del:hover { background: rgba(0,0,0,0.78); }
.draft-del:active { transform: scale(0.9); }
.draft-meta {
  padding: 8px 10px 10px;
}
.draft-name {
  font-size: 13px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.draft-sub {
  margin-top: 2px;
  font-size: 11px; color: var(--text-light);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dress-drafts-empty {
  text-align: center; padding: 24px 8px 8px;
}
.dress-drafts-empty-icon { font-size: 48px; margin-bottom: 8px; }
.dress-drafts-empty-title {
  font-size: 15px; font-weight: 800; color: var(--text);
}
.dress-drafts-empty-tip {
  margin-top: 4px;
  font-size: 12px; color: var(--text-light);
}
.dress-drafts-empty-btn {
  margin-top: 16px;
  padding: 10px 22px; border-radius: 999px;
  background: linear-gradient(135deg, #7C5CFF, #C084FC);
  color: #fff; border: none;
  font-size: 13px; font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(124, 92, 255, 0.35);
}
.dress-drafts-empty-btn:active { transform: scale(0.96); }

/* ===== 云撸养成营 · 锦上添花模块 ===== */
.camp-section {
  margin: 0 16px 16px;
  padding: 18px 16px 16px;
  background: linear-gradient(160deg, #FFFAEC 0%, #FFF4D2 60%, #FFE8B0 100%);
  border-radius: var(--radius-card);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(255, 201, 60, 0.18);
}
.camp-section::before {
  content: '🌱';
  position: absolute; top: -10px; right: -8px;
  font-size: 80px; opacity: 0.10;
  transform: rotate(12deg);
  pointer-events: none;
}
.camp-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 12px; gap: 10px;
}
.camp-title { font-size: 16px; font-weight: 800; color: var(--text); letter-spacing: 0.3px; }
.camp-sub { font-size: 12px; color: #6A4A0A; margin-top: 2px; font-weight: 600; }
.camp-quiz-btn {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 13px;
  background: var(--text); color: var(--primary);
  border: none; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 800; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s;
}
.camp-quiz-btn:active { transform: scale(0.95); }
.camp-quiz-btn span { font-size: 13px; }

/* 主推卡（未报名 / 进行中切换） */
.camp-current {
  position: relative;
  padding: 14px 14px 14px 90px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  margin-bottom: 12px;
  cursor: pointer;
  min-height: 86px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: transform 0.15s;
}
.camp-current:active { transform: scale(0.98); }
.camp-current-cover {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 64px; height: 64px;
  border-radius: 14px; object-fit: cover;
  background: var(--primary-soft);
}
.camp-current-emoji {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 64px; height: 64px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  background: var(--primary-soft);
}
.camp-current-tag {
  display: inline-block;
  font-size: 10px; font-weight: 800; color: white;
  padding: 2px 8px; border-radius: 999px;
  background: var(--text);
  margin-bottom: 4px;
  letter-spacing: 0.4px;
}
.camp-current-title {
  font-size: 14px; font-weight: 800; color: var(--text);
  line-height: 1.3;
}
.camp-current-sub {
  font-size: 11.5px; color: var(--text-mid);
  margin-top: 3px; font-weight: 500;
}
.camp-current-progress {
  display: flex; align-items: center; gap: 8px;
  margin-top: 8px;
}
.camp-current-bar {
  flex: 1; height: 6px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 999px; overflow: hidden;
}
.camp-current-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-deep), #FF8FA3);
  border-radius: 999px;
  transition: width 0.5s ease;
}
.camp-current-cnt {
  font-size: 11px; font-weight: 800; color: #6A4A0A;
  flex-shrink: 0;
}
.camp-current-cta {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 800; color: #B5701A;
  margin-top: 6px;
}
.camp-current-cta::after { content: ' →'; margin-left: 2px; }

/* 横滑计划列表 */
.camp-list {
  display: flex; gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;
  margin: 0 -4px;
  padding-left: 4px;
}
.camp-list::-webkit-scrollbar { display: none; }
.camp-card {
  flex: 0 0 138px;
  scroll-snap-align: start;
  background: white;
  border-radius: 16px;
  padding: 12px 11px 11px;
  cursor: pointer;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.15s;
}
.camp-card:active { transform: scale(0.96); }
.camp-card-emoji {
  width: 100%; aspect-ratio: 1.4;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}
.camp-card-emoji::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(255,255,255,0.35), transparent 60%);
}
.camp-card-tag {
  font-size: 9.5px; font-weight: 800;
  padding: 2px 6px; border-radius: 999px;
  background: var(--primary-soft); color: #6A4A0A;
  display: inline-block;
  margin-bottom: 5px;
}
.camp-card-title {
  font-size: 12.5px; font-weight: 800; color: var(--text);
  line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 32px;
}
.camp-card-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10px; color: var(--text-light); font-weight: 600;
  margin-top: 6px;
}
.camp-card-meta-num { color: #B5701A; font-weight: 800; }
.camp-card-done-badge {
  position: absolute; top: 8px; right: 8px;
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, #FFD93C, #FFB44A);
  color: white; font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(255, 180, 74, 0.4);
}

/* ===== 计划详情弹窗 ===== */
.camp-modal-card { padding: 0; max-width: 380px; }
.camp-hero {
  position: relative;
  padding: 24px 22px 18px;
  border-radius: 24px 24px 18px 18px;
  background: linear-gradient(135deg, var(--primary-soft), #FFE0E6);
  display: flex; gap: 14px; align-items: center;
  overflow: hidden;
}
.camp-hero::after {
  content: ''; position: absolute;
  right: -30px; bottom: -30px;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}
.camp-hero-icon {
  flex-shrink: 0;
  width: 64px; height: 64px;
  border-radius: 18px;
  background: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  position: relative; z-index: 1;
}
.camp-hero-text { position: relative; z-index: 1; flex: 1; min-width: 0; }
.camp-hero-text h3 { font-size: 17px; line-height: 1.25; }
.camp-hero-sub {
  font-size: 12px; color: var(--text-mid);
  margin-top: 4px; font-weight: 600;
}
.camp-hero-tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.camp-hero-tag {
  font-size: 10px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #6A4A0A;
}
.camp-hero-suit { background: rgba(0, 0, 0, 0.7); color: white; }

.camp-progress-wrap {
  padding: 16px 22px 6px;
}
.camp-progress-bar {
  height: 10px; background: var(--line);
  border-radius: 999px; overflow: hidden;
}
.camp-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-deep), #FF8FA3);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.camp-progress-text {
  font-size: 12px; color: var(--text-mid);
  margin-top: 8px; font-weight: 700;
  text-align: right;
}

.camp-days {
  padding: 6px 22px 4px;
  max-height: 290px;
  overflow-y: auto;
}
.camp-day {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}
.camp-day:last-child { border-bottom: none; }
.camp-day-num {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: var(--text-mid);
  position: relative;
}
.camp-day.done .camp-day-num {
  background: linear-gradient(135deg, var(--primary-deep), #FFD93C);
  color: white;
  box-shadow: 0 4px 10px rgba(255, 201, 60, 0.4);
}
.camp-day.done .camp-day-num::before {
  content: '✓'; font-size: 16px;
}
.camp-day.done .camp-day-num span { display: none; }
.camp-day.today .camp-day-num {
  background: white;
  border: 2px solid var(--primary-deep);
  color: var(--primary-deep);
  animation: campTodayPulse 1.6s infinite;
}
@keyframes campTodayPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 201, 60, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(255, 201, 60, 0); }
}
.camp-day-body { flex: 1; min-width: 0; }
.camp-day-title {
  font-size: 13.5px; font-weight: 800; color: var(--text);
  line-height: 1.3;
}
.camp-day.locked .camp-day-title { color: var(--text-light); }
.camp-day-tip {
  font-size: 11.5px; color: var(--text-light);
  margin-top: 2px; font-weight: 500;
  line-height: 1.5;
}
.camp-day-coin {
  flex-shrink: 0;
  font-size: 11px; font-weight: 800;
  padding: 4px 9px; border-radius: 999px;
  background: var(--primary-soft); color: #6A4A0A;
  align-self: center;
}
.camp-day.done .camp-day-coin {
  background: var(--primary); color: var(--text);
}

.camp-reward-tip {
  margin: 10px 22px 0;
  padding: 10px 14px;
  background: linear-gradient(135deg, #FFF6D8, #FFE8B0);
  border-radius: 12px;
  font-size: 11.5px; font-weight: 700; color: #6A4A0A;
  text-align: center;
}
.camp-reward-tip b { color: #C8456E; font-size: 13px; margin: 0 2px; }

.camp-action-btn {
  display: block; width: calc(100% - 44px);
  margin: 14px 22px 22px;
  padding: 15px;
  background: var(--text); color: var(--primary);
  font-size: 15px; font-weight: 800;
  border: none; border-radius: 14px; cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  letter-spacing: 0.4px;
  transition: transform 0.15s;
}
.camp-action-btn:active { transform: scale(0.98); }
.camp-action-btn.disabled {
  background: var(--line); color: var(--text-light);
  box-shadow: none; cursor: not-allowed;
}
.camp-action-btn.success {
  background: linear-gradient(135deg, var(--primary-deep), #FF8FA3);
  color: white;
}

/* ===== 自测弹窗 ===== */
.quiz-card { padding: 22px 22px 24px; }
.quiz-step-bar {
  height: 6px; background: var(--line);
  border-radius: 999px; overflow: hidden;
  margin-top: 4px;
}
.quiz-step-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-deep), #FF8FA3);
  border-radius: 999px;
  transition: width 0.4s ease;
}
.quiz-step-tip {
  font-size: 11px; font-weight: 700; color: var(--text-light);
  margin-top: 8px; letter-spacing: 0.4px;
}
.quiz-question {
  font-size: 18px; font-weight: 800; color: var(--text);
  line-height: 1.4; margin: 14px 0 16px;
}
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-opt {
  padding: 14px 16px;
  background: var(--bg-soft);
  border: 2px solid transparent;
  border-radius: 14px;
  font-size: 13.5px; color: var(--text); font-weight: 600;
  text-align: left; cursor: pointer;
  transition: all 0.2s;
}
.quiz-opt:hover { background: var(--primary-soft); }
.quiz-opt:active {
  transform: scale(0.98);
  background: var(--primary);
  border-color: var(--primary-deep);
}

/* 自测结果 */
.quiz-result-card { text-align: center; padding: 30px 22px 26px; }
.quiz-result-emoji {
  font-size: 60px;
  margin-bottom: 8px;
  animation: quizResultPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes quizResultPop {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.quiz-result-tag {
  display: inline-block;
  font-size: 11px; font-weight: 800; color: #6A4A0A;
  padding: 4px 12px; border-radius: 999px;
  background: var(--primary-soft);
  margin-bottom: 6px;
  letter-spacing: 0.4px;
}
.quiz-result-card h3 { font-size: 19px; margin-top: 4px; }
.quiz-result-desc {
  font-size: 13px; color: var(--text-mid);
  margin: 12px 0 18px;
  line-height: 1.6;
}
.quiz-result-btn {
  width: 100%; padding: 14px;
  background: var(--text); color: var(--primary);
  font-size: 15px; font-weight: 800;
  border: none; border-radius: 14px; cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  letter-spacing: 0.3px;
}
.quiz-result-btn:active { transform: scale(0.98); }

/* 滚动条样式 */
::-webkit-scrollbar { width: 0; height: 0; }

/* ===== 用户主页空间（profile）===== */
.profile-card { padding: 0; max-width: 380px; max-height: 92vh; }
.profile-header {
  position: relative;
  padding: 30px 20px 18px;
  background: linear-gradient(135deg, #FFF1C4 0%, #FFD89B 100%);
  text-align: center;
  border-radius: 24px 24px 0 0;
}
.profile-header::before {
  content: '🐾'; position: absolute;
  right: -8px; top: -8px;
  font-size: 78px; opacity: 0.12;
  transform: rotate(-15deg);
  pointer-events: none;
}
.profile-avatar {
  width: 70px; height: 70px;
  border-radius: 50%;
  background: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 42px;
  margin: 0 auto 10px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.12);
}
.profile-name-row {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 17px; font-weight: 800;
  color: var(--text);
}
.profile-name { font-weight: 800; }
.profile-tier { font-size: 10px; margin-left: 0; }
.profile-bio {
  font-size: 12px; color: #6A4A0A;
  margin: 6px 18px 0;
  line-height: 1.55;
}
.profile-achv {
  display: flex; gap: 5px; justify-content: center; flex-wrap: wrap;
  margin-top: 10px;
}
.profile-stats {
  display: flex; justify-content: space-around;
  padding: 14px 12px;
  background: white;
  border-bottom: 1px solid var(--line);
}
.profile-stat { text-align: center; flex: 1; }
.profile-stat-num {
  font-size: 17px; font-weight: 800; color: var(--text);
}
.profile-stat div:last-child {
  font-size: 11px; color: var(--text-light); margin-top: 2px;
}
.profile-actions {
  display: flex; gap: 10px;
  padding: 12px 16px;
  background: white;
}
.profile-btn {
  flex: 1; padding: 11px;
  border: none; border-radius: 12px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  background: #FFF3D8; color: var(--text);
  transition: transform 0.15s;
}
.profile-btn:active { transform: scale(0.97); }
.profile-btn.primary {
  background: var(--primary);
  color: var(--text);
  box-shadow: 0 4px 12px rgba(255, 201, 60, 0.4);
}
.profile-btn.followed {
  background: #ECECEC; color: var(--text-mid);
}
.profile-tabs {
  display: flex;
  background: white;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.profile-tab {
  flex: 1; padding: 12px;
  background: none; border: none;
  font-size: 13px; font-weight: 600; color: var(--text-light);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.profile-tab.active {
  color: var(--text); font-weight: 800;
  border-bottom-color: var(--primary-deep);
}
.profile-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 10px; padding: 14px;
  background: var(--bg-soft);
  min-height: 200px;
}
.profile-grid-item {
  position: relative;
  background: white; border-radius: 12px; overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  transition: transform 0.15s;
}
.profile-grid-item:active { transform: scale(0.97); }
.profile-grid-item img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  display: block; background: #F5F5F5;
}
.profile-grid-item .card-badge {
  top: 6px; left: 6px;
  font-size: 10px; padding: 2px 6px;
}
.profile-grid-meta {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 8px;
}
.profile-grid-title {
  font-size: 11.5px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-width: 0;
}
.profile-grid-price {
  font-size: 11px; font-weight: 700; color: #FF6B35;
  margin-left: 6px; flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 3px;
}

/* 排行榜行可点击微反馈 */
.rank-row { cursor: pointer; transition: background 0.15s; }
.rank-row:active { background: rgba(255, 201, 60, 0.15); }
.podium-item { cursor: pointer; }
.podium-item:active { transform: translateY(0) scale(0.97); }
.my-rank-card { cursor: pointer; }

/* ===== 评论弹窗 ===== */
.comment-card {
  display: flex; flex-direction: column;
  padding: 0; max-width: 380px;
  max-height: 80vh;
}
.comment-title {
  padding: 16px 18px;
  font-size: 15px; font-weight: 800;
  border-bottom: 1px solid var(--line);
  margin: 0;
}
.comment-title #commentCount {
  color: var(--text-light); font-weight: 600;
  font-size: 13px; margin-left: 4px;
}
.comment-list {
  flex: 1; overflow-y: auto;
  padding: 10px 14px 14px;
  min-height: 200px;
}
.comment-item {
  display: flex; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed #F0EBD8;
}
.comment-item:last-child { border-bottom: none; }
.comment-avatar {
  flex-shrink: 0;
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #FFE4B0, #FFD89B);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer;
}
.comment-body { flex: 1; min-width: 0; }
.comment-name {
  font-size: 12.5px; font-weight: 700; color: var(--text);
  cursor: pointer;
}
.comment-text {
  font-size: 13px; color: var(--text); line-height: 1.55;
  margin-top: 2px; word-break: break-word;
}
.comment-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 4px;
}
.comment-time { font-size: 11px; color: var(--text-light); }
.comment-like {
  background: none; border: none; cursor: pointer;
  font-size: 13px; color: var(--text-light);
  padding: 2px 4px;
}
.comment-like.liked { color: #FF5A5A; }
.comment-input-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: white;
  border-radius: 0 0 24px 24px;
}
.comment-input-bar input {
  flex: 1; padding: 10px 14px;
  background: var(--bg); border: none; border-radius: 999px;
  font-size: 13px; outline: none;
}
.comment-send-btn {
  flex-shrink: 0; padding: 9px 16px;
  background: var(--primary);
  color: var(--text); font-size: 13px; font-weight: 700;
  border: none; border-radius: 999px; cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 201, 60, 0.35);
}
.comment-item.mine .comment-text {
  background: var(--primary-soft);
  padding: 6px 10px; border-radius: 10px;
  display: inline-block;
}

/* ===== 宠友圈：收藏按钮 + 头像可点击 ===== */
.moment-act.faved { color: #FFB300; font-weight: 700; }
.moment-head { cursor: pointer; }
.moment-head:active { opacity: 0.7; }

/* ===== 宠友圈：用户发布功能 ===== */
.moment-composer {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border-radius: 14px;
  padding: 10px 12px; margin-bottom: 12px;
  box-shadow: var(--shadow); cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.moment-composer:active { transform: scale(0.98); }
.moment-composer-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary-soft, #FFE9C4);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.moment-composer-input {
  flex: 1; min-width: 0; font-size: 13px; color: var(--text-light);
  background: var(--bg, #FAFAF8); border-radius: 10px;
  padding: 8px 12px;
}
.moment-composer-icon {
  font-size: 20px; flex-shrink: 0;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--primary-soft, #FFE9C4);
  display: flex; align-items: center; justify-content: center;
}

.moment-card { position: relative; }
.moment-card.mine {
  border: 1px dashed rgba(255, 179, 0, 0.55);
  background: linear-gradient(180deg, rgba(255, 240, 200, 0.35), var(--card));
}
.moment-head-text { min-width: 0; }
.moment-me-tag {
  display: inline-block; margin-left: 6px;
  font-size: 10px; font-weight: 700;
  background: #FFB300; color: #fff;
  padding: 1px 6px; border-radius: 999px;
  vertical-align: 2px;
}
.moment-delete-btn {
  position: absolute; top: 8px; right: 10px;
  width: 26px; height: 26px; border: none;
  background: rgba(0, 0, 0, 0.06); color: var(--text-light);
  border-radius: 50%; font-size: 18px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.moment-delete-btn:hover, .moment-delete-btn:active {
  background: rgba(255, 90, 90, 0.15); color: #FF5A5A;
}

.moment-list-bottom-pad { height: 96px; }

.moment-fab {
  position: fixed; right: 18px; bottom: 84px;
  z-index: 30; border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 18px; border-radius: 999px;
  background: linear-gradient(135deg, #FFC93C, #FFB300);
  color: #2A1F00; font-weight: 700; font-size: 14px;
  box-shadow: 0 8px 22px rgba(255, 179, 0, 0.45);
  transition: transform 0.15s, box-shadow 0.15s;
}
.moment-fab:active {
  transform: scale(0.94);
  box-shadow: 0 4px 14px rgba(255, 179, 0, 0.4);
}
.moment-fab-plus { font-size: 18px; line-height: 1; }
.moment-fab-label { font-size: 13px; }

.post-moment-publish-btn {
  margin-left: auto;
  background: var(--text); color: var(--primary, #FFC93C);
  border: none; cursor: pointer;
  padding: 7px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}
.post-moment-publish-btn:active { transform: scale(0.96); }
.post-moment-card { padding: 16px; }
.post-moment-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.post-moment-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--primary-soft, #FFE9C4);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.post-moment-name { font-size: 14px; font-weight: 700; }
.post-moment-text {
  width: 100%; min-height: 110px;
  border: none; outline: none; resize: vertical;
  font-size: 14px; line-height: 1.6;
  background: transparent; color: var(--text);
  padding: 4px 0;
  font-family: inherit;
}
.post-moment-counter {
  text-align: right; font-size: 11px;
  color: var(--text-light); margin-bottom: 12px;
}
.post-moment-image-row { margin-bottom: 12px; }
.post-moment-image-box {
  position: relative; width: 100%;
  aspect-ratio: 4 / 3; border-radius: 12px;
  background: var(--bg, #FAFAF8);
  border: 1.5px dashed rgba(0, 0, 0, 0.15);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; cursor: pointer;
  transition: border-color 0.15s;
}
.post-moment-image-box:hover { border-color: rgba(255, 179, 0, 0.7); }
.post-moment-image-empty {
  text-align: center; color: var(--text-light); font-size: 13px;
}
.post-moment-image-icon { font-size: 32px; margin-bottom: 6px; }
.post-moment-preview {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.post-moment-image-clear {
  position: absolute; top: 8px; right: 8px;
  width: 28px; height: 28px; border: none;
  background: rgba(0, 0, 0, 0.55); color: #fff;
  border-radius: 50%; font-size: 18px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.post-moment-tip {
  font-size: 11px; color: var(--text-light); text-align: center;
  margin-top: 4px;
}

/* ===== 首页 tab：更多折叠按钮 ===== */
.tab-more {
  margin-left: auto;
  width: 38px; height: 38px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; flex-shrink: 0;
}
.more-bars {
  display: inline-flex; flex-direction: column;
  gap: 3px; align-items: center; justify-content: center;
}
.more-bars span {
  display: block; width: 16px; height: 2px;
  border-radius: 2px; background: currentColor;
  transition: transform 0.2s;
}
.more-bars span:nth-child(2) { width: 12px; }
.more-bars span:nth-child(3) { width: 8px; }
.tab-more.active .more-bars span:nth-child(2) { width: 16px; }
.tab-more.active .more-bars span:nth-child(3) { width: 16px; }

/* ===== 全屏分类弹窗 ===== */
.modal-fullscreen { padding: 0; align-items: stretch; justify-content: stretch; }
.modal-fullscreen .cat-sheet {
  width: 100%; height: 100%; max-width: 100%; max-height: 100%;
  background: #FFF8E7; border-radius: 0; overflow-y: auto;
  padding: 22px 18px 40px; position: relative;
  animation: catSheetUp 0.28s ease-out;
}
@keyframes catSheetUp { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.cat-sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: -22px; margin: -22px -18px 0;
  padding: 18px 18px 12px;
  background: #FFF8E7; z-index: 2;
}
.cat-sheet-title {
  font-size: 19px; font-weight: 800; color: var(--text);
}
.cat-sheet-head .modal-close {
  position: static; width: 36px; height: 36px;
  background: rgba(0,0,0,0.06); border: none;
  font-size: 22px; line-height: 1; color: var(--text-mid);
  border-radius: 50%; cursor: pointer;
}
.cat-sheet-sub {
  margin: 6px 4px 18px;
  font-size: 13px; color: var(--text-light);
}
.cat-group { margin-bottom: 22px; }
.cat-group-title {
  font-size: 13px; font-weight: 700; color: var(--text-mid);
  margin: 4px 4px 10px;
  display: flex; align-items: center; gap: 8px;
}
.cat-group-title::before {
  content: ''; width: 3px; height: 13px;
  background: var(--primary); border-radius: 2px;
}
.cat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.cat-tile {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  padding: 14px 4px; border: none; cursor: pointer;
  background: white; border-radius: 16px;
  font-size: 12px; font-weight: 600; color: var(--text);
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  transition: transform 0.15s, box-shadow 0.15s;
}
.cat-tile:active { transform: scale(0.94); }
.cat-tile.active {
  background: var(--text); color: var(--primary);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
.cat-tile-emoji {
  font-size: 26px; line-height: 1;
}
/* 自定义宠物 SVG（小鸟等）：填满 emoji 槽，跟着 font-size 等比缩放 */
.pet-svg {
  width: 1em; height: 1em;
  display: inline-block; vertical-align: middle;
}
.cat-tile-emoji .pet-svg { width: 26px; height: 26px; }
.family-pet-emoji .pet-svg { width: 28px; height: 28px; }

/* ============ 个人中心 · 萌宠家族 ============ */
.my-family {
  margin: 14px 16px 16px;
  background: white;
  border-radius: 18px;
  padding: 16px 16px 14px;
  box-shadow: var(--shadow);
}
.family-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 12px;
}
.family-title { font-size: 15px; font-weight: 800; color: var(--text); }
.family-tip { font-size: 11.5px; color: var(--text-light); }
.family-row { margin-top: 10px; display: flex; align-items: center; gap: 12px; }
.family-row-col { flex-direction: column; align-items: stretch; gap: 8px; }
.family-row-head {
  display: flex; justify-content: space-between; align-items: baseline;
}
.family-row-label {
  font-size: 12.5px; font-weight: 700; color: var(--text-mid);
  white-space: nowrap;
}
.family-row-sub { font-size: 11px; color: var(--text-light); }
.family-genders { display: flex; gap: 8px; flex: 1; }
.gender-pill {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 12px;
  border: 1.5px solid #EDEEF2;
  background: #F8F9FC;
  border-radius: 14px;
  font-size: 13px; font-weight: 600; color: var(--text-mid);
  cursor: pointer; transition: all 0.18s;
}
.gender-pill .gender-emoji { font-size: 18px; line-height: 1; }
.gender-pill .gender-symbol {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 16px; font-weight: 700; line-height: 1;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.12), inset 0 0 0 1.5px rgba(255,255,255,.7);
  transition: transform .18s ease, box-shadow .18s ease;
}
.gender-symbol-female { background: linear-gradient(135deg, #FFA8C5 0%, #FF6F9B 100%); }
.gender-symbol-male   { background: linear-gradient(135deg, #7CB7FF 0%, #3D8BFF 100%); }
.gender-pill.active {
  background: linear-gradient(135deg, #FFE389 0%, #FFCB47 100%);
  border-color: #FFCB47;
  color: #4A3500;
  box-shadow: 0 4px 12px rgba(255, 203, 71, 0.35);
}
.gender-pill.active .gender-symbol {
  transform: scale(1.06);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18), inset 0 0 0 1.5px #fff;
}
.family-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.family-pet {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 4px 8px;
  border: 1.5px solid #EDEEF2;
  background: #F8F9FC;
  border-radius: 14px;
  cursor: pointer; transition: all 0.18s;
  position: relative;
}
.family-pet:active { transform: scale(0.94); }
.family-pet .family-pet-emoji { font-size: 24px; line-height: 1; }
.family-pet .family-pet-name { font-size: 11px; font-weight: 600; color: var(--text-mid); }
.family-pet.active {
  background: linear-gradient(135deg, #E5F0FF 0%, #C7DEFF 100%);
  border-color: #6FA9F1;
  color: #1F4F8F;
  box-shadow: 0 4px 12px rgba(111, 169, 241, 0.3);
}
.family-pet.active .family-pet-name { color: #1F4F8F; }
.family-pet .family-pet-check {
  position: absolute; top: -4px; right: -4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #2D7BB5; color: white;
  font-size: 10px; line-height: 16px; text-align: center;
  font-weight: 800;
  display: none;
}
.family-pet.active .family-pet-check { display: block; }
.family-preview {
  margin-top: 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #EDF2FC 0%, #DCE6F8 100%);
  padding: 14px 12px 8px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.family-preview-stage {
  position: relative;
  height: 60px;
  display: flex; align-items: flex-end; justify-content: center;
  gap: 2px;
  font-size: 18px;
}
.family-preview-stage .stroll-char { font-size: 36px; }
.family-preview-stage .stroll-pet-side { font-size: 22px; }
.family-preview-stage .stroll-pet-arm { font-size: 18px; margin-bottom: 14px; }
.family-preview-stage .stroll-pet-back { font-size: 16px; margin-bottom: 2px; }
.family-preview-stage .stroll-pet-leash { font-size: 20px; }
.family-prev-fly {
  position: absolute; top: -6px; left: 14%;
  font-size: 16px;
  animation: prev-fly 4s ease-in-out infinite;
}
@keyframes prev-fly {
  0%, 100% { left: 12%; transform: translateY(0) scaleX(1); }
  50%      { left: 80%; transform: translateY(-6px) scaleX(-1); }
}
.family-preview-tip {
  margin-top: 6px;
  font-size: 11.5px; color: #4A5C82; font-weight: 600;
}

/* ===== 头像 / 昵称编辑弹窗 ===== */
.avatar-modal-card {
  display: flex; flex-direction: column;
  padding: 0; max-width: 380px;
  max-height: 86vh;
  overflow: hidden;
}
.avatar-modal-head {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 18px 14px;
  background: linear-gradient(135deg, #FFF1C4 0%, #FFE0EC 60%, #DDF1E2 100%);
  border-radius: 24px 24px 0 0;
}
.avatar-modal-preview {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; line-height: 1;
  flex-shrink: 0;
}
.avatar-modal-head-text h3 {
  margin: 0 0 4px;
  font-size: 16px; font-weight: 800; color: var(--text);
}
.avatar-modal-head-text p {
  margin: 0;
  font-size: 11.5px; color: #6A4A0A; line-height: 1.5;
}
.avatar-name-row {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px 6px;
  background: #fff;
}
.avatar-name-label {
  font-size: 13px; font-weight: 700; color: var(--text);
  flex-shrink: 0;
}
.avatar-name-row input {
  flex: 1;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 13px; color: var(--text);
  background: var(--bg-soft);
  outline: none;
}
.avatar-name-row input:focus {
  border-color: var(--primary-deep);
  background: #fff;
}
.avatar-grid-wrap {
  flex: 1; overflow-y: auto;
  padding: 8px 14px 12px;
  background: #fff;
}
.avatar-group { margin-top: 10px; }
.avatar-group-title {
  font-size: 11.5px; font-weight: 700; color: var(--text-light);
  margin: 6px 4px 8px;
  letter-spacing: 0.4px;
}
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.avatar-cell {
  aspect-ratio: 1;
  border: 2px solid transparent;
  border-radius: 14px;
  background: linear-gradient(135deg, #FFF7E0 0%, #FFE9F2 100%);
  font-size: 26px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
  transition: transform 0.12s, box-shadow 0.18s, border-color 0.18s;
}
.avatar-cell:active { transform: scale(0.92); }
.avatar-cell.selected {
  border-color: var(--primary-deep);
  background: linear-gradient(135deg, #FFE352 0%, #FFC93C 100%);
  box-shadow: 0 6px 16px rgba(255, 201, 60, 0.5);
  transform: scale(1.04);
}
.avatar-modal-actions {
  display: flex; gap: 10px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.avatar-modal-cancel,
.avatar-modal-save {
  flex: 1; padding: 12px;
  border: none; border-radius: 14px;
  font-size: 14px; font-weight: 800; cursor: pointer;
}
.avatar-modal-cancel {
  background: #FFF3D8; color: var(--text-mid);
}
.avatar-modal-save {
  background: var(--text); color: var(--primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}
.avatar-modal-save:active,
.avatar-modal-cancel:active { transform: scale(0.97); }

/* ===== 全局头像柔和渐变 + 微凸出 ===== */
.moment-avatar,
.chat-avatar,
.chat-head-avatar,
.rank-avatar,
.podium-avatar,
.comment-avatar,
.profile-avatar,
.rank-hero-avatar {
  background: linear-gradient(135deg, #FFE9F2 0%, #FFF1C4 50%, #DDF1E2 100%);
  box-shadow: inset 0 0 0 2px #fff, 0 4px 10px rgba(0, 0, 0, 0.06);
}
/* 等级描边覆盖（保持等级感） */
.rank-avatar.tier-avatar-legend,
.rank-hero-avatar.tier-avatar-legend {
  box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px #B388FF, 0 0 12px rgba(179,136,255,0.55);
}
.rank-avatar.tier-avatar-master,
.rank-hero-avatar.tier-avatar-master {
  box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px #F5A623;
}
.rank-avatar.tier-avatar-premium,
.rank-hero-avatar.tier-avatar-premium {
  box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px #4FC3F7;
}
.rank-avatar.tier-avatar-advanced,
.rank-hero-avatar.tier-avatar-advanced {
  box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px #FFB74D;
}
.profile-avatar { background: #fff; }

/* ===== 粉丝 / 关注 列表弹窗 ===== */
.social-modal-card {
  display: flex; flex-direction: column;
  padding: 0; max-width: 380px;
  max-height: 80vh; overflow: hidden;
}
.social-modal-tabs {
  display: flex;
  padding: 14px 18px 0;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  border-radius: 24px 24px 0 0;
}
.social-tab {
  position: relative;
  padding: 8px 4px 12px;
  background: none; border: none; cursor: pointer;
  font-size: 14px; font-weight: 700; color: var(--text-light);
  font-family: inherit;
}
.social-tab span {
  font-size: 12px; font-weight: 700; margin-left: 4px;
  color: var(--text-light);
}
.social-tab.active {
  color: var(--text);
}
.social-tab.active::after {
  content: ''; position: absolute;
  left: 4px; right: 4px; bottom: 0;
  height: 3px; border-radius: 3px;
  background: var(--primary-deep);
}
.social-modal-list {
  flex: 1; overflow-y: auto;
  padding: 8px 14px 16px;
  background: #fff;
  border-radius: 0 0 24px 24px;
  min-height: 240px;
}
.social-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 6px;
  border-bottom: 1px dashed #F0EBD8;
  cursor: pointer;
}
.social-row:last-child { border-bottom: none; }
.social-row:active { background: var(--bg-soft); }
.social-row-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
  background: linear-gradient(135deg, #FFE9F2 0%, #FFF1C4 50%, #DDF1E2 100%);
  box-shadow: inset 0 0 0 2px #fff, 0 4px 10px rgba(0,0,0,0.06);
}
.social-row-info { flex: 1; min-width: 0; }
.social-row-name {
  font-size: 14px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.social-row-bio {
  font-size: 11.5px; color: var(--text-light);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.social-row-action {
  flex-shrink: 0;
  padding: 6px 14px;
  border: none; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700; cursor: pointer;
  background: var(--primary); color: var(--text);
  font-family: inherit;
}
.social-row-action.followed {
  background: #ECECEC; color: var(--text-mid);
}
.social-row-action:active { transform: scale(0.95); }

/* ==================== 移动端响应式 ==================== */
/* 小屏（≤ 480px）：常规手机竖屏 */
@media (max-width: 480px) {
  body { font-size: 13px; padding-bottom: 76px; }

  /* 顶栏：减小内边距 + 让搜索框可压缩 */
  .topbar { padding: 10px 12px; gap: 8px; }
  .logo { font-size: clamp(15px, 4.4vw, 17px); }
  .topbar-coin { padding: 5px 10px; font-size: 12px; }
  .topbar-search { padding: 8px 12px; }
  .search-placeholder { font-size: 12px; }

  /* 页面头部 */
  .page-head { padding: 12px 14px; }
  .page-head h2 { font-size: clamp(15px, 4.4vw, 17px); }
  .back { width: 34px; height: 34px; font-size: 20px; }

  /* 分类标签：横滚但更紧凑 */
  .tabs { padding: 4px 12px 12px; gap: 6px; }
  .tab { padding: 7px 12px; font-size: 12px; }

  /* 卡片网格：保持 2 列但缩小间距和内边距 */
  .grid { gap: 10px; padding: 0 12px; }
  .card { border-radius: 16px; }
  .card-body { padding: 10px 10px 12px; }
  .card-title { font-size: clamp(12px, 3.6vw, 13.5px); line-height: 1.4; }
  .card-meta { font-size: 11px; }
  .card-badge { padding: 3px 8px; font-size: 10px; }

  /* 底部导航：缩高 + 缩字 */
  .bottom-nav { padding: 8px 0 max(10px, env(safe-area-inset-bottom)); }
  .nav-item { padding: 3px 8px; font-size: 10px; }
  .nav-item .icon { width: 20px; height: 20px; }

  /* 钱包/购物车按钮 */
  .topbar-cart { width: 30px; height: 30px; }
  .topbar-cart svg { width: 22px; height: 22px; }

  /* 发布表单：减小内边距 */
  .publish-form { padding: 14px; }
  .form-group { margin-bottom: 18px; }
}

/* 超小屏（≤ 360px）：iPhone SE 等 */
@media (max-width: 360px) {
  .grid { gap: 8px; padding: 0 10px; }
  .card-body { padding: 9px 9px 10px; }
  .tabs { padding: 4px 10px 10px; }
  .tab { padding: 6px 10px; font-size: 11.5px; }
  .topbar { padding: 9px 10px; }
  .nav-item .icon { width: 19px; height: 19px; }
}

/* 横屏 + 低高度：让底部导航不至于挤掉内容 */
@media (max-width: 900px) and (max-height: 480px) and (orientation: landscape) {
  body { padding-bottom: 64px; }
  .bottom-nav { padding: 6px 0 8px; }
  .nav-item { padding: 2px 8px; font-size: 10px; }
}

/* ================================================================
 * V2 · 沉浸式集市首页（融合：奶油手绘 + 工业 KPI + 电影感氛围）
 * 2026 redesign · home reborn
 * ============================================================== */

:root {
  --v2-paper:        #FBF5E5;
  --v2-cream:        #F5EAD0;
  --v2-cream-deep:   #E8D5A8;
  --v2-cream-warm:   #F8E6BD;
  --v2-amber:        #C8821F;
  --v2-amber-deep:   #8C5A0E;
  --v2-amber-soft:   #FFD78A;
  --v2-ink:          #1A1208;
  --v2-ink-mid:      #5C4A2E;
  --v2-ink-soft:     #9C8A6E;
  --v2-jade:         #6F8B6E;
  --v2-jade-deep:    #3F5A3F;
  --v2-rust:         #C24B30;
  --v2-pink:         #E8957D;
  --v2-line:         #E5D4A8;
  --v2-line-soft:    #EFE0BC;

  --v2-serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong",
              "Times New Roman", "Times", serif;
  --v2-mono:  "JetBrains Mono", "SF Mono", "Menlo", "Roboto Mono", ui-monospace,
              "Courier New", monospace;
}

/* —— 当首页 v2 处于活动态时，给 body 一层暖纸底 —— */
body:has(#pageHome.active) {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(255, 215, 138, 0.55) 0%, rgba(255, 215, 138, 0) 60%),
    radial-gradient(900px 700px at -10% 30%, rgba(255, 197, 122, 0.28) 0%, rgba(255, 197, 122, 0) 65%),
    var(--v2-paper);
}

/* —— 顶部 topbar 改造：在 v2 主页时变更为透明描边款，保留钱包入口 —— */
body:has(#pageHome.active) .topbar {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 12px 18px 10px;
}
body:has(#pageHome.active) .topbar .logo { display: none; }
body:has(#pageHome.active) .topbar-coin {
  margin-left: auto;
  background: rgba(26, 18, 8, 0.92);
  color: #FFE8B0;
  font-family: var(--v2-mono);
  letter-spacing: 0.6px;
  padding: 7px 14px;
  font-size: 12.5px;
  box-shadow: 0 8px 22px rgba(26, 18, 8, 0.18);
  border: 1px solid rgba(255, 232, 176, 0.18);
}
body:has(#pageHome.active) .topbar-coin .icon { color: #FFD78A; }

/* ================== MINI BRAND（hero 删除后的顶部品牌带） ================== */
.v2-mini-brand {
  margin: 4px 16px 14px;
  padding: 12px 16px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #F8EBC9 0%, #F2DDA8 100%);
  border: 1px solid rgba(140, 90, 14, 0.18);
  border-radius: 18px;
  box-shadow:
    0 10px 24px -14px rgba(140, 90, 14, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.v2-mini-brand-left { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.v2-mini-brand .v2-brand-name { white-space: nowrap; }
.v2-mini-brand .v2-brand-en { white-space: nowrap; }

/* ================== HERO ================== */
.v2-hero {
  position: relative;
  margin: 0 12px 18px;
  padding: 18px 22px 30px;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(700px 360px at 78% 14%, rgba(255, 224, 142, 0.85) 0%, rgba(255, 224, 142, 0) 60%),
    radial-gradient(500px 360px at 18% 92%, rgba(200, 130, 31, 0.18) 0%, rgba(200, 130, 31, 0) 65%),
    linear-gradient(170deg, #F8EBC9 0%, #F2DDA8 55%, #E8C97A 100%);
  border: 1px solid rgba(140, 90, 14, 0.18);
  box-shadow:
    0 24px 60px -22px rgba(140, 90, 14, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.v2-hero-glow {
  position: absolute;
  top: -120px; right: -80px;
  width: 360px; height: 360px;
  background: radial-gradient(circle at 50% 50%, rgba(255, 250, 220, 0.95), rgba(255, 250, 220, 0) 60%);
  filter: blur(2px);
  pointer-events: none;
  z-index: 1;
}
.v2-hero-grain {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(rgba(140, 90, 14, 0.08) 1px, transparent 1px),
    radial-gradient(rgba(140, 90, 14, 0.05) 1px, transparent 1px);
  background-size: 22px 22px, 13px 13px;
  background-position: 0 0, 11px 11px;
  opacity: 0.55;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 1;
}

/* —— hero 顶部 brand & meta —— */
.v2-hero-top {
  position: relative; z-index: 3;
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
}
.v2-brand { display: inline-flex; align-items: center; gap: 10px; }
.v2-brand-mark {
  width: 36px; height: 36px;
  border-radius: 12px;
  background: var(--v2-ink);
  color: #FFE8B0;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(26, 18, 8, 0.28);
}
.v2-brand-mark .icon { width: 20px; height: 20px; color: #FFD78A; }
.v2-brand-text { line-height: 1.1; }
.v2-brand-name {
  font-family: var(--v2-serif);
  font-size: 16px; font-weight: 800;
  color: var(--v2-ink);
  letter-spacing: 1.5px;
}
.v2-brand-en {
  margin-top: 3px;
  font-family: var(--v2-mono);
  font-size: 9.5px;
  letter-spacing: 1.2px;
  color: var(--v2-amber-deep);
  opacity: 0.78;
}
.v2-hero-meta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(26, 18, 8, 0.06);
  border: 1px solid rgba(140, 90, 14, 0.18);
  font-family: var(--v2-mono);
  font-size: 9.5px; letter-spacing: 0.8px;
  color: var(--v2-amber-deep);
  white-space: nowrap;
}
.v2-meta-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #5BAE5A;
  box-shadow: 0 0 0 3px rgba(91, 174, 90, 0.2);
  animation: v2-pulse 2.2s ease-in-out infinite;
}
@keyframes v2-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

/* —— 中央舞台 · 萌宠轨道 —— */
.v2-hero-stage {
  position: relative; z-index: 2;
  margin: 18px auto 4px;
  width: 240px; height: 200px;
  display: flex; align-items: center; justify-content: center;
}
.v2-stage-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(140, 90, 14, 0.32);
}
.v2-stage-ring-outer {
  width: 200px; height: 200px;
  animation: v2-spin 32s linear infinite;
}
.v2-stage-ring-inner {
  width: 140px; height: 140px;
  border-style: dotted;
  border-color: rgba(140, 90, 14, 0.42);
  animation: v2-spin 22s linear infinite reverse;
}
@keyframes v2-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.v2-orbit {
  position: absolute;
  font-size: 30px;
  filter: drop-shadow(0 6px 8px rgba(140, 90, 14, 0.28));
  animation: v2-bob 4.5s ease-in-out infinite;
}
.v2-orbit-1 { top: -6px; left: 50%; transform: translateX(-50%); }
.v2-orbit-2 { top: 38%; right: -2px; animation-delay: -1s; }
.v2-orbit-3 { bottom: -4px; left: 14%; animation-delay: -2s; }
.v2-orbit-4 { bottom: 6%; right: 12%; animation-delay: -3s; font-size: 26px; }
.v2-orbit-5 { top: 36%; left: -4px; animation-delay: -1.6s; font-size: 24px; }
@keyframes v2-bob {
  0%, 100% { transform: translateY(0) translateX(var(--tx, 0)); }
  50%      { transform: translateY(-8px) translateX(var(--tx, 0)); }
}
.v2-orbit-1 { --tx: -50%; }
.v2-orbit-1 { animation-name: v2-bob-center; }
@keyframes v2-bob-center {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(-8px); }
}
.v2-orbit-center {
  position: relative;
  width: 78px; height: 78px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 32%, #FFF7DC 0%, #FFE39A 55%, #E0A445 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    0 0 0 6px rgba(255, 234, 174, 0.5),
    0 0 36px 8px rgba(255, 200, 110, 0.45),
    inset 0 6px 10px rgba(255, 255, 255, 0.6),
    inset 0 -6px 12px rgba(140, 90, 14, 0.18);
}
.v2-moon {
  position: absolute;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  top: 14px; left: 14px;
  filter: blur(2px);
}
.v2-orbit-paw { font-size: 30px; line-height: 1; position: relative; z-index: 2; }

/* —— 闪光点缀 —— */
.v2-spark {
  position: absolute;
  font-family: var(--v2-mono);
  color: rgba(140, 90, 14, 0.8);
  pointer-events: none;
  animation: v2-twinkle 3.2s ease-in-out infinite;
}
.v2-spark-1 { top: 8%; left: 10%; font-size: 14px; }
.v2-spark-2 { top: 14%; right: 22%; font-size: 18px; animation-delay: -1.2s; color: #fff8d8; text-shadow: 0 0 6px rgba(255,200,110,0.8); }
.v2-spark-3 { bottom: 10%; right: 32%; font-size: 12px; animation-delay: -2.1s; }
@keyframes v2-twinkle {
  0%, 100% { opacity: 0.3; transform: scale(0.85); }
  50%      { opacity: 1;   transform: scale(1.15); }
}

/* —— 标题区 —— */
.v2-hero-headline {
  position: relative; z-index: 3;
  text-align: center;
  padding: 4px 4px 0;
}
.v2-hero-eyebrow {
  font-family: var(--v2-mono);
  font-size: 10px;
  letter-spacing: 2.2px;
  color: var(--v2-amber-deep);
  opacity: 0.75;
}
.v2-hero-title {
  margin-top: 10px;
  font-family: var(--v2-serif);
  font-weight: 800;
  font-size: clamp(32px, 9vw, 44px);
  line-height: 1.15;
  color: var(--v2-ink);
  letter-spacing: 1.5px;
}
.v2-title-line { display: inline-block; }
.v2-title-italic {
  font-style: italic;
  color: var(--v2-amber-deep);
  position: relative;
  padding: 0 4px;
}
.v2-title-italic::after {
  content: '';
  position: absolute;
  left: 4px; right: 4px; bottom: 4px;
  height: 8px;
  background: rgba(255, 200, 110, 0.55);
  z-index: -1;
  border-radius: 4px;
  transform: skewX(-6deg);
}
.v2-hero-subline {
  margin: 14px auto 0;
  max-width: 520px;
  display: flex; flex-direction: column; gap: 6px;
  align-items: center;
}
.v2-subline-en {
  font-family: var(--v2-mono);
  font-size: 11px; letter-spacing: 2px;
  color: var(--v2-ink-mid);
  padding: 4px 12px;
  border-top: 1px solid rgba(140, 90, 14, 0.22);
  border-bottom: 1px solid rgba(140, 90, 14, 0.22);
}
.v2-subline-cn {
  font-size: 12.5px;
  color: var(--v2-ink-mid);
  font-weight: 500;
  letter-spacing: 0.4px;
}

/* —— Hero CTA —— */
.v2-hero-cta {
  margin-top: 18px;
  display: flex; gap: 10px;
  justify-content: center; flex-wrap: wrap;
}
.v2-cta-primary {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px 14px 24px;
  border: none; cursor: pointer;
  border-radius: 999px;
  background: linear-gradient(180deg, #2A1B08 0%, #14100A 100%);
  color: #FFE8B0;
  font-size: 15px; font-weight: 800;
  font-family: inherit;
  letter-spacing: 1.5px;
  box-shadow:
    0 14px 30px -10px rgba(26, 18, 8, 0.55),
    inset 0 1px 0 rgba(255, 232, 176, 0.18);
  transition: transform 0.18s, box-shadow 0.18s;
}
.v2-cta-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px -10px rgba(26, 18, 8, 0.62);
}
.v2-cta-primary:active { transform: translateY(1px); }
.v2-cta-primary .v2-cta-en {
  font-family: var(--v2-mono);
  font-size: 10.5px; letter-spacing: 1.4px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 232, 176, 0.16);
  color: #FFD78A;
  font-weight: 700;
}
.v2-cta-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 13px 18px;
  border-radius: 999px;
  background: transparent;
  border: 1.5px solid rgba(26, 18, 8, 0.5);
  color: var(--v2-ink);
  font-size: 13.5px; font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.18s, transform 0.18s;
}
.v2-cta-ghost:hover { background: rgba(26, 18, 8, 0.06); }
.v2-cta-ghost:active { transform: scale(0.97); }
.v2-cta-ghost .icon { color: var(--v2-ink); }

/* ================== KPI 三联 ================== */
.v2-kpi {
  margin: 0 16px 20px;
  padding: 18px 4px 14px;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  background: var(--v2-paper);
  border: 1px solid var(--v2-line);
  border-radius: 22px;
  box-shadow:
    0 14px 28px -16px rgba(140, 90, 14, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.v2-kpi-cell {
  display: flex; flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  text-align: center;
  min-width: 0;
}
.v2-kpi-divide {
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--v2-line), transparent);
}
.v2-kpi-label {
  font-family: var(--v2-mono);
  font-size: 9px;
  letter-spacing: 1.3px;
  color: var(--v2-ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.v2-kpi-num {
  font-family: var(--v2-serif);
  font-weight: 800;
  font-size: clamp(26px, 7vw, 34px);
  line-height: 1;
  color: var(--v2-ink);
  letter-spacing: 1px;
  font-feature-settings: "tnum";
}
.v2-kpi-foot {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0; border: none; background: none; cursor: pointer;
  font-family: var(--v2-mono);
  font-size: 10px; letter-spacing: 0.6px;
  color: var(--v2-amber-deep);
  font-weight: 600;
  transition: opacity 0.18s;
}
.v2-kpi-foot:hover { opacity: 0.7; }
.v2-kpi-foot-static { cursor: default; }
.v2-spark-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--v2-jade);
  box-shadow: 0 0 0 2.5px rgba(111, 139, 110, 0.22);
}

/* ================== Section Head 通用 ================== */
.v2-section-head {
  display: flex; align-items: center; gap: 14px;
  margin: 0 18px 14px;
}
.v2-section-eyebrow {
  font-family: var(--v2-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--v2-amber);
  font-weight: 700;
  text-transform: uppercase;
}
.v2-section-title {
  margin-top: 6px;
  font-family: var(--v2-serif);
  font-size: clamp(20px, 5.4vw, 26px);
  font-weight: 800;
  color: var(--v2-ink);
  letter-spacing: 0.6px;
  line-height: 1.25;
}
.v2-section-sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--v2-ink-mid);
  line-height: 1.55;
}
.v2-section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--v2-line), transparent);
  align-self: center;
  margin-top: 8px;
}

/* ================== 模块六道门 ================== */
.v2-modules { margin-bottom: 24px; }
.v2-module-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px;
}
.v2-module {
  position: relative;
  display: flex; flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 14px 14px;
  border-radius: 20px;
  background: var(--v2-paper);
  border: 1px solid var(--v2-line);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  overflow: hidden;
  min-height: 168px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  box-shadow: 0 8px 18px -10px rgba(140, 90, 14, 0.3);
}
.v2-module::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 100% 0%, rgba(255, 215, 138, 0.55) 0%, transparent 50%);
  pointer-events: none;
  opacity: 0.7;
}
.v2-module:hover {
  transform: translateY(-3px);
  border-color: rgba(140, 90, 14, 0.4);
  box-shadow: 0 18px 30px -12px rgba(140, 90, 14, 0.35);
}
.v2-module:active { transform: translateY(0); }
.v2-module-num {
  font-family: var(--v2-mono);
  font-size: 10.5px;
  letter-spacing: 1.5px;
  color: var(--v2-amber-deep);
  font-weight: 700;
  position: relative; z-index: 2;
}
.v2-module-emoji {
  font-size: 38px;
  line-height: 1;
  filter: drop-shadow(0 6px 8px rgba(140, 90, 14, 0.18));
  position: relative; z-index: 2;
  align-self: flex-end;
  margin-top: -28px;
  transform: rotate(-6deg);
}
.v2-module-text { position: relative; z-index: 2; width: 100%; }
.v2-module-title {
  font-family: var(--v2-serif);
  font-size: 16px; font-weight: 800;
  color: var(--v2-ink);
  letter-spacing: 0.5px;
  line-height: 1.2;
}
.v2-module-en {
  margin-top: 4px;
  font-family: var(--v2-mono);
  font-size: 9.5px; letter-spacing: 1.4px;
  color: var(--v2-amber-deep);
  font-weight: 700;
  opacity: 0.85;
}
.v2-module-desc {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--v2-ink-mid);
  line-height: 1.5;
}
.v2-module-foot {
  position: relative; z-index: 2;
  margin-top: auto;
  padding-top: 10px;
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px dashed var(--v2-line);
}
.v2-foot-text {
  font-family: var(--v2-mono);
  font-size: 10px; letter-spacing: 0.8px;
  color: var(--v2-ink-mid);
  font-weight: 600;
}

/* —— 模块 pill —— */
.v2-pill {
  display: inline-block;
  font-family: var(--v2-mono);
  font-size: 9px;
  letter-spacing: 1.2px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--v2-ink);
  color: #FFE8B0;
}
.v2-pill-soft { background: rgba(111, 139, 110, 0.18); color: var(--v2-jade-deep); }
.v2-pill-warn { background: rgba(194, 75, 48, 0.16); color: var(--v2-rust); }
.v2-pill-new  { background: var(--v2-jade); color: #fff; }
.v2-pill-mute { background: rgba(140, 90, 14, 0.12); color: var(--v2-amber-deep); }
.v2-pill-cta  { background: var(--v2-rust); color: #fff; }
.v2-pill-coin { background: linear-gradient(135deg, #FFE08A 0%, #E0A445 100%); color: #4A2C04; }

/* —— 主推模块（01）/ CTA 模块（06）特殊视觉 —— */
.v2-module-feature {
  background:
    radial-gradient(120% 80% at 0% 100%, rgba(255, 200, 110, 0.55) 0%, transparent 55%),
    var(--v2-paper);
  border-color: rgba(140, 90, 14, 0.35);
}
.v2-module-cta {
  background: linear-gradient(160deg, #1F1408 0%, #2C1E0C 100%);
  border-color: #1A1208;
  color: #FFE8B0;
}
.v2-module-cta::before { display: none; }
.v2-module-cta .v2-module-num,
.v2-module-cta .v2-module-en { color: #FFD78A; opacity: 0.9; }
.v2-module-cta .v2-module-title { color: #FFE8B0; }
.v2-module-cta .v2-module-desc { color: rgba(255, 232, 176, 0.7); }
.v2-module-cta .v2-module-foot { border-top-color: rgba(255, 215, 138, 0.22); }
.v2-module-cta .v2-foot-text { color: #FFD78A; }

/* ================== 分类快捷 pill ================== */
.v2-quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 0 16px;
  margin: 4px 0 24px;
}
.v2-quick-pill {
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  padding: 12px 8px 10px;
  background: var(--v2-paper);
  border: 1px solid var(--v2-line-soft);
  border-radius: 18px;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.18s, border-color 0.18s, background 0.18s;
}
.v2-quick-pill:hover {
  transform: translateY(-2px);
  border-color: rgba(140, 90, 14, 0.4);
  background: #FFF6DD;
}
.v2-quick-pill:active { transform: translateY(0) scale(0.96); }
.v2-quick-emoji {
  font-size: 30px; line-height: 1;
  filter: drop-shadow(0 4px 6px rgba(140, 90, 14, 0.18));
}
.v2-quick-text {
  display: flex; flex-direction: column; align-items: center;
  line-height: 1.1;
}
.v2-quick-cn {
  font-family: var(--v2-serif);
  font-size: 13px; font-weight: 800;
  color: var(--v2-ink);
  letter-spacing: 0.5px;
}
.v2-quick-en {
  font-family: var(--v2-mono);
  font-size: 8.5px; letter-spacing: 1.2px;
  color: var(--v2-amber-deep);
  margin-top: 2px;
  font-weight: 700;
}

/* ================== Shelf 货架区 ================== */
.v2-shelf { margin-bottom: 36px; padding-top: 8px; }
.v2-shelf-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 14px;
  margin: 0 18px 16px;
}
.v2-shelf-head > div { min-width: 0; flex: 1; }

/* —— 重写 v2 区域内 tabs —— */
.v2-shelf .v2-tabs {
  padding: 4px 16px 14px;
  gap: 6px;
}
.v2-shelf .v2-tabs .tab {
  background: var(--v2-paper);
  border: 1px solid var(--v2-line-soft);
  color: var(--v2-ink-mid);
  font-family: inherit;
  font-weight: 700;
  font-size: 12.5px;
  padding: 8px 14px;
  box-shadow: none;
}
.v2-shelf .v2-tabs .tab.active {
  background: var(--v2-ink);
  color: #FFE8B0;
  border-color: var(--v2-ink);
  box-shadow: 0 8px 18px -8px rgba(26, 18, 8, 0.5);
}
.v2-shelf .v2-tabs .tab.active .icon { color: #FFD78A; }
.v2-shelf .v2-tabs .tab .icon { color: var(--v2-amber-deep); }
.v2-shelf .v2-tabs .tab-more {
  background: var(--v2-paper);
  border: 1px solid var(--v2-line-soft);
}

/* —— v2 卡片样式微调（货架卡升级为奶油纸感） —— */
.v2-shelf .grid {
  gap: 14px;
}
.v2-shelf .card {
  background: var(--v2-paper);
  border-radius: 20px;
  border: 1px solid var(--v2-line-soft);
  box-shadow: 0 8px 18px -12px rgba(140, 90, 14, 0.4);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.v2-shelf .card:hover {
  transform: translateY(-3px);
  border-color: rgba(140, 90, 14, 0.4);
  box-shadow: 0 16px 28px -14px rgba(140, 90, 14, 0.45);
}

/* ================== Footer 签名 ================== */
.v2-foot {
  text-align: center;
  padding: 8px 16px 32px;
  margin-bottom: 70px;
}
.v2-foot-line {
  width: 36px; height: 1px;
  background: var(--v2-amber);
  margin: 0 auto 14px;
  opacity: 0.5;
}
.v2-foot-mark {
  font-family: var(--v2-mono);
  font-size: 12px; letter-spacing: 4px;
  font-weight: 800;
  color: var(--v2-amber-deep);
}
.v2-foot-small {
  margin-top: 8px;
  font-family: var(--v2-serif);
  font-size: 11.5px;
  font-style: italic;
  color: var(--v2-ink-soft);
  letter-spacing: 0.6px;
}

/* ================== FAB v2（与 hero 同色谱） ================== */
.v2-fab {
  background: linear-gradient(180deg, #2A1B08 0%, #14100A 100%);
  color: #FFE8B0;
  border-color: rgba(255, 232, 176, 0.18);
  font-family: inherit;
  letter-spacing: 0.8px;
  box-shadow:
    0 14px 28px -8px rgba(26, 18, 8, 0.55),
    0 0 0 4px rgba(255, 215, 138, 0.18);
}
.v2-fab .icon { color: #FFD78A; }

/* ================== 桌面与平板增强 ================== */
@media (min-width: 720px) {
  .v2-hero {
    margin: 8px 24px 24px;
    padding: 24px 36px 36px;
  }
  .v2-hero-stage { width: 280px; height: 240px; margin: 22px auto 6px; }
  .v2-stage-ring-outer { width: 240px; height: 240px; }
  .v2-stage-ring-inner { width: 170px; height: 170px; }
  .v2-orbit { font-size: 36px; }
  .v2-orbit-4 { font-size: 32px; }
  .v2-orbit-5 { font-size: 30px; }
  .v2-orbit-center { width: 92px; height: 92px; }
  .v2-orbit-paw { font-size: 36px; }
  .v2-hero-title { font-size: clamp(38px, 6vw, 56px); }

  .v2-kpi { margin: 0 24px 28px; padding: 22px 8px 18px; }
  .v2-section-head, .v2-shelf-head { margin-left: 28px; margin-right: 28px; }
  .v2-module-grid { grid-template-columns: repeat(3, 1fr); padding: 0 24px; gap: 14px; }
  .v2-module { min-height: 180px; padding: 18px 16px 16px; }
  .v2-quick { padding: 0 24px; gap: 10px; }
  .v2-shelf .grid { padding: 0 24px; grid-template-columns: repeat(3, 1fr); }
  .v2-shelf .v2-tabs { padding-left: 24px; padding-right: 24px; }
}

@media (min-width: 1080px) {
  .v2-hero {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    grid-template-rows: auto 1fr;
    align-items: center;
    gap: 0 32px;
    padding: 32px 48px 40px;
  }
  .v2-hero-top { grid-column: 1 / -1; }
  .v2-hero-stage {
    grid-column: 2; grid-row: 2;
    width: 360px; height: 320px; margin: 0 auto;
  }
  .v2-stage-ring-outer { width: 320px; height: 320px; }
  .v2-stage-ring-inner { width: 220px; height: 220px; }
  .v2-orbit { font-size: 44px; }
  .v2-orbit-4 { font-size: 38px; }
  .v2-orbit-5 { font-size: 36px; }
  .v2-orbit-center { width: 110px; height: 110px; }
  .v2-orbit-paw { font-size: 44px; }
  .v2-hero-headline {
    grid-column: 1; grid-row: 2;
    text-align: left; padding-right: 24px;
  }
  .v2-hero-subline { margin-left: 0; align-items: flex-start; }
  .v2-subline-en { padding-left: 0; }
  .v2-hero-cta { justify-content: flex-start; }
  .v2-hero-title { font-size: clamp(48px, 5vw, 64px); }

  .v2-shelf .grid { grid-template-columns: repeat(4, 1fr); }
}

/* —— 极小屏幕兜底（≤360px）—— */
@media (max-width: 360px) {
  .v2-hero { padding: 16px 16px 26px; }
  .v2-hero-stage { width: 200px; height: 170px; }
  .v2-stage-ring-outer { width: 170px; height: 170px; }
  .v2-stage-ring-inner { width: 120px; height: 120px; }
  .v2-orbit { font-size: 26px; }
  .v2-kpi { grid-template-columns: 1fr 1fr 1fr; padding: 16px 4px 12px; gap: 0 4px; }
  .v2-kpi-divide { display: none; }
  .v2-kpi-cell { padding: 4px; border-right: 1px dashed var(--v2-line); }
  .v2-kpi-cell:last-child { border-right: none; }
  .v2-kpi-num { font-size: 22px; }
  .v2-kpi-label { font-size: 8.5px; letter-spacing: 0.8px; }
  .v2-module-grid { gap: 10px; padding: 0 12px; }
  .v2-quick { padding: 0 12px; }
}

/* ================================================================
 * V2 · 「我的」页同款风格(全部以 :has 作用域,不破坏旧版)
 * ============================================================== */

body:has(#pageMy.active) {
  background:
    radial-gradient(1100px 600px at 80% -10%, rgba(255, 215, 138, 0.45) 0%, rgba(255, 215, 138, 0) 60%),
    radial-gradient(900px 700px at -10% 30%, rgba(255, 197, 122, 0.22) 0%, rgba(255, 197, 122, 0) 65%),
    var(--v2-paper);
}

/* ----- 个人卡（合并 ID + 钱包 + 统计） ----- */
body:has(#pageMy.active) .my-card,
body:has(#pageMy.active) .my-card-merged {
  background:
    radial-gradient(120% 70% at 100% 0%, rgba(255, 215, 138, 0.55) 0%, transparent 55%),
    var(--v2-paper);
  border: 1px solid var(--v2-line);
  box-shadow:
    0 16px 32px -18px rgba(140, 90, 14, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  border-radius: 22px;
  margin: 16px 16px 18px;
  padding: 20px 20px 18px;
  overflow: hidden;
  position: relative;
}
body:has(#pageMy.active) .my-card::before {
  content: '🐾';
  position: absolute;
  right: -16px; top: -22px;
  font-size: 130px;
  opacity: 0.06;
  transform: rotate(15deg);
  color: var(--v2-amber-deep);
}
body:has(#pageMy.active) .my-id-row {
  border-bottom: 1px dashed var(--v2-line);
  padding-bottom: 14px;
  margin-bottom: 16px;
}

/* 头像微调：换成 cream + amber 描边 */
body:has(#pageMy.active) .me-id-avatar {
  background: linear-gradient(135deg, #FFFBE9 0%, #F5E2B0 100%);
  box-shadow:
    0 8px 18px -8px rgba(140, 90, 14, 0.4),
    inset 0 0 0 2px rgba(255, 255, 255, 0.85);
}
body:has(#pageMy.active) .me-id-avatar-edit {
  background: var(--v2-ink);
  color: #FFD78A;
  border: 2px solid #FBF5E5;
}

/* 昵称 → 衬线 */
body:has(#pageMy.active) .me-id-name {
  font-family: var(--v2-serif);
  font-size: 22px;
  font-weight: 800;
  color: var(--v2-ink);
  letter-spacing: 0.5px;
}
body:has(#pageMy.active) .me-id-tip {
  font-family: var(--v2-mono);
  font-size: 10px;
  letter-spacing: 0.6px;
  color: var(--v2-ink-soft);
  margin-top: 2px;
}
body:has(#pageMy.active) .me-id-social-num {
  font-family: var(--v2-serif);
  font-weight: 800;
  color: var(--v2-ink);
}
body:has(#pageMy.active) .me-id-social-label {
  font-family: var(--v2-mono);
  font-size: 10px;
  letter-spacing: 0.8px;
  color: var(--v2-amber-deep);
  font-weight: 700;
}
body:has(#pageMy.active) .me-id-social-sep {
  background: var(--v2-line);
  width: 1px;
}

/* 钱包行 → 「ledger 余额栏」 */
body:has(#pageMy.active) .my-coin {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin: 0 -4px;
  background: linear-gradient(160deg, #1F1408 0%, #2C1E0C 100%);
  border-radius: 18px;
  color: #FFE8B0;
  box-shadow: 0 14px 28px -16px rgba(26, 18, 8, 0.6);
}
body:has(#pageMy.active) .coin-big {
  width: 56px; height: 56px;
  background: transparent;
  border-radius: 14px;
  box-shadow: none;
  border: none;
  padding: 0;
}
body:has(#pageMy.active) .coin-big .icon { color: #FFD78A; }
body:has(#pageMy.active) .coin-big .b-coin-svg { width: 56px; height: 56px; }
body:has(#pageMy.active) .coin-num-big {
  font-family: var(--v2-serif);
  font-size: 32px; font-weight: 800;
  color: #FFE8B0;
  letter-spacing: 1px;
  font-feature-settings: "tnum";
}
body:has(#pageMy.active) .coin-tip {
  font-family: var(--v2-mono);
  font-size: 9.5px;
  letter-spacing: 1.2px;
  color: rgba(255, 232, 176, 0.65);
  margin-top: 4px;
  text-transform: uppercase;
}
body:has(#pageMy.active) .coin-recharge-arrow {
  display: inline-flex; align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 215, 138, 0.16);
  border: 1px solid rgba(255, 215, 138, 0.32);
  font-family: var(--v2-mono);
  font-size: 10.5px;
  letter-spacing: 0.6px;
  color: #FFD78A;
  font-weight: 700;
}

/* 统计 3 联 */
body:has(#pageMy.active) .my-stats {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px dashed var(--v2-line);
  position: relative;
  gap: 0;
}
body:has(#pageMy.active) .my-stats .stat {
  position: relative;
  flex: 1;
}
body:has(#pageMy.active) .my-stats .stat + .stat::before {
  content: '';
  position: absolute;
  left: 0; top: 14%; bottom: 14%;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--v2-line), transparent);
}
body:has(#pageMy.active) .stat-num {
  font-family: var(--v2-serif);
  font-size: 24px; font-weight: 800;
  color: var(--v2-ink);
  font-feature-settings: "tnum";
  line-height: 1;
}
body:has(#pageMy.active) .stat div:last-child {
  font-family: var(--v2-mono);
  font-size: 9.5px;
  letter-spacing: 1.4px;
  color: var(--v2-ink-soft);
  font-weight: 700;
  margin-top: 7px;
  text-transform: uppercase;
  opacity: 1;
}

/* ----- 萌宠家族 ----- */
body:has(#pageMy.active) .my-family {
  background:
    radial-gradient(140% 70% at 0% 100%, rgba(255, 200, 110, 0.18) 0%, transparent 60%),
    var(--v2-paper);
  border: 1px solid var(--v2-line);
  border-radius: 22px;
  box-shadow:
    0 14px 28px -18px rgba(140, 90, 14, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  margin: 0 16px 18px;
  padding: 18px 18px 16px;
}
body:has(#pageMy.active) .family-head {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 16px;
}
body:has(#pageMy.active) .family-title {
  position: relative;
  font-family: var(--v2-serif);
  font-size: 18px; font-weight: 800;
  color: var(--v2-ink);
  letter-spacing: 0.5px;
}
body:has(#pageMy.active) .family-title::before {
  content: 'MY FAMILY · 我的';
  display: block;
  font-family: var(--v2-mono);
  font-size: 9.5px; letter-spacing: 1.6px;
  color: var(--v2-amber);
  font-weight: 700;
  margin-bottom: 4px;
  text-transform: uppercase;
}
body:has(#pageMy.active) .family-row-label {
  font-family: var(--v2-mono);
  font-size: 9.5px;
  letter-spacing: 1.4px;
  color: var(--v2-amber-deep);
  font-weight: 700;
  text-transform: uppercase;
}
body:has(#pageMy.active) .family-row-sub {
  font-family: var(--v2-mono);
  font-size: 9.5px; letter-spacing: 0.6px;
  color: var(--v2-ink-soft);
}

/* 性别按钮 */
body:has(#pageMy.active) .gender-pill {
  background: rgba(251, 245, 229, 0.6);
  border: 1px solid var(--v2-line);
  border-radius: 14px;
  color: var(--v2-ink-mid);
  font-family: inherit;
  font-weight: 700;
}
body:has(#pageMy.active) .gender-pill.active {
  background: var(--v2-ink);
  border-color: var(--v2-ink);
  color: #FFE8B0;
  box-shadow: 0 8px 18px -8px rgba(26, 18, 8, 0.5);
}

/* 宠物网格 */
body:has(#pageMy.active) .family-pet {
  background: rgba(251, 245, 229, 0.7);
  border: 1px solid var(--v2-line);
  border-radius: 14px;
}
body:has(#pageMy.active) .family-pet .family-pet-name {
  font-family: var(--v2-mono);
  font-size: 9.5px; letter-spacing: 0.6px;
  color: var(--v2-ink-mid);
  font-weight: 700;
}
body:has(#pageMy.active) .family-pet.active {
  background: var(--v2-ink);
  border-color: var(--v2-ink);
  color: #FFE8B0;
  box-shadow: 0 8px 18px -8px rgba(26, 18, 8, 0.5);
}
body:has(#pageMy.active) .family-pet.active .family-pet-name { color: #FFE8B0; }
body:has(#pageMy.active) .family-pet .family-pet-check {
  background: var(--v2-amber);
  border: 1.5px solid #FBF5E5;
}

/* ----- 趣味玩法 / AI 试穿入口 → 暗色 CTA ----- */
body:has(#pageMy.active) .my-fun { padding: 0 16px; margin-bottom: 18px; }
body:has(#pageMy.active) .fun-title {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 12px;
  padding: 0 4px;
}
body:has(#pageMy.active) .fun-title > span:first-child {
  font-family: var(--v2-serif);
  font-size: 17px; font-weight: 800;
  color: var(--v2-ink);
  letter-spacing: 0.5px;
  position: relative;
}
body:has(#pageMy.active) .fun-title > span:first-child::before {
  content: 'PLAYGROUND · 趣味';
  display: block;
  font-family: var(--v2-mono);
  font-size: 9.5px; letter-spacing: 1.6px;
  color: var(--v2-amber);
  font-weight: 700;
  margin-bottom: 2px;
}
body:has(#pageMy.active) .fun-title-tip {
  font-family: var(--v2-mono);
  font-size: 9.5px;
  letter-spacing: 0.8px;
  color: var(--v2-ink-soft);
  font-weight: 600;
}

body:has(#pageMy.active) .fun-entry,
body:has(#pageMy.active) .dressup-entry {
  background: linear-gradient(160deg, #1F1408 0%, #2C1E0C 60%, #3A2A12 100%);
  color: #FFE8B0;
  border-radius: 22px;
  border: 1px solid #1A1208;
  padding: 18px 18px 18px 22px;
  box-shadow: 0 18px 32px -16px rgba(26, 18, 8, 0.6);
}
body:has(#pageMy.active) .dressup-entry::before {
  background: radial-gradient(circle, rgba(255, 215, 138, 0.18) 0%, rgba(255, 215, 138, 0) 65%);
  width: 200px; height: 200px;
  top: -60px; right: -50px;
}
body:has(#pageMy.active) .dressup-entry::after {
  color: #FFD78A;
  text-shadow: 0 0 8px rgba(255, 215, 138, 0.6);
}
body:has(#pageMy.active) .fun-entry-tag {
  background: rgba(255, 215, 138, 0.16);
  border: 1px solid rgba(255, 215, 138, 0.3);
  font-family: var(--v2-mono);
  letter-spacing: 1.4px;
  color: #FFD78A;
  text-transform: uppercase;
  font-size: 9.5px;
}
body:has(#pageMy.active) .fun-entry-title {
  font-family: var(--v2-serif);
  font-size: 21px; font-weight: 800;
  color: #FFE8B0;
  letter-spacing: 0.5px;
}
body:has(#pageMy.active) .fun-entry-sub {
  color: rgba(255, 232, 176, 0.72);
  font-size: 12px;
  font-weight: 500;
}
body:has(#pageMy.active) .fun-entry-btn {
  background: #FFE8B0;
  color: #2A1B08;
  font-family: var(--v2-mono);
  font-weight: 800;
  letter-spacing: 0.6px;
  font-size: 11px;
  padding: 7px 14px;
}
body:has(#pageMy.active) .fun-entry-btn-upload {
  background: rgba(255, 215, 138, 0.12);
  color: #FFD78A;
  border: 1px solid rgba(255, 215, 138, 0.4);
}

/* ----- 我的内容 tabs ----- */
body:has(#pageMy.active) .my-tabs {
  padding: 4px 16px 14px;
  gap: 6px;
  position: relative;
}
body:has(#pageMy.active) .my-tabs::before {
  content: 'MY CONTENT · 我的内容';
  display: block;
  position: absolute;
  top: -8px; left: 20px;
  font-family: var(--v2-mono);
  font-size: 9.5px; letter-spacing: 1.6px;
  color: var(--v2-amber);
  font-weight: 700;
}
body:has(#pageMy.active) .my-tab {
  background: var(--v2-paper);
  border: 1px solid var(--v2-line-soft);
  color: var(--v2-ink-mid);
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  padding: 10px;
  border-radius: 14px;
  box-shadow: none;
  margin-top: 14px;
}
body:has(#pageMy.active) .my-tab.active {
  background: var(--v2-ink);
  color: #FFE8B0;
  border-color: var(--v2-ink);
  box-shadow: 0 8px 18px -8px rgba(26, 18, 8, 0.5);
}
body:has(#pageMy.active) .my-tab.active .icon { color: #FFD78A; }

/* ----- 我的内容卡片列表 ----- */
body:has(#pageMy.active) .my-list .card {
  background: var(--v2-paper);
  border: 1px solid var(--v2-line-soft);
  border-radius: 18px;
  box-shadow: 0 8px 18px -12px rgba(140, 90, 14, 0.35);
}
body:has(#pageMy.active) .my-list .card:hover {
  border-color: rgba(140, 90, 14, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 16px 28px -14px rgba(140, 90, 14, 0.45);
}
body:has(#pageMy.active) .my-list .card-action {
  background: rgba(26, 18, 8, 0.06);
  color: var(--v2-amber-deep);
  border-radius: 8px;
  font-family: var(--v2-mono);
  letter-spacing: 0.6px;
  font-size: 11px;
}
body:has(#pageMy.active) .empty {
  color: var(--v2-ink-soft);
  font-family: var(--v2-mono);
  letter-spacing: 0.6px;
}
