/* 冕神语录 style.css — v3.1 双主题 + 场景合成 Hero + 互动 */

@font-face {
  font-family: "Fusion Pixel";
  src: url("assets/fonts/fusion-pixel-site.woff2") format("woff2");
  font-display: block;
}
:root {
  --px: "Fusion Pixel", monospace;
  --rd: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

body[data-theme="night"] {
  --bg: #120a24; --bg2: #1a1030; --line: #3a2a66;
  --text: #e8e2f5; --dim: #9c92c4;
  --accent: #8b5cf6; --gold: #ffd764;
  --card: #1c1236; --card2: #231647;
  --veil: radial-gradient(ellipse at 50% 42%, rgba(10, 5, 28, .18) 0%, rgba(10, 5, 28, .62) 100%);
  --stripe: repeating-linear-gradient(45deg, #170e2c 0 12px, var(--bg2) 12px 24px);
}
body[data-theme="day"] {
  --bg: #f2f8fd; --bg2: #fafdff; --line: #d5e2ef;
  --text: #2d2440; --dim: #8a8196;
  --accent: #6d28d9; --gold: #9a6b00;
  --card: #ffffff; --card2: #eef6fd;
  --veil: radial-gradient(ellipse at 50% 42%, rgba(242, 248, 253, .10) 0%, rgba(226, 238, 250, .55) 100%);
  --stripe: repeating-linear-gradient(45deg, #e4effa 0 12px, var(--bg2) 12px 24px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--rd); font-size: 16px; line-height: 2;
  transition: background .25s, color .25s;
}
img { image-rendering: pixelated; }
img.photo { image-rendering: auto; }
.frame { max-width: 1100px; margin: 0 auto; padding: 0 28px; }
a { color: var(--accent); }

/* 首屏只计算即将看到的内容，长文和存档滚动到附近再布局。 */
.book, .archive { content-visibility: auto; contain-intrinsic-size: 1px 900px; }
footer { content-visibility: auto; contain-intrinsic-size: 1px 180px; }

/* ===== 导航 ===== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 28px; border-bottom: 1px solid var(--line);
  background: var(--bg2); transition: background .25s;
}
nav .logo { font-family: var(--px); font-size: 20px; color: var(--accent); letter-spacing: 2px; }
nav .links { display: flex; align-items: center; }
nav .links a { color: var(--dim); text-decoration: none; margin-left: 24px; font-size: 14px; }
nav .links a:hover { color: var(--gold); }
.theme-toggle {
  margin-left: 24px; padding: 10px 16px; cursor: pointer; min-height: 44px;
  font-family: var(--px); font-size: 14px;
  background: var(--accent); color: #fff; border: 0; box-shadow: 4px 4px 0 rgba(0, 0, 0, .35);
}
.theme-toggle:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 rgba(0, 0, 0, .35); }

/* ===== Hero：场景合成 ===== */
.hero { position: relative; overflow: hidden; min-height: 100vh; }
.hero-stage { position: absolute; inset: 0; }
.stage-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 62%;
  opacity: 0; transition: opacity 1.4s ease;
}
.stage-bg.on { opacity: 1; }
body[data-theme="night"] .stage-bg { filter: blur(1px) contrast(1.12) saturate(1.25) brightness(.82) hue-rotate(8deg); }
body[data-theme="day"] .stage-bg { filter: blur(1px) contrast(1.05) saturate(1.15) brightness(1.08); }
.stage-veil { position: absolute; inset: 0; background: var(--veil); transition: background .25s; }
.hero-mian {
  position: absolute; bottom: 1.5%; left: 0;
  width: 200px; height: 200px; object-fit: contain;
  cursor: pointer; z-index: 2;
  filter: drop-shadow(6px 6px 0 rgba(0, 0, 0, .35));
  will-change: transform;
}
.hero-super {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: center / cover no-repeat; opacity: 0; mix-blend-mode: screen;
}
.hero-inner {
  position: relative; z-index: 3; text-align: center;
  padding: 88px 24px 60px; pointer-events: none;
}
.hero-inner .draw-btn { pointer-events: auto; }

.hero .zh {
  position: relative; display: inline-block; overflow: hidden;
  font-family: var(--px);
  font-size: clamp(48px, 9vw, 100px);
  letter-spacing: 10px; line-height: 1.2;
  background: linear-gradient(180deg, #fff6cf 0%, #ffd764 38%, #ff9d2e 62%, #f4511e 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter:
    drop-shadow(3px 3px 0 #c62828)
    drop-shadow(6px 6px 0 #1e63c8)
    drop-shadow(9px 9px 0 rgba(0, 0, 0, .5));
}
.hero .zh .shine {
  position: absolute; top: 0; bottom: 0; width: 22%; left: -30%;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, .85) 50%, transparent 100%);
  animation: shine 4.5s ease-in-out infinite;
  mix-blend-mode: screen;
}
@keyframes shine { 0%, 55% { left: -30%; } 85%, 100% { left: 115%; } }
.hero .en {
  margin-top: 18px; font-family: var(--px);
  font-size: clamp(11px, 1.8vw, 15px); color: var(--gold); letter-spacing: 5px;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, .65);
}
.draw-btn {
  display: inline-block; margin-top: 34vh; padding: 16px 40px;
  background: var(--accent); color: #fff; border: 0; cursor: pointer;
  font-family: var(--px); font-size: 18px;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, .4);
}
.draw-btn:active { transform: translate(3px, 3px); box-shadow: 3px 3px 0 rgba(0, 0, 0, .4); }
.blink { animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .55; } }

/* ===== 祝福（每日一冕区顶部，纯文字无框） ===== */
.bless-line {
  max-width: 680px; margin: 0 auto 34px;
  font-size: 13px; line-height: 2.1; color: var(--dim);
}

/* ===== 每日一冕 ===== */
.fortune { padding: 56px 24px; text-align: center; background: var(--stripe); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fcard {
  position: relative;
  display: inline-block; width: min(480px, 92vw); padding: 40px 28px 30px;
  background: #f3f9ff; color: #2a1656;
  border: 3px solid var(--accent); box-shadow: 10px 10px 0 rgba(0, 0, 0, .35);
  transition: transform .12s steps(2);
}
.fcard.flip { transform: rotateX(8deg) scale(.98); }
.fcard .brand { position: absolute; left: 14px; top: 26px; height: 22px; width: auto; opacity: .9; }
.fcard .top { font-family: var(--px); font-size: 14px; color: #8b5cf6; letter-spacing: 4px; }
.fcard .q { font-size: 19px; line-height: 2; margin: 18px 0; }
.fcard .sign { font-family: var(--px); font-size: 12px; color: #7a6c4f; border-top: 2px dashed #c9b98a; padding-top: 14px; }
.fcard .stamp {
  position: absolute; right: -8px; bottom: -12px; width: 72px; height: 72px;
  object-fit: contain; filter: drop-shadow(4px 4px 0 rgba(0, 0, 0, .35));
}
.again { margin-top: 26px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.again button {
  padding: 14px 32px; min-height: 44px; background: var(--accent); color: #fff; border: 0; cursor: pointer;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, .35); font-family: var(--px); font-size: 15px;
}
.again button.save { background: var(--card2); color: var(--accent); border: 3px solid var(--accent); }
.again button:active { transform: translate(2px, 2px); box-shadow: 3px 3px 0 rgba(0, 0, 0, .35); }

/* ===== 冕子论 ===== */
.book { padding: 56px 0 40px; }
.book-head {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid var(--line); padding-bottom: 14px;
}
.book-head .t { font-family: var(--px); font-size: 32px; color: var(--accent); letter-spacing: 6px; }
.book-head .n { font-size: 13px; color: var(--dim); }
.quicknav { display: flex; gap: 10px; flex-wrap: wrap; padding: 18px 0 4px; }
.quicknav button {
  font-family: var(--px); font-size: 14px; cursor: pointer;
  min-width: 44px; min-height: 44px; padding: 8px 12px;
  background: var(--card); color: var(--accent); border: 3px solid var(--line);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .25);
}
.quicknav button:hover { border-color: var(--gold); color: var(--gold); }

.chapter { padding: 40px 0 24px; }
.ch-head { display: flex; align-items: center; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.ch-badge {
  font-family: var(--px); font-size: 34px; line-height: 1; color: var(--accent);
  background: var(--card2); border: 3px solid var(--accent);
  padding: 10px 16px; box-shadow: 5px 5px 0 rgba(0, 0, 0, .3);
  flex-shrink: 0;
}
.ch-title { font-family: var(--px); font-size: 17px; color: var(--text); line-height: 1.9; }

.quote {
  position: relative;
  display: flex; gap: 18px; align-items: flex-start;
  padding: 20px 22px; margin-bottom: 14px;
  border: 3px solid var(--line);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, .18);
}
.quote:nth-of-type(odd) { background: var(--card); }
.quote:nth-of-type(even) { background: var(--card2); }
.quote .idx { font-family: var(--px); font-size: 13px; color: var(--accent); min-width: 56px; padding-top: 3px; }
.quote .txt { font-size: 16.5px; line-height: 2; max-width: 720px; }
.copy-btn {
  position: absolute; top: 10px; right: 10px;
  min-width: 44px; min-height: 44px; padding: 8px;
  background: transparent; border: 2px solid var(--line); color: var(--dim);
  font-family: var(--px); font-size: 12px; cursor: pointer; opacity: 0;
  transition: opacity .15s, border-color .15s, color .15s;
}
.quote:hover .copy-btn { opacity: 1; }
.copy-btn:hover { border-color: var(--gold); color: var(--gold); }
@media (hover: none) { .copy-btn { opacity: .55; } }
.quote.copied { border-color: var(--gold); }
.quote .txt { padding-right: 40px; }

/* 配图 */
.ch-images { margin-top: 24px; }
.ch-images img { display: block; margin: 0 auto 24px; border: 3px solid var(--line); max-width: min(480px, 100%); height: auto; }
.ch-images img.tall { max-height: 70vh; width: auto; max-width: 100%; }
.ch-images img.small { max-width: none; }
.ch-note { margin: 6px 0 10px; font-size: 13px; color: var(--dim); text-align: center; }

/* ===== 采访存档 ===== */
.archive { padding: 40px 0 56px; }
.arc-head {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 30px;
}
.arc-head .t { font-family: var(--px); font-size: 28px; color: var(--accent); letter-spacing: 4px; }
.arc-head .n { font-size: 13px; color: var(--dim); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.acard {
  display: block; background: var(--card); border: 3px solid var(--line);
  padding: 20px; text-decoration: none; color: inherit; position: relative;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, .15);
  transition: transform .12s, border-color .12s;
}
.acard:hover { border-color: var(--gold); transform: translate(-2px, -2px); }
.acard .src { font-family: var(--px); font-size: 12px; color: var(--gold); }
.acard .ti { font-size: 15px; line-height: 1.8; margin: 12px 0 22px; }
.acard .go { position: absolute; right: 14px; bottom: 10px; color: var(--accent); font-size: 13px; }
.arc-strip {
  margin-top: 36px; padding: 14px; text-align: center;
  font-family: var(--px); font-size: 13px; color: var(--dim); letter-spacing: 3px;
  background: var(--stripe); border: 3px solid var(--line);
}

/* ===== 页脚 ===== */
footer { padding: 28px; border-top: 1px solid var(--line); }
.flinks { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; font-size: 13px; color: var(--dim); }
.flinks a { display: inline-flex; align-items: center; gap: 7px; color: var(--dim); text-decoration: none; }
.flinks a:hover { color: var(--gold); }
.flinks img { width: 20px; height: 20px; }
.disclaimer { margin-top: 12px; font-size: 12px; color: var(--dim); }

/* ===== 回到顶部 & toast ===== */
#toTop {
  position: fixed; right: 22px; bottom: 22px; z-index: 30;
  width: 48px; height: 48px; display: none;
  background: var(--accent); color: #fff; border: 0; cursor: pointer;
  font-family: var(--px); font-size: 18px; box-shadow: 4px 4px 0 rgba(0, 0, 0, .35);
}
#toTop.show { display: block; }
#toast {
  position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%);
  z-index: 60; padding: 10px 22px; display: none;
  background: var(--gold); color: #2a1656;
  font-family: var(--px); font-size: 14px; box-shadow: 4px 4px 0 rgba(0, 0, 0, .3);
}
#toast.show { display: block; }

/* ===== 主题切换过场 ===== */
#super-overlay { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; background: #000; }
#super-overlay.on { display: flex; }
#super-overlay #super-frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#super-overlay #super-mian { position: relative; width: min(300px, 40vw); height: auto; filter: drop-shadow(10px 10px 0 rgba(0, 0, 0, .5)); }
#super-egg {
  position: absolute; bottom: 8vh; left: 0; right: 0; text-align: center;
  font-family: var(--px); font-size: clamp(18px, 3.2vw, 30px); color: #ffd764;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, .7);
}
#flash { position: fixed; inset: 0; z-index: 95; background: #fff; opacity: 0; pointer-events: none; transition: opacity .18s; }
#flash.on { opacity: 1; }

/* ===== 移动端 ===== */
@media (max-width: 800px) {
  .grid { grid-template-columns: 1fr; }
  nav { flex-wrap: wrap; row-gap: 8px; }
  nav .links a { margin-left: 12px; font-size: 12px; }
  .hero { min-height: 100vh; }
  .hero .zh { letter-spacing: 5px; font-size: clamp(44px, 12vw, 64px); }
  .hero-mian { width: 140px; height: 140px; bottom: 20%; }
  .draw-btn { margin-top: 30vh; }
  .ch-badge { font-size: 24px; }
  .ch-title { font-size: 13px; }
  .quote { padding: 16px; gap: 12px; }
  .quote .txt { padding-right: 34px; font-size: 15.5px; }
}

/* 尊重系统减弱动效 */
@media (prefers-reduced-motion: reduce) {
  .blink { animation: none; }
  html { scroll-behavior: auto; }
}

/* ===== 金币雨 ===== */
.coin-drop {
  position: fixed; top: -48px; z-index: 80; pointer-events: none;
  animation: coinfall linear forwards;
}
@keyframes coinfall {
  to { transform: translateY(110vh) rotate(340deg); }
}

/* ===== v6 首页掌机 ===== */
.hero { padding: 3vh 0 0; display: flex; align-items: center; }
.console {
  position: relative;
  width: min(960px, 94vw); margin: 0 auto;
  background: #2a1656;
  border: 4px solid #1a0f38;
  box-shadow: 0 18px 50px rgba(42, 22, 86, .28), inset 0 0 0 3px #3b2272;
  padding: 20px 20px 16px;
}
.console-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 6px 12px;
  font-family: var(--px); font-size: 13px; color: #8b5cf6; letter-spacing: 3px;
}
.led { width: 10px; height: 10px; background: #ffd764; box-shadow: 0 0 8px #ffd764; animation: led 1.6s steps(2) infinite; }
@keyframes led { 50% { opacity: .3; } }
.screen {
  position: relative; width: 100%; aspect-ratio: 16 / 10;
  background: #000; border: 3px solid #120a24; overflow: hidden;
}
.scanlines { position: absolute; inset: 0; pointer-events: none; z-index: 8;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.14) 0 2px, transparent 2px 4px); }
.screen .hero-stage { position: absolute; inset: 0; }
.screen .hero-stage .stage-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 62%; opacity: 0; transition: opacity 1.4s ease; }
.screen .hero-stage .stage-bg.on { opacity: 1; }
.screen .stage-veil { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 42%, rgba(10,5,28,.15) 0%, rgba(10,5,28,.55) 100%); }
.screen .hero-mian { position: absolute; bottom: 6%; left: 0; width: 19%; z-index: 2; cursor: pointer; will-change: transform; filter: drop-shadow(5px 5px 0 rgba(0,0,0,.4)); }
.screen .hero-super { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: center/cover no-repeat; opacity: 0; mix-blend-mode: screen; }
.screen .zh {
  position: absolute; top: 10%; width: 100%; text-align: center; overflow: hidden; z-index: 3;
  font-family: var(--px); font-size: clamp(42px, 8vw, 92px); letter-spacing: 9px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 35%, #bae6fd 68%, #60a5fa 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter:
    drop-shadow(1px 0 0 #08121f) drop-shadow(-1px 0 0 #08121f)
    drop-shadow(0 1px 0 #08121f) drop-shadow(0 -1px 0 #08121f)
    drop-shadow(1px 1px 0 #08121f) drop-shadow(-1px 1px 0 #08121f)
    drop-shadow(1px -1px 0 #08121f) drop-shadow(-1px -1px 0 #08121f)
    drop-shadow(2px 2px 0 #c62828) drop-shadow(4px 4px 0 #1e63c8)
    drop-shadow(0 0 6px rgba(125, 211, 252, .3))
    drop-shadow(7px 7px 0 rgba(0,0,0,.4));
}
.screen .zh .shine {
  position: absolute; top: 0; bottom: 0; width: 22%; left: -30%;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,.85) 50%, transparent 100%);
  animation: shine 4.5s ease-in-out infinite; mix-blend-mode: screen;
}
.screen .en { position: absolute; top: 28%; width: 100%; text-align: center; z-index: 3;
  font-family: var(--px); font-size: clamp(8px, 1.3vw, 12px); color: #ffd764; letter-spacing: 4px; text-shadow: 2px 2px 0 rgba(0,0,0,.7); }
.screen .press {
  position: absolute; bottom: 22%; left: 50%; transform: translateX(-50%); z-index: 3;
  padding: 14px 34px; cursor: pointer;
  background: var(--accent); color: #fff; border: 0;
  font-family: var(--px); font-size: clamp(12px, 1.7vw, 16px);
  box-shadow: 6px 6px 0 rgba(0,0,0,.45);
}
.screen .press:active { transform: translateX(-50%) translate(3px, 3px); box-shadow: 3px 3px 0 rgba(0,0,0,.45); }

/* 甲板（装饰） */
.deck { display: flex; justify-content: space-between; align-items: center; padding: 16px 8px 2px; }
.dpad { position: relative; width: 84px; height: 84px; }
.dpad div { position: absolute; background: #1a0f38; box-shadow: inset 0 0 0 2px #3b2272; }
.dpad .h { left: 0; top: 28px; width: 84px; height: 28px; }
.dpad .v { left: 28px; top: 0; width: 28px; height: 84px; }
.dpad .c { left: 28px; top: 28px; width: 28px; height: 28px; background: #241345; }
.startsel { display: flex; gap: 14px; align-items: center; }
.pill {
  font-family: var(--px); font-size: 11px; color: #b9aee0;
  background: #1a0f38; border: 2px solid #3b2272; padding: 8px 16px;
  transform: rotate(-8deg);
}
.ab { display: flex; gap: 16px; }
.abtn {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--px); font-size: 16px; color: #fff;
  background: #6d28d9; border: 3px solid #1a0f38; box-shadow: 0 5px 0 #1a0f38;
}
.abtn.b { background: #8b5cf6; margin-top: 18px; }
.screw { position: absolute; width: 10px; height: 10px; background: #1a0f38; border-radius: 50%; box-shadow: inset 1px 1px 2px rgba(255,255,255,.15); }
.screw.tl { top: 8px; left: 8px; } .screw.tr { top: 8px; right: 8px; }
.screw.bl { bottom: 8px; left: 8px; } .screw.br { bottom: 8px; right: 8px; }
.speaker {
  position: absolute; right: 26px; bottom: 60px; width: 60px; height: 22px;
  background: repeating-linear-gradient(90deg, #1a0f38 0 5px, transparent 5px 10px);
  opacity: .8; transform: rotate(-6deg);
}

/* 主题图标按钮（右上角日月） */
.theme-icon {
  margin-left: 24px; width: 44px; height: 44px; cursor: pointer;
  font-size: 20px; line-height: 1;
  background: var(--accent); color: #fff; border: 0; box-shadow: 4px 4px 0 rgba(0,0,0,.35);
}
.theme-icon:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 rgba(0,0,0,.35); }

@media (max-width: 800px) {
  .console { padding: 14px 12px 12px; }
  .console-top { font-size: 10px; padding-bottom: 10px; }
  .dpad { width: 66px; height: 66px; }
  .dpad .h { top: 22px; width: 66px; height: 22px; }
  .dpad .v { left: 22px; width: 22px; height: 66px; }
  .dpad .c { left: 22px; top: 22px; width: 22px; height: 22px; }
  .abtn { width: 46px; height: 46px; font-size: 13px; }
  .pill { font-size: 9px; padding: 6px 10px; }
  .speaker { display: none; }
  .screen .zh { letter-spacing: 5px; }
  .screen .press { padding: 12px 24px; }
}


/* 全局冕神：全页面巡逻，层级最高 */
#globalMian {
  position: fixed; left: 0; bottom: 10px; z-index: 70;
  width: 140px; height: 140px; object-fit: contain;
  cursor: pointer; will-change: transform;
  contain: layout paint;
  backface-visibility: hidden;
  filter: drop-shadow(4px 4px 0 rgba(0, 0, 0, .3));
}
@media (max-width: 800px) {
  #globalMian { width: 96px; height: 96px; bottom: 6px; }
}

/* console-top 右侧：屏幕内切换键 */
.top-right { display: flex; align-items: center; gap: 12px; }
.kof-switch {
  min-height: 32px; padding: 6px 14px; cursor: pointer;
  font-family: var(--px); font-size: 12px; color: #b9aee0;
  background: #1a0f38; border: 2px solid #3b2272;
}
.kof-switch:hover, .kof-switch.on { color: #ffd764; border-color: #ffd764; }

#kofView { position: absolute; inset: 0; z-index: 7; display: none; background: #000; }
#kofView.on { display: block; }
#kofView iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
#kofView .kof-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--px); color: #8b5cf6; font-size: 18px; letter-spacing: 4px; background: #000; z-index: 5; }
#kofView .kof-note { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  font-family: var(--px); font-size: 11px; color: #b9aee0; text-align: center; background: rgba(0,0,0,.75); padding: 6px; }
.kof-loading .dots::after { content: "..."; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 33% { content: "."; } 66% { content: ".."; } 100% { content: "..."; } }

/* 精简甲板：左品牌字 + 右拳皇小屏幕 */
.deck-slim { justify-content: space-between; padding: 14px 10px 4px; }
.deck-brand { font-family: var(--px); font-size: 11px; color: #5a4a8f; letter-spacing: 2px; }
.kof-screen {
  cursor: pointer; padding: 4px; width: 168px; height: 64px;
  background: #1a0f38; border: 3px solid #120a24; box-shadow: 0 5px 0 #120a24, inset 0 0 0 2px #3b2272;
}
.kof-screen .ks-lcd {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  font-family: var(--px); font-size: 15px; color: #ffd764;
  background: #0a0620; border: 2px solid #241345;
  text-shadow: 0 0 6px rgba(255, 215, 100, .6);
}
.kof-screen:hover .ks-lcd { color: #fff; }
.kof-screen:active { transform: translateY(3px); box-shadow: 0 2px 0 #120a24, inset 0 0 0 2px #3b2272; }

/* console 下方居中电源键（主题切换） */
.power {
  display: flex; align-items: center; justify-content: center;
  margin: 22px auto 0; width: 64px; height: 64px; border-radius: 50%;
  cursor: pointer; font-size: 26px; color: #ffd764;
  background: #2a1656; border: 4px solid #1a0f38;
  box-shadow: 0 6px 0 #1a0f38, 0 12px 24px rgba(42, 22, 86, .35);
}
.power:active { transform: translateY(3px); box-shadow: 0 3px 0 #1a0f38; }

/* 顶栏默认隐藏，滑过首屏出现；fixed 避免隐藏时仍占页面高度 */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  transform: translateY(-110%);
  transition: transform .35s ease, background .25s;
}
nav.show { transform: translateY(0); }

/* 全局冕神再大一倍 */
#globalMian { width: 280px; height: 280px; }
@media (max-width: 800px) {
  #globalMian { width: 150px; height: 150px; }
  .power { width: 56px; height: 56px; font-size: 22px; margin-top: 16px; }
  .kof-screen { width: 140px; height: 56px; }
}

/* 甲板内电源键（中间） */
.deck-slim { position: relative; }
.deck-power { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; width: 52px; height: 52px; font-size: 22px; }
.deck-power:active { transform: translate(-50%, -50%) translateY(3px); }
/* 拳皇按钮 LCD：左文字右图案 */
.ks-lcd { gap: 8px; padding: 0 8px; }
.ks-lcd .ks-text { flex-shrink: 0; }
.ks-lcd .ks-mian { height: 92%; width: auto; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.5)); }

/* ===== 手机端精修 ===== */
@media (max-width: 800px) {
  html { scroll-padding-top: 64px; }
  html, body { overflow-x: clip; }

  nav {
    min-height: 52px; padding: 8px 12px;
    flex-wrap: nowrap; gap: 10px;
  }
  nav .logo {
    flex: 0 0 auto; white-space: nowrap;
    font-size: 15px; letter-spacing: 1px;
  }
  nav .links { min-width: 0; gap: 9px; }
  nav .links a {
    margin-left: 0; white-space: nowrap;
    font-size: 11px;
  }

  .hero { min-height: 100svh; padding-top: 0; }
  .console { width: 94vw; }
  .screen .zh { letter-spacing: 4px; }
  .screen .en {
    padding: 0 8px; font-size: 8px;
    letter-spacing: 2px; white-space: nowrap;
  }
  .screen .press {
    width: max-content; max-width: calc(100% - 20px);
    padding: 10px 14px; white-space: nowrap;
    font-size: clamp(10px, 3vw, 13px);
  }
  #kofView .kof-note { padding: 4px; font-size: 9px; }

  #globalMian {
    width: clamp(112px, 36vw, 140px);
    height: clamp(112px, 36vw, 140px);
    bottom: max(6px, env(safe-area-inset-bottom));
  }

  .fortune { padding: 40px 16px; }
  .bless-line {
    margin-bottom: 24px; text-align: left;
    font-size: 12px; line-height: 1.9;
  }
  .fcard {
    width: min(100%, 480px); padding: 48px 18px 26px;
    box-shadow: 7px 7px 0 rgba(0, 0, 0, .35);
  }
  .fcard .brand { top: 13px; left: 12px; height: 17px; }
  .fcard .top { font-size: 12px; letter-spacing: 2px; }
  .fcard .q { margin: 14px 0; font-size: 17px; line-height: 1.85; }
  .fcard .sign { padding-right: 52px; font-size: 11px; line-height: 1.8; }
  .fcard .stamp { width: 60px; height: 60px; }
  .again {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px; margin-top: 22px;
  }
  .again button { padding: 12px 8px; font-size: 13px; }

  .book { padding: 40px 16px 28px; }
  .archive { padding: 36px 16px 44px; }
  .book-head, .arc-head {
    align-items: flex-start; flex-direction: column; gap: 2px;
  }
  .book-head .t { font-size: 28px; }
  .arc-head .t { font-size: 25px; }
  .quicknav {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px; padding-top: 18px;
  }
  .quicknav button { width: 100%; min-width: 0; }
  .chapter { padding: 32px 0 18px; scroll-margin-top: 64px; }
  .ch-head { gap: 12px; }
  .ch-badge { padding: 9px 12px; }
  .quote {
    display: block; padding: 15px 14px 16px;
    margin-bottom: 12px; box-shadow: 3px 3px 0 rgba(0, 0, 0, .18);
  }
  .quote .idx { min-width: 0; margin-bottom: 8px; padding-right: 52px; }
  .quote .txt { padding-right: 0; font-size: 15.5px; line-height: 1.9; }
  .copy-btn { top: 8px; right: 8px; }
  .ch-images img.small { max-width: 100%; }
  .arc-head { margin-bottom: 20px; }
  .grid { gap: 14px; }
  .acard { padding: 17px; }
  .arc-strip { letter-spacing: 1px; }
  footer { padding: 24px 16px; }
  #toTop { right: 12px; bottom: 12px; width: 44px; height: 44px; }
  #toast { width: max-content; max-width: calc(100vw - 32px); bottom: 24px; }
}

@media (max-width: 480px) {
  .console { padding: 12px 10px 10px; }
  .console-top { padding: 0 6px 8px; letter-spacing: 2px; }
  .deck-slim {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px minmax(104px, 1.2fr);
    gap: 8px; padding: 12px 8px 4px;
  }
  .deck-brand { font-size: 8px; letter-spacing: 1px; }
  .deck-power {
    position: static; width: 46px; height: 46px;
    transform: none; font-size: 19px;
  }
  .deck-power:active { transform: translateY(3px); }
  .kof-screen { width: 100%; height: 50px; }
  .kof-screen .ks-lcd { gap: 4px; padding: 0 4px; font-size: 11px; }
  .ks-lcd .ks-mian { max-width: 34px; }
}

/* ===== 外篇 · 听雨歌楼上 ===== */
.jike { padding-top: 40px; padding-bottom: 24px; }
.jike-head {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 26px;
}
.jike-head .t { font-family: var(--px); font-size: 24px; color: var(--accent); letter-spacing: 3px; }
.jike-head .n { font-size: 13px; color: var(--dim); }
.jcard {
  position: relative; display: block; text-decoration: none; color: inherit;
  padding: 18px 20px 18px 26px; margin-bottom: 12px;
  background: var(--card); border: 2px solid var(--line); border-left: 3px solid var(--accent);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .08);
  transition: border-color .12s;
}
body[data-theme="night"] .jcard { background: #1c1236; }
.jcard:hover { border-color: var(--accent); }
.jcard .jtxt { font-size: 15.5px; line-height: 1.95; max-width: 720px; white-space: pre-wrap; }
.jcard .jmeta {
  margin-top: 10px; display: flex; gap: 14px; align-items: baseline;
  font-size: 12px; color: var(--dim);
}
.jcard .jmeta .jid { font-family: var(--px); font-size: 11px; }
.jcard .jmeta .jgo { margin-left: auto; color: var(--accent); }
.jike-more {
  display: block; margin: 22px auto 0; min-height: 44px; padding: 10px 34px; cursor: pointer;
  font-family: var(--px); font-size: 14px;
  background: var(--card2); color: var(--accent); border: 3px solid var(--accent);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .2);
}
.jike-more:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 rgba(0, 0, 0, .2); }
