/* ============================================================
   themes.css — 主题细调
   base.css 只换了核心变量；这里做每个主题的组件级微调，
   外加第四主题「纸 PAPER」——完整浅色模式
   ============================================================ */

/* ==========================================================
   纸 PAPER：浅色阅读模式（白天党 / 投屏演示用）
   ========================================================== */
body[data-theme="paper"] {
  --bg: #f2ede3;
  --bg2: #e9e2d4;
  --panel: #faf6ee;
  --panel-2: #f1ebdf;
  --paper: #211d16;
  --dim: #6f6759;
  --faint: rgba(33, 29, 22, 0.09);
  --faint-2: rgba(33, 29, 22, 0.16);
  --acc: #d84315;
  --acc-2: #b26a00;
  --acc-soft: rgba(216, 67, 21, 0.1);
  --acc-glow: rgba(216, 67, 21, 0.28);
  --ok: #1c8a3f;
}

/* 浅色下的层级重排 */
body[data-theme="paper"] #grain {
  opacity: 0.035;
  mix-blend-mode: multiply;
}

body[data-theme="paper"] #vignette {
  background: radial-gradient(120% 90% at 50% 50%, transparent 60%, rgba(120, 100, 60, 0.14) 100%);
}

body[data-theme="paper"] #crtBg {
  opacity: 0.6;
}

body[data-theme="paper"] #nav.solid {
  background: rgba(242, 237, 227, 0.8);
}

body[data-theme="paper"] .ghost {
  -webkit-text-stroke-color: rgba(33, 29, 22, 0.08);
}

body[data-theme="paper"] .hero-echo {
  -webkit-text-stroke-color: rgba(216, 67, 21, 0.22);
}

body[data-theme="paper"] .mani-text .mw {
  color: rgba(33, 29, 22, 0.18);
}

body[data-theme="paper"] .mani-text .mw.lit {
  color: #211d16;
}

body[data-theme="paper"] .mani-text .mw.lit.acc {
  color: var(--acc);
}

body[data-theme="paper"] .card,
body[data-theme="paper"] .now-card,
body[data-theme="paper"] .stat,
body[data-theme="paper"] .viz-card,
body[data-theme="paper"] .toy,
body[data-theme="paper"] .arc-item {
  box-shadow: 0 2px 10px rgba(80, 60, 30, 0.06);
}

body[data-theme="paper"] .card:hover {
  box-shadow: 0 18px 44px rgba(80, 60, 30, 0.16), 0 0 0 1px var(--acc-glow);
}

/* 卡片画布区在浅色下加一圈内衬，避免深色画布糊边 */
body[data-theme="paper"] .cv-wrap {
  border-bottom: 1px solid var(--faint);
}

body[data-theme="paper"] .pill.live {
  background: rgba(28, 138, 63, 0.1);
  color: #1c8a3f;
  border-color: rgba(28, 138, 63, 0.4);
}

body[data-theme="paper"] .btn-solid {
  box-shadow: 0 8px 26px rgba(216, 67, 21, 0.28);
}

body[data-theme="paper"] .toast,
body[data-theme="paper"] .pal-box,
body[data-theme="paper"] .share-box,
body[data-theme="paper"] .keys-box,
body[data-theme="paper"] .case-panel {
  box-shadow: 0 30px 90px rgba(60, 45, 20, 0.25);
}

body[data-theme="paper"] #devHud {
  background: rgba(250, 246, 238, 0.94);
  color: #211d16;
}

body[data-theme="paper"] .heat-tip {
  background: rgba(250, 246, 238, 0.96);
  color: #211d16;
}

body[data-theme="paper"] ::selection {
  background: #d84315;
  color: #fff;
}

/* 开场终端保持深色（它是终端） */
body[data-theme="paper"] .term {
  box-shadow: 0 30px 90px rgba(60, 45, 20, 0.4);
}

/* ==========================================================
   冰蓝 ICE：组件微调
   ========================================================== */
body[data-theme="ice"] .term {
  border-color: rgba(53, 166, 255, 0.16);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7), 0 0 90px rgba(53, 166, 255, 0.08);
}

body[data-theme="ice"] .term-bar {
  border-bottom-color: rgba(53, 166, 255, 0.12);
}

body[data-theme="ice"] .caret {
  background: #8fd8ff;
}

body[data-theme="ice"] .hero-echo {
  -webkit-text-stroke-color: rgba(53, 166, 255, 0.4);
}

body[data-theme="ice"] .mq-track span:hover {
  color: #35a6ff;
}

body[data-theme="ice"] .tl-line i {
  background: linear-gradient(#35a6ff, #8fd8ff);
}

/* ==========================================================
   终端绿 MATRIX：组件微调
   ========================================================== */
body[data-theme="matrix"] .hero-echo {
  -webkit-text-stroke-color: rgba(56, 239, 125, 0.4);
}

body[data-theme="matrix"] .logo b,
body[data-theme="matrix"] .hero-name .dot {
  text-shadow: 0 0 18px rgba(56, 239, 125, 0.6);
}

body[data-theme="matrix"] .tl-line i {
  background: linear-gradient(#38ef7d, #b8ffcf);
}

body[data-theme="matrix"] .stat-num,
body[data-theme="matrix"] .foot-big {
  text-shadow: 0 0 30px rgba(56, 239, 125, 0.14);
}

body[data-theme="matrix"] #progress {
  box-shadow: 0 0 12px rgba(56, 239, 125, 0.7);
}

/* ==========================================================
   导览模式
   ========================================================== */
body.touring {
  scroll-behavior: auto;
}

#tourTip {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(20px);
  z-index: 92;
  background: var(--bg2);
  border: 1px solid var(--acc-glow);
  border-radius: 99px;
  padding: 12px 26px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s, transform 0.5s var(--ease);
}

#tourTip.on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

#tourTip b {
  color: var(--acc);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 1px;
}

#tourTip button {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  border: 1px solid var(--faint-2);
  border-radius: 99px;
  padding: 4px 12px;
  transition: 0.2s;
}

#tourTip button:hover {
  color: var(--paper);
  border-color: var(--acc);
}
