
/* ═══════════════════════════════════════════════════════════
   v0.3.1u ROUTE-WIDE TYPOGRAPHY / SPACING TOKENS
   单一事实源 = assets/night-typography.js（运行时会重写这些变量）。
   此处的值是静态回退，与 JS 表必须同值（由 verify 断言）。
   站点不得自写 margin：所有间距只允许引用 --nv-sp-*。
   ═══════════════════════════════════════════════════════════ */
:root {
  --nv-t-story-family: "Songti SC", STSong, "Noto Serif CJK SC", "Noto Serif SC", "Source Han Serif SC", serif;
  --nv-t-story-size: 18px;   --nv-t-story-lh: 1.85;   --nv-t-story-ls: .012em;   --nv-t-story-color: #2f2a26;   --nv-t-story-weight: 400;
  --nv-t-dialogue-family: "Songti SC", STSong, "Noto Serif CJK SC", "Noto Serif SC", "Source Han Serif SC", serif;
  --nv-t-dialogue-size: 18px; --nv-t-dialogue-lh: 1.85; --nv-t-dialogue-ls: .012em; --nv-t-dialogue-color: #3a332c; --nv-t-dialogue-weight: 400;
  --nv-t-meta-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --nv-t-meta-size: 13px;    --nv-t-meta-lh: 1.6;     --nv-t-meta-ls: .05em;     --nv-t-meta-color: #8a8378;    --nv-t-meta-weight: 400;
  --nv-t-media-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --nv-t-media-size: 12px;   --nv-t-media-lh: 1.6;    --nv-t-media-ls: .02em;    --nv-t-media-color: #8a8378;   --nv-t-media-weight: 400;
  --nv-t-prompt-family: "Songti SC", STSong, "Noto Serif CJK SC", "Noto Serif SC", serif;
  --nv-t-prompt-size: 16px;  --nv-t-prompt-lh: 1.8;   --nv-t-prompt-ls: .01em;   --nv-t-prompt-color: #5a5248;  --nv-t-prompt-weight: 400;
  --nv-t-knowledge-family: "Songti SC", STSong, "Noto Serif CJK SC", "Noto Serif SC", serif;
  --nv-t-knowledge-size: 14px; --nv-t-knowledge-lh: 1.8; --nv-t-knowledge-ls: .01em; --nv-t-knowledge-color: #5a5248; --nv-t-knowledge-weight: 400;
  --nv-t-action-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --nv-t-action-size: 15px;  --nv-t-action-lh: 1.5;   --nv-t-action-ls: .04em;   --nv-t-action-color: #fff8f3;  --nv-t-action-weight: 400;

  --nv-sp-paragraph: 17px;
  --nv-sp-dialogue: 17px;
  --nv-sp-meta: 17px;
  --nv-sp-beatBoundary: 30px;
  --nv-sp-media: 30px;
  --nv-sp-cityPrompt: 30px;
  --nv-sp-knowledgeTeaser: 30px;
  --nv-sp-action: 28px;

  --nv-lay-shellPaddingTop: 22px;
  --nv-lay-shellPaddingSide: 23px;
  --nv-lay-blockScrollMarginTop: 22px;
  --nv-lay-revealReserveBottom: 96px;
}
/* NIGHT Living Draft Demo：复用项目既有移动端阅读壳的视觉原则；正文由唯一稿源生成。 */
/* 三入口导航候选 v01：导航层令牌取自本壳宣纸色系，非照搬旧 RC 暗色。 */
:root {
  color-scheme: light;
  --nv-paper: #eee7db;
  --nv-paper-card: rgba(255, 255, 255, .52);
  --nv-ink: #292119;
  --nv-dust: #75695a;
  --nv-clay: #8a7059;
  --nv-vermilion: #a8452b;
  --nv-border: #cfc2b2;
  --nv-tabbar-h: 56px;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #eee7db; color: #292119; font-family: "Noto Serif SC", "Songti SC", STSong, serif; }
button, select { font: inherit; }
button { cursor: pointer; }
.night-shell { width: min(100%, 720px); min-height: 100vh; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 18px calc(64px + env(safe-area-inset-bottom)); }
.night-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #75695a; font: 12px/1.4 system-ui, sans-serif; letter-spacing: .08em; }
.night-topline button { appearance: none; padding: 0; color: inherit; border: 0; background: transparent; font: inherit; text-decoration: underline; text-underline-offset: 3px; }
.night-rule { height: 1px; margin: 18px 0 30px; border: 0; background: #cfc2b2; }
.night-start { display: flex; min-height: calc(100vh - 92px); flex-direction: column; justify-content: center; }
.night-title { margin: 0 0 26px; font-size: clamp(34px, 12vw, 54px); font-weight: 500; letter-spacing: .06em; line-height: 1.2; }
.night-subtitle { margin: -10px 0 30px; color: #736556; font-size: 17px; }
.night-stream { margin: 0; }
.night-block { scroll-margin-top: var(--nv-lay-blockScrollMarginTop); }
.night-block strong { font-weight: 600; }
.night-block blockquote { margin: 0 0 var(--nv-sp-paragraph); padding: 0 0 0 16px; border-left: 2px solid #987756; color: #4d4035; }
.night-block blockquote p { margin: 0 0 var(--nv-sp-paragraph); color: inherit; }
.night-action-row { display: grid; gap: 10px; margin: 28px 0 42px; }
.night-button { width: 100%; padding: 14px 15px; border: 1px solid #8a7059; border-radius: 3px; color: #fffaf2; background: #6d4e37; text-align: left; font-size: 16px; line-height: 1.5; }
.night-button:hover { background: #5f422f; }
.night-button.secondary { color: #3b2e24; background: rgba(255,255,255,.52); }
.night-timer { margin: 28px 0 40px; color: #5f4a38; font: 500 clamp(42px, 12vw, 62px)/1 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .04em; }
.night-timer-note { color: #746657; font-size: 14px; }
.night-end-actions { margin-top: 38px; }
.night-debug { margin: 72px 0 0; color: #63564a; font: 13px/1.55 ui-monospace, "SFMono-Regular", Consolas, monospace; }
.night-debug summary { cursor: pointer; color: #6d5947; }
.night-debug-panel { display: grid; gap: 10px; margin-top: 11px; padding: 14px; border: 1px solid #cdbda9; background: rgba(255,255,255,.45); }
.night-debug label { display: grid; gap: 4px; }
.night-debug select, .night-debug button { min-height: 38px; border: 1px solid #b9a48e; border-radius: 2px; color: #33271f; background: #fffaf2; }
.night-debug-buttons { display: grid; gap: 8px; }
.night-debug-status { margin: 0; white-space: pre-wrap; word-break: break-word; color: #695a4d; }
@media (max-width: 420px) {
  .night-shell { padding-right: 16px; padding-left: 16px; }
  .night-block { font-size: 18px; }
}

/* ═══════════════════════════════════════════════════════════
   三入口导航候选 v01（2026-09-12）
   复用来源：旧 RC V5.15.2 的 tabbar 结构与地图三态类名。
   不复用：旧 switchTab() 的 window.scrollTo(0,0) 行为。
   视图隔离：故事=文档流（window 滚动）；地图/兔爷=fixed 独立滚动容器。
   ═══════════════════════════════════════════════════════════ */

/* ── 底部常驻三入口 ── */
.nv-tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nv-tabbar-h);
  display: flex;
  z-index: 200;
  background: rgba(238, 231, 219, .97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--nv-border);
  padding-bottom: env(safe-area-inset-bottom);
}
.nv-tabbar .nv-tb {
  flex: 1;
  /* 44×44 触控区：高度由 56px 保证，宽度 flex 均分在 320px 视口下为 ~106px */
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--nv-dust);
  font-size: 11px;
  letter-spacing: 1px;
  transition: color .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.nv-tabbar .nv-tb .nv-ic { font-size: 19px; line-height: 1; }
.nv-tabbar .nv-tb.on { color: var(--nv-vermilion); font-weight: 600; }
.nv-tabbar .nv-tb.on .nv-ic { transform: translateY(-1px); }
/* 高潮阶段兔爷保持安静：不发红点、不抢焦点，但入口始终可找到 */
.nv-tabbar .nv-tb.nv-quiet .nv-ic { opacity: .55; }

/* ── 三视图容器 ── */
.nv-view { display: none; }
.nv-view.on { display: block; }

/* 故事视图沿用文档流滚动，仅让出 tabbar 高度，避免遮挡推进按钮 */
.nv-view-story.on { display: block; }
.nv-shell { padding-bottom: calc(var(--nv-tabbar-h) + 28px + env(safe-area-inset-bottom)); }

/* 地图 / 兔爷：独立 fixed 视图 + 独立滚动容器 */
.nv-view-map.on,
.nv-view-tuye.on {
  position: fixed;
  top: 0; left: 0; right: 0;
  bottom: calc(var(--nv-tabbar-h) + env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: var(--nv-paper);
  z-index: 150;
}
.nv-view-tuye.on { display: flex; flex-direction: column; overflow: hidden; }

/* ── 地图视图 ── */
.nv-map-shell { width: min(100%, 720px); margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 18px 28px; }
.nv-map-head { margin: 0 0 4px; font-size: 22px; font-weight: 500; letter-spacing: .1em; }
.nv-map-sub { margin: 0 0 20px; color: var(--nv-dust); font-size: 13px; letter-spacing: .06em; }
.nv-map-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.nv-map-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--nv-border);
  border-radius: 3px;
  background: rgba(255, 255, 255, .44);
}
.nv-map-row .nv-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--nv-border);
  color: var(--nv-dust);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.nv-map-row .nv-name { font-size: 16px; line-height: 1.4; }
.nv-map-row .nv-note { color: var(--nv-dust); font-size: 12px; letter-spacing: .04em; white-space: nowrap; }

/* 三态：已走 / 当前 / 未到（复用旧 RC 类名语义，配色换本壳） */
.nv-map-row.st-done { border-color: #b9a48e; }
.nv-map-row.st-done .nv-mark { border-color: #8a7059; background: #8a7059; color: #fffaf2; }
.nv-map-row.st-done .nv-note { color: #7c6a56; }
.nv-map-row.st-cur { border-color: var(--nv-vermilion); background: rgba(168, 69, 43, .07); }
.nv-map-row.st-cur .nv-mark { border-color: var(--nv-vermilion); background: var(--nv-vermilion); color: #fffaf2; }
.nv-map-row.st-cur .nv-name { font-weight: 600; }
.nv-map-row.st-cur .nv-note { color: var(--nv-vermilion); font-weight: 600; }
.nv-map-row.st-next .nv-mark { border-color: #8a7059; border-style: dashed; }
.nv-map-row.st-next .nv-note { color: #7c6a56; }
.nv-map-row.st-lock { opacity: .58; }
.nv-map-row.st-lock .nv-mark { border-style: dashed; }
.nv-map-foot { margin: 22px 0 0; color: var(--nv-dust); font-size: 12px; line-height: 1.6; }

/* ── 兔爷视图 ── */
.nv-tuye-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top)) 18px 12px;
  border-bottom: 1px solid var(--nv-border);
  color: var(--nv-ink); font-size: 15px; letter-spacing: .08em;
}
.nv-tuye-head .nv-tuye-state { color: var(--nv-dust); font-size: 12px; letter-spacing: .04em; }
.nv-tuye-msgs { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 16px 18px; }
.nv-tuye-msg { max-width: 88%; margin: 0 0 12px; padding: 11px 13px; border-radius: 3px; font-size: 16px; line-height: 1.7; }
.nv-tuye-msg.from-tuye { border: 1px solid var(--nv-border); background: rgba(255, 255, 255, .55); }
.nv-tuye-msg.from-me { margin-left: auto; border: 1px solid #b9a48e; background: #8a7059; color: #fffaf2; }
.nv-tuye-hint { padding: 0 18px 10px; color: var(--nv-dust); font-size: 12px; line-height: 1.6; }
.nv-tuye-bar { display: flex; gap: 8px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--nv-border); }
.nv-tuye-bar input { flex: 1; min-height: 44px; padding: 10px 12px; border: 1px solid var(--nv-border); border-radius: 3px; background: #fffaf2; color: var(--nv-ink); }
.nv-tuye-bar button { min-width: 64px; min-height: 44px; border: 1px solid var(--nv-clay); border-radius: 3px; background: #6d4e37; color: #fffaf2; }

/* ═══════════════════════════════════════════════════════════
   2026-09-08 工程轮：GPS 软提示 + Rabbit 降级态
   原则：定位=增强不是硬门；降级态绝不出现「无法继续」类措辞。
   ═══════════════════════════════════════════════════════════ */

/* ── GPS 软提示条（地图视图顶部，非弹窗） ── */
.nv-gps {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 11px 13px;
  border: 1px dashed var(--nv-border);
  border-radius: 3px;
  background: rgba(255, 255, 255, .38);
  color: var(--nv-dust);
  font-size: 13px;
  line-height: 1.5;
}
.nv-gps.is-ok { border-style: solid; border-color: #b9a48e; color: #5f4a38; }
.nv-gps.is-degraded { border-style: solid; border-color: #cbb9a4; }
.nv-gps .nv-gps-text { flex: 1; }
.nv-gps .nv-gps-btn {
  flex: none;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--nv-clay);
  border-radius: 3px;
  background: #fffaf2;
  color: #6d4e37;
  font-size: 13px;
  white-space: nowrap;
}
.nv-gps .nv-gps-spin {
  flex: none;
  width: 13px; height: 13px;
  border: 2px solid var(--nv-border);
  border-top-color: var(--nv-clay);
  border-radius: 50%;
  animation: nvGpsSpin .9s linear infinite;
}
@keyframes nvGpsSpin { to { transform: rotate(360deg); } }

/* 到达标记：只在定位成功且进入软提示范围时出现在当前站 */
.nv-map-row.st-here { box-shadow: inset 3px 0 0 var(--nv-clay); }
.nv-map-row.st-here .nv-note::after { content: ' · 就在附近'; }

/* ── Rabbit 降级态：静止、不闪烁、不催促 ── */
.nv-tuye-msg.is-pending { color: var(--nv-dust); font-style: italic; }
.nv-tuye-msg.is-fallback { border-style: dashed; color: #6b5d4f; }

/* 系统偏好减弱动效时，不转圈 */
@media (prefers-reduced-motion: reduce) {
  .nv-gps .nv-gps-spin { animation: none; }
}

/* ═══════════════════════════════════════════════════════════
   FIELD-TEST-UI-POLISH-V0.1（2026-09-14）—— 只改表现层
   作用域：html[data-uimode="b"|"c"]。A 模式 = v02 现状，零影响。
   方向：暖白背景 / 深灰正文 / 中灰 metadata / 单一暗红 accent；
   正文 Songti 系；UI 层系统无衬线；无远程字体、无渐变、无玻璃拟态。
   ═══════════════════════════════════════════════════════════ */

/* ── 色底：暖白纸面 ── */
html[data-uimode="b"] body,
html[data-uimode="c"] body {
  background: #faf8f4;
  color: #2f2a26;
  font-family: "Songti SC", STSong, "Noto Serif CJK SC", "Noto Serif SC", serif;
}
html[data-uimode="b"] .nv-view-map.on,
html[data-uimode="c"] .nv-view-map.on { background: #faf8f4; }

/* ── Story 层：v0.3.1u 起一律走 token（不再按 uimode 分叉排版） ──
   刻意使用「统一 margin-bottom + margin collapse」表达间距，
   不使用 :last-child / :first-child / + / ~ —— 保证 reveal 追加新 block 时，
   已显示 block 的 margin / padding / height contribution 完全不变。 */
.night-shell { padding-left: var(--nv-lay-shellPaddingSide); padding-right: var(--nv-lay-shellPaddingSide); }
.night-block {
  margin: 0 0 var(--nv-sp-beatBoundary);
  font-family: var(--nv-t-story-family);
  font-size: var(--nv-t-story-size);
  line-height: var(--nv-t-story-lh);
  letter-spacing: var(--nv-t-story-ls);
  color: var(--nv-t-story-color);
}
.night-block p {
  margin: 0 0 var(--nv-sp-paragraph);
  font-family: var(--nv-t-story-family);
  font-size: var(--nv-t-story-size);
  line-height: var(--nv-t-story-lh);
  letter-spacing: var(--nv-t-story-ls);
  font-weight: var(--nv-t-story-weight);
  color: var(--nv-t-story-color);
}
.night-block p[data-p-type="dialogue"] {
  color: var(--nv-t-dialogue-color);
  font-family: var(--nv-t-dialogue-family);
  font-size: var(--nv-t-dialogue-size);
  line-height: var(--nv-t-dialogue-lh);
  font-weight: var(--nv-t-dialogue-weight);
}
.night-block p[data-p-type="meta"] {
  color: var(--nv-t-meta-color);
  font-family: var(--nv-t-meta-family);
  font-size: var(--nv-t-meta-size);
  line-height: var(--nv-t-meta-lh);
  letter-spacing: var(--nv-t-meta-ls);
}
html[data-uimode="b"] .night-block blockquote,
html[data-uimode="c"] .night-block blockquote {
  border-left: 2px solid #b3906d;
  color: #4d453d;
}
html[data-uimode="b"] .night-rule,
html[data-uimode="c"] .night-rule { background: #e3dbcf; }

/* ── Meta 层：日期地点视角信息，明显弱于正文 ── */
html[data-uimode="b"] .night-topline,
html[data-uimode="c"] .night-topline {
  color: #8a8378;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: .06em;
}

/* ── Action 层：明确、统一、≥44px 触控高度 ── */
html[data-uimode="b"] .night-button,
html[data-uimode="c"] .night-button {
  min-height: 48px;
  border: 0;
  border-radius: 4px;
  background: #93392b;
  color: #fff8f3;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: .04em;
}
html[data-uimode="b"] .night-button:hover,
html[data-uimode="c"] .night-button:hover { background: #7f3024; }
html[data-uimode="b"] .night-button.secondary,
html[data-uimode="c"] .night-button.secondary { background: rgba(0, 0, 0, .055); color: #4d453d; }

/* ── Companion / 系统 UI：兔爷与导航随暖白纸面，不抢正文 ── */
html[data-uimode="b"] .nv-tabbar,
html[data-uimode="c"] .nv-tabbar {
  background: rgba(250, 248, 244, .97);
  border-top-color: #e3dbcf;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ── 地图页：仅排版与间距对齐，不重构 ── */
html[data-uimode="b"] .nv-map-shell,
html[data-uimode="c"] .nv-map-shell { padding-left: 23px; padding-right: 23px; }
html[data-uimode="b"] .nv-map-row,
html[data-uimode="c"] .nv-map-row { background: rgba(255, 255, 255, .6); border-color: #e3dbcf; }

/* ── Flow-down beat：下沉式逐段显现 ── */
.ui-beats { display: block; }
.ui-beat { min-width: 0; }
@keyframes uiBeatIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.ui-beat-in { animation: uiBeatIn 180ms ease-out both; }
@media (prefers-reduced-motion: reduce) {
  .ui-beat-in { animation: none; }
}

/* ── 预览切换条（仅本预览分支的 Founder Preview Chrome） ── */
.ui-mode-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid #ddd4c6;
  background: #f0ece4;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  color: #6b6257;
}
.ui-mode-bar .ui-mode-bar-title {
  margin-right: 2px;
  color: #93392b;
  font-weight: 600;
  letter-spacing: .08em;
}
.ui-mode-bar button {
  appearance: none;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid #cfc5b6;
  border-radius: 3px;
  background: #fff;
  color: #5a5248;
  font-size: 12px;
}
.ui-mode-bar button.on {
  border-color: #93392b;
  background: #93392b;
  color: #fff8f3;
}



/* ═══════════════════════════════════════════════════════════
   CORELOOP-PROTOTYPE-V0.1（2026-09-14）—— 到站条 / 知识 / 现场动作
   原则：Meta 层弱于正文；不做大白卡；错误状态不用兔爷人格。
   ═══════════════════════════════════════════════════════════ */
.loop-arrival { margin: 0 0 22px; }
.loop-arrival-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  padding: 8px 0 2px;
  border-top: 1px solid #e3dbcf;
  color: #8a8378;
  font: 13px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.loop-arrival-state { flex: 1 1 auto; letter-spacing: .03em; }
.loop-arrive-btn {
  appearance: none; min-height: 34px; padding: 5px 13px;
  border: 1px solid #93392b; border-radius: 3px;
  background: transparent; color: #93392b;
  font: 13px/1.4 -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
}
.loop-nav {
  color: #8a8378; font: 13px/1.4 -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  text-decoration: underline; text-underline-offset: 3px;
}
.loop-rabbit-note {
  margin-top: 10px; padding: 9px 12px;
  border-left: 2px solid #c9b7a2;
  color: #5a5248; font-size: 14px; line-height: 1.7;
}
.loop-rabbit-note span { margin-right: 8px; color: #9a8d7c; font-size: 12px; letter-spacing: .08em; }
.loop-knowledge { margin: 0 0 26px; border-top: 1px solid #e3dbcf; padding-top: 12px; }
.loop-knowledge summary {
  cursor: pointer; list-style: none;
  color: #8a8378;
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  letter-spacing: .02em;
}
.loop-knowledge summary::before { content: '＋ '; color: #b3a795; }
.loop-knowledge[open] summary::before { content: '－ '; }
.loop-kcard { margin: 14px 0 0; }
.loop-kcard-title { margin: 0 0 4px; color: #4d453d; font-size: 15px; font-weight: 600; }
.loop-kcard-text { margin: 0 0 6px; color: #5a5248; font-size: 14px; line-height: 1.8; }
.loop-kcard-src { margin: 0 0 8px; color: #a2988a; font: 12px/1.6 -apple-system, BlinkMacSystemFont, sans-serif; }
.loop-ask {
  appearance: none; min-height: 30px; padding: 3px 10px;
  border: 1px solid #cfc5b6; border-radius: 3px;
  background: transparent; color: #8a8378; font-size: 12px;
}
.loop-actions { margin: 0 0 26px; border-top: 1px solid #e3dbcf; padding-top: 12px; }
.loop-actions-head {
  margin: 0 0 10px; color: #93392b;
  font: 600 13px/1.4 -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  letter-spacing: .1em;
}
.loop-action { margin: 0 0 14px; }
.loop-action-label { margin: 0 0 3px; color: #4d453d; font-size: 15px; font-weight: 600; }
.loop-action-detail { margin: 0 0 8px; color: #5a5248; font-size: 14px; line-height: 1.8; }
.loop-action-row { display: flex; gap: 8px; }
.loop-action-row button {
  appearance: none; min-height: 34px; padding: 5px 14px;
  border: 1px solid #cfc5b6; border-radius: 3px;
  background: transparent; color: #5a5248; font-size: 13px;
}
.loop-action-row button:first-child { border-color: #93392b; color: #93392b; }
@media (prefers-reduced-motion: reduce) {
  .loop-arrival, .loop-knowledge, .loop-actions { transition: none; }
}


/* ═══════════════════════════════════════════════════════════
   FIELDWALK-PREVIEW-V0.2（2026-09-15）
   Tap to Reveal / Between / 地图状态机 / Location Card
   ═══════════════════════════════════════════════════════════ */

/* 覆盖 beat 动效时长（v0.1 180ms → Candidate 260ms） */
@keyframes uiBeatIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.ui-beat-in { animation: uiBeatIn 260ms ease-out both; }
.night-block.ui-beat-in { animation: uiBeatIn 260ms ease-out both; }
@media (prefers-reduced-motion: reduce) {
  .ui-beat-in, .night-block.ui-beat-in { animation: uiBeatIn 120ms linear both; }
  @keyframes uiBeatIn { from { opacity: 0; } to { opacity: 1; } }
}

/* 键盘 / 读屏 fallback：按钮不可见但可聚焦可触发 */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}
.sr-action-row { margin: 0; }
.tap-hint {
  margin: 4px 0 0;
  color: #a2988a; font: 13px/1.5 -apple-system, BlinkMacSystemFont, \"PingFang SC\", sans-serif;
  letter-spacing: .06em;
  animation: tapHintFade 2600ms ease-out both;
}
@keyframes tapHintFade { 0% { opacity: 0; } 12% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .tap-hint { animation: none; opacity: .6; } }

/* 到站条 meta 行 */
.loop-arrival-meta {
  margin-top: 2px; color: #a2988a;
  font: 12px/1.6 -apple-system, BlinkMacSystemFont, \"PingFang SC\", sans-serif;
  letter-spacing: .02em;
}

/* Between：站间 wayfinding */
.loop-between { padding: 6px 0 10px; }
.loop-bt-head {
  margin: 0 0 14px; color: #93392b;
  font: 600 13px/1.4 -apple-system, BlinkMacSystemFont, \"PingFang SC\", sans-serif;
  letter-spacing: .12em;
}
.loop-bt-next { margin: 0 0 4px; color: #2f2a26; font-size: 19px; font-weight: 500; }
.loop-bt-pos { margin: 0 0 10px; color: #6b6257; font-size: 14px; }
.loop-bt-cand { color: #a2988a; font-size: 12px; }
.loop-copy-btn {
  appearance: none; min-height: 40px; padding: 7px 16px;
  border: 1px solid #93392b; border-radius: 4px;
  background: transparent; color: #93392b;
  font: 14px/1.4 -apple-system, BlinkMacSystemFont, \"PingFang SC\", sans-serif;
  margin-bottom: 14px;
}
.loop-copy-toast {
  margin: -6px 0 12px; color: #7d936f;
  font: 13px/1.5 -apple-system, BlinkMacSystemFont, sans-serif;
}
.loop-bt-dir { margin: 0 0 4px; color: #4d453d; font-size: 15px; line-height: 1.8; }
.loop-bt-min { margin: 0 0 16px; color: #a2988a; font: 13px/1.5 -apple-system, BlinkMacSystemFont, sans-serif; }
.loop-bt-letter { margin: 18px 0 0; color: #8a8378; font-size: 14px; font-style: normal; }
.loop-bt-hint { margin: 16px 0 0; color: #a2988a; font: 13px/1.5 -apple-system, BlinkMacSystemFont, sans-serif; }
.loop-between .loop-arrive-btn { margin-bottom: 4px; }

/* City Prompt（看看城市）：被动、无任务机制 */
.loop-prompt { margin: 0 0 26px; border-top: 1px solid #e3dbcf; padding-top: 12px; }
.loop-prompt-head {
  margin: 0 0 8px; color: #93392b;
  font: 600 13px/1.4 -apple-system, BlinkMacSystemFont, \"PingFang SC\", sans-serif;
  letter-spacing: .1em;
}
.loop-prompt-line { margin: 0 0 6px; color: #5a5248; font-size: 15px; line-height: 1.8; }

/* Rabbit invitation（第二阶段，仅参与信号后出现一次） */
.loop-rabbit-note.loop-invite { border-left-color: #b3906d; }

/* 地图状态机 */
.nv-map-row.st-done { opacity: .45; }
.nv-map-row.st-done .nv-name { text-decoration: line-through; text-decoration-color: #c9b7a2; }
.nv-map-row.st-lock { opacity: .55; }
.nv-map-row.st-lock .nv-name { filter: blur(4px); }
.nv-map-row.st-cur { border-color: #93392b; box-shadow: inset 3px 0 0 #93392b; background: rgba(147, 57, 43, .06); }
.nv-map-row.st-cur .nv-name { color: #93392b; font-weight: 600; }
.nv-map-row.st-arrived { border-color: #b3906d; }
.nv-map-row.st-arrival-cand { border-color: #b3906d; }
.nv-map-row.st-arrival-cand .nv-note { color: #93392b; }
.nv-map-row.st-gpsdot { border-style: dashed; opacity: .8; }
.nv-map-row.st-gpsdot .nv-mark { color: #5b7a99; border-color: #5b7a99; }
.nv-map-row.st-gpsdot .nv-name { color: #5b7a99; font-size: 13px; }

/* v0.2.1：Between 出发按钮（与到达按钮同权重） */
.loop-depart-btn {
  appearance: none; min-height: 44px; padding: 8px 20px;
  border: 1px solid #93392b; border-radius: 4px;
  background: #93392b; color: #fff8f3;
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: .04em;
}

/* ═══ v0.3：封面 / 模式 / 门控 / 媒体 ═══ */
.night-cover { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: calc(100vh - 92px); text-align: center; }
.cover-art { width: min(64vw, 280px); height: auto; margin: 0 0 18px; }
.mode-note { margin: 4px 0 14px; color: #a2988a; font: 13px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; }
.mode-badge { margin: -8px 0 10px; color: #93392b; font: 600 12px/1.4 -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; letter-spacing: .12em; }
.mode-back { margin-top: 18px; }
.mode-back button { appearance: none; border: 0; background: none; color: #a2988a; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.gate-page { padding-top: 4px; }
.gate-kicker { margin: 0 0 6px; color: #93392b; font: 600 13px/1.4 -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; letter-spacing: .12em; }
.gate-title { margin: 0 0 4px; color: #2f2a26; font-size: 26px; font-weight: 500; }
.gate-sub { margin: 0 0 14px; color: #8a8378; font-size: 13px; }
.gate-instruction { margin: 0 0 14px; padding: 10px 12px; border-left: 2px solid #b3906d; background: rgba(179, 144, 109, .07); }
.gate-actions { margin: 0 0 14px; }
.gate-ask { margin: 10px 0 0; }
.gate-ask button { appearance: none; border: 0; background: none; color: #a2988a; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.gate-confirm { margin: 10px 0 0; padding: 12px; border: 1px solid #e3dbcf; border-radius: 4px; background: rgba(255,255,255,.6); }
.gate-confirm p { margin: 0 0 8px; color: #4d453d; font-size: 14px; }
.gate-note { margin: 16px 0 0; color: #a2988a; font-size: 13px; }
.loop-media { margin: 0 0 24px; }
.loop-media img { display: block; width: 100%; height: auto; border-radius: 3px; filter: sepia(.14) saturate(.9); }
.loop-media figcaption { margin-top: 6px; color: #8a8378; font: 12px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; letter-spacing: .02em; }
.loop-media.media-missing { display: none; }
.loop-media-debug { margin-top: 3px; color: #b0a698; font: 11px/1.5 -apple-system, BlinkMacSystemFont, sans-serif; }
.end-note { margin: -8px 0 18px; color: #8a8378; font-size: 14px; }


/* ═══════════════ v0.3.1 INTEGRATION FIX ═══════════════ */

/* 封面：Cover A「信与山」（Founder 确认资产），全幅 + 底部开始钮 */
.night-cover.cover-photo { padding: 0 0 18px; }
.cover-img { display: block; width: 100%; height: auto; border-radius: 2px; }

/* Bottom nav：纯文本；兔爷新内容 = 极轻暗红 dot（opacity pulse，无位移动画） */
.nv-tb { letter-spacing: .04em; }
.nv-dot {
  display: inline-block; width: 6px; height: 6px; margin-left: 5px;
  border-radius: 50%; background: #93392b; vertical-align: 2px;
  animation: nvDotPulse 2.4s ease-in-out infinite;
}
@keyframes nvDotPulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .nv-dot { animation: none; opacity: .8; } }

/* 回看模式顶栏 */
.revisit-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 0 18px; padding: 8px 12px;
  border-left: 3px solid #93392b; background: rgba(147, 57, 43, .05);
}
.revisit-label { color: #93392b; font: 600 14px/1.5 -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif; letter-spacing: .04em; }

/* 序列 block（media/cityPrompt/knowledge 并入正文流后的间距） */
.loop-inter { margin: 6px 0 26px; }
.loop-inter .loop-media { margin-bottom: 0; }

/* 地图可点击行（VISITED 回看） */
.nv-map-row.nv-map-clickable { cursor: pointer; }
.nv-map-row.nv-map-clickable:hover .nv-name, .nv-map-row.nv-map-clickable:focus .nv-name { color: #93392b; }

/* Gate：距离与解锁说明 */
.gate-dist { margin: 10px 0 0; color: #6b6257; font-size: 14px; line-height: 1.8; }

/* Between：现场指引行 */
.loop-bt-inst { color: #8a8378; font-size: 13px; }

/* GPS 模拟器（仅 Debug） */
.gps-sim { margin-top: 16px; padding-top: 12px; border-top: 1px dashed #cfc5b6; }
.gps-sim select {
  min-height: 34px; padding: 4px 8px; border: 1px solid #cfc5b6; border-radius: 3px;
  background: transparent; color: #4d453d; font: 13px/1.4 -apple-system, BlinkMacSystemFont, sans-serif;
}
.gps-sim-badge { margin: 0 0 8px; color: #93392b; font: 12px/1.5 -apple-system, BlinkMacSystemFont, sans-serif; }

/* 层级靠字号/灰度，不靠全局 bold：微调标题字重 */
.gate-title { font-weight: 500; }

/* ═══════════════ v0.3.1u：插块（interstitial）统一间距 ═══════════════
   规则：mediaBeat / cityPrompt / knowledgeTeaser / action 作为 block 时，
   一律只使用 --nv-sp-beatBoundary，禁止各自写 margin（消除站点间间距差）。 */
.night-block[data-block-type="mediaBeat"],
.night-block[data-block-type="cityPrompt"],
.night-block[data-block-type="knowledgeTeaser"],
.night-block[data-block-type="storyParagraph"],
.night-block[data-block-type="dialogue"],
.night-block[data-block-type="meta"],
.night-block[data-block-type="action"] { margin: 0 0 var(--nv-sp-beatBoundary); }

/* 插块内部：外层容器不再叠加 margin，避免 30+26 双计 */
.night-block[data-block-type="mediaBeat"] .loop-media,
.night-block[data-block-type="cityPrompt"] .loop-prompt,
.night-block[data-block-type="knowledgeTeaser"] .loop-knowledge,
.night-block[data-block-type="action"] .loop-actions { margin-bottom: 0; }
.night-block[data-block-type="mediaBeat"] .loop-media img { margin-bottom: 0; }
.night-stream { margin: 0; }

/* 回看 / 到站条等 meta 区块也统一（不再各自 22px / 26px） */
.loop-arrival { margin: 0 0 var(--nv-sp-beatBoundary); }

/* ═══════════════ v0.3.1u PROFILE 分流（内测口令 HOME / GPS / FOUNDER）═══════════════ */
/* 顶部档位标识：很轻的一行，不抢叙事；测试者任何时候都知道在测哪一版 */
.nv-profile-badge {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 10px; padding: 5px 0 0;
  color: #a2988a;
  font: 12px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: .06em;
}
.nv-profile-badge .nv-pb-label { color: #93392b; font-weight: 600; }
.nv-profile-badge .nv-pb-meta { color: #b3a795; letter-spacing: .04em; }
.nv-profile-badge .nv-pb-switch {
  appearance: none; border: 0; background: none; padding: 0;
  color: #b3a795; font-size: 12px; text-decoration: underline; text-underline-offset: 3px;
  margin-left: auto;
}

/* 测试口令页 */
.codegate { padding-top: 6px; }
.codegate-row { margin: 6px 0 14px; }
.codegate-row input {
  width: 100%; min-height: 48px; padding: 12px 14px;
  border: 1px solid #cfc5b6; border-radius: 4px;
  background: #fffaf2; color: #2f2a26;
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  /* v0.3.1y-hotfix：不再强制大写显示。旧口令是大写串（JS-HOME-K7M2）时加的
     text-transform: uppercase 只改显示、不改 value；换成小写口令后会造成
     「打小写、屏幕显示大写」的误解。现在原样显示，不做任何大小写变换。 */
  letter-spacing: .04em; text-transform: none;
}
.codegate-row input::placeholder { color: #c0b4a4; letter-spacing: .04em; text-transform: none; }
.codegate-err { margin: 10px 0 0; color: #93392b; font-size: 14px; line-height: 1.6; }
.codegate-note { margin: 18px 0 0; color: #a2988a; font-size: 13px; line-height: 1.7; }
.cover-code-link { margin: 14px 0 0; text-align: center; }
.cover-code-link button {
  appearance: none; border: 0; background: none;
  color: #b3a795; font-size: 13px;
  text-decoration: underline; text-underline-offset: 3px;
}

/* ═══════════════ v0.3.1x 结算页 / 肄业证书 ═══════════════
   层级靠字号·字体·灰度，不靠全局 bold；间距只用既有 token。 */

/* ── 完整结算页 ── */
.settle { padding: 8px 0 40px; }
.settle-kicker { margin: 0 0 4px; color: #93392b; font-size: 13px; letter-spacing: .16em; }
.settle-brand { margin: 0 0 10px; color: #8a8378; font-size: 12px; letter-spacing: .18em; }
.settle-title { margin: 0 0 8px; font-family: var(--nv-t-story-family); font-size: clamp(28px, 9vw, 40px); font-weight: 500; letter-spacing: .08em; line-height: 1.2; }
.settle-date { margin: 0 0 22px; color: #8a8378; font-size: 13px; letter-spacing: .06em; }
.settle-stamps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 0 26px; }
.settle-stamp { padding: 12px 12px 10px; border: 1px solid #e2d9c9; border-radius: 4px; background: rgba(255, 252, 246, .7); text-align: center; }
.settle-stamp .num { font-family: var(--nv-t-story-family); font-size: 20px; color: #2f2a26; line-height: 1.3; }
.settle-stamp .num.num-sm { font-size: 15px; }
.settle-stamp .label { margin-top: 4px; color: #8a8378; font-size: 12px; letter-spacing: .06em; }
.settle-section { margin: 0 0 22px; }
.settle-head { margin: 0 0 10px; color: #6b6257; font-size: 13px; letter-spacing: .12em; }
.settle-route { margin: 0; padding: 0; list-style: none; }
.settle-item { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; border-bottom: 1px solid #ece4d6; }
.settle-item.is-done .settle-name { color: #2f2a26; }
.settle-name { flex: 0 0 auto; font-family: var(--nv-t-story-family); font-size: 16px; color: #a2988a; }
.settle-meta { flex: 1 1 auto; color: #a2988a; font-size: 12px; letter-spacing: .02em; }
.settle-mark { flex: 0 0 auto; color: #b3a795; font-size: 12px; letter-spacing: .08em; }
.settle-item.is-done .settle-mark { color: #93392b; }
.settle-longest { margin: 0; font-family: var(--nv-t-story-family); font-size: 16px; color: #3a332c; }
.settle-action-line { margin: 0 0 6px; color: #5a5248; font-size: 14px; line-height: 1.7; }
.settle-actions-empty { margin: 10px 0 0; color: #b3a795; font-size: 12px; letter-spacing: .04em; }
.settle-trace-line { margin: 0 0 6px; font-family: var(--nv-t-story-family); font-size: 15px; color: #3a332c; line-height: 1.8; }
.settle-letter { margin: 26px 0 0; padding: 18px 16px; border-left: 3px solid #93392b; background: rgba(147, 57, 43, .04); }
.settle-letter p { margin: 0 0 6px; font-family: var(--nv-t-story-family); font-size: 16px; color: #2f2a26; line-height: 1.9; }
.settle-letter .settle-gap { height: 8px; margin: 0; }
.settle-sign { margin: 14px 0 0 !important; color: #6b6257 !important; font-size: 14px !important; letter-spacing: .06em; }
.settle-footer { margin: 24px 0 0; color: #a2988a; font-size: 12px; letter-spacing: .04em; line-height: 1.7; }

/* ── 肄业证书 ── */
.cert { display: flex; flex-direction: column; justify-content: center; min-height: calc(100vh - 92px); padding: 20px 0 40px; }
.cert-title { margin: 0 0 6px; font-family: var(--nv-t-story-family); font-size: 22px; color: #2f2a26; letter-spacing: .08em; }
.cert-sub { margin: 0 0 20px; color: #93392b; font-size: 12px; letter-spacing: .2em; }
.cert-stat { margin: 0 0 18px; }
.cert-stat p { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; font-size: 14px; line-height: 1.8; color: #5a5248; }
.cert-stat span { flex: 0 0 auto; color: #8a8378; font-size: 13px; letter-spacing: .06em; }
.cert-stat em { font-style: normal; font-family: var(--nv-t-story-family); font-size: 16px; color: #2f2a26; }
.cert-divider { margin: 20px 0; border: 0; height: 1px; background: linear-gradient(90deg, transparent, #cfc5b6, transparent); }
.cert-tuye { margin: 0 0 24px; }
.cert-tuye p { margin: 0 0 4px; font-family: var(--nv-t-story-family); font-size: 17px; color: #2f2a26; line-height: 2; }

/* ── 目录里的过期入口（可再查、不硬锁）── */
.nv-map-expired { margin: 12px 0 0; color: #93392b; font-size: 13px; letter-spacing: .04em; }
.nv-map-expired button { appearance: none; border: 0; background: none; padding: 0 0 0 4px; color: #93392b; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }


/* ── v0.3.1y 口令页：上次进入区块（必须显式点「继续进入」，不静默默认）── */
.codegate-last {
  margin: 0 0 20px; padding: 12px 14px;
  border-left: 3px solid #93392b; background: rgba(147, 57, 43, .04);
}
.codegate-last p { margin: 0; color: #6b6257; font-size: 13px; line-height: 1.8; }
.codegate-last em { font-style: normal; color: #2f2a26; }
.codegate-resume {
  appearance: none; margin-top: 10px; padding: 8px 14px;
  border: 1px solid #cfc5b6; border-radius: 4px; background: transparent;
  color: #6b6257; font-size: 13px; letter-spacing: .04em;
}

/* ── v0.3.1y-hotfix：Between 页定位指引（App 内嵌浏览器拿不到定位时的自助说明）── */
.loop-bt-geo-tip { margin: 8px 0 0; color: #8a8378; font-size: 12px; line-height: 1.7; }

/* ── v0.3.1y 结算图遮罩（长按保存 / 下载）── */
.card-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(30, 26, 22, .82); display: flex; align-items: center; justify-content: center; padding: 18px; }
.card-panel { display: flex; flex-direction: column; align-items: center; gap: 12px; max-height: 100%; }
.card-img { display: block; max-width: 100%; max-height: 72vh; border: 1px solid rgba(255, 250, 240, .25); border-radius: 4px; }
.card-tip { margin: 0; color: #cfc5b6; font-size: 13px; text-align: center; line-height: 1.7; }
.card-dl { color: #e8ddc9; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.card-close { appearance: none; margin-top: 2px; padding: 10px 26px; border: 1px solid rgba(255, 250, 240, .35); border-radius: 4px; background: transparent; color: #e8ddc9; font-size: 14px; letter-spacing: .08em; }

/* ── v0.3.1z 分享海报遮罩（4:5 / 9:16，保存/分享）── */
.poster-tabs { display: flex; gap: 8px; }
.poster-tab { appearance: none; padding: 8px 16px; border: 1px solid rgba(255, 250, 240, .3); border-radius: 4px; background: transparent; color: #cfc5b6; font-size: 13px; }
.poster-tab.on { border-color: #93392b; color: #e8ddc9; }
.card-save { appearance: none; padding: 12px 34px; border: 1px solid #93392b; border-radius: 4px; background: #93392b; color: #fbf6ec; font-size: 15px; letter-spacing: .1em; }

/* 首次操作说明在成功操作前持续可读，不套用旧弱提示淡出。 */
.reading-help { color: #70665a; font-size: 14px; line-height: 1.7; letter-spacing: 0; animation: none; opacity: 1; margin-top: 12px; }
