/* ==========================================================================
   自由标价器 · Warm Paper Ink & Single Vermilion Design System
   参考 huashu-design (v3.5) 界面范式与排印系统：
   1. 温润纸感体系 (#F7F6F2 / #FFFFFF / #181715) + 单一语义朱砂红 (#C8432B)，零红绿撞色
   2. Figtree + Noto Serif SC + Noto Sans SC 字体嗓音分工，开启 font-synthesis: none 与 tabular-nums
   3. 签名物件「人生自由刻度尺」+ 精装「人生自由账本」层级排版（去图标堆砌与全大写模板标签）
   4. 三套 3:4 平面海报范式：自由日报 / 典藏集换卡 / 留白朱印签
   ========================================================================== */

:root {
  /* 温润纸感与深炭墨单色阶 */
  --bg-page: #F7F6F2;
  --bg-card: #FFFFFF;
  --bg-subtle: #EFEDE7;
  --bg-well: #E8E5DC;

  --ink-primary: #181715;
  --ink-secondary: #635F58;
  --ink-muted: #969087;

  /* 全站唯一有彩色：朱砂印泥红 */
  --accent-vermilion: #C8432B;
  --accent-vermilion-hover: #B03620;
  --accent-vermilion-soft: rgba(200, 67, 43, 0.09);

  /* 边框与自然阴影 */
  --border-light: #E4E0D8;
  --border-focus: #B8B2A6;
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 11px;
  --radius-sm: 8px;

  --shadow-card: 0 2px 16px rgba(24, 23, 21, 0.035), 0 1px 2px rgba(24, 23, 21, 0.025);
  --shadow-hero: 0 14px 36px -10px rgba(24, 23, 21, 0.075), 0 2px 6px rgba(24, 23, 21, 0.03);

  /* 排印字体链：西文数字优先 Figtree -> 中文 -> 系统兜底 */
  --font-sans: "Figtree", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: "Noto Serif SC", "Bodoni Moda", "Songti SC", "STSong", serif;

  font-synthesis: none;
  line-break: strict;
  overflow-wrap: break-word;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-page);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  padding-bottom: 72px;
}

h1, h2, h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.tabular-nums {
  font-variant-numeric: tabular-nums slashed-zero;
  font-feature-settings: "tnum" 1;
}

.app-container {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   1. 顶部品牌与导航栏
   ========================================================================== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 70px;
  padding: 16px 0 14px;
  margin-bottom: 10px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.app-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
  flex-shrink: 0;
}

.app-logo img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.brand-titles h1 {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--ink-primary);
  white-space: nowrap;
}

.brand-titles p {
  font-size: 12px;
  color: var(--ink-secondary);
  line-height: 1.25;
  margin-top: 2px;
  white-space: nowrap;
}

.nav-tabs {
  display: inline-flex;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}

.nav-tab {
  height: 32px;
  padding: 0 16px;
  border: none;
  background: transparent;
  border-radius: 9px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.nav-tab.active {
  background: var(--bg-card);
  color: var(--ink-primary);
  box-shadow: 0 2px 6px rgba(24, 23, 21, 0.07);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-pill {
  height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.16s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn-pill:hover {
  border-color: var(--border-focus);
  background: var(--bg-subtle);
}

.btn-pill.dark {
  background: var(--ink-primary);
  color: #FFFFFF;
  border-color: var(--ink-primary);
}

.btn-pill.dark:hover {
  background: #2C2A27;
}

.q-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--border-focus);
  background: var(--bg-subtle);
  color: var(--ink-secondary);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.q-btn:hover {
  background: var(--ink-primary);
  color: #FFFFFF;
  border-color: var(--ink-primary);
}

/* ==========================================================================
   2. 置顶双核舞台：先说人话 + 雕塑感大数 + 签名「人生自由刻度尺」
   ========================================================================== */
.hero-card {
  background: var(--bg-card);
  color: var(--ink-primary);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-hero);
  border: 1px solid var(--border-light);
}

.core-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  background: var(--bg-subtle);
  padding: 5px;
  border-radius: 14px;
  margin-bottom: 20px;
  border: 1px solid var(--border-light);
}

.core-mode-btn {
  height: 40px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-secondary);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s ease;
}

.core-mode-btn:hover {
  color: var(--ink-primary);
}

.core-mode-btn.active {
  background: var(--ink-primary);
  color: #FFFFFF;
  box-shadow: 0 3px 10px rgba(24, 23, 21, 0.14);
}

.hero-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 6px;
}

.hero-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-mode-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

/* 先说人话，再给数（有立场的单句判断） */
.hero-verdict-line {
  font-family: var(--font-serif);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink-primary);
  margin: 4px 0 6px;
  line-height: 1.45;
}

.hero-number-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 2px 0 8px;
}

.hero-number-left {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.hero-currency {
  font-size: 26px;
  font-weight: 700;
  color: var(--accent-vermilion);
}

.hero-amount {
  font-family: var(--font-sans);
  font-size: clamp(42px, 5.5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--ink-primary);
}

.hero-unit {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink-secondary);
}

.hero-rank-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--ink-primary);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}

.hero-rank-pill:hover {
  border-color: var(--ink-primary);
  background: var(--bg-card);
}

.hero-rank-pill img {
  width: 19px;
  height: 19px;
  object-fit: contain;
}

.hero-rank-lvl {
  background: var(--accent-vermilion);
  color: #FFFFFF;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}

.hero-summary-line {
  font-size: 13px;
  color: var(--ink-secondary);
  margin-bottom: 14px;
}

/* 签名物件一：高精度刻度本金构成条 */
.prop-bar {
  height: 12px;
  background: var(--bg-well);
  border-radius: 999px;
  overflow: hidden;
  display: flex;
  gap: 2px;
  margin-bottom: 12px;
  position: relative;
}

.prop-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.28) 0 1px,
    transparent 1px 18px
  );
  pointer-events: none;
}

.prop-seg {
  height: 100%;
  transition: width 0.3s ease;
}

/* 签名物件二：人生自由刻度尺（计算能躺平多少年模式专属视觉核心） */
.freedom-ruler {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 14px 16px 12px;
  margin-bottom: 14px;
}

.freedom-ruler-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-secondary);
  margin-bottom: 10px;
}

.freedom-ruler-badge {
  font-weight: 700;
  color: var(--accent-vermilion);
}

.ruler-track-wrap {
  position: relative;
  height: 18px;
  background: var(--bg-well);
  border-radius: 999px;
  overflow: visible;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.ruler-seg-past {
  height: 100%;
  background: #C5C0B6;
  border-radius: 999px 0 0 999px;
  transition: width 0.3s ease;
}

.ruler-seg-runway {
  height: 100%;
  background: var(--ink-primary);
  position: relative;
  transition: width 0.3s ease;
  border-radius: 0 4px 4px 0;
}

.ruler-seg-runway.full-cover {
  border-radius: 0 999px 999px 0;
}

/* 朱砂终点刻度指针 */
.ruler-end-pin {
  position: absolute;
  right: -2px;
  top: -4px;
  bottom: -4px;
  width: 4px;
  border-radius: 4px;
  background: var(--accent-vermilion);
  box-shadow: 0 0 0 2px #FFFFFF;
}

.ruler-ticks {
  height: 7px;
  margin-top: 2px;
  margin-bottom: 6px;
  background-image: repeating-linear-gradient(
    90deg,
    #B8B2A6 0 1px,
    transparent 1px 16px
  );
  opacity: 0.7;
}

.ruler-axis-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--ink-secondary);
}

.prop-legend {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 14px;
}

.legend-cell {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-secondary);
}

.legend-left {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-val {
  font-weight: 700;
  color: var(--ink-primary);
}

.grid-5-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.equal-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.grid-tile-btn {
  height: 52px;
  padding: 0 10px;
  border-radius: 11px;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--ink-primary);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.16s ease;
}

.grid-tile-btn:hover {
  border-color: var(--border-focus);
  background: var(--bg-subtle);
}

.grid-tile-btn.active {
  background: var(--ink-primary);
  color: #FFFFFF;
  border-color: var(--ink-primary);
}

.tile-title {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.tile-sub {
  font-size: 11px;
  opacity: 0.72;
  margin-top: 2px;
  white-space: nowrap;
}

.grid-tile-btn.active .tile-sub {
  color: #E4E0D8;
  opacity: 1;
}

.runway-input-bar {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.runway-input-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.mini-city-select {
  height: auto;
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  vertical-align: middle;
  cursor: pointer;
  outline: none;
}

/* ==========================================================================
   3. 精装「人生自由账本」层级排版（00 可选参考条 + 01~06 连续精装账本）
   ========================================================================== */
.view-pane {
  display: none;
}

.view-pane.active {
  display: block;
}

.controls-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 独立轻巧的可选城市参考卡 */
.city-ref-sheet {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  box-shadow: var(--shadow-card);
}

/* 连续精装账本容器（01~06 行以细线优雅分隔，告别 7 张重复大卡片和图标框） */
.ledger-sheet {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.ledger-row {
  padding: 22px 26px;
  border-bottom: 1px solid var(--border-light);
  transition: background-color 0.15s ease;
}

.ledger-row:last-child {
  border-bottom: none;
}

.row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
}

.row-title-area {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

/* 出版物极简衬线数字编号 00 ~ 06（替代 STEP X 全大写徽章与图标方块） */
.ledger-num {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 900;
  color: var(--ink-muted);
  line-height: 1.1;
  min-width: 28px;
  flex-shrink: 0;
  padding-top: 1px;
}

.row-title-stack {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.row-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.optional-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-secondary);
  background: var(--bg-subtle);
  border: 1px dashed var(--border-focus);
  padding: 1px 8px;
  border-radius: 999px;
}

.row-title-area h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink-primary);
  white-space: nowrap;
}

.row-sub-hint {
  font-size: 12.5px;
  color: var(--ink-secondary);
}

.row-control-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  min-width: 260px;
}

.num-slot-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 268px;
  height: 38px;
  padding: 0 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 10px;
}

.num-slot-subtotal {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
  white-space: nowrap;
}

.num-slot-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.inline-num-input {
  width: 84px;
  border: none;
  background: transparent;
  text-align: right;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink-primary);
  font-family: var(--font-sans);
  outline: none;
}

.inline-num-unit {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
  white-space: nowrap;
}

.seg-switch {
  display: grid;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  width: 268px;
  height: 38px;
}

.seg-cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.seg-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.seg-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.seg-opt {
  border: none;
  background: transparent;
  border-radius: 7px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.seg-opt.active {
  background: var(--ink-primary);
  color: #FFFFFF;
}

.child-selector-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.child-stepper {
  display: inline-flex;
  align-items: center;
  height: 38px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 0 4px;
}

.stepper-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 7px;
  background: var(--bg-card);
  color: var(--ink-primary);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stepper-btn:hover {
  background: var(--ink-primary);
  color: #FFFFFF;
}

.stepper-input {
  width: 38px;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink-primary);
  outline: none;
}

.row-body {
  margin-top: 14px;
  padding-top: 14px;
  padding-left: 42px;
  border-top: 1px dashed var(--border-light);
}

.sub-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}

.sub-panel-label {
  font-size: 12.5px;
  color: var(--ink-secondary);
  font-weight: 500;
}

/* 深炭墨纯色滑杆 */
.slider-line {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.clean-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--bg-well);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}

.clean-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 4px solid var(--ink-primary);
  box-shadow: 0 2px 5px rgba(24, 23, 21, 0.22);
  cursor: grab;
  transition: transform 0.12s ease;
}

.clean-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.p-pill {
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  color: var(--ink-secondary);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: all 0.14s ease;
  padding: 0 8px;
}

.p-pill:hover {
  border-color: var(--border-focus);
  color: var(--ink-primary);
}

.p-pill.active {
  background: var(--ink-primary);
  color: #FFFFFF;
  border-color: var(--ink-primary);
}

/* ==========================================================================
   4. 城市参考下拉与延展项
   ========================================================================== */
.city-picker-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 10px;
  margin-top: 12px;
}

.clean-select-wrap {
  width: 100%;
}

.clean-select {
  width: 100%;
  height: auto;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background-color: var(--bg-subtle);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  vertical-align: middle;
  cursor: pointer;
  outline: none;
  transition: all 0.15s ease;
}

.clean-select:hover,
.clean-select:focus {
  border-color: var(--ink-primary);
  background-color: #FFFFFF;
}

.city-compact-strip {
  margin-top: 10px;
  padding: 9px 14px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 12px;
  color: var(--ink-secondary);
}

.city-compact-strip > div {
  flex: 1;
  min-width: 240px;
}

.city-compact-strip .source-doc-btn {
  flex-shrink: 0;
}

.source-doc-btn {
  height: 28px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--ink-primary);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.source-doc-btn:hover {
  background: var(--ink-primary);
  color: #FFFFFF;
  border-color: var(--ink-primary);
}

.marriage-ext-box {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
}

/* ==========================================================================
   5. 第 05 项：年龄与预期寿命时间轴
   ========================================================================== */
.life-timeline-box {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
}

.life-bar-track {
  height: 10px;
  border-radius: 999px;
  background: var(--bg-well);
  overflow: hidden;
  display: flex;
  margin: 8px 0;
}

.life-seg-past {
  background: #B8B2A6;
  height: 100%;
}

.life-seg-runway {
  background: var(--ink-primary);
  height: 100%;
  transition: width 0.3s ease;
}

.life-seg-gap {
  background: var(--bg-well);
  height: 100%;
}

.dwz-Banner {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==========================================================================
   6. 底部「确认生成段位海报」主召唤卡（深炭墨底 + 单一朱砂主行动钮）
   ========================================================================== */
.poster-cta-card {
  margin-top: 4px;
  background: var(--ink-primary);
  color: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  box-shadow: var(--shadow-hero);
}

.poster-cta-text h3 {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 900;
  color: #FFFFFF;
}

.poster-cta-text p {
  font-size: 13px;
  color: #B8B2A6;
  margin-top: 4px;
}

.btn-generate-poster {
  height: 46px;
  padding: 0 24px;
  border-radius: 12px;
  border: none;
  background: var(--accent-vermilion);
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.16s ease, background-color 0.16s ease;
}

.btn-generate-poster:hover {
  background: var(--accent-vermilion-hover);
  transform: translateY(-1px);
}

/* ==========================================================================
   7. 段位天梯 & 全球城市躺平速查 & 减负方案 & 权威报告库
   ========================================================================== */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}

.section-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.section-card-head h2 {
  font-family: var(--font-serif);
  font-size: 16.5px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lever-card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lever-card-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
}

.lever-card-info h4 {
  font-size: 14px;
  font-weight: 700;
}

.lever-card-info p {
  font-size: 12px;
  color: var(--ink-secondary);
  margin-top: 2px;
}

.lever-card-action {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.save-tag {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent-vermilion);
}

.benchmark-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 6px;
  background: var(--bg-subtle);
}

.benchmark-row.active-user {
  background: var(--ink-primary);
  color: #FFFFFF;
  font-weight: 700;
}

.report-card {
  padding: 16px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  margin-bottom: 12px;
}

.report-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.report-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.metric-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 8px 10px;
}

.metric-box-label {
  display: block;
  font-size: 11px;
  color: var(--ink-secondary);
}

.metric-box-val {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-primary);
  margin-top: 2px;
}

.doc-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 10px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.doc-table th {
  background: var(--bg-subtle);
  color: var(--ink-secondary);
  font-weight: 700;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.doc-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--bg-well);
  color: var(--ink-primary);
}

.doc-table tr:last-child td {
  border-bottom: none;
  font-weight: 700;
  background: var(--bg-subtle);
}

/* ==========================================================================
   8. 弹窗与 huashu-design 三套 3:4 专业平面海报版式
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24, 23, 21, 0.54);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 200;
}

.modal-overlay.open {
  display: flex;
}

.sheet-dialog {
  background: var(--bg-card);
  border-radius: 22px;
  max-width: 500px;
  width: 100%;
  padding: 22px 24px;
  position: relative;
  box-shadow: 0 24px 48px rgba(24, 23, 21, 0.24);
  max-height: 94vh;
  overflow-y: auto;
  border: 1px solid var(--border-light);
}

.sheet-dialog.wide {
  max-width: 680px;
}

.sheet-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  color: var(--ink-secondary);
  font-size: 16px;
  cursor: pointer;
  z-index: 5;
}

.sheet-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--bg-subtle);
  color: var(--ink-secondary);
  margin-bottom: 8px;
}

.sheet-headline {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink-primary);
  padding: 12px 14px;
  background: var(--bg-subtle);
  border-radius: 10px;
  margin: 12px 0;
}

.formula-visual-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 14px;
}

.f-block {
  flex: 1;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
}

.f-block.highlight {
  background: var(--ink-primary);
  color: #FFFFFF;
  border-color: var(--ink-primary);
}

.f-block-label {
  display: block;
  font-size: 11px;
  opacity: 0.75;
}

.f-block-val {
  display: block;
  font-size: 15px;
  font-weight: 800;
  margin-top: 2px;
}

.f-op {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink-muted);
}

.compare-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.c-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
}

.c-card-title {
  font-size: 13px;
  font-weight: 700;
}

.c-card-desc {
  font-size: 12px;
  color: var(--ink-secondary);
}

/* 三套海报版式切换栏 */
.poster-style-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  margin-bottom: 10px;
  margin-right: 36px;
}

.poster-style-tab {
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-secondary);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}

.poster-style-tab.active {
  background: var(--ink-primary);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(24, 23, 21, 0.12);
}

/* 海报显示项控制器 */
.poster-customizer-bar {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 9px 11px;
  margin-bottom: 12px;
}

.customizer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}

.customizer-title {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-secondary);
}

.btn-reroll-quote {
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  border: none;
  background: var(--accent-vermilion);
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.btn-reroll-quote:hover {
  background: var(--accent-vermilion-hover);
}

.customizer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.toggle-chip {
  height: 25px;
  padding: 0 9px;
  border-radius: 7px;
  border: 1px solid var(--border-light);
  background: #FFFFFF;
  color: var(--ink-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}

.toggle-chip.active {
  background: var(--ink-primary);
  color: #FFFFFF;
  border-color: var(--ink-primary);
}

/* 通用底部引流扫码尾栏 */
.poster-referral-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  margin-top: 14px;
  border-top: 1.5px solid #181715;
}

.poster-ref-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.poster-ref-title {
  font-size: 12px;
  font-weight: 800;
  color: inherit;
}

.poster-ref-sub {
  font-size: 10.5px;
  opacity: 0.72;
}

.poster-qr-box {
  width: 52px;
  height: 52px;
  border: 1.5px solid #181715;
  border-radius: 7px;
  background: #FFFFFF;
  padding: 2px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.poster-qr-box svg {
  width: 100%;
  height: 100%;
  display: block;
}

.poster-stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.poster-stat-cell {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(24, 23, 21, 0.16);
  border-radius: 8px;
  padding: 8px 10px;
}

.poster-stat-label {
  font-size: 10.5px;
  font-weight: 600;
  color: #635F58;
  margin-bottom: 2px;
}

.poster-stat-val {
  font-size: 16.5px;
  font-weight: 800;
  color: #181715;
}

/* --------------------------------------------------------------------------
   海报范式 1：自由日报 (源自 05-daily-paper.html)
   -------------------------------------------------------------------------- */
.poster-style-paper {
  background-color: #F2EDE1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .25 0 0 0 0 .22 0 0 0 0 .18 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  color: #1D1B18;
  border-radius: 12px;
  padding: 20px 22px 18px;
  margin-bottom: 12px;
  border: 1.5px solid #1D1B18;
  box-shadow: 0 12px 28px rgba(24, 23, 21, 0.12);
}

.paper-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #5C574F;
  font-weight: 600;
}

.paper-masthead {
  font-family: var(--font-serif);
  font-size: 38px;
  font-weight: 900;
  text-align: center;
  letter-spacing: 0.28em;
  padding-left: 0.28em;
  line-height: 1.15;
  margin: 8px 0 8px;
  color: #1D1B18;
}

.paper-rule2 {
  border-top: 4px double #1D1B18;
  margin-bottom: 6px;
}

.paper-subhead-bar {
  display: flex;
  justify-content: space-between;
  font-family: "Bodoni Moda", Georgia, serif;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: #5C574F;
  padding-bottom: 6px;
  border-bottom: 1.5px solid #1D1B18;
  margin-bottom: 14px;
}

.paper-headline {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.32;
  color: #1D1B18;
  margin-bottom: 10px;
}

.paper-hl-swipe {
  background: linear-gradient(transparent 58%, #F4D35E 58% 93%, transparent 93%);
  padding: 0 2px;
}

.paper-lead {
  font-family: var(--font-serif);
  font-size: 13px;
  line-height: 1.65;
  color: #3D3A34;
  text-align: justify;
  padding-left: 12px;
  border-left: 3px solid #C8432B;
}

.paper-rank-box {
  margin-top: 12px;
  border: 2px solid #1D1B18;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   海报范式 2：典藏集换卡 (源自 06-trading-cards.html)
   -------------------------------------------------------------------------- */
.poster-style-card {
  background: radial-gradient(120% 80% at 50% 25%, #3A342C, #1C1915);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 14px 32px rgba(24, 23, 21, 0.22);
}

.tc-gold-frame {
  border-radius: 14px;
  padding: 6px;
  background: linear-gradient(135deg, #F6D77A 0%, #B98A2E 45%, #F3D27A 70%, #A8781F 100%);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.tc-inner-core {
  background: #FBFAF6;
  color: #181715;
  border-radius: 10px;
  padding: 16px 18px 14px;
}

.tc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.tc-card-title {
  font-size: 18px;
  font-weight: 900;
  color: #181715;
  line-height: 1.25;
}

.tc-card-sub {
  font-size: 11px;
  color: #78736B;
  margin-top: 2px;
  font-weight: 600;
}

.tc-rarity-badge {
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 7px;
  background: #C8432B;
  color: #FFFFFF;
  flex-shrink: 0;
}

/* 点阵图窗 */
.tc-dot-window {
  border-radius: 11px;
  background-color: #F1EFE8;
  background-image: radial-gradient(circle, #D8D6CE 1.4px, transparent 1.8px);
  background-size: 16px 16px;
  padding: 16px 15px;
  border: 1px solid #E2DDD2;
  margin-bottom: 12px;
}

.tc-quote-headline {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 900;
  line-height: 1.35;
  color: #181715;
  margin-bottom: 7px;
}

.tc-quote-body {
  font-size: 12px;
  line-height: 1.55;
  color: #524E47;
}

.tc-bars-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 6px;
}

.tc-bar-item-top {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 700;
  color: #181715;
}

.tc-bar-track {
  height: 7px;
  border-radius: 999px;
  background: #E8E5DC;
  margin-top: 4px;
  overflow: hidden;
}

.tc-bar-track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #181715;
}

/* --------------------------------------------------------------------------
   海报范式 3：留白朱印签 (源自 07-blank-vertical.html)
   -------------------------------------------------------------------------- */
.poster-style-vertical {
  background: #F8F6F0;
  color: #181715;
  border-radius: 12px;
  padding: 20px 22px 18px;
  margin-bottom: 12px;
  border: 1px solid #DCD7CA;
  box-shadow: 0 12px 28px rgba(24, 23, 21, 0.08);
  font-family: var(--font-serif);
}

.v-top-no {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #7D7870;
  margin-bottom: 14px;
}

.v-stage {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 245px;
  gap: 14px;
  padding: 4px 4px 12px;
}

.v-cols-wrap {
  display: flex;
  flex-direction: row-reverse;
  gap: 14px;
  align-items: flex-start;
}

.v-headline-col {
  writing-mode: vertical-rl;
  font-size: 23px;
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: 0.08em;
  max-height: 245px;
  color: #181715;
}

.v-sub-col {
  writing-mode: vertical-rl;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.75;
  letter-spacing: 0.05em;
  max-height: 245px;
  color: #635F58;
}

.v-left-corner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 235px;
  flex: 1;
}

/* 一枚朱砂印章 */
.v-seal {
  width: 58px;
  height: 58px;
  background: #C8432B;
  color: #F8E9E2;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 900;
  line-height: 1.05;
  writing-mode: vertical-rl;
  letter-spacing: 2px;
  box-shadow: 0 3px 10px rgba(200, 67, 43, 0.22);
}

.v-rank-note {
  font-size: 12px;
  color: #635F58;
  line-height: 1.6;
}

/* ==========================================================================
   8.5 页脚声明与轻提示 Toast
   ========================================================================== */
.app-footer {
  margin-top: 28px;
  padding: 16px 4px 0;
  border-top: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.toast-banner {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  background: var(--ink-primary);
  color: #FFFFFF;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(24, 23, 21, 0.22);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 400;
  max-width: calc(100vw - 32px);
  text-align: center;
}

.toast-banner.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* 微信内长按保存海报预览容器 */
.wechat-poster-save-box {
  background: #FAF9F6;
  border: 1px solid #DCD7CA;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  text-align: center;
}

.wechat-save-tip {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--vermilion);
  margin-bottom: 10px;
}

.wechat-poster-save-box img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  box-shadow: 0 8px 20px rgba(24, 23, 21, 0.12);
}

.wechat-save-actions {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

/* ==========================================================================
   9. 响应式适配
   ========================================================================== */
@media (max-width: 760px) {
  .app-header {
    flex-wrap: wrap;
    height: auto;
    gap: 10px;
  }

  .prop-legend {
    grid-template-columns: repeat(2, 1fr);
  }

  .equal-grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }

  .city-picker-grid {
    grid-template-columns: 1fr;
  }

  .ledger-row {
    padding: 18px 16px;
  }

  .row-body {
    padding-left: 0;
  }

  .hero-card {
    padding: 18px 16px;
  }

  .core-mode-btn {
    font-size: 12.5px;
    padding: 0 6px;
    white-space: nowrap;
  }

  .row-header,
  .sub-panel-head,
  .runway-input-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .row-control-right,
  .num-slot-wrap,
  .seg-switch {
    width: 100%;
  }

  .report-metrics-grid,
  .tc-bars-grid {
    grid-template-columns: 1fr;
  }
}
