/* 宠物工作台基础样式：治愈可爱卡片风，禁企业后台视觉 */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scrollbar-gutter: stable; }
body {
  font-family: -apple-system, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--workspace-gradient);
  color: var(--text);
  min-height: 100dvh;
  /* 屏蔽浏览器手势：只允许纵向滚动；禁横向滑返回、双指页面缩放、边缘回弹 */
  touch-action: pan-y;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
input, textarea { -webkit-user-select: text; user-select: text; }
body.in-app { padding-bottom: 0; }
body.no-tabbar { padding-bottom: 0; }
body.no-tabbar .tabbar { display: none; }
.hidden { display: none !important; }

/* ---- 裸列式 App 壳 ---- */
.app {
  max-width: 430px; margin: 0 auto; min-height: 100dvh; background: var(--bg);
  /* iPhone 刘海/灵动岛与主屏 standalone 底部手势区：内容和 Tab 都不贴边。 */
  padding-top: env(safe-area-inset-top);
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}
@media (min-width: 768px) {
  .app {
    margin: 26px auto; min-height: calc(100dvh - 52px);
    border-radius: 28px; box-shadow: 0 20px 60px rgba(120, 90, 70, .16);
    overflow: hidden;
  }
}
.view { padding: 14px 14px 32px; }

/* ---- 底部导航 ---- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(100%, 430px);
  display: flex; background: var(--surface);
  border-top: 1px solid var(--tile-bg); padding: 8px 0 calc(6px + env(safe-area-inset-bottom));
  z-index: 40;
}
@media (min-width: 768px) { .tabbar { bottom: 26px; border-radius: 0 0 28px 28px; } }
.tab { flex: 1; text-align: center; font-size: 20px; color: var(--muted); background: none; border: none; cursor: pointer; padding: 4px 0; }
.tab span { display: block; font-size: 10px; margin-top: 1px; }
.tab.on, .tab.on span { color: var(--accent); font-weight: 600; }

/* ---- 卡片与按钮 ---- */
.card { background: var(--surface); border-radius: var(--radius-lg); padding: 14px; box-shadow: var(--shadow); margin-bottom: 12px; }
.card-t { font-size: 13px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.card-d { font-size: 12px; color: var(--muted); margin-top: 4px; }
.btn { display: block; width: 100%; border: none; border-radius: 999px; padding: 14px; font-size: 16px; font-weight: 600; cursor: pointer; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .08); }
.btn-soft { background: var(--tile-bg); color: var(--text); }
.btn:active { transform: scale(.97); }
.btn-sticky { position: sticky; bottom: 100px; margin-top: 8px; }

/* ---- Pill 选择器 ---- */
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  border: 1.5px solid var(--tile-bg); background: var(--surface); color: var(--text);
  border-radius: 999px; padding: 8px 14px; font-size: 13px; cursor: pointer;
}
.pill.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

/* ---- 今日状态 2×2 色块 ---- */
.tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.tile { background: var(--tile-bg); border-radius: var(--radius-md); padding: 12px 6px 10px; text-align: center; }
.tile b { display: block; font-size: 22px; font-weight: 400; }
.tile i { display: block; font-style: normal; font-size: 11px; color: var(--text); margin-top: 3px; }

/* ---- 底部弹层 ---- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(40, 25, 15, .30); z-index: 60; display: flex; align-items: flex-end; }
@media (min-width: 768px) {
  .sheet-backdrop {
    left: 50%; right: auto; transform: translateX(-50%);
    width: min(100%, 430px); border-radius: 28px; overflow: hidden;
    padding-bottom: 26px;
  }
}
.sheet { width: min(100%, 430px); margin: 0 auto; background: var(--surface); border-radius: 22px 22px 0 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); animation: sheet-in .28s cubic-bezier(.32, .72, .25, 1); max-height: 88dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
@keyframes sheet-in { from { transform: translateY(40%); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet h3 { font-size: 16px; margin-bottom: 14px; }
.sheet .btn { margin-top: 14px; }

/* ---- 输入 ---- */
.input {
  width: 100%; border: 1.5px solid var(--tile-bg); background: var(--bg);
  border-radius: var(--radius-sm); padding: 12px; font-size: 15px; color: var(--text); margin-bottom: 10px;
}
.input:focus { outline: none; border-color: var(--accent); }
button.input.date-field { display: block; text-align: left; font-family: inherit; cursor: pointer; }
.label { font-size: 13px; font-weight: 600; margin: 12px 0 6px; display: block; }

/* ---- 登录页 ---- */
.login { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 80; }
.login-card { width: 100%; max-width: 340px; background: var(--surface); border-radius: 24px; padding: 32px 24px; box-shadow: 0 20px 60px rgba(120, 90, 70, .18); text-align: center; }
.login-card img { width: 72px; height: 72px; border-radius: 20px; }
.login-card h1 { font-size: 22px; margin: 12px 0 6px; }
.login-card p { font-size: 12px; color: var(--muted); margin-bottom: 18px; }

/* ---- 空态 ---- */
.empty { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty .big { font-size: 52px; display: block; margin-bottom: 12px; }
.empty h3 { color: var(--text); font-size: 16px; margin-bottom: 6px; }
.empty p { font-size: 13px; margin-bottom: 16px; }

/* ---- 微动效 ---- */
.paw-pop {
  position: fixed; top: 42%; left: 50%; transform: translate(-50%, -50%);
  font-size: 64px; pointer-events: none; z-index: 90;
  animation: paw-pop .9s ease forwards;
}
@keyframes paw-pop {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(.4); }
  30% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -70%) scale(1); }
}
.toast {
  position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%);
  background: rgba(60, 45, 30, .88); color: #fff; font-size: 13px;
  padding: 10px 18px; border-radius: 999px; z-index: 130; max-width: 86%;
}
.toast.error { background: rgba(190, 70, 50, .92); }

/* ---- 首页 Hero ---- */
.hero { text-align: center; padding: 22px 14px 18px; }
.hero .avatar {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  background: linear-gradient(135deg, #FFE3C2, #FFC9A3);
  display: flex; align-items: center; justify-content: center; font-size: 48px; margin: 0 auto 10px;
  box-shadow: var(--shadow-lg);
}
.hero .nm { font-size: 20px; font-weight: 800; }
.hero .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.hero .days { font-size: 13px; color: var(--accent); font-weight: 700; margin-top: 8px; }

/* ---- 首页 Header 与快速记录 ---- */
.pg-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 2px 6px; }
.pg-head .greet { font-size: 13px; color: var(--muted); }
.pg-head .title { font-size: 17px; font-weight: 800; }
.pg-head .icons { display: flex; gap: 12px; font-size: 18px; }
.sync-cloud.pending { opacity: .55; }
.sync-cloud.syncing { animation: cloud-pulse 1.2s ease infinite; }
@keyframes cloud-pulse { 50% { opacity: .45; } }
.quick { display: flex; gap: 8px; }
.quick .q {
  flex: 1; background: var(--surface); border-radius: var(--radius-md); text-align: center;
  padding: 12px 0 10px; font-size: 22px; box-shadow: var(--shadow); border: none; cursor: pointer;
}
.quick .q span { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }
.sec-t { font-size: 13px; font-weight: 800; margin: 16px 2px 8px; }

/* ---- Onboarding ---- */
.wiz-dots { display: flex; gap: 6px; justify-content: center; margin: 10px 0 18px; }
.wiz-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--tile-bg); }
.wiz-dots i.on { background: var(--accent); width: 18px; border-radius: 4px; }
.wiz-step h2 { font-size: 22px; margin-bottom: 4px; }
.wiz-step .hint { font-size: 15px; color: var(--muted); margin-bottom: 16px; }
.type-row { display: flex; gap: 10px; }
.type-card {
  flex: 1; background: var(--surface); border: 2px solid var(--tile-bg); border-radius: var(--radius-lg);
  padding: 18px 0 14px; text-align: center; font-size: 34px; cursor: pointer;
}
.type-card span { display: block; font-size: 13px; color: var(--text); margin-top: 6px; }
.type-card.on { border-color: var(--accent); background: var(--tile-bg); }
.photo-box {
  border: 2px dashed var(--accent-2); border-radius: var(--radius-lg); padding: 34px 10px;
  text-align: center; color: var(--muted); cursor: pointer; background: var(--surface);
}
.photo-box img { max-width: 150px; max-height: 150px; border-radius: var(--radius-md); }
.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.theme-card { border: 2px solid var(--tile-bg); border-radius: var(--radius-lg); overflow: hidden; cursor: pointer; background: var(--surface); }
.theme-card.on { border-color: var(--accent); }
.theme-card .sw { height: 64px; padding: 10px; display: flex; gap: 4px; align-items: flex-end; }
.theme-card .sw i { flex: 1; height: 100%; border-radius: 8px; }
.theme-card .tn { font-size: 13px; font-weight: 700; padding: 8px 10px 10px; }

/* ---- 我的 ---- */
.mine-row {
  display: flex; align-items: center; gap: 12px; background: var(--surface);
  border-radius: var(--radius-lg); padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow);
  border: none; width: 100%; font-size: 15px; color: var(--text); cursor: pointer; text-align: left;
}
.mine-row .ico { font-size: 22px; }
.mine-row .arrow { margin-left: auto; color: var(--muted); }
.mine-row .sub { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.pet-mini { display: flex; align-items: center; gap: 10px; }
.pet-mini .av { width: 44px; height: 44px; border-radius: 50%; background: var(--tile-bg); display: flex; align-items: center; justify-content: center; font-size: 22px; overflow: hidden; }
.pet-mini .av img { width: 100%; height: 100%; object-fit: cover; }

/* ---- 里程碑 2：健康中心 ---- */
.back-row { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--text); background: none; border: none; cursor: pointer; padding: 6px 0; }
.health-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.health-grid .hg {
  background: var(--surface); border-radius: var(--radius-md); text-align: center;
  padding: 14px 0 12px; font-size: 24px; box-shadow: var(--shadow); border: none; cursor: pointer;
}
.health-grid .hg span { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; }
.hmetric { text-align: center; padding: 18px 0 6px; }
.hmetric .num { font-size: 34px; font-weight: 800; }
.hmetric .unit { font-size: 13px; color: var(--muted); margin-left: 3px; }
.hmetric .delta { font-size: 12px; margin-top: 4px; }
.hmetric .delta.up { color: var(--amber); }
.hmetric .delta.down { color: var(--accent-2); }
.range-row { display: flex; gap: 6px; justify-content: center; margin: 8px 0 2px; }
.range-row .pill { padding: 5px 12px; font-size: 12px; }
.rec-row {
  display: flex; align-items: center; gap: 10px; background: var(--surface);
  border-radius: var(--radius-md); padding: 12px 14px; margin-bottom: 8px; box-shadow: var(--shadow);
  border: none; width: 100%; font-size: 14px; color: var(--text); cursor: pointer; text-align: left;
}
.rec-row .main { flex: 1; min-width: 0; }
.rec-row .main b { display: block; font-size: 14px; }
.rec-row .main span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.rec-row .tag { font-size: 11px; color: var(--accent); font-weight: 700; white-space: nowrap; }
.rec-row .tag.amber { color: var(--amber); }
.fab {
  position: fixed; bottom: 92px; right: max(16px, calc(50% - 199px)); left: auto;
  width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 26px; border: none; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); cursor: pointer; z-index: 30;
}
@media (min-width: 768px) { .fab { bottom: 118px; } }
.attach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.attach-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; cursor: pointer; }
.attach-add {
  border: 1.5px dashed var(--accent-2); border-radius: 10px; aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  color: var(--muted); background: var(--bg); cursor: pointer;
}
.fullimg { position: fixed; inset: 0; background: rgba(20, 12, 8, .92); z-index: 99; display: flex; align-items: center; justify-content: center; }
.fullimg img { max-width: 92%; max-height: 86%; border-radius: 12px; }
.fullimg .fi-close {
  position: absolute; top: 18px; right: 18px; background: rgba(255, 255, 255, .18); color: #fff;
  border: none; border-radius: 50%; width: 36px; height: 36px; font-size: 16px; cursor: pointer;
}
.empty-mini { text-align: center; color: var(--muted); font-size: 12px; padding: 18px 0; }

/* ---- 里程碑 2：提醒 ---- */
.rem-sec { font-size: 12px; font-weight: 800; color: var(--muted); margin: 16px 2px 8px; }
.rem-item {
  display: flex; align-items: center; gap: 12px; background: var(--surface);
  border-radius: var(--radius-md); padding: 13px 14px; margin-bottom: 8px; box-shadow: var(--shadow);
  position: relative; overflow: hidden; transition: transform .22s ease;
}
.rem-item .ric { font-size: 24px; }
.rem-item .rmain { flex: 1; min-width: 0; }
.rem-item .rmain b { display: block; font-size: 14px; }
.rem-item .rmain span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.rem-item.overdue .rmain span { color: var(--amber); }
.rcheck {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--accent-2);
  background: var(--bg); color: #fff; font-size: 15px; cursor: pointer; flex-shrink: 0;
}
.rem-item .rcheck {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--accent-2);
  background: var(--bg); color: #fff; font-size: 15px; cursor: pointer; flex-shrink: 0;
}
.rem-item.done { opacity: .55; }
.rem-item.done .rcheck { background: var(--accent); border-color: var(--accent); }
.rem-item.done .rcheck::after { content: '✓'; }
.rem-item .rdel { background: none; border: none; color: var(--muted); font-size: 14px; cursor: pointer; padding: 4px; }
.rem-item .rswipe {
  position: absolute; top: 0; right: 0; bottom: 0; width: 84px;
  background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; transform: translateX(100%); transition: transform .22s ease; cursor: pointer;
}
.rem-item.swiped { transform: translateX(-84px); }
.bell-dot {
  position: absolute; top: -2px; right: -3px; width: 8px; height: 8px; border-radius: 50%;
  background: #E2574C; border: 1.5px solid var(--surface);
}
.switch { position: relative; width: 46px; height: 26px; display: inline-block; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i {
  position: absolute; inset: 0; background: var(--tile-bg); border-radius: 999px; transition: .2s; cursor: pointer;
}
.switch i::after {
  content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: #fff;
  top: 3px; left: 3px; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(20px); }

/* ---- 里程碑 2：体重图表 ---- */
.wchart { width: 100%; height: auto; display: block; }
.wchart .wg { stroke: var(--tile-bg); stroke-width: 1; }
.wchart .wl { stroke: var(--accent); stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.wchart .wd { fill: var(--accent); }
.wchart .wx { font-size: 8px; fill: var(--muted); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.chart-box { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 12px 10px 6px; margin-bottom: 12px; }

/* ---- 苹果风格日期滚轮 ---- */
.picker-backdrop {
  position: fixed; inset: 0; background: rgba(40, 25, 15, .30); z-index: 120;
  display: flex; align-items: flex-end; justify-content: center;
}
@media (min-width: 768px) {
  .picker-backdrop {
    left: 50%; right: auto; transform: translateX(-50%);
    width: min(100%, 430px); border-radius: 28px; overflow: hidden;
    padding-bottom: 26px;
  }
}
.picker-sheet {
  width: min(100%, 430px); background: var(--surface);
  border-radius: 22px 22px 0 0; padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
  animation: sheet-in .28s cubic-bezier(.32, .72, .25, 1);
}
.picker-bar { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 8px; }
.picker-bar > span { width: 44px; }
.picker-btn { border: none; background: none; font-size: 15px; color: var(--accent); cursor: pointer; padding: 4px 10px; }
.picker-btn.cancel { color: var(--muted); }
.picker-title { font-size: 15px; font-weight: 700; }
.picker-body { display: flex; gap: 10px; position: relative; padding: 0 8px; }
.wheel { flex: 1; height: 220px; overflow-y: auto; scroll-snap-type: y mandatory; padding: 88px 0; scrollbar-width: none; position: relative; z-index: 1; }
.wheel::-webkit-scrollbar { display: none; }
.wheel-item { height: 44px; line-height: 44px; text-align: center; font-size: 17px; color: var(--muted); scroll-snap-align: center; }
.wheel-item.sel { color: var(--text); font-weight: 800; font-size: 20px; }
.picker-highlight {
  position: absolute; top: 88px; left: 18px; right: 18px; height: 44px;
  background: var(--tile-bg); border: 2px solid var(--accent); border-radius: 10px; pointer-events: none;
}
.wheel-caps { display: flex; gap: 10px; padding: 4px 8px 0; }
.wheel-caps span { flex: 1; text-align: center; font-size: 11px; color: var(--muted); }

/* ---- 苹果风左滑操作（提醒） ---- */
.rem-wrap { position: relative; overflow: hidden; border-radius: var(--radius-md); margin-bottom: 8px; box-shadow: var(--shadow); background: var(--surface); }
.rem-wrap .rem-item { box-shadow: none; margin-bottom: 0; border-radius: 0; }
.rem-actions { position: absolute; top: 0; right: 0; bottom: 0; display: flex; width: 132px; }
.rem-actions button { flex: 1; border: none; color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; }
.rem-act-edit { background: var(--accent-2); }
.rem-act-del { background: #E2574C; }
.rem-item .rrestore { background: none; border: none; color: var(--accent); font-size: 15px; cursor: pointer; padding: 4px; }

/* ---- 里程碑 3：相册 ---- */
.album-grid { columns: 2; column-gap: 8px; }
.m-item { break-inside: avoid; margin-bottom: 8px; border-radius: 12px; overflow: hidden; position: relative; cursor: pointer; box-shadow: var(--shadow); background: var(--tile-bg); }
.m-item img { width: 100%; display: block; }
.m-badge { position: absolute; top: 6px; left: 6px; font-size: 10px; color: #fff; background: rgba(0, 0, 0, .45); padding: 2px 7px; border-radius: 999px; }
.m-badge.fav { left: auto; right: 6px; background: rgba(220, 60, 80, .6); }
.m-badge.sb { background: rgba(140, 110, 70, .6); }
.m-video { width: 100%; aspect-ratio: 1; background: #1c1c1e; display: flex; align-items: center; justify-content: center; color: #fff; position: relative; }
.m-play { font-size: 26px; opacity: .85; }
.m-dur { position: absolute; right: 6px; bottom: 6px; font-size: 10px; background: rgba(0, 0, 0, .5); padding: 2px 6px; border-radius: 999px; }
.d-act { background: rgba(255, 255, 255, .16); color: #fff; border: none; border-radius: 999px; padding: 8px 12px; font-size: 13px; cursor: pointer; }
.d-act.danger { background: rgba(210, 60, 45, .7); }

/* ---- 里程碑 3：时间线 / 手账 ---- */
.tl-card { display: flex; gap: 10px; background: var(--surface); border-radius: var(--radius-md); padding: 12px 14px; margin-bottom: 8px; box-shadow: var(--shadow); cursor: pointer; }
.tl-node { display: flex; gap: 10px; padding: 8px 6px; cursor: pointer; border-bottom: 1px dashed var(--tile-bg); font-size: 13px; }
.tl-ico { font-size: 22px; }
.tl-main { flex: 1; }
.tl-main b { display: block; font-size: 14px; }
.tl-main span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.past-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; }
.past-card { flex: 0 0 120px; background: var(--surface); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; }
.past-card img { width: 120px; height: 100px; object-fit: cover; display: block; }
.past-emo { width: 120px; height: 100px; display: flex; align-items: center; justify-content: center; font-size: 34px; background: var(--tile-bg); }
.past-t { font-size: 11px; padding: 6px 8px 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.past-y { font-size: 10px; color: var(--muted); padding: 2px 8px 8px; }
.sc-card { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 12px; margin: 14px 8px 18px; cursor: pointer; text-align: center; }
.sc-card img { max-width: 100%; max-height: 260px; border-radius: 8px; }
.sc-empty { font-size: 44px; padding: 40px 0; color: var(--muted); }
.sc-date { font-size: 11px; color: var(--accent); font-weight: 800; text-align: left; }
.sc-title { font-size: 14px; font-weight: 700; margin-top: 8px; }
.sc-canvas { position: relative; aspect-ratio: 3 / 4; border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; touch-action: none; }
.sc-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 12px; }
.sc-slot { background: rgba(255, 255, 255, .6); border: 2px dashed var(--accent-2); border-radius: 10px; min-height: 90px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; cursor: pointer; overflow: hidden; }
.sc-slot.has { border-style: solid; }
.sc-slot img { width: 100%; height: 100%; object-fit: cover; }
.sc-stickers { position: absolute; inset: 0; pointer-events: none; }
.sc-stickers .stk { position: absolute; pointer-events: auto; font-size: 34px; cursor: grab; transform: translate(-50%, -50%); }
.stk.sel { border-radius: 8px; }
.stk-ctl { position: fixed; bottom: 120px; left: 50%; transform: translateX(-50%); background: var(--surface); border-radius: 999px; box-shadow: var(--shadow-lg); padding: 6px 10px; display: flex; gap: 6px; z-index: 65; }
.stk-ctl button { border: none; background: var(--tile-bg); border-radius: 999px; width: 34px; height: 34px; font-size: 15px; cursor: pointer; }
.sticker-btn { border: none; background: var(--surface); border-radius: 10px; width: 38px; height: 38px; font-size: 20px; cursor: pointer; box-shadow: var(--shadow); }

/* ---- 里程碑 3.1：自由手账 ---- */
.sc-free { position: absolute; inset: 0; }
.free-photo { position: absolute; overflow: hidden; border-radius: 8px; cursor: grab; touch-action: none; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.free-photo img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.free-photo.sel { }
.free-text { position: absolute; color: #5C4A3A; white-space: pre-wrap; cursor: grab; touch-action: none; line-height: 1.5; }
.free-text.sel { border-radius: 4px; }
.sc-stickers .stk { touch-action: none; }
.sc-free .stk { touch-action: none; }

/* ---- 真实手账质感 ---- */
.sc-canvas {
  background-image:
    repeating-linear-gradient(0deg, rgba(150, 120, 100, .045) 0 1px, transparent 1px 27px),
    radial-gradient(rgba(150, 120, 100, .05) 1px, transparent 1.4px);
  background-size: auto, 18px 18px;
}
.sc-canvas::after { content: ''; position: absolute; top: 12px; left: 10%; width: 42%; height: 20px; background: rgba(216, 155, 122, .35); transform: rotate(-4deg); border-radius: 2px; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.sc-card { position: relative; }
.sc-card::before { content: ''; position: absolute; top: -8px; left: 20%; width: 58%; height: 20px; background: rgba(216, 155, 122, .4); transform: rotate(2deg); border-radius: 2px; box-shadow: 0 1px 2px rgba(0, 0, 0, .1); z-index: 1; }
.sc-title { font-family: "KaiTi", "STKaiti", "Kaiti SC", serif; }
.sc-date { font-family: "KaiTi", "STKaiti", "Kaiti SC", serif; font-size: 12px; }

/* ---- 首页回忆合并区块（并排 + 堆叠） ---- */
.mem-merge { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 6px; }
.mem-merge.single { grid-template-columns: 1fr; }
.mem-card { position: relative; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 10px 8px 8px; cursor: pointer; min-height: 92px; }
.mem-stack { position: relative; height: 66px; }
.mem-stack img { position: absolute; width: 52px; height: 52px; object-fit: cover; border-radius: 10px; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
.mem-stack .mem-emo { position: absolute; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; font-size: 24px; background: var(--tile-bg); border-radius: 10px; }
.mem-stack i { position: absolute; right: 2px; bottom: 0; background: var(--accent); color: #fff; font-style: normal; font-size: 10px; border-radius: 999px; padding: 1px 6px; }
.mem-t { font-size: 12px; font-weight: 700; margin-top: 2px; }
.mem-y { font-size: 10px; color: var(--muted); margin-top: 2px; }
/* 时间线堆叠缩小 */
.tl-stack { width: 46px; height: 46px; }
.tl-stack img { width: 32px; height: 32px; top: 4px; left: 5px; border-radius: 7px; }
.tl-stack i { font-size: 10px; }

/* ---- 相册缩放时间线 ---- */
.alb-grid { display: grid; gap: 6px; margin-bottom: 10px; }
.alb-grid .m-item { margin-bottom: 0; }
.alb-grid .m-item img { aspect-ratio: 1; object-fit: cover; width: 100%; height: 100%; }
.alb-group-h { font-size: 12px; font-weight: 800; color: var(--muted); margin: 10px 2px 6px; }
.m-single { margin-bottom: 14px; }
.m-single img { width: 100%; display: block; border-radius: 12px 12px 0 0; }
.m-single .m-video { border-radius: 12px 12px 0 0; }
.m-single-meta { background: var(--surface); border-radius: 0 0 12px 12px; box-shadow: var(--shadow); font-size: 11px; color: var(--muted); padding: 7px 10px; }

/* ---- 贴纸盒子模型（与照片同款定位，彻底解决拖动/缩放） ---- */
.stk-box { position: absolute; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; touch-action: none; cursor: grab; pointer-events: auto; user-select: none; -webkit-user-select: none; }
.stk-box span { display: block; line-height: 1; }
.stk-box.sel { border-radius: 8px; }

/* ---- 手账 v3：悬浮工具栏 / 纸张样式 ---- */
.sc-canvas-wrap { position: relative; }
.sc-canvas-wrap .sc-canvas { touch-action: none; }
.sc-tools { position: absolute; right: 8px; top: 64px; display: flex; flex-direction: column; gap: 8px; z-index: 6; touch-action: none; }
.sc-tools button { width: 42px; height: 42px; border-radius: 50%; border: none; background: var(--surface); box-shadow: var(--shadow-lg); font-size: 19px; cursor: pointer; }
.sc-tools .sc-tool-handle { font-size: 13px; color: var(--muted); background: var(--tile-bg); cursor: grab; }
.sc-panel { position: absolute; left: 8px; right: 8px; bottom: 8px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 10px; z-index: 7; max-height: 46%; overflow-y: auto; }
.paper-swatch { display: inline-block; width: 18px; height: 18px; border-radius: 5px; border: 1px solid rgba(0,0,0,.08); background: #FDF8F0; }
.paper-swatch.paper-lines { background-image: repeating-linear-gradient(0deg, rgba(150,130,110,.25) 0 1px, transparent 1px 6px); }
.paper-swatch.paper-grid { background-image: repeating-linear-gradient(0deg, rgba(150,130,110,.25) 0 1px, transparent 1px 6px), repeating-linear-gradient(90deg, rgba(150,130,110,.25) 0 1px, transparent 1px 6px); }
.paper-swatch.paper-dots { background-image: radial-gradient(rgba(150,130,110,.4) 1px, transparent 1.3px); background-size: 7px 7px; }
.paper-swatch.paper-pink { background: #FFF3EF; }
.paper-swatch.paper-mint { background: #F0FAF4; }
.sc-canvas.paper-lines { background-image: repeating-linear-gradient(0deg, rgba(150,130,110,.16) 0 1px, transparent 1px 44px); }
.sc-canvas.paper-grid { background-image: repeating-linear-gradient(0deg, rgba(150,130,110,.16) 0 1px, transparent 1px 44px), repeating-linear-gradient(90deg, rgba(150,130,110,.16) 0 1px, transparent 1px 44px); }
.sc-canvas.paper-dots { background-image: radial-gradient(rgba(150,130,110,.3) 1.2px, transparent 1.5px); background-size: 26px 26px; }

/* ---- 手账 v4：可画风选中框 ---- */
.sc-tools.collapsed button:not(.sc-tool-handle) { display: none; }
#sel-overlay { position: absolute; border: 2px solid #8B5CF6; border-radius: 6px; pointer-events: none; z-index: 8; box-sizing: border-box; }
#sel-overlay .sel-h { position: absolute; touch-action: none; width: 14px; height: 14px; background: #fff; border: 2px solid #8B5CF6; border-radius: 50%; pointer-events: auto; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
#sel-overlay .sel-h[data-h="nw"] { left: -7px; top: -7px; cursor: nwse-resize; }
#sel-overlay .sel-h[data-h="ne"] { right: -7px; top: -7px; cursor: nesw-resize; }
#sel-overlay .sel-h[data-h="sw"] { left: -7px; bottom: -7px; cursor: nesw-resize; }
#sel-overlay .sel-h[data-h="se"] { right: -7px; bottom: -7px; cursor: nwse-resize; }
#sel-overlay .sel-h.sq { border-radius: 3px; width: 12px; height: 12px; display: none; }
#sel-overlay .sel-h.sq[data-h="w"] { left: -6px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }
#sel-overlay .sel-h.sq[data-h="e"] { right: -6px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }
#sel-overlay.is-text .sel-h.sq { display: block; }
#sel-overlay .sel-rot { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 18px; width: 32px; height: 32px; background: #fff; border: 2px solid #8B5CF6; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; color: #8B5CF6; pointer-events: auto; cursor: grab; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
#sel-overlay .sel-rot::before { content: ''; position: absolute; bottom: 30px; left: 50%; width: 2px; height: 14px; background: #8B5CF6; }
#sel-overlay .sel-size { position: absolute; top: -28px; right: -8px; background: #8B5CF6; color: #fff; font-size: 10px; border-radius: 6px; padding: 2px 8px; pointer-events: none; display: none; white-space: nowrap; }
#sel-overlay.resizing .sel-size { display: block; }
.sc-panel-close { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: none; border-radius: 50%; background: var(--tile-bg); color: var(--muted); font-size: 12px; cursor: pointer; z-index: 2; }
.sc-panel { padding-top: 8px; }

/* ---- 里程碑 4：装扮 ---- */
.sel-canvas { position: relative; border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; touch-action: pan-y; background: #fff; }
.ds-layer { position: absolute; inset: 0; }
.ds-el { position: absolute; cursor: grab; touch-action: none; transform-origin: center; user-select: none; -webkit-user-select: none; }
.ds-el img { width: 100%; pointer-events: none; }
.ds-el.sticker { display: flex; align-items: center; justify-content: center; }
.ds-el.sel { outline: 1px dashed rgba(139, 92, 246, .4); }
.checker { background-image: conic-gradient(#e8e8e8 25%, #f7f7f7 0 50%, #e8e8e8 0 75%, #f7f7f7 0); background-size: 20px 20px; }
.acc-btn { width: 52px; height: 52px; border: none; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow); cursor: pointer; padding: 4px; }
.acc-btn img { width: 100%; height: 100%; object-fit: contain; }

/* ---- 装扮面板紧凑横滑 ---- */
.ds-scroll { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.ds-scroll .acc-btn { flex: 0 0 52px; }
.ds-scroll .sticker-btn { flex: 0 0 auto; }

/* ---- 装扮面板（普通流式布局，非浮层） ---- */
.ds-panel { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 12px; margin-top: 10px; }
.ds-el.sticker { aspect-ratio: 1; }
.alb-grid .m-item.m-cutout img { object-fit: contain; background: #fff; }

/* ---- 首页试用/激活可爱提示条 ---- */
.trial-banner { display: flex; align-items: center; gap: 8px; background: var(--tile-bg); border: 1.5px dashed var(--accent-soft, #E8C8A0); border-radius: 16px; padding: 10px 12px; margin: 4px 0 10px; position: relative; overflow: hidden; }
.trial-banner .tb-pet { font-size: 22px; }
.trial-banner .tb-text { flex: 1; font-size: 12.5px; color: var(--text); line-height: 1.5; }
.trial-banner .tb-text b { color: var(--accent-2, #E8956C); }
.trial-banner .tb-btn { border: none; background: var(--accent); color: #fff; border-radius: 999px; padding: 7px 14px; font-size: 12px; font-weight: 700; cursor: pointer; box-shadow: 0 2px 8px rgba(232, 149, 108, .35); flex: 0 0 auto; }
.trial-banner .tb-paw { position: absolute; right: -4px; bottom: -6px; font-size: 26px; opacity: .18; transform: rotate(-15deg); pointer-events: none; }
.trial-banner.expired { background: #FFF6EE; border-color: #F0C8A8; }

/* ===== M6 商用离线激活 ===== */
.activation-summary-card { border: 1px solid rgba(124, 192, 168, .28); }
.activation-status { margin-left: auto; color: var(--accent); font-size: 12px; font-weight: 700; }
.activation-status.expired { color: var(--amber); }
.activation-entry { margin-top: 12px; padding: 11px; font-size: 14px; }
.activation-request-card { background: linear-gradient(145deg, var(--surface), var(--tile-bg)); }
.activation-request-code {
  display: block; width: 100%; margin: 10px 0; padding: 11px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .68); color: var(--text); font: 600 12px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere; -webkit-user-select: text; user-select: text;
}
.activation-copy { padding: 11px; font-size: 14px; }
.activation-code { min-height: 112px; resize: vertical; line-height: 1.45; }
.activation-result { min-height: 18px; margin: 4px 0 10px; color: var(--muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.activation-result.error { color: var(--red); }

/* ===== Weight Workspace 专属组件（M1） ===== */
.view-head { padding: 8px 2px 4px; }
.view-head h1 { font-size: 22px; margin: 0; }
.view-head .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.card-title { font-size: 13px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.list-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 2px; font-size: 14px; border-bottom: 1px solid var(--tile-bg); }
.list-row:last-child { border-bottom: none; }
.list-row b { font-weight: 700; }
.list-row.muted { color: var(--muted); font-size: 13px; }
.stat-row { display: flex; gap: 8px; }
.stat { flex: 1; text-align: center; background: var(--tile-bg); border-radius: var(--radius-sm); padding: 10px 4px 8px; }
.stat .v { font-size: 17px; font-weight: 800; color: var(--accent); }
.stat .k { font-size: 11px; color: var(--muted); margin-top: 3px; }
.field { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 4px; }
.field .input { margin-top: 6px; }
.foot-hint { font-size: 11px; color: var(--muted); text-align: center; margin: 16px 8px 8px; line-height: 1.6; }
.hero .h-num { font-size: 56px; font-weight: 800; color: var(--text); line-height: 1.1; }
.hero .h-num i { font-style: normal; font-size: 18px; color: var(--muted); margin-left: 4px; }
.hero .h-sub { font-size: 14px; color: var(--muted); margin-top: 8px; }
.quick-row { display: flex; gap: 10px; margin-bottom: 12px; }
.quick-card { flex: 1; background: var(--surface); border: none; border-radius: var(--radius-lg); padding: 14px 6px 12px; box-shadow: var(--shadow); font-size: 22px; cursor: pointer; }
.quick-card:active { transform: scale(.97); }
.quick-card span { display: block; font-size: 12px; color: var(--text); font-weight: 700; margin-top: 4px; }
.mode-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mode-card { border: 2px solid var(--tile-bg); background: var(--surface); border-radius: var(--radius-lg); padding: 12px 6px 10px; text-align: center; cursor: pointer; }
.mode-card .me { display: block; font-size: 24px; }
.mode-card b { display: block; font-size: 14px; margin-top: 6px; }
.mode-card i { display: block; font-style: normal; font-size: 11px; color: var(--muted); margin-top: 3px; }
.mode-card.on { border-color: var(--accent); background: var(--tile-bg); }
.act-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.act-card { border: 2px solid var(--tile-bg); background: var(--surface); border-radius: var(--radius-lg); padding: 12px 10px; cursor: pointer; text-align: left; }
.act-card b { display: block; font-size: 14px; }
.act-card i { display: block; font-style: normal; font-size: 11px; color: var(--muted); margin-top: 4px; }
.act-card.on { border-color: var(--accent); background: var(--tile-bg); }
.preset-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.preset-card { border: 2px solid var(--tile-bg); background: var(--surface); border-radius: var(--radius-lg); padding: 12px 10px; cursor: pointer; text-align: left; }
.preset-card b { display: block; font-size: 14px; }
.preset-card i { display: block; font-style: normal; font-size: 11px; color: var(--muted); margin-top: 4px; }
.preset-card.on { border-color: var(--accent); background: var(--tile-bg); }
.pill i { display: block; font-style: normal; font-size: 10px; font-weight: 400; opacity: .85; margin-top: 1px; }
.tip-card { background: var(--tile-bg); border-radius: var(--radius-md); padding: 14px 16px; font-size: 15px; line-height: 1.7; margin-bottom: 10px; }
.tip-card b { color: var(--accent); }
.card .hint { font-size: 13px; color: var(--muted); line-height: 1.6; }
.hint.warn { color: var(--amber); font-size: 14px; }
.list-row.warn { color: var(--amber); }
.list-row.warn b { font-weight: 700; }
.tip-card.warn-tip { border: 1.5px solid var(--amber); }

/* ===== M2 体重系统 ===== */
.stat .ks { font-size: 10px; color: var(--muted); margin-top: 2px; }
.rec-btn { flex: 1; background: var(--surface); border: none; border-radius: var(--radius-lg); padding: 16px 6px 12px; box-shadow: var(--shadow); font-size: 24px; cursor: pointer; }
.rec-btn:active { transform: scale(.97); }
.rec-btn span { display: block; font-size: 14px; color: var(--text); font-weight: 700; margin-top: 6px; }
.rec-btn i { display: block; font-style: normal; font-size: 11px; color: var(--muted); margin-top: 4px; }
.row2 { display: flex; align-items: flex-start; }
.time-field { display: block; width: 100%; border: 1.5px solid var(--tile-bg); background: var(--surface); border-radius: var(--radius-sm); padding: 12px 10px; font-size: 14px; color: var(--text); cursor: pointer; text-align: center; }
.range-pill { padding: 5px 12px; font-size: 12px; }
.wchart .wl-evening { stroke: #C9C4B0; stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.wchart .wl-morning { stroke: #7CC0A8; stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.wchart .wl-trend { stroke: #4F9D8A; stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.wchart .wd-evening { fill: #C9C4B0; }
.wchart .wd-morning { fill: #7CC0A8; }
.legend-row { display: flex; gap: 14px; justify-content: center; margin-top: 4px; font-size: 11px; color: var(--muted); }
.legend-row i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }
.wgroup-h { font-size: 12px; font-weight: 800; color: var(--muted); margin: 12px 2px 6px; }
.wrow { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-bottom: 1px solid var(--tile-bg); cursor: pointer; }
.wrow:last-child { border-bottom: none; }
.wrow-emo { font-size: 20px; }
.wrow-main { flex: 1; min-width: 0; }
.wrow-main b { display: block; font-size: 14px; }
.wrow-main i { display: block; font-style: normal; font-size: 11px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wrow-edit { color: var(--muted); font-size: 14px; }

/* ===== M2.1 记录表单/历史折叠 ===== */
.rec-inline { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 4px; }
.rec-inline .time-field { margin-bottom: 2px; }
.wgroup-h { display: flex; justify-content: space-between; align-items: center; cursor: pointer; user-select: none; -webkit-user-select: none; }
.wgroup-h:active { opacity: .7; }
.wgroup-ar { color: var(--accent); font-size: 13px; }

/* ===== M2.2 时间优先选择器 / 三级历史折叠 ===== */
.picker-btn.datechip { color: var(--accent); font-weight: 700; padding-left: 0; }
.wgroup-y { font-weight: 800; font-size: 13px; }
.wgroup-m { padding-left: 10px; }
.wgroup-w { padding-left: 20px; font-size: 11.5px; color: var(--muted); opacity: .78; }
.wk-range { font-style: normal; font-size: 10px; color: var(--muted); opacity: .85; margin-left: 6px; }

/* ===== M3 饮食系统 ===== */
.unit-i { font-style: normal; font-size: 11px; color: var(--muted); }
.chip { display: inline-block; background: var(--tile-bg); color: var(--text); border-radius: 999px; padding: 5px 12px; font-size: 12px; }
.frow { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-bottom: 1px solid var(--tile-bg); cursor: pointer; }
.frow:last-child { border-bottom: none; }
.frow-main { flex: 1; min-width: 0; }
.frow-main b { display: block; font-size: 14px; }
.frow-main i { display: block; font-style: normal; font-size: 11px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frow-go { color: var(--muted); font-size: 15px; }
.popt { display: flex; justify-content: space-between; align-items: center; padding: 11px 12px; border: 1.5px solid var(--tile-bg); border-radius: var(--radius-sm); margin-bottom: 8px; cursor: pointer; font-size: 14px; }
.popt b { color: var(--accent); }
.popt.on { border-color: var(--accent); background: var(--tile-bg); }
.meal-head { display: flex; justify-content: space-between; align-items: center; cursor: pointer; padding: 2px 0; }
.meal-t { font-size: 15px; font-weight: 700; }
.meal-t i { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 6px; font-weight: 400; }
.meal-sub { font-size: 13px; color: var(--muted); }
.meal-ar { color: var(--accent); margin-left: 6px; }
.meal-body { margin-top: 8px; }
.add-btn { padding: 10px; font-size: 14px; margin-top: 8px; }

/* ===== M3.1 单流饮食记录 ===== */
.ftime { font-style: normal; font-weight: 400; color: var(--accent); font-size: 12px; margin-left: 4px; }

/* ===== M3.2 营养信息层级：热量 Hero / PFC 三格 / 钠纤维小字 ===== */
.hmetric .num { font-size: 40px; font-weight: 800; color: var(--accent); }
.hmetric .unit { font-size: 14px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.minor-row { font-size: 12px; color: var(--muted); text-align: center; margin-top: 8px; }

/* ===== M4 饮水杯 / 评价建议 ===== */
.card-sub { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.cup-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.cup { height: 48px; border-radius: 12px; border: 1.5px dashed var(--tile-bg); background: var(--surface); font-size: 19px; cursor: pointer; opacity: .45; display: flex; align-items: center; justify-content: center; transition: all .15s; }
.cup.on { background: linear-gradient(180deg, #E6F4F0, #CDE9E0); border: 1.5px solid var(--accent-2); opacity: 1; }
.cup:active { transform: scale(.94); }

/* ===== M4.2 评价/建议重点加粗 ===== */
.hint b { color: var(--accent); font-weight: 700; }

/* ===== M4.3 饮食趋势图 ===== */
.lc-line { stroke-linecap: round; stroke-linejoin: round; }
.tchart { margin-top: 10px; }
.tchart-t { font-size: 12px; color: var(--muted); margin-bottom: 2px; }

/* ===== M4.4 目标参考线 ===== */
.ref-line { stroke: var(--amber); stroke-width: 1.2; stroke-dasharray: 4 3; }

/* ===== M4.5 分带小图（一图多带，互不重叠） ===== */
.bands { display: flex; flex-direction: column; gap: 6px; }
.band { display: flex; gap: 8px; align-items: center; }
.band-l { width: 78px; flex: 0 0 78px; font-size: 12px; color: var(--text); }
.band-l i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.band-l em { display: block; font-style: normal; font-size: 10px; color: var(--muted); margin-top: 2px; }
.band .wchart { flex: 1; min-width: 0; }

/* ===== M5 AI ===== */
.aic-del { border: none; background: none; color: var(--muted); font-size: 15px; cursor: pointer; padding: 4px; }
.ai-provider-note { font-size: 11px; color: var(--muted); }

/* ===== M5.1 照片识别预览与缩略图 ===== */
.aic-photo { max-width: 100%; max-height: 220px; border-radius: 12px; display: block; margin: 0 auto 10px; }
.fthumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: 0 0 40px; }

/* ===== M5.3 AI确认页数量/单位 ===== */
.aic-qty { display: flex; gap: 4px; flex: 0 0 116px; align-items: center; }
.aic-qty .aic-a { width: 62px; padding-left: 8px; padding-right: 6px; }
.aic-qty .aic-u { width: 50px; padding-left: 6px; padding-right: 4px; }

/* ===== 我的：一级菜单/二级页面 ===== */
.mine-entry { flex: 1; min-width: 0; border: none; background: none; color: var(--text); text-align: left; padding: 0; cursor: pointer; font-size: 15px; }
.mine-entry b { display: block; }
.mine-arrow-btn { border: none; background: none; color: var(--muted); font-size: 20px; padding: 4px; cursor: pointer; }

/* ===== M6 我的-关于：备份恢复与数据管理 ===== */
.data-action-list { border-top: 1px solid var(--tile-bg); }
.data-action {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 2px;
  border: none; border-bottom: 1px solid var(--tile-bg); background: none; color: var(--text);
  font: inherit; text-align: left; cursor: pointer;
}
.data-action:last-child { border-bottom: none; }
.data-action > span:nth-child(2) { flex: 1; min-width: 0; }
.data-action b { display: block; font-size: 14px; }
.data-action i { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-style: normal; line-height: 1.4; }
.data-action .arrow { color: var(--muted); font-size: 18px; }
.data-action-ico { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: var(--tile-bg); font-size: 17px; flex: 0 0 34px; }
.data-action.danger b, .data-action.danger .arrow { color: var(--red); }
.data-action.danger .data-action-ico { background: #FFF1EE; }
.data-action:disabled, .btn:disabled { cursor: not-allowed; opacity: .52; transform: none; }
.data-status, .sheet-status { min-height: 18px; margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.data-status.error, .sheet-status.error { color: var(--red); }
.data-danger-card { border: 1px solid rgba(201, 123, 110, .25); }
.data-confirm-note { padding: 12px; border-radius: var(--radius-sm); background: var(--tile-bg); color: var(--text); font-size: 13px; line-height: 1.55; }
.data-confirm-note b { display: block; margin-bottom: 3px; }
.data-confirm-note p + p { margin-top: 5px; }
.data-confirm-note.danger { background: #FFF1EE; border: 1px solid rgba(201, 123, 110, .3); }
.data-confirm-note.danger b { color: var(--red); }
.data-download-step { width: 100%; margin-top: 12px; }
.data-confirm-check { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; color: var(--text); font-size: 13px; line-height: 1.45; }
.data-confirm-check input { width: 18px; height: 18px; margin: 0; flex: 0 0 18px; accent-color: var(--accent); }
.data-confirm-check input:disabled { opacity: .5; }
.btn-danger { background: var(--red); color: #fff; box-shadow: 0 4px 14px rgba(201, 123, 110, .18); }
.sheet-actions { display: flex; gap: 10px; margin-top: 14px; }
.sheet .sheet-actions .btn { flex: 1; margin-top: 0; padding-left: 8px; padding-right: 8px; }

/* ===== M6 PWA 帮助页 ===== */
.help-view { padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
.help-intro { display: flex; align-items: center; gap: 12px; padding: 8px 2px 14px; }
.help-intro-icon { display: flex; flex: 0 0 44px; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 14px; background: var(--tile-bg); font-size: 23px; }
.help-intro h1 { font-size: 22px; line-height: 1.25; }
.help-intro p { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.help-card { margin-bottom: 12px; padding: 14px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.help-card h2 { margin-bottom: 8px; color: var(--text); font-size: 15px; line-height: 1.45; }
.help-card p, .help-steps { color: var(--muted); font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.help-card p + p { margin-top: 8px; }
.help-card b { color: var(--text); }
.help-steps { padding-left: 20px; }
.help-steps li + li { margin-top: 6px; }
.help-note { margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: var(--tile-bg); color: var(--text) !important; font-size: 12px !important; }
.help-disclaimer { border: 1px solid rgba(201, 123, 110, .28); background: #FFF9F4; }
@media (max-width: 360px) {
  .help-card { padding: 12px; }
  .help-intro { gap: 10px; }
  .help-steps { padding-left: 18px; }
}
