/* 五套画风主题 · 通过 body 上的 data-theme 切换 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;500;700;900&family=Noto+Sans+SC:wght@300;400;500;700&family=Noto+Serif+TC:wght@400;700;900&family=JetBrains+Mono:wght@300;400;700&family=Source+Serif+4:wght@300;400;600;700&family=Caveat&family=Ma+Shan+Zheng&family=VT323&family=Press+Start+2P&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100vh;
  transition: background 0.5s ease;
}

/* ============== 通用结构 ============== */
.app {
  min-height: 100vh;
  position: relative;
}

.theme-switcher {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 30px;
  backdrop-filter: blur(12px);
}
/* 桌面端：画风钮横排显示，收起按钮隐藏 */
.theme-options { display: flex; gap: 6px; }
.theme-toggle { display: none; }
.theme-switcher button {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.theme-switcher button.active { transform: scale(1.15); box-shadow: 0 0 0 2px currentColor; }

.theme-btn-newspaper { background: #f5f1e8; color: #8b1a1a; }
.theme-btn-cyber     { background: #0a0a0a; color: #00ff41; border-color: #00ff41 !important; }
.theme-btn-pixel     { background: #c0c0c0; color: #000080; }
.theme-btn-hedcut    { background: #fafaf7; color: #b8902b; }
.theme-btn-tvb       { background: #1a0c08; color: #d4af37; border-color: #d4af37 !important; }

/* 顶部 HUD（所有主题共用结构，样式由各主题覆盖） */
.hud {
  position: sticky;
  top: 0;
  z-index: 100;
  /* 右侧预留固定画风切换器（≈196px + 右距16）的空间，stats 绝不被遮住 */
  padding: 12px 224px 12px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  backdrop-filter: blur(8px);
}
.hud-stats {
  display: flex;
  gap: 20px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.hud-stats::-webkit-scrollbar { display: none; }
.hud-stat { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.hud-stat-label { font-size: 10px; opacity: 0.7; letter-spacing: 1px; }
.hud-stat-val { font-weight: 700; }
.hud-stat-val.warn { color: #cc4444; }
.hud-stat-val.gold { color: #d4af37; }

/* 关卡容器 */
.scene-container {
  max-width: 920px;
  margin: 0 auto;
  padding: 30px;
}

/* 选项 */
.choices-list { margin-top: 30px; }
.choice {
  display: block;
  padding: 18px 22px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  border: 1px solid;
}
.choice.disabled { opacity: 0.4; cursor: not-allowed; }
.choice-head { display: flex; align-items: baseline; gap: 14px; }
.choice-letter { font-size: 22px; font-weight: 700; flex-shrink: 0; }
.choice-text { font-size: 16px; line-height: 1.6; flex: 1; }
.choice-meta { font-size: 11px; opacity: 0.7; margin-top: 6px; margin-left: 36px; letter-spacing: 1px; }
.choice-meta .tag {
  display: inline-block;
  padding: 1px 8px;
  border: 1px solid;
  border-radius: 999px;
  margin-right: 6px;
  font-size: 10px;
}

/* ============== 主题 1：报刊体 ============== */
body[data-theme="newspaper"] {
  background: #2a2620;
  color: #1a1a1a;
  font-family: "Noto Serif SC", serif;
}
body[data-theme="newspaper"] .scene-container {
  background:
    linear-gradient(rgba(245,241,232,0.97), rgba(245,241,232,0.97)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.4  0 0 0 0 0.35  0 0 0 0 0.28  0 0 0 0.15 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-color: #f5f1e8;
  padding: 50px 60px 70px;
  margin-top: 20px;
  margin-bottom: 40px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  position: relative;
}
body[data-theme="newspaper"] .hud {
  background: rgba(245, 241, 232, 0.95);
  border-bottom: 2px solid #1a1a1a;
  font-family: "Noto Sans SC", sans-serif;
}
body[data-theme="newspaper"] .masthead {
  border-bottom: 4px double #1a1a1a;
  padding-bottom: 16px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-family: "Noto Sans SC", sans-serif;
}
body[data-theme="newspaper"] .masthead-title {
  font-family: "Noto Serif SC", serif;
  font-size: 42px;
  font-weight: 900;
  letter-spacing: 6px;
  flex: 1;
  text-align: center;
}
body[data-theme="newspaper"] .masthead-info { font-size: 11px; color: #6b5847; letter-spacing: 1px; }
body[data-theme="newspaper"] .episode-tag {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 11px;
  color: #6b5847;
  letter-spacing: 3px;
  margin-bottom: 12px;
}
body[data-theme="newspaper"] h1.headline {
  font-size: 38px;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 14px;
}
body[data-theme="newspaper"] .deck {
  font-size: 15px;
  color: #4a4239;
  line-height: 1.7;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid #c9c0b0;
  font-style: italic;
}
body[data-theme="newspaper"] .stamp {
  position: absolute;
  top: 60px; right: 60px;
  width: 100px; height: 100px;
  border: 4px solid #c41e3a;
  border-radius: 50%;
  color: #c41e3a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: rotate(-12deg);
  font-family: "Noto Serif SC", serif;
  opacity: 0.85;
  text-align: center;
}
body[data-theme="newspaper"] .stamp-cn { font-size: 16px; font-weight: 900; letter-spacing: 3px; }
body[data-theme="newspaper"] .stamp-date { font-size: 10px; margin-top: 4px; border-top: 1px solid #c41e3a; padding-top: 3px; }
body[data-theme="newspaper"] .narrative-text { font-size: 16px; line-height: 2; margin-bottom: 14px; text-indent: 2em; }
body[data-theme="newspaper"] .narrative-text.lead::first-letter {
  font-size: 56px; font-weight: 900; float: left; line-height: 1;
  margin-right: 8px; color: #8b1a1a;
}
body[data-theme="newspaper"] .pullquote {
  font-size: 22px; font-weight: 700; line-height: 1.5;
  margin: 24px 0; padding: 18px 0;
  border-top: 3px solid #1a1a1a; border-bottom: 1px solid #1a1a1a;
  text-align: center; color: #8b1a1a;
}
body[data-theme="newspaper"] .annotation {
  font-family: "Caveat", cursive;
  color: #c41e3a;
  font-size: 20px;
  transform: rotate(-1.5deg);
  line-height: 1.5;
  margin: 24px 0;
  padding-left: 20px;
  border-left: 3px solid #c41e3a;
}
body[data-theme="newspaper"] .annotation-from {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 10px;
  color: #c41e3a;
  letter-spacing: 2px;
  display: block;
  margin-bottom: 6px;
}
body[data-theme="newspaper"] .dialogue {
  background: rgba(139, 26, 26, 0.05);
  padding: 14px 18px;
  margin: 18px 0;
  border-left: 3px solid #8b1a1a;
}
body[data-theme="newspaper"] .dialogue-who { font-weight: 700; color: #8b1a1a; margin-bottom: 6px; }
body[data-theme="newspaper"] .decision-title {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 12px; letter-spacing: 4px; color: #6b5847;
  text-align: center; margin-top: 36px; padding-top: 20px;
  border-top: 3px double #1a1a1a;
}
body[data-theme="newspaper"] .choice {
  background: #efe9da;
  border-left: 4px solid #1a1a1a;
  border-color: #1a1a1a;
  font-family: "Noto Serif SC", serif;
}
body[data-theme="newspaper"] .choice:hover { background: #1a1a1a; color: #f5f1e8; border-left-color: #c41e3a; padding-left: 30px; }
body[data-theme="newspaper"] .choice-letter { color: #8b1a1a; font-family: "Times New Roman", serif; }
body[data-theme="newspaper"] .choice:hover .choice-letter { color: #c9a961; }
body[data-theme="newspaper"] .choice .tag.gold { color: #c9a961; border-color: #c9a961; }
body[data-theme="newspaper"] .choice .tag.warn { color: #c41e3a; border-color: #c41e3a; }

/* ============== 主题 2：赛博 ============== */
body[data-theme="cyber"] {
  background: #050708;
  color: #00ff41;
  font-family: "JetBrains Mono", "Noto Sans SC", monospace;
}
body[data-theme="cyber"]::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background: repeating-linear-gradient(0deg, rgba(0,255,65,0.03) 0 1px, transparent 1px 3px);
}
body[data-theme="cyber"] .app { position: relative; z-index: 10; }
body[data-theme="cyber"] .hud {
  background: rgba(5, 7, 8, 0.95);
  border-bottom: 1px solid #00ff41;
  color: #00ff41;
}
body[data-theme="cyber"] .scene-container {
  background: rgba(0, 20, 8, 0.4);
  border: 1px solid #00ff41;
  margin-top: 24px;
  padding: 30px;
}
body[data-theme="cyber"] .masthead { border-bottom: 1px dashed #00ff41; padding-bottom: 12px; margin-bottom: 18px; font-size: 11px; }
body[data-theme="cyber"] .masthead-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 22px; font-weight: 700; letter-spacing: 3px;
  text-shadow: 0 0 10px rgba(0, 255, 65, 0.6);
}
body[data-theme="cyber"] .masthead-info { color: #ff6b35; font-size: 11px; }
body[data-theme="cyber"] .episode-tag { color: #ff6b35; font-size: 11px; letter-spacing: 3px; margin-bottom: 14px; }
body[data-theme="cyber"] h1.headline {
  font-size: 28px; font-weight: 700; line-height: 1.3;
  text-shadow: 0 0 12px rgba(0, 255, 65, 0.5);
  margin-bottom: 14px;
}
body[data-theme="cyber"] .deck {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 14px; line-height: 1.8; color: #e8e8e8;
  margin-bottom: 24px; padding: 14px; border-left: 3px solid #ff6b35;
  background: rgba(255, 107, 53, 0.05);
}
body[data-theme="cyber"] .stamp { display: none; }
body[data-theme="cyber"] .narrative-text {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 14px; line-height: 1.9; margin-bottom: 14px; color: #e8e8e8;
}
body[data-theme="cyber"] .pullquote {
  font-family: "Noto Sans SC", sans-serif;
  border: 1px dashed #ffcc00;
  padding: 16px; color: #ffcc00; text-align: center;
  font-size: 16px; margin: 20px 0;
}
body[data-theme="cyber"] .pullquote::before { content: '> '; color: #ff6b35; }
body[data-theme="cyber"] .annotation {
  font-family: "Noto Sans SC", sans-serif;
  border-left: 3px solid #ff6b35;
  background: rgba(255, 107, 53, 0.05);
  padding: 14px 18px; margin: 18px 0; color: #ff6b35; font-size: 13px; line-height: 1.8;
}
body[data-theme="cyber"] .annotation-from { font-family: "JetBrains Mono", monospace; font-size: 10px; color: #ff6b35; display: block; margin-bottom: 6px; letter-spacing: 2px; }
body[data-theme="cyber"] .annotation-from::before { content: '> '; }
body[data-theme="cyber"] .dialogue {
  font-family: "Noto Sans SC", sans-serif;
  border: 1px solid rgba(255, 59, 59, 0.5);
  background: rgba(255, 59, 59, 0.05);
  padding: 12px 16px; margin: 16px 0;
}
body[data-theme="cyber"] .dialogue-who { color: #ff3b3b; font-size: 11px; letter-spacing: 2px; margin-bottom: 6px; font-family: "JetBrains Mono", monospace; }
body[data-theme="cyber"] .dialogue-who::before { content: '[INCOMING] '; color: #ffcc00; }
body[data-theme="cyber"] .decision-title { color: #ff6b35; font-size: 11px; letter-spacing: 3px; margin-top: 30px; }
body[data-theme="cyber"] .choice {
  border-color: rgba(0, 255, 65, 0.3);
  background: rgba(0, 0, 0, 0.4);
  color: #00ff41;
  font-family: "JetBrains Mono", "Noto Sans SC", monospace;
}
body[data-theme="cyber"] .choice:hover {
  border-color: #00ff41;
  background: rgba(0, 255, 65, 0.1);
  box-shadow: 0 0 12px rgba(0, 255, 65, 0.4);
}
body[data-theme="cyber"] .choice-letter { color: #ff6b35; }
body[data-theme="cyber"] .choice .tag.gold { color: #ffcc00; border-color: #ffcc00; }
body[data-theme="cyber"] .choice .tag.warn { color: #ff3b3b; border-color: #ff3b3b; }

/* ============== 主题 3：像素 Win98 ============== */
body[data-theme="pixel"] {
  background: #008080;
  color: #000;
  font-family: "MS Sans Serif", "Microsoft YaHei", sans-serif;
  font-size: 13px;
}
body[data-theme="pixel"] .hud {
  background: #c0c0c0;
  border-bottom: 2px solid #fff;
  border-top: 2px solid #808080;
  font-family: "MS Sans Serif", sans-serif;
}
body[data-theme="pixel"] .scene-container {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  padding: 0;
  margin-top: 24px;
  margin-bottom: 40px;
  box-shadow: 1px 1px 0 #000;
}
body[data-theme="pixel"] .masthead {
  background: linear-gradient(90deg, #000080 0%, #1084d0 100%);
  color: #fff;
  padding: 6px 12px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-family: inherit;
}
body[data-theme="pixel"] .masthead-title { font-size: 13px; letter-spacing: 1px; }
body[data-theme="pixel"] .masthead-info { font-size: 11px; opacity: 0.9; }
body[data-theme="pixel"] .scene-inner { padding: 16px; background: #c0c0c0; }
body[data-theme="pixel"] .scene-inner-inset {
  background: #fff;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  padding: 16px 20px;
}
body[data-theme="pixel"] .episode-tag { font-size: 11px; color: #000080; font-weight: 700; margin-bottom: 8px; }
body[data-theme="pixel"] h1.headline { font-size: 22px; color: #000080; margin-bottom: 10px; line-height: 1.3; }
body[data-theme="pixel"] .deck { font-size: 13px; color: #404040; margin-bottom: 18px; line-height: 1.8; padding: 10px; background: #ffffe0; border: 1px solid #808000; }
body[data-theme="pixel"] .stamp { display: none; }
body[data-theme="pixel"] .narrative-text { font-size: 13px; line-height: 1.8; margin-bottom: 12px; }
body[data-theme="pixel"] .pullquote {
  font-size: 14px; padding: 12px; margin: 14px 0;
  background: #d4e8f5; border: 1px solid #6090c0; text-align: center;
}
body[data-theme="pixel"] .annotation {
  background: #ffffe0;
  border: 1px solid #808000;
  padding: 10px 14px; margin: 14px 0; font-size: 12px; line-height: 1.7;
}
body[data-theme="pixel"] .annotation-from { font-weight: 700; color: #800000; display: block; margin-bottom: 4px; font-size: 11px; }
body[data-theme="pixel"] .annotation-from::before { content: '⚠ '; }
body[data-theme="pixel"] .dialogue {
  background: #d4e8f5; border: 1px solid #6090c0;
  padding: 8px 12px; margin: 12px 0; font-size: 13px;
}
body[data-theme="pixel"] .dialogue-who { font-weight: 700; color: #1084d0; margin-bottom: 4px; font-size: 12px; }
body[data-theme="pixel"] .decision-title { font-size: 12px; color: #000080; font-weight: 700; margin-top: 18px; margin-bottom: 8px; padding-top: 10px; border-top: 1px solid #808080; }
body[data-theme="pixel"] .choice {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  padding: 10px 14px;
  margin-bottom: 8px;
}
body[data-theme="pixel"] .choice:hover { background: #d0d0d0; }
body[data-theme="pixel"] .choice:active { border-color: #808080 #fff #fff #808080; }
body[data-theme="pixel"] .choice-letter {
  background: #000080; color: #fff;
  padding: 1px 6px; font-size: 13px; font-weight: 700;
  width: auto;
}
body[data-theme="pixel"] .choice-text { color: #000; font-size: 13px; }
body[data-theme="pixel"] .choice .tag.gold { color: #800000; border-color: #800000; background: #ffffe0; }
body[data-theme="pixel"] .choice .tag.warn { color: #800000; border-color: #800000; }

/* ============== 主题 4：手绘 Hedcut ============== */
body[data-theme="hedcut"] {
  background: #fafaf7;
  color: #1d1d1d;
  font-family: "Source Serif 4", "Noto Serif SC", serif;
  line-height: 1.7;
}
body[data-theme="hedcut"] .hud {
  background: rgba(250, 250, 247, 0.95);
  border-bottom: 1px solid #e8e2d4;
  color: #1d1d1d;
  font-family: "Noto Sans SC", sans-serif;
}
body[data-theme="hedcut"] .scene-container { max-width: 720px; padding: 50px 30px; }
body[data-theme="hedcut"] .masthead { text-align: center; border-bottom: 1px solid #1d1d1d; padding-bottom: 18px; margin-bottom: 36px; display: block; }
body[data-theme="hedcut"] .masthead-title {
  font-family: "Source Serif 4", serif;
  font-size: 13px; letter-spacing: 8px; color: #1d1d1d;
  text-transform: uppercase; font-weight: 600;
}
body[data-theme="hedcut"] .masthead-info { font-family: "Noto Sans SC", sans-serif; font-size: 11px; color: #888; letter-spacing: 3px; margin-top: 8px; }
body[data-theme="hedcut"] .episode-tag {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 11px; color: #b8902b; letter-spacing: 4px;
  text-transform: uppercase; margin-bottom: 16px; text-align: center;
}
body[data-theme="hedcut"] h1.headline {
  font-family: "Source Serif 4", "Noto Serif SC", serif;
  font-weight: 300; font-size: 44px; line-height: 1.15;
  text-align: center; margin-bottom: 20px; color: #1d1d1d;
}
body[data-theme="hedcut"] .deck {
  font-family: "Noto Serif SC", serif;
  font-size: 16px; line-height: 1.7; text-align: center; color: #555;
  max-width: 560px; margin: 0 auto 40px; font-weight: 300;
}
body[data-theme="hedcut"] .stamp { display: none; }
body[data-theme="hedcut"] .narrative-text {
  font-family: "Noto Serif SC", serif;
  font-size: 16px; line-height: 2; color: #2a2a2a;
  margin-bottom: 18px; text-align: justify;
}
body[data-theme="hedcut"] .narrative-text.lead { font-size: 18px; }
body[data-theme="hedcut"] .narrative-text.lead::first-letter {
  font-family: "Source Serif 4", serif;
  font-size: 52px; font-weight: 300; float: left;
  line-height: 0.9; margin: 6px 10px 0 0; color: #b8902b;
}
body[data-theme="hedcut"] .pullquote {
  font-family: "Source Serif 4", "Noto Serif SC", serif;
  font-size: 24px; font-weight: 300; line-height: 1.5; font-style: italic;
  text-align: center; color: #1d1d1d;
  padding: 30px 20px; margin: 36px 0;
  border-top: 1px solid #ddd; border-bottom: 1px solid #ddd;
}
body[data-theme="hedcut"] .annotation {
  font-family: "Noto Serif SC", serif;
  font-style: italic; font-size: 15px; line-height: 1.8;
  color: #888; border-left: 2px solid #b8902b;
  padding: 4px 0 4px 20px; margin: 24px 0;
}
body[data-theme="hedcut"] .annotation-from {
  font-family: "Noto Sans SC", sans-serif;
  font-style: normal; font-size: 10px; color: #b8902b;
  letter-spacing: 3px; margin-bottom: 6px; display: block;
  text-transform: uppercase;
}
body[data-theme="hedcut"] .dialogue {
  border-left: 2px solid #1d1d1d;
  padding: 8px 0 8px 20px; margin: 20px 0;
}
body[data-theme="hedcut"] .dialogue-who {
  font-family: "Noto Sans SC", sans-serif;
  font-size: 11px; color: #b8902b; letter-spacing: 2px;
  margin-bottom: 6px; text-transform: uppercase;
}
body[data-theme="hedcut"] .decision-title {
  font-family: "Source Serif 4", "Noto Serif SC", serif;
  font-size: 22px; font-weight: 300; text-align: center;
  margin: 50px 0 28px; color: #1d1d1d;
}
body[data-theme="hedcut"] .choice {
  background: #fff;
  border: 1px solid #e8e2d4;
  border-radius: 2px;
  padding: 20px 24px;
}
body[data-theme="hedcut"] .choice:hover {
  border-color: #1d1d1d;
  background: #fefdf7;
  transform: translateX(4px);
}
body[data-theme="hedcut"] .choice-letter {
  font-family: "Source Serif 4", serif;
  font-size: 22px; font-style: italic; color: #b8902b;
  font-weight: 400;
}
body[data-theme="hedcut"] .choice-text { font-family: "Noto Serif SC", serif; font-weight: 500; color: #1d1d1d; }
body[data-theme="hedcut"] .choice .tag.gold { color: #b8902b; border-color: #b8902b; }
body[data-theme="hedcut"] .choice .tag.warn { color: #cc6666; border-color: #cc6666; }

/* ============== 主题 5：TVB 港剧 ============== */
body[data-theme="tvb"] {
  background: radial-gradient(ellipse at top, #2a1410 0%, #0d0604 80%);
  color: #e8d8b8;
  font-family: "Noto Serif TC", serif;
  min-height: 100vh;
}
body[data-theme="tvb"]::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='wood'%3E%3CfeTurbulence baseFrequency='0.012 0.18' numOctaves='3' seed='5'/%3E%3CfeColorMatrix values='0 0 0 0 0.18  0 0 0 0 0.08  0 0 0 0 0.04  0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23wood)' opacity='0.6'/%3E%3C/svg%3E");
  opacity: 0.5;
  mix-blend-mode: multiply;
}
body[data-theme="tvb"] .app { position: relative; z-index: 10; }
body[data-theme="tvb"] .hud {
  background: rgba(13, 6, 4, 0.95);
  border-bottom: 1px solid #8b6914;
  color: #d4af37;
  font-family: "Noto Sans TC", sans-serif;
}
body[data-theme="tvb"] .scene-container {
  background: linear-gradient(180deg, rgba(40, 20, 12, 0.8) 0%, rgba(20, 10, 6, 0.95) 100%);
  border: 2px solid #8b6914;
  padding: 40px 44px;
  margin-top: 30px;
  margin-bottom: 40px;
  position: relative;
  box-shadow: 0 0 60px rgba(212, 175, 55, 0.15), inset 0 0 40px rgba(0, 0, 0, 0.5);
}
body[data-theme="tvb"] .scene-container::before, body[data-theme="tvb"] .scene-container::after {
  content: '';
  position: absolute; width: 24px; height: 24px;
  border: 2px solid #d4af37;
}
body[data-theme="tvb"] .scene-container::before { top: 8px; left: 8px; border-right: none; border-bottom: none; }
body[data-theme="tvb"] .scene-container::after { bottom: 8px; right: 8px; border-left: none; border-top: none; }
body[data-theme="tvb"] .masthead { text-align: center; border-bottom: 1px solid #4a3820; padding-bottom: 16px; margin-bottom: 30px; display: block; }
body[data-theme="tvb"] .masthead-title {
  font-family: "Ma Shan Zheng", "Noto Serif TC", serif;
  font-size: 38px; color: #d4af37; letter-spacing: 8px;
  background: linear-gradient(180deg, #f4d76a 0%, #d4af37 50%, #8b6914 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
body[data-theme="tvb"] .masthead-info { font-family: "Noto Sans TC", sans-serif; font-size: 11px; color: #8b6914; letter-spacing: 3px; margin-top: 8px; }
body[data-theme="tvb"] .episode-tag {
  font-family: "Ma Shan Zheng", serif;
  font-size: 22px; color: #f5e6c8; letter-spacing: 6px;
  text-align: center; display: block; margin-bottom: 18px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
body[data-theme="tvb"] h1.headline {
  font-family: "Ma Shan Zheng", "Noto Serif TC", serif;
  font-size: 36px; color: #d4af37; letter-spacing: 4px; line-height: 1.4;
  text-align: center; margin-bottom: 16px;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}
body[data-theme="tvb"] .deck {
  font-family: "Noto Serif TC", serif;
  font-size: 15px; line-height: 1.9; color: #e8d8b8;
  text-align: center; max-width: 640px; margin: 0 auto 30px;
  padding: 16px 0; border-top: 1px solid #4a3820; border-bottom: 1px solid #4a3820;
}
body[data-theme="tvb"] .stamp { display: none; }
body[data-theme="tvb"] .narrative-text {
  font-family: "Noto Serif TC", serif;
  font-size: 16px; line-height: 2; color: #e8d8b8; margin-bottom: 18px;
}
body[data-theme="tvb"] .pullquote {
  font-family: "Ma Shan Zheng", serif;
  font-size: 24px; color: #d4af37; letter-spacing: 6px;
  text-align: center; padding: 20px 0; margin: 26px 0;
  border-top: 1px solid #4a3820; border-bottom: 1px solid #4a3820;
  text-shadow: 0 0 16px rgba(212, 175, 55, 0.4); line-height: 1.5;
}
body[data-theme="tvb"] .annotation {
  background: rgba(212, 175, 55, 0.06);
  border-left: 3px solid #d4af37;
  padding: 14px 20px; margin: 20px 0; color: #f5e6c8;
  font-family: "Noto Serif TC", serif; font-size: 14px; line-height: 1.9;
}
body[data-theme="tvb"] .annotation-from {
  font-family: "Ma Shan Zheng", serif;
  color: #d4af37; font-size: 14px; letter-spacing: 3px; display: block; margin-bottom: 6px;
}
body[data-theme="tvb"] .dialogue {
  background: rgba(212, 175, 55, 0.08);
  border-left: 3px solid #d4af37;
  padding: 14px 20px; margin: 20px 0;
}
body[data-theme="tvb"] .dialogue-who {
  font-family: "Ma Shan Zheng", serif;
  font-size: 16px; color: #d4af37; letter-spacing: 3px; margin-bottom: 6px;
}
body[data-theme="tvb"] .dialogue-text {
  font-family: "Noto Serif TC", serif;
  color: #f5e6c8; font-size: 16px; line-height: 1.9;
}
body[data-theme="tvb"] .decision-title {
  font-family: "Ma Shan Zheng", serif;
  font-size: 24px; color: #f5e6c8; letter-spacing: 8px;
  text-align: center; margin: 36px 0 24px;
  background: linear-gradient(90deg, transparent, #8b0000 50%, transparent);
  padding: 8px 0;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}
body[data-theme="tvb"] .choice {
  background: linear-gradient(90deg, rgba(40, 20, 12, 0.8), rgba(20, 10, 6, 0.6));
  border: 1px solid #4a3820;
  color: #e8d8b8;
}
body[data-theme="tvb"] .choice:hover {
  border-color: #d4af37;
  background: linear-gradient(90deg, rgba(60, 30, 18, 0.9), rgba(40, 20, 12, 0.7));
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}
body[data-theme="tvb"] .choice-letter {
  font-family: "Ma Shan Zheng", serif;
  font-size: 32px; color: #d4af37; line-height: 1;
  text-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
}
body[data-theme="tvb"] .choice-text { font-family: "Noto Serif TC", serif; color: #f5e6c8; font-size: 17px; font-weight: 500; }
body[data-theme="tvb"] .choice-meta { color: #a89060; }
body[data-theme="tvb"] .choice .tag.gold { color: #d4af37; border-color: #d4af37; }
body[data-theme="tvb"] .choice .tag.warn { color: #cc4444; border-color: #cc4444; }

/* ============== 标题页 + 结局页（共用结构，主题覆盖） ============== */
.title-screen, .ending-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}
.title-main {
  font-size: 72px;
  font-weight: 900;
  letter-spacing: 12px;
  margin-bottom: 16px;
  line-height: 1;
}
.title-sub { font-size: 14px; letter-spacing: 6px; opacity: 0.7; margin-bottom: 60px; }
.title-card {
  max-width: 540px;
  padding: 32px 36px;
  margin-bottom: 30px;
  border: 1px solid;
}
.title-card h2 { font-size: 22px; margin-bottom: 14px; letter-spacing: 2px; }
.title-card p { font-size: 14px; line-height: 1.8; opacity: 0.85; margin-bottom: 16px; }
.title-card .perk { font-size: 13px; padding: 10px 14px; margin-top: 14px; }
.title-card .perk b { display: block; margin-bottom: 4px; }

.btn-primary {
  display: inline-block;
  padding: 14px 40px;
  font-size: 14px;
  letter-spacing: 4px;
  cursor: pointer;
  border: 2px solid;
  background: transparent;
  font-family: inherit;
  color: inherit;
  transition: all 0.25s;
  margin-top: 20px;
}
.btn-primary:hover { transform: translateY(-2px); }

/* ===== 报刊主题 · 标题/按钮 ===== */
body[data-theme="newspaper"] .title-main { color: #f5f1e8; font-family: "Noto Serif SC", serif; text-shadow: 4px 4px 0 #8b1a1a; }
body[data-theme="newspaper"] .title-sub { color: #c9a961; }
body[data-theme="newspaper"] .title-card { background: rgba(245, 241, 232, 0.97); color: #1a1a1a; border-color: #1a1a1a; box-shadow: 8px 8px 0 #8b1a1a; }
body[data-theme="newspaper"] .title-card .perk { background: #efe9da; border-left: 3px solid #8b1a1a; color: #4a4239; }
body[data-theme="newspaper"] .btn-primary {
  background: #8b1a1a; color: #f5f1e8; border-color: #8b1a1a;
  font-family: "Noto Serif SC", serif; font-weight: 700;
}
body[data-theme="newspaper"] .btn-primary:hover { background: #c41e3a; border-color: #c41e3a; box-shadow: 0 6px 18px rgba(196, 30, 58, 0.4); }

/* ===== 赛博主题 · 标题/按钮 ===== */
body[data-theme="cyber"] .title-main { color: #00ff41; font-family: "JetBrains Mono", monospace; font-size: 56px; text-shadow: 0 0 24px rgba(0,255,65,0.8); letter-spacing: 4px; }
body[data-theme="cyber"] .title-sub { color: #ff6b35; }
body[data-theme="cyber"] .title-card { background: rgba(0, 20, 8, 0.6); border-color: #00ff41; color: #00ff41; box-shadow: 0 0 30px rgba(0, 255, 65, 0.2); }
body[data-theme="cyber"] .title-card h2 { color: #ffcc00; font-family: "JetBrains Mono", monospace; }
body[data-theme="cyber"] .title-card .perk { background: rgba(255,107,53,0.05); border-left: 3px solid #ff6b35; color: #ff6b35; }
body[data-theme="cyber"] .btn-primary {
  background: rgba(0, 255, 65, 0.12); color: #00ff41; border-color: #00ff41;
  font-family: "JetBrains Mono", monospace; text-shadow: 0 0 8px rgba(0,255,65,0.6);
}
body[data-theme="cyber"] .btn-primary:hover { background: #00ff41; color: #000; box-shadow: 0 0 24px rgba(0,255,65,0.6); text-shadow: none; }

/* ===== 像素 Win98 主题 · 标题/按钮 ===== */
body[data-theme="pixel"] .title-main { color: #fff; font-family: "Press Start 2P", monospace; font-size: 36px; letter-spacing: 4px; text-shadow: 4px 4px 0 #000080; }
body[data-theme="pixel"] .title-sub { color: #ffff00; font-family: "VT323", monospace; font-size: 18px; }
body[data-theme="pixel"] .title-card { background: #c0c0c0; border: 2px solid; border-color: #fff #808080 #808080 #fff; color: #000; box-shadow: 4px 4px 0 #000; }
body[data-theme="pixel"] .title-card h2 { color: #000080; }
body[data-theme="pixel"] .title-card .perk { background: #ffffe0; border: 1px solid #808000; color: #000; }
body[data-theme="pixel"] .btn-primary {
  background: #000080; color: #fff; border: 2px solid;
  border-color: #6080d0 #000040 #000040 #6080d0;
  padding: 12px 36px; font-weight: 700; letter-spacing: 6px;
  font-family: "MS Sans Serif", "Microsoft YaHei", sans-serif;
}
body[data-theme="pixel"] .btn-primary:hover { background: #1084d0; }
body[data-theme="pixel"] .btn-primary:active { border-color: #000040 #6080d0 #6080d0 #000040; }

/* ===== 手绘 Hedcut 主题 · 标题/按钮 ===== */
body[data-theme="hedcut"] .title-main { color: #1d1d1d; font-family: "Source Serif 4", serif; font-weight: 300; }
body[data-theme="hedcut"] .title-sub { color: #b8902b; }
body[data-theme="hedcut"] .title-card { background: #fff; border-color: #e8e2d4; color: #1d1d1d; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06); }
body[data-theme="hedcut"] .title-card h2 { color: #1d1d1d; font-weight: 300; }
body[data-theme="hedcut"] .title-card .perk { background: #fafaf7; border-left: 2px solid #b8902b; }
body[data-theme="hedcut"] .btn-primary {
  background: #1d1d1d; color: #fafaf7; border-color: #1d1d1d;
  font-family: "Source Serif 4", serif; font-weight: 600;
}
body[data-theme="hedcut"] .btn-primary:hover { background: #b8902b; border-color: #b8902b; box-shadow: 0 8px 20px rgba(184, 144, 43, 0.3); }

/* ===== TVB 港剧主题 · 标题/按钮 ===== */
body[data-theme="tvb"] .title-main {
  font-family: "Ma Shan Zheng", serif; color: #d4af37; font-size: 84px;
  background: linear-gradient(180deg, #f4d76a 0%, #d4af37 50%, #8b6914 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
  letter-spacing: 12px;
}
body[data-theme="tvb"] .title-sub { color: #d4af37; }
body[data-theme="tvb"] .title-card {
  background: linear-gradient(180deg, rgba(40, 20, 12, 0.92), rgba(20, 10, 6, 0.95));
  border-color: #8b6914; color: #e8d8b8;
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.15), inset 0 0 30px rgba(0, 0, 0, 0.5);
}
body[data-theme="tvb"] .title-card h2 { color: #d4af37; font-family: "Ma Shan Zheng", serif; letter-spacing: 4px; }
body[data-theme="tvb"] .title-card .perk { background: rgba(212, 175, 55, 0.06); border-left: 3px solid #d4af37; color: #f5e6c8; }
body[data-theme="tvb"] .btn-primary {
  background: linear-gradient(180deg, #f4d76a 0%, #d4af37 50%, #8b6914 100%);
  color: #1a0c08; border-color: #8b6914;
  font-family: "Ma Shan Zheng", serif; font-weight: 700; letter-spacing: 8px;
  text-shadow: 0 1px 0 rgba(255, 230, 150, 0.5);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}
body[data-theme="tvb"] .btn-primary:hover {
  background: linear-gradient(180deg, #ffd76a 0%, #f4d76a 50%, #c9a961 100%);
  box-shadow: 0 6px 30px rgba(212, 175, 55, 0.5);
}

/* 结局页 */
.ending-stamp {
  display: inline-block;
  font-size: 96px; font-weight: 900;
  border: 6px solid;
  width: 160px; height: 160px;
  line-height: 148px;
  border-radius: 50%;
  margin-bottom: 24px;
  transform: rotate(-8deg);
}
.ending-title { font-size: 32px; font-weight: 700; margin-bottom: 14px; letter-spacing: 4px; }
.ending-desc { max-width: 600px; font-size: 15px; line-height: 1.9; margin-bottom: 30px; }
.ending-stats { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; margin-bottom: 30px; }
.ending-stat { padding: 12px 20px; border: 1px solid; min-width: 110px; }
.ending-stat-label { font-size: 10px; opacity: 0.7; letter-spacing: 2px; margin-bottom: 4px; }
.ending-stat-val { font-size: 22px; font-weight: 700; }

/* ==================================================================
   主角选择页 · 五主题适配（覆盖 game.html 内联的中性样式）
   关键修复：选择页过去直接坐在 body 背景上，newspaper 主题深底+近黑字几乎不可见
   现在每个主题给选择页一个独立的"表面"，并还原各自的视觉语言
   ================================================================== */

/* 通用结构微调（所有主题共用） */
.char-select { position: relative; z-index: 10; }
.char-card .accent-bar { z-index: 2; }

/* ---------- 报刊体：头版（最初的风格） ---------- */
body[data-theme="newspaper"] .char-select {
  background:
    linear-gradient(rgba(245,241,232,0.97), rgba(245,241,232,0.97)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.85' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.4  0 0 0 0 0.35  0 0 0 0 0.28  0 0 0 0.12 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-color: #f5f1e8;
  color: #1a1a1a;
  max-width: 1080px;
  margin: 30px auto 60px;
  padding: 44px 54px 60px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  font-family: "Noto Serif SC", serif;
}
body[data-theme="newspaper"] .char-title {
  border-bottom: 4px double #1a1a1a;
  padding-bottom: 18px;
  margin-bottom: 14px;
}
body[data-theme="newspaper"] .char-title h1 {
  font-family: "Noto Serif SC", serif;
  font-size: 64px; font-weight: 900; letter-spacing: 14px;
  color: #1a1a1a;
}
body[data-theme="newspaper"] .char-title .sub { color: #8b1a1a; letter-spacing: 8px; opacity: 1; }
body[data-theme="newspaper"] .char-title .tag {
  font-family: "Noto Sans SC", sans-serif;
  color: #6b5847; opacity: 1; letter-spacing: 3px;
}
body[data-theme="newspaper"] .char-grid {
  border-top: 1px solid #c9c0b0;
  padding-top: 28px;
}
body[data-theme="newspaper"] .char-card {
  background: #efe9da;
  border: 1px solid #c9c0b0;
  border-left: 4px solid #1a1a1a;
  border-radius: 0;
  color: #1a1a1a;
}
body[data-theme="newspaper"] .char-card:hover {
  background: #1a1a1a; color: #f5f1e8;
  box-shadow: 6px 6px 0 #8b1a1a;
}
body[data-theme="newspaper"] .char-card .num { color: #8b1a1a; opacity: 1; font-family: "Noto Sans SC", sans-serif; }
body[data-theme="newspaper"] .char-card:hover .num { color: #c9a961; }
body[data-theme="newspaper"] .char-card .name { font-weight: 900; }
body[data-theme="newspaper"] .char-card .name-en { font-family: "Noto Sans SC", sans-serif; }
body[data-theme="newspaper"] .char-card .perk { border-color: #8b1a1a; color: #8b1a1a; }
body[data-theme="newspaper"] .char-card:hover .perk { border-color: #c9a961; color: #c9a961; }
body[data-theme="newspaper"] .char-card .meta { border-top-color: #c9c0b0; }
body[data-theme="newspaper"] .disclaimer { border-color: #c9c0b0; color: #6b5847; opacity: 1; }
body[data-theme="newspaper"] .disclaimer b { color: #8b1a1a; }

/* ---------- 赛博档案 ---------- */
body[data-theme="cyber"] .char-select { color: #00ff41; max-width: 1080px; }
body[data-theme="cyber"] .char-title h1 { color: #00ff41; text-shadow: 0 0 24px rgba(0,255,65,0.6); font-family: "JetBrains Mono", monospace; letter-spacing: 8px; }
body[data-theme="cyber"] .char-title .sub { color: #ff6b35; }
body[data-theme="cyber"] .char-card {
  background: rgba(0,20,8,0.5);
  border: 1px solid rgba(0,255,65,0.35);
  border-radius: 0;
  color: #00ff41;
}
body[data-theme="cyber"] .char-card:hover { border-color: #00ff41; background: rgba(0,255,65,0.08); box-shadow: 0 0 18px rgba(0,255,65,0.35); }
body[data-theme="cyber"] .char-card .num { color: #ff6b35; }
body[data-theme="cyber"] .char-card .name-en { color: #ffcc00; opacity: 0.7; }
body[data-theme="cyber"] .char-card .perk { border-color: #ff6b35; color: #ff6b35; }
body[data-theme="cyber"] .disclaimer { border-color: rgba(0,255,65,0.35); color: #8fdca0; }
body[data-theme="cyber"] .disclaimer b { color: #ffcc00; }

/* ---------- Win98 像素 ---------- */
body[data-theme="pixel"] .char-select {
  background: #c0c0c0;
  border: 2px solid; border-color: #fff #808080 #808080 #fff;
  color: #000;
  max-width: 1000px;
  margin: 30px auto 60px;
  padding: 0 0 30px;
  box-shadow: 3px 3px 0 #000;
}
body[data-theme="pixel"] .char-title {
  background: linear-gradient(90deg, #000080 0%, #1084d0 100%);
  color: #fff;
  margin: 0 0 24px; padding: 10px 16px;
  text-align: left;
}
body[data-theme="pixel"] .char-title h1 { font-family: "Press Start 2P", monospace; font-size: 22px; letter-spacing: 2px; color: #fff; margin-bottom: 8px; }
body[data-theme="pixel"] .char-title .sub,
body[data-theme="pixel"] .char-title .tag { color: #e0e0e0; opacity: 0.9; }
body[data-theme="pixel"] .char-grid { padding: 0 20px; }
body[data-theme="pixel"] .char-card {
  background: #fff;
  border: 2px solid; border-color: #808080 #fff #fff #808080;
  border-radius: 0; color: #000;
}
body[data-theme="pixel"] .char-card:hover { background: #ffffe0; }
body[data-theme="pixel"] .char-card .num { color: #000080; }
body[data-theme="pixel"] .char-card .name { color: #000080; }
body[data-theme="pixel"] .char-card .perk { border-color: #800000; color: #800000; background: #ffffe0; border-radius: 0; }
body[data-theme="pixel"] .disclaimer { margin: 24px 20px 0; border-color: #808000; background: #ffffe0; color: #404040; border-radius: 0; }
body[data-theme="pixel"] .disclaimer b { color: #800000; }

/* ---------- 财经周报 Hedcut ---------- */
body[data-theme="hedcut"] .char-select { color: #1d1d1d; max-width: 1000px; }
body[data-theme="hedcut"] .char-title { border-bottom: 1px solid #1d1d1d; padding-bottom: 20px; }
body[data-theme="hedcut"] .char-title h1 { font-family: "Source Serif 4", serif; font-weight: 300; color: #1d1d1d; letter-spacing: 10px; }
body[data-theme="hedcut"] .char-title .sub { color: #b8902b; letter-spacing: 6px; }
body[data-theme="hedcut"] .char-card {
  background: #fff;
  border: 1px solid #e8e2d4;
  border-radius: 2px;
  color: #1d1d1d;
  box-shadow: 0 8px 24px rgba(0,0,0,0.04);
}
body[data-theme="hedcut"] .char-card:hover { border-color: #1d1d1d; transform: translateY(-3px); }
body[data-theme="hedcut"] .char-card .num { color: #b8902b; }
body[data-theme="hedcut"] .char-card .name { font-family: "Source Serif 4","Noto Serif SC",serif; font-weight: 600; }
body[data-theme="hedcut"] .char-card .perk { border-color: #b8902b; color: #b8902b; }
body[data-theme="hedcut"] .disclaimer { border-color: #ddd; color: #888; }
body[data-theme="hedcut"] .disclaimer b { color: #b8902b; }

/* ---------- 港剧大时代 TVB ---------- */
body[data-theme="tvb"] .char-select { color: #e8d8b8; max-width: 1040px; position: relative; z-index: 10; }
body[data-theme="tvb"] .char-title { border-bottom: 1px solid #4a3820; padding-bottom: 20px; }
body[data-theme="tvb"] .char-title h1 {
  font-family: "Ma Shan Zheng","Noto Serif TC",serif; letter-spacing: 12px;
  background: linear-gradient(180deg,#f4d76a 0%,#d4af37 50%,#8b6914 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,0.5));
}
body[data-theme="tvb"] .char-title .sub,
body[data-theme="tvb"] .char-title .tag { color: #d4af37; opacity: 0.85; }
body[data-theme="tvb"] .char-card {
  background: linear-gradient(180deg, rgba(40,20,12,0.85), rgba(20,10,6,0.92));
  border: 1px solid #4a3820;
  border-radius: 0;
  color: #e8d8b8;
}
body[data-theme="tvb"] .char-card:hover { border-color: #d4af37; box-shadow: 0 0 24px rgba(212,175,55,0.22); }
body[data-theme="tvb"] .char-card .accent-bar { background: linear-gradient(180deg,#f4d76a,#8b6914) !important; }
body[data-theme="tvb"] .char-card .num { color: #d4af37; }
body[data-theme="tvb"] .char-card .name { font-family: "Ma Shan Zheng","Noto Serif TC",serif; color: #d4af37; letter-spacing: 3px; }
body[data-theme="tvb"] .char-card .name-en { color: #a89060; }
body[data-theme="tvb"] .char-card .perk { border-color: #d4af37; color: #d4af37; }
body[data-theme="tvb"] .char-card .meta { border-top-color: #4a3820; }
body[data-theme="tvb"] .disclaimer { border-color: #4a3820; color: #a89060; }
body[data-theme="tvb"] .disclaimer b { color: #d4af37; }

/* 切换提示 */
.theme-hint {
  position: fixed;
  bottom: 16px; left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  opacity: 0.5;
  letter-spacing: 2px;
  pointer-events: none;
}

/* ==================================================================
   「此刻」处境行 · 由累积状态合成，保证节点 N 与前 N-1 步组合一致
   五主题各自适配
   ================================================================== */
.recap-now {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 4px 0 26px;
  padding: 12px 18px;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 14px;
  line-height: 1.7;
  border-radius: 3px;
}
.recap-now .recap-label {
  flex-shrink: 0;
  font-size: 11px;
  letter-spacing: 3px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
}
.recap-now .recap-body { flex: 1; }
.recap-now .recap-body b { font-weight: 700; }

/* 报刊体 */
body[data-theme="newspaper"] .recap-now {
  background: #efe9da;
  border-left: 4px solid #1a1a1a;
  color: #2a2620;
  font-family: "Noto Serif SC", serif;
}
body[data-theme="newspaper"] .recap-now .recap-label { background: #1a1a1a; color: #f5f1e8; }
body[data-theme="newspaper"] .recap-now .recap-body b { color: #8b1a1a; }

/* 赛博档案 */
body[data-theme="cyber"] .recap-now {
  background: rgba(0, 255, 65, 0.05);
  border: 1px solid rgba(0, 255, 65, 0.3);
  color: #8fdca0;
  font-family: "JetBrains Mono", "Noto Sans SC", monospace;
}
body[data-theme="cyber"] .recap-now .recap-label { background: #00ff41; color: #001a08; }
body[data-theme="cyber"] .recap-now .recap-body b { color: #ffcc00; }

/* Win98 像素 */
body[data-theme="pixel"] .recap-now {
  background: #fff;
  border: 2px solid; border-color: #808080 #fff #fff #808080;
  border-radius: 0;
  color: #000;
}
body[data-theme="pixel"] .recap-now .recap-label { background: #000080; color: #fff; border-radius: 0; }
body[data-theme="pixel"] .recap-now .recap-body b { color: #000080; }

/* 财经周报 */
body[data-theme="hedcut"] .recap-now {
  background: #faf8f2;
  border: 1px solid #e8e2d4;
  border-left: 3px solid #b8902b;
  color: #3a3a3a;
  font-family: "Source Serif 4", "Noto Serif SC", serif;
}
body[data-theme="hedcut"] .recap-now .recap-label { background: #b8902b; color: #fff; }
body[data-theme="hedcut"] .recap-now .recap-body b { color: #1d1d1d; }

/* 港剧大时代 */
body[data-theme="tvb"] .recap-now {
  background: rgba(212, 175, 55, 0.08);
  border-left: 3px solid #d4af37;
  color: #e8d8b8;
  font-family: "Noto Serif TC", serif;
}
body[data-theme="tvb"] .recap-now .recap-label { background: #d4af37; color: #1a0c08; }
body[data-theme="tvb"] .recap-now .recap-body b { color: #d4af37; }

/* 状态变化提示动画 */
@keyframes flash-positive { 0%, 100% { background: transparent; } 50% { background: rgba(0, 200, 0, 0.3); } }
@keyframes flash-negative { 0%, 100% { background: transparent; } 50% { background: rgba(200, 0, 0, 0.3); } }
.hud-stat.flash-up { animation: flash-positive 0.6s; }
.hud-stat.flash-down { animation: flash-negative 0.6s; }

/* 状态变化浮动提示 */
.delta-popup {
  position: fixed;
  pointer-events: none;
  font-size: 18px;
  font-weight: 700;
  z-index: 9999;
  animation: float-up 1.5s ease-out forwards;
}
@keyframes float-up {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-60px); }
}
.delta-popup.up { color: #44cc44; }
.delta-popup.down { color: #cc4444; }

/* ============================================================
   移动端适配 · PC / 手机双端
   （置于所有主题之后，靠源序在等特异性下覆盖各主题取值）
   ============================================================ */
@media (max-width: 640px) {
  /* —— 画风切换器：收起为单个小钮，点击展开下拉面板 —— */
  .theme-switcher { top: 10px; right: 10px; gap: 0; padding: 4px; }
  .theme-switcher button { width: 32px; height: 32px; font-size: 12px; }
  .theme-toggle { display: flex; }
  .theme-options {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(18, 18, 18, 0.92);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  }
  .theme-switcher.open .theme-options { display: flex; }

  /* —— HUD：切换器只占一个小钮，右侧仅预留 ≈56px，其余还给指标 —— */
  .hud { padding: 8px 56px 8px 14px; gap: 10px; }
  .hud-stats { gap: 12px; }

  /* —— 关卡容器留白收敛（覆盖各主题大 padding）—— */
  body[data-theme] .scene-container { padding: 16px 12px; margin-top: 8px; margin-bottom: 16px; }
  body[data-theme="newspaper"] .scene-container { padding: 24px 16px 32px; }
  body[data-theme="pixel"] .scene-inner { padding: 10px; }

  /* —— 报头：堆叠居中、标题缩小 —— */
  body[data-theme] .masthead { flex-direction: column; align-items: center; gap: 4px; text-align: center; }
  body[data-theme] .masthead-title { font-size: 24px; letter-spacing: 3px; }

  /* —— 印章缩小，避免压住标题 —— */
  body[data-theme="newspaper"] .stamp { top: 12px; right: 12px; width: 60px; height: 60px; border-width: 2px; }
  body[data-theme="newspaper"] .stamp-cn { font-size: 11px; letter-spacing: 1px; }
  body[data-theme="newspaper"] .stamp-date { font-size: 9px; }

  /* —— 正文 / 大标题字号收敛 —— */
  body[data-theme] h1.headline { font-size: 24px; line-height: 1.3; }
  body[data-theme] .deck { font-size: 14px; margin-bottom: 18px; }
  body[data-theme] .narrative-text { font-size: 15px; line-height: 1.85; }
  body[data-theme="newspaper"] .narrative-text { text-indent: 1.6em; }
  body[data-theme="newspaper"] .narrative-text.lead::first-letter { font-size: 40px; }
  body[data-theme] .pullquote { font-size: 17px; }

  /* —— 选项 —— */
  .choice { padding: 14px 14px; }
  .choice-letter { font-size: 18px; }
  .choice-text { font-size: 15px; }
  .choice-meta { margin-left: 0; }

  /* —— 标题屏 —— */
  .title-screen, .ending-screen { padding: 70px 16px 50px; }
  .title-main, body[data-theme] .title-main { font-size: 40px; letter-spacing: 3px; line-height: 1.05; }
  .title-sub { margin-bottom: 28px; }
  .title-card { max-width: 100%; padding-left: 22px; padding-right: 22px; }
  .title-card h2 { font-size: 19px; }

  /* —— 结局屏 —— */
  .ending-title { font-size: 24px; letter-spacing: 2px; }
  .ending-desc { font-size: 14px; }
  .ending-stats { gap: 8px; }
  .ending-stat { min-width: 0; padding: 8px 12px; flex: 1 1 28%; }
}
