/* 设计令牌：原站 desktop.css 原样搬运 */
:root {
  color-scheme: dark;
  --ground: #07080d;
  --ink: #efe9dc;
  --muted: #a29fae;
  --panel: rgba(14, 13, 19, 0.66);
  --line: rgba(255, 255, 255, 0.14);
  --accent: #ffb867;
  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --osd: "VT323", ui-monospace, "Courier New", monospace;

  /* 安全区（刘海 / 圆角 / 底部横条）：viewport-fit=cover 下必须自己让位，
     否则 HUD 会被遮住。viewport.js 启动后会把实测 px 写回同名变量。 */
  --sat: env(safe-area-inset-top, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  /* 触摸目标最小尺寸（移动端可点性） */
  --tap: 44px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html.bm-scene, html.bm-scene body {
  height: 100%; margin: 0; overflow: hidden;
  background: var(--ground); color: var(--ink); font-family: var(--display);
}

/* ---------- 画布与加载定格 ---------- */
#gl {
  position: fixed; inset: 0; width: 100%; height: 100%; display: block;
  touch-action: none; opacity: 0; transition: opacity 1.2s ease;
}
#gl.ready { opacity: 1; }

/* ---------- 首帧占位图（poster） ----------
 * 与带宽解耦：HTML 一解析完就铺满，WebGL 就绪后随画布淡入一起淡出。
 * 文件缺失时只剩 --ground 底色，不阻塞、不报错。 */
#poster {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background-color: var(--ground);
  background-image: url("../../assets/poster.jpg?v=20261022pose");
  background-position: 50% 50%;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 1;
  transition: opacity 1.2s ease;
}
body.scene-ready #poster { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  #poster, #gl { transition: opacity 0.2s linear; }
}

/* ---------- 加载进度（叠在 poster 上，只为把「等一下」和「卡住了」区分开） ----------
 * 主场景 scene.live.glb 8.7MB，弱网/会场 WiFi 下首屏要十几秒；这段时间画面完全静止，
 * 用户分不清是在载入还是挂了。这里给一条 2px 进度条 + 等宽百分比，随 scene-ready 淡出。
 * 注意：颜色只用 --ink，不加新色，保持既有 HUD 的克制感。 */
#boot {
  position: fixed; inset: auto 0 0 0; z-index: 3; pointer-events: none;
  display: grid; gap: 9px; justify-items: center;
  padding-bottom: max(20px, calc(env(safe-area-inset-bottom, 0px) + 14px));
  opacity: 1; transition: opacity 0.5s ease;
  font: 11px/1 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: .2em; color: var(--ink); text-transform: none;
}
body.scene-ready #boot { opacity: 0; }
#boot-bar {
  width: min(38vw, 300px); height: 2px; border-radius: 2px; overflow: hidden;
  background: color-mix(in srgb, var(--ink) 18%, transparent);
}
#boot-bar i {
  display: block; height: 100%; width: 0%;
  background: var(--ink); transition: width .35s ease;
}
#boot-txt { opacity: .6; }

#still {
  position: fixed; inset: 0;
  background: var(--ground) 50% 50% / auto 100% no-repeat;
  opacity: 0; transition: opacity 0.45s ease; pointer-events: none;
}
#still.on { opacity: 1; }
#still.out { opacity: 0; }

/* ---------- VCR 加载屏 ---------- */
#osd {
  position: fixed; inset: 0; display: grid; place-items: center;
  pointer-events: none; z-index: 6; opacity: 0; transition: opacity 0.4s ease;
}
#osd.on { opacity: 1; }
#osd.out { opacity: 0; }
#osd .tv-scr {
  width: min(46vw, 640px); aspect-ratio: 4 / 3; position: relative;
  border-radius: 2%; overflow: hidden;
  background: #0b1428;
  box-shadow: 0 0 60px rgba(40, 80, 180, 0.35), 0 0 0 2px rgba(120, 150, 200, 0.12) inset;
}
#osd .tv-pic {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  justify-content: space-between; padding: 6% 7%;
  font-family: var(--osd); color: #cfe0ff; text-shadow: 0 0 6px rgba(120, 170, 255, 0.7);
}
#osd .tv-lb { font-size: clamp(14px, 2vw, 22px); letter-spacing: 0.12em; }
#osd .tv-ch { position: absolute; right: 7%; top: 6%; font-size: clamp(14px, 2vw, 22px); letter-spacing: 0.1em; }
#osd .tv-mid { display: flex; flex-direction: column; align-items: center; gap: 0.6em; }
#osd .tv-cta { font-size: clamp(11px, 1.4vw, 16px); letter-spacing: 0.14em; min-height: 1.2em; }
#osd .tv-meter { display: flex; align-items: center; gap: 0.7em; width: 100%; }
#osd .tv-meter .bar {
  position: relative; flex: 1; height: 0.7em; display: block;
  border: 1px solid rgba(207, 224, 255, 0.6); border-radius: 0.1em; overflow: hidden;
}
#osd .tv-meter .bar i {
  position: absolute; inset: 0 auto 0 0; width: 0%; display: block;
  background: linear-gradient(#cfe0ff, #8fb4ff); transition: width 0.25s ease;
}
#osd .tv-meter .pc { font-size: clamp(12px, 1.5vw, 18px); min-width: 3.2em; text-align: right; }
#osd .tv-noise {
  position: absolute; inset: 0; opacity: 0.06; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: osdNoise 0.6s steps(4) infinite;
}
@keyframes osdNoise {
  0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -2%); }
  100% { transform: translate(0, 0); }
}
#osd .tv-glass {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.1), transparent 42%),
              radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.08), transparent 60%);
}
#osd .tv-mute {
  display: none; position: relative; align-self: stretch;
  margin: 0.34em 0 0; padding: 0.3em 0 0.22em; text-align: center;
  font-size: 0.8em; letter-spacing: 0.1em;
  border: 0.09em solid rgba(244, 245, 255, 0.8); border-radius: 0.12em;
  background: linear-gradient(#f4f5ff, #f4f5ff) 0 0 / 0% 100% no-repeat, rgba(244, 245, 255, 0.07);
  pointer-events: auto; cursor: pointer; user-select: none;
  transition: background-size 0.24s cubic-bezier(0.3, 0, 0.2, 1), color 0.16s;
}
#osd.enter .tv-mute { display: block; }
#osd .tv-mute:hover, #osd .tv-mute:active,
body:has(#enter-muted:focus-visible) #osd .tv-mute {
  background-size: 100% 100%; color: #3a55b3; text-shadow: none;
}

/* ---------- 顶部 HUD ---------- */
.hud.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; pointer-events: none;
  padding: calc(18px + var(--sat)) calc(20px + var(--sar)) 18px calc(20px + var(--sal));
}
.hud.top .name {
  pointer-events: auto; background: none; border: 0; padding: 0;
  min-height: var(--tap); display: inline-flex; align-items: center;
  font-family: var(--display); font-size: clamp(15px, 2vw, 22px);
  font-weight: 880; font-stretch: 62%; letter-spacing: 0.01em;
  text-transform: uppercase; color: var(--ink); cursor: pointer;
  text-shadow: 0 0 1px #000, 0 0 2px #000, 0 1px 1px #000, 0 0 12px rgba(0, 0, 0, 0.85);
}
/* 【2026-10-20】导航文案改为中文。原来用 --osd（VT323 像素字体），它没有 CJK 字形，
 * 中文会掉进 ui-monospace 的等宽兜底，和站名 / 正文的中文观感不一致。
 * 这里换成 --display（Archivo + system-ui 兜底），中文即与全站正文同一套系统字体；
 * 方块字视觉比拉丁字母重，字号与字距同步收一档，避免盖过左侧站名。 */
.hud.top .menu {
  pointer-events: auto; display: flex; gap: clamp(12px, 1.8vw, 26px);
  font-family: var(--display); font-size: clamp(14px, 1.5vw, 18px);
  letter-spacing: 0.12em; font-weight: 500;
}
.hud.top .menu a {
  color: var(--ink); text-decoration: none; opacity: 0.82;
  /* 触摸目标 ≥44px：手机上原来只有文字高度，手指很难点中 */
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 2px;
  text-shadow: 0 0 1px #000, 0 0 2px #000, 0 1px 1px #000, 0 0 9px rgba(0, 0, 0, 0.8);
  transition: opacity 0.16s, color 0.16s;
}
.hud.top .menu a:hover, .hud.top .menu a[aria-current="true"] { opacity: 1; color: var(--accent); }

/* ---------- 便签卡面板 ---------- */
.panel {
  position: fixed; z-index: 7; left: 22px; top: 50%;
  transform: translateY(-50%) rotate(-0.6deg);
  width: min(max(360px, calc(min(72dvh, 640px) / 1.618)), calc(100% - 40px));
  max-height: min(72dvh, 640px);
  display: flex; flex-direction: column; color: var(--ink);
  font-family: "Courier Prime", "Courier New", ui-monospace, monospace;
  background-color: #f1ead8; background-repeat: no-repeat, repeat;
  background-image: linear-gradient(rgba(255, 255, 255, 0.35), rgba(0, 0, 0, 0.04)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .25 0 0 0 0 .2 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 18px 40px rgba(0, 0, 0, 0.55), 0 3px 8px rgba(0, 0, 0, 0.35);
  opacity: 1; visibility: visible;
  transition: opacity 0.35s, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s;
}
.panel[hidden] {
  display: flex !important; opacity: 0; visibility: hidden;
  transform: translateY(calc(-50% + 14px)) rotate(-1.5deg); pointer-events: none;
  transition: opacity 0.35s, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s 0.5s;
}
.panel::before {
  content: ""; position: absolute; left: 50%; top: -9px; width: 18px; height: 18px;
  margin-left: -9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff9a86, #b3402c 55%, #6d1f14);
  box-shadow: 0 3px 4px rgba(0, 0, 0, 0.4);
}
.panel header {
  padding: 18px 20px 8px; display: flex; justify-content: space-between;
  align-items: baseline; gap: 10px; border-bottom: 1.5px solid rgba(179, 64, 44, 0.5);
}
.panel h2 {
  margin: 0; font-family: var(--display); font-size: 32px; line-height: 0.95;
  font-weight: 880; font-stretch: 62%; text-transform: uppercase; color: #1b1814;
}
.panel .ch {
  font-size: 13px; color: var(--accent); letter-spacing: 0.12em; text-transform: uppercase;
}
.panel .hbtns { display: flex; gap: 8px; }
.panel .close {
  /* 【2026-10-20】按钮文案改中文（返回 / 收起）。原来用 --osd（VT323 像素字体），
   * 它没有 CJK 字形，中文会掉进等宽兜底；换成 --display 与导航、正文同一套中文字体，
   * 字号/字距相应收一档（方块字更重），并用 inline-flex 保证 44px 触摸区内垂直居中。 */
  font-family: var(--display); font-size: 14px; letter-spacing: 0.1em; font-weight: 500;
  color: #6d1f14; background: rgba(179, 64, 44, 0.08);
  border: 1px solid rgba(179, 64, 44, 0.45); border-radius: 999px;
  padding: 0 12px; min-height: var(--tap); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.panel .pbody { padding: 12px 22px 22px; overflow: auto; font-size: 15px; line-height: 1.55; color: #2a241c; }
.panel .pbody h3 { font-family: var(--display); font-size: 17px; margin: 16px 0 6px; text-transform: uppercase; }
.panel .pbody a { color: #b3402c; }
.panel .pbody ul { margin: 6px 0; padding-left: 20px; }

button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- 语义状态 ---------- */
body.zoomed .panel { opacity: 0; visibility: hidden; pointer-events: none; }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

#err {
  position: fixed; inset: auto 0 50% 0; text-align: center; z-index: 9;
  font-family: var(--display); color: var(--ink); font-size: 18px;
}

/* ---------- 断点：三档（手机 / 平板 / 桌面） ---------- */
/* ≤767px：手机。顶部菜单换行不溢出，面板贴边，提示换成触屏文案（nav.js 会改文案，这里只管排版） */
@media (max-width: 767px) {
  .hud.top {
    flex-direction: column; align-items: flex-start; gap: 4px;
    padding: calc(10px + var(--sat)) calc(14px + var(--sar)) 10px calc(14px + var(--sal));
  }
  .hud.top .name { font-size: 16px; min-height: 34px; }
  .hud.top .menu { gap: 14px; font-size: 18px; flex-wrap: wrap; }
  .hud.top .menu a { min-height: var(--tap); }

  .panel {
    left: calc(12px + var(--sal)); right: calc(12px + var(--sar)); width: auto;
    top: auto; bottom: calc(12px + var(--sab)); transform: none;
    max-height: min(62dvh, 520px);
  }
  .panel[hidden] { transform: translateY(14px) rotate(-1.5deg); }
  .panel h2 { font-size: 26px; }
}

/* ≤480px：窄屏手机。菜单再收一档，避免与站名挤在一行 */
@media (max-width: 480px) {
  .hud.top .menu { gap: 10px; font-size: 16px; }
  .hud.top .name { font-size: 15px; }
  .panel .pbody { padding: 10px 16px 18px; font-size: 14.5px; }
}

/* ≤1199px：平板。面板稍窄一点即可 */
@media (min-width: 768px) and (max-width: 1199px) {
  .panel { width: min(max(340px, calc(min(72dvh, 640px) / 1.618)), calc(100% - 32px)); }
}

/* ≥1200px：桌面，保持原样 */

/* ---------- 面板内容（About / Work / Posts / Online / Bottle / Credits） ---------- */
.panel .pbody .sec {
  font-family: var(--display); font-weight: 800; font-stretch: 62%; text-transform: uppercase;
  font-size: 14px; letter-spacing: 0.14em; color: #b3402c; margin: 18px 0 8px;
  padding-bottom: 3px; border-bottom: 1.5px solid rgba(179, 64, 44, 0.35);
}
.panel .pbody .sec:first-child { margin-top: 4px; }
.panel .pbody p { margin: 0 0 12px; }
.panel .pbody .sig { text-align: right; color: #6d1f14; font-style: italic; }
.panel .pbody .muted { color: #6b5b48; font-size: 13px; }
.panel .pbody code {
  font-family: "Courier Prime", monospace; background: rgba(179, 64, 44, 0.12);
  padding: 1px 5px; border-radius: 3px; font-size: 0.9em;
}

/* WORK：磁带卡 */
.panel .pbody .tlist { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.panel .pbody .tape {
  display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto auto;
  column-gap: 10px; align-items: center;
  background: var(--bg, #ded3bd); color: var(--ink, #2a241c);
  border-radius: 5px; padding: 8px 10px; box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 2px 6px rgba(0,0,0,0.25);
}
.panel .pbody .tape .tn {
  grid-row: 1 / 4; font-family: var(--osd); font-size: 22px; line-height: 1; opacity: 0.85;
  align-self: center; text-align: center;
}
.panel .pbody .tape .tmeta { display: flex; justify-content: space-between; gap: 8px; }
.panel .pbody .tape .tt { font-family: var(--display); font-weight: 800; font-stretch: 62%; text-transform: uppercase; font-size: 16px; }
.panel .pbody .tape .ty { font-family: var(--osd); font-size: 15px; opacity: 0.85; white-space: nowrap; }
.panel .pbody .tape .td { margin: 4px 0 2px; font-size: 13.5px; line-height: 1.45; opacity: 0.95; }
.panel .pbody .tape a { color: inherit; text-decoration: underline; font-size: 13px; opacity: 0.9; }

/* POSTS / ONLINE：teletext 行 */
.panel .pbody .list { list-style: none; margin: 0; padding: 0; }
.panel .pbody .row {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: baseline; gap: 10px;
  padding: 7px 6px; border-radius: 4px; color: #2a241c; text-decoration: none;
  border-bottom: 1px dotted rgba(42, 36, 28, 0.18);
}
.panel .pbody .row:hover { background: rgba(179, 64, 44, 0.12); }
.panel .pbody .row .n { font-family: var(--osd); font-size: 17px; color: #b3402c; }
.panel .pbody .row .t { font-size: 15px; }
.panel .pbody .row .m { font-family: var(--osd); font-size: 14px; color: #6b5b48; white-space: nowrap; }

/* CREDITS */
.panel .pbody .cred { list-style: none; margin: 0 0 10px; padding: 0; }
.panel .pbody .cred li { padding: 6px 0; border-bottom: 1px dotted rgba(42, 36, 28, 0.18); }
.panel .pbody .cred0 { font-size: 13px; color: #6b5b48; line-height: 1.5; }

/* ==========================================================================
   中文热点标注（信息层）—— DOM 覆盖层，不动 WebGL
   风格：这台 CRT 监视器自己的 OSD，不是现代网页 tooltip。
   只用既有设计令牌：--osd / --display / --accent / --panel / --line。
   ========================================================================== */
.hotspots {
  position: fixed; inset: 0; z-index: 4;
  pointer-events: none;                       /* 整层穿透，不抢画布交互 */
  opacity: 1; transition: opacity 0.35s ease;
}
.hotspots.off { opacity: 0; }
/* 便签卡（About/Work/Posts/赏瓶）打开时整层让位，避免两边抢注意力 */
body.paneled .hotspots { opacity: 0; pointer-events: none; }

.hs {
  position: absolute; left: 0; top: 0;
  visibility: hidden;                          /* JS 每帧置 visible */
  will-change: transform;
  pointer-events: none;
}

/* ---- 标记点 ---- */
.hs-dot {
  position: absolute; left: 0; top: 0;
  transform: translate(-50%, -50%);
  width: var(--tap); height: var(--tap);       /* 触摸目标 ≥44px */
  display: flex; align-items: center; justify-content: center;
  pointer-events: auto; cursor: pointer;
  font-family: var(--osd); font-size: 19px; line-height: 1;
  color: var(--accent);
  background: rgba(10, 11, 16, 0.55);
  border: 1px solid rgba(255, 184, 103, 0.55);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 2px 10px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  transition: transform 0.18s ease, color 0.18s, border-color 0.18s, opacity 0.18s;
}
/* 呼吸环：像 OSD 光标，不喧宾夺主 */
.hs-dot::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 1px solid rgba(255, 184, 103, 0.35);
  animation: hsPulse 2.6s ease-in-out infinite;
}
@keyframes hsPulse {
  0%, 100% { opacity: 0.15; transform: scale(0.92); }
  50%      { opacity: 0.6;  transform: scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .hs-dot::after { animation: none; opacity: 0.35; }
}
.hs-dot:hover, .hs-dot:focus-visible { color: #fff; border-color: var(--accent); }
.hs.open .hs-dot { color: #fff; border-color: var(--accent); background: rgba(255, 184, 103, 0.22); }
.hs.muted .hs-dot { transform: translate(-50%, -50%) scale(0.68); opacity: 0.45; }
.hs.muted .hs-dot::after { animation: none; opacity: 0; }

/* hover 才出现的小标签（桌面；触屏没有 hover，直接点开卡片） */
.hs-label {
  position: absolute; left: 50%; top: 50%;
  transform: translate(28px, -50%);
  white-space: nowrap; opacity: 0; pointer-events: none;
  font-family: var(--osd); font-size: 17px; letter-spacing: 0.06em;
  color: var(--ink);
  padding: 2px 10px 1px; border-radius: 3px;
  background: var(--panel); border: 1px solid var(--line);
  text-shadow: 0 0 1px #000, 0 1px 2px #000;
  transition: opacity 0.16s ease;
}
.hs.flip .hs-label { left: auto; right: 50%; transform: translate(-28px, -50%); }
@media (hover: hover) and (pointer: fine) {
  .hs-dot:hover .hs-label, .hs-dot:focus-visible .hs-label { opacity: 1; }
}
.hs.open .hs-label { opacity: 0; }

/* ---- 展开的中文卡片 ---- */
.hs-card {
  position: absolute; left: 26px; top: -14px;
  width: min(330px, 66vw);
  pointer-events: auto;
  padding: 12px 14px 12px;
  color: var(--ink);
  background: rgba(9, 10, 15, 0.9);
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  border-radius: 2px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.4) inset;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.hs.flip .hs-card { left: auto; right: 26px; }
.hs.up .hs-card { top: auto; bottom: -14px; }

.hs-ch {
  font-family: var(--osd); font-size: 14px; letter-spacing: 0.14em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 4px;
}
.hs-title {
  margin: 0 0 2px; font-family: var(--display);
  font-size: 24px; line-height: 1.05; font-weight: 880; font-stretch: 62%;
  letter-spacing: 0.02em; color: var(--ink);
}
.hs-sub {
  margin: 0 0 8px; font-family: var(--osd); font-size: 15px; letter-spacing: 0.04em;
  color: #c9c3d6; opacity: 0.95;
}
.hs-body p {
  margin: 0 0 7px; font-size: 13.5px; line-height: 1.62; color: #ddd8e8;
}
.hs-body p:last-child { margin-bottom: 0; }
.hs-close {
  margin-top: 9px; font-family: var(--osd); font-size: 14px; letter-spacing: 0.08em;
  color: var(--accent); background: rgba(255, 184, 103, 0.08);
  border: 1px solid rgba(255, 184, 103, 0.45); border-radius: 999px;
  padding: 2px 12px 1px; min-height: 32px; cursor: pointer;
}
.hs-close:hover { background: rgba(255, 184, 103, 0.2); }

/* 低画质档（手机）：标记放大、卡片更宽，保证四个点都点得中、看得清 */
.hotspots[data-tier="low"] .hs-dot { width: 52px; height: 52px; font-size: 22px; }
.hotspots[data-tier="low"] .hs-card { width: min(300px, 82vw); }

@media (max-width: 767px) {
  .hs-dot { width: 50px; height: 50px; font-size: 21px; }
  .hs-card { width: min(300px, 84vw); padding: 10px 12px; }
  .hs-title { font-size: 21px; }
  .hs-body p { font-size: 13px; line-height: 1.6; }
  .hs-close { min-height: var(--tap); font-size: 15px; padding: 2px 14px 1px; }
}

/* ==========================================================================
   景泰蓝 · 点蓝工坊（赏瓶面板里的入口 + 全屏游戏层）
   --------------------------------------------------------------------------
   只在既有令牌上做加法，不引入新色：
     纸 #f1ead8 / 面板墨色 #2a241c / 砖红 #b3402c（面板强调色）/ 压深砖红 #96341f
     --ink #efe9dc / --ground #07080d / --accent #ffb867 / --osd / --display / --tap
   ========================================================================== */

/* ---------- 面板里的入口按钮 ----------
 * 放在赏瓶文案**之前**（正文第一个元素），保证在任何视口下都落在首屏可见区：
 * 面板是可滚动的便签卡，入口若排在 4 段文案之后会被折叠线吞掉（1440×900 要滚 96px、
 * 手机要滚 184px）。因此分隔线改为**底边**——把「动手玩」和下面「读介绍」分开。 */
.panel .pbody .launch {
  margin: 0 0 14px;
  padding-top: 0;
  padding-bottom: 14px;
  border-bottom: 1.5px dashed rgba(179, 64, 44, 0.45);
}

.panel .pbody .launch-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  width: 100%;
  min-height: 52px;
  margin: 0; padding: 8px 16px;
  border: 0; border-radius: 999px;
  background: #b3402c;
  color: #f1ead8;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.panel .pbody .launch-btn:hover {
  background: #96341f;
  transform: translateY(-1px);
}
.panel .pbody .launch-btn:active { transform: translateY(0); }

/* 主标：与面板标题同族的窄体大写感（中文按 800 + 62% 字宽收紧） */
.panel .pbody .launch-btn .lb-t {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 62%;
  font-size: 17px;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: inherit;
}
/* 副标：CRT 的 OSD 字体，压一档透明度，别抢主标 */
.panel .pbody .launch-btn .lb-s {
  font-family: var(--osd);
  font-size: 15px;
  line-height: 1.1;
  letter-spacing: 0.04em;
  opacity: 0.85;
  color: inherit;
}

/* 小字提示：与 .muted 同色系，明确但退到背景里 */
.panel .pbody .launch-hint {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #6b5b48;
}

/* ---------- 全屏游戏层 ----------
 * z-index 30：高于 .panel(7) / #err(9) / #hud(5)，也高于热点层(4)。
 * 注意不要覆盖全局 `[hidden]{display:none!important}` —— 游戏层靠它真正从布局里消失。 */
#game-layer {
  position: fixed; inset: 0; z-index: 30;
  display: flex; flex-direction: column;
  background: var(--ground);
  animation: glFadeIn 0.25s ease both;
}
@keyframes glFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  #game-layer { animation-duration: 0.01s; }
}

/* 顶栏：左边标题、右边返回书房，吃满安全区 */
.gl-bar {
  flex: 0 0 auto;
  height: 52px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 8px calc(16px + var(--sar)) 8px calc(16px + var(--sal));
  padding-top: calc(8px + var(--sat));
  background: #0b0c12;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.gl-title {
  font-family: var(--osd);
  font-size: 18px;
  letter-spacing: 0.08em;
  color: var(--ink);
  opacity: 0.9;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* 返回按钮：与 .panel .close 同一族（胶囊 + 细边），只是换成深底浅字 */
.gl-close {
  flex: 0 0 auto;
  font-family: var(--osd); font-size: 17px; letter-spacing: 0.06em;
  color: var(--accent);
  background: rgba(255, 184, 103, 0.10);
  border: 1px solid rgba(255, 184, 103, 0.45);
  border-radius: 999px;
  padding: 2px 14px 1px;
  min-height: var(--tap);
  cursor: pointer;
}
.gl-close:hover { background: rgba(255, 184, 103, 0.20); }

/* 游戏本体：撑满顶栏以下的全部空间 */
#game-frame {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  display: block;
  background: var(--ground);
}

/* 游戏全屏时藏起 HUD 与便签卡：视觉上只剩工坊，避免面板/hotspots 从游戏层边缘透出 */
body.game-on .hud,
body.game-on .panel { visibility: hidden; }

/* 2026-10-22：书房游戏层顶栏的小游戏切换（景泰蓝 / 拼笺） */
#game-layer .gl-switch{display:flex;gap:8px;margin-left:auto;margin-right:12px}
#game-layer .gl-tab{appearance:none;border:1px solid rgba(255,255,255,.22);background:rgba(255,255,255,.06);color:#d8cfbd;font:500 12px/1 'Noto Sans SC',-apple-system,'Segoe UI',sans-serif;padding:7px 12px;border-radius:999px;cursor:pointer;transition:background .18s,border-color .18s,color .18s}
#game-layer .gl-tab:hover{background:rgba(255,255,255,.12)}
#game-layer .gl-tab.on{background:#c03a2b;border-color:#c03a2b;color:#fff}

#game-layer .gl-hub{appearance:none;margin-left:auto;margin-right:8px;border:1px solid rgba(239,233,220,.34);background:rgba(24,20,16,.55);color:#efe9dc;font:500 12px/1 'Noto Sans SC',-apple-system,'Segoe UI',sans-serif;padding:7px 13px;border-radius:999px;cursor:pointer;transition:background .18s}
#game-layer .gl-hub:hover{background:rgba(192,58,43,.6)}
#game-layer .gl-switch{margin-left:0}


/* 2026-10-22：右上角四项（关于/作品/随记/线上）已并入「点电脑」入口，这里整体隐藏 */
nav.menu{display:none !important}


/* ═══════════ 游戏加载遮罩（2026-10-22；2026-10-23 改成游戏同款配色）═══════════
   书房游戏层里打开小游戏 / 工坊大厅时，先盖一层载入画面，iframe load 后淡出。
   配色直接取三件小游戏的变量（games/*.html）：
     --paper #F7F3EA · --paper2 #EFE7D6 · --card #FBF8F1 · --ink #2B2A26
     --weak  #6E685C · --cinnabar #C03A2B · --gold #C6A03C · --gold2 #A9833F · --line #E8E0CF
   目的：载入画面 → 游戏本体之间不跳色系（与书房的青色 CRT 明确区分）。 */
#gl-load{position:absolute;inset:0;z-index:4;display:flex;align-items:center;justify-content:center;
  background:radial-gradient(1200px 640px at 50% 40%, #FCF9F3 0%, #F7F3EA 56%, #EFE7D6 100%);
  transition:opacity .34s ease;opacity:1}
#gl-load.off{opacity:0;pointer-events:none}
/* 左缘一条极细的朱红→金竖线，呼应游戏里的朱砂印与描金 */
#gl-load::before{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;
  background:linear-gradient(180deg,rgba(192,58,43,0),#C03A2B 22%,#C6A03C 78%,rgba(198,160,60,0))}
#gl-load .gl-load-box{width:min(470px,82vw);text-align:center;color:#2B2A26;
  font:500 13px/1.65 'Noto Sans SC',-apple-system,'Segoe UI',sans-serif}
/* 朱砂小印，和游戏标题旁那枚「常」同一形态 */
#gl-load .gl-load-seal{width:34px;height:34px;margin:0 auto 12px;border-radius:6px;
  display:flex;align-items:center;justify-content:center;
  background:#C03A2B;color:#FBF8F1;font:700 19px/1 'Noto Serif SC',serif;
  box-shadow:0 2px 10px rgba(192,58,43,.26)}
#gl-load .gl-load-k{font:600 10px/1 ui-monospace,monospace;letter-spacing:.34em;color:#A9833F}
#gl-load .gl-load-t{margin:12px 0 16px;font-size:15px;letter-spacing:.05em;color:#2B2A26}
#gl-load .gl-load-t b{color:#C03A2B;font-weight:700}
#gl-load .gl-load-bar{height:3px;border-radius:2px;overflow:hidden;background:#E8E0CF;
  box-shadow:inset 0 0 0 1px rgba(198,160,60,.22)}
#gl-load .gl-load-bar i{display:block;height:100%;width:6%;border-radius:2px;
  background:linear-gradient(90deg,#C03A2B,#C6A03C);box-shadow:0 0 7px rgba(192,58,43,.32);
  transition:width .22s ease}
#gl-load .gl-load-h{margin-top:11px;font-size:11px;color:#6E685C;opacity:.9}

/* 2026-10-23 无障碍：键盘焦点环统一用描金（与全站朱砂/描金体系一致），
   只在键盘操作时出现（:focus-visible），鼠标点击不打扰。 */
:where(a,button,input,select,textarea,[tabindex]:not([tabindex="-1"])):focus-visible{
  outline:2px solid #C6A03C;outline-offset:2px;border-radius:6px}
/* 深色底的游戏层/开机屏里换成更亮的描金，避免糊在暗背景里 */
#game-layer :where(button,a,input):focus-visible,
#boot-layer :where(button,a,input):focus-visible{outline-color:#F0C766}

/* 2026-10-23 触控目标：左上角站名按钮 61×34，手机上加到 40 高 */
@media (max-width:640px){
  #home-link.name{min-height:40px;display:inline-flex;align-items:center}
}

/* 2026-10-23 竖屏首帧：竖屏机位在 2026-10-23 收紧过（narrowDistanceScale 1.22→1.10），
   原来那张横屏 poster 是被 cover 裁出来的，和竖屏实际机位对不上 —— 加载中会「跳一下」。
   这里给竖屏换一张按竖屏机位单独渲染的首帧图（900×1948，171 KB）。 */
@media (orientation: portrait) and (max-width: 900px) {
  #poster { background-image: url("../../assets/poster-portrait.jpg?v=20261023portrait") }
}
