/* === 牛马公司 样式 === */

/* v1.5: 全局字体改为 得意黑 Smiley Sans（atelier-anchor/smiley-sans v2.0.1）
 * 开源可商用，圆润 + 微斜，符合游戏冷幽默调性
 * woff2 字体本地存到 assets/fonts/（1.1MB，比 ttf 小 60%）
 */
@font-face {
  font-family: 'Smiley Sans';
  src: url('assets/fonts/SmileySans-Oblique.ttf.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* 像素字体保留：Vonwaon Bitmap 用于个别需要"复古点阵"质感的位置（可选） */
@font-face {
  font-family: 'Vonwaon';
  src: url('assets/vonwaon-16px.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  font-family: 'Smiley Sans', -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #ddd1bd;
  color: #2b2b2b;
  /* 得意黑是抗锯齿字体 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 菜单页保留原 Vonwaon 像素字体（用户偏好） */
#screen-menu,
#screen-menu * {
  font-family: 'Vonwaon', -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  /* 像素字体关闭抗锯齿才有"棱角" */
  -webkit-font-smoothing: none;
  font-smooth: never;
  -moz-osx-font-smoothing: grayscale;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: #f0e3cd;
  position: relative;
  overflow-x: hidden;
}

.screen { display: none; padding: 16px; }
.screen.active { display: block; }

.hidden { display: none !important; }

/* ============ 主菜单 (新三段背景：4:5 小马 / 横版办公室 / 4:5 小牛) ============ */
#screen-menu {
  padding: 0;
  height: 100vh;
  position: relative;
  background: #2a1f14;
  image-rendering: pixelated;
  overflow: hidden;
}
#screen-menu.active {
  display: flex;
  flex-direction: column;
}
.menu-hero-top {
  width: 100%;
  flex: 0 0 37vh;
  /* center top：图顶部贴上沿，马耳/马额头完整保留，多余裁底部桌面 */
  background: url('assets/horse_4x5.png') center top / cover no-repeat;
  image-rendering: pixelated;
}
.menu-hero-bot {
  width: 100%;
  flex: 0 0 37vh;
  /* center 20%：取景框向下挪一档，减少头部留白，小牛往上靠 */
  background: url('assets/ox_4x5.png') center 20% / cover no-repeat;
  image-rendering: pixelated;
}
.menu-mid {
  flex: 0 0 26vh;          /* 中段压到 26vh，把空间让给上下两张完整脸 */
  position: relative;
  background: url('assets/office_wide.png') center / cover no-repeat;
  image-rendering: pixelated;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: visible;       /* 让 menu-card 可溢出到上下段，"悬浮"感 */
  z-index: 1;
}
.menu-mid::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,16,10,0.30) 0%, rgba(20,16,10,0.45) 100%);
}
#screen-menu .menu-card {
  /* 绝对定位锚到 #screen-menu 几何中心，与三段背景解耦 */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;              /* 覆盖通用 .menu-card 的 margin: 60px 16px，避免偏移 */
  width: 76%;
  max-width: 320px;
  height: auto;           /* 高度按内容自适应 */
  max-height: 80vh;       /* 上限防止极小屏溢出 */
  padding: 10px 14px 10px;
  background: #ecd9b9;
  border: 3px solid #2b2b2b;
  border-radius: 6px;
  box-shadow: 8px 8px 0 #1a1108, 0 0 0 1px #c8a979 inset;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 2;
  overflow: hidden;
}
.menu-karma-badge { display: none; }

/* 像素风标题块：贴近副标，紧凑布局 */
#screen-menu .menu-title-block {
  background: #b5d3e0;
  border: 2px solid #8db4c8;
  border-radius: 2px;
  padding: 6px 8px 4px;
  margin: 2px 0 2px;
  width: 100%;
  position: relative;
  text-align: center;
}
#screen-menu .menu-title-block::before {
  content: '';
  position: absolute;
  top: -6px; left: 50%; transform: translateX(-50%);
  width: 10px; height: 10px;
  background: #d6452f;
  border: 1px solid #2b2b2b;
}
#screen-menu .menu-title-block::after {
  content: '';
  position: absolute;
  bottom: 3px; right: 3px;
  width: 0; height: 0;
  border-left: 7px solid transparent;
  border-bottom: 7px solid #8db4c8;
}
#screen-menu .menu-title { font-size: 18px; letter-spacing: 3px; margin-bottom: 1px; }
#screen-menu .menu-sub { font-size: 10px; color: #2b2b2b; opacity: 0.85; line-height: 1.25; }

/* 像素风按钮：钉子装饰，宽度微妙递减（mockup 风格） */
#screen-menu .menu-btn {
  margin: 1px 0 0;
  padding: 5px 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  border: 2px solid #2b2b2b;
  border-radius: 3px;
  box-shadow: none;
  position: relative;
}
#screen-menu .menu-btn::before {
  content: '';
  position: absolute;
  top: -4px; left: 50%; transform: translateX(-50%);
  width: 7px; height: 7px;
  background: #4a90b8;
  border: 1px solid #2b2b2b;
}
/* 标题块 100%，其余按钮统一 70%，仅颜色和文字色按用户规则区分 */
#screen-menu .menu-btn { width: 70%; }
#screen-menu .menu-btn.primary { background: #f6e988; }
#screen-menu .menu-btn.primary::before { background: #4a90b8; }

/* 继续上钟：默认（新一轮无存档）灰底黑字；有存档时切到 has-save 状态 */
#screen-menu .menu-btn.secondary { background: #efefef; color: #000; }
#screen-menu .menu-btn.secondary::before { background: #d4a843; }
#screen-menu .menu-btn.secondary.has-save { background: #f8d7da; color: #c1322a; border-color: #c1322a; }
#screen-menu .menu-btn.secondary.has-save::before { background: #c1322a; }

#screen-menu .menu-btn.skill { background: linear-gradient(135deg, #d8c5f0, #b89be0); color: #2a1840; border-color: #6f4ba8; }
#screen-menu .menu-btn.skill::before { background: #8b5fbf; }

/* 已故牛马名册：深灰底白字 */
#screen-menu .menu-btn.archive { background: #4a4a4a; color: #fff; border-color: #2b2b2b; }
#screen-menu .menu-btn.archive::before { background: #f4d150; }

#screen-menu .menu-btn.danger {
  background: #fff;
  color: #c1322a;
  border: 2px dashed #c1322a;
  font-size: 11.5px;
  padding: 4px 6px;
}
#screen-menu .menu-btn.danger::before { display: none; }

#screen-menu .menu-archive-meta { display: none; }

/* ===== 结局收藏进度条（菜单卡内） ===== */
#screen-menu .endings-progress {
  width: 70%;
  margin: 6px auto 4px;
  font-family: 'Vonwaon', monospace;
}
#screen-menu .endings-progress-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #2b2b2b;
  margin-bottom: 4px;
}
#screen-menu .endings-progress-label .ep-icon { font-size: 12px; }
#screen-menu .endings-progress-label .ep-text { flex: 1; }
#screen-menu .endings-progress-label .ep-count {
  font-weight: 700;
  color: #c1322a;
}
/* 像素风进度条：黑边、灰底虚线、黄色像素填充 */
#screen-menu .endings-progress-bar {
  position: relative;
  height: 10px;
  background:
    repeating-linear-gradient(90deg,
      #b8a78a 0, #b8a78a 2px,
      transparent 2px, transparent 4px);
  border: 2px solid #2b2b2b;
  border-radius: 1px;
  overflow: hidden;
  image-rendering: pixelated;
}
#screen-menu .endings-progress-fill {
  height: 100%;
  background: #f4d150;
  background-image:
    linear-gradient(0deg,
      #d4a843 0, #d4a843 2px,
      #f4d150 2px, #f4d150 100%);
  transition: width 0.4s ease-out;
}
/* 满图鉴：金黄+边框闪光 */
#screen-menu .endings-progress.full .endings-progress-fill {
  background: #ffa500;
  box-shadow: 0 0 4px #ffd700 inset;
}
#screen-menu .endings-progress.full .ep-count::after {
  content: ' 🏆';
}
#screen-menu .menu-foot {
  margin-top: 4px;
  padding-top: 3px;
  font-size: 10px;
  line-height: 1;
  border-top: 1px dashed #b59f74;
  width: 60%;
  text-align: center;
  color: #5a4d2e;
}

.menu-card {
  position: relative;
  margin: 60px 16px;
  background: #ecd9b9;
  border: 3px solid #c8a979;
  border-radius: 6px;
  padding: 24px 18px 18px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
}

.menu-title-block {
  background: #b5d3e0;
  border: 2px solid #8db4c8;
  padding: 16px 12px;
  text-align: center;
  margin-bottom: 18px;
  position: relative;
}
.menu-title-block::before {
  content: '';
  position: absolute;
  top: -8px; left: 50%; transform: translateX(-50%);
  width: 14px; height: 14px;
  background: #d6452f;
  border: 1px solid #2b2b2b;
}
.menu-title-block::after {
  content: '';
  position: absolute;
  bottom: 6px; right: 6px;
  width: 0; height: 0;
  border-left: 14px solid transparent;
  border-bottom: 14px solid #8db4c8;
}
.menu-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 6px;
  color: #1b1b1b;
  white-space: nowrap;
}
.menu-sub {
  font-size: 14px;
  color: #3a3a3a;
}

.menu-btn {
  display: block;
  width: 100%;
  margin: 14px 0;
  padding: 14px;
  font-size: 17px;
  font-weight: 600;
  border: 2px solid #2b2b2b;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  transition: transform 0.05s;
  letter-spacing: 1px;
}
.menu-btn::before {
  content: '';
  position: absolute;
  top: -7px; left: 50%; transform: translateX(-50%);
  width: 12px; height: 12px;
  background: #d6452f;
  border: 1px solid #2b2b2b;
}
.menu-btn:active { transform: translateY(2px); }
.menu-btn.primary { background: #f6e988; }
.menu-btn.primary::before { background: #4a90b8; }
.menu-btn.secondary { background: #e2d6bc; color: #888; border-color: #999; }
.menu-btn.secondary::before { background: #d4a843; }
.menu-btn.secondary.disabled, .menu-btn.secondary[disabled] { cursor: not-allowed; opacity: 0.65; }
.menu-btn.archive { background: #f4c4c4; }
.menu-btn.archive::before { background: #f4d150; }
.menu-btn.skill {
  background: linear-gradient(135deg, #d8c5f0, #b89be0);
  color: #2a1840;
  border-color: #6f4ba8;
}
.menu-btn.skill::before { background: #8b5fbf; }
.menu-btn.danger {
  background: #fff;
  color: #c1322a;
  border: 2px dashed #c1322a;
}
.menu-btn.danger::before { display: none; }

.menu-archive-meta {
  text-align: center;
  color: #6b6450;
  font-size: 12px;
  margin: 10px 0 14px;
}
.menu-karma-badge { display: none; }

.menu-foot {
  text-align: center;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed #b59f74;
  font-size: 13px;
  color: #5a5240;
  line-height: 1.7;
}
.menu-foot i { color: #3a3a3a; }

/* ============ 游戏页 ============ */
#screen-game {
  padding: 12px;
  min-height: 100vh;
  position: relative;
  background-color: #f0e3cd;
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}
#screen-game::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(240,227,205,0.55) 0%, rgba(240,227,205,0.96) 30%, rgba(240,227,205,0.98) 100%);
  pointer-events: none;
  z-index: 0;
}
#screen-game > * { position: relative; z-index: 1; }
.app.char-horse #screen-game { background-image: url('assets/horse_bg.png'); }
.app.char-ox    #screen-game { background-image: url('assets/ox_bg.png'); }

/* 投胎页也用主菜单背景，但顶部留出一条干净背景便于标题展示 */
#screen-investiture {
  position: relative;
  background:
    linear-gradient(180deg, rgba(240,227,205,0.96) 0%, rgba(240,227,205,0.96) 80px, rgba(240,227,205,0.45) 200px, rgba(240,227,205,0.96) 100%),
    url('assets/menu_bg.png') center top / cover no-repeat;
  image-rendering: pixelated;
  min-height: 100vh;
}

.game-top {
  background: #e2d3b3;
  border: 1px solid #c0a877;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.top-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.avatar-block {
  flex: 0 0 64px;
  text-align: center;
}
.avatar {
  width: 64px;
  height: 64px;
  background: #d4b896 center 20% / 200% no-repeat;
  border-radius: 6px;
  border: 1px solid #b39768;
  image-rendering: pixelated;
  font-size: 0;
  margin: 0 auto;
}
.app.char-horse .avatar { background-image: url('assets/horse_4x5.png'); }
.app.char-ox    .avatar {
  background-image: url('assets/ox_4x5.png');
  /* 牛头比马头在原图中位置略低，单独调 Y 让牛角/耳朵完整露出 */
  background-position: center 8%;
}
.name { font-size: 13px; font-weight: 700; margin-top: 4px; }
.status {
  font-size: 11px;
  background: #e9d8b6;
  border: 1px solid #c1a06d;
  border-radius: 3px;
  padding: 1px 4px;
  margin-top: 3px;
  display: inline-block;
}
.money { font-size: 13px; margin-top: 6px; color: #6a4a18; font-weight: 600; }
.money-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  padding: 2px 4px;
  background: transparent;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: #4a3a18;
}
.money-row #money { color: #6a4a18; }
.money-row #salary-amount { color: #4a4030; }

.stats-block { flex: 1; }
.stat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 3px 0;
}
.stat-label {
  flex: 0 0 32px;
  font-size: 12px;
  color: #4b4438;
}
.bar {
  flex: 1;
  height: 8px;
  background: #c9b48a;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid #a88b59;
}
.bar-fill {
  height: 100%;
  transition: width 0.3s;
}
.bar-fill.health { background: linear-gradient(90deg, #6cc16b, #4a9c4e); }
.bar-fill.stress { background: linear-gradient(90deg, #e25b5b, #a72020); }
.bar-fill.mood { background: linear-gradient(90deg, #5fafd3, #3b8db5); }
.bar-fill.fatigue { background: linear-gradient(90deg, #a8a8a8, #6c6c6c); }
.bar-fill.skill { background: linear-gradient(90deg, #a276d0, #7a4baf); }
.bar-fill.salary { background: linear-gradient(90deg, #e4b95a, #b08230); }
.stat-val {
  flex: 0 0 30px;
  text-align: right;
  font-size: 12px;
  color: #3a3327;
  font-variant-numeric: tabular-nums;
}

.day-strip {
  background: #faf3e2;
  border: 1px solid #d6c096;
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0;
}
.day-strip-label {
  background: #e7d8b5;
  border-radius: 3px;
  padding: 2px 8px;
  font-weight: 600;
  font-size: 12px;
}
.day-strip-day { font-weight: 700; }
.dot { color: #9b896a; }

.progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 2px 12px;
}
.progress-label { font-size: 11px; color: #7a6c4c; flex: 0 0 56px; }
.progress-bar {
  flex: 1;
  height: 6px;
  background: #d8c9a6;
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #82c478, #4a9c4e);
  transition: width 0.4s;
}

/* v1.5.3 移动端紧凑化：iPhone 微信里要能完整看到题目+选项 */
.event-card {
  background: #faf3e2;
  border: 1px solid #d6c096;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

/* v1.5 漫画图 + 气泡 */
.event-comic {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid #2b2b2b;
  box-shadow: 3px 3px 0 #1a110855;
  margin-bottom: 8px;
}
.event-comic img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: pixelated;
}
.comic-bubble {
  position: absolute;
  top: 8px; left: 10px;
  max-width: 78%;
  background: #fff;
  border: 2.5px solid #1a1108;
  border-radius: 12px;
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.4;
  color: #1a1108;
  font-weight: 600;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.25);
  /* 防溢出：最多 3 行省略号兜底 */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.comic-bubble::after {
  content: '';
  position: absolute;
  bottom: -10px; left: 24px;
  border: 8px solid transparent;
  border-top-color: #1a1108;
}
.comic-bubble::before {
  content: '';
  position: absolute;
  bottom: -6px; left: 26px;
  border: 6px solid transparent;
  border-top-color: #fff;
  z-index: 1;
}

/* 标题 + 看完整故事 同行靠左 */
.event-title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 0;        /* v1.5.3 紧凑：text 默认 hidden，不留分隔 */
  padding-bottom: 0;
}
/* v1.5.3：当 .event-text 展开时（不含 hidden），才显示分隔线 + 上间距 */
.event-card:has(.event-text:not(.hidden)) .event-title-row {
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e8d9b5;
}
.event-title {
  font-size: 15px;   /* 缩小一号（原 17px）*/
  font-weight: 700;
  color: #2a2419;
}
/* 长正文折叠开关 */
.event-fulltext-toggle {
  background: none;
  border: none;
  color: #a8854a;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
  flex-shrink: 0;
}
.event-fulltext-toggle:active { opacity: 0.6; }
.event-text {
  font-size: 15px;
  line-height: 1.75;
  color: #322a1c;
  white-space: pre-wrap;
}

.choice-result {
  background: #fff8e7;
  border: 1px dashed #c6a868;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.choice-result-text {
  font-size: 14px;
  color: #4a3f24;
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 8px;
}

/* v1.4.x 数值感知 - 本次变化 mini summary */
.choice-result-deltas {
  font-size: 11px;
  line-height: 1.8;
  padding: 6px 8px;
  background: #fffaee;
  border: 1px dotted #c8a979;
  border-radius: 4px;
  margin: 4px 0 8px;
}
.choice-result-deltas .delta-label {
  font-weight: 700;
  color: #888;
  margin-right: 4px;
}
.choice-result-deltas .delta-item {
  display: inline-block;
  margin-right: 8px;
  font-weight: 600;
}
.choice-result-deltas .delta-good { color: #2a7a2a; }
.choice-result-deltas .delta-bad  { color: #c0392b; }

/* v1.4.x 属性条变化 flash 动画 */
@keyframes stat-flash {
  0%   { box-shadow: 0 0 0 2px #f4d150; background: rgba(244, 209, 80, 0.2); }
  100% { box-shadow: 0 0 0 0 transparent; background: transparent; }
}
.stat-bar.changed {
  animation: stat-flash 1.2s ease-out;
  border-radius: 3px;
}
.next-btn {
  background: #2a2419;
  color: #fff8e7;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

.choices { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.choice-btn {
  background: #fdf6e3;
  border: 1px solid #c5ab74;
  border-radius: 6px;
  padding: 11px 14px;     /* v1.5.3 紧凑：原 14px 16px → 11px 14px */
  font-size: 15px;
  font-family: inherit;
  color: #2a2419;
  cursor: pointer;
  text-align: center;
  line-height: 1.55;
  transition: all 0.12s;
}
.choice-btn:hover:not(:disabled) {
  background: #f3e6c1;
  border-color: #a08652;
}
.choice-btn:active:not(:disabled) { transform: translateY(1px); }
.choice-btn:disabled { opacity: 0.5; cursor: default; }

/* 技能解锁的隐藏选项 - 紫色发光特效 */
.choice-btn.skill-choice {
  background: linear-gradient(135deg, #ede0ff 0%, #d4bfee 100%);
  border: 2px solid #8b5fbf;
  color: #2a1850;
  font-weight: 600;
  box-shadow: 0 0 0 1px #c8a5ed inset, 0 2px 12px rgba(139, 95, 191, 0.35);
  position: relative;
}
.choice-btn.skill-choice::before {
  content: '✦';
  position: absolute;
  left: 8px; top: 50%; transform: translateY(-50%);
  color: #8b5fbf;
  font-size: 14px;
}
.choice-btn.skill-choice:hover:not(:disabled) {
  background: linear-gradient(135deg, #e2cffa 0%, #c8a5ed 100%);
  box-shadow: 0 0 0 1px #b08bdc inset, 0 4px 18px rgba(139, 95, 191, 0.5);
  transform: translateY(-1px);
}

.back-link {
  background: none;
  border: none;
  color: #6b5d3e;
  font-size: 13px;
  cursor: pointer;
  padding: 8px;
  font-family: inherit;
}

/* ============ 结局页 ============ */
#screen-ending {
  min-height: 100vh;
  background: linear-gradient(180deg, #2a2419 0%, #4a3d29 100%);
  color: #f0e3cd;
  padding: 40px 24px;
}
.ending-wrap {
  max-width: 360px;
  margin: 40px auto;
  text-align: center;
}
.ending-stamp {
  display: inline-block;
  border: 3px double #d4a843;
  color: #d4a843;
  padding: 6px 18px;
  font-size: 16px;
  letter-spacing: 12px;
  margin-bottom: 32px;
  font-weight: 700;
}
.ending-name {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 3px;
  margin-bottom: 8px;
}
.ending-day {
  font-size: 13px;
  color: #c4b78f;
  margin-bottom: 12px;
}
/* ============================================================
   救援购买弹窗 (v0.9.5)
============================================================ */
.rescue-card {
  max-width: 420px;
}
.rescue-desc {
  font-size: 14px;
  color: #c4b78f;
  line-height: 1.7;
  text-align: center;
  margin: 14px 12px 18px;
  letter-spacing: 0.3px;
}
.rescue-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.rescue-option {
  background: linear-gradient(180deg, #2a2722 0%, #221f1b 100%);
  border: 1.5px solid #4a443a;
  border-radius: 8px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.18s;
  position: relative;
}
.rescue-option:hover:not(.disabled) {
  border-color: #d4a847;
  background: linear-gradient(180deg, #332e26 0%, #2a261f 100%);
  transform: translateY(-1px);
}
.rescue-option:active:not(.disabled) {
  transform: translateY(0);
}
.rescue-option.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.rescue-option-label {
  font-size: 14.5px;
  color: #f1e8d0;
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.rescue-option-effects {
  font-size: 12px;
  color: #888;
  line-height: 1.5;
}
.rescue-cost {
  color: #ff7a7a;
  font-weight: 600;
}
.rescue-free {
  color: #b9b9b9;
}
.rescue-gain {
  color: #6ad48a;
}
.rescue-loss {
  color: #ff9c5e;
}
.rescue-option-warn {
  font-size: 11px;
  color: #ff7a7a;
  margin-top: 4px;
  font-style: italic;
}

.ending-trigger {
  display: inline-block;
  font-size: 12px;
  color: #d4a847;
  background: rgba(212, 168, 71, 0.08);
  border: 1px solid rgba(212, 168, 71, 0.25);
  padding: 6px 14px;
  border-radius: 4px;
  margin: 0 12px 20px;
  letter-spacing: 0.5px;
}
.ending-summary {
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 28px;
  color: #ded3b7;
  padding: 0 12px;
}
.ending-stats {
  font-size: 13px;
  line-height: 1.9;
  color: #beb18e;
  margin-bottom: 24px;
  padding: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(212,168,67,0.3);
  border-radius: 6px;
}
.ending-tag-label {
  font-size: 12px;
  color: #b69e6a;
  margin-bottom: 8px;
  letter-spacing: 2px;
}
.ending-tags {
  margin-bottom: 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.ending-btn-row { display: flex; flex-direction: column; gap: 12px; }
.ending-btn-row .menu-btn { color: #2a2419; }

.tag {
  display: inline-block;
  background: #f5e8c8;
  border: 1px solid #c5ab74;
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 12px;
  color: #4a3a1a;
}
.tag.muted { background: #e0d4b6; color: #7a6e50; border-style: dashed; }

/* ============ 档案 ============ */
#screen-archive {
  padding: 16px;
}
.archive-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.archive-title {
  font-size: 22px;
  font-weight: 800;
}
.archive-intro {
  font-size: 13px;
  color: #6b5d3e;
  line-height: 1.6;
  margin-bottom: 14px;
}
.archive-meta {
  font-size: 12px;
  color: #8a7a52;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #d6c096;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.tab-btn {
  flex: 1;
  padding: 10px;
  background: #ecd9b9;
  border: 1px solid #c5ab74;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  color: #4a3d29;
}
.tab-btn.active {
  background: #2a2419;
  color: #f0e3cd;
  border-color: #2a2419;
}

.life-card {
  background: #f7ecd5;
  border: 1px solid #d4c094;
  border-radius: 6px;
  padding: 14px;
  margin-bottom: 12px;
}
.life-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.life-no { font-weight: 700; font-size: 15px; }
.badge-new {
  background: #d6452f;
  color: #fff;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
}
.life-day { color: #5a4a26; font-size: 13px; margin-bottom: 4px; }
.life-meta { color: #2a2419; font-size: 14px; margin-bottom: 8px; }
.life-divider {
  border-top: 1px dashed #c8b485;
  margin: 8px 0;
}
.life-ending { font-size: 14px; margin-bottom: 4px; }
.life-stats { font-size: 13px; line-height: 1.7; color: #4a4030; margin-bottom: 10px; }
.life-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.ending-card, .archive-event-card {
  background: #f7ecd5;
  border: 1px solid #d4c094;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.ending-card.locked, .archive-event-card.locked {
  opacity: 0.55;
  background: #e8dcc3;
  border-style: dashed;
}
.ending-card-name, .archive-event-card-title {
  font-weight: 700;
  margin-bottom: 4px;
  font-size: 15px;
}
.ending-card-desc, .archive-event-card-text {
  font-size: 13px;
  color: #5a4d2e;
  line-height: 1.6;
}

.empty {
  text-align: center;
  padding: 40px 0;
  color: #8a7a52;
  font-size: 14px;
}

/* ============ 业力 / 结局补丁 ============ */
.ending-karma {
  text-align: center;
  font-size: 13px;
  color: #d4a843;
  margin: 10px 0 24px;
  letter-spacing: 1px;
}

/* ============ 技能树 ============ */
#screen-skills { padding: 16px; }
.skill-meta {
  font-size: 13px;
  color: #5a4d2e;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #d6c096;
  display: flex;
  align-items: center;
  gap: 8px;
}
.skill-meta #skill-karma { color: #6f4ba8; font-weight: 700; }

.tier-wrap { margin-bottom: 22px; }
.tier-title {
  font-size: 13px;
  font-weight: 700;
  color: #4a3d29;
  margin-bottom: 10px;
  padding-left: 8px;
  border-left: 3px solid #8b5fbf;
}
.tier-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.skill-node {
  background: #f7ecd5;
  border: 2px solid #c5ab74;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  cursor: not-allowed;
  transition: all 0.15s;
  position: relative;
}
.skill-node.available {
  cursor: pointer;
  border-color: #8b5fbf;
  background: linear-gradient(135deg, #f4eaff, #e0ceef);
  box-shadow: 0 0 0 1px #c8a5ed inset, 0 2px 12px rgba(139, 95, 191, 0.25);
}
.skill-node.available:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 18px rgba(139, 95, 191, 0.4);
}
.skill-node.unlocked {
  cursor: default;
  border-color: #5e3b8e;
  background: linear-gradient(135deg, #b89be0, #8b5fbf);
  color: #fff;
}
.skill-node.locked { opacity: 0.55; }
.skill-icon { font-size: 28px; margin-bottom: 6px; }
.skill-name {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}
.skill-desc {
  font-size: 11px;
  line-height: 1.5;
  color: inherit;
  opacity: 0.85;
  margin-bottom: 8px;
  min-height: 48px;
}
.skill-foot {
  font-size: 11px;
  font-weight: 600;
  border-top: 1px dashed currentColor;
  padding-top: 6px;
  opacity: 0.9;
}
.skill-node.unlocked .skill-foot { color: #fff; }

/* ============ 排行榜 ============ */
.rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f7ecd5;
  border: 1px solid #d4c094;
  border-radius: 6px;
  margin-bottom: 8px;
}
.rank-row.first {
  background: linear-gradient(135deg, #fff0c4, #f5d97a);
  border-color: #c9a13a;
}
.rank-no {
  font-size: 22px;
  font-weight: 800;
  color: #8b5fbf;
  width: 28px;
  text-align: center;
}
.rank-row.first .rank-no { color: #b8841a; }
.rank-info { flex: 1; }
.rank-day { font-size: 15px; font-weight: 700; color: #2a2419; }
.rank-meta { font-size: 12px; color: #6b5d3e; margin-top: 2px; }
.rank-money { font-size: 14px; font-weight: 600; color: #4a3d29; }

/* ============ 投胎选择 ============ */
/* ============ 投胎页 (iOS 系统风) ============ */
#screen-investiture {
  padding: 0;
  background: #f0e3cd;
  height: 100vh;
}
#screen-investiture.active {
  display: flex;
  flex-direction: column;
}

/* iOS nav bar - 44pt 标准高度 */
.inv-nav {
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: rgba(240, 227, 205, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.12);
  position: relative;
  z-index: 10;
}
.inv-nav-back {
  background: none;
  border: none;
  color: #6f4ba8;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  padding: 6px 4px;
  min-width: 56px;
  text-align: left;
}
.inv-nav-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #2b2b2b;
}
.inv-nav-placeholder {
  min-width: 56px;
}

/* body 可滚动区 */
.inv-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 16px 16px;
}
.inv-intro {
  font-size: 12px;
  color: #6b5d3e;
  margin: 0 4px 16px;
  text-align: center;
  line-height: 1.5;
}

/* 角色卡片 - 单列、iOS 风 */
.char-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.char-card {
  background: #fff;
  border: 1.5px solid transparent;
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.18s;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06), 0 0 0 0.5px rgba(0,0,0,0.05);
}
.char-card:active { transform: scale(0.98); }
.char-card.selected {
  border-color: #8b5fbf;
  background: linear-gradient(135deg, #faf4ff, #efe1ff);
  box-shadow: 0 4px 18px rgba(139, 95, 191, 0.25), 0 0 0 0.5px #c8a5ed;
}
.char-emoji { font-size: 44px; margin-bottom: 4px; }
.char-name { font-weight: 700; font-size: 17px; margin-bottom: 4px; color: #1c1c1e; }
.char-tagline {
  font-size: 12px;
  color: #6f4ba8;
  margin-bottom: 6px;
  font-style: italic;
}
.char-desc {
  font-size: 11px;
  line-height: 1.5;
  color: #6b6b6b;
}

/* 职业卡片 - 2 列 Grid */
.job-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.job-card {
  background: #fff;
  border: 1.5px solid transparent;
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05), 0 0 0 0.5px rgba(0,0,0,0.04);
}
.job-card:active:not(.locked) { transform: scale(0.97); }
.job-card.selected {
  border-color: #8b5fbf;
  background: linear-gradient(135deg, #faf4ff, #efe1ff);
  box-shadow: 0 0 0 0.5px #c8a5ed, 0 4px 14px rgba(139, 95, 191, 0.25);
}
.job-card.locked {
  opacity: 0.45;
  cursor: not-allowed;
  background: #ececec;
}
.job-icon { font-size: 24px; margin-bottom: 2px; }
.job-name { font-weight: 700; font-size: 13px; margin-bottom: 2px; color: #1c1c1e; }
.job-company { font-size: 10px; color: #8a8a8e; margin-bottom: 6px; }
.job-desc {
  font-size: 10.5px;
  line-height: 1.4;
  color: #6b6b6b;
  min-height: 32px;
}

/* 底部 footer 按钮 */
.inv-footer {
  flex: 0 0 auto;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(240, 227, 205, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 0.5px solid rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* iOS 风按钮 */
.ios-btn {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.15s;
}
.ios-btn:active:not(:disabled) { transform: scale(0.98); opacity: 0.85; }
.ios-btn-primary {
  background: linear-gradient(180deg, #9871d3, #6f4ba8);
  color: #fff;
  box-shadow: 0 2px 8px rgba(139, 95, 191, 0.35);
}
.ios-btn-secondary {
  background: rgba(0,0,0,0.06);
  color: #2b2b2b;
}
.ios-btn:disabled,
.ios-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============ 扣款弹窗 ============ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 10, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  animation: modal-fade 0.18s ease-out;
}
.modal.hidden { display: none; }
@keyframes modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* v1.5.5 反馈按钮 (FAB) */
#feedback-fab {
  position: fixed;
  right: 14px;
  bottom: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f6e988;
  border: 2px solid #2b2b2b;
  box-shadow: 2px 2px 0 #1a110866;
  font-size: 20px;
  cursor: pointer;
  z-index: 90;
  padding: 0;
  line-height: 1;
  transition: transform 0.1s;
}
#feedback-fab:active { transform: translateY(2px); }
#feedback-fab:hover { background: #ffe97a; }
#feedback-status.success { color: #2a7a2a; }
#feedback-status.error { color: #c0392b; }
.modal-card {
  width: 100%;
  max-width: 320px;
  background: #fff;
  border-radius: 16px;
  padding: 18px 18px 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: modal-scale 0.2s cubic-bezier(0.2,0.9,0.4,1);
}
@keyframes modal-scale {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.modal-title {
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 14px;
  color: #c1322a;
  letter-spacing: 1px;
}
.modal-list {
  background: #f8f6f0;
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 10px;
}
.deduction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed #d4c094;
  gap: 8px;
}
.deduction-item:last-child { border-bottom: none; }
.deduction-reason {
  color: #4a4030;
  flex: 1;
  line-height: 1.4;
}
.deduction-amount {
  color: #c1322a;
  font-weight: 700;
  white-space: nowrap;
}
.deduction-recover {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  background: #d4f0d0;
  color: #2a7a2a;
  font-size: 10px;
  border-radius: 4px;
  font-weight: 600;
}

/* 绩效弹窗内容 */
.bonus-body {
  text-align: center;
  padding: 8px 0 14px;
}
.bonus-icon {
  font-size: 48px;
  margin-bottom: 6px;
  line-height: 1;
}
.bonus-main {
  font-size: 13px;
  color: #4a4030;
  margin-bottom: 8px;
}
.bonus-amount {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 2px;
}
.bonus-amount.positive { color: #2a7a2a; }
.bonus-amount.zero { color: #999; }
.bonus-amount.negative { color: #c0392b; }

/* ========= 新手引导卡 ========= */
.onboarding-card {
  /* 与菜单卡同款米黄底 + 像素风边框，区别于普通 modal 的白底 */
  background: #ecd9b9;
  border: 3px solid #2b2b2b;
  border-radius: 6px;
  box-shadow: 8px 8px 0 #1a1108, 0 0 0 1px #c8a979 inset;
  padding: 16px 18px 14px;
}
.onboarding-body {
  font-size: 13px;
  line-height: 1.7;
  color: #2b2b2b;
  margin-bottom: 14px;
}
.onboarding-body p {
  margin: 0 0 12px;
}
.onboarding-body p:last-child {
  margin-bottom: 0;
}
.onboarding-body b {
  color: #2b2b2b;
  font-weight: 700;
}
.onboarding-hl {
  color: #c1322a;
  font-weight: 700;
}
.onboarding-stats {
  background: #f8f0dc;
  border: 2px dashed #c8a979;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.8;
}
.onboarding-btn-row {
  display: flex;
  gap: 8px;
}
.onboarding-btn-row .ios-btn {
  flex: 1;
}
.onboarding-hint {
  font-size: 10px;
  color: #888;
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}

/* ===== v1.4 满图鉴 · 地府名人堂（全屏接管）===== */
#screen-museum-complete {
  padding: 16px;
  background: linear-gradient(180deg, #2a1f14 0%, #1a1108 100%);
  color: #f4d150;
}
#screen-museum-complete .museum-wrap {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}
#screen-museum-complete .museum-stamp {
  display: inline-block;
  font-size: 22px;
  color: #ffd700;
  background: #2b2b2b;
  border: 3px solid #ffd700;
  padding: 6px 16px;
  border-radius: 4px;
  margin: 20px 0 8px;
  letter-spacing: 4px;
  box-shadow: 0 0 12px #ffd70080;
}
#screen-museum-complete .museum-title {
  font-size: 18px;
  color: #f4d150;
  letter-spacing: 3px;
  margin-bottom: 6px;
}
#screen-museum-complete .museum-honor {
  font-size: 12px;
  color: #c8a979;
  font-style: italic;
  margin-bottom: 16px;
}
#screen-museum-complete .museum-final-death {
  background: rgba(0,0,0,0.4);
  border: 1px dashed #c8a979;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 16px;
  color: #ecd9b9;
}
#screen-museum-complete .museum-final-label {
  font-size: 10px;
  color: #888;
  margin-bottom: 4px;
}
#screen-museum-complete .museum-final-name {
  font-size: 14px;
  color: #f4d150;
  font-weight: 700;
  margin-bottom: 4px;
}
#screen-museum-complete .museum-final-summary {
  font-size: 11px;
  color: #ddd1bd;
  line-height: 1.6;
  text-align: left;
}
#screen-museum-complete .museum-section-title {
  text-align: left;
  font-size: 13px;
  color: #f4d150;
  margin: 14px 0 6px;
  border-bottom: 1px solid #c8a97950;
  padding-bottom: 2px;
}
#screen-museum-complete .museum-endings-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: rgba(0,0,0,0.3);
  border-radius: 6px;
  padding: 8px;
}
#screen-museum-complete .museum-ending-cell {
  background: #4a3a28;
  border: 1px solid #c8a979;
  border-radius: 3px;
  padding: 6px 4px;
  font-size: 10px;
  line-height: 1.3;
  color: #ecd9b9;
  text-align: center;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#screen-museum-complete .museum-ending-cell .me-icon { font-size: 14px; margin-right: 2px; }
#screen-museum-complete .museum-stats {
  background: rgba(0,0,0,0.4);
  border: 1px dashed #c8a979;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.8;
  color: #ecd9b9;
  text-align: left;
}
#screen-museum-complete .museum-stats .ms-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dotted #c8a97930;
  padding: 2px 0;
}
#screen-museum-complete .museum-stats .ms-row:last-child { border-bottom: none; }
#screen-museum-complete .museum-stats .ms-val {
  color: #f4d150;
  font-weight: 700;
}
#screen-museum-complete .museum-achievement-list {
  background: rgba(0,0,0,0.4);
  border: 1px solid #c8a97950;
  border-radius: 6px;
  padding: 8px;
  max-height: 240px;
  overflow-y: auto;
  margin-bottom: 16px;
}
#screen-museum-complete .museum-achievement-list .ach-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  padding: 4px 0;
  line-height: 1.4;
  color: #ecd9b9;
  border-bottom: 1px dotted #c8a97930;
  text-align: left;
}
#screen-museum-complete .museum-achievement-list .ach-row:last-child { border-bottom: none; }
#screen-museum-complete .museum-achievement-list .ach-icon { font-size: 16px; flex: 0 0 20px; }
#screen-museum-complete .museum-achievement-list .ach-name { font-weight: 700; color: #f4d150; }
#screen-museum-complete .museum-achievement-list .ach-desc { color: #c8a979; margin-left: 4px; font-size: 10px; }
#screen-museum-complete .museum-achievement-list .ach-locked { opacity: 0.35; }
#screen-museum-complete .ending-btn-row {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
#screen-museum-complete .ending-btn-row .menu-btn {
  flex: 1;
}

/* legacy class for compatibility, no-op */
.museum-card { max-width: 360px; }
.museum-stats {
  background: #f8f0dc;
  border: 2px dashed #c8a979;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.7;
  margin: 8px 0;
}
.museum-stats .ms-row {
  display: flex;
  justify-content: space-between;
}
.museum-stats .ms-row .ms-val {
  color: #c1322a;
  font-weight: 700;
}
.museum-achievement-list {
  max-height: 160px;
  overflow-y: auto;
  background: #fff8e8;
  border: 1px solid #c8a979;
  border-radius: 4px;
  padding: 6px 8px;
  margin: 4px 0 8px;
}
.museum-achievement-list .ach-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 3px 0;
  line-height: 1.4;
}
.museum-achievement-list .ach-icon { font-size: 14px; flex: 0 0 18px; }
.museum-achievement-list .ach-name { font-weight: 700; color: #2b2b2b; }
.museum-achievement-list .ach-desc { color: #888; margin-left: 4px; }
.museum-achievement-list .ach-locked { opacity: 0.35; }

/* ===== v1.4 我的数据 tab ===== */
.mydata-section {
  background: #f8f0dc;
  border: 2px solid #c8a979;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 12px;
}
.mydata-section h3 {
  font-size: 13px;
  margin: 0 0 8px;
  color: #c1322a;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mydata-stats {
  font-size: 11px;
  line-height: 1.9;
  color: #2b2b2b;
}
.mydata-stats .ms-row {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
  border-bottom: 1px dotted #c8a97955;
}
.mydata-stats .ms-row:last-child { border-bottom: none; }
.mydata-stats .ms-val { color: #c1322a; font-weight: 700; }
.mydata-bio {
  font-size: 12px;
  line-height: 1.9;
  color: #2b2b2b;
  white-space: pre-wrap;
}
.mydata-bio b { color: #c1322a; }

/* 破纪录 toast 特殊样式 */
.toast.record-break {
  background: linear-gradient(135deg, #f4d150, #d4a843);
  color: #2b2b2b;
  font-weight: 700;
  border: 2px solid #2b2b2b;
}

/* iOS 风顶部 Toast (日薪到账等轻提示) */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  background: rgba(20, 16, 10, 0.92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 22px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  z-index: 200;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  max-width: calc(100% - 40px);
  white-space: normal;
  text-align: center;
  line-height: 1.5;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.hidden { display: none; }

/* v0.9.6 警告 toast - 红色边框 + 微微脉冲 */
.toast.warning {
  background: linear-gradient(135deg, #6b1f1f 0%, #3a0f0f 100%);
  border: 1.5px solid #ff5757;
  color: #ffeaea;
  box-shadow: 0 4px 18px rgba(255, 87, 87, 0.35), inset 0 0 12px rgba(255, 87, 87, 0.15);
  font-weight: 600;
  letter-spacing: 0.5px;
  animation: warning-pulse 1.2s ease-in-out infinite;
}
@keyframes warning-pulse {
  0%, 100% { box-shadow: 0 4px 18px rgba(255, 87, 87, 0.35), inset 0 0 12px rgba(255, 87, 87, 0.15); }
  50% { box-shadow: 0 4px 22px rgba(255, 87, 87, 0.55), inset 0 0 18px rgba(255, 87, 87, 0.25); }
}
.modal-total {
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  color: #c1322a;
  padding: 0 4px;
  margin-bottom: 10px;
  border-top: 1px solid #ececec;
  padding-top: 8px;
}
.modal-quip {
  font-size: 11.5px;
  color: #6b6b6b;
  font-style: italic;
  text-align: center;
  margin-bottom: 14px;
  line-height: 1.5;
  white-space: pre-line;       /* 支持文案中的 \n 换行 */
}
