/* ==========================================================================
   毛孩子 · app.css
   世界：毛绒绒的纸本。奶油纸、暖陶土、鼠尾草作第二音、黄油作高光。
   规矩：
   1. 颜色只从 token 取，不再在规则里写死十六进制。
   2. 强调色只给主操作、当前选中、状态指示，不做装饰。
   3. 阴影一定带 y 偏移和暖色调；零偏移的彩色光晕不算阴影。
   4. 动效只表达状态变化，150–250ms，指数 ease-out。
   5. 所有文字与底色对比度 ≥ 4.5:1（大字 ≥ 3:1）。
   ========================================================================== */

:root {
  /* ---- 纸与墨 ---- */
  --paper: #FBF6EC;
  --paper-2: #F4EADA;
  --card: #FFFDF9;
  --card-2: #FFF8EE;
  --ivory: #FEF8ED;          /* 插画底色，和生成图对齐，接缝看不见 */
  --ink: #32261C;            /* 13.6:1 on paper */
  --ink-2: #6F5E4F;          /* 5.8:1 on paper */
  --ink-3: #7C6A59;          /* 4.8:1 on paper，只用在 12px 以上 */
  --line: #EADBC7;
  --line-soft: #F2E7D7;

  /* ---- 主色：暖陶土（能承载奶油白字） ---- */
  --brand: #B84A1B;          /* 奶油字 4.91:1 */
  --brand-press: #A03D12;
  --brand-ink: #9E3D10;      /* on brand-soft 5.59:1 */
  --brand-soft: #FBE7D6;
  --brand-tint: #FDF2E8;

  /* ---- 第二音：鼠尾草 + 黄油 ---- */
  --sage: #2F6B4F;
  --sage-soft: #E7F0E7;
  --butter: #F6D6A8;
  --butter-soft: #FBF0DC;
  --butter-ink: #6F5228;

  /* ---- 状态 ---- */
  --ok: #2F6B4F;
  --err: #B23B2C;
  --err-soft: #FBE6E2;
  --err-ink: #A33325;
  --err-line: #E4B6A9;   /* 危险操作的虚线与描边 */
  --err-tint: #FFF8F6;   /* 危险操作的浅底 */

  /* ---- 形状 ---- */
  --r-xs: 10px;
  --r-sm: 13px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 26px;
  --r-pill: 999px;

  /* ---- 影子：带偏移的暖调软影 ---- */
  --sh-1: 0 1px 2px rgba(80, 55, 35, .06);
  --sh-2: 0 1px 2px rgba(80, 55, 35, .05), 0 10px 22px -16px rgba(80, 55, 35, .40);
  --sh-3: 0 14px 34px -18px rgba(80, 55, 35, .45);
  --sh-brand-1: 0 2px 6px -2px rgba(126, 51, 18, .45);   /* 用户气泡贴着纸 */
  --sh-brand-2: 0 2px 4px rgba(126, 51, 18, .18), 0 12px 22px -16px rgba(126, 51, 18, .7);
  --sh-brand-3: 0 1px 2px rgba(126, 51, 18, .2);        /* 主按钮按下 */
  --sh-desk: 0 40px 90px -60px rgba(80, 55, 35, .55);     /* 桌面视图里手机栏投影 */

  /* ---- 节奏 ---- */
  --ease: cubic-bezier(.2, .8, .25, 1);
  --t-fast: 140ms;
  --t: 190ms;
  --tab-h: 62px;
  --composer-h: 64px;

  color-scheme: light;
}

/* ==========================================================================
   1. 底子
   ========================================================================== */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* 纸的颗粒：内联 SVG，不额外发请求。200px 平铺，接缝看不出来 */
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  background-attachment: fixed;
  caret-color: var(--brand);
  overflow-x: clip;          /* 用 clip 不用 hidden：hidden 会让 body 变成滚动容器，粘不住顶栏 */
}

/* 排版阶：固定 rem，不随视口伸缩。h1 只用于页面标题 */
h1, h2, h3 { margin: 0; font-weight: 700; color: var(--ink); }
h1 { font-size: 27px; line-height: 1.25; letter-spacing: -.02em; }
h2 { font-size: 19px; line-height: 1.35; letter-spacing: -.01em; }
h3 { font-size: 16px; line-height: 1.45; }

/* 浏览器自己的那几张脸，也得上调色板 */
::selection { background: #F7DCC0; color: var(--ink); }
::placeholder { color: var(--ink-2); opacity: 1; }

* { scrollbar-width: thin; scrollbar-color: #DDCBB4 transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #DDCBB4; border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

a, button, [tabindex] { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }

:target { scroll-margin-top: 64px; }

/* ==========================================================================
   2. 外壳：顶栏 / 主区 / 底部 tab / 输入条
   ========================================================================== */

.app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 560px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.main {
  flex: 1;
  padding: 4px 16px calc(var(--tab-h) + var(--composer-h) + 18px + env(safe-area-inset-bottom));
  overflow-anchor: none;
}

/* 顶栏收成工具条，把高度让给内容；底下滚过去的字要虚化掉，这是功能不是装饰 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 16px;
  background: rgba(251, 246, 236, .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.pet-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  max-width: 45%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.pet-chip .ava {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: var(--brand-tint);
  display: grid;
  place-items: center;
  font-size: 15px;
  flex: none;
  box-shadow: inset 0 0 0 1px var(--line-soft);
}

.top-right { display: flex; align-items: center; gap: 8px; }

.balance {
  font-size: 12px;
  line-height: 1;
  color: var(--ink-2);
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 7px 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.balance b {
  color: var(--brand-ink);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

/* 只作用于顶栏头像，别让 .me 这个光杆类名把聊天气泡也压成 28px 的圆 */
.top-right .me {
  --uava-sz: 30px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--ink-2);
  display: grid;
  place-items: center;
  font-size: 12px;
  text-decoration: none;
}

/* 用户头像：默认是昵称第一个字，游客就是「游客」两个字。
   字随字数缩，一格的永远不出圈，两格的也不挤。 */
.uava {
  overflow: hidden;
  line-height: 1;
  text-align: center;
  font-weight: 600;
  flex: none;
}
.uava[data-len="1"] { font-size: calc(var(--uava-sz, 30px) * .46); }
.uava[data-len="2"] { font-size: calc(var(--uava-sz, 30px) * .33); letter-spacing: -.02em; }
.uava[data-len="3"],
.uava[data-len="4"] { font-size: calc(var(--uava-sz, 30px) * .25); }
.uava.is-emoji { font-size: calc(var(--uava-sz, 30px) * .62); }
.uava.has-img { padding: 0; background: var(--paper-2); }
.uava img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }

.top-right .bell {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px solid var(--line);
}
.top-right .bell svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- 底部 tab ---- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(251, 246, 236, .94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line-soft);
  max-width: 560px;
  margin: 0 auto;
}
.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  color: var(--ink-3);
  font-size: 11px;
  letter-spacing: .02em;
  padding: 6px 0;
  transition: color var(--t) var(--ease);
}
.tabbar a svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  padding: 4px 8px;
  box-sizing: content-box;
  border-radius: var(--r-pill);
  transition: background var(--t) var(--ease), transform var(--t) var(--ease);
}
.tabbar a.on { color: var(--brand-ink); font-weight: 600; }
.tabbar a.on svg { stroke-width: 2; background: var(--brand-soft); }
.tabbar a:active svg { transform: scale(.92); }

/* ==========================================================================
   3. 对话
   ========================================================================== */

.chat {
  padding: 8px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* flex 列里子项默认 flex-shrink:1，内容一多就会被压扁、文字只剩半行 */
.chat > * { flex: 0 0 auto; }

.bubble {
  max-width: 84%;
  padding: 11px 14px;
  border-radius: var(--r-md);
  font-size: 15.5px;
  line-height: 1.65;
  word-break: break-word;
  white-space: pre-wrap;
  position: relative;
}
.bubble.ai {
  align-self: flex-start;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line-soft);
  border-bottom-left-radius: 6px;
  box-shadow: var(--sh-1);
}
.bubble.me {
  align-self: flex-end;
  background: var(--brand);
  color: #FFF7EE;
  border-bottom-right-radius: 6px;
  box-shadow: var(--sh-brand-1);
}
.bubble.typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 15px 15px;
}
.bubble.typing .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-3);
  animation: dot-pulse 1.15s var(--ease) infinite;
}
.bubble.typing .dot:nth-child(2) { animation-delay: .14s; }
.bubble.typing .dot:nth-child(3) { animation-delay: .28s; }
@keyframes dot-pulse {
  0%, 60%, 100% { opacity: .32; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

/* 新消息落进来：一个有编排感的瞬间，别处不再重复 */
.bub-in { animation: plush-in 260ms var(--ease) both; }
.chat.bulk .bub-in { animation: none; }   /* 一次性重画历史时不放动画 */

/* 气泡里的图：小方图，点开看大图 */
.bubimgs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.bubimgs a { display: block; line-height: 0; }
.bubimgs img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: var(--r-xs);
  display: block;
  background: var(--paper-2);
}
.bubimg { position: relative; display: inline-block; line-height: 0; }
.bubimg-x {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: rgba(50, 38, 28, .78);
  color: #fff;
  font-size: 12px;
  line-height: 20px;
  padding: 0;
  cursor: pointer;
}
.bubimg-x:hover { background: rgba(50, 38, 28, .95); }

/* 待发送图片条：占满一行，靠 .composer 的 flex-wrap 换到输入框上面 */
.attach {
  flex: 1 0 100%;
  display: flex;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  padding: 2px 0 8px;
}
.attach[hidden] { display: none !important; }
.thumb {
  position: relative;
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
  border-radius: var(--r-xs);
  background-color: var(--paper-2);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
}
.thumb-x {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  padding: 0;
  line-height: 19px;
  background: rgba(50, 38, 28, .82);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

/* ---- 生成卡（对话里那张） ---- */
.gen-card {
  align-self: flex-start;
  width: 88%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px;
  box-shadow: var(--sh-2);
}
.gen-card .chips { margin-bottom: 10px; }
.gc-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.gc-sub { font-size: 13px; color: var(--ink-2); margin-bottom: 12px; line-height: 1.55; }
.gc-btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: var(--r-sm);
  background: var(--brand);
  color: #FFF7EE;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.gc-btn:active { background: var(--brand-press); transform: scale(.97); }
.gc-btn.ghost-btn {
  background: var(--card);
  color: var(--brand-ink);
  border: 1px solid var(--brand-soft);
  margin-left: 8px;
}
.gc-note { font-size: 13px; color: var(--ink-2); margin-top: 8px; min-height: 18px; }

/* ---- 首访空态：教人怎么开口，说过一句就消失 ---- */
.chat-welcome {
  align-self: center;
  width: 100%;
  max-width: 360px;
  padding: 6px 0 10px;
  text-align: center;
}
.cw-art {
  display: block;
  width: 168px;
  height: 168px;
  margin: 0 auto 12px;
  border-radius: var(--r-xl);
  background: var(--ivory);
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line-soft), var(--sh-1);
}
.cw-hi { margin: 0 0 3px; font-size: 15px; font-weight: 700; color: var(--ink); }
.cw-sub { margin: 0 0 12px; font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.cw-chips { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; }
.cw-chip {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--brand-ink);
  font: inherit;
  font-size: 13px;
  padding: 8px 13px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.cw-chip:active { background: var(--brand-soft); transform: scale(.97); }

/* ---- 更早的对话 / 清空 ---- */
.older { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 2px 0 6px; }
.older > button, .chat-tools .reset {
  border: 0;
  background: none;
  color: var(--ink-3);
  font: inherit;
  font-size: 12.5px;
  padding: 6px 10px;
  border-radius: var(--r-pill);
  cursor: pointer;
}
.chat-tools { display: flex; justify-content: center; padding: 2px 0 4px; }
.chat-tools .reset:hover, .older > button:hover { background: var(--paper-2); color: var(--brand-ink); }
.chat-tools .reset.armed { color: var(--err-ink); background: var(--err-soft); font-weight: 600; }

/* ---- 气泡下的记录标注 ---- */
.note-tag {
  max-width: 84%;
  margin: -2px 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.5;
}
.note-tag.ai { align-self: flex-start; padding-left: 8px; }
.note-tag.me { align-self: flex-end; padding-right: 8px; }
.note-lines { display: flex; flex-direction: column; gap: 2px; }
.note-line { font-size: 12px; color: var(--ink-3); line-height: 1.45; }
.note-tag .note-x {
  border: 0;
  background: none;
  color: var(--brand-ink);
  font-size: 12px;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: .25em;
  white-space: nowrap;
  cursor: pointer;
}
.note-tag.off { color: var(--ink-3); opacity: .75; }

/* ==========================================================================
   4. 输入条 + 浮层
   ========================================================================== */

.composer {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 31;
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 8px 14px 10px;
  background: rgba(251, 246, 236, .94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line-soft);
}
.composer input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 0 16px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  background: var(--card);
  color: var(--ink);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.composer input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(184, 74, 27, .14);
}

.plus, .send {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.plus { background: var(--paper-2); color: var(--ink-2); font-size: 20px; }
.plus:active { transform: scale(.92); background: var(--line); }
.send { background: var(--brand); color: #FFF7EE; font-weight: 600; }
.send .paw { width: 23px; height: 23px; fill: currentColor; display: block; }
.send:active { transform: scale(.92); background: var(--brand-press); }
.send:active .paw { transform: translateY(-1px); }
.send:disabled { background: var(--paper-2); color: var(--ink-3); cursor: default; transform: none; }

/* 底部浮层 */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(46, 32, 22, .38);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade-in 180ms var(--ease);
}
.sheet-in {
  width: 100%;
  max-width: 560px;
  background: var(--card);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 10px 16px calc(20px + env(safe-area-inset-bottom));
  animation: sheet-up 240ms var(--ease);
}
.sheet-item {
  display: block;
  width: 100%;
  text-align: center;
  padding: 15px;
  margin-top: 8px;
  border-radius: var(--r-sm);
  background: var(--paper-2);
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  font-family: inherit;
  border: 0;
  cursor: pointer;
}
.sheet-item:active { background: var(--line); }
.sheet-item.ghost { background: var(--card); color: var(--ink-2); border: 1px solid var(--line); }
.sheet-title { text-align: center; padding: 4px 0 10px; color: var(--ink-3); font-size: 12.5px; }

/* 提醒抽屉：模板用的是 .sheet-inner（生成入口浮层用的 .sheet-in 是另一个类） */
.sheet-inner {
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--card);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 10px 16px calc(20px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  animation: sheet-up 240ms var(--ease);
}
.sheet-inner label { display: block; font-size: 12.5px; color: var(--ink-2); margin: 10px 0 5px; }
.sheet-inner input, .sheet-inner select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
}
.sheet-inner input:focus, .sheet-inner select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(184, 74, 27, .14);
}
.sheet-actions { display: flex; gap: 10px; margin-top: 14px; }
.sheet-actions button {
  flex: 1;
  padding: 12px 0;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-family: inherit;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
}
.sheet-actions .btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #FFF7EE;
  font-weight: 600;
  margin-top: 0;
}
.sheet-msg { min-height: 16px; padding: 2px 2px 0; font-size: 12px; color: var(--err-ink); }

/* 修：.sheet 的 display:flex 会盖掉 [hidden]，导致浮层开局就盖住整页 */
.sheet[hidden] { display: none !important; }
/* hidden 一定要压得住 display:flex/grid —— 全局兜底 */
[hidden] { display: none !important; }

/* ==========================================================================
   5. 通用件：页头 / 卡片 / 按钮 / 表单 / 空态
   ========================================================================== */

.page-head { display: flex; align-items: center; gap: 10px; padding: 6px 0 14px; }
.page-head h2 { margin: 0; font-size: 19px; font-weight: 700; flex: 1; letter-spacing: -.01em; }
.back {
  display: inline-block;
  border: 0;
  padding: 0;
  margin: 0;
  background: none;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-2);
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--r-xs);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--sh-2);
}

.row-between { display: flex; align-items: center; justify-content: space-between; }
.mt { margin-top: 14px; }

.btn-primary {
  display: block;
  width: 100%;
  margin-top: 20px;
  border: 0;
  border-radius: var(--r-md);
  padding: 15px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  color: #FFF7EE;
  background: var(--brand);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  box-shadow: var(--sh-brand-2);
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.btn-primary:active:not(:disabled) {
  background: var(--brand-press);
  transform: translateY(1px) scale(.995);
  box-shadow: var(--sh-brand-3);
}
.btn-primary:disabled {
  background: var(--paper-2);
  color: var(--ink-3);
  box-shadow: none;
  cursor: default;
}
a.btn-primary:visited { color: #FFF7EE; }
.btn-primary.narrow { width: auto; padding: 11px 24px; display: inline-block; font-size: 15px; }

.btn-ghost {
  display: block;
  width: 100%;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 13px;
  background: var(--card);
  color: var(--ink-2);
  font-size: 15px;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn-ghost:active { transform: scale(.99); background: var(--paper-2); }
.btn-ghost.danger { color: var(--err-ink); border-color: var(--err-line); background: var(--err-tint); margin-top: 10px; }

.btn-mini {
  border: 0;
  background: var(--brand-tint);
  color: var(--brand-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.btn-mini:active { background: var(--brand-soft); }

.mini-btn {
  font-size: 13px;
  padding: 8px 13px;
  border-radius: var(--r-pill);
  background: var(--brand-tint);
  color: var(--brand-ink);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.badge-local {
  font-size: 11px;
  color: var(--ink-3);
  background: var(--paper-2);
  padding: 4px 9px;
  border-radius: var(--r-pill);
}

/* ---- 表单 ---- */
.field { margin-top: 16px; }
.field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.field label i { color: var(--brand-ink); font-style: normal; }

.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--card);
  padding: 13px 14px;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  outline: none;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.field textarea { resize: vertical; font-size: 15px; }
/* 生日与「大概年龄」二选一：并排一行，别让两个时间字段上下堆着 */
.age-row { display: flex; gap: 8px; align-items: stretch; }
.age-row input { flex: 1 1 auto; min-width: 0; }
.age-row select { flex: 0 0 104px; width: 104px; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(184, 74, 27, .14);
}
.hint { display: block; margin: 6px 0 0; font-size: 12px; color: var(--ink-3); line-height: 1.45; }
.fine { margin: 12px 0 0; font-size: 12px; color: var(--ink-3); line-height: 1.65; }

/* ---- 选择片 ---- */
.chips { display: flex; gap: 8px; margin: 4px 0 6px; flex-wrap: wrap; }
.chip {
  flex: 1;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--r-sm);
  padding: 11px 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink-2);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.chip:active { transform: scale(.98); }
.chip.active, .chips .chip.on {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-weight: 600;
}
.chips .chip { padding: 7px 14px; border-radius: var(--r-pill); font-size: 13px; }

/* ---- 提示条 ---- */
.msg {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--brand-tint);
  color: var(--brand-ink);
  font-size: 14px;
  line-height: 1.55;
}
.msg.err { background: var(--err-soft); color: var(--err-ink); }
.msg-link { color: var(--brand-ink); font-weight: 600; text-decoration: underline; text-underline-offset: .22em; }

/* ---- 空态 ---- */
.empty { text-align: center; padding: 26px 16px 40px; color: var(--ink-2); }
.empty-art {
  display: block;
  width: 190px;
  height: 190px;
  margin: 0 auto 16px;
  border-radius: var(--r-xl);
  background: var(--ivory);
  box-shadow: 0 0 0 1px var(--line-soft), var(--sh-2);
  object-fit: cover;
}
.empty-ico { font-size: 40px; margin-bottom: 10px; opacity: .5; }
.empty b { display: block; font-size: 15px; color: var(--ink); margin-bottom: 6px; }
.empty p { margin: 0 0 20px; font-size: 13.5px; line-height: 1.75; }
.empty .btn-primary { max-width: 240px; margin: 0 auto; }

/* 「还没开放」的整页说明：和空态同一套骨架，但标题大一号 */
.soon { text-align: center; padding: 6px 0 4px; }
.soon .empty-art { width: 200px; height: 200px; margin-bottom: 18px; }
.soon b { display: block; font-size: 19px; line-height: 1.4; color: var(--ink); margin-bottom: 8px; letter-spacing: -.01em; }
.soon p { margin: 0 auto 22px; max-width: 22em; font-size: 14px; line-height: 1.75; color: var(--ink-2); }
.soon .btn-primary { max-width: 240px; margin: 0 auto; }

/* ==========================================================================
   6. 作品 / 任务
   ========================================================================== */

.works { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.work { text-decoration: none; color: var(--ink); display: block; }
.work .cover {
  aspect-ratio: 1;
  border-radius: var(--r-md);
  background: var(--paper-2);
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 7px;
  box-shadow: inset 0 0 0 1px rgba(234, 219, 199, .8);
}
.work .cover img { width: 100%; height: 100%; object-fit: cover; }
.work .ph { font-size: 12px; color: var(--ink-3); }
.work .wt { font-size: 13px; font-weight: 600; }
.work .ws { font-size: 12px; color: var(--ink-3); margin-top: 1px; }

.work-wrap { position: relative; }
.work-del {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  width: 26px;
  height: 26px;
  padding: 0;
  line-height: 24px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: rgba(50, 38, 28, .45);
  color: #fff;
  font-size: 15px;
}
.work-del.armed { width: auto; padding: 0 9px; border-radius: var(--r-sm); background: var(--err); font-size: 12px; }
.work-err {
  position: absolute;
  right: 6px;
  top: 36px;
  background: var(--err-soft);
  color: var(--err-ink);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: var(--r-xs);
}

.more {
  display: block;
  margin: 16px auto 6px;
  padding: 11px 0;
  text-align: center;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 14px;
  text-decoration: none;
  background: var(--card);
}
.more:active { background: var(--paper-2); }

/* ---- 任务页 ---- */
.job { margin-top: 8px; }
.status { font-size: 19px; font-weight: 700; margin-bottom: 14px; letter-spacing: -.01em; }
.status.ok { color: var(--ok); }
.status.err { color: var(--err); }

.bar {
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--paper-2);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--brand);
  transition: width 380ms var(--ease);
}

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
.grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--paper-2);
  border-radius: var(--r-md);
}

/* ==========================================================================
   7. 档案
   ========================================================================== */

.pets-empty { padding: 26px 0 40px; text-align: center; color: var(--ink-2); font-size: 14px; }
.pets-empty b { display: block; font-size: 17px; color: var(--ink); margin-bottom: 6px; }
.pets-empty p { margin: 0 0 16px; }

.pet-list { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.pet-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--sh-1);
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease);
}
.pet-card.on { border-color: var(--brand); background: var(--brand-tint); }
.pc-ava {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: var(--r-sm);
  background: var(--paper-2);
  display: grid;
  place-items: center;
  font-size: 24px;
}
.pc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pc-main b { font-size: 15.5px; font-weight: 600; color: var(--ink); }
.pc-main i {
  font-style: normal;
  font-size: 12.5px;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pc-arrow { color: var(--ink-3); font-size: 20px; line-height: 1; transition: transform var(--t) var(--ease); }

.pet-detail .avatar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ava-pick {
  width: 56px;
  height: 56px;
  border-radius: var(--r-md);
  border: 1px dashed var(--line);
  background: var(--card-2);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.pet-item { margin-bottom: 10px; }
.pet-item.open .pet-card { border-color: var(--brand); }
.pet-item.open .pc-arrow { transform: rotate(180deg); }

.pet-tabs { display: flex; gap: 8px; padding: 10px 4px 0; }
.ptab {
  flex: 1;
  padding: 9px 0;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  font-size: 13.5px;
  font-family: inherit;
  transition: background var(--t-fast) var(--ease);
}
.ptab.on { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); font-weight: 600; }

.pet-panel {
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--line);
}
.panel-empty { color: var(--ink-3); font-size: 13px; line-height: 1.7; }

.log-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 13.5px;
}
.log-row:last-child { border-bottom: 0; }
.log-t { color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 42px; }
.log-k { color: var(--ink-2); }
.log-v { color: var(--ink); font-weight: 600; margin-left: auto; }

.kv { display: flex; gap: 12px; padding: 6px 0; font-size: 13.5px; }
.kv-k { color: var(--ink-3); min-width: 72px; }
.kv-v { color: var(--ink); flex: 1; }

.panel-edit {
  margin-top: 12px;
  width: 100%;
  padding: 10px 0;
  border-radius: var(--r-sm);
  border: 1px solid var(--brand);
  background: var(--brand-tint);
  color: var(--brand-ink);
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
}

/* ---- 记忆条目 ---- */
.mem-bar { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.mem-add {
  border: 0;
  background: var(--brand-tint);
  color: var(--brand-ink);
  font-size: 12.5px;
  font-family: inherit;
  padding: 7px 12px;
  border-radius: var(--r-pill);
}
.mem-editor { display: flex; gap: 6px; margin-bottom: 8px; }
.mem-editor input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  padding: 9px 10px;
  font-size: 13px;
  font-family: inherit;
  background: var(--card);
}
.mem-ok { border: 0; background: var(--brand); color: #FFF7EE; border-radius: var(--r-xs); padding: 0 14px; font-family: inherit; }
.mem-cancel { border: 0; background: var(--paper-2); color: var(--ink-2); border-radius: var(--r-xs); padding: 0 12px; font-family: inherit; }

.mem-day { margin: 14px 0 4px; color: var(--ink-3); font-size: 12px; letter-spacing: .02em; }
.mem-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 13.5px;
}
.mem-row:last-child { border-bottom: 0; }
.mem-t { color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 40px; }
.mem-x { flex: 1; color: var(--ink); line-height: 1.55; }
.mem-del { border: 0; background: transparent; color: var(--ink-3); font-size: 16px; padding: 0 2px; cursor: pointer; }

/* 类型标签：统一中性底 + 一个彩色圆点，颜色只做分类不抢注意力 */
.mem-k {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 2px 8px 2px 6px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  background: var(--paper-2);
  color: var(--ink-2);
  line-height: 1.5;
}
.mem-k::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dot, var(--ink-3));
  flex: none;
}
.mem-k.k-eat   { --dot: #C25B2C; }
.mem-k.k-water { --dot: #3C77A8; }
.mem-k.k-poo   { --dot: #8B7550; }
.mem-k.k-file  { --dot: #6D5BB8; }
.mem-k.k-weight{ --dot: #4D8A5B; }
.mem-k.k-move  { --dot: #2F6FB3; }
.mem-k.k-pee   { --dot: #A3771B; }
.mem-k.k-sleep { --dot: #5B4BA8; }
.mem-k.k-wash  { --dot: #1F7F6C; }
.mem-k.k-habit { --dot: #4A7C33; }
/* 异常是唯一有语气的一档：它需要被一眼看见 */
.mem-k.k-sick  { background: var(--err-soft); color: var(--err-ink); --dot: var(--err); }

/* ---- 体重趋势 ---- */
.wchart { margin: 4px 0 10px; padding: 12px; border-radius: var(--r-md); background: var(--card-2); border: 1px solid var(--line-soft); }
.wchart-head { display: flex; align-items: baseline; gap: 8px; }
.wchart-head b { font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }
.wchart-head span { font-size: 12px; color: var(--ink-3); }
.wsvg { width: 100%; height: 78px; margin-top: 6px; display: block; }
.wchart-foot { font-size: 11.5px; color: var(--ink-3); text-align: right; }

/* ---- 急救 ---- */
.er-wrap { padding: 0 2px 10px; }
.er-btn {
  width: 100%;
  padding: 10px 0;
  border-radius: var(--r-sm);
  border: 1px dashed var(--err-line);
  background: var(--err-tint);
  color: var(--err-ink);
  font-size: 13.5px;
  font-family: inherit;
}
.er-btn span { font-size: 14px; }
.er-mask {
  position: fixed;
  inset: 0;
  background: rgba(46, 32, 22, .45);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fade-in 180ms var(--ease);
}
.er-card {
  width: 100%;
  max-width: 420px;
  max-height: 84vh;
  overflow: auto;
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 16px 16px 14px;
  box-shadow: var(--sh-3);
  animation: sheet-up 220ms var(--ease);
}
.er-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.er-head b { font-size: 15.5px; }
.er-close { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--ink-3); cursor: pointer; }
.er-body {
  margin: 0;
  padding: 12px 13px;
  background: var(--card-2);
  border-radius: var(--r-sm);
  border: 1px solid var(--line-soft);
  font: 13.5px/1.8 inherit;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}
.er-links { display: flex; gap: 8px; margin-top: 10px; }
.er-link {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  border-radius: var(--r-sm);
  border: 1px solid var(--err-line);
  color: var(--err-ink);
  font-size: 13.5px;
  background: var(--card);
  text-decoration: none;
}
.er-card .wide { width: 100%; margin-top: 10px; }

.er-inline { padding: 2px 2px 0; }
.er-rows { display: flex; flex-direction: column; }
.er-row { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line-soft); font-size: 13.5px; }
.er-row:last-child { border-bottom: 0; }
.er-k { color: var(--ink-3); width: 76px; flex: 0 0 76px; }
.er-v { color: var(--ink); flex: 1; word-break: break-word; }
.er-actions { display: flex; gap: 8px; margin: 10px 0 8px; }
.er-actions .er-link { flex: 1; padding: 10px 0; border-radius: var(--r-sm); border: 1px solid var(--err-line); color: var(--err-ink); text-align: center; font-size: 13.5px; }
.er-copy { margin-top: 2px; }

/* ==========================================================================
   8. 提醒
   ========================================================================== */

.tip-line { margin: 2px 0 14px; font-size: 12.5px; color: var(--ink-3); line-height: 1.6; }
.rem-sec { margin-bottom: 18px; }
.rem-h { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.rem-h h3 { font-size: 15px; margin: 0; font-weight: 700; }
.rem-count { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.rem-list { display: flex; flex-direction: column; gap: 8px; }
.rem-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
}
.rem-tick {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid #DCC9B2;
  background: var(--card);
  color: var(--brand-ink);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.rem-row.done .rem-main { opacity: .5; text-decoration: line-through; }
.rem-row.done .rem-tick { background: var(--sage); border-color: var(--sage); color: #fff; }
.rem-main { flex: 1; min-width: 0; }
.rem-title { font-size: 14.5px; display: flex; align-items: center; gap: 6px; }
.rem-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.rem-del { border: 0; background: none; color: var(--ink-3); font-size: 18px; line-height: 1; padding: 0 2px; cursor: pointer; }
.rem-ava {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  overflow: hidden;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.rem-ava img { width: 100%; height: 100%; object-fit: cover; }

.rem-empty {
  font-size: 13px;
  color: var(--ink-3);
  padding: 12px;
  background: var(--card-2);
  border: 1px dashed var(--line);
  border-radius: var(--r-sm);
}
.rem-add, .rem-ics {
  width: 100%;
  margin-top: 10px;
  padding: 13px 0;
  border-radius: var(--r-md);
  font-size: 15px;
  font-family: inherit;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
}
.rem-add { background: var(--brand); border-color: var(--brand); color: #FFF7EE; font-weight: 600; }

.seg { display: flex; gap: 8px; margin-bottom: 10px; }
.seg-b {
  flex: 1;
  padding: 10px 0;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  font-size: 14px;
  font-family: inherit;
}
.seg-b.on { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); font-weight: 600; }

/* ==========================================================================
   9. 账号 / 登录
   ========================================================================== */

.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.btn-code {
  flex: 0 0 104px;
  border-radius: var(--r-sm);
  border: 1px solid var(--brand-soft);
  background: var(--brand-tint);
  color: var(--brand-ink);
  font-size: 13.5px;
  font-family: inherit;
}
.btn-code:disabled { color: var(--ink-3); border-color: var(--line); background: var(--paper-2); }

.auth-wrap { padding: 6px 20px 28px; }
.auth-art {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 18px;
  border-radius: var(--r-lg);
  background: var(--ivory);
  box-shadow: 0 0 0 1px var(--line-soft), var(--sh-2);
}
.auth-h1 { font-size: 26px; line-height: 1.3; margin: 6px 0 8px; letter-spacing: -.02em; font-weight: 700; }
.auth-sub { color: var(--ink-2); font-size: 13.5px; line-height: 1.65; margin: 0 0 20px; }
.auth-back { display: inline-block; color: var(--ink-3); font-size: 14px; text-decoration: none; padding: 8px 0; }
.seg-lg { margin-bottom: 18px; }

.inp-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 0 14px;
  height: 52px;
  margin-bottom: 12px;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.inp-wrap:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(184, 74, 27, .14); }
.inp-prefix { color: var(--ink-3); font-size: 15px; }
.inp {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  font-size: 16px;
  color: var(--ink);
  padding: 0;
}
.inp::placeholder { color: var(--ink-3); }
.inp-btn { flex: 0 0 auto; border: 0; background: none; color: var(--brand-ink); font-size: 13.5px; padding: 6px 0 6px 10px; font-family: inherit; }
.inp-btn:disabled { color: var(--ink-3); opacity: .7; }
.btn-lg { width: 100%; height: 50px; border-radius: var(--r-md); font-size: 16px; margin-top: 6px; }
.auth-links { display: flex; justify-content: space-between; margin: 16px 2px 0; }
.auth-links a { color: var(--brand-ink); font-size: 13.5px; text-decoration: none; }
.agree { margin: 22px 2px 0; font-size: 11.5px; color: var(--ink-3); line-height: 1.7; }

/* ---- 账号页的画廊式列表 ---- */
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tabs button {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
}
.tabs button.active { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); font-weight: 600; }

/* ==========================================================================
   10. 头像 / 顶部提示
   ========================================================================== */

.ava, .pc-ava, #ava { overflow: hidden; }
.ava img, .pc-ava img, #ava img, .petavatar-top img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ava-mask {
  position: fixed;
  inset: 0;
  background: rgba(46, 32, 22, .45);
  z-index: 70;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fade-in 180ms var(--ease);
}
.ava-card {
  width: 100%;
  max-width: 460px;
  background: var(--card);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 14px 16px calc(18px + env(safe-area-inset-bottom));
  animation: sheet-up 240ms var(--ease);
}
.ava-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ava-head b { font-size: 15px; }
.ava-close { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--ink-3); cursor: pointer; }
.ava-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.ava-e {
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 21px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ava-e.on { border-color: var(--brand); background: var(--brand-soft); }
.ava-up {
  display: block;
  margin-top: 12px;
  text-align: center;
  padding: 11px 0;
  border-radius: var(--r-sm);
  border: 1px dashed var(--err-line);
  background: var(--err-tint);
  color: var(--brand-ink);
  font-size: 14px;
}
/* 「用昵称首字」：跟上传并列的第二个选择，做成安静的次级按钮 */
.ava-reset {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 11px 0;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
}
.ava-reset:active { background: var(--paper-2); }

.toast {
  position: fixed;
  left: 50%;
  top: calc(env(safe-area-inset-top) + 60px);
  transform: translateX(-50%);
  z-index: 60;
  max-width: 86vw;
  padding: 11px 18px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: #FFF9F0;
  font-size: 13.5px;
  line-height: 1.45;
  box-shadow: var(--sh-3);
  animation: toast-in 240ms var(--ease);
}
.toast[hidden] { display: none !important; }

/* ==========================================================================
   11. 动效
   ========================================================================== */

@keyframes plush-in {
  from { opacity: 0; transform: translateY(6px) scale(.97); filter: blur(3px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes breathe {
  0%, 100% { opacity: .35; }
  50%      { opacity: 1; }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes sheet-up {
  from { transform: translateY(14px); opacity: .6; }
  to   { transform: none; opacity: 1; }
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(.97); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   12. 断点：窄屏收紧，宽屏把手机变成桌面上的一个专栏
   ========================================================================== */

@media (max-width: 380px) {
  .main { padding-left: 12px; padding-right: 12px; }
  .bubble { font-size: 15px; max-width: 88%; }
  .cw-art, .empty-art { width: 148px; height: 148px; }
  .auth-wrap { padding-left: 16px; padding-right: 16px; }
  .tabbar a { font-size: 11px; }
}

@media (min-width: 520px) {
  .works { grid-template-columns: repeat(3, 1fr); }
  .bubble { max-width: 76%; }
}

@media (min-width: 640px) {
  body { background-color: #F2E6D4; }
  .app {
    box-shadow: 0 0 0 1px var(--line), var(--sh-desk);
  }
  .composer, .tabbar { border-left: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); }
}

/* 桌面再放宽：560 的手机栏放在 1440 上太窄，两级各加一档；
   对话行宽单独限量，别让中文一行排到 50 字以上 */
@media (min-width: 960px) {
  .app, .tabbar, .composer { max-width: 760px; }
  .main { padding-left: 20px; padding-right: 20px; }
  .works { grid-template-columns: repeat(4, 1fr); }
  .bubble { max-width: 620px; }
  .chat-welcome { max-width: 420px; }
  .empty-art, .cw-art { width: 200px; height: 200px; }
}

@media (min-width: 1280px) {
  .app, .tabbar, .composer { max-width: 880px; }
  .bubble { max-width: 680px; }
}

@media (hover: hover) {
  .btn-primary:hover:not(:disabled) { background: var(--brand-press); }
  .btn-ghost:hover, .sheet-item:hover, .more:hover { background: var(--paper-2); }
  .pet-card:hover { border-color: var(--line); }
  .rem-tick:hover { border-color: var(--sage); }
  .tabbar a:hover { color: var(--ink-2); }
  .tabbar a.on:hover { color: var(--brand-ink); }
  .work:hover .cover { background: var(--line-soft); }
  .cw-chip:hover, .paw-chip:hover { background: var(--brand-tint); }
  .mem-k:hover { background: var(--line-soft); }
  .send:hover:not(:disabled) { background: var(--brand-press); }
}

/* 14. 手势：锁住下拉刷新与左右翻页，把横向滑动留给「聊 / 作品 / 档案」 */
html { overscroll-behavior: none; }
body { overscroll-behavior-y: contain; }
.main { touch-action: pan-y; }
.tabbar, .composer { touch-action: manipulation; }

/* 换页时一次横向推移；不支持的浏览器直接换，不报错 */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: page-out 180ms var(--ease) both; }
::view-transition-new(root) { animation: page-in 220ms var(--ease) both; }
@keyframes page-out { to { opacity: 0; transform: translateX(-5%); } }
@keyframes page-in { from { opacity: 0; transform: translateX(5%); } }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ---------- 首页「家」（2026-11-09 框架）---------- */
.home { display: flex; flex-direction: column; gap: 14px; }
.hero { padding: 18px 18px 16px; }
.hero-top { display: flex; align-items: center; gap: 12px; }
.hero-ava { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center;
  font-size: 34px; line-height: 1; background: var(--paper-2); flex: 0 0 auto; }
.hero-id { flex: 1; min-width: 0; }
.hero-id h2 { margin: 0; font-size: 21px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-id p { margin: 4px 0 0; color: var(--ink-2); font-size: 13.5px; }
.hero-edit { color: var(--ink-3); font-size: 13px; text-decoration: none; border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 4px 10px; flex: 0 0 auto; }
.hero-chips { margin: 14px 0 2px; }
/* 三枚 chip 在 390px 下会被挤成两行（「今天记了 1 / 笔」），文字不许断行，放不下就横滑 */
.hero-chips .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.hero-chips .chip { white-space: nowrap; flex: 0 0 auto; }
.hero-actions { display: flex; gap: 10px; margin-top: 12px; }
.hero-actions .btn-primary, .hero-actions .btn-ghost { flex: 1; text-align: center; }
.hero-pets { margin-top: 10px; }
.home-sec h3 { font-size: 15px; margin: 0; }
.home-more { font-size: 13px; color: var(--ink-3); text-decoration: none; }
.home-mem { padding: 4px 14px; }
.home-none { color: var(--ink-3); font-size: 13.5px; padding: 12px 0; line-height: 1.7; }
.home-rem { color: var(--ink-2); font-size: 13.5px; padding: 14px; }
/* 首页「今天」六格：两列小卡，值大字、说明小字；未上线的挂一枚「即将上线」角标 */
.ov-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ov {
  position: relative; display: flex; flex-direction: column; gap: 4px;
  padding: 12px 14px 11px; border-radius: var(--r-md, 16px);
  background: #fff; border: 1px solid var(--line, rgba(50, 38, 28, .08));
  box-shadow: 0 1px 2px rgba(50, 38, 28, .04); min-width: 0;
}
.ov-k { color: var(--ink-3); font-size: 12px; letter-spacing: .02em; }
.ov-v { color: var(--ink); font-size: 18px; line-height: 1.3; font-weight: 600; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-n { color: var(--ink-3); font-size: 11.5px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-tag { position: absolute; top: 10px; right: 10px; font-size: 10px; line-height: 1; padding: 4px 6px; border-radius: 999px; color: var(--brand); background: rgba(184, 74, 27, .1); }
@media (max-width: 340px) { .ov-grid { grid-template-columns: 1fr; } }

/* 记录确认卡：一句话抽出来的事，先摆出来给人改，点保存才落库 */
.rec-card {
  margin: 8px 12px 6px; padding: 12px 14px 12px;
  border-radius: 16px; background: #fff;
  border: 1px solid var(--line, rgba(50, 38, 28, .08));
  box-shadow: 0 2px 10px rgba(50, 38, 28, .05);
}
.rc-head { font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.rc-item { padding: 8px 0; border-top: 1px dashed var(--line, rgba(50, 38, 28, .1)); }
.rc-item:first-of-type { border-top: 0; padding-top: 4px; }
.rc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.rc-type {
  font-size: 11px; line-height: 1; padding: 4px 8px; border-radius: 999px;
  color: var(--brand); background: rgba(184, 74, 27, .1);
}
.rc-when { font-size: 11.5px; color: var(--ink-3); }
.rc-row { display: flex; align-items: center; gap: 10px; padding: 3px 0; }
.rc-k { flex: 0 0 62px; font-size: 12.5px; color: var(--ink-3); }
.rc-k.miss { color: var(--err, #B23B2C); }
.rc-in {
  flex: 1 1 auto; min-width: 0; font-size: 14px; padding: 7px 10px;
  border-radius: 10px; border: 1px solid var(--line, rgba(50, 38, 28, .12));
  background: #FFFDF8; color: var(--ink);
}
.rc-in.miss { border-color: rgba(178, 59, 44, .45); background: #FFF6F4; }
/* 占位示例要一眼看出是示例：不然用户以为已经填好了，又被告知「还缺食物」 */
.rc-in::placeholder { color: #BFB0A0; opacity: 1; }
.rc-hint { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.rc-hint.warn { color: var(--err, #B23B2C); }
.rc-acts { display: flex; gap: 8px; margin-top: 10px; }
.rc-ok {
  flex: 1 1 auto; height: 38px; border-radius: 999px; border: 0;
  background: var(--brand); color: #fff; font-size: 14px;
}
.rc-no {
  flex: 0 0 84px; height: 38px; border-radius: 999px;
  border: 1px solid var(--line, rgba(50, 38, 28, .14)); background: transparent;
  color: var(--ink-2); font-size: 14px;
}
.rc-ask { display: flex; align-items: center; gap: 8px; margin: 6px 14px 4px; font-size: 12.5px; color: var(--ink-2); }
.rc-ask-q { flex: 1 1 auto; }
.rc-ask-y, .rc-ask-n { padding: 5px 12px; border-radius: 999px; font-size: 12.5px; }
.rc-ask-y { background: var(--brand); color: #fff; border: 0; }
.rc-ask-n { background: transparent; border: 1px solid var(--line, rgba(50, 38, 28, .14)); color: var(--ink-2); }
.rc-ask-done { margin: 6px 14px 4px; font-size: 12.5px; color: var(--sage, #2F6B4F); }


/* 页面横向不跟着手指抖：左右滑只交给角色卡轨道自己处理。
   坑：overflow-x:hidden 会把 html 变成滚动容器，position:sticky 的顶栏就粘不住了；
   overflow-x:clip 同样裁切但不建立滚动容器，sticky 照常工作（老浏览器不支持就不裁切）。 */
html, body { overflow-x: clip; }
body { overscroll-behavior-x: none; }

/* 首页角色卡轨道：多宠左右滑，一张一屏宽，滑动停靠 */
.pet-track {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 2px 2px 8px; margin: 0 -2px; -webkit-overflow-scrolling: touch;
}
.pet-track::-webkit-scrollbar { display: none; }
.home-pet {
  flex: 0 0 100%; scroll-snap-align: center; display: block; text-decoration: none;
  color: inherit; background: var(--card, #fff); border: 1px solid var(--line, rgba(0,0,0,.08));
  border-radius: 20px; padding: 18px 16px; box-sizing: border-box;
}
.home-pet.on { border-color: var(--brand); box-shadow: 0 6px 20px rgba(184,74,27,.10); }
.home-pet-ava { width: 64px; height: 64px; border-radius: 22px; display: flex; align-items: center;
  justify-content: center; font-size: 34px; background: #F4EADC; margin-bottom: 10px; }
.home-pet b { display: block; font-size: 22px; line-height: 1.25; }
.home-pet-sub { display: block; margin-top: 4px; color: var(--ink-2, #6F5E4F); font-size: 13.5px; }
.home-pet-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.home-pet-chips span { font-size: 12px; padding: 3px 9px; border-radius: 999px;
  background: #F6EFE4; color: #7A6350; }
.home-pet-add {
  flex: 0 0 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center;
  min-height: 172px; border: 1px dashed var(--line, rgba(0,0,0,.16)); border-radius: 20px;
  color: var(--ink-2, #6F5E4F); text-decoration: none; font-size: 15px;
}

/* 健康状态四档的配色（只是提示力度，不是诊断） */
.ov-v.ok { color: var(--sage, #2F6B4F); }
.ov-v.warn { color: #B8730F; }
.ov-v.bad { color: #B23B2C; }
.ov-n.ok { color: var(--ink-3, #7C6A59); }
.ov-n.warn { color: #8A5A12; }
.ov-n.bad { color: #9B3327; }
.ov.h-warn { border-color: rgba(184, 115, 15, .28); }
.ov.h-bad { border-color: rgba(178, 59, 44, .34); background: #FFF7F5; }

/* ---------------- 设置抽屉 ---------------- */
.menu-btn{width:36px;height:36px;flex:0 0 36px;border:0;background:transparent;padding:0;margin:0 8px 0 -4px;color:var(--ink-2);display:grid;place-items:center;cursor:pointer}
.menu-btn svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.menu-btn:active{opacity:.6}
body.no-scroll{overflow:hidden}
.drawer{position:fixed;inset:0;z-index:60}
.drawer-mask{position:absolute;inset:0;background:rgba(24,16,10,.38)}
.drawer-panel{position:absolute;left:0;top:0;bottom:0;width:min(86vw,330px);background:var(--paper,#FBF6EC);box-shadow:0 10px 40px rgba(24,16,10,.18);padding:14px 16px calc(20px + env(safe-area-inset-bottom));overflow-y:auto;animation:drawerIn .22s var(--ease,cubic-bezier(.2,.8,.25,1))}
@keyframes drawerIn{from{transform:translateX(-14px);opacity:.4}to{transform:none;opacity:1}}
.drawer-head{display:flex;align-items:center;justify-content:space-between;margin:2px 0 14px}
.drawer-head b{font-size:18px}
.drawer-x{border:0;background:transparent;font-size:22px;line-height:1;color:var(--ink-3);cursor:pointer;padding:4px 6px}
.set-sec{padding:12px 0;border-top:1px solid rgba(50,38,28,.08)}
.set-sec h4{margin:0 0 6px;font-size:14px;color:var(--ink)}
.set-hint{margin:0 0 10px;font-size:12px;line-height:1.5;color:var(--ink-3)}
.chips-row{display:flex;flex-wrap:wrap;gap:8px}
.chip-opt{border:1px solid rgba(50,38,28,.14);background:#fff;border-radius:999px;padding:8px 12px;font:inherit;font-size:13px;color:var(--ink-2);cursor:pointer}
.chip-opt[aria-pressed="true"]{border-color:var(--brand);color:var(--brand);background:rgba(184,74,27,.07);font-weight:600}
.swatch-row{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
.swatch{display:flex;align-items:center;gap:8px;border:1px solid rgba(50,38,28,.14);background:#fff;border-radius:12px;padding:10px;font:inherit;font-size:13px;color:var(--ink-2);cursor:pointer}
.swatch i{width:16px;height:16px;border-radius:50%;display:block}
.swatch[aria-pressed="true"]{border-color:var(--brand);color:var(--brand);font-weight:600}
.set-bal{display:flex;align-items:baseline;justify-content:space-between;margin:2px 0 10px;font-size:13px;color:var(--ink-2)}
.set-bal b{font-size:24px;color:var(--ink);font-variant-numeric:tabular-nums}
.drawer-link{display:block;padding:11px 12px;margin-bottom:8px;border-radius:12px;background:#fff;border:1px solid rgba(50,38,28,.1);color:var(--ink);text-decoration:none;font-size:14px}
.drawer-link:active{background:rgba(184,74,27,.06)}

/* ---------------- 提醒条（角色卡上面一条） ---------------- */
.rem-strip{margin:2px 0 12px;background:#fff;border:1px solid rgba(50,38,28,.1);border-radius:14px;overflow:hidden}
.rem-strip-main{display:flex;align-items:center;gap:8px;width:100%;border:0;background:transparent;padding:11px 12px;font:inherit;color:var(--ink);text-align:left;cursor:pointer}
.rem-bell{flex:0 0 20px;display:grid;place-items:center;color:var(--brand)}
.rem-bell svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9}
.rem-oneline{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.rem-oneline.muted{color:var(--ink-3)}
.rem-chev{flex:0 0 auto;color:var(--ink-3);transition:transform .18s var(--ease,cubic-bezier(.2,.8,.25,1))}
.rem-strip-main.open .rem-chev{transform:rotate(180deg)}
.rem-all{border-top:1px solid rgba(50,38,28,.08);padding:4px 12px 8px}
.rem-row{display:flex;gap:10px;padding:8px 0;border-bottom:1px dashed rgba(50,38,28,.1);color:var(--ink);text-decoration:none;font-size:13px}
.rem-row:last-child{border-bottom:0}
.rem-row-t{flex:0 0 auto;color:var(--ink-3);font-variant-numeric:tabular-nums}
.rem-row-x{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ---------------- 角色卡：竖长方形，一屏一张，旁边一张半虚 ---------------- */
.pet-track{display:flex;gap:14px;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;padding:4px 0 12px;scrollbar-width:none}
.pet-track::-webkit-scrollbar{display:none}
.pet-card{flex:0 0 82%;scroll-snap-align:center;background:#fff;border:1px solid rgba(50,38,28,.1);border-radius:22px;padding:18px 16px 14px;box-shadow:0 6px 18px rgba(24,16,10,.05);display:flex;flex-direction:column;gap:8px;transition:opacity .18s ease,transform .18s ease}
.pet-card.dim{opacity:.42;transform:scale(.965)}
.pet-card.on{border-color:rgba(184,74,27,.28)}
.pc-top{display:flex;align-items:center;justify-content:space-between}
.pc-ava{width:64px;height:64px;border-radius:20px;background:rgba(246,214,168,.45);display:grid;place-items:center;font-size:34px}
.pc-badge{font-size:12px;color:var(--brand);background:rgba(184,74,27,.09);border-radius:999px;padding:4px 9px}
.pc-name{margin:6px 0 0;font-size:24px;line-height:1.15}
.pc-sub{margin:0;font-size:13px;color:var(--ink-3);line-height:1.5}
.pc-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:2px}
.pc-chips .chip{font-size:12px;color:var(--ink-2);background:rgba(50,38,28,.05);border-radius:999px;padding:5px 9px}
.pc-chips .chip-warn{color:var(--brand);background:rgba(184,74,27,.08)}
.pc-acts{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:auto;padding-top:10px;border-top:1px dashed rgba(50,38,28,.1)}
.pc-act{text-align:center;padding:9px 4px;border-radius:12px;background:rgba(50,38,28,.04);color:var(--ink);text-decoration:none;font-size:13px}
.pc-act:active{background:rgba(184,74,27,.1)}
.pet-card.add{align-items:center;justify-content:center;gap:10px;border-style:dashed;color:var(--ink-3);min-height:260px;text-decoration:none}
.pc-plus{width:56px;height:56px;border-radius:50%;border:2px dashed rgba(184,74,27,.45);color:var(--brand);display:grid;place-items:center;font-size:30px;line-height:1}

/* ---- 角色卡：竖版 + 左右箭头 + 三个弹窗 ---- */
.pet-nav{display:flex;justify-content:space-between;align-items:center;margin:-2px 0 8px}
.pet-nav[hidden]{display:none}
.pet-arrow{width:34px;height:34px;border-radius:50%;border:1px solid rgba(50,38,28,.12);background:#fff;color:var(--ink-2);font-size:20px;line-height:1;display:grid;place-items:center;box-shadow:0 2px 8px rgba(24,16,10,.05)}
.pet-arrow:active{background:rgba(184,74,27,.08);color:var(--brand)}
.pet-track{display:flex;gap:14px;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;padding:2px 0 10px;scrollbar-width:none}
.pet-track::-webkit-scrollbar{display:none}
.pet-card{flex:0 0 86%;scroll-snap-align:center;aspect-ratio:3/4.1;background:#fff;border:1px solid rgba(50,38,28,.1);border-radius:24px;padding:22px 16px 14px;box-shadow:0 8px 22px rgba(24,16,10,.06);display:flex;flex-direction:column;align-items:center;gap:6px;transition:opacity .18s ease,transform .18s ease}
.pet-card.dim{opacity:.42;transform:scale(.965)}
.pet-card.on{border-color:rgba(184,74,27,.28)}
.pc-ava{width:88px;height:88px;border-radius:26px;background:rgba(246,214,168,.45);display:grid;place-items:center;font-size:44px;margin-top:6px}
.pc-badge{font-size:12px;color:var(--brand);background:rgba(184,74,27,.09);border-radius:999px;padding:4px 10px;margin-top:2px}
.pc-name{margin:4px 0 0;font-size:26px;line-height:1.15;text-align:center}
.pc-sub{margin:0;font-size:13px;color:var(--ink-3);line-height:1.6;text-align:center}
.pc-acts{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:auto;width:100%;padding-top:12px;border-top:1px dashed rgba(50,38,28,.1)}
.pc-act{text-align:center;padding:10px 4px;border-radius:12px;border:0;background:rgba(50,38,28,.04);color:var(--ink);font-size:13px;font-family:inherit}
.pc-act:active{background:rgba(184,74,27,.1)}
.pet-card.add{align-items:center;justify-content:center;gap:10px;border-style:dashed;color:var(--ink-3);text-decoration:none}
.pc-plus{width:56px;height:56px;border-radius:50%;border:2px dashed rgba(184,74,27,.45);color:var(--brand);display:grid;place-items:center;font-size:28px;line-height:1}

.sheet{position:fixed;inset:0;z-index:60;display:none}
.sheet.on{display:block}
.sheet-mask{position:absolute;inset:0;background:rgba(24,16,10,.42)}
.sheet-panel{position:absolute;left:0;right:0;bottom:0;max-height:82vh;background:var(--paper);border-radius:22px 22px 0 0;display:flex;flex-direction:column;animation:sheetUp .22s var(--ease)}
@keyframes sheetUp{from{transform:translateY(24px);opacity:.6}to{transform:none;opacity:1}}
.sheet-head{display:flex;align-items:center;justify-content:space-between;padding:16px 18px 10px;border-bottom:1px solid rgba(50,38,28,.08)}
.sheet-head b{font-size:16px}
.sheet-x{border:0;background:none;font-size:22px;line-height:1;color:var(--ink-3);padding:4px 6px}
.sheet-body{padding:14px 18px 22px;overflow-y:auto}
.sheet-none{color:var(--ink-3);font-size:14px;line-height:1.7;text-align:center;padding:18px 0}
.sheet-list{display:flex;flex-direction:column}
.sheet-row{display:flex;gap:10px;align-items:baseline;padding:10px 0;border-bottom:1px dashed rgba(50,38,28,.08);font-size:14px}
.sr-t{color:var(--ink-3);font-size:12.5px;width:76px;flex:0 0 auto}
.sr-k{color:var(--brand);font-size:12.5px;background:rgba(184,74,27,.08);border-radius:999px;padding:2px 8px;flex:0 0 auto}
.sr-v{color:var(--ink);flex:1;min-width:0}
.sheet-kv{display:flex;flex-direction:column}
.sheet-krow{display:flex;gap:12px;padding:10px 0;border-bottom:1px dashed rgba(50,38,28,.08);font-size:14px}
.sk-k{width:64px;color:var(--ink-3);flex:0 0 auto}
.sk-v{flex:1;min-width:0;color:var(--ink)}
.sheet-er p{margin:0 0 10px;font-size:14px;line-height:1.75;color:var(--ink)}
.sheet-note{color:var(--ink-3);font-size:12.5px}
.sheet-btn{display:block;margin-top:16px;text-align:center;padding:13px;border-radius:14px;background:var(--brand);color:#fff;text-decoration:none;font-size:15px}

/* 卡片缩小 + 箭头改成两侧竖排的纯箭头（无圆圈） */
.pet-stage{position:relative}
.pet-nav{position:absolute;inset:0;display:flex;align-items:center;justify-content:space-between;pointer-events:none;z-index:3;padding:0 2px}
.pet-nav[hidden]{display:none}
.pet-arrow{pointer-events:auto;background:none;border:0;padding:6px 4px;font-size:26px;line-height:1;color:var(--ink-3);font-family:inherit}
.pet-arrow:active{color:var(--brand)}
.pet-track{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;padding:0 0 8px;scrollbar-width:none}
.pet-track::-webkit-scrollbar{display:none}
.pet-card{flex:0 0 66%;scroll-snap-align:center;aspect-ratio:3/3.5;background:#fff;border:1px solid rgba(50,38,28,.1);border-radius:22px;padding:16px 14px 12px;box-shadow:0 6px 16px rgba(24,16,10,.05);display:flex;flex-direction:column;align-items:center;gap:4px;transition:opacity .18s ease,transform .18s ease}
.pet-card.dim{opacity:.4;transform:scale(.97)}
.pc-ava{width:68px;height:68px;border-radius:20px;background:rgba(246,214,168,.45);display:grid;place-items:center;font-size:34px;margin-top:2px}
.pc-badge{font-size:11.5px;color:var(--brand);background:rgba(184,74,27,.09);border-radius:999px;padding:3px 9px;margin-top:2px}
.pc-name{margin:2px 0 0;font-size:21px;line-height:1.15;text-align:center}
.pc-sub{margin:0;font-size:12.5px;color:var(--ink-3);line-height:1.5;text-align:center;padding:0 4px}
.pc-acts{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:auto;width:100%;padding-top:9px;border-top:1px dashed rgba(50,38,28,.1)}
.pc-act{padding:8px 2px;border-radius:10px;border:0;background:rgba(50,38,28,.04);color:var(--ink);font-size:12.5px;font-family:inherit}

/* 再收一档：卡片更小、箭头去掉圆圈与阴影，只留字符 */
.pet-arrow{background:none;border:0;border-radius:0;box-shadow:none;width:auto;height:auto;font-size:24px;color:var(--ink-3)}
.pet-card{flex:0 0 62%;aspect-ratio:3/3.15;padding:14px 12px 10px;border-radius:20px}
.pc-ava{width:58px;height:58px;border-radius:17px;font-size:28px}
.pc-name{font-size:19px}
.pc-sub{font-size:12px}
.pc-act{font-size:12px;padding:7px 2px}
.pet-track{padding:2px 0 6px}
.pet-card{aspect-ratio:3/2.7}

/* ==========================================================================
   27. 2026-11-09 交互整理（排在最后，同权重覆盖前面所有老值；改尺寸只改这一段）
   三件事：角色卡改成「形象位优先」、首页能直接说一句话、可点的地方都够 44px
   ========================================================================== */

/* ---- 27.1 顶栏：图标不放大，可点区域撑到 44 ---- */
.topbar{height:56px}
.menu-btn{width:44px;height:44px;flex:0 0 44px;margin:0 6px 0 -10px;border-radius:12px}
.top-right .bell{width:44px;height:44px}
.pet-chip{min-height:44px;max-width:52%;padding:0 4px;border-radius:12px}
.pet-chip .ava{width:30px;height:30px;border-radius:10px}
.chip-chev{color:var(--ink-3);font-size:18px;line-height:1;margin-left:-2px}
.pet-chip:active{background:var(--brand-tint)}

/* ---- 27.2 首页那句话：一个输入框 + 一颗发送，回车就走 ---- */
.hero-actions{margin-top:14px}
.hero-actions .ask-bar{width:100%}
.ask-bar{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:6px 6px 6px 14px;box-shadow:0 4px 14px rgba(24,16,10,.05);transition:border-color .15s ease,box-shadow .15s ease}
.ask-bar:focus-within{border-color:rgba(184,74,27,.45);box-shadow:0 0 0 3px rgba(184,74,27,.12)}
.ask-in{flex:1 1 auto;min-width:0;height:44px;border:0;background:none;font:inherit;font-size:15px;color:var(--ink)}
.ask-in:focus-visible{outline:none}
.ask-in::placeholder{color:var(--ink-2)}
.ask-go{flex:0 0 44px;width:44px;height:44px;border:0;border-radius:12px;background:var(--brand);color:#fff;display:grid;place-items:center;cursor:pointer}
.ask-go svg{width:20px;height:20px;fill:currentColor}
.ask-go:active{background:var(--brand-press)}

/* ---- 27.3 角色卡：上半是形象位（以后放照片），下半名字 + 记忆 / 急救 ---- */
.pet-stage{margin-top:4px}
.pet-track{gap:12px;padding-top:2px;padding-bottom:10px;padding-left:calc((100% - min(300px,72vw)) / 2);padding-right:calc((100% - min(300px,72vw)) / 2);scroll-padding-inline-start:calc((100% - min(300px,72vw)) / 2)}
.pet-card{flex:0 0 auto;width:min(300px,72vw);aspect-ratio:auto;padding:10px 10px 12px;border-radius:20px;gap:0;align-items:stretch;justify-content:flex-start}
.pet-card.on{border-color:rgba(184,74,27,.4);box-shadow:0 10px 24px rgba(24,16,10,.09)}
.pet-card.dim{opacity:.38;transform:scale(.955)}
.pc-media{width:100%;aspect-ratio:3/2;border-radius:14px;overflow:hidden;background:linear-gradient(160deg,rgba(246,214,168,.5),rgba(246,214,168,.2));display:grid;place-items:center}
.pc-media .pc-ava{width:100%;height:100%;margin:0;border-radius:0;background:none;font-size:48px;display:grid;place-items:center}
.pc-media .pc-ava img{width:100%;height:100%;object-fit:cover;display:block}
.pc-info{display:flex;flex-direction:column;align-items:center;gap:2px;padding:10px 4px 8px;min-width:0;width:100%}
.pc-badge{font-size:11px;padding:3px 8px;margin:0}
.pc-name{font-size:20px;margin:2px 0 0}
.pc-sub{font-size:12.5px;line-height:1.5;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pc-acts{grid-template-columns:repeat(2,1fr);gap:8px;width:100%;margin-top:auto;padding-top:0;border-top:0}
.pc-act{min-height:44px;display:grid;place-items:center;font-size:13.5px;border-radius:12px}
.pet-card.add{aspect-ratio:auto;align-items:center;justify-content:center;gap:8px;padding:10px}

/* 箭头：用户点名不要圆圈，就是两个字符；但可点范围给满 44，落进两侧留白里，不再压住邻卡的标题 */
.pet-nav{padding:0;align-items:center}
.pet-arrow{width:44px;height:44px;display:grid;place-items:center;padding:0;background:none;border:0;border-radius:0;box-shadow:none;font-size:28px;line-height:1;color:var(--ink-3)}
.pet-arrow:active{color:var(--brand);background:rgba(184,74,27,.08);border-radius:12px}
.pet-arrow[disabled]{opacity:.28}

/* ---- 27.4 通用触达与焦点 ---- */
.home-more{min-height:44px;display:inline-flex;align-items:center;padding:0 8px;margin-right:-8px}
input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid rgba(184,74,27,.55);outline-offset:2px}
html{scroll-padding-bottom:calc(var(--tab-h) + 8px)}

/* ---- 27.5 记录类型：新的四类各一个色点，别再让 kind 文案裸奔 ---- */
.mem-k.k-diet{--dot:#C25B2C}
.mem-k.k-care{--dot:#2F6B4F}
.mem-k.k-other{--dot:#8B7550}
.mem-k.k-sick{background:var(--err-soft);color:var(--err-ink);--dot:var(--err)}

/* ---- 27.6 断行：标题别留下一个孤字 ---- */
h1,h2,h3,.pc-name{text-wrap:balance}
p{text-wrap:pretty}

/* ---- 27.7 宽屏：卡片收窄、六格三列，别把手机上的一列拉成一条 ---- */
@media (min-width:720px){
  .pet-card{width:min(320px,64vw)}
  .ov-grid{grid-template-columns:repeat(3,1fr)}
  .ask-bar{max-width:560px;margin:0 auto}
}

/* ---- 27.8 提醒页：整行都能点完成，删除变成两下确认 ---- */
.rem-row{min-height:60px;padding:6px 8px 6px 6px;gap:6px}
.rem-tick{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;font-size:15px;flex:none}
.rem-main{flex:1 1 auto;min-width:0;display:block;text-align:left;border:0;background:none;padding:8px 4px;min-height:44px;font:inherit;color:inherit;cursor:pointer}
.rem-main:active .rem-title{color:var(--brand)}
.rem-title{display:flex;align-items:center;gap:6px;font-size:14.5px}
.rem-sub{display:block;font-size:12px;color:var(--ink-3);margin-top:3px}
.rem-del{width:44px;height:44px;flex:none;display:grid;place-items:center;padding:0;border:0;border-radius:12px;background:none;color:var(--ink-3);font-size:22px;line-height:1;cursor:pointer}
.rem-del:active{background:var(--err-soft)}
.rem-del.armed{width:auto;min-width:44px;padding:0 10px;font-size:13px;font-weight:600;color:#fff;background:var(--err)}
.rem-add,.rem-ics{min-height:48px}

/* ---- 27.9 账户页：去掉和 tabbar 重复的「返回 我的」，链接给足触达 ---- */
.auth-links{display:flex;justify-content:space-between;gap:8px;margin-top:6px}
.auth-links a{min-height:44px;display:inline-flex;align-items:center;padding:0 2px;font-size:14px;text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px;text-decoration-color:rgba(184,74,27,.35)}
.auth-back{min-height:44px;display:inline-flex;align-items:center;padding:0 4px;margin-left:-4px}
.back{min-height:44px;display:inline-flex;align-items:center;padding:0 6px;margin-left:-6px}

/* ---- 27.10 轨道两端淡出：让旁边那张卡是「还有一张」的暗示，而不是一条被切开的边 ---- */
.pet-track{
  -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 7%,#000 87%,transparent 100%);
  mask-image:linear-gradient(90deg,transparent 0,#000 7%,#000 87%,transparent 100%);
}

/* ---- 27.11 抽屉里的可点目标：关闭 ×、风格/主题 chips 都要 44 高 ---- */
.drawer-x{width:44px;height:44px;margin:-6px -8px 0 0;font-size:22px;display:grid;place-items:center}
.chip-opt{min-height:44px}

/* ---- 27.12 输入框里的可点区域：整格都能点、验证码按钮 44 高、快捷短语 44 高 ---- */
.inp-wrap .inp{align-self:stretch;height:auto}
.inp-btn{min-height:44px;display:inline-flex;align-items:center;padding:0 0 0 10px}
.cw-chip{min-height:44px;display:inline-flex;align-items:center;padding:8px 15px}

/* ---- 27.13 桌面端：角色卡舞台别撑到 880 宽，箭头要贴着卡 ---- */
@media (min-width:720px){
  .pet-stage{max-width:540px;margin:0 auto}
  .pet-track{padding-left:calc((100% - min(320px,64vw)) / 2)}
  .pet-track{padding-right:calc((100% - min(320px,64vw)) / 2);scroll-padding-inline-start:calc((100% - min(320px,64vw)) / 2)}
}

/* ---- 27.14 创作页：标题 + 右侧作品入口；等开放时多给一条去聊天的路 ---- */
.page-head .mini-btn{margin-left:auto}
.soon-alt{display:inline-flex;align-items:center;min-height:44px;margin-top:10px;font-size:13.5px;color:var(--brand);text-decoration:underline;text-underline-offset:3px;text-decoration-color:rgba(184,74,27,.3)}
@media (min-width:720px){.soon .empty-art{width:220px;height:220px}}
.mini-btn{min-height:44px;display:inline-flex;align-items:center}

/* ---- 27.15 主题色：六档猫狗毛色 + 分组标题 ---- */
.swatch-cap{grid-column:1 / -1;font-size:11.5px;letter-spacing:.06em;color:var(--ink-3);padding:2px 2px 0}
.swatch-cap:not(:first-child){margin-top:4px}
.swatch{min-height:44px;font-size:13px;line-height:1.25}
.swatch i{width:18px;height:18px;flex:0 0 18px;box-shadow:inset 0 0 0 1px rgba(50,38,28,.12)}
.swatch[aria-pressed="true"]{background:var(--brand-soft)}
/* 换主题时纸色、卡片、插画底一起走，避免「主色换了背景还是暖的」 */
html[data-theme] body{background:var(--paper);transition:background-color .18s ease}
html[data-theme] .app{background:transparent}
html[data-theme] .card,
html[data-theme] .rem-strip,
html[data-theme] .ov,
html[data-theme] .mem,
html[data-theme] .sheet{background:var(--card)}
html[data-theme] .ov-k,html[data-theme] .mem-k{color:var(--ink-3)}
html[data-theme] .btn-primary,
html[data-theme] .ask-go,
html[data-theme] .rem-add,
html[data-theme] .send{background:var(--brand)}
html[data-theme] .btn-primary:active,
html[data-theme] .ask-go:active{background:var(--brand-press)}
/* 主题化：卡片边框 / 品种胶囊 / 形象区底色都跟主色走 */
.pet-card.on{border-color:var(--brand-line, rgba(184,74,27,.28))}
.pc-badge{background:var(--brand-wash, rgba(184,74,27,.09))}
.pc-media{background:linear-gradient(160deg,var(--brand-tint,#FDF2E8),var(--paper,#FBF6EC))}
.pet-chip .chip-chev,.pet-arrow{color:var(--ink-3)}
.switch-opt[aria-pressed="true"],.chip-opt[aria-pressed="true"]{background:var(--brand-soft);border-color:var(--brand);color:var(--brand-ink)}
/* 作品页筛选胶囊也补到 44 高 */
.chip{min-height:44px;display:inline-flex;align-items:center}
/* 记录确认卡：记到哪只（多宠物时出现，点一下换一只） */
.rc-who{display:flex;align-items:center;gap:6px;margin:-2px 0 8px;font-size:12.5px;color:var(--ink-3)}
.rc-who-btn{min-height:44px;padding:0 12px;border:1px solid var(--line);border-radius:999px;background:var(--card);color:var(--ink);font:inherit;font-weight:600;display:inline-flex;align-items:center;gap:4px}
.rc-who-btn::after{content:'⌄';color:var(--ink-3);font-weight:400}
.rc-who-btn:active{background:var(--brand-soft);border-color:var(--brand-line)}
.rc-in{min-height:44px}
.rc-ok,.rc-no{min-height:44px;display:inline-flex;align-items:center;justify-content:center}
.rc-who-tip{font-size:12px;color:var(--err)}

/* ---- 27.16 危险食物：事实照记，风险标红（巧克力/葡萄/洋葱…） ---- */
.rc-risk{display:block;margin:2px 0 8px;padding:9px 11px;border-radius:12px;
  background:var(--err-soft);border:1px solid rgba(178,58,54,.34);color:#8C2F2A;
  font-size:12.5px;line-height:1.55}
.mem-row.risk .mem-k{background:var(--err-soft);color:#8C2F2A;border-color:rgba(178,58,54,.34)}

/* 27.17 日期不精确的提醒：卡片里先说清楚「几号是我猜的」 */
.rc-warn{display:block;margin:2px 0 9px;padding:9px 11px;border-radius:12px;
  background:var(--brand-soft);color:var(--brand-ink);font-size:12.5px;line-height:1.55}
.rc-in.warn{border-color:rgba(184,74,27,.55);background:#FFF8F0}

/* 27.18 记录可改：首页行尾编辑图标 + 聊天气泡小字居中 + 蓝色「修改」 + 编辑面板 */
.mem-edit{flex:0 0 auto;width:30px;height:30px;margin-left:2px;display:inline-flex;
  align-items:center;justify-content:center;border:0;background:none;color:var(--ink-3);
  border-radius:8px;min-width:30px;min-height:30px}
.mem-edit:active{background:var(--brand-soft)}
.mem-edit svg{width:17px;height:17px}
.note-tag.me{justify-content:center;align-self:stretch;max-width:100%;padding:0 8px}
.note-tag.me .note-line{text-align:center}
.note-fix{border:0;background:none;padding:2px 4px;font:inherit;font-size:12px;
  color:#2F6B9A;text-decoration:underline;text-underline-offset:3px;min-height:24px}
.note-fix:active{opacity:.6}

.edit-mask{position:fixed;inset:0;z-index:60;background:rgba(42,32,24,.34);
  display:flex;align-items:flex-end;justify-content:center}
.edit-box{width:100%;max-width:520px;max-height:86vh;overflow:auto;background:var(--card);
  border-radius:18px 18px 0 0;padding:14px 16px calc(16px + env(safe-area-inset-bottom));
  box-shadow:0 -8px 30px rgba(60,40,24,.18)}
.edit-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
.edit-head b{font-size:15px}
.edit-x{width:44px;height:44px;margin:-8px -10px 0 0;border:0;background:none;
  font-size:22px;line-height:1;color:var(--ink-3)}
.edit-body{display:flex;flex-direction:column;gap:8px}
.edit-row{display:flex;align-items:center;gap:10px}
.edit-k{flex:0 0 62px;font-size:13px;color:var(--ink-3)}
.edit-in{flex:1;min-width:0;min-height:42px;padding:8px 11px;border:1px solid var(--line);
  border-radius:12px;background:var(--ivory);font:inherit;font-size:14px;color:var(--ink)}
.edit-in:focus{outline:2px solid rgba(184,74,27,.5);outline-offset:1px}
.edit-fields{display:flex;flex-direction:column;gap:8px;margin-top:2px}
.edit-orig{margin-top:4px;font-size:12px;line-height:1.5;color:var(--ink-3);
  word-break:break-all}
.edit-acts{display:flex;gap:8px;margin-top:14px}
.edit-ok{flex:1;min-height:46px;border:0;border-radius:14px;background:var(--brand);
  color:#fff;font:inherit;font-size:15px;font-weight:600}
.edit-no,.edit-del{min-height:46px;padding:0 16px;border:1px solid var(--line);
  border-radius:14px;background:var(--card);font:inherit;font-size:14px;color:var(--ink-2)}
.edit-del{color:#9E3D10}
.edit-del.armed{background:var(--err);border-color:var(--err);color:#fff}
/* 27.19 编辑图标给足 44px 触达（视觉仍是 18px 的笔） */
.mem-edit{width:44px;height:44px;min-width:44px;min-height:44px;margin:-6px -10px -6px 0}
.mem-edit svg{width:18px;height:18px}

/* 27.20 抽屉里的「清除本地缓存」：两步确认的红色态 + 全局 danger 按钮 */
.drawer-link.danger{color:#A4342F;border-color:rgba(164,52,47,.24);font-weight:600}
.drawer-link.armed,.drawer-link.danger.armed{background:var(--err);border-color:var(--err);color:#fff}
.drawer-link:disabled{opacity:.7}

/* ==========================================================================
   28. 视觉硬伤修复（2026-11-11）
   只追加、不改中段。这一节解决的是「已经坏掉」，不是「换风格」——
   换风格那一层另起 29，别在这里掺。
   ========================================================================== */

/* ---- 28.1 档案页列表行被首页角色卡样式盖掉 ----
   27.3 里 .pet-card 是首页那张竖版角色卡（竖排 / 宽 min(300px,72vw) / 内边距 10px），
   档案页的列表行也叫 .pet-card（第 7 节，本来是一行三项的行），被后来居上的规则改成了
   281px 宽的竖卡：头像在上、名字在中、箭头掉到左下。
   这里用父级 .pet-list 提权还原成行；角色卡那边不动，它在 .pet-track 里。 */
.pet-list .pet-card {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  width: 100%;
  flex: 0 0 auto;
  aspect-ratio: auto;
  padding: 12px 14px;
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
}
.pet-list .pet-card.on { box-shadow: var(--sh-1); border-color: var(--brand); }
.pet-list .pc-main { align-items: flex-start; text-align: left; padding: 0; }

/* ---- 28.2 禁用态主按钮：深棕字压在陶土底上，1.6:1，等于看不见 ----
   27.15 的 html[data-theme] .btn-primary 提权盖掉了第 5 节的 :disabled 底色，
   结果禁用态只剩一个「主题色按钮 + 灰字」。补一条同权重的禁用规则压回去。 */
html[data-theme] .btn-primary:disabled,
html[data-theme] .btn-primary[disabled] {
  background: var(--paper-2);
  color: var(--ink-3);
  box-shadow: none;
}

/* ---- 28.3 聊天里那个蓝色「修改」----
   全站唯一一处冷色（#2F6B9A），和「不是科技蓝」的品牌承诺打架。改成品牌墨色。 */
.note-fix { color: var(--brand-ink); text-decoration-color: rgba(184, 74, 27, .35); }

/* ---- 28.4 「AI 建议」被压成一行省略号（最近有 1 条不…）----
   它是一句话，不是数字，允许两行；其余五格仍是单行数字。 */
#ovAdviceV {
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: clip;
  font-size: 15px;
  line-height: 1.45;
}

/* ---- 28.5 默认头像 / 提醒行的表情符号 ----
   1) 没设头像时原先写 🐾：Windows 上渲染成深紫，和暖色系正面撞；
      现在由 avatar.js 画一枚内联爪印 SVG，颜色跟主题走（currentColor）。
   2) 提醒行「已完成」的对勾线穿过整个 .rem-main，把头像也划掉了；
      线只该划标题。 */
.is-paw { color: var(--brand); }
.is-paw svg { width: 1em; height: 1em; display: block; fill: currentColor; }
.uava.is-paw { font-size: calc(var(--uava-sz, 30px) * .5); }
.pc-media .pc-ava.is-paw { color: var(--brand); opacity: .34; }
.pet-list .pc-ava.is-paw { opacity: .9; }
.rem-ava.is-paw { color: var(--brand); opacity: .8; }
.rem-ava.is-emoji { background: var(--paper-2); border-radius: 50%; }

.rem-row.done .rem-main { text-decoration: none; }
.rem-row.done .rem-tt { text-decoration: line-through; }

/* ==========================================================================
   29. 首页改版：问候 / 四张数据卡 / 今日照护 / 语音输入 / 提醒小票（2026-11-11）
   结构照 UI.txt 的 01–04 走；配色不在这里定，仍吃 --brand 等主题变量。
   ========================================================================== */

/* ---- 29.1 01 问候 ---- */
.greet {
  margin: 2px 2px 10px;
  font-size: 14px;
  color: var(--ink-2);
  letter-spacing: .01em;
}

/* ---- 29.2 03 宠物数据：四张卡 ---- */
.pdata {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pd {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 116px;
  padding: 13px 14px 14px;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
  color: var(--ink);
  text-decoration: none;
}
.pd-act:active { transform: scale(.985); }
.pd-ico {
  display: block;
  width: 22px;
  height: 22px;
  margin-bottom: 9px;
  color: var(--ink-3);
}
.pd-ico svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pd-k {
  font-size: 12.5px;
  color: var(--ink-2);
  letter-spacing: .02em;
}
.pd-v {
  display: block;
  margin-top: 2px;
  font-size: 25px;
  line-height: 1.18;
  letter-spacing: -.015em;
  font-variant-numeric: tabular-nums;
}
.pd-link { font-size: 20px; color: var(--brand-ink); letter-spacing: 0; }
.pd-n {
  margin-top: auto;
  padding-top: 6px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-3);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

/* ---- 29.3 健康 + AI 建议：一条窄条 ---- */
.note-strip {
  margin-top: 10px;
  padding: 2px 14px;
  border-radius: var(--r-lg);
  background: var(--card-2);
  border: 1px solid var(--line-soft);
}
.note-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}
.note-row:last-child { border-bottom: 0; }
.note-k {
  flex: none;
  min-width: 46px;
  font-size: 12.5px;
  color: var(--ink-3);
}
.note-v { font-size: 14.5px; color: var(--ink); }
.note-v.ok { color: var(--sage); }
.note-v.warn { color: #B8730F; }
.note-v.bad { color: var(--err); }
.note-n {
  margin-left: auto;
  flex: none;
  font-size: 12px;
  color: var(--ink-3);
}
.note-advice { font-weight: 400; line-height: 1.5; }

/* ---- 29.4 04 今日照护 ---- */
.care { display: flex; flex-direction: column; gap: 8px; }
.care-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
  color: inherit;
  text-decoration: none;
}
.care-row:active { transform: scale(.99); }
.care-dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-tint);
}
.care-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.care-main b {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.care-main i {
  font-style: normal;
  font-size: 12.5px;
  color: var(--ink-3);
}
.care-when {
  flex: none;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 12px;
}
.care-row.done { opacity: .62; }
.care-row.done .care-dot { background: var(--sage); box-shadow: 0 0 0 3px var(--sage-soft); }
.care-row.done .care-main b { text-decoration: line-through; }
.care-none {
  margin: 0;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--card-2);
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.65;
}

/* ---- 29.5 语音输入：首页输入条 + 助手输入条 ----
   不支持的浏览器由 voice.js 把按钮藏掉，所以这里只管「能用时长什么样」。 */
.ask-mic {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--paper-2);
  color: var(--brand-ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.ask-mic svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.composer .mic {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--brand-ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.composer .mic svg { width: 21px; height: 21px; }
.ask-mic.listening,
.composer .mic.listening {
  background: var(--brand);
  color: #FFF7EE;
  border-color: transparent;
  animation: mic-pulse 1.6s ease-out infinite;
}
@keyframes mic-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(184, 74, 27, .34); }
  70%  { box-shadow: 0 0 0 9px rgba(184, 74, 27, 0); }
  100% { box-shadow: 0 0 0 0 rgba(184, 74, 27, 0); }
}

/* ---- 29.6 顶栏铃铛的小票 ---- */
.bell-list { display: flex; flex-direction: column; }
.bell-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14.5px;
}
.bell-row:last-child { border-bottom: 0; }
.bell-row.done { opacity: .55; }
.bell-row.done .bell-name { text-decoration: line-through; }
.bell-when {
  flex: none;
  min-width: 72px;
  color: var(--ink-3);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.bell-name { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .ask-mic.listening,
  .composer .mic.listening { animation: none; }
  .pd-act:active,
  .care-row:active { transform: none; }
}

/* ---- 30. 首页第二轮：状态小丸 / 四卡压缩 / 可点的照护行（2026-11-11） ---- */

/* 30.1 形象卡右上角那颗小丸：健康是这张脸的近况，不是一条独立的横向信息 */
.pc-state {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px 4px 8px;
  border-radius: 999px;
  background: rgba(255, 253, 249, .92);
  border: 1px solid rgba(234, 219, 199, .9);
  font-size: 11.5px;
  line-height: 1;
  color: var(--ink-2);
  box-shadow: 0 1px 2px rgba(80, 55, 35, .06);
  backdrop-filter: blur(4px);
}
.pc-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage);
}
.pc-state b { font-weight: 600; color: var(--ink); }
.pc-state.warn i { background: #B8730F; }
.pc-state.bad i { background: var(--err); }
.pc-state.warn b { color: #8A5606; }
.pc-state.bad b { color: var(--err); }

/* 30.2 四张数据卡压一档：去掉图标，数字降一号，一张卡 86 高 */
.pd-ico { display: none; }
.pd { min-height: 86px; padding: 11px 12px 12px; }
.pd-v { font-size: 22px; line-height: 1.2; }
.pd-link { font-size: 19px; }
.pd-k { font-size: 12px; }

/* 30.3 「今日照护」的行现在能点：点一下 = 今天做完了 */
.care-row-btn {
  width: 100%;
  font: inherit;
  text-align: left;
  border: 1px solid var(--line);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.care-row-btn:active { transform: scale(.99); }
.care-row-btn.done .care-main b { text-decoration: line-through; }
.care-row-btn.done .care-when { background: var(--sage-soft); color: var(--sage); }
@media (prefers-reduced-motion: reduce) {
  .care-row-btn:active { transform: none; }
}

/* 30.4 形象位定高：不给小丸找错爹（.pet-card 没设 position，absolute 会被 .pet-stage 接住，
   于是那颗「健康」跑到页面右边外面去了）。顺手把形象位从 3:2 收到 16:9，
   一屏能多露出「今日照护」的一行。 */
.pet-card { position: relative; }
.pet-card .pc-media { aspect-ratio: 16 / 9; }

/* ---- 31. 助手首屏整理（2026-11-11）----
   开场三条并成一条；引导图和例子胶囊删掉；「做表情包」从首屏大卡降级成
   「刚记完一笔」那条小字里的一颗按钮——它出现在人刚描述完这只猫的时刻，
   比在任何人开口之前先推销更站得住。 */
.note-cta {
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-tint);
  color: var(--brand-ink);
  font-size: 12px;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid rgba(184, 74, 27, .14);
}
.note-cta:active { background: var(--brand-soft); }

/* 31.1 「给它做表情包」单独一行：挤在 note-tag 里会把旁边的「取消记录 / 修改」挤断 */
.note-cta-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: -6px 0 10px;
}

/* ==========================================================================
   32. 首页两件「现在就要用」的东西：急救方块、记体重
   急救不和记录混排——它平时不该占地方，要用时得立刻摸得到。
   ========================================================================== */

/* 32.1 急救方块：贴在形象位左上角，44×44（触摸下限），不抢轮播箭头的位置 */
.sos {
  position: absolute;
  left: 2px;
  top: 0;
  z-index: 4;
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 249, .92);
  color: var(--err);
  box-shadow: var(--sh-1);
  cursor: pointer;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.sos[hidden] { display: none; }
.sos svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.sos span { font-size: 9.5px; line-height: 1; letter-spacing: .04em; color: var(--ink-2); }
.sos:active { transform: scale(.95); }

/* 32.2 体重卡：点一下就能改，所以得看得出可点 */
.pd-act { text-align: left; font: inherit; color: inherit; cursor: pointer; }
.pd-edit {
  position: absolute;
  right: 10px;
  bottom: 9px;
  font-size: 10.5px;
  color: var(--brand-ink);
  opacity: .72;
}
.pd-n.up { color: var(--brand-ink); }
.pd-n.down { color: var(--err); }

/* 32.3 小面板：从底部起来的一小片，不铺满整页 */
.mini { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; }
.mini[hidden] { display: none; }
.mini-mask { position: absolute; inset: 0; background: rgba(50, 38, 28, .42); }
.mini-panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  background: var(--card);
  box-shadow: 0 -14px 34px -18px rgba(70, 45, 25, .5);
  animation: sheet-up var(--t) var(--ease);
}
.mini-t { display: block; font-size: 17px; letter-spacing: .01em; }
.mini-row { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; }
.mini-in {
  flex: 1;
  height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.mini-in:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.mini-u { color: var(--ink-3); font-size: 14px; }
.mini-hint, .mini-note { margin: 6px 0 14px; font-size: 12.5px; line-height: 1.6; color: var(--ink-3); }
.mini-body { margin: 10px 0 4px; max-height: 52vh; overflow: auto; }
.mini-body p { margin-bottom: 9px; font-size: 13.5px; line-height: 1.72; color: var(--ink-2); }
.mini-body b { color: var(--ink); font-weight: 600; }
.mini-acts { display: flex; gap: 10px; }
.mini-acts .btn-primary, .mini-acts .btn-ghost { flex: 1; }

@media (prefers-reduced-motion: reduce) {
  .mini-panel { animation: none; }
  .sos:active { transform: none; }
}

/* 32.4 体重卡右上角那颗「＋」：卡片右下已经写着「较上次 +0.15 kg（+60%）」，
   提示语再放底部会撞在一起，挪到角上做一个小标记。 */
.pd-edit {
  top: 9px;
  right: 9px;
  bottom: auto;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand-ink);
  font-size: 13px;
  line-height: 1;
  opacity: 1;
}

/* 32.5 提醒表单里的「重复」：两个小按钮 + 一行起止 */
.seg-sm { margin: 4px 0 2px; }
.seg-sm .seg-b { font-size: 13px; padding: 8px 12px; }
.span-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.span-row[hidden] { display: none; }
.span-row input { flex: 1; min-width: 0; }
.span-row label { font-size: 13px; color: var(--ink-2); flex: none; }

/* ==========================================================================
   33. 养宠日记：一本能翻、能改的书
   一天一页，页面留白按「书」来排（页眉日期、正文、页脚页码），不做卡片堆。
   ========================================================================== */
.diary { max-width: 520px; margin: 0 auto; }

/* 33.1 封面区 */
.dbook { padding: 6px 4px 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.dk { font-size: 11.5px; letter-spacing: .18em; color: var(--ink-3); }
.dt { margin-top: 6px; font-size: 24px; letter-spacing: .01em; }
.ds { margin-top: 6px; font-size: 12.5px; color: var(--ink-3); }

/* 33.2 一页 */
.dpage {
  position: relative;
  padding: 16px 4px 14px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
}
.dpage:active { background: var(--card-2); }
.dpage:focus-visible { outline: 2px solid var(--brand-soft); border-radius: 10px; }
.dp-head { display: flex; align-items: baseline; gap: 8px; }
.dp-date { font-size: 12.5px; color: var(--ink-2); letter-spacing: .04em; }
.dp-wd { font-size: 11.5px; color: var(--ink-3); }
.dp-note {
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  white-space: pre-wrap;
}
.dp-auto {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
}
.dp-photos { display: flex; gap: 6px; margin-top: 10px; overflow: hidden; }
.dp-photo {
  width: calc((100% - 12px) / 3);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  background: var(--paper-2);
}
.dp-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 12px;
}
.dp-pg { font-size: 10.5px; letter-spacing: .14em; color: var(--ink-3); }
.dp-edit { font-size: 11.5px; color: var(--brand-ink); opacity: .85; }

.dempty { margin: 18px 4px; font-size: 13.5px; line-height: 1.8; color: var(--ink-2); }
.dfoot { margin: 22px 4px 6px; text-align: center; font-size: 11.5px; color: var(--ink-3); letter-spacing: .1em; }

/* 33.3 编辑面板里的文字框与照片条 */
.mini-ta {
  width: 100%;
  margin: 8px 0 10px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.7;
  resize: none;
}
.mini-ta:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.dshots { display: flex; flex-wrap: wrap; gap: 8px; }
.dshot { position: relative; width: 64px; height: 64px; }
.dshot img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.dshot-x {
  position: absolute; top: -6px; right: -6px;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card);
  color: var(--ink-2); font-size: 12px; line-height: 1;
  display: grid; place-items: center;
}
.dadd {
  margin-top: 10px;
  width: 100%;
  height: 46px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 13.5px;
}
.dadd:active { background: var(--paper-2); }

/* 34. 体重面板里的「最近的变化」——一条线，加最近三次的读数 */
.whist { margin: 2px 0 14px; }
.whist-h {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px; color: var(--ink-3);
}
.whist-now { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.whist-now.up { color: var(--brand-ink); }
.whist-now.down { color: var(--err); }
.whist-svg { display: block; width: 100%; height: 64px; margin: 6px 0 4px; }
.whist-l { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); }
.whist-l span { font-variant-numeric: tabular-nums; }
.whist-l.whist-tip { justify-content: flex-start; color: var(--ink-3); font-size: 11.5px; }
.whist-svg polyline { vector-effect: non-scaling-stroke; }

/* ==========================================================================
   35. 视觉：纸的层次（方向 A）
   不加新颜色，只加「厚度」：一张卡＝白纸 + 1px 暖边 + 贴着边缘的一道硬影
   + 一层散开的软影。颜色全走主题变量，所以 10 套毛色都跟着变。
   ========================================================================== */

:root {
  --edge: rgba(122, 88, 54, .13);
  --edge-soft: rgba(122, 88, 54, .06);
  --sh-paper:
    0 1px 0 var(--edge),
    0 2px 1px -1px var(--edge-soft),
    0 14px 22px -20px rgba(80, 55, 35, .55);
  --r-card: 16px;
}

/* 35.1 一张纸该有的边和影 */
.pd,
.care-row,
.pet-card,
.note-strip,
.ask-bar,
.composer,
.rem-row,
.ov-grid .ov {
  border: 1px solid var(--edge);
  border-radius: var(--r-card);
  box-shadow: var(--sh-paper);
}
.pd,
.care-row,
.note-strip { background: var(--card); }

/* 按下去要「陷」一点，不是只变个色 */
.pd-act:active,
.care-row:active,
.pet-card:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 var(--edge);
}

/* 35.2 章节标题：前面一道 3px 的陶土短线，标题本身收紧一点 */
.home-sec h3 {
  position: relative;
  padding-left: 11px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--ink);
}
.home-sec h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 15px;
  margin-top: -7.5px;
  border-radius: 2px;
  background: var(--brand);
}
.home-sec { margin-top: 22px; }
.home-sec h3 { margin-bottom: 10px; }

/* 35.3 数字要像数字：等宽、加重，扫一眼就能比大小 */
.pd-v,
.care-main b,
.note-v {
  font-variant-numeric: tabular-nums;
}
.pd-v {
  font-weight: 800;
  letter-spacing: -.025em;
  font-size: 26px;
}
.pd-k {
  font-size: 12.5px;
  letter-spacing: .03em;
  color: var(--ink-3);
}
.pd-n { color: var(--ink-3); }

/* 35.4 行里的时间数字也用等宽，竖着看不会跳 */
.care-when,
.note-n,
.bell-when { font-variant-numeric: tabular-nums; }

/* 36. 代码构建的分身：SVG 角色铺满形象位，原来的灰爪印退场 */
.pc-media { position: relative; }
.pc-media.has-plive .pc-ava { display: none; }
.pc-media .pl-wrap {
  position: absolute;
  inset: 0;
  display: block;
}
.pc-media .pl-svg {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

/* ==========================================================================
   37. 深蓝草地（2026-11-12）——换掉暖米色 + 陶土那一套
   场景是图片层，问候/小丸/按钮都是真控件；配色走主题变量，10 套毛色跟着变。
   ========================================================================== */

html[data-theme] {
  --paper: #F7F5EE;
  --paper-2: #EDEAE1;
  --card: #FFFDF8 !important;
  --card-2: #FBFAF3 !important;
  --ivory: #FCFAF3 !important;
  --ink: #16302F !important;
  --ink-2: #4A625E !important;
  --ink-3: #7C8D87 !important;
  --line: #E2DDCE !important;
  --line-soft: #EEEADF !important;
  --brand: #1B4A55;
  --brand-press: #143A44;
  --brand-ink: #1B4A55;
  --brand-soft: #DFEDE8;
  --brand-tint: #EDF4F0;
  --sage: #2A6B63 !important;
  --sage-soft: #E4EFEA !important;
  --butter: #E3D6A6 !important;
  --butter-soft: #F3EDD8 !important;
  --butter-ink: #6B5C2E !important;
  --err: #A8433A !important;
  --err-soft: #F8E7E3 !important;
  --r-card: 18px;
  --sh-paper: 0 1px 0 rgba(22, 48, 47, .05), 0 10px 24px -18px rgba(22, 48, 47, .45);
}

/* ---- 37.1 主视觉：一整块画，顶栏压在上面 ---- */
body.home-scene .topbar {
  background: transparent;
  border-bottom-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body.home-scene .topbar .menu-btn,
body.home-scene .topbar .bell { color: #F6FBF8; }
body.home-scene .topbar .menu-btn svg,
body.home-scene .topbar .bell svg { stroke: currentColor; }
body.home-scene .topbar .bell {
  background: rgba(255, 255, 255, .92);
  color: #1B4A55;
  border-color: transparent;
}
body.home-scene .topbar .menu-btn { background: transparent; }
body.home-scene .topbar .pet-chip {
  background: rgba(255, 255, 255, .92);
  color: #16302F;
  border-color: transparent;
}
body.home-scene .topbar .pet-chip .ava { background: #F1EFE6; }
body.home-scene .main { padding-top: 0; padding-left: 0; padding-right: 0; }
body.home-scene .home-sec,
body.home-scene .pdata,
body.home-scene .note-strip,
body.home-scene #pdDiary,
body.home-scene #heroActs,
body.home-scene .home-mem { margin-left: 16px; margin-right: 16px; }
body.home-scene .pdata { margin-left: 16px; margin-right: 16px; }

.hero {
  position: relative;
  margin: -56px 0 0;
  padding: 0;
  overflow: hidden;
  background: #1B687C;
  aspect-ratio: 852 / 620;
}
.hero-bg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
}
.hero-greet {
  position: absolute;
  left: 22px;
  top: 104px;
  margin: 0;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: .01em;
  color: #F4FAF6;
  text-shadow: 0 1px 3px rgba(4, 34, 44, .35);
}
.hero-state {
  position: absolute;
  right: 16px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 253, 248, .92);
  color: var(--sage);
  font-size: 11.5px;
  line-height: 1;
  backdrop-filter: blur(4px);
}
.hero-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.hero-state.warn { color: #B8730F; }
.hero-state.bad { color: var(--err); }
.hero .sos {
  left: 16px;
  top: auto;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 253, 248, .9);
  color: #A8433A;
  border-color: transparent;
  font-size: 10.5px;
}
.hero .sos svg { width: 15px; height: 15px; }
.hero .pet-track { display: none !important; }

/* ---- 37.2 指标行：三格一条线，不是三张卡 ---- */
.pdata {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 12px 0 0;
  padding: 13px 4px;
  border-radius: var(--r-card);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--sh-paper);
}
.pd {
  min-height: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  align-items: flex-start;
  gap: 2px;
}
.pd + .pd { border-left: 1px solid var(--line); }
.pd:active { transform: none; }
.pd-ico { display: none; }
.pd-k { font-size: 11.5px; color: var(--ink-3); letter-spacing: .04em; }
.pd-v { font-size: 16px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.pd-n { padding-top: 3px; font-size: 10.5px; color: var(--ink-3); }
.pd-edit { display: none; }

/* ---- 37.3 日记入口：一整条，不是四分之一块 ---- */
#pdDiary {
  display: flex;
  flex-direction: column;
  margin-top: 10px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--card);
  box-shadow: var(--sh-paper);
}
#pdDiary .pd-k { font-size: 11.5px; }
#pdDiary .pd-v { font-size: 17px; }
#pdDiary .pd-n { font-size: 12px; }

.home-sec { margin-top: 18px; }
.home-sec h3 {
  padding-left: 0;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: .01em;
}
.home-sec h3::before { display: none; }
.home-sec .row-between { margin-bottom: 8px; }

.care { gap: 0; }
.care-row {
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  box-shadow: none;
  padding: 12px 14px;
  background: var(--card);
}
.care-row:first-child { border-radius: var(--r-card) var(--r-card) 0 0; }
.care-row:last-child { border-radius: 0 0 var(--r-card) var(--r-card); border-bottom: 0; }
.care-row:only-child { border-radius: var(--r-card); }
.care-when { background: var(--brand-tint); color: var(--brand); }

.card.home-mem { border-radius: var(--r-card); }

/* 37.4 底栏 / 建议条 / 快捷栏：底色是写死的暖米白，这里换成深蓝草地这一套 */
body.home-scene .tabbar,
.tabbar {
  background: rgba(247, 245, 238, .94);
  border-top: 1px solid var(--line);
}
.tabbar a.on { color: var(--brand); }
.tabbar a.on svg {
  background: var(--brand);
  stroke: #F7F5EE;
}
.tabbar a.on::after { background: transparent; }

/* AI 建议：不占一张卡，压成一行小字 */
.note-strip {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: 2px 2px 0;
}
.note-row { gap: 8px; }
.note-k { font-size: 11.5px; color: var(--ink-3); }
.note-v, .note-advice { font-size: 12.5px; color: var(--ink-2); }

/* 快捷栏：低优先级，放最后一条 */
.quickbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 18px 16px 0;
  padding: 12px 4px;
  border-radius: var(--r-card);
  background: var(--card);
  border: 1px solid var(--line);
}
.quickbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 11.5px;
}
.quickbar a + a { border-left: 1px solid var(--line-soft); }
.quickbar svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--brand);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.quickbar a:active { transform: translateY(1px); }

/* 顶栏压在画上时，别让铃铛贴着屏幕上沿 */
body.home-scene .topbar { padding-top: 8px; height: auto; min-height: 60px; }
body.home-scene .hero { margin-top: -60px; }

/* 37.5 场景和内容之间不要一条硬线：画面底部渐隐 + 输入条压住接缝 */
body.home-scene .hero { position: relative; }
body.home-scene .hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 76px;
  background: linear-gradient(180deg, rgba(247,245,238,0), rgba(247,245,238,.55) 58%, rgba(247,245,238,.92));
  pointer-events: none;
}
body.home-scene #heroActs {
  position: relative;
  z-index: 3;
  margin-top: -30px;
}
body.home-scene #heroActs .ask-bar {
  box-shadow: 0 10px 24px -16px rgba(10,40,44,.55), 0 1px 0 rgba(255,255,255,.9) inset;
}

/* ==========================================================================
   38. 对齐参考图（2026-11-12）
   顶栏两颗白圆钮 / 一条三格的指标 / 整行日记 / 卡内的「时间+标题+完成」/
   接下来卡 / 快捷条 / 底栏实心青块。37 留下的变量与结构照用，这里只改尺寸与层次。
   ========================================================================== */

/* ---- 38.0 色：调回参考图那几支青。图标是墨青，天空更深一点 ---- */
html[data-theme] {
  --paper: #F8F3EA;
  --paper-2: #F1EBE0;
  --card: #FDF9F2 !important;
  --card-2: #F9F4EA !important;
  --ivory: #FDF9F2 !important;
  --ink: #1C312F !important;
  --ink-2: #55645F !important;
  --ink-3: #8B9590 !important;
  --line: #E4DCCC !important;
  --line-soft: #EFE8DA !important;
  --brand: #265F68;
  --brand-press: #1B4A52;
  --brand-ink: #265F68;
  --brand-soft: #E3EDE8;
  --brand-tint: #EDF3EF;
  --sage: #2C6A64 !important;
  --sage-soft: #E5EFEA !important;
  --r-card: 20px;
  --sh-paper: 0 1px 0 rgba(30, 60, 52, .04), 0 10px 22px -20px rgba(20, 55, 48, .55);
}

/* ---- 38.1 顶栏：画面上只留汉堡和两颗白圆钮，宠物 chip 让位给问候那一行 ---- */
body.home-scene .topbar {
  padding: 10px 16px 0;
  min-height: 64px;
  align-items: center;
}
body.home-scene .topbar .pet-chip { display: none; }
body.home-scene .topbar .menu-btn {
  width: 44px;
  height: 44px;
  margin: 0;
  color: #F3F8F4;
}
body.home-scene .topbar .menu-btn svg { width: 24px; height: 24px; stroke-width: 2; }
body.home-scene .topbar .pet-toggle { display: none; }
body.home-scene .top-right { gap: 12px; }
body.home-scene .topbar .bell {
  width: 44px;
  height: 44px;
  border: 0;
  background: rgba(255, 255, 255, .96);
  color: #1E5B65;
  box-shadow: 0 6px 16px -10px rgba(6, 40, 50, .6);
}
body.home-scene .topbar .bell svg { width: 21px; height: 21px; stroke-width: 1.8; }
body.home-scene .topbar .top-plus svg { width: 20px; height: 20px; stroke-width: 2.1; }

/* ---- 38.2 主视觉：贴顶的一张画，问候压在左上；底部只留一点雾，不要一条硬线 ---- */
body.home-scene .hero {
  margin-top: -64px;
  aspect-ratio: 852 / 676;
}
.hero-greet {
  left: 22px;
  top: 100px;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: .01em;
  color: #F5FAF6;
  text-shadow: 0 2px 10px rgba(4, 34, 44, .38);
  text-decoration: none;
}
.hero-greet:active { opacity: .72; }
.hero-state {
  left: 22px;
  right: auto;
  bottom: 20px;
  padding: 5px 11px;
  background: rgba(253, 249, 242, .9);
  font-size: 11px;
  color: var(--sage);
}
body.home-scene .hero::after {
  height: 30px;
  background: linear-gradient(180deg, rgba(248, 243, 234, 0), rgba(248, 243, 234, .8));
}

/* 说一句那条：参考图没有它，但这是这个 App 的主入口，压成一条细卡，别抢画 */
body.home-scene #heroActs { position: relative; z-index: 3; margin: -26px 16px 0; }
body.home-scene #heroActs .ask-bar {
  padding: 3px 3px 3px 16px;
  border: 1px solid rgba(228, 220, 204, .9);
  border-radius: 999px;
  background: var(--card);
  box-shadow: 0 8px 20px -18px rgba(20, 55, 48, .6);
}
body.home-scene #heroActs .ask-bar:focus-within {
  border-color: rgba(38, 95, 104, .45);
  box-shadow: 0 0 0 3px rgba(38, 95, 104, .1), 0 8px 20px -18px rgba(20, 55, 48, .6);
}
body.home-scene #heroActs .ask-in { height: 40px; font-size: 14.5px; }
body.home-scene #heroActs .ask-in::placeholder { color: #93A09A; }
body.home-scene #heroActs .ask-go {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border-radius: 999px;
  background: var(--brand);
}
body.home-scene #heroActs .ask-go svg { width: 18px; height: 18px; }
body.home-scene #heroActs .ask-mic {
  width: 40px;
  height: 40px;
  color: var(--ink-2);
  border: 0;
  background: none;
}

/* ---- 38.3 指标：一条卡三格，每格「图标 + 标签/数值」，格间一条竖发丝线 ---- */
body.home-scene .pdata {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 12px 16px 0;
  padding: 12px 6px;
  border: 1px solid rgba(228, 220, 204, .8);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--sh-paper);
}
body.home-scene .pd {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  margin: 0;
  padding: 0 6px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  text-align: left;
  color: var(--ink);
}
body.home-scene .pd + .pd { border-left: 1px solid var(--line); }
body.home-scene .pd:active { transform: none; opacity: .72; }
body.home-scene .pd-ico {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  color: var(--brand);
}
body.home-scene .pd-ico svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body.home-scene .pd-txt {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
body.home-scene .pd-k {
  font-size: 13.5px;
  line-height: 1.35;
  letter-spacing: .01em;
  color: var(--ink-2);
  white-space: nowrap;
}
body.home-scene .pd-v {
  font-size: 18px;
  line-height: 1.32;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
  white-space: nowrap;
}
/* 39 像素宽的格子里塞不下第三行；参考图也没有，信息挪去记录页看 */
body.home-scene .pd-n { display: none; }
body.home-scene .pd-edit { display: none; }

/* ---- 38.4 养宠日记：左边一本书，右边一句小字，最后一条细箭头 ---- */
body.home-scene .diary-card,
body.home-scene #pdDiary {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  margin: 12px 16px 0;
  padding: 13px 18px;
  border: 1px solid rgba(228, 220, 204, .8);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--sh-paper);
  color: var(--ink);
  text-decoration: none;
}
body.home-scene .diary-card:active { transform: translateY(1px); }
.diary-ico {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  color: var(--brand);
}
.diary-ico svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.diary-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.diary-t { font-size: 17px; font-weight: 700; letter-spacing: .01em; color: var(--ink); }
.diary-s { font-size: 14px; line-height: 1.4; color: var(--ink-3); }
.diary-chev { margin-left: auto; display: grid; place-items: center; color: #AEB8B2; }
.diary-chev svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- 38.5 今日提醒 / 接下来：标题在卡里，行是「图标 + 时间 + 事 + 完成胶囊」 ---- */
body.home-scene .home-sec { margin: 12px 16px 0; }
body.home-scene #homeCareSec,
body.home-scene #homeNextSec {
  padding: 14px 18px 4px;
  border: 1px solid rgba(228, 220, 204, .8);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--sh-paper);
}
body.home-scene #homeCareSec[hidden],
body.home-scene #homeNextSec[hidden] { display: none; }
.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 2px;
}
.sec-head h3 {
  display: flex;
  align-items: baseline;
  gap: 1px;
  margin: 0;
  padding: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink);
}
.sec-n {
  font-style: normal;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.sec-n:empty { display: none; }
.home-more {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-height: 44px;
  margin-right: -8px;
  padding: 0 8px;
  font-size: 13px;
  color: var(--brand);
  text-decoration: none;
}
.home-more svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.care { display: block; background: none; }
.care-row,
.care-row-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 13px 0;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font: inherit;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.care-row:last-child { border-bottom: 0; }
.care-row:active { opacity: .68; }
.care-ico {
  display: grid;
  place-items: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  color: var(--brand);
}
.care-ico svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.care-time {
  flex: 0 0 auto;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
  color: var(--ink);
}
.care-t {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
}
.care-pill {
  flex: 0 0 auto;
  margin-left: 2px;
  min-width: 64px;
  padding: 7px 15px;
  border: 1.5px solid var(--brand);
  border-radius: 999px;
  background: transparent;
  color: var(--brand);
  font-size: 14px;
  line-height: 1;
  text-align: center;
}
.care-row.done .care-time,
.care-row.done .care-t { color: var(--ink-3); }
.care-row.done .care-t { text-decoration: line-through; text-decoration-thickness: 1px; }
.care-row.done .care-pill {
  border-color: transparent;
  background: var(--brand-soft);
  color: var(--brand);
}
.care-date {
  flex: 0 0 auto;
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.care-when {
  flex: 0 0 auto;
  min-width: 42px;
  margin-left: 4px;
  padding: 0;
  background: none;
  font-size: 13px;
  text-align: right;
  color: var(--ink-3);
}
.care-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.care-main b { font-size: 15.5px; font-weight: 500; color: var(--ink); }
.care-main i {
  font-style: normal;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.care-none { margin: 0; padding: 2px 0 14px; font-size: 13px; line-height: 1.65; color: var(--ink-3); }

/* ---- 38.6 快捷条：四格一条，图标大一点，标签小一点 ---- */
body.home-scene .quickbar {
  margin: 12px 16px 0;
  padding: 14px 2px;
  border: 1px solid rgba(228, 220, 204, .8);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--sh-paper);
}
body.home-scene .quickbar a {
  gap: 7px;
  padding: 2px 0;
  font-size: 11.5px;
  color: var(--ink-2);
}
body.home-scene .quickbar a + a { border-left: 1px solid var(--line-soft); }
body.home-scene .quickbar svg { width: 24px; height: 24px; stroke-width: 1.5; }

/* 最近记录那张卡：同一条语言 */
body.home-scene #homeMemSec .card.home-mem {
  padding: 4px 18px;
  border: 1px solid rgba(228, 220, 204, .8);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--sh-paper);
}

/* ---- 38.7 底栏：当前页是一块实心青的圆角方块，其余是深灰线描 ---- */
.tabbar {
  background: rgba(248, 243, 234, .96) !important;
  border-top: 1px solid rgba(228, 220, 204, .9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  line-height: 1.2;
  color: #5E6B67;
  text-decoration: none;
}
.tabbar a .tb-ic {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 10px;
  transition: background-color .18s ease;
}
.tabbar a svg {
  width: 23px;
  height: 23px;
  padding: 0;
  border-radius: 0;
  background: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tabbar a.on { color: var(--brand); font-weight: 600; }
.tabbar a.on .tb-ic { background: var(--brand); }
.tabbar a.on svg { background: none; stroke: #F8F3EA; stroke-width: 1.8; }
.tabbar a.on::after { display: none; }

/* ---- 38.8 其余页面：同一套卡片语言。只改表面，不动结构与文案 ---- */
.card {
  border-radius: 20px;
  border-color: rgba(228, 220, 204, .85);
  box-shadow: var(--sh-paper);
}
.page-head h1,
.page-head h2 { letter-spacing: -.01em; }

@media (prefers-reduced-motion: reduce) {
  .tabbar a .tb-ic { transition: none; }
}

/* ==========================================================================
   38.9 其余页面的同一套语言
   参考图只画了首页，但卡片、字号、间距、按钮的「说法」得全站一致，
   否则从首页点进提醒/助手就像换了一个 App。
   ========================================================================== */

/* 页头：粗一点的黑字 + 一行灰小字；返回键给足 44 */
.page-head { align-items: center; gap: 10px; padding: 6px 0 2px; }
.page-head h1,
.page-head h2 {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink);
}
.page-head p,
.page-head .lede { font-size: 13px; line-height: 1.6; color: var(--ink-3); }
.back,
.auth-back {
  min-height: 44px;
  font-size: 14px;
  color: var(--ink-2);
}

/* 次级按钮（新建档案 / 我的作品）：一颗描边胶囊，不是淡青方块 */
.btn-mini {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(38, 95, 104, .3);
  border-radius: 999px;
  background: transparent;
  color: var(--brand);
  font-size: 13.5px;
  font-weight: 500;
}
.btn-mini:active { background: var(--brand-soft); }

/* 主按钮：实心墨青，圆角 16，高度 48 */
.btn-primary {
  min-height: 48px;
  border: 0;
  border-radius: 16px;
  background: var(--brand);
  color: #FBF8F1;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: .02em;
}
.btn-primary:active { background: var(--brand-press); }
.btn-ghost {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--ink-2);
  font-size: 15px;
}

/* ---- 提醒页 ---- */
.rem-sec { margin-bottom: 22px; }
.rem-h { gap: 7px; margin-bottom: 10px; }
.rem-h h3 { font-size: 15px; font-weight: 600; color: var(--ink); }
.rem-count { font-size: 12.5px; color: var(--ink-3); }
.rem-list { display: flex; flex-direction: column; gap: 8px; }
.rem-row {
  min-height: 64px;
  padding: 9px 12px 9px 4px;
  border: 1px solid rgba(228, 220, 204, .85);
  border-radius: 18px;
  background: var(--card);
  box-shadow: none;
}
/* 勾还是那 22px 的圈，触达仍是 44：圈画在 ::before 里 */
.rem-tick {
  width: 44px !important;
  height: 44px !important;
  border: 0 !important;
  background: none !important;
  color: var(--brand) !important;
  font-size: 14px !important;
  line-height: 1;
  position: relative;
  display: grid;
  place-items: center;
}
.rem-tick::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 21px;
  height: 21px;
  margin: -10.5px 0 0 -10.5px;
  border: 1.6px solid rgba(38, 95, 104, .45);
  border-radius: 50%;
  background: transparent;
  transition: background-color .16s ease, border-color .16s ease;
}
.rem-row.done .rem-tick::before {
  background: var(--brand);
  border-color: var(--brand);
}
.rem-tt { font-size: 15.5px; font-weight: 500; color: var(--ink); }
.rem-sub { font-size: 12.5px; color: var(--ink-3); }
.rem-del { width: 40px; height: 44px; font-size: 19px; color: #A7B0AA; }
.rem-add,
.rem-ics {
  min-height: 48px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
}
.rem-add {
  border: 0;
  background: var(--brand);
  color: #FBF8F1;
  box-shadow: 0 8px 18px -14px rgba(20, 55, 48, .9);
}
.rem-ics {
  border: 1px solid rgba(228, 220, 204, .95);
  background: var(--card);
  color: var(--ink-2);
  font-weight: 500;
}

/* ---- 助手页：输入条浮起来，气泡圆一点 ---- */
.bubble {
  border-radius: 18px;
  padding: 11px 15px;
  font-size: 15px;
  line-height: 1.7;
}
.bubble.ai { border-color: rgba(228, 220, 204, .9); border-bottom-left-radius: 6px; }
.bubble.me { border-bottom-right-radius: 6px; }
.composer {
  left: 12px;
  right: 12px;
  bottom: calc(var(--tab-h) + 10px + env(safe-area-inset-bottom));
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(228, 220, 204, .9);
  border-radius: 999px;
  background: var(--card);
  box-shadow: 0 12px 28px -22px rgba(15, 45, 40, .75);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  flex-wrap: nowrap;
}
.composer input {
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 14.5px;
  padding: 0 6px 0 10px;
}
.composer input:focus { border: 0; box-shadow: none; }
.plus,
.send { width: 42px; height: 42px; }
.plus { background: var(--paper-2); color: var(--ink-2); }

/* ---- 登录 / 注册 ---- */
.auth-art { border-radius: 20px; }
.auth-h1 { font-size: 24px; font-weight: 600; letter-spacing: .01em; }
.auth-sub { font-size: 13px; line-height: 1.6; color: var(--ink-3); }
.seg {
  padding: 3px;
  border: 1px solid rgba(228, 220, 204, .9);
  border-radius: 999px;
  background: var(--paper-2);
}
.seg-b {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-size: 14.5px;
}
.seg-b.on {
  background: var(--card);
  color: var(--brand);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(30, 55, 48, .1);
}
.inp-wrap {
  min-height: 50px;
  border: 1px solid rgba(228, 220, 204, .95);
  border-radius: 999px;
  background: var(--card);
  padding: 0 6px 0 16px;
}
.inp { height: 48px; font-size: 15px; background: transparent; }
.inp-prefix { color: var(--ink-3); font-size: 14.5px; }
.inp-btn {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--brand);
  font-size: 13.5px;
}
.agree,
.tip-line { font-size: 11.5px; line-height: 1.7; color: var(--ink-3); }

/* ---- 日记：一页一张卡，像真的活页 ---- */
.dbook { border-bottom: 0; padding: 2px 2px 12px; }
.dk { font-size: 11px; letter-spacing: .22em; color: var(--ink-3); }
.dt { font-size: 25px; font-weight: 600; letter-spacing: .01em; }
.ds { font-size: 13px; color: var(--ink-3); }
.dpage {
  margin-bottom: 10px;
  padding: 15px 18px 12px;
  border: 1px solid rgba(228, 220, 204, .85);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--sh-paper);
}
.dp-note { font-size: 15.5px; line-height: 1.75; }
.dp-auto { font-size: 13.5px; line-height: 1.7; }
.dp-photo { border-radius: 12px; }
.dfoot { margin: 16px 0 4px; }

/* ---- 档案页 ---- */
.pets-empty .btn-primary { border-radius: 999px; }
.pet-list .pet-card {
  border: 1px solid rgba(228, 220, 204, .85);
  border-radius: 18px;
  background: var(--card);
  box-shadow: none;
}
.pet-list .pet-card.on { border-color: rgba(38, 95, 104, .45); }

/* 触达补丁：问候那一行与验证码按钮都要 44 */
body.home-scene .hero-greet {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 6px;
  margin-left: -6px;
  left: 16px;
}
.inp-btn { min-height: 44px; }

/* 登录页顶图：跟首页同一张画，只截天上那一条青 */
.auth-art {
  width: 100%;
  height: 148px;
  object-fit: cover;
  object-position: 50% 4%;
  border-radius: 20px;
  border: 1px solid rgba(228, 220, 204, .8);
  box-shadow: var(--sh-paper);
  background: #1B687B;
}

/* ---- 38.10 纵向节奏：容器 gap 和各块 margin 撞在一起会叠成 26px，统一成 12 ---- */
body.home-scene .home { gap: 12px; }
body.home-scene .home > .pdata,
body.home-scene .home > #pdDiary,
body.home-scene .home > .home-sec,
body.home-scene .home > .quickbar,
body.home-scene .home > #homeMemSec { margin-top: 0; margin-bottom: 0; }

/* 卡头那行「全部 ›」要保持 44 的点击高度，但只占 24 的行高（负边距吞掉多余空间） */
body.home-scene .sec-head { margin: 0; }
body.home-scene .home-more { margin-top: -10px; margin-bottom: -10px; }

/* 提醒/接下来的行再收 7px：参考图一行约 48，这里原来 57 */
body.home-scene .care-row,
body.home-scene .care-row-btn { min-height: 46px; padding: 11px 0; }

/* ---- 38.11 空态：还没建档时那一张卡（原来是轮播里的小卡样式，撑不满也压不住） ---- */
body.home-scene #homeEmpty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 0;
  margin: 12px 16px 0;
  padding: 26px 22px 24px;
  border: 1px solid rgba(228, 220, 204, .85);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--sh-paper);
  text-align: center;
  text-decoration: none;
}
body.home-scene #homeEmpty[hidden] { display: none; }
body.home-scene #homeEmpty .pc-plus {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--brand-tint);
  border: 1px solid rgba(38, 95, 104, .16);
  color: var(--brand);
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
}
body.home-scene #homeEmpty > b {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
body.home-scene #homeEmpty > span:last-child {
  display: block;
  max-width: 15em;
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
body.home-scene #homeEmpty > span:last-child { max-width: 20em; }

/* 参考图的指标图标是厚一点的线描（约 30px / stroke 2），原来 25/1.55 偏轻 */
body.home-scene .pd-ico { flex-basis: 30px; width: 30px; height: 30px; }
body.home-scene .pd-ico svg { width: 29px; height: 29px; stroke-width: 1.85; }
body.home-scene .pd { gap: 10px; }

/* 主题色把 --paper / --brand* 写成行内变量；!important 会压住它，那几支交给主题，
   剩下的卡片/墨色/线条固定成参考图那一套，换主题只换一抹青。 */

/* 「档案」卡右边那条箭头：原来是字体里的 ⌄，换成固定线描（.pet-item.open 时仍然转 180°） */
.pet-card .pc-arrow { display: grid; place-items: center; width: 24px; height: 24px; }
.pet-card .pc-arrow svg { display: block; width: 19px; height: 19px; }

/* ---- 38.12 「最近的记录」：虚线太碎、行太挤，收成跟上面几张卡一样的发丝线和行高 ---- */
body.home-scene #homeMemSec > .row-between { margin: 0 0 2px; align-items: center; }
body.home-scene #homeMemSec > .row-between h3 { margin: 0; font-size: 17px; font-weight: 600; color: var(--ink); }
body.home-scene #homeMemSec .home-more { margin-top: -10px; margin-bottom: -10px; }
body.home-scene .home-mem { padding: 4px 16px; }
body.home-scene .home-mem .mem-row {
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}
body.home-scene .home-mem .mem-row:last-child { border-bottom: 0; }
body.home-scene .home-mem .mem-k { background: var(--brand-tint); color: var(--brand); font-size: 11.5px; }
body.home-scene .home-mem .mem-t { min-width: 42px; font-size: 13.5px; }
body.home-scene .home-mem .mem-x { font-size: 14.5px; line-height: 1.4; }
body.home-scene .home-mem .mem-del { display: grid; place-items: center; width: 36px; height: 36px; margin-right: -8px; }
/* 「最近的记录」的标题跟卡里那几行字的左沿对齐（35），别贴着屏幕边 */
body.home-scene #homeMemSec > .row-between { padding: 0 19px; }

/* ==========================================================================
   39. 给它做张背景（/look）：传照片 → 选风格 → 生成
   复用 38 的纸卡语言：20 圆角、发丝线、一支青。出图在本机合成，见 lookgen.js。
   ========================================================================== */

/* ---- 39.1 首页那颗入口小丸：贴在画右下角，不挡问候也不挡输入条 ---- */
body.home-scene .hero-cta {
  position: absolute;
  left: 14px;
  bottom: 66px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .46);
  border-radius: 999px;
  background: rgba(16, 56, 64, .26);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
  backdrop-filter: blur(8px) saturate(1.1);
  color: #FFF6E6;
  font-size: 12.5px;
  line-height: 1;
  text-decoration: none;
  transition: background .18s ease, transform .18s ease;
}
body.home-scene .hero-cta svg { width: 14px; height: 14px; flex: none; }
body.home-scene .hero-cta b { font-weight: 600; letter-spacing: .01em; }
body.home-scene .hero-cta:active { transform: scale(.97); background: rgba(16, 56, 64, .4); }
@media (prefers-reduced-motion: reduce) {
  body.home-scene .hero-cta { transition: none; }
}

/* ---- 39.2 页头与说明 ---- */
.look { padding: 0 2px 28px; }
.look .page-head { margin-bottom: 8px; }
.look-lead {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.72;
  color: var(--ink-2);
}
.look-lead b { color: var(--ink); font-weight: 600; }

/* ---- 39.3 三步指示 ---- */
.steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
.steps li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  font-size: 12.5px;
  color: var(--ink-3);
}
.steps li + li::before {
  content: "";
  position: absolute;
  right: calc(100% - 30px);
  left: -22px;
  top: 50%;
  height: 1px;
  background: var(--line);
}
.steps li i {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
}
.steps li.on { color: var(--ink); font-weight: 600; }
.steps li.on i { border-color: var(--brand); background: var(--brand); color: #FFF7EE; }
.steps li.done i { border-color: var(--brand); color: var(--brand); }
.steps li.done::after {
  content: "";
  position: absolute;
  left: 60px;
  top: 50%;
  width: 46px;
  height: 1px;
  background: var(--brand);
  opacity: .5;
}

/* ---- 39.4 第①步：传照片 ---- */
.lstep { display: none; }
.lstep.on { display: block; animation: lstepIn .22s ease both; }
@keyframes lstepIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .lstep.on { animation: none; }
}
.lupl {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 244px;
  padding: 18px;
  border: 1.5px dashed rgba(38, 95, 104, .34);
  border-radius: 20px;
  background: var(--card);
  cursor: pointer;
  overflow: hidden;
}
.lupl.over { border-color: var(--brand); background: var(--brand-tint); }
.lupl.has { padding: 0; border-style: solid; border-color: transparent; }
.lupl img { width: 100%; height: 100%; max-height: 52vh; object-fit: contain; background: var(--paper-2); }
.lupl-empty { display: grid; justify-items: center; gap: 8px; text-align: center; }
.lupl.has .lupl-empty { display: none; }
.lupl-plus {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: var(--brand-tint);
  color: var(--brand);
}
.lupl-plus svg { width: 24px; height: 24px; }
.lupl-empty b { font-size: 15px; font-weight: 600; color: var(--ink); }
.lupl-hint { font-size: 12.5px; color: var(--ink-3); }
.lhint { margin: 10px 2px 0; font-size: 12px; line-height: 1.6; color: var(--ink-3); }
.lhint a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.lrow { display: flex; gap: 10px; margin-top: 16px; }
/* 这两个按钮在别处是「整行一块」（width:100% + margin-top），并排放会把彼此挤出去 */
.lrow > .btn-primary,
.lrow > .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 0 18px;
  white-space: nowrap;
}
.lrow > .btn-primary { flex: 1 1 auto; }
.lrow > .btn-ghost { flex: 0 0 auto; }
.lrow [disabled] { opacity: .45; pointer-events: none; }
.ltext {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--ink-3);
  font-size: 12.5px;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- 39.5 第②步：四张风格卡 ---- */
.lgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lstyle {
  display: grid;
  gap: 3px;
  padding: 7px 7px 10px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.lstyle-art {
  display: block;
  overflow: hidden;
  margin-bottom: 6px;
  border-radius: 12px;
  background: var(--paper-2);
  aspect-ratio: 1 / 0.86;   /* 矮一点：360 宽的机器上，四张卡 + 按钮才同屏放得下 */
}
.lstyle-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lstyle b { font-size: 14px; font-weight: 600; color: var(--ink); }
.lstyle-note { font-size: 11.5px; line-height: 1.5; color: var(--ink-3); }
.lstyle.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }

/* ---- 39.6 第③步：画的过程与结果 ---- */
.lgen {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(228, 220, 204, .9);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--sh-paper);
}
.lgen-art {
  position: relative;
  flex: none;
  width: 92px;
  height: 74px;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(140deg, #1B687B, #2E7C86 45%, #93A37F);
}
.lgen-skel {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, .45) 50%, rgba(255, 255, 255, 0) 80%);
  transform: translateX(-100%);
  animation: lgenSweep 1.15s ease-in-out infinite;
}
@keyframes lgenSweep { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
  .lgen-skel { animation: none; opacity: .35; }
}
.lgen-txt { flex: 1; min-width: 0; display: grid; gap: 4px; }
.lgen-txt b { font-size: 15px; font-weight: 600; color: var(--ink); }
.lgen-txt span { font-size: 12.5px; color: var(--ink-3); }
.lbar {
  overflow: hidden;
  height: 4px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--line-soft);
}
.lbar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--brand);
  transition: width .45s ease;
}
@media (prefers-reduced-motion: reduce) {
  .lbar i { transition: none; }
}
.ldone-art {
  overflow: hidden;
  border-radius: 20px;
  background: var(--paper-2);
  box-shadow: var(--sh-paper);
}
.ldone-art img { display: block; width: 100%; aspect-ratio: 852 / 676; object-fit: cover; }
.ldone-txt { margin: 12px 2px 0; font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }

/* ---- 39.7 「做表情包」空态下面那张入口卡（链到 /look） ---- */
.look-entry {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 12px;
  color: var(--ink);
  text-decoration: none;
}
.look-entry-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--brand-tint);
  color: var(--brand);
}
.look-entry-ico svg { width: 21px; height: 21px; }
.look-entry-txt { display: grid; gap: 2px; min-width: 0; }
.look-entry-txt b { font-size: 14.5px; font-weight: 600; }
.look-entry-txt i { font-size: 12.5px; line-height: 1.5; font-style: normal; color: var(--ink-3); }
.look-entry-chev { flex: none; margin-left: auto; color: var(--ink-3); }
.look-entry-chev svg { width: 18px; height: 18px; display: block; }

/* 已经换过背景时的那一行：一句状态 + 一个换回默认的出口 */
.lhero-now {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 10px;
  margin: -6px 0 14px;
  padding: 10px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--brand-tint);
  font-size: 12.5px;
  color: var(--ink-2);
}
.lhero-now .ltext { margin: 0; padding: 4px 0; color: var(--brand); }

/* 27.21 备案号：底部居中公示（法条硬要求），跟着内容走、不压 tabbar */
.beian-bar{text-align:center;font-size:12px;line-height:1.7;padding:24px 0 10px;color:var(--ink-3,#8b94a4);opacity:.9}
.beian-bar a{color:inherit;text-decoration:none}
.beian-bar a:hover{text-decoration:underline}
