/*!
 * 优思明 v2 · 组件层
 * 在 style.css（设计 token / 顶栏 / 按钮 / 弹层 / 引导）之上补充 v2 组件：
 * 五页布局、28 天格子、日历、清单、伴侣卡片、语言/语气选择等。
 */

/* ---------------- 布局收敛 ---------------- */
.topbar-inner { max-width: 820px; }
.main { max-width: 820px; padding: 88px 24px 132px; }
.page { max-width: 760px; margin: 0 auto; }
.view { padding-bottom: 0; }
body.is-sheet { overflow: hidden; }

/* ---------------- 顶栏右侧 ---------------- */
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hairline);
  flex: 0 0 auto;
}
.sync-dot.is-ok { background: #34c759; }
.sync-dot.is-pending { background: #ff9f0a; }
.sync-dot.is-error { background: var(--danger); }

/* ---------------- 页面标题 ---------------- */
.page-head { padding: 42px 0 6px; max-width: 640px; }
.page-title { font-size: clamp(30px, 4.4vw, 44px); }
.page-lede { font-size: 15px; }
.kicker { margin: 0; }

/* ---------------- Hero ---------------- */
.hero { padding: 42px 0 4px; max-width: 720px; }
.hero-title { font-size: clamp(36px, 5.4vw, 58px); }
.hero-sub { margin-top: 16px; font-size: clamp(15px, 1.7vw, 17px); max-width: 560px; }
.hero-actions { margin-top: 26px; }
.today-hint {
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-subtle);
}

/* ---------------- 卡片 ---------------- */
.card {
  margin-top: 16px;
  padding: 22px 22px 20px;
  border: 1px solid var(--hairline-soft);
  border-radius: 18px;
  background: #fff;
}
.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.card-title {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.022em;
  line-height: 1.3;
}
.card-title-2 { margin-top: 24px; }
.card-meta {
  font-size: 11.5px;
  color: var(--ink-subtle);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.card-link { font-size: 12.5px; color: var(--accent); white-space: nowrap; }
.card-text { font-size: 13.5px; line-height: 1.65; color: var(--ink-muted); }
.card-text + .card-text { margin-top: 10px; }
.card-note { background: var(--canvas-alt); border-color: transparent; }
.card-note.is-warn { background: #fdf7ec; }
.card-note.is-info { background: var(--accent-soft); }
.card-list { padding: 6px 20px 16px; }
.card-cal { padding: 20px 20px 18px; }
.fineprint { margin-top: 14px; }
.empty {
  padding: 20px 4px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-subtle);
  text-align: center;
}

/* 提示卡（无头卡片） */
.note-title { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.45; }
.note-text { margin-top: 6px; font-size: 12.5px; line-height: 1.65; color: var(--ink-muted); }
.note-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ---------------- 统计卡 ---------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 18px;
}
.stat-grid-4 { grid-template-columns: repeat(4, 1fr); }
.stat {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  min-height: 0;
  padding: 17px 16px 15px;
  border-radius: 14px;
  background: var(--canvas-alt);
}
.stat-k {
  font-size: 11px;
  font-weight: 550;
  letter-spacing: 0.01em;
  color: var(--ink-muted);
}
.stat-v {
  margin-top: 10px;
  font-size: 19px;
  font-weight: 680;
  letter-spacing: -0.028em;
  line-height: 1.22;
  font-variant-numeric: tabular-nums;
  white-space: normal;
  color: var(--ink);
}
.stat-sub {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink-subtle);
}
.stat.is-accent { background: var(--ink); }
.stat.is-accent .stat-k { color: rgba(255, 255, 255, 0.62); }
.stat.is-accent .stat-v { color: #fff; }
.stat.is-accent .stat-sub { color: rgba(255, 255, 255, 0.58); }

/* ---------------- 28 天格子 ---------------- */
.pack { margin-top: 2px; }
.pack-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.pack-meta { font-size: 11.5px; color: var(--ink-subtle); white-space: nowrap; }
.pack-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.pcell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  height: 56px;
  padding: 0;
  border: 1px solid var(--hairline-soft);
  border-radius: 10px;
  background: #fff;
  color: var(--ink-muted);
  font: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pcell:hover { border-color: var(--ink-subtle); }
.pcell-n { font-size: 11.5px; font-weight: 550; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pcell-mark { font-size: 10.5px; font-weight: 700; line-height: 1; }
.pcell.is-future { background: #fbfbfd; color: var(--ink-subtle); }
.pcell.is-taken { background: var(--ink); border-color: var(--ink); color: #fff; }
.pcell.is-skipped { border-style: dashed; color: var(--ink-subtle); }
.pcell.is-missed { background: var(--danger-soft); border-color: #f3d2cd; color: var(--danger); }
.pcell.is-break { background: var(--canvas-alt); border-style: dashed; color: var(--ink-subtle); }
.pcell.is-today { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--ink); }
.pcell.is-today.is-taken { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--accent); }
.pack-note { margin-top: 14px; font-size: 11px; line-height: 1.6; color: var(--ink-subtle); }

/* ---------------- 图例 / 圆点 ---------------- */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 14px;
  font-size: 11px;
  color: var(--ink-subtle);
}
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--hairline);
}
.dot-taken { background: var(--ink); }
.dot-missed { background: var(--danger); }
.dot-skip { background: #fff; border: 1px dashed var(--ink-subtle); }
.dot-today { background: #fff; box-shadow: 0 0 0 2px var(--ink); }
.dot-break { background: transparent; border: 1px dashed var(--hairline); }
.legend-cal { margin-top: 16px; }

/* ---------------- 时间线 ---------------- */
.timeline { margin-top: 2px; padding: 0; list-style: none; }
.tl-item { grid-template-columns: 12px 1fr; }
.tl-body { min-width: 0; }
.tl-body .tl-date { padding-top: 0; font-size: 11.5px; color: var(--ink-subtle); }
.tl-body .tl-title { margin-top: 3px; font-size: 14.5px; font-weight: 550; letter-spacing: -0.01em; }
.tl-body .tl-sub { margin-top: 4px; }

/* ---------------- 步骤 ---------------- */
.steps { margin: 6px 0 4px; }
.step .step-title {
  margin-top: 10px;
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.4;
}
.step .step-text {
  margin-top: 6px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-muted);
}

/* ---------------- 规则块 ---------------- */
.rule-block { padding: 14px 0; border-top: 1px solid var(--hairline-soft); }
.rule-block:first-child { border-top: 0; padding-top: 2px; }
.rule-block-title { font-size: 14px; font-weight: 550; letter-spacing: -0.01em; line-height: 1.45; }
.rule-block p { margin-top: 8px; font-size: 12.5px; line-height: 1.7; color: var(--ink-muted); }
.rules .rule-block:last-child { padding-bottom: 2px; }

/* ---------------- 记录列表 ---------------- */
.rec-list { list-style: none; margin: 2px 0 0; padding: 0; }
.rec-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--hairline-soft);
  font-size: 13px;
}
.rec-row:first-child { border-top: 0; padding-top: 2px; }
li.rec-row { border-top: 1px solid var(--hairline-soft); }
li.rec-row:first-child { border-top: 0; }
.rec-row[data-action] { cursor: pointer; }
.rec-date {
  flex: 0 0 auto;
  min-width: 88px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
.rec-row .rec {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink-subtle);
  white-space: nowrap;
}
.rec.ok { color: var(--ink); }
.rec.skip { color: var(--ink-subtle); }
.rec.miss { color: var(--danger); }
.rec.none { color: var(--ink-subtle); }
.rec-who { font-size: 11px; color: var(--accent); white-space: nowrap; }
.rec-tag { font-size: 11px; color: var(--danger); }

/* ---------------- 日历 ---------------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cal-title { font-size: 15.5px; font-weight: 650; letter-spacing: -0.015em; }
.cal-nav {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: #fff;
  color: var(--ink-muted);
  font: inherit;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.cal-nav:hover { background: var(--canvas-alt); border-color: var(--ink-subtle); }
.cal-week { margin-top: 14px; }
.cal-week span { font-size: 9.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-subtle); text-align: center; }
.cal-grid { margin-top: 6px; }
.cal-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.cal-cell:hover { border-color: var(--hairline); }
.cal-cell.is-empty { visibility: hidden; }
.cal-cell.is-future { color: var(--ink-subtle); }
.cal-cell.is-break { border: 1px dashed var(--hairline-soft); color: var(--ink-subtle); }
.cal-cell.is-taken { background: var(--ink); border-color: var(--ink); color: #fff; }
.cal-cell.is-skipped { border-style: dashed; border-color: var(--ink-subtle); color: var(--ink-muted); }
.cal-cell.is-missed { background: var(--danger-soft); border-color: #f3d2cd; color: var(--danger); }
.cal-cell.is-today { outline: 2px solid var(--ink); outline-offset: 1px; }
.cal-cell.is-today.is-taken { outline-color: var(--accent); }
.cal-n { font-size: 12.5px; line-height: 1; }
.cal-dot { width: 4px; height: 4px; border-radius: 50%; background: transparent; }
.cal-dot.ok { background: rgba(255, 255, 255, 0.8); }
.cal-dot.skip { background: var(--ink-subtle); }
.cal-dot.miss { background: var(--danger); }

/* ---------------- 分段控件 / 芯片 ---------------- */
.seg { grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 3px; border-radius: 11px; }
.seg-2 { grid-template-columns: repeat(2, 1fr); }
.seg-3 { grid-template-columns: repeat(3, 1fr); }
.seg-btn {
  height: 36px;
  padding: 0 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.seg-btn.is-on {
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-muted);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.chip:hover { border-color: var(--ink-subtle); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 550; }

/* ---------------- 表单 ---------------- */
.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}
.field-hint { display: block; margin-top: 7px; font-size: 11.5px; line-height: 1.55; color: var(--ink-subtle); }
.field-input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--hairline);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}
.field-input::placeholder { color: var(--ink-subtle); }
.field-time { max-width: 160px; text-align: center; font-variant-numeric: tabular-nums; }
.form-error { margin-top: 10px; font-size: 12px; color: var(--danger); }

/* 数字步进器 */
.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--hairline);
  border-radius: 11px;
  overflow: hidden;
  background: #fff;
}
.stepper button {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: #fff;
  color: var(--ink-muted);
  font: inherit;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}
.stepper button:hover { background: var(--canvas-alt); }
.stepper input {
  width: 52px;
  height: 36px;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--hairline-soft);
  border-right: 1px solid var(--hairline-soft);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
  -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper.big button { width: 46px; height: 48px; font-size: 20px; }
.stepper.big input { width: 66px; height: 48px; font-size: 18px; }
.day-picker { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.day-picker .field-hint { margin-top: 0; flex: 1 1 180px; }

/* ---------------- 设置行 ---------------- */
.row-list {
  display: flex;
  flex-direction: column;
  margin-top: 10px;
  border: 1px solid var(--hairline-soft);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.row-list .row { padding: 13px 15px; border-top: 1px solid var(--hairline-soft); }
.row-list .row:first-child { border-top: 0; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.row-main { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.row-label { font-size: 14px; font-weight: 500; letter-spacing: -0.005em; }
.row-hint { margin-top: 2px; font-size: 11.5px; line-height: 1.5; color: var(--ink-subtle); }
.row-sub { font-size: 11.5px; color: var(--ink-subtle); }
.row-ctl { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.row-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 13px 4px;
  border: 0;
  border-top: 1px solid var(--hairline-soft);
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.row-list .row.row-btn { border-top: 1px solid var(--hairline-soft); padding: 13px 15px; }
.row-list .row.row-btn:first-child { border-top: 0; }
.row-btn .row-label { font-size: 14px; font-weight: 500; }
.row-btn .row-hint { margin-top: 0; text-align: right; }
.row-btn:hover { color: var(--accent); }
.row-btn:hover .row-label { color: var(--accent); }
.row-btn.is-danger, .btn.is-danger { color: var(--danger); }
.row-btn.is-danger:hover .row-label { color: var(--danger); }
.row-select-input {
  appearance: none;
  -webkit-appearance: none;
  max-width: 190px;
  height: 36px;
  padding: 0 28px 0 11px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
}
.row-input-time {
  appearance: none;
  -webkit-appearance: none;
  width: 118px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* 开关：v2 是 <button class="switch is-on"> */
.switch {
  position: relative;
  width: 50px;
  height: 30px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--hairline);
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
.switch.is-on { background: var(--ink); }
.switch-dot {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.22s var(--ease);
}
.switch.is-on .switch-dot { transform: translateX(20px); }

/* ---------------- 小按钮 / 标签 ---------------- */
.btn-small {
  height: 34px;
  padding: 0 16px;
  border-radius: 980px;
  font-size: 13px;
}
.btn.is-danger, .btn-ghost.is-danger { color: var(--danger); border-color: var(--hairline); }
.btn-ghost.is-danger:hover { background: var(--danger-soft); border-color: #f0c9c4; }
.pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--canvas-alt);
  color: var(--ink-muted);
  font-size: 10.5px;
  font-weight: 550;
  white-space: nowrap;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pill-ok { background: var(--accent-soft); color: var(--accent); }
.pill-warn { background: #fdf7ec; color: var(--warn); }

/* ---------------- 清单 ---------------- */
.points-card {
  margin-top: 18px;
  padding: 22px;
  border-radius: 18px;
  background: var(--ink);
  color: #fff;
}
.points-k { font-size: clamp(20px, 3.4vw, 26px); font-weight: 720; letter-spacing: -0.03em; line-height: 1.2; }
.points-sub { margin-top: 7px; font-size: 12px; line-height: 1.55; color: rgba(255, 255, 255, 0.62); }
.task-form { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.task-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--hairline);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}
.task-input::placeholder { color: var(--ink-subtle); }
.task-input-note { height: 38px; font-size: 13px; }
.task-form .btn { align-self: flex-end; }
.list-label {
  margin: 18px 0 2px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}
.task-list { list-style: none; margin: 0; padding: 0; }
.task {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--hairline-soft);
}
.task:first-child { border-top: 0; padding-top: 2px; }
.task-check {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  padding: 0;
  border: 1.5px solid var(--hairline);
  border-radius: 50%;
  background: #fff;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.task-check:hover { border-color: var(--ink-subtle); }
.task-check svg { width: 13px; height: 13px; }
.task.is-done .task-check { background: var(--ink); border-color: var(--ink); }
.task-body { flex: 1 1 auto; min-width: 0; }
.task-title { font-size: 14px; font-weight: 500; line-height: 1.45; word-break: break-word; }
.task.is-done .task-title { color: var(--ink-subtle); text-decoration: line-through; }
.task-note { margin-top: 3px; font-size: 12px; line-height: 1.5; color: var(--ink-muted); }
.task-by { margin-top: 4px; font-size: 11px; color: var(--ink-subtle); }
.task-del {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink-subtle);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.task-del:hover { background: var(--danger-soft); color: var(--danger); }
.task-del svg { width: 11px; height: 11px; }

/* ---------------- 我们 / 伴侣 ---------------- */
.profile-row { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.profile-name-wrap { flex: 1 1 180px; min-width: 0; }
.profile-name-wrap .field-label { margin-bottom: 6px; }
.profile-name-wrap .field-input { height: 40px; }
.avatar {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--canvas-alt);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.avatar-alt { background: var(--accent-soft); color: var(--accent); }
.couple-people {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 6px 0 18px;
}
.person { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; }
.person-name { font-size: 12.5px; color: var(--ink-muted); max-width: 90px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.couple-link { color: var(--hairline); font-size: 18px; }
.code-box {
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
  background: var(--canvas-alt);
  text-align: center;
}
.code-box .field-label { margin-bottom: 4px; }
.code-value {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: 0.2em;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
}
.code-box .row-hint { margin-top: 6px; }
.code-big { font-size: 30px; letter-spacing: 0.26em; }
.code-input {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 18px;
  font-weight: 600;
}

/* ---------------- 弹层 v2 ---------------- */
.sheet:not([hidden]) { transform: translate(-50%, 0); }
.sheet { padding-top: 26px; }
.sheet-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--canvas-alt);
  color: var(--ink-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
}
.sheet-close:hover { background: var(--hairline-soft); color: var(--ink); }
.sheet-close svg { width: 12px; height: 12px; }
.sheet-inner { padding-top: 4px; }
.sheet-kicker {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-subtle);
}
.sheet .sheet-title {
  margin: 10px 0 0;
  font-size: clamp(23px, 3.6vw, 27px);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.15;
}
.sheet .sheet-sub { margin-top: 8px; font-size: 13px; line-height: 1.6; color: var(--ink-muted); }
.sheet-status {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--canvas-alt);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-muted);
}
.sheet-status.is-ok { color: var(--ink); }
.sheet-status.is-miss { background: var(--danger-soft); color: var(--danger); }
.sheet .row-list { margin-top: 14px; }
.sheet .code-box { margin-top: 16px; }
.sheet .field { margin-top: 18px; }
.sheet .field > span { text-transform: uppercase; }
.sheet-actions { margin-top: 22px; }

/* ---------------- 首次引导 v2 ---------------- */
.ob-wrap { display: flex; justify-content: center; width: 100%; }
.ob-inner { width: min(520px, 100%); margin: auto; padding: 6px 0 40px; }
.ob-title {
  margin: 14px 0 0;
  font-size: clamp(32px, 5vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.038em;
  font-weight: 800;
}
.ob-lede { margin-top: 14px; font-size: 15px; line-height: 1.7; color: var(--ink-muted); }
.ob-inner .seg { margin-top: 26px; }
.ob-inner .field { margin-top: 20px; }
.ob-inner .btn-block { margin-top: 26px; }
.ob-foot { margin-top: 16px; font-size: 11px; line-height: 1.65; color: var(--ink-subtle); text-align: center; }

/* ---------------- 底部导航 v2 ---------------- */
.tabbar { grid-template-columns: repeat(5, 1fr); z-index: 60; }
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px 0 3px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--ink-subtle);
  font: inherit;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.tab svg { width: 22px; height: 22px; }
.tab:hover { color: var(--ink-muted); }
.tab.is-on { color: var(--ink); }
.tab.is-on svg { stroke-width: 1.9; }

/* ---------------- Toast v2 ---------------- */
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
  .stat-grid, .stat-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .main { padding: 56px 18px 116px; }
  .page-head { padding-top: 32px; }
  .hero { padding-top: 30px; }
  .hero-title { font-size: clamp(32px, 8.4vw, 46px); }
  .card { padding: 18px 18px 16px; border-radius: 16px; }
  .card-list { padding: 4px 16px 14px; }
  .card-cal { padding: 16px 14px 14px; }
  .stat { padding: 15px 14px 13px; }
  .stat-v { font-size: 17px; }
  .pack-grid { gap: 5px; }
  .pcell { height: 46px; border-radius: 9px; }
  .pcell-n { font-size: 10.5px; }
  .row-list .row, .row-list .row.row-btn { padding: 12px 14px; }
  .seg-btn { font-size: 12px; }
  .stepper.big button { width: 42px; height: 44px; }
  .stepper.big input { width: 60px; height: 44px; }
  .task-form .btn { width: 100%; align-self: stretch; }
  .toast { bottom: calc(88px + env(safe-area-inset-bottom)); }
}

@media (max-width: 380px) {
  .pack-grid { gap: 4px; }
  .pcell { height: 41px; }
  .stat-v { font-size: 16px; }
}

/* 桌面：底部导航变成居中悬浮胶囊，顶栏右侧保留安装/同步状态 */
@media (min-width: 721px) {
  .main { padding-bottom: 138px; }
  .tabbar {
    display: grid;
    left: 50%;
    right: auto;
    bottom: 18px;
    width: min(560px, calc(100% - 40px));
    transform: translateX(-50%);
    border: 1px solid var(--hairline-soft);
    border-radius: 999px;
    padding: 6px 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  }
  .tab { padding: 3px 0 2px; }
  .toast { bottom: calc(104px + env(safe-area-inset-bottom)); }
  .sheet { border-radius: 22px; bottom: 24px; max-height: 82vh; }
}

/* ===== 安装引导（v3）：今日页 banner / 说明层步骤 / 我们页状态 ===== */
.card-install {
  border-color: var(--hairline-soft);
  background: linear-gradient(180deg, #fbfbfd 0%, #ffffff 62%);
}
.card-install .card-title { letter-spacing: -0.02em; }
.card-install .note-actions { margin-top: 14px; }

.install-steps {
  list-style: none;
  margin: 18px 0 4px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.install-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}
.install-step-n {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}
.install-step-t { flex: 1 1 auto; min-width: 0; }

.install-note {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--canvas-alt);
  color: var(--ink-muted);
  font-size: 13.5px;
  line-height: 1.55;
}

@media (max-width: 380px) {
  .install-step { font-size: 14px; gap: 10px; }
}
