/* === 寻呼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;
}

/* ========== 《案外之声》案卷目录 ========== */
#title-content.archive-title-content {
  width: min(760px, 100%);
  text-align: left;
  padding: 2.5rem 1.25rem 3rem;
}
.archive-title-content #title-signal,
.archive-title-content #title-sub,
.archive-title-content #title-tagline,
.archive-title-content #title-author,
.archive-title-content #title-date,
.archive-title-content #title-egg,
.archive-title-content #title-note {
  text-align: center;
}
.archive-title-content #title-signal {
  margin-bottom: 0.25rem;
}
.archive-title-content #title-sub {
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 1.35rem;
  letter-spacing: 0.45rem;
  margin-bottom: 0.8rem;
}
.archive-title-content #title-tagline {
  margin-bottom: 2rem;
}
#case-archive {
  width: 100%;
  margin: 1.25rem auto 1.6rem;
}
.archive-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}
.archive-heading span {
  color: var(--text-dim);
  font-family: 'Courier New', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.16rem;
}
.archive-heading strong {
  color: var(--text-primary);
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 400;
}
#case-list {
  display: grid;
  gap: 0.65rem;
}
.case-entry {
  width: 100%;
  min-height: 82px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, background 0.2s, transform 0.16s;
}
.case-entry.selected {
  border-color: var(--accent);
  background: #20202a;
}
.case-entry:active { transform: scale(0.99); }
.case-entry:disabled {
  cursor: default;
  opacity: 0.48;
}
.case-entry-index {
  color: var(--wt-green);
  font-family: 'Courier New', monospace;
  font-size: 1.25rem;
  border-right: 1px solid #27552f;
  line-height: 2.2;
}
.case-entry-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.case-entry-copy strong {
  overflow-wrap: anywhere;
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 700;
}
.case-entry-copy small {
  color: var(--text-secondary);
  font-size: 0.76rem;
}
.case-entry-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 3.7rem;
  color: var(--text-dim);
  font-size: 0.68rem;
  white-space: nowrap;
}
.case-entry-mark {
  color: var(--accent);
  font-size: 0.76rem;
  white-space: nowrap;
}
.case-entry-stamp {
  padding: 0.18rem 0.38rem;
  border: 2px double rgba(200,168,78,0.78);
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08rem;
  line-height: 1.15;
  transform: rotate(-4deg);
  opacity: 0.9;
}
.case-entry.completed:not(.selected) { border-color: rgba(200,168,78,0.35); }
.case-entry.in-progress:not(.completed) .case-entry-mark { color: var(--wt-green); }
#case-brief {
  margin-top: 0.9rem;
  padding: 0.85rem 0 0.1rem 1rem;
  border-left: 2px solid var(--accent);
}
.case-brief-row {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.75rem;
  font-size: 0.82rem;
  line-height: 1.65;
}
.case-brief-row span { color: var(--text-dim); }
.case-brief-row strong { color: var(--text-primary); font-weight: 400; }
#case-brief p {
  color: var(--text-secondary);
  font-family: var(--font-serif);
  font-size: 0.88rem;
  line-height: 1.75;
  margin-top: 0.45rem;
}
.archive-title-content #continue-btn,
.archive-title-content #start-btn {
  display: block;
  width: min(280px, 100%);
  margin-left: auto;
  margin-right: auto;
}
.status-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
#archive-btn {
  width: 36px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
}
#archive-btn:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 560px) {
  #title-content.archive-title-content { padding: 1.5rem 0.9rem 2.5rem; }
  .archive-title-content #title-signal { font-size: 2.15rem; letter-spacing: 0.32rem; }
  .archive-title-content #title-sub { font-size: 1.05rem; letter-spacing: 0.32rem; }
  .archive-title-content #title-tagline { font-size: 0.9rem; margin-bottom: 1.35rem; }
  .case-entry { grid-template-columns: 38px minmax(0, 1fr); min-height: 78px; gap: 0.7rem; padding: 0.75rem; }
  .case-entry-state { grid-column: 2; align-items: flex-start; min-width: 0; }
  .case-brief-row { grid-template-columns: 4.7rem minmax(0, 1fr); }
  #status-bar { gap: 0.45rem; padding: 0.75rem; }
  #time-indicator { display: none; }
}

* { 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: calc(1rem + env(safe-area-inset-top, 0px)) 1.5rem 1rem;
  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: 2.25rem 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 {
  position: relative;
  background:
    linear-gradient(180deg, rgba(51,255,102,0.055), transparent 46%),
    #071107;
  border: 1px solid #1a3a1a;
  border-radius: 8px; margin-bottom: 2rem; overflow: hidden; animation: slideUp 0.5s ease;
  box-shadow: inset 0 0 22px rgba(51,255,102,0.08), 0 0 18px rgba(0,0,0,0.25);
}
#walkie-talkie::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(51,255,102,0.045) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(51,255,102,0.025) 0 1px, transparent 1px 5px);
  mix-blend-mode: screen;
  opacity: .5;
  z-index: 1;
}
#walkie-talkie.hidden { display: none; }
#wt-header {
  position: relative; z-index: 2;
  display: flex; align-items: center; padding: 0.6rem 1rem;
  background: rgba(9, 22, 9, 0.92); 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;
  font-family: 'Courier New', monospace; letter-spacing: 0.06em;
  text-shadow: 0 0 8px rgba(51,255,102,0.4);
}
#wt-frequency {
  color: rgba(51,255,102,0.62); font-family: 'Courier New', monospace; font-size: 0.75rem;
  padding: 0.1rem 0.5rem; border: 1px solid #1a3a1a; border-radius: 3px;
  background: rgba(0,0,0,0.22);
}
#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 {
  position: relative; z-index: 2;
  padding: 1rem; max-height: 300px; overflow-y: auto;
  background: radial-gradient(circle at 50% 0%, rgba(51,255,102,0.04), transparent 58%);
}
.wt-msg {
  margin-bottom: 0.8rem;
  font-family: 'Courier New', 'Lucida Console', monospace;
  font-size: 0.9rem; line-height: 1.65; letter-spacing: 0.025em;
  opacity: 0; animation: textFadeIn 0.4s ease forwards;
  font-variant-numeric: tabular-nums;
}
.wt-msg .sender {
  font-weight: 700; margin-bottom: 0.2rem; letter-spacing: 0.08em;
  text-transform: uppercase;
}
.wt-msg .sender.me { color: #68b8ff; text-shadow: 0 0 7px rgba(104,184,255,0.28); }
.wt-msg .sender.partner { color: var(--wt-green); text-shadow: 0 0 7px rgba(51,255,102,0.42); }
.wt-msg .msg-text {
  color: #caffd2;
  padding-left: 0.5rem;
  text-shadow: 0 0 5px rgba(51,255,102,0.24);
  -webkit-font-smoothing: none;
  font-smooth: never;
}
.wt-msg .msg-time {
  font-size: 0.7rem; color: rgba(51,255,102,0.38); margin-top: 0.2rem;
  letter-spacing: 0.04em;
}
.wt-static {
  color: rgba(51,255,102,0.42); font-style: normal; text-align: center;
  padding: 0.5rem; font-size: 0.8rem; letter-spacing: 0.14em;
  font-family: 'Courier New', monospace;
  animation: staticFlicker 2s infinite;
}

/* ========== 选项 ========== */
#choices-area { margin-top: 1rem; }
.choice-btn {
  display: block; width: 100%; min-height: 56px; 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: 1; animation: textFadeIn 0.4s ease backwards;
}
.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-limit-note {
  margin: -0.45rem 0 1.2rem; padding-left: 0.75rem; border-left: 2px solid var(--warning);
  color: var(--warning); font-size: 0.82rem; 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:active { transform: scale(0.99); }
.inv-spot.found { border-color: var(--success); background: #0d1a0d; }
.inv-spot:disabled { cursor: default; }
.inv-spot.missed { border-style: dashed; opacity: 0.42; filter: grayscale(0.75); }
.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-casefile {
  position: relative;
  overflow: hidden;
  margin: 0 auto 1.5rem;
  padding: 1.2rem;
  max-width: 460px;
  text-align: left;
  border: 1px solid rgba(200,168,78,0.5);
  border-radius: 4px;
  background:
    repeating-linear-gradient(0deg, rgba(51,255,102,0.026) 0, rgba(51,255,102,0.026) 1px, transparent 1px, transparent 5px),
    linear-gradient(135deg, rgba(18,26,24,0.94), rgba(12,13,18,0.98));
  box-shadow: inset 0 0 36px rgba(51,255,102,0.04), 0 12px 36px rgba(0,0,0,0.2);
  animation: endingFadeIn 0.8s ease both;
}
.casefile-signal { display: flex; align-items: center; justify-content: space-between; margin: -0.1rem 0 1rem; color: var(--wt-green); font: 0.66rem 'Courier New', monospace; letter-spacing: 0.12em; }
.casefile-signal::before { content: ''; width: 34px; height: 5px; margin-right: 0.55rem; background: repeating-linear-gradient(90deg, var(--wt-green) 0 2px, transparent 2px 5px); box-shadow: 0 0 8px rgba(51,255,102,0.45); }
.casefile-signal span { margin-left: auto; color: rgba(51,255,102,0.72); }
.casefile-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 0 0 0.9rem; border-bottom: 1px solid rgba(200,168,78,0.26); }
.casefile-kicker { color: var(--text-dim); font-family: 'Courier New', monospace; font-size: 0.68rem; letter-spacing: 0.08em; line-height: 1.5; }
.casefile-title { color: var(--accent); font-family: var(--font-serif); font-size: 1.16rem; margin-top: 0.2rem; }
.casefile-stamp { flex: 0 0 auto; color: var(--accent); border: 1px solid var(--accent); padding: 0.3rem 0.48rem; font: 700 0.7rem 'Courier New', monospace; letter-spacing: 0.08em; transform: rotate(-4deg); box-shadow: inset 0 0 0 2px rgba(200,168,78,0.08); }
.casefile-role { margin: 1rem 0 0.8rem; color: var(--text-primary); font-family: var(--font-serif); font-size: 1.24rem; }
.casefile-role span { display: block; margin-bottom: 0.3rem; color: var(--text-dim); font-family: 'Courier New', monospace; font-size: 0.66rem; letter-spacing: 0.12em; }
.casefile-route { color: var(--text-secondary); font-size: 0.84rem; line-height: 1.72; padding: 0.82rem 0; border-top: 1px dashed rgba(200,168,78,0.18); border-bottom: 1px dashed rgba(200,168,78,0.18); }
.casefile-trust { color: var(--wt-green); font: 0.7rem 'Courier New', monospace; letter-spacing: 0.06em; }
.casefile-badges { margin-top: 0.9rem; border-top: 1px solid rgba(200,168,78,0.16); }
.casefile-badge { display: grid; grid-template-columns: 2.2rem 1fr; gap: 0.4rem; min-width: 0; padding: 0.68rem 0; border-bottom: 1px solid rgba(200,168,78,0.14); }
.casefile-index { color: var(--wt-green); font: 0.78rem 'Courier New', monospace; padding-top: 0.12rem; }
.casefile-badge strong { display: block; color: var(--accent); font-family: var(--font-serif); font-size: 0.9rem; font-weight: 700; }
.casefile-badge span { display: block; margin-top: 0.2rem; color: var(--text-dim); font-size: 0.7rem; line-height: 1.35; }
#ending-share { margin: 0 auto 1.8rem; }
#ending-share.hidden { display: none; }
#ending-share-btn { min-height: 48px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
#ending-share-status { min-height: 1.25rem; margin-top: 0.55rem; color: var(--text-dim); font-size: 0.75rem; }
#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); }
#ending-song-btn.playing {
  border-color: var(--wt-green);
  color: var(--wt-green);
  box-shadow: 0 0 18px rgba(51,255,102,0.16);
}
#ending-song-btn.playing:hover {
  background: var(--wt-green);
  color: var(--bg-dark);
}
#ending-song {
  margin: 0 auto 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(200,168,78,0.18);
  border-bottom: 1px solid rgba(200,168,78,0.18);
}
#ending-song.hidden,
#ending-lyrics.hidden,
#ending-roll.hidden { display: none; }
#ending-song-actions {
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}
#ending-song-link {
  display: inline-block;
  background: transparent;
  border: 1px solid rgba(200,168,78,0.72);
  color: var(--accent);
  padding: 0.8rem 2rem;
  font-size: 1rem;
  font-family: var(--font-serif);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s;
}
#ending-song-link:hover {
  background: var(--accent);
  color: var(--bg-dark);
}
#ending-song-status {
  color: var(--text-secondary);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}
#ending-song-meta {
  margin-top: 0.35rem;
  color: var(--text-dim);
  font-size: 0.78rem;
}
#ending-lyrics {
  max-height: 300px;
  margin: 0 auto 1.8rem;
  padding: 1rem 1.2rem;
  overflow-y: auto;
  text-align: center;
  border: 1px solid rgba(200,168,78,0.18);
  border-radius: 6px;
  background: rgba(255,255,255,0.018);
  scroll-behavior: smooth;
  transition: border-color 0.6s ease, box-shadow 0.6s ease;
}
#ending-lyrics.signal-live {
  border-color: rgba(51,255,102,0.28);
  box-shadow: 0 0 24px rgba(51,255,102,0.08), inset 0 0 18px rgba(51,255,102,0.035);
  animation: lyricSignalBreath 3.8s ease-in-out infinite;
}
#ending-lyrics .lyrics-title {
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 1rem;
  text-align: center;
  margin-bottom: 1rem;
}
#ending-lyrics .lyrics-body {
  color: var(--text-secondary);
  font-family: var(--font-serif);
  font-size: 0.92rem;
  line-height: 1.9;
  text-align: center;
  padding: 5.2rem 0;
}
#ending-lyrics .lyric-line {
  margin: 0.34rem auto;
  color: var(--text-secondary);
  opacity: 0.42;
  transition: color 0.35s ease, opacity 0.35s ease, transform 0.35s ease, text-shadow 0.35s ease;
}
#ending-lyrics .lyric-line.active {
  color: var(--accent);
  opacity: 1;
  transform: scale(1.04);
  text-shadow: 0 0 18px rgba(200,168,78,0.28);
}
#ending-roll {
  position: relative;
  height: 220px;
  margin: 0 auto 1.8rem;
  overflow: hidden;
  color: var(--text-secondary);
  border-radius: 6px;
  background:
    linear-gradient(180deg, var(--bg-dark) 0%, transparent 20%, transparent 78%, var(--bg-dark) 100%),
    rgba(255,255,255,0.015);
  animation: endingFadeIn 1.2s ease both;
}
#ending-roll .roll-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -260px;
  animation: endingRoll 42s linear infinite;
}
#ending-roll p {
  margin: 0.6rem 0;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}
#ending-roll .roll-title {
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 700;
}
#ending-roll .roll-gap {
  height: 1.8rem;
}

/* ========== 通知 ========== */
.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; } }
@keyframes endingRoll { from { transform: translateY(0); } to { transform: translateY(-620px); } }
@keyframes endingFadeIn { from { opacity: 0; filter: blur(3px); } to { opacity: 1; filter: blur(0); } }
@keyframes lyricSignalBreath {
  0%, 100% { box-shadow: 0 0 18px rgba(51,255,102,0.055), inset 0 0 12px rgba(51,255,102,0.025); }
  50% { box-shadow: 0 0 30px rgba(51,255,102,0.14), inset 0 0 22px rgba(51,255,102,0.055); }
}

/* ========== 密码谜题 - 线索卡片 ========== */
.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, #fx-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, #fx-toggle:hover { border-color: var(--accent); color: var(--accent); }
#sound-toggle.muted { opacity: 0.5; }
#fx-toggle { right: 68px; }   /* 位于音效开关左侧 */
#fx-toggle.off { 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.75rem 1rem 5rem; }
  #inventory-panel { width: 100%; }
  #status-bar { padding: calc(0.7rem + env(safe-area-inset-top, 0px)) 0.9rem 0.7rem; 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; }
  .wt-msg { letter-spacing: 0.01em; line-height: 1.7; }
  .wt-msg .msg-text { text-shadow: 0 0 3px rgba(51,255,102,0.18); }
  .wt-msg .sender { letter-spacing: 0.04em; }
  .wt-static { letter-spacing: 0.08em; }
  .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-screen { align-items: flex-start; }
  #ending-content { width: 100%; box-sizing: border-box; padding: calc(1.4rem + env(safe-area-inset-top, 0px)) 1rem calc(2rem + env(safe-area-inset-bottom, 0px)); }
  #ending-stats { font-size: 0.8rem; line-height: 1.9; }
  #ending-casefile { padding: 0.95rem; }
  .casefile-signal { font-size: 0.62rem; letter-spacing: 0.07em; }
  .casefile-head { gap: 0.65rem; }
  .casefile-title { font-size: 1.02rem; }
  .casefile-stamp { font-size: 0.64rem; padding: 0.25rem 0.35rem; }
  .casefile-role { font-size: 1.15rem; }
  .casefile-route { font-size: 0.8rem; }
  .casefile-badge { padding: 0.62rem 0; }
  #ending-share { width: 100%; margin-bottom: 1.6rem; }
  #ending-share-btn { width: 100%; max-width: 420px; padding: 0.8rem 1rem; }
  #ending-lyrics { max-height: 240px; padding: 0.9rem; }
  #ending-lyrics .lyrics-body { font-size: 0.86rem; line-height: 1.85; padding: 4.2rem 0; }
  #ending-lyrics .lyric-line.active { transform: scale(1.02); }
  #ending-roll { height: 180px; }
  #ending-roll p { font-size: 0.86rem; letter-spacing: 0.04em; }
  .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; }
}

/* 无障碍：尊重系统的"减少动态效果"偏好 */
/* 玩家手动关闭特效（body.fx-off）：与系统"减少动态效果"偏好同级的降级保护 */
body.fx-off .fx-glitch,
body.fx-off #title-signal::before,
body.fx-off #title-signal::after { animation: none !important; }
body.fx-off #fx-flash.show { animation: none; opacity: 0; }
body.fx-off #fx-danger.active { animation: none; opacity: .35; }
body.fx-off .case-entry,
body.fx-off .choice-btn,
body.fx-off .inv-spot,
body.fx-off #text-skip-hint { animation: none; }
@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; }
  #ending-roll { animation: none; }
  #ending-lyrics.signal-live { animation: none; }
  #ending-lyrics .lyric-line { transition: none; }
  #ending-lyrics .lyric-line.active { transform: none; }
  #ending-roll .roll-track { position: static; animation: none; padding: 1rem 0; }
  #ending-roll { height: auto; max-height: 220px; overflow-y: auto; }
  .case-entry, .choice-btn, .inv-spot, #text-skip-hint { animation: none; }
}

button:focus-visible,
.inv-spot:focus-visible,
.timeline-slot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .case-entry:hover {
    border-color: var(--accent);
    background: #20202a;
  }
  .choice-btn:hover {
    background: #1e1e2a;
    padding-left: 1.35rem;
  }
  .inv-spot:hover {
    border-color: var(--accent);
    background: #1e1e2a;
    transform: translateY(-2px);
  }
}
