/* ==========================================================================
   减肥搭子 · 移动端样式
   设计基调：浅色、薄荷绿、圆角卡片、足够大的点击区域
   ========================================================================== */

:root {
  --bg: #f1f6f3;
  --card: #ffffff;
  --ink: #16211f;
  --ink-2: #465854;
  --muted: #8b9a96;
  --line: #e7eeea;
  --brand: #16a374;
  --brand-2: #4fc79a;
  --brand-ink: #0c7d59;
  --brand-soft: #e6f7f0;
  --amber: #f2a03d;
  --amber-soft: #fdf3e4;
  --pink: #ef7d99;
  --pink-soft: #fdeef2;
  --blue: #4a9de0;
  --blue-soft: #eaf3fc;
  --danger: #e05a5a;
  --shadow: 0 10px 30px rgba(20, 60, 48, 0.07);
  --shadow-sm: 0 2px 10px rgba(20, 60, 48, 0.05);
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --tab-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", system-ui, sans-serif;
}

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

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body {
  background-image: radial-gradient(120% 60% at 50% 0%, #e8f4ee 0%, rgba(241, 246, 243, 0) 60%);
  background-repeat: no-repeat;
}

button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
a { color: var(--brand-ink); text-decoration: none; }
input, textarea { -webkit-appearance: none; }
::selection { background: var(--brand-soft); }

/* ---------- 骨架 / 启动 ---------- */
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(var(--tab-h) + var(--safe-b) + 12px); }
#app[hidden] { display: none; }

.boot {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px; background: var(--bg); z-index: 60;
}
.boot-logo { font-size: 42px; line-height: 1; filter: drop-shadow(0 6px 14px rgba(22,163,116,.25)); }
.boot-spin {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--brand-soft); border-top-color: var(--brand);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 通用 ---------- */
.view { padding: 18px 16px 8px; animation: fade .26s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.page-title { font-size: 24px; font-weight: 700; letter-spacing: -.4px; margin: 0; }
.page-sub { color: var(--muted); font-size: 13px; margin-top: 3px; }

.card {
  background: var(--card); border-radius: var(--r-lg); padding: 16px;
  box-shadow: var(--shadow); margin-bottom: 14px; border: 1px solid rgba(255,255,255,.7);
}
.card-tight { padding: 12px 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-title { font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 7px; margin: 0; }
.card-title .ic { color: var(--brand); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; }
.mb0 { margin-bottom: 0; }
.nowrap { white-space: nowrap; }
.hide { display: none !important; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ic { width: 18px; height: 18px; display: inline-block; vertical-align: -3px; flex: none; }
.ic-lg { width: 22px; height: 22px; }
.ic-sm { width: 15px; height: 15px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 46px; padding: 0 18px; border-radius: 14px; font-weight: 600; font-size: 15px;
  background: #eef2f0; color: var(--ink); transition: transform .12s ease, opacity .12s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, #23b98a 100%);
  color: #fff; box-shadow: 0 8px 20px rgba(22,163,116,.26);
}
.btn-ghost { background: var(--brand-soft); color: var(--brand-ink); }
.btn-outline { background: #fff; border: 1.5px solid var(--line); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { height: 52px; font-size: 16px; border-radius: 16px; }
.btn-block { display: flex; width: 100%; }
.btn-danger { background: #fdeeee; color: var(--danger); }
.btn[disabled] { opacity: .55; pointer-events: none; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px;
  border-radius: 999px; background: #f2f6f4; color: var(--ink-2); font-size: 12.5px; font-weight: 500;
  border: 1px solid transparent;
}
.chip.on { background: var(--brand-soft); color: var(--brand-ink); border-color: rgba(22,163,116,.18); }
.chip.amber { background: var(--amber-soft); color: #a56a10; }
.chip.pink { background: var(--pink-soft); color: #b94a68; }
.chip.blue { background: var(--blue-soft); color: #2a72ab; }
.chip button { display: flex; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px;
  border-radius: 7px; font-size: 11.5px; font-weight: 600; background: var(--brand-soft); color: var(--brand-ink);
}
.badge.gray { background: #f2f4f3; color: var(--muted); }

.seg { display: flex; background: #eef2f0; border-radius: 13px; padding: 3px; gap: 3px; }
.seg button {
  flex: 1; height: 34px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--muted);
  transition: all .18s;
}
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.input, .textarea, .select {
  width: 100%; background: #f5f8f6; border: 1.5px solid transparent; border-radius: 13px;
  padding: 13px 14px; font-size: 15px; outline: none; transition: border-color .15s, background .15s;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--brand); background: #fff; }
.textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
.input[type="number"] { -moz-appearance: textfield; }
.input::-webkit-outer-spin-button, .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.select { appearance: none; background-image: none; }

.input-wrap { position: relative; }
.input-suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; pointer-events: none; }

.hint { color: var(--muted); font-size: 12px; margin-top: 6px; line-height: 1.5; }
.err { color: var(--danger); font-size: 13px; margin-top: 8px; min-height: 18px; }

/* ---------- 顶部 / 底部 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; background: rgba(241,246,243,.86); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(231,238,234,.7);
}
.topbar .page-title { font-size: 17px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: #fff; box-shadow: var(--shadow-sm); color: var(--ink-2);
}
.icon-btn:active { transform: scale(.94); }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: flex; align-items: stretch; background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  max-width: 480px; margin: 0 auto;
}
.tabbar button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: #a3b0ac; font-size: 10.5px; font-weight: 600; transition: color .15s;
}
.tabbar button.on { color: var(--brand); }
.tabbar .ic { width: 21px; height: 21px; }

/* ---------- 登录 / 注册 ---------- */
.auth-wrap { min-height: 100vh; padding: 46px 22px 30px; display: flex; flex-direction: column; }
.auth-logo {
  width: 62px; height: 62px; border-radius: 20px; display: flex; align-items: center; justify-content: center;
  font-size: 30px; background: linear-gradient(140deg, #d9f4e8, #b7ead6); box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.auth-title { font-size: 26px; font-weight: 750; letter-spacing: -.5px; margin: 0 0 6px; }
.auth-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 22px; line-height: 1.6; }
.auth-card { background: #fff; border-radius: 24px; padding: 20px; box-shadow: var(--shadow); }
.auth-switch { text-align: center; margin-top: 16px; font-size: 13.5px; color: var(--muted); }
.auth-switch b { color: var(--brand-ink); font-weight: 600; }
.auth-foot { margin-top: auto; padding-top: 24px; text-align: center; color: #a9b5b1; font-size: 11.5px; line-height: 1.7; }

/* ---------- 今日页 ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff; border-radius: 24px; padding: 18px 18px 16px;
  background: linear-gradient(145deg, #17a97a 0%, #2cc194 55%, #5fd6ad 100%);
  box-shadow: 0 14px 30px rgba(22,163,116,.24); margin-bottom: 14px;
}
.hero::after {
  content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255,255,255,.12); right: -50px; top: -80px;
}
.hero-top { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; opacity: .92; }
.hero-main { display: flex; align-items: flex-end; gap: 10px; margin: 10px 0 4px; position: relative; }
.hero-weight { font-size: 46px; font-weight: 750; line-height: 1; letter-spacing: -2px; }
.hero-unit { font-size: 15px; font-weight: 600; opacity: .85; margin-bottom: 6px; }
.hero-meta { display: flex; gap: 14px; font-size: 12.5px; opacity: .95; margin-top: 10px; flex-wrap: wrap; }
.hero-meta b { font-weight: 700; }
.hero-actions { display: flex; gap: 8px; margin-top: 14px; }
.hero-btn {
  flex: 1; height: 40px; border-radius: 12px; background: rgba(255,255,255,.18); color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13.5px; font-weight: 600;
  border: 1px solid rgba(255,255,255,.28);
}
.hero-btn.solid { background: #fff; color: var(--brand-ink); border-color: #fff; }

.statgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stat {
  background: #fff; border-radius: var(--r-md); padding: 12px 10px; box-shadow: var(--shadow-sm); text-align: center;
}
.stat .v { font-size: 19px; font-weight: 700; letter-spacing: -.5px; }
.stat .k { font-size: 11px; color: var(--muted); margin-top: 2px; }
.stat .v small { font-size: 11px; font-weight: 600; color: var(--muted); margin-left: 1px; }

/* 打卡列表 */
.cklist { display: flex; flex-direction: column; }
.ck {
  display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line);
}
.ck:last-child { border-bottom: 0; }
.ck-icon {
  width: 40px; height: 40px; border-radius: 13px; display: flex; align-items: center; justify-content: center;
  font-size: 19px; background: #f4f7f5; flex: none;
}
.ck.done .ck-icon { background: var(--brand-soft); }
.ck-main { flex: 1; min-width: 0; }
.ck-label { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.ck.done .ck-label { color: var(--brand-ink); }
.ck-desc { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.ck-desc.late { color: #d0803a; }
.tick {
  width: 30px; height: 30px; border-radius: 50%; border: 1.8px solid #dfe7e3; display: flex;
  align-items: center; justify-content: center; color: transparent; transition: all .18s; flex: none;
}
.ck.done .tick { background: var(--brand); border-color: var(--brand); color: #fff; }
.stepper { display: flex; align-items: center; gap: 8px; flex: none; }
.stepper button {
  width: 30px; height: 30px; border-radius: 50%; background: #f2f6f4; color: var(--ink-2);
  display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 600;
}
.stepper button.plus { background: var(--brand-soft); color: var(--brand-ink); }
.stepper .val { min-width: 46px; text-align: center; font-size: 13.5px; font-weight: 700; }
.bar { height: 6px; border-radius: 4px; background: #eef3f0; overflow: hidden; margin-top: 8px; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .3s; }
.bar.amber > i { background: linear-gradient(90deg, #f0a33d, #f7c06a); }
.bar.blue > i { background: linear-gradient(90deg, #4a9de0, #7fc0f0); }

/* 圆环 */
.ringbox { display: flex; align-items: center; gap: 14px; }
.ring { position: relative; width: 92px; height: 92px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-txt {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.ring .ring-pct { font-size: 21px; font-weight: 750; letter-spacing: -.5px; }
.ring .ring-cap { font-size: 10.5px; color: var(--muted); }

/* 三餐 */
.meals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.meal {
  border-radius: var(--r-md); background: #f5f8f6; padding: 9px 6px 8px; text-align: center;
  border: 1.5px dashed #e2eae6; position: relative; overflow: hidden; min-height: 92px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.meal.has { border-style: solid; border-color: transparent; background: #fff; box-shadow: var(--shadow-sm); }
.meal img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.meal .meal-mask {
  position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.55) 100%);
}
.meal .meal-label { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.meal.has .meal-label { position: relative; color: #fff; }
.meal .meal-emoji { font-size: 18px; opacity: .55; }
.meal.has .meal-emoji { position: relative; opacity: 1; }

/* 体重明细 */
.kv { display: flex; align-items: baseline; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.kv:last-child { border-bottom: 0; }
.kv b { font-weight: 650; }
.kv .k { color: var(--muted); }

/* ---------- 记录时间轴 ---------- */
.datestrip { display: flex; gap: 7px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.datestrip::-webkit-scrollbar { display: none; }
.dchip {
  flex: none; width: 50px; padding: 8px 0 7px; border-radius: 14px; background: #fff; text-align: center;
  box-shadow: var(--shadow-sm); color: var(--ink-2); border: 1.5px solid transparent;
}
.dchip .w { font-size: 10.5px; color: var(--muted); }
.dchip .d { font-size: 16px; font-weight: 700; margin-top: 1px; }
.dchip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.dchip.on .w { color: rgba(255,255,255,.8); }

/* ---------- 记录页日历 ---------- */
.cal-card { padding: 14px 12px 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; padding: 0 2px; }
.cal-title { font-size: 15.5px; font-weight: 700; letter-spacing: .2px; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-arrow {
  width: 30px; height: 30px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand-ink); border: none;
}
.cal-arrow:active { transform: scale(.94); }
.cal-wk, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-wk { margin-bottom: 2px; }
.cal-wk span { text-align: center; font-size: 10.5px; color: var(--muted); padding: 4px 0; }
.cal-grid { row-gap: 3px; }
.cal-cell {
  position: relative; height: 46px; border: none; background: transparent; border-radius: 13px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--ink); font-family: inherit; padding: 0;
}
.cal-cell .dnum { font-size: 14.5px; font-weight: 600; line-height: 1.1; }
.cal-cell .dots { display: flex; gap: 3px; height: 5px; margin-top: 2px; }
.cal-cell .dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--brand); display: block; }
.cal-cell .dots i.amber { background: var(--amber); }
.cal-cell.empty { visibility: hidden; }
.cal-cell.future { color: #bcc7c3; }
.cal-cell.today { box-shadow: inset 0 0 0 1.6px var(--brand); color: var(--brand-ink); }
.cal-cell.on { background: var(--brand); box-shadow: none; color: #fff; }
.cal-cell.on .dnum { color: #fff; }
.cal-cell.on .dots i { background: #fff; opacity: .95; }
.cal-cell.on .dots i.amber { background: #ffe6bd; }

.tl { position: relative; padding-left: 26px; }
.tl::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 10px; width: 2px; background: var(--line); border-radius: 2px; }
.tl-item { position: relative; margin-bottom: 14px; }
.tl-dot {
  position: absolute; left: -22px; top: 5px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 3px #fff;
}
.tl-dot.amber { background: var(--amber); }
.tl-dot.pink { background: var(--pink); }
.tl-dot.blue { background: var(--blue); }
.tl-time { font-size: 11.5px; color: var(--muted); }
.tl-card { background: #fff; border-radius: var(--r-md); padding: 12px 14px; box-shadow: var(--shadow-sm); margin-top: 5px; }
.thumb-row { display: flex; gap: 6px; margin-top: 8px; }
.thumb-row img { width: 62px; height: 62px; border-radius: 10px; object-fit: cover; }

/* ---------- 图表 ---------- */
.chart-wrap { width: 100%; overflow: hidden; }
.chart-wrap svg { display: block; width: 100%; height: auto; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 4px; vertical-align: 1px; }

.heat { display: flex; gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.heat-col { display: flex; flex-direction: column; gap: 3px; }
.heat-cell { width: 12px; height: 12px; border-radius: 3.5px; background: #eef3f0; }
.heat-cell.l1 { background: #cdeee0; }
.heat-cell.l2 { background: #9fdfc5; }
.heat-cell.l3 { background: #63cda6; }
.heat-cell.l4 { background: var(--brand); }
.heat-cell.today { outline: 1.5px solid var(--brand-ink); outline-offset: 1px; }

/* ---------- 日记 ---------- */
.moods { display: flex; gap: 8px; flex-wrap: wrap; }
.mood {
  width: 44px; height: 44px; border-radius: 14px; background: #f4f7f5; display: flex; align-items: center;
  justify-content: center; font-size: 21px; border: 1.5px solid transparent;
}
.mood.on { background: var(--brand-soft); border-color: rgba(22,163,116,.3); transform: scale(1.04); }
.diary-card { background: #fff; border-radius: var(--r-md); padding: 14px 15px; box-shadow: var(--shadow-sm); margin-bottom: 11px; }
.diary-date { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.diary-text { font-size: 14px; line-height: 1.72; margin-top: 7px; white-space: pre-wrap; word-break: break-word; }
.tag { display: inline-block; font-size: 11px; color: var(--brand-ink); background: var(--brand-soft); padding: 2px 7px; border-radius: 6px; margin: 6px 5px 0 0; }

/* ---------- 我的 ---------- */
.profile-card { display: flex; align-items: center; gap: 13px; }
.avatar {
  width: 56px; height: 56px; border-radius: 19px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; color: #fff; flex: none; box-shadow: var(--shadow-sm);
}
.profile-name { font-size: 18px; font-weight: 700; letter-spacing: -.3px; }
.profile-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.list { background: #fff; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 14px; }
.list-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line);
  width: 100%; text-align: left; background: #fff;
}
.list-item:last-child { border-bottom: 0; }
.list-item:active { background: #f8faf9; }
.list-item .li-icon {
  width: 34px; height: 34px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand-ink); flex: none;
}
.list-item .li-t { font-size: 14.5px; font-weight: 550; }
.list-item .li-s { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.list-item .chev { color: #c6d2ce; margin-left: auto; }

/* 搭子 */
.member { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.member:last-child { border-bottom: 0; }
.m-avatar { width: 40px; height: 40px; border-radius: 13px; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; flex: none; }
.m-name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.m-meta { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.cheer-btn {
  display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border-radius: 999px;
  background: var(--amber-soft); color: #a56a10; font-size: 12.5px; font-weight: 600; flex: none;
}
.cheer-btn.done { background: #f4f6f5; color: var(--muted); }
.invite-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 22px; font-weight: 700;
  letter-spacing: 3px; color: var(--brand-ink); background: var(--brand-soft); padding: 10px 14px; border-radius: 12px;
}

/* ---------- 引导 ---------- */
.onb { min-height: 100vh; display: flex; flex-direction: column; padding: 30px 20px 24px; }
.onb-dots { display: flex; gap: 6px; justify-content: center; margin: 6px 0 26px; }
.onb-dots i { width: 22px; height: 5px; border-radius: 3px; background: #dfe8e4; transition: background .2s; }
.onb-dots i.on { background: var(--brand); }
.onb-step { animation: fade .3s ease; }
.onb-title { font-size: 23px; font-weight: 750; letter-spacing: -.4px; margin: 0 0 6px; }
.onb-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 22px; line-height: 1.6; }
.onb-foot { margin-top: auto; display: flex; gap: 10px; padding-top: 20px; }

.opt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.opt {
  height: 44px; border-radius: 12px; background: #fff; border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 13.5px; font-weight: 600; color: var(--ink-2);
}
.opt.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }

.picklist { display: flex; flex-direction: column; gap: 8px; }
.pick {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 14px; background: #fff;
  border: 1.5px solid var(--line);
}
.pick.on { border-color: rgba(22,163,116,.4); background: #f7fdfa; }
.pick .pk-emoji { font-size: 19px; }
.pick .pk-t { font-size: 14px; font-weight: 600; }
.pick .pk-s { font-size: 11.5px; color: var(--muted); }

/* ---------- 弹层 ---------- */
.sheet-mask {
  position: fixed; inset: 0; background: rgba(12, 30, 26, .42); z-index: 50; opacity: 0;
  transition: opacity .22s ease; backdrop-filter: blur(2px);
}
.sheet-mask.on { opacity: 1; }
.sheet {
  position: fixed; left: 50%; bottom: 0; transform: translate(-50%, 100%); width: 100%; max-width: 480px;
  background: #fff; border-radius: 26px 26px 0 0; z-index: 51; transition: transform .28s cubic-bezier(.22,.8,.3,1);
  max-height: 92vh; display: flex; flex-direction: column; padding-bottom: var(--safe-b);
}
.sheet.on { transform: translate(-50%, 0); }
.sheet-grab { width: 40px; height: 4px; border-radius: 3px; background: #e2e9e6; margin: 9px auto 2px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px 8px; }
.sheet-title { font-size: 17px; font-weight: 700; }
.sheet-body { padding: 4px 18px 14px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-foot { padding: 10px 18px calc(14px + var(--safe-b)); border-top: 1px solid var(--line); display: flex; gap: 10px; background: #fff; }

.toast {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.94); z-index: 80;
  background: rgba(20, 33, 30, .9); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px;
  opacity: 0; transition: all .22s ease; max-width: 78vw; text-align: center; line-height: 1.5;
}
.toast.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.toast.err { background: rgba(190, 60, 60, .94); }

/* 预览大图 */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); z-index: 70; display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 94vw; max-height: 86vh; border-radius: 10px; }

/* 空状态 */
.empty { text-align: center; padding: 26px 10px; color: var(--muted); font-size: 13px; }
.empty .e-icon { font-size: 30px; opacity: .5; margin-bottom: 8px; }

/* 桌面端 */
@media (min-width: 620px) {
  body { background: #e9f0ed; }
  #app { background: var(--bg); box-shadow: 0 0 60px rgba(20,60,48,.1); min-height: 100vh; }
  .tabbar { box-shadow: 0 -6px 24px rgba(20,60,48,.06); }
}
