/* === 寻呼1996 - 游戏样式（完整版）=== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;700&family=Noto+Sans+SC:wght@300;400;700&display=swap');

:root {
  --bg-dark: #0a0a0f;
  --bg-panel: #12121a;
  --bg-card: #1a1a25;
  --text-primary: #e0ddd5;
  --text-secondary: #8a8697;
  --text-dim: #5a5668;
  --accent: #c8a84e;
  --accent-glow: #c8a84e33;
  --danger: #c0392b;
  --success: #27ae60;
  --wt-green: #33ff66;
  --wt-glow: #33ff6622;
  --border: #2a2a35;
  --font-serif: 'Noto Serif SC', serif;
  --font-sans: 'Noto Sans SC', sans-serif;
}

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

/* 触控优化：去掉移动端点击高亮与双击缩放延迟 */
body { -webkit-tap-highlight-color: transparent; }
button, .inv-spot, .timeline-slot, .puzzle-input { touch-action: manipulation; }

body {
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
}

#game-container { max-width: 800px; margin: 0 auto; min-height: 100vh; position: relative; }

/* ========== 标题画面 ========== */
#title-screen {
  position: fixed; inset: 0;
  background: var(--bg-dark);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; animation: fadeIn 1s ease;
  overflow-y: auto;            /* 小屏（横屏手机）内容超高时可滚动 */
}
#title-content { text-align: center; margin: auto; padding: 2rem 1rem; }
#title-signal {
  font-family: var(--font-serif); font-size: 3.2rem; font-weight: 700;
  letter-spacing: 0.6rem; color: var(--accent);
  text-shadow: 0 0 40px var(--accent-glow); margin-bottom: 0.5rem;
}
#title-sub { font-size: 1.1rem; letter-spacing: 0.5rem; color: var(--text-dim); margin-bottom: 2rem; }
#title-tagline { font-family: var(--font-serif); font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 3rem; font-style: italic; }
#start-btn {
  background: transparent; border: 1px solid var(--accent); color: var(--accent);
  padding: 1rem 3rem; font-size: 1.1rem; font-family: var(--font-serif);
  cursor: pointer; letter-spacing: 0.3rem; transition: all 0.3s;
}
#continue-btn {
  display: block; margin: 0 auto 1.2rem;
  background: var(--accent); border: 1px solid var(--accent); color: var(--bg-dark);
  padding: 1rem 3rem; font-size: 1.1rem; font-family: var(--font-serif);
  cursor: pointer; letter-spacing: 0.3rem; transition: all 0.3s;
}
#continue-btn:hover { box-shadow: 0 0 30px var(--accent-glow); }
#continue-btn.hidden { display: none; }
#start-btn:hover { background: var(--accent); color: var(--bg-dark); box-shadow: 0 0 30px var(--accent-glow); }
#title-note { margin-top: 3rem; font-size: 0.8rem; color: var(--text-dim); }

/* ========== 状态栏 ========== */
#status-bar {
  display: none; padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border); background: var(--bg-panel);
  position: sticky; top: 0; z-index: 50;
  align-items: center; justify-content: space-between;
}
#status-bar.visible { display: flex; }
#case-title { font-family: var(--font-serif); font-size: 0.9rem; color: var(--accent); }
#time-indicator {
  font-size: 0.8rem; color: var(--text-dim);
  padding: 0.2rem 0.8rem; border: 1px solid var(--border); border-radius: 3px;
}
#time-indicator.year-now { border-color: #3498db33; color: #5dade2; }
#time-indicator.year-past { border-color: var(--wt-green); color: var(--wt-green); text-shadow: 0 0 8px var(--wt-glow); }
#inventory-btn {
  background: transparent; border: 1px solid var(--border); color: var(--text-secondary);
  padding: 0.3rem 0.8rem; font-size: 0.85rem; cursor: pointer;
  font-family: var(--font-sans); transition: all 0.2s;
}
#inventory-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ========== 主游戏区 ========== */
#game-main { display: none; padding: 2rem 1.5rem 4rem; }
#game-main.visible { display: block; }
#scene-label {
  font-size: 0.75rem; color: var(--text-dim); letter-spacing: 0.2rem;
  text-transform: uppercase; margin-bottom: 1.5rem; padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* 跳过提示 */
#text-skip-hint {
  font-size: 0.7rem; color: var(--text-dim); text-align: right;
  margin: -1rem 0 0.8rem; opacity: 0.8; cursor: pointer;
}
#text-skip-hint.hidden { display: none; }

/* ========== 叙事文本 ========== */
#text-content { font-family: var(--font-serif); font-size: 1.05rem; line-height: 2; color: var(--text-primary); margin-bottom: 2rem; }
#text-content p { margin-bottom: 1rem; text-indent: 2em; opacity: 0; animation: textFadeIn 0.6s ease forwards; }
#text-content p.dialogue { text-indent: 0; padding-left: 1.5rem; border-left: 2px solid var(--accent); margin: 1rem 0; color: #f0ead6; }
#text-content p.thought { text-indent: 0; color: var(--text-secondary); font-style: italic; padding: 0.5rem 1rem; background: var(--bg-card); border-radius: 4px; }
#text-content p.wt-message {
  text-indent: 0; color: var(--wt-green); font-family: 'Courier New', monospace;
  padding: 0.8rem 1rem; background: #0d1a0d; border: 1px solid #1a3a1a;
  border-radius: 4px; text-shadow: 0 0 5px var(--wt-glow);
}
#text-content .highlight { color: var(--accent); font-weight: 700; }
#text-content .danger { color: var(--danger); }

/* ========== 寻呼机 ========== */
#walkie-talkie {
  background: #0d120d; border: 1px solid #1a3a1a;
  border-radius: 8px; margin-bottom: 2rem; overflow: hidden; animation: slideUp 0.5s ease;
}
#walkie-talkie.hidden { display: none; }
#wt-header {
  display: flex; align-items: center; padding: 0.6rem 1rem;
  background: #111a11; border-bottom: 1px solid #1a3a1a; gap: 0.5rem;
}
.wt-icon { font-size: 1.2rem; }
#wt-title { color: var(--wt-green); font-size: 0.85rem; font-weight: 700; flex: 1; }
#wt-frequency { color: var(--text-dim); font-family: 'Courier New', monospace; font-size: 0.75rem; padding: 0.1rem 0.5rem; border: 1px solid #1a3a1a; border-radius: 3px; }
#wt-skip-hint { color: var(--text-dim); font-size: 0.7rem; margin-left: 0.4rem; cursor: pointer; }
#wt-skip-hint.hidden { display: none; }
#wt-messages { padding: 1rem; max-height: 300px; overflow-y: auto; }
.wt-msg { margin-bottom: 0.8rem; font-family: 'Courier New', monospace; font-size: 0.9rem; line-height: 1.6; opacity: 0; animation: textFadeIn 0.4s ease forwards; }
.wt-msg .sender { font-weight: 700; margin-bottom: 0.2rem; }
.wt-msg .sender.me { color: #5dade2; }
.wt-msg .sender.partner { color: var(--wt-green); text-shadow: 0 0 5px var(--wt-glow); }
.wt-msg .msg-text { color: var(--text-primary); padding-left: 0.5rem; }
.wt-msg .msg-time { font-size: 0.7rem; color: var(--text-dim); margin-top: 0.2rem; }
.wt-static { color: var(--text-dim); font-style: italic; text-align: center; padding: 0.5rem; font-size: 0.8rem; animation: staticFlicker 2s infinite; }

/* ========== 选项 ========== */
#choices-area { margin-top: 1rem; }
.choice-btn {
  display: block; width: 100%; background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-primary); padding: 1rem 1.2rem; margin-bottom: 0.6rem;
  font-size: 0.95rem; font-family: var(--font-sans); text-align: left;
  cursor: pointer; transition: all 0.25s; border-radius: 4px;
  opacity: 0; animation: textFadeIn 0.4s ease forwards;
}
.choice-btn:hover { border-color: var(--accent); background: #1e1e2a; padding-left: 1.5rem; }
.choice-btn:active { transform: scale(0.99); }
.choice-btn .choice-tag { font-size: 0.75rem; color: var(--text-dim); margin-left: 0.3rem; }
.choice-btn .choice-tag.risky { color: var(--danger); }

/* ========== 证物袋 ========== */
#inventory-panel {
  position: fixed; right: 0; top: 0; bottom: 0; width: 320px;
  background: var(--bg-panel); border-left: 1px solid var(--border);
  z-index: 80; overflow-y: auto; animation: slideLeft 0.3s ease;
}
#inventory-panel.hidden { display: none; }
#inv-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; border-bottom: 1px solid var(--border); }
#inv-header h3 { font-family: var(--font-serif); color: var(--accent); font-size: 1rem; }
#inv-header button { background: transparent; border: none; color: var(--text-dim); font-size: 1.2rem; cursor: pointer; }
.inv-item { padding: 1rem 1.2rem; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.2s; }
.inv-item:hover { background: var(--bg-card); }
.inv-item .inv-name { color: var(--accent); font-weight: 700; font-size: 0.9rem; margin-bottom: 0.3rem; }
.inv-item .inv-desc { color: var(--text-secondary); font-size: 0.8rem; line-height: 1.5; }
.inv-item .inv-time { font-size: 0.7rem; color: var(--text-dim); margin-top: 0.3rem; }
#inv-empty { padding: 2rem; text-align: center; color: var(--text-dim); font-style: italic; }

/* ========== 调查场景 ========== */
.investigation-area {
  background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: 8px; padding: 1.5rem; margin-bottom: 2rem; animation: slideUp 0.5s ease;
}
.inv-scene-title {
  font-family: var(--font-serif); font-size: 1.1rem; color: var(--accent);
  margin-bottom: 0.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border);
}
.inv-scene-desc { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1.2rem; line-height: 1.6; }
.inv-spots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; margin-bottom: 1.5rem; }
.inv-spot {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px;
  padding: 1rem; cursor: pointer; transition: all 0.25s;
  display: flex; align-items: center; gap: 0.6rem;
}
.inv-spot:hover { border-color: var(--accent); background: #1e1e2a; transform: translateY(-2px); }
.inv-spot.found { border-color: var(--success); background: #0d1a0d; }
.spot-icon { font-size: 1.5rem; }
.spot-name { font-size: 0.9rem; color: var(--text-primary); flex: 1; }
.spot-found { color: var(--success); font-weight: 700; }
.inv-result {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px;
  padding: 0; min-height: 0; transition: all 0.3s; overflow: hidden;
}
.inv-result:not(:empty) { padding: 1.2rem; min-height: 80px; margin-bottom: 1rem; }
.inv-found-title { color: var(--accent); font-weight: 700; font-size: 0.9rem; margin-bottom: 0.5rem; }
.inv-found-text { color: var(--text-primary); font-size: 0.9rem; line-height: 1.8; }
.inv-found-text .highlight { color: var(--accent); font-weight: 700; }
.inv-complete {
  margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--border);
  color: var(--success); font-weight: 700; text-align: center; font-size: 0.95rem;
}
.inv-exit-btn {
  display: block; width: 100%; margin-top: 1rem; padding: 0.8rem;
  background: transparent; border: 1px solid var(--accent); color: var(--accent);
  font-size: 0.95rem; font-family: var(--font-sans); cursor: pointer;
  border-radius: 4px; transition: all 0.3s;
}
.inv-exit-btn:hover { background: var(--accent); color: var(--bg-dark); }
.inv-exit-btn.hidden { display: none; }

/* ========== 密码谜题 ========== */
.puzzle-area {
  background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: 8px; padding: 1.5rem; margin-bottom: 2rem; animation: slideUp 0.5s ease;
}
.puzzle-title {
  font-family: var(--font-serif); font-size: 1.1rem; color: var(--accent);
  margin-bottom: 0.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border);
}
.puzzle-desc { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1rem; line-height: 1.6; }
.puzzle-cipher {
  background: #0d120d; border: 1px solid #1a3a1a; border-radius: 6px;
  padding: 1.2rem; margin-bottom: 1rem; font-family: 'Courier New', monospace;
  font-size: 1.1rem; color: var(--wt-green); text-align: center;
  letter-spacing: 0.3rem; text-shadow: 0 0 5px var(--wt-glow);
}
.puzzle-hint { color: var(--text-dim); font-size: 0.85rem; margin-bottom: 1rem; font-style: italic; }
.puzzle-input-area { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.puzzle-input {
  flex: 1; min-width: 0; max-width: 100%;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px;
  padding: 0.8rem 1rem; color: var(--text-primary); font-size: 1rem;
  font-family: var(--font-sans); outline: none; transition: border-color 0.2s;
}
.puzzle-input:focus { border-color: var(--accent); }
.puzzle-input::placeholder { color: var(--text-dim); }
.puzzle-submit {
  flex-shrink: 0;
  background: var(--accent); border: none; color: var(--bg-dark);
  padding: 0.8rem 1.5rem; font-size: 0.95rem; font-weight: 700;
  font-family: var(--font-sans); cursor: pointer; border-radius: 4px;
  transition: opacity 0.2s;
}
.puzzle-submit:hover { opacity: 0.85; }
.puzzle-feedback { min-height: 1.5rem; margin-bottom: 0.5rem; }
.puzzle-correct { color: var(--success); font-weight: 700; font-size: 0.95rem; text-align: center; padding: 0.5rem; }
.puzzle-wrong { color: var(--danger); font-size: 0.9rem; text-align: center; padding: 0.3rem; }
.puzzle-extra-hints { margin-top: 0.5rem; }
.puzzle-hint-step { color: var(--accent); font-size: 0.85rem; padding: 0.5rem; background: var(--bg-card); border-radius: 4px; border-left: 2px solid var(--accent); }

/* ========== 证物组合 ========== */
.combine-area {
  background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: 8px; padding: 1.5rem; margin-bottom: 2rem; animation: slideUp 0.5s ease;
}
.combine-title {
  font-family: var(--font-serif); font-size: 1.1rem; color: var(--accent);
  margin-bottom: 0.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border);
}
.combine-desc { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1.2rem; line-height: 1.6; }
.combine-slots { display: flex; gap: 1rem; margin-bottom: 1.2rem; justify-content: center; }
.combine-slot {
  flex: 1; max-width: 250px; min-height: 60px; background: var(--bg-card);
  border: 2px dashed var(--border); border-radius: 6px; padding: 0.8rem;
  display: flex; align-items: center; justify-content: center; transition: all 0.3s;
}
.combine-slot.filled { border-style: solid; border-color: var(--accent); background: #1a1a10; }
.combine-slot .slot-empty { color: var(--text-dim); font-size: 0.85rem; font-style: italic; }
.combine-slot .slot-filled { color: var(--accent); font-size: 0.9rem; font-weight: 700; }
.combine-available { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.combine-item {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px;
  padding: 0.5rem 1rem; color: var(--text-primary); font-size: 0.85rem;
  font-family: var(--font-sans); cursor: pointer; transition: all 0.2s;
}
.combine-item:hover { border-color: var(--accent); color: var(--accent); }
.combine-result { min-height: 1.5rem; }
.combine-success { color: var(--success); font-weight: 700; font-size: 1rem; margin-bottom: 0.5rem; text-align: center; }
.combine-text { color: var(--text-primary); font-size: 0.9rem; line-height: 1.8; text-align: center; padding: 0.5rem; }
.combine-text .highlight { color: var(--accent); font-weight: 700; }
.combine-fail { color: var(--text-dim); font-size: 0.9rem; text-align: center; font-style: italic; padding: 0.5rem; }

/* ========== 结局 ========== */
#ending-screen {
  position: fixed; inset: 0; background: var(--bg-dark);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  overflow-y: auto;             /* 结局长文本在手机上需可滚动 */
}
#ending-screen.hidden { display: none; }
#ending-content { text-align: center; max-width: 600px; padding: 2rem; margin: auto; }
#ending-title { font-family: var(--font-serif); font-size: 2rem; color: var(--accent); margin-bottom: 1.5rem; }
#ending-text { font-family: var(--font-serif); font-size: 1.05rem; line-height: 2; color: var(--text-primary); margin-bottom: 2rem; }
#ending-text p { margin-bottom: 1rem; }
#ending-text strong { color: var(--accent); }
#ending-text em { color: var(--text-secondary); }
#ending-stats { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 2rem; line-height: 2; }
#ending-content button {
  background: transparent; border: 1px solid var(--accent); color: var(--accent);
  padding: 0.8rem 2.5rem; font-size: 1rem; font-family: var(--font-serif);
  cursor: pointer; transition: all 0.3s;
}
#ending-content button:hover { background: var(--accent); color: var(--bg-dark); }

/* ========== 通知 ========== */
.game-notification {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%);
  background: var(--bg-card); border: 1px solid var(--accent);
  color: var(--accent); padding: 0.8rem 1.5rem; border-radius: 4px;
  font-size: 0.9rem; z-index: 200; animation: slideUp 0.3s ease;
  box-shadow: 0 0 20px var(--accent-glow);
  max-width: 90vw; text-align: center;
}

/* ========== 滚动条 ========== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ========== 动画 ========== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes textFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideLeft { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes staticFlicker { 0%, 100% { opacity: 0.3; } 50% { opacity: 0.8; } }

/* ========== 密码谜题 - 线索卡片 ========== */
.puzzle-clue-cards { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1rem; }
.puzzle-clue-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px;
  padding: 0.6rem 1rem; font-size: 0.85rem; color: var(--text-primary);
  display: flex; align-items: center; gap: 0.4rem;
}
.puzzle-clue-card .card-icon { font-size: 1.1rem; }
.puzzle-timer { text-align: center; font-size: 0.9rem; color: var(--text-secondary); padding: 0.3rem; }

/* ========== 时间线拼图 ========== */
.timeline-area {
  background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: 8px; padding: 1.5rem; margin-bottom: 2rem; animation: slideUp 0.5s ease;
}
.timeline-title {
  font-family: var(--font-serif); font-size: 1.1rem; color: var(--accent);
  margin-bottom: 0.5rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border);
}
.timeline-desc { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1.2rem; line-height: 1.6; }
.timeline-slots { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.2rem; }
.timeline-slot {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px;
  padding: 0.8rem 1rem; display: flex; align-items: center; gap: 0.8rem;
  min-height: 50px; transition: all 0.3s; cursor: pointer;
}
.timeline-slot:hover { border-color: var(--accent); }
.timeline-slot.filled { border-color: var(--success); background: #0d1a0d; }
.tl-time {
  color: var(--accent); font-weight: 700; font-size: 0.85rem; min-width: 80px;
  font-family: 'Courier New', monospace;
}
.tl-event { color: var(--text-primary); font-size: 0.9rem; flex: 1; }
.tl-placeholder { color: var(--text-dim); font-size: 0.85rem; font-style: italic; flex: 1; }
.timeline-events { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.timeline-event-btn {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 4px;
  padding: 0.5rem 1rem; color: var(--text-primary); font-size: 0.85rem;
  font-family: var(--font-sans); cursor: pointer; transition: all 0.2s;
}
.timeline-event-btn:hover { border-color: var(--accent); color: var(--accent); }
.timeline-feedback { min-height: 1.5rem; }
.timeline-correct { color: var(--success); font-weight: 700; font-size: 0.95rem; text-align: center; padding: 0.5rem; }
.timeline-wrong { color: var(--danger); font-size: 0.9rem; text-align: center; padding: 0.3rem; }

/* ========== 音效开关 ========== */
#sound-toggle {
  position: fixed; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); right: 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 1.2rem;
  width: 44px; height: 44px; border-radius: 50%;
  cursor: pointer; z-index: 90; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
#sound-toggle:hover { border-color: var(--accent); color: var(--accent); }
#sound-toggle.muted { opacity: 0.5; }

/* ========== 响应式 ========== */
@media (max-width: 600px) {
  #title-signal { font-size: 2.2rem; letter-spacing: 0.4rem; }
  #title-sub { font-size: 0.9rem; letter-spacing: 0.5rem; }
  #title-tagline { margin-bottom: 2rem; }
  #title-note { margin-top: 2rem; }
  #game-main { padding: 1.2rem 1rem 5rem; }
  #inventory-panel { width: 100%; }
  #status-bar { padding: 0.7rem 0.9rem; flex-wrap: wrap; gap: 0.4rem 0.8rem; }
  #case-title { flex: 1 1 100%; text-align: center; font-size: 0.85rem; }
  #time-indicator { font-size: 0.72rem; padding: 0.15rem 0.6rem; }
  #inventory-btn { font-size: 0.8rem; padding: 0.35rem 0.7rem; }
  .inv-spots { grid-template-columns: 1fr; }
  .combine-slots { flex-direction: column; align-items: center; }
  .combine-slot { max-width: 100%; }
  #text-content { font-size: 1rem; line-height: 1.9; }
  #wt-messages { max-height: 240px; }
  .puzzle-cipher { font-size: 0.95rem; letter-spacing: 0.15rem; padding: 0.9rem 0.7rem; }
  .puzzle-input { font-size: 16px; } /* ≥16px 防止 iOS 聚焦时自动放大页面 */
  .puzzle-submit { padding: 0.8rem 1.1rem; }
  .puzzle-area, .combine-area, .timeline-area, .investigation-area { padding: 1.1rem 0.9rem; }
  .tl-time { min-width: 64px; font-size: 0.76rem; }
  .timeline-slot { gap: 0.5rem; padding: 0.7rem 0.8rem; }
  #ending-title { font-size: 1.5rem; }
  #ending-content { padding: 1.5rem 1.2rem; }
  .game-notification { top: 8px; left: 8px; right: 8px; transform: none; }
}

/* ========== 自定义鼠标指针（侦探放大镜主题，仅精确指针设备启用）========== */
@media (pointer: fine) {
  body { cursor: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%2228%22%20height=%2228%22%3E%3Ccircle%20cx=%2211%22%20cy=%2211%22%20r=%227%22%20style=%22fill:rgba(200,168,78,.15);stroke:%23c8a84e;stroke-width:2.5%22/%3E%3Cline%20x1=%2216.5%22%20y1=%2216.5%22%20x2=%2225%22%20y2=%2225%22%20style=%22stroke:%23c8a84e;stroke-width:3;stroke-linecap:round%22/%3E%3C/svg%3E") 11 11, auto; }
  button, [onclick] { cursor: url("data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%2228%22%20height=%2228%22%3E%3Ccircle%20cx=%2211%22%20cy=%2211%22%20r=%227%22%20style=%22fill:rgba(51,255,102,.12);stroke:%2333ff66;stroke-width:2.5%22/%3E%3Cline%20x1=%2216.5%22%20y1=%2216.5%22%20x2=%2225%22%20y2=%2225%22%20style=%22stroke:%2333ff66;stroke-width:3;stroke-linecap:round%22/%3E%3C/svg%3E") 11 11, pointer; }
  input, textarea { cursor: text; }
}

/* ========== 证物组合卡关提示 ========== */
.combine-hint { color: var(--accent); font-size: 0.85rem; margin-top: 0.6rem; text-align: center; animation: textFadeIn 0.4s ease; }
/* ========== 作者署名与彩蛋 ========== */
#title-author {
  margin-top: 1.2rem;
  color: rgba(200, 168, 78, 0.75);
  font-size: 0.9rem;
  letter-spacing: 0.3rem;
  font-family: 'Courier New', monospace;
}

#title-signal { user-select: none; -webkit-user-select: none; }
#title-signal:hover { text-shadow: 0 0 18px rgba(51, 255, 102, 0.55); }

#title-egg, #title-date {
  margin-top: 1rem;
  color: var(--pager, #33ff66);
  font-size: 0.85rem;
  letter-spacing: 0.1rem;
  animation: textFadeIn 1.2s ease;
}

#title-date { color: rgba(51, 255, 102, 0.5); font-size: 0.75rem; }

#ending-credit {
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(200, 168, 78, 0.25);
  color: rgba(200, 168, 78, 0.85);
  font-size: 0.85rem;
  letter-spacing: 0.25rem;
  line-height: 1.8;
  animation: textFadeIn 1.5s ease;
}

.inv-badge {
  margin-bottom: 0.8rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid rgba(200, 168, 78, 0.5);
  border-radius: 6px;
  background: rgba(200, 168, 78, 0.08);
  color: var(--accent, #c8a84e);
  font-size: 0.8rem;
  text-align: center;
  letter-spacing: 0.1rem;
}
/* ========== 信号特效系统（glitch / 扫描线 / 反馈闪烁 / 危机脉冲） ========== */

/* glitch 抖动：时空切换与信号干扰（加在 #game-container 上） */
.fx-glitch { animation: fxGlitch 0.32s linear; }
@keyframes fxGlitch {
  0% { transform: translate(0); filter: none; }
  20% { transform: translate(-3px, 2px); filter: hue-rotate(90deg); }
  40% { transform: translate(3px, -2px); filter: hue-rotate(180deg) saturate(1.6); }
  60% { transform: translate(-2px, -1px); filter: saturate(2); }
  80% { transform: translate(2px, 1px); filter: hue-rotate(270deg); }
  100% { transform: translate(0); filter: none; }
}

/* 扫描线 overlay：仅 glitch 激活期间可见（平时不干扰阅读） */
#fx-scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 9998;
  opacity: 0; transition: opacity 0.12s;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.22) 0 1px, transparent 1px 3px);
}
#fx-scanlines.active { opacity: 1; }

/* 标题 glitch 错位：红/蓝分离，平时隐形、每 4 秒瞬间闪错一次 */
#title-signal { position: relative; }
#title-signal::before,
#title-signal::after {
  content: attr(data-text);
  position: absolute; left: 0; top: 0; width: 100%;
  text-align: inherit; overflow: hidden; pointer-events: none;
  opacity: 0;
}
#title-signal::before {
  color: #ff0040;
  clip-path: polygon(0 0, 100% 0, 100% 32%, 0 32%);
  animation: fxTitleGlitch 4s infinite;
}
#title-signal::after {
  color: #00d4ff;
  clip-path: polygon(0 68%, 100% 68%, 100% 100%, 0 100%);
  animation: fxTitleGlitch 4s infinite reverse;
}
@keyframes fxTitleGlitch {
  0%, 88%, 100% { transform: translate(0); opacity: 0; }
  90% { transform: translate(3px, -1px); opacity: .75; }
  93% { transform: translate(-3px, 1px); opacity: .75; }
  96% { transform: translate(1px, 2px); opacity: .75; }
}

/* 谜题反馈闪烁：信号确认（绿）/ 信号干扰（红） */
#fx-flash {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: bold; letter-spacing: .4rem;
  font-family: 'Courier New', monospace;
  opacity: 0;
}
#fx-flash.show { animation: fxFlash 0.9s ease forwards; }
#fx-flash.grant { background: rgba(51, 255, 102, .13); color: #33ff66; text-shadow: 0 0 14px rgba(51,255,102,.6); }
#fx-flash.deny { background: rgba(255, 0, 64, .15); color: #ff3b5c; text-shadow: 0 0 14px rgba(255,59,92,.6); }
@keyframes fxFlash {
  0% { opacity: 0; }
  15% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}

/* 危机脉冲：限时谜题最后 10 秒的屏幕边缘红光（与心跳音效同步） */
#fx-danger {
  position: fixed; inset: 0; z-index: 9997; pointer-events: none;
  opacity: 0;
  box-shadow: inset 0 0 120px rgba(255, 0, 64, .5);
}
#fx-danger.active { animation: fxDanger 1s ease-in-out infinite; }
@keyframes fxDanger {
  0%, 100% { opacity: .12; }
  50% { opacity: .75; }
}

/* 无障碍：尊重系统的"减少动态效果"偏好 */
@media (prefers-reduced-motion: reduce) {
  .fx-glitch, #title-signal::before, #title-signal::after { animation: none !important; }
  #fx-flash.show { animation: none; opacity: 0; }
  #fx-danger.active { animation: none; opacity: .35; }
}