/* 掌家人 · 全站统一设计令牌（所有页面共用） */
:root {
  /* 背景 */
  --bg: #f5f6f8;
  --bg-elevated: #fafafa;
  --surface: #ffffff;
  /* 文字 */
  --ink: #1d2129;
  --ink-2: #4e5969;
  --muted: #86909c;
  /* 边框 */
  --line: #e5e6eb;
  --line-strong: #c9cdd4;
  --brand-border: #ffd9bf;
  /* 品牌 */
  --brand: #ff6a00;
  --brand-deep: #e65c00;
  --brand-mid: #ff8533;
  --brand-soft: #fff4eb;
  --brand-glow: rgba(255, 106, 0, 0.14);
  /* 状态 */
  --warn: #ff7d00;
  --warn-soft: #fff7e8;
  --danger: #f53f3f;
  --danger-soft: #ffece8;
  --ok: #00b42a;
  --ok-soft: #e8ffea;
  --radar-red: #f53f3f;
  --radar-yellow: #ff7d00;
  --radar-green: #00b42a;
  /* 字号阶梯（全站统一） */
  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-md: 13px;
  --fs-base: 14px;
  --fs-title: 15px;
  --fs-nav: 17px;
  --fs-lg: 18px;
  --fs-xl: 20px;
  --fs-2xl: 22px;
  --fs-hero: 24px;
  /* 字重 */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  /* 圆角 / 阴影 / 动效 */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow-xs: none;
  --shadow: none;
  --shadow-md: 0 4px 16px rgba(29, 33, 41, 0.08);
  --shadow-lg: 0 16px 40px rgba(29, 33, 41, 0.14);
  --shadow-brand: none;
  --font: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Segoe UI", sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --module-border: 1px solid var(--line);
  --module-pad: 14px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--ink);
  background: #e8eaed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: grid;
  place-items: center;
  padding: 28px 16px 48px;
}

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a {
  color: var(--brand);
  text-decoration: none;
}
a:hover { color: var(--brand-deep); }

/* ===== 舞台 ===== */
.stage {
  width: min(1100px, 100%);
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 40px;
  align-items: start;
}

.intro { padding-top: 20px; }
/* 与官网同源：favicon 作 LOGO + 掌家人 / FHSQ */
.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.app-brand:hover { color: inherit; }
.app-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: block;
  flex-shrink: 0;
}
.app-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  gap: 2px;
}
.app-brand-text strong {
  font-size: clamp(28px, 3.4vw, 36px);
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  color: var(--ink);
}
.app-brand-text small {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: var(--fw-semibold);
}
.intro .lead {
  margin: 18px 0 0;
  max-width: 42ch;
  color: var(--muted);
  line-height: 1.75;
  font-size: var(--fs-base);
}

.role-grid {
  margin-top: 28px;
  display: grid;
  gap: 10px;
}
.role-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.role-card:hover {
  border-color: var(--brand-border);
  box-shadow: none;
}
.role-card h3 {
  margin: 0;
  font-size: var(--fs-base);
  color: var(--ink);
  font-weight: var(--fw-semibold);
}
.role-card p {
  margin: 6px 0 0;
  font-size: var(--fs-md);
  color: var(--muted);
  line-height: 1.55;
}
.loops {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.loop-pill {
  font-size: var(--fs-sm);
  padding: 7px 11px;
  border-radius: var(--radius-pill);
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: var(--fw-medium);
  border: 1px solid var(--brand-border);
}
.intro .open-hint {
  margin-top: 22px;
  font-size: var(--fs-md);
  color: var(--muted);
  line-height: 1.75;
}
.intro code {
  font-family: var(--mono);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: var(--fs-sm);
  color: var(--ink-2);
}

/* ===== 手机壳（边框约为原厚度 30%，即缩小约 70%） ===== */
.phone {
  width: 390px;
  height: 800px;
  border-radius: 34px;
  background: linear-gradient(160deg, #2a2a2a 0%, #141414 100%);
  padding: 3px;
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255,255,255,0.06);
  position: sticky;
  top: 16px;
}
.phone::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 18px;
  background: #000;
  border-radius: 14px;
  z-index: 6;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}
.phone-screen {
  height: 100%;
  border-radius: 31px;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
}

.nav {
  background: var(--surface);
  color: var(--ink);
  border-bottom: var(--module-border);
  padding: 46px 16px 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 78px;
  position: relative;
}
.nav-title {
  font-size: var(--fs-nav);
  font-weight: var(--fw-semibold);
  color: var(--ink);
}
.nav-back {
  position: absolute;
  left: 10px;
  bottom: 10px;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
}
.nav-back:active { background: var(--brand-soft); }

.content {
  flex: 1;
  overflow: auto;
  padding: 12px;
  background: var(--bg);
  color: var(--ink);
  font-size: var(--fs-base);
}
.content::-webkit-scrollbar { width: 0; }

.tabbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border-top: var(--module-border);
  padding: 6px 2px calc(8px + env(safe-area-inset-bottom, 0px));
  flex-shrink: 0;
}
.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-xs);
  display: grid;
  gap: 2px;
  place-items: center;
  padding: 4px 2px;
  font-weight: var(--fw-medium);
  line-height: 1.2;
}
.tab.active { color: var(--brand); font-weight: var(--fw-semibold); }
.tab .ico {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: inherit;
  background: transparent;
  border: none;
}
.tab .ico svg {
  width: 22px;
  height: 22px;
  display: block;
}
.tab.active .ico {
  color: var(--brand);
  background: transparent;
}

/* ===== Hero ===== */
.hero {
  background: var(--brand);
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  color: #fff;
  border: none;
  position: relative;
  overflow: hidden;
}
.hero .kicker { font-size: var(--fs-sm); opacity: 0.92; }
.hero .title {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.2;
}
.hero .sub {
  margin-top: 6px;
  font-size: var(--fs-sm);
  opacity: 0.92;
  line-height: 1.5;
  color: #fff;
}
/* 橙色卡片内说明文字：避免 .muted 灰色导致看不清 */
.hero .muted,
.hero-note {
  margin-top: 10px;
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.95);
  opacity: 1;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
  position: relative;
  z-index: 1;
}
.metric {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  text-align: center;
}
.metric .label {
  font-size: var(--fs-xs);
  opacity: 0.92;
  color: #fff;
  text-align: center;
}
.metric .value {
  margin-top: 6px;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  text-align: center;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.metric .delta {
  margin-top: 4px;
  font-size: 10px;
  font-weight: var(--fw-medium);
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
}
.hero-save {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: var(--fs-md);
  line-height: 1.4;
  color: #fff;
}
.hero-save b { font-size: var(--fs-lg); font-weight: var(--fw-bold); color: #fff; }

/* ===== 饮食 / 周边等业务块 ===== */
.diet-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.diet-card.is-locked { opacity: 0.72; }
.diet-thumb {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 28px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: none;
}
.diet-body { flex: 1; min-width: 0; }
.diet-health {
  margin-top: 4px;
  font-size: var(--fs-sm);
  color: var(--brand-deep);
  font-weight: var(--fw-medium);
}
.person-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  background: var(--brand-soft);
  color: var(--brand-deep);
  border: 1px solid var(--brand-border);
  font-size: var(--fs-xs);
}
.person-tag.child { background: var(--ok-soft); color: #2b8a3e; border-color: #c3e6cb; }
.person-tag.elder { background: #eef5ff; color: #1c7ed6; border-color: #d0e4ff; }
.person-tag.woman { background: #fff0f6; color: #c2255c; border-color: #fcc2d7; }
.person-tag.man { background: #fff4e6; color: #e67700; border-color: #ffd8a8; }

.nearby-card {
  display: flex;
  gap: 10px;
  align-items: center;
}
.nearby-cover {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  display: grid;
  place-items: center;
  font-size: var(--fs-2xl);
  flex-shrink: 0;
}
.nearby-body { flex: 1; min-width: 0; }
.nearby-hero {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 4px 0 8px;
}
.nearby-hero-cover {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  display: grid;
  place-items: center;
  font-size: 34px;
  flex-shrink: 0;
  box-shadow: none;
}
.nearby-hero-meta { flex: 1; }
.tip-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: var(--fs-md);
  line-height: 1.7;
}

.archive-card { padding: 14px; }
.archive-edit {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.budget-edit-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.budget-edit-row:last-of-type { border-bottom: 0; }
.budget-limit-line {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.budget-limit-input {
  flex: 1;
  height: 36px;
  max-width: 140px;
  margin-left: auto;
}

/* ===== 区块 / 卡片 ===== */
.section { margin-top: 16px; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 8px;
}
.section-title {
  font-size: var(--fs-title);
  font-weight: var(--fw-semibold);
  color: var(--ink);
}
.section-desc {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-top: 2px;
  margin-bottom: 2px;
  line-height: 1.45;
}
.link {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
  padding: 4px 2px;
  white-space: nowrap;
  border-radius: var(--radius-sm);
}
.link:active { background: var(--brand-soft); }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--module-pad);
  border: var(--module-border);
  box-shadow: none;
  color: var(--ink);
}
.card + .card { margin-top: 8px; }
.card.clickable { cursor: pointer; }
.card.clickable:active {
  background: var(--bg-elevated);
  border-color: var(--brand-border);
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.muted { color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; }
.strong { font-weight: var(--fw-semibold); color: var(--ink); font-size: var(--fs-base); }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  border: 1px solid var(--brand-border);
}
.tag.warn {
  background: var(--warn-soft);
  color: #b7791f;
  border-color: #ffe2a8;
}
.tag.danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: #ffc9c9;
}
.tag.ghost {
  background: var(--bg);
  color: var(--muted);
  border-color: var(--line);
}
.tag.super {
  background: var(--brand);
  color: #fff;
  font-weight: var(--fw-semibold);
  border-color: var(--brand);
}

/* ===== 按钮 ===== */
.btn {
  border: 0;
  border-radius: var(--radius);
  min-height: 44px;
  padding: 0 16px;
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn:active { opacity: 0.88; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:active { background: var(--brand-deep); }
.btn-deep {
  background: var(--brand-deep);
  color: #fff;
}
.btn-ghost {
  background: var(--surface);
  color: var(--brand);
  border: 1px solid var(--brand);
}
.btn-ghost:active { background: var(--brand-soft); }
.btn-warn {
  background: var(--warn-soft);
  color: #b7791f;
  border: 1px solid #ffe2a8;
}
.btn-block { width: 100%; }
.stack { display: grid; gap: 9px; margin-top: 14px; }

/* ===== Chip / Banner ===== */
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: var(--module-border);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}
.chip.static {
  cursor: default;
  background: var(--bg);
  color: var(--ink-2);
  border-color: transparent;
}
.chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: var(--fw-semibold);
}

.group-label {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin: 0 2px 8px;
  font-weight: var(--fw-medium);
  letter-spacing: 0.04em;
}

.banner {
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: var(--fs-sm);
  line-height: 1.55;
  margin-bottom: 12px;
  border: var(--module-border);
}
.banner.info {
  background: var(--brand-soft);
  color: var(--brand-deep);
  border-color: var(--brand-border);
}
.banner.warn {
  background: var(--warn-soft);
  color: #ad6800;
  border-color: #ffe7ba;
}
.banner.danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: #ffccc7;
}

/* 漏斗 */
.funnel {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.funnel-item {
  text-align: center;
  padding: 8px 2px;
  background: var(--bg-elevated);
  border-radius: 8px;
  border: 1px solid var(--line);
}
.funnel-item .v { font-size: var(--fs-title); font-weight: var(--fw-semibold); color: var(--ink); }
.funnel-item .l { font-size: 10px; color: var(--muted); margin-top: 2px; }
.funnel-item .r { font-size: 10px; color: var(--brand); margin-top: 2px; font-weight: var(--fw-medium); }

/* 雷达 */
.radar-item { display: flex; gap: 10px; align-items: flex-start; }
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
}
.dot.red { background: var(--radar-red); box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.15); }
.dot.yellow { background: var(--radar-yellow); box-shadow: 0 0 0 3px rgba(240, 162, 2, 0.16); }
.dot.green { background: var(--radar-green); box-shadow: 0 0 0 3px rgba(47, 158, 68, 0.15); }
.radar-title { font-size: var(--fs-base); font-weight: var(--fw-semibold); color: var(--ink); margin-bottom: 2px; }

.ai-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-md);
}
.ai-row:first-child { padding-top: 0; }
.ai-row:last-child { border-bottom: 0; padding-bottom: 0; }

/* 对话 */
.chat-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: -12px;
  background: var(--bg);
}
.chat-tips {
  text-align: center;
  color: var(--muted);
  font-size: var(--fs-xs);
  padding: 10px 12px 0;
}
.msgs {
  flex: 1;
  overflow: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.msg { max-width: 84%; display: grid; gap: 4px; }
.msg.user { align-self: flex-end; }
.msg.assistant { align-self: flex-start; }
.bubble {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--ink);
  border: var(--module-border);
}
.msg.user .bubble {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  border-bottom-right-radius: 4px;
}
.msg.assistant .bubble { border-bottom-left-radius: 5px; }
.deal-mini {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--brand-deep);
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  cursor: pointer;
}
.msg.user .deal-mini {
  border-top-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}
.composer {
  background: var(--surface);
  border-top: var(--module-border);
  padding: 10px 12px 12px;
}
.input-row { display: flex; gap: 8px; margin-top: 8px; }
.input-row input {
  flex: 1;
  border: var(--module-border);
  background: var(--bg);
  color: var(--ink);
  border-radius: var(--radius-sm);
  height: 44px;
  padding: 0 12px;
  outline: none;
  font-size: var(--fs-base);
}
.input-row input:focus {
  border-color: var(--brand);
  background: var(--surface);
}

/* 优选 */
.deal-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  margin: 0 -2px 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.deal-filters::-webkit-scrollbar { display: none; }
.deal-filters .chip { flex: 0 0 auto; }

.deal-card { margin-bottom: 0; }
.deal-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.deal-title { font-size: var(--fs-title); font-weight: var(--fw-semibold); color: var(--ink); }
.deal-cat-line {
  margin-top: 6px;
  font-size: var(--fs-sm);
  display: flex;
  align-items: center;
  gap: 4px;
}
.deal-cat {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  border: 1px solid var(--brand-border);
}
.deal-cta-hint {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-strong);
  font-size: var(--fs-sm);
  color: var(--brand);
  font-weight: var(--fw-medium);
}
.link-reveal {
  margin-top: 14px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  border: 1px dashed var(--brand-border);
}
.price-row {
  margin-top: 8px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.price { font-size: var(--fs-2xl); font-weight: var(--fw-bold); color: var(--brand); letter-spacing: -0.02em; }
.compare { font-size: var(--fs-sm); color: var(--muted); text-decoration: line-through; }
.save {
  font-size: var(--fs-sm);
  color: var(--brand-deep);
  font-weight: var(--fw-semibold);
  background: var(--brand-soft);
  padding: 2px 7px;
  border-radius: 6px;
}
.reason { margin-top: 8px; font-size: var(--fs-md); color: var(--muted); line-height: 1.5; }
.meta {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
}

.bar {
  margin-top: 8px;
  height: 7px;
  background: var(--bg);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  background: var(--brand);
  border-radius: var(--radius-pill);
}
.bar > i.over { background: var(--warn); }

.ledger-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  gap: 10px;
}
.ledger-row:first-child { padding-top: 0; }
.ledger-row:last-child { border-bottom: 0; padding-bottom: 0; }
.amount { font-size: var(--fs-lg); font-weight: var(--fw-semibold); color: var(--ink); }
.amount.income { color: var(--brand); }
.amount.expense { color: var(--ink); }

.menu { cursor: pointer; }
.menu .arrow {
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  transition: color .15s var(--ease), transform .15s var(--ease);
}
.card.menu:active .arrow {
  color: var(--brand);
  transform: translateX(2px);
}

.ledger-feature {
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 16px;
  border: none;
}
.ledger-feature .feat-kicker { font-size: var(--fs-sm); opacity: 0.92; }
.ledger-feature .feat-title { margin-top: 4px; font-size: var(--fs-xl); font-weight: var(--fw-bold); }
.ledger-feature .feat-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.ledger-feature .feat-metric {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
}
.ledger-feature .feat-metric .label { font-size: var(--fs-xs); opacity: 0.9; }
.ledger-feature .feat-metric .value { margin-top: 4px; font-size: var(--fs-title); font-weight: var(--fw-semibold); }
.ledger-feature .feat-cta {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
}

.switch {
  width: 46px;
  height: 28px;
  border-radius: var(--radius-pill);
  background: #d5d8de;
  position: relative;
  border: 0;
  flex-shrink: 0;
  transition: background .18s var(--ease);
}
.switch.on { background: var(--brand); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04); }
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  transition: transform .2s var(--ease);
}
.switch.on::after { transform: translateX(18px); }

.member { display: flex; gap: 12px; align-items: flex-start; }
.avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  flex-shrink: 0;
}
.plan {
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.plan.active {
  border-color: var(--brand-border);
  background: var(--brand-soft);
  box-shadow: 0 0 0 3px var(--brand-glow);
}
.plan-name { font-size: var(--fs-lg); font-weight: var(--fw-semibold); color: var(--ink); }
.plan-price { font-size: var(--fs-lg); font-weight: var(--fw-bold); color: var(--brand); }
.rights { margin-top: 8px; color: var(--muted); font-size: var(--fs-sm); line-height: 1.7; }

.skill-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.skill-row:last-child { border-bottom: 0; padding-bottom: 0; }
.skill-row:first-child { padding-top: 0; }

.member-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.member-badge.light {
  background: var(--brand-soft);
  color: var(--brand-deep);
  border-color: var(--brand-border);
}
.family-type-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.family-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
}
.family-avatar img {
  width: 36px;
  height: 36px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
}
.family-avatar.sm {
  width: 28px;
  height: 28px;
}
.family-avatar.sm img {
  width: 28px;
  height: 28px;
}
.seat-pill {
  margin-left: auto;
  font-size: var(--fs-xs);
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-weight: var(--fw-medium);
}
.field-input, .field-select {
  width: 100%;
  height: 44px;
  border: var(--module-border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  background: var(--bg);
  color: var(--ink);
  font-size: var(--fs-base);
  outline: none;
  margin-top: 6px;
}
.field-input:focus, .field-select:focus {
  border-color: var(--brand);
  background: var(--surface);
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%) translateY(6px);
  background: rgba(26, 26, 26, 0.92);
  color: #fff;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  z-index: 20;
  white-space: nowrap;
  max-width: 86%;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: var(--shadow-md);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hidden { display: none !important; }
.empty {
  text-align: center;
  padding: 28px 12px;
  color: var(--muted);
  font-size: var(--fs-md);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.steps { display: grid; gap: 8px; }
.step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.step-no {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-deep);
  display: grid;
  place-items: center;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  flex-shrink: 0;
  border: 1px solid var(--brand-border);
}

.arrow { color: var(--muted); font-size: 18px; line-height: 1; }

@media (max-width: 920px) {
  .stage { grid-template-columns: 1fr; justify-items: center; }
  .intro { text-align: center; padding-top: 0; }
  .intro .lead { margin-left: auto; margin-right: auto; }
  .app-brand { justify-content: center; }
  .role-grid { text-align: left; }
  .phone { position: relative; top: 0; }
}


/* ===== V0.3 社区公告 / 赚钱 / 管家 / 预购 ===== */
.bt-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  flex-shrink: 0;
  white-space: nowrap;
}
.bt-tag.bt-official { background: #e8f3ff; color: #165dff; }
.bt-tag.bt-merchant { background: var(--brand-soft); color: var(--brand-deep); }
.bt-tag.bt-care { background: #fff3e8; color: #c45c26; }

.bulletin-card { padding: 14px; }
.earn-card { padding: 14px; }
.butler-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: var(--brand-soft);
  border-bottom: 1px solid var(--brand-border);
}
.preorder-bar {
  margin-top: 8px;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.preorder-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-mid), var(--brand));
}
.insight-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.insight-row:last-child { border-bottom: 0; }
.section-desc {
  margin-top: 2px;
  font-size: var(--fs-sm);
  color: var(--muted);
  font-weight: var(--fw-regular);
}
