/* ============================================================
   萌宠语 PetCoco · 清新可爱设计系统
   ------------------------------------------------------------
   用 CSS 变量统一主题色，便于整体换肤/拓展。
   配色：奶油底 + 薄荷绿 + 蜜桃粉 + 暖黄，圆润柔和。
   ============================================================ */

:root {
  /* —— 主题色 —— */
  --cream:      #FFF9F2;   /* 页面底色 */
  --cream-2:    #FFF2E6;
  --mint:       #E8F5EC;   /* 浅薄荷 */
  --mint-2:     #D6EFDf;
  --primary:    #7FC8A9;   /* 主色：薄荷绿 */
  --primary-d:  #5BA884;
  --peach:      #FFB5A7;   /* 蜜桃粉 */
  --peach-d:    #F4978A;
  --pink:       #FFD3DE;
  --yellow:     #FFE5A0;
  --sky:        #CDE4F7;
  --lavender:   #E6D7F2;

  /* —— 文字 —— */
  --ink:        #4A4034;   /* 暖深棕主文字 */
  --ink-soft:   #6B6157;
  --muted:      #9A9088;

  /* —— 表面 —— */
  --surface:    #FFFFFF;
  --surface-2:  #FFFDF9;
  --line:       #F0E6D9;

  /* —— 阴影 —— */
  --shadow-sm:  0 2px 8px rgba(122, 110, 90, .08);
  --shadow:     0 8px 24px rgba(122, 110, 90, .12);
  --shadow-lg:  0 16px 40px rgba(122, 110, 90, .18);

  /* —— 圆角 —— */
  --r-sm: 12px;
  --r:    18px;
  --r-lg: 26px;
  --r-xl: 36px;
  --r-pill: 999px;

  /* —— 字体 —— */
  --font: "Nunito", "PingFang SC", "Microsoft YaHei", "Quicksand", system-ui, sans-serif;
  --font-title: "Quicksand", "PingFang SC", "Nunito", system-ui, sans-serif;
}

/* —— 重置 —— */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font-family: inherit; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* —— 容器 —— */
.container { width: min(1180px, 92vw); margin: 0 auto; }

/* —— 按钮 —— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--r-pill);
  font-weight: 700; font-size: 14px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-d));
  color: #fff; box-shadow: 0 6px 16px rgba(91,168,132,.35);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(91,168,132,.45); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn-ghost {
  background: var(--surface); color: var(--ink);
  border: 2px solid var(--line); box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary-d); transform: translateY(-2px); }

/* ============ 顶部导航 ============ */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 249, 242, .7);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background .25s, box-shadow .25s, border-color .25s;
}
.header.scrolled {
  background: rgba(255, 249, 242, .92);
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-family: var(--font-title); }
.logo-mark {
  display: grid; place-items: center; width: 38px; height: 38px; font-size: 20px;
  background: linear-gradient(135deg, var(--peach), var(--pink)); border-radius: 14px;
  box-shadow: var(--shadow-sm); transform: rotate(-6deg);
}
.logo-text { font-size: 20px; letter-spacing: .5px; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 8px 16px; border-radius: var(--r-pill); font-weight: 600; font-size: 15px;
  color: var(--ink-soft); transition: all .2s;
}
.nav-links a:hover { background: var(--mint); color: var(--primary-d); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  position: relative; display: grid; place-items: center;
  width: 42px; height: 42px; font-size: 18px; border-radius: 14px;
  background: var(--surface); box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}
.icon-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* 趣味特效开关按钮 */
.fun-toggle {
  background: linear-gradient(135deg, var(--yellow), var(--peach));
  color: var(--ink);
  overflow: visible;
}
.fun-toggle::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--peach), var(--yellow), var(--mint));
  z-index: -1;
  opacity: .8;
  animation: fun-glow 2.4s ease-in-out infinite;
}
.fun-toggle .fun-on {
  display: inline-block;
  filter: drop-shadow(0 1px 2px rgba(180,100,30,.2));
  animation: fun-twinkle 1.8s ease-in-out infinite;
}
.fun-toggle:hover { transform: translateY(-2px) scale(1.05); }

/* 关闭状态：灰暗静态 */
.fun-toggle.off {
  background: var(--surface-2);
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}
.fun-toggle.off::before { display: none; }
.fun-toggle.off .fun-on {
  animation: none;
  filter: none;
  opacity: .55;
}
.fun-toggle.off:hover { color: var(--ink-soft); }

@keyframes fun-glow {
  0%, 100% { opacity: .55; transform: scale(1); }
  50%      { opacity: .9;  transform: scale(1.04); }
}
@keyframes fun-twinkle {
  0%, 100% { transform: scale(1) rotate(0); }
  50%      { transform: scale(1.15) rotate(8deg); }
}
.cart-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 19px; height: 19px; padding: 0 5px;
  display: grid; place-items: center; font-size: 11px; font-weight: 800;
  background: var(--peach-d); color: #fff; border-radius: var(--r-pill);
  border: 2px solid var(--cream); opacity: 0; transform: scale(.5);
  transition: all .25s cubic-bezier(.5,1.6,.6,1);
}
.cart-badge.has { opacity: 1; transform: scale(1); }

/* 移动端汉堡 */
.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.nav-toggle span { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: .25s; }

/* ============ Hero ============ */
.hero {
  position: relative; padding: 70px 0 110px;
  background:
    radial-gradient(circle at 12% 20%, rgba(255,181,167,.25), transparent 40%),
    radial-gradient(circle at 88% 10%, rgba(127,200,169,.22), transparent 42%),
    linear-gradient(180deg, var(--cream-2), var(--cream));
  overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 40px; }
.hero-eyebrow {
  display: inline-block; padding: 6px 16px; border-radius: var(--r-pill);
  background: var(--surface); color: var(--peach-d); font-weight: 700; font-size: 14px;
  box-shadow: var(--shadow-sm); margin-bottom: 18px;
}
.hero-title { font-family: var(--font-title); font-size: clamp(34px, 5vw, 56px); line-height: 1.1; font-weight: 700; letter-spacing: -1px; }
.hl { color: var(--peach-d); position: relative; display: inline-block; }
.hl::after { content: ""; position: absolute; left: 0; bottom: 4px; width: 100%; height: 10px; background: var(--yellow); border-radius: var(--r-pill); z-index: -1; opacity: .7; }
.hero-sub { color: var(--ink-soft); font-size: 18px; margin: 16px 0 26px; max-width: 460px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 28px; margin-top: 34px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--font-title); font-size: 28px; color: var(--primary-d); }
.hero-stats span { font-size: 13px; color: var(--muted); }

.hero-visual { position: relative; height: 380px; }
.blob { position: absolute; border-radius: 46% 54% 54% 46% / 48% 46% 54% 52%; filter: blur(2px); opacity: .55; animation: floaty 8s ease-in-out infinite; }
.blob-1 { width: 230px; height: 230px; left: 50%; top: 50%; transform: translate(-50%,-50%); background: linear-gradient(135deg, var(--peach), var(--pink)); }
.blob-2 { width: 160px; height: 160px; left: 30%; top: 30%; background: linear-gradient(135deg, var(--primary), var(--mint-2)); animation-delay: -2s; }
.blob-3 { width: 120px; height: 120px; right: 22%; bottom: 22%; background: linear-gradient(135deg, var(--yellow), #FFD3B6); animation-delay: -4s; }
.hero-emoji { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); font-size: 120px; filter: drop-shadow(0 12px 20px rgba(0,0,0,.15)); animation: bob 4s ease-in-out infinite; }
.float-emoji { position: absolute; font-size: 44px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.12)); animation: bob 5s ease-in-out infinite; }
.fe-1 { left: 12%; top: 18%; animation-delay: -1s; }
.fe-2 { right: 10%; top: 24%; animation-delay: -2.5s; }
.fe-3 { left: 18%; bottom: 14%; animation-delay: -1.5s; }
.fe-4 { right: 16%; bottom: 10%; animation-delay: -3s; }

.wave {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 60px;
  background: var(--cream);
  -webkit-mask: radial-gradient(28px at 28px 0, transparent 98%, #000) 0 -28px / 56px 100% repeat-x;
          mask: radial-gradient(28px at 28px 0, transparent 98%, #000) 0 -28px / 56px 100% repeat-x;
}

@keyframes floaty { 0%,100% { transform: translate(-50%,-50%) rotate(0); } 50% { transform: translate(-50%,-54%) rotate(8deg); } }
@keyframes bob { 0%,100% { transform: translate(-50%,-50%) translateY(0); } 50% { transform: translate(-50%,-50%) translateY(-12px); } }
.float-emoji { animation-name: bob2; }
@keyframes bob2 { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ============ 通用 section ============ */
.section { padding: 80px 0; position: relative; }
.section-alt { background: linear-gradient(180deg, var(--mint), var(--cream) 60%); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 34px; flex-wrap: wrap; }
.section-eyebrow { display: inline-block; color: var(--peach-d); font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.section-title { font-family: var(--font-title); font-size: clamp(26px, 3.5vw, 38px); font-weight: 700; letter-spacing: -.5px; }
.section-desc { color: var(--ink-soft); margin-top: 8px; max-width: 540px; }

/* ============ 工具栏 / Tab ============ */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 30px; flex-wrap: wrap; }
.toolbar-right { display: flex; gap: 12px; flex-wrap: wrap; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink-soft); font-weight: 600; font-size: 14px;
  box-shadow: var(--shadow-sm); transition: all .2s;
}
.tab:hover { transform: translateY(-2px); color: var(--primary-d); }
.tab.active { background: linear-gradient(135deg, var(--primary), var(--primary-d)); color: #fff; box-shadow: 0 6px 16px rgba(91,168,132,.35); }
.tab-icon { font-size: 16px; }

.search-box {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; background: var(--surface); border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm); transition: box-shadow .2s;
}
.search-box:focus-within { box-shadow: 0 0 0 3px rgba(127,200,169,.25), var(--shadow); }
.search-box input { border: none; background: none; outline: none; width: 180px; font-size: 14px; color: var(--ink); }
.search-box input::placeholder { color: var(--muted); }
.select {
  padding: 9px 36px 9px 16px; border-radius: var(--r-pill); background: var(--surface);
  box-shadow: var(--shadow-sm); border: none; font-size: 14px; color: var(--ink);
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239A9088' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; cursor: pointer;
}

/* ============ 宠物卡片 ============ */
.pet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.pet-card {
  background: var(--surface); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s;
  display: flex; flex-direction: column; border: 1px solid var(--line);
}
.pet-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.pet-media {
  position: relative; aspect-ratio: 1 / 1; background: linear-gradient(135deg, var(--mint-2), var(--cream-2));
  display: grid; place-items: center; overflow: hidden;
}
.pet-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.pet-card:hover .pet-media img { transform: scale(1.06); }
.pet-media.img-fallback { background: linear-gradient(135deg, var(--pink), var(--yellow)); }
.emoji-big { font-size: 88px; filter: drop-shadow(0 8px 12px rgba(0,0,0,.12)); }

.pet-status {
  position: absolute; top: 12px; left: 12px; padding: 4px 12px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 800; color: #fff; backdrop-filter: blur(4px);
}
.st-available { background: rgba(91,168,132,.92); }
.st-reserved  { background: rgba(244,151,138,.92); }
.st-adopted   { background: rgba(154,144,136,.92); }

.fav-btn {
  position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.85); backdrop-filter: blur(4px); font-size: 18px;
  display: grid; place-items: center; transition: transform .2s, background .2s;
  box-shadow: var(--shadow-sm);
}
.fav-btn:hover { transform: scale(1.15); }
.fav-btn.is-fav { background: var(--pink); animation: pop .35s ease; }
@keyframes pop { 0%{transform:scale(1);} 50%{transform:scale(1.3);} 100%{transform:scale(1.15);} }

.pet-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; gap: 8px; }
.pet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pet-name { font-family: var(--font-title); font-size: 20px; font-weight: 700; }
.pet-gender { font-size: 18px; color: var(--peach-d); }
.pet-breed { color: var(--ink-soft); font-size: 14px; }
.pet-traits { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 3px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; }
.pet-health { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { padding: 2px 8px; border-radius: 8px; font-size: 11px; font-weight: 700; }
.badge-ok { background: var(--mint); color: var(--primary-d); }
.pet-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); }
.pet-price { font-family: var(--font-title); font-size: 20px; font-weight: 800; color: var(--peach-d); }
.pet-actions { display: flex; gap: 6px; }
.pet-actions .btn { padding: 7px 14px; font-size: 13px; }

/* ============ 知识百科 ============ */
.kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.kb-card {
  display: flex; gap: 16px; background: var(--surface); border-radius: var(--r-lg); padding: 22px;
  box-shadow: var(--shadow); border: 1px solid var(--line); cursor: pointer;
  transition: transform .25s, box-shadow .25s; position: relative; overflow: hidden;
}
.kb-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(180deg, var(--peach), var(--primary)); opacity: 0; transition: opacity .25s; }
.kb-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.kb-card:hover::before { opacity: 1; }
.kb-icon {
  flex-shrink: 0; width: 56px; height: 56px; border-radius: 18px; font-size: 28px;
  display: grid; place-items: center; background: linear-gradient(135deg, var(--mint-2), var(--cream-2));
  box-shadow: var(--shadow-sm);
}
.kb-body { flex: 1; min-width: 0; }
.kb-meta { display: flex; gap: 12px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.kb-cat { color: var(--primary-d); font-weight: 700; }
.kb-title { font-family: var(--font-title); font-size: 18px; font-weight: 700; line-height: 1.3; margin-bottom: 8px; }
.kb-summary { color: var(--ink-soft); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kb-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.kb-author { font-size: 12px; color: var(--muted); }
.kb-readmore { color: var(--primary-d); font-weight: 700; font-size: 14px; transition: gap .2s; }
.kb-readmore:hover { color: var(--peach-d); }

/* ============ 拓展功能 ============ */
.extra-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.extra-card {
  position: relative; text-align: left; padding: 26px 22px; border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line);
  transition: transform .25s, box-shadow .25s; overflow: hidden;
}
.extra-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.extra-card.soon { background: linear-gradient(135deg, var(--surface), var(--cream-2)); }
.extra-icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 28px; background: linear-gradient(135deg, var(--mint-2), var(--pink)); margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.extra-card h3 { font-family: var(--font-title); font-size: 18px; margin-bottom: 6px; }
.extra-card p { color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.extra-badge { position: absolute; top: 14px; right: 14px; padding: 3px 10px; border-radius: var(--r-pill); background: var(--yellow); color: #9A7B0F; font-size: 11px; font-weight: 800; }
.extra-tag { display: inline-block; margin-top: 12px; color: var(--primary-d); font-weight: 700; font-size: 13px; }

/* ============ 空状态 ============ */
.empty-state { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty-emoji { font-size: 56px; margin-bottom: 14px; opacity: .8; }

/* ============ 弹窗 ============ */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(74,64,52,.5); backdrop-filter: blur(6px); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.modal.show { opacity: 1; visibility: visible; }
.modal-dialog { position: relative; width: min(680px, 100%); max-height: 88vh; overflow: auto; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: 30px; transform: translateY(20px) scale(.97); transition: transform .3s cubic-bezier(.2,1,.3,1); }
.modal.show .modal-dialog { transform: translateY(0) scale(1); }
.modal-close { position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; border-radius: 50%; background: var(--cream); font-size: 16px; z-index: 2; transition: transform .2s, background .2s; }
.modal-close:hover { transform: rotate(90deg); background: var(--pink); }
.modal-dialog::-webkit-scrollbar { width: 8px; }
.modal-dialog::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }

/* 详情：宠物 */
.detail-media { aspect-ratio: 16/10; border-radius: var(--r-lg); overflow: hidden; background: linear-gradient(135deg, var(--mint-2), var(--cream-2)); display: grid; place-items: center; margin-bottom: 22px; }
.detail-media img { width: 100%; height: 100%; object-fit: cover; }
.detail-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.detail-title h2 { font-family: var(--font-title); font-size: 30px; }
.detail-breed { color: var(--ink-soft); margin-bottom: 14px; }
.detail-info .pet-traits { margin: 10px 0; }
.detail-info .pet-health { margin: 10px 0; }
.detail-desc { color: var(--ink-soft); line-height: 1.8; margin: 14px 0; padding: 16px; background: var(--cream); border-radius: var(--r); border-left: 4px solid var(--peach); }
.detail-price { font-family: var(--font-title); font-size: 30px; font-weight: 800; color: var(--peach-d); margin: 16px 0; }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* 详情：知识 */
.kb-detail-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 24px; }
.kb-icon.lg { width: 64px; height: 64px; font-size: 32px; }
.kb-detail-title { font-family: var(--font-title); font-size: 24px; margin: 8px 0; line-height: 1.3; }
.kb-detail-meta { font-size: 13px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.kb-detail-content { color: var(--ink); line-height: 1.9; font-size: 15px; }
.kb-detail-content p { margin-bottom: 16px; }
.kb-detail-content p:first-child::first-letter { font-size: 1.6em; font-weight: 800; color: var(--peach-d); }

/* ============ 心愿单抽屉 ============ */
.cart-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(74,64,52,.45); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.cart-overlay.show, .cart-drawer.open ~ .cart-overlay { opacity: 1; visibility: visible; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 95; width: min(400px, 88vw);
  background: var(--cream); box-shadow: -12px 0 40px rgba(0,0,0,.18);
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform .35s cubic-bezier(.3,1,.4,1);
}
.cart-drawer.open { transform: translateX(0); }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid var(--line); }
.cart-head h3 { font-family: var(--font-title); }
.cart-close { width: 36px; height: 36px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .2s; }
.cart-close:hover { transform: rotate(90deg); }
.cart-list { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.cart-empty { flex: 1; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 20px; }
.cart-item { display: flex; gap: 12px; align-items: center; background: var(--surface); padding: 12px; border-radius: var(--r); box-shadow: var(--shadow-sm); }
.cart-media { width: 56px; height: 56px; border-radius: 14px; overflow: hidden; flex-shrink: 0; background: linear-gradient(135deg, var(--mint-2), var(--cream-2)); display: grid; place-items: center; }
.cart-media img { width: 100%; height: 100%; object-fit: cover; }
.emoji-mid { font-size: 32px; }
.cart-info { flex: 1; min-width: 0; }
.cart-info h4 { font-size: 15px; }
.cart-info p { font-size: 12px; color: var(--muted); }
.cart-price { font-size: 13px; font-weight: 800; color: var(--peach-d); }
.cart-remove { width: 28px; height: 28px; border-radius: 50%; color: var(--muted); transition: all .2s; flex-shrink: 0; }
.cart-remove:hover { background: var(--pink); color: var(--peach-d); }
.cart-foot { padding: 18px 20px; border-top: 1px solid var(--line); background: var(--surface); }
.cart-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: 15px; }
.cart-total-price { font-family: var(--font-title); font-size: 22px; font-weight: 800; color: var(--peach-d); }

/* ============ Toast ============ */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translate(-50%, 80px); z-index: 200;
  background: var(--ink); color: #fff; padding: 14px 24px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600; white-space: pre-line; text-align: center;
  box-shadow: var(--shadow-lg); opacity: 0; transition: all .3s cubic-bezier(.3,1.3,.5,1); max-width: 90vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ 页脚 ============ */
.footer { background: linear-gradient(180deg, var(--cream), var(--cream-2)); padding: 60px 0 30px; border-top: 1px solid var(--line); }
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 30px; }
.footer-brand p { color: var(--ink-soft); margin-top: 12px; font-size: 14px; max-width: 240px; }
.footer-col h4 { font-family: var(--font-title); font-size: 16px; margin-bottom: 14px; }
.footer-col a, .footer-col span { display: block; color: var(--ink-soft); font-size: 14px; padding: 4px 0; transition: color .2s; }
.footer-col a:hover { color: var(--primary-d); }
.footer-note { margin-top: 12px; color: var(--muted) !important; font-size: 13px !important; }

/* ============ 响应式 ============ */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { height: 280px; order: -1; }
  .hero-emoji { font-size: 90px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .nav-links {
    position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--surface); box-shadow: var(--shadow); padding: 8px; border-radius: 0 0 var(--r) var(--r);
    transform: translateY(-12px); opacity: 0; visibility: hidden; transition: all .25s;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-links a { padding: 12px 16px; }
  .nav-toggle { display: flex; }
  .section { padding: 60px 0; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-right { width: 100%; }
  .search-box input { width: 100%; flex: 1; }
  .pet-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
  .hero-stats { gap: 18px; }
}
@media (max-width: 480px) {
  .pet-grid, .kb-grid, .extra-grid, .shop-grid, .id-grid-list { grid-template-columns: 1fr; }
  .modal-dialog { padding: 22px; }
  .detail-actions .btn, .pet-actions .btn, .shop-card .btn, .id-actions .btn { flex: 1; }
  .shop-detail { grid-template-columns: 1fr !important; }
  .page-body { grid-template-columns: 1fr !important; }
}

/* ============================================================
   商城 商城 / 个人页 / 萌宠身份卡
   ============================================================ */

/* —— 商城卡片 —— */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 22px; }
.shop-card {
  background: var(--surface); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line);
  display: flex; flex-direction: column; cursor: pointer;
  transition: transform .25s, box-shadow .25s;
}
.shop-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.shop-media {
  position: relative; aspect-ratio: 4/3; display: grid; place-items: center; font-size: 64px;
  background: radial-gradient(circle at 50% 40%, var(--mint-2), var(--cream-2));
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.08));
}
.shop-card:hover .shop-emoji { transform: scale(1.12) rotate(-6deg); }
.shop-emoji { transition: transform .35s cubic-bezier(.3,1.4,.5,1); }
.shop-off { position: absolute; top: 10px; left: 10px; background: var(--peach-d); color: #fff; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: var(--r-pill); }
.shop-stock { position: absolute; bottom: 10px; right: 10px; background: rgba(255,255,255,.9); color: var(--peach-d); font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: var(--r-pill); backdrop-filter: blur(4px); }
.shop-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.shop-cat { font-size: 12px; color: var(--primary-d); font-weight: 700; }
.shop-name { font-size: 15px; font-weight: 700; line-height: 1.3; min-height: 39px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shop-rate { color: var(--yellow); font-size: 13px; letter-spacing: 1px; display: flex; align-items: center; gap: 6px; }
.shop-rate span { color: var(--ink-soft); letter-spacing: 0; font-size: 12px; }
.shop-sold { font-size: 12px; color: var(--muted); }
.shop-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); }
.shop-price { display: flex; align-items: baseline; gap: 6px; }
.shop-price .now { font-family: var(--font-title); font-size: 19px; font-weight: 800; color: var(--peach-d); }
.shop-price .origin { font-size: 12px; color: var(--muted); text-decoration: line-through; }
.shop-card .btn { padding: 7px 16px; font-size: 13px; }

/* —— 商品详情 —— */
.shop-detail { display: grid; grid-template-columns: .9fr 1.1fr; gap: 24px; align-items: center; }
.shop-detail-media {
  aspect-ratio: 1/1; border-radius: var(--r-lg); display: grid; place-items: center; font-size: 110px;
  background: radial-gradient(circle at 50% 40%, var(--mint-2), var(--cream-2)); position: relative;
}
.shop-detail-media i { position: absolute; top: 14px; right: 14px; background: var(--peach-d); color: #fff; font-style: normal; font-weight: 800; font-size: 14px; padding: 4px 12px; border-radius: var(--r-pill); }
.shop-detail-info .shop-cat { font-size: 13px; }
.shop-detail-name { font-family: var(--font-title); font-size: 24px; margin: 6px 0 10px; }
.shop-detail-info .shop-rate { margin-bottom: 14px; }
.shop-detail-price { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 14px; }
.shop-detail-price .now { font-family: var(--font-title); font-size: 30px; font-weight: 800; color: var(--peach-d); }
.shop-detail-price .origin { color: var(--muted); text-decoration: line-through; }
.shop-detail-desc { color: var(--ink-soft); line-height: 1.8; padding: 14px; background: var(--cream); border-radius: var(--r); margin-bottom: 16px; }
.shop-detail-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--ink-soft); font-size: 13px; margin-bottom: 18px; }

/* —— 个人页覆盖层 —— */
.page-overlay {
  position: fixed; inset: 0; z-index: 110; background: var(--cream);
  opacity: 0; visibility: hidden; transform: translateY(24px); transition: opacity .3s, transform .3s, visibility .3s;
  overflow-y: auto;
}
.page-overlay.show { opacity: 1; visibility: visible; transform: translateY(0); }
.page-overlay-inner { width: min(1180px, 92vw); margin: 0 auto; padding: 24px 0 60px; }
.page-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.page-bar h2 { font-family: var(--font-title); font-size: 28px; }
.page-bar p { color: var(--ink-soft); font-size: 14px; margin-top: 4px; }
.page-close { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-sm); font-size: 16px; transition: transform .2s, background .2s; flex-shrink: 0; }
.page-close:hover { transform: rotate(90deg); background: var(--pink); }
.page-body { display: grid; grid-template-columns: 380px 1fr; gap: 30px; align-items: start; }
.profile-side { position: sticky; top: 24px; }
.profile-count { color: var(--ink-soft); font-size: 14px; margin-bottom: 16px; }
.profile-count strong { color: var(--primary-d); font-size: 18px; }
.profile-empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.profile-empty .empty-emoji { font-size: 64px; margin-bottom: 14px; }
.profile-empty .muted { font-size: 13px; margin-top: 6px; }

/* —— 录入表单 —— */
.pet-form {
  background: var(--surface); border-radius: var(--r-xl); padding: 26px;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.form-title { font-family: var(--font-title); font-size: 20px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.form-photo { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.photo-preview {
  width: 88px; height: 88px; border-radius: 20px; flex-shrink: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--mint-2), var(--pink)); display: grid; place-items: center;
  overflow: hidden; transition: transform .2s, box-shadow .2s; box-shadow: var(--shadow-sm);
}
.photo-preview:hover { transform: scale(1.04); box-shadow: var(--shadow); }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-ph { font-size: 13px; text-align: center; color: var(--ink-soft); font-weight: 600; line-height: 1.4; }
.photo-hint p { font-size: 14px; color: var(--ink); }
.photo-hint .muted { font-size: 12px; color: var(--muted); margin-top: 2px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field.full { grid-column: 1 / -1; }
.field > span { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.field > span em { color: var(--peach-d); font-style: normal; }
.field > span small { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  padding: 10px 14px; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: var(--surface-2);
  font-size: 14px; color: var(--ink); transition: border-color .2s, box-shadow .2s; outline: none; resize: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(127,200,169,.2); }
.seg { display: flex; gap: 6px; }
.seg button { flex: 1; padding: 9px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); font-weight: 600; color: var(--ink-soft); transition: all .2s; }
.seg button:hover { border-color: var(--primary); color: var(--primary-d); }
.seg button.active { background: linear-gradient(135deg, var(--primary), var(--primary-d)); border-color: transparent; color: #fff; }
.trait-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.trait-pick { padding: 6px 14px; border-radius: var(--r-pill); background: var(--cream); border: 1.5px solid var(--line); font-size: 13px; color: var(--ink-soft); font-weight: 600; transition: all .2s; }
.trait-pick:hover { border-color: var(--peach); color: var(--peach-d); }
.trait-pick.active { background: var(--pink); border-color: transparent; color: var(--peach-d); }
.form-actions { display: flex; gap: 10px; margin-top: 6px; }
.form-actions .btn { flex: 1; }

/* —— 萌宠身份卡片 —— */
.id-grid-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.id-card {
  position: relative; background: linear-gradient(155deg, #FFFDF9 0%, var(--cream-2) 100%);
  border-radius: var(--r-xl); padding: 26px 24px 22px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--line); overflow: hidden;
}
.id-card::before { content: ""; position: absolute; top: -40px; right: -40px; width: 130px; height: 130px; border-radius: 50%; background: radial-gradient(circle, var(--pink), transparent 70%); opacity: .5; }
.id-card::after { content: "🐾"; position: absolute; bottom: 14px; right: 18px; font-size: 40px; opacity: .08; transform: rotate(-12deg); }
.id-ribbon { display: inline-block; background: linear-gradient(135deg, var(--peach), var(--pink)); color: #fff; font-size: 12px; font-weight: 800; padding: 4px 14px; border-radius: var(--r-pill); margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.id-top { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.id-photo { width: 84px; height: 84px; border-radius: 20px; overflow: hidden; flex-shrink: 0; display: grid; place-items: center; background: linear-gradient(135deg, var(--mint-2), var(--cream-2)); box-shadow: var(--shadow-sm); }
.id-photo img { width: 100%; height: 100%; object-fit: cover; }
.id-head .id-name { font-family: var(--font-title); font-size: 24px; font-weight: 700; line-height: 1.1; }
.id-sub { color: var(--ink-soft); font-size: 13px; margin: 4px 0; }
.id-serial { font-size: 12px; color: var(--muted); font-family: monospace; letter-spacing: .5px; }
.id-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; padding: 14px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); margin-bottom: 14px; }
.id-grid div { display: flex; flex-direction: column; gap: 2px; }
.id-grid label { font-size: 11px; color: var(--muted); }
.id-grid span { font-size: 14px; font-weight: 600; }
.id-traits { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.id-traits .chip { padding: 3px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; background: var(--mint); color: var(--primary-d); }
.id-traits .chip.muted { background: var(--cream); color: var(--muted); }
.id-note { font-size: 13px; color: var(--ink-soft); font-style: italic; line-height: 1.6; margin-bottom: 14px; padding-left: 10px; border-left: 3px solid var(--peach); }
.id-foot { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 14px; }
.id-actions { display: flex; gap: 8px; }
.id-actions .btn { flex: 1; padding: 8px; font-size: 13px; }
.btn-danger { background: var(--surface); color: var(--peach-d); border: 2px solid #F4D5D0; }
.btn-danger:hover { background: #FFEDEB; border-color: var(--peach-d); }

/* —— 购物车商品标签 —— */
.cart-tag { font-size: 10px; font-weight: 800; padding: 1px 7px; border-radius: 6px; background: var(--mint); color: var(--primary-d); margin-left: 4px; vertical-align: middle; }

/* —— 个人页响应式 —— */
@media (max-width: 860px) {
  .page-body { grid-template-columns: 1fr; }
  .profile-side { position: static; }
  .id-grid-list { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-photo { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   在线问诊 聊天界面
   ============================================================ */
.vet-wrap { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }
.vet-side { background: var(--surface); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); border: 1px solid var(--line); position: sticky; top: 86px; }
.vet-doctor { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px dashed var(--line); }
.vet-doc-avatar { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 28px; background: linear-gradient(135deg, var(--mint-2), var(--pink)); box-shadow: var(--shadow-sm); }
.vet-doctor h3 { font-family: var(--font-title); font-size: 18px; }
.vet-doctor p { font-size: 13px; color: var(--muted); }
.vet-note { font-size: 13px; color: var(--ink-soft); margin: 14px 0 10px; }
.vet-side .tabs { margin-bottom: 18px; }
.vet-tips { background: var(--cream); border-radius: var(--r); padding: 14px 16px; border-left: 4px solid var(--peach); }
.vet-tips h4 { font-size: 13px; color: var(--peach-d); margin-bottom: 8px; }
.vet-tips ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.vet-tips li { font-size: 12.5px; color: var(--ink-soft); padding-left: 14px; position: relative; line-height: 1.4; }
.vet-tips li::before { content: "•"; color: var(--peach); position: absolute; left: 2px; }

.vet-chat { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); border: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; min-height: 520px; }
.chat-log { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 16px; max-height: 460px; }
.chat-log::-webkit-scrollbar { width: 6px; }
.chat-log::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
.chat-msg { display: flex; gap: 10px; align-items: flex-start; max-width: 100%; }
.chat-msg.user { justify-content: flex-end; }
.msg-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--mint-2), var(--pink)); display: grid; place-items: center; font-size: 18px; flex-shrink: 0; box-shadow: var(--shadow-sm); }
.msg-bubble { padding: 14px 16px; border-radius: 16px 16px 16px 4px; font-size: 14px; line-height: 1.7; max-width: 88%; box-shadow: var(--shadow-sm); }
.chat-msg.user .msg-bubble { background: linear-gradient(135deg, var(--primary), var(--primary-d)); color: #fff; border-radius: 16px 16px 4px 16px; white-space: pre-wrap; }
.chat-msg.vet .msg-bubble { background: var(--cream); color: var(--ink); }
.vet-rich { min-width: 320px; }
.vet-greet { font-family: var(--font-title); font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.vet-rich p { margin-bottom: 8px; }
.vet-hint { font-size: 12.5px !important; color: var(--muted) !important; }

.vet-alert { background: #FFEDEB; border: 1px solid #F4C2BD; color: #B03A2E; padding: 10px 14px; border-radius: var(--r-sm); font-weight: 800; font-size: 13px; margin-bottom: 12px; }
.vet-sev { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--r-pill); font-size: 12px; font-weight: 800; margin-bottom: 12px; }
.sev-dot { font-size: 14px; }
.sev-mild { background: var(--mint); color: var(--primary-d); }
.sev-moderate { background: var(--yellow); color: #9A7B0F; }
.sev-urgent { background: var(--peach); color: var(--peach-d); }
.vet-block { margin-bottom: 12px; padding: 12px 14px; background: var(--surface); border-radius: var(--r-sm); border: 1px solid var(--line); }
.vet-block h4 { font-size: 14px; font-weight: 800; margin-bottom: 6px; color: var(--ink); }
.vet-block p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.7; }
.vet-block ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.vet-block ul li { font-size: 13.5px; color: var(--ink-soft); padding-left: 16px; position: relative; line-height: 1.6; }
.vet-block ul li::before { content: "•"; color: var(--primary); position: absolute; left: 4px; font-weight: 800; }
.vet-when { border-left: 4px solid var(--peach); background: #FFF5F2; }
.vet-disclaimer { font-size: 12px; color: var(--muted); margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); line-height: 1.5; }

.typing { display: inline-flex; gap: 5px; align-items: center; padding: 16px 18px !important; }
.typing span { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); opacity: .5; animation: typing 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes typing { 0%,60%,100% { transform: translateY(0); opacity:.4; } 30% { transform: translateY(-6px); opacity:1; } }

.chat-quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 22px; border-top: 1px solid var(--line); background: var(--surface-2); }
.quick-chip { padding: 6px 14px; border-radius: var(--r-pill); background: var(--cream); border: 1.5px solid var(--line); font-size: 13px; color: var(--ink-soft); font-weight: 600; transition: all .2s; }
.quick-chip:hover { border-color: var(--primary); color: var(--primary-d); background: var(--mint); transform: translateY(-2px); }
.chat-input { display: flex; gap: 10px; padding: 14px 22px 18px; border-top: 1px solid var(--line); background: var(--surface); }
.chat-input textarea { flex: 1; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: var(--r); font-size: 14px; font-family: var(--font); resize: none; outline: none; max-height: 120px; transition: border-color .2s, box-shadow .2s; line-height: 1.5; }
.chat-input textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(127,200,169,.2); }

/* —— 问诊响应式 —— */
@media (max-width: 860px) {
  .vet-wrap { grid-template-columns: 1fr; }
  .vet-side { position: static; }
  .chat-log { max-height: 380px; }
  .vet-rich { min-width: 0; }
}

/* ============================================================
   健康管家 页面
   ============================================================ */
.health-dashboard { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.hd-card { background: var(--surface); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.hd-num { font-family: var(--font-title); font-size: 28px; font-weight: 800; }
.hd-label { font-size: 13px; color: var(--muted); }
.hd-overdue .hd-num { color: var(--peach-d); }
.hd-due .hd-num { color: #9A7B0F; }
.hd-total .hd-num { color: var(--primary-d); }
.hd-pets .hd-num { color: var(--ink); }
.pet-tabs { margin-bottom: 18px; }
.tab-age { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.health-pet-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.health-pet-head h3 { font-family: var(--font-title); font-size: 22px; }
.health-pet-head .muted { font-size: 13px; color: var(--muted); margin-top: 4px; }

.health-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.health-task { display: flex; gap: 14px; align-items: center; background: var(--surface); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow); border: 1px solid var(--line); border-left: 5px solid var(--line); transition: transform .2s, box-shadow .2s; }
.health-task:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.health-task.st-overdue { border-left-color: var(--peach-d); background: linear-gradient(90deg, #FFF5F2, var(--surface) 12%); }
.health-task.st-due { border-left-color: #E0A800; }
.health-task.st-upcoming { border-left-color: var(--primary); }
.ht-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: linear-gradient(135deg, var(--mint-2), var(--cream-2)); flex-shrink: 0; }
.ht-main { flex: 1; min-width: 0; }
.ht-head { display: flex; align-items: center; gap: 10px; }
.ht-head h4 { font-size: 16px; font-weight: 700; }
.ht-badge { font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: var(--r-pill); }
.ht-badge.st-overdue { background: #FFE3DF; color: var(--peach-d); }
.ht-badge.st-due { background: var(--yellow); color: #9A7B0F; }
.ht-badge.st-upcoming { background: var(--mint); color: var(--primary-d); }
.ht-desc { font-size: 13px; color: var(--muted); margin: 4px 0; }
.ht-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--ink-soft); }
.ht-due { font-weight: 700; }
.health-task.st-overdue .ht-due { color: var(--peach-d); }
.ht-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.btn-sm { padding: 7px 14px; font-size: 12.5px; white-space: nowrap; }
.ht-del { width: 28px; height: 28px; border-radius: 50%; color: var(--muted); margin: 0 auto; transition: all .2s; }
.ht-del:hover { background: #FFE3DF; color: var(--peach-d); }

.health-add { background: var(--surface); border-radius: var(--r-lg); padding: 20px 22px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.health-add h4 { font-family: var(--font-title); font-size: 16px; margin-bottom: 12px; }
.health-add-form { display: flex; gap: 10px; flex-wrap: wrap; }
.health-add-form input { padding: 10px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); font-size: 14px; outline: none; transition: border-color .2s; }
.health-add-form input[type="text"] { flex: 1; min-width: 180px; }
.health-add-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(127,200,169,.18); }

@media (max-width: 720px) {
  .health-dashboard { grid-template-columns: 1fr 1fr; }
  .health-task { flex-wrap: wrap; }
  .ht-actions { flex-direction: row; width: 100%; justify-content: flex-end; }
}

/* ============ 更多按钮 ============ */
.more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}
.btn-more {
  padding: 14px 36px;
  font-size: 15px;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, #fff, var(--cream-2));
  border: 2px dashed var(--primary);
  color: var(--primary-d);
  transition: all .2s ease;
  animation: more-pulse 2.2s ease-in-out infinite;
}
.btn-more:hover {
  transform: translateY(-3px);
  background: linear-gradient(135deg, var(--mint), #fff);
  color: var(--primary-d);
  border-style: solid;
  animation: none;
  box-shadow: 0 8px 20px rgba(127,200,169,.3);
}
.more-count {
  color: var(--peach-d);
  font-weight: 700;
  font-size: 13px;
}
@keyframes more-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(127,200,169,.35); }
  50%     { box-shadow: 0 0 0 10px rgba(127,200,169,0); }
}

/* ============ 趣味互动动画 · Q版动物打招呼 ============ */
#funAnimStage {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  overflow: hidden;
}
.fa-animal {
  position: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
  animation-name: fa-pop-in;
  animation-duration: var(--fa-dur, 3000ms);
  animation-timing-function: ease;
  animation-fill-mode: both;
  transform-origin: center bottom;
}
.fa-pop-in {
  animation-name: fa-pop-in;
}
.fa-bounce .fa-emoji {
  animation: fa-jump .8s ease-in-out infinite;
  animation-delay: .6s;
}
.fa-bubble {
  background: linear-gradient(135deg, #fff, #FFF5EC);
  padding: 8px 14px;
  border-radius: 18px;
  border: 2px solid var(--peach);
  box-shadow: 0 4px 14px rgba(255,181,167,.35), 0 0 0 4px rgba(255,211,222,.3);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  position: relative;
  max-width: 260px;
}
.fa-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 8px solid var(--peach);
  filter: drop-shadow(0 2px 0 #fff);
}
.fa-text {
  display: inline-block;
  background: linear-gradient(90deg, #B03A5B, #B5651D);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.fa-emoji {
  font-size: 44px;
  line-height: 1;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.1));
}

@keyframes fa-pop-in {
  0%   { opacity: 0; transform: translateY(40px) scale(.4) rotate(-8deg); }
  18%  { opacity: 1; transform: translateY(-6px) scale(1.08) rotate(3deg); }
  28%  { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
  80%  { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
  100% { opacity: 0; transform: translateY(-30px) scale(.85); }
}
@keyframes fa-jump {
  0%, 100% { transform: translateY(0); }
  30%      { transform: translateY(-10px) rotate(-4deg); }
  60%      { transform: translateY(-2px) rotate(2deg); }
}

@media (max-width: 720px) {
  .fa-bubble { padding: 6px 10px; font-size: 12px; max-width: 200px; }
  .fa-emoji { font-size: 36px; }
}
