/* ============ 成语复兴 · 探秘之旅 —— 手机端国潮样式 ============ */
:root {
  --ink: #12161d;          /* 墨色底 */
  --ink2: #1b212b;         /* 卡片底 */
  --line: #2c3442;
  --paper: #f2e8d5;        /* 宣纸色文字 */
  --paper-dim: #9aa3b2;
  --cinnabar: #cf4a36;     /* 朱砂 */
  --cinnabar-deep: #a83a28;
  --gold: #d9a441;         /* 鎏金 */
  --gold-soft: rgba(217, 164, 65, .16);
  --serif: "STZhongsong", "Songti SC", "SimSun", "Noto Serif SC", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }
body {
  background: #0a0d12;
  font-family: var(--sans);
  color: var(--paper);
}

#app {
  position: relative;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: radial-gradient(120% 60% at 50% 0%, #1a2230 0%, var(--ink) 55%);
  overflow-x: hidden;
}

/* ---------- 屏幕切换 ---------- */
.screen { display: none; min-height: 100vh; animation: fadeIn .35s ease; }
.screen.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 首页 / 关卡头部 ---------- */
.hero, .level-hero { position: relative; height: 46vh; min-height: 300px; max-height: 420px; }
/* 首页封面：整张 AI 封面图完整显示（不裁剪），高度随图片比例自适应 */
#screen-home .hero { height: auto; min-height: 0; max-height: none; aspect-ratio: 3 / 4; }
#home-cover { position: relative; height: auto; object-fit: contain; }
#screen-home .home-body { padding-top: 20px; }
.hero-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  background: linear-gradient(160deg, #232c3c, #141a24);
}
.hero-mask {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,13,18,.25) 0%, rgba(10,13,18,0) 40%, rgba(18,22,29,.55) 78%, var(--ink) 100%);
}
.hero-text { position: absolute; left: 22px; right: 22px; bottom: 18px; }
.hero-city {
  font-size: 12px; letter-spacing: 4px; color: var(--gold);
  text-transform: uppercase; margin-bottom: 6px;
}
.hero-title {
  font-family: var(--serif); font-size: 27px; letter-spacing: 4px;
  text-shadow: 0 2px 12px rgba(0,0,0,.55);
}
.hero-slogan { margin-top: 6px; font-size: 13px; color: var(--paper-dim); letter-spacing: 1px; }

.level-seal, .seal-stamp {
  font-family: var(--serif);
  background: linear-gradient(145deg, var(--cinnabar), var(--cinnabar-deep));
  color: #fff; text-align: center;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(168,58,40,.45), inset 0 0 0 2px rgba(255,255,255,.28);
}
.level-seal {
  position: absolute; top: 18px; right: 18px;
  width: 56px; height: 56px; font-size: 30px;
  display: flex; align-items: center; justify-content: center;
}
.level-seal.locked { filter: grayscale(1) brightness(.6); }

/* ---------- 主体 ---------- */
.home-body, .level-body, .puzzle-body, .handbook-body { padding: 6px 18px 20px; }
.tab-spacer { height: 84px; }

.card {
  background: var(--ink2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
}
.card-tag {
  display: inline-block;
  font-size: 11px; letter-spacing: 3px;
  color: var(--gold);
  border: 1px solid var(--gold-soft);
  background: var(--gold-soft);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 10px;
}
.story-card .intro-text, #level-clue p {
  font-size: 14px; line-height: 1.9; color: var(--paper);
}
#level-clue p + p { margin-top: 8px; }
#level-clue p:last-child { color: var(--gold); }

.knowledge-text { font-size: 13px; line-height: 1.9; color: var(--paper-dim); text-align: justify; }
.chengyu-line {
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line);
  font-family: var(--serif); font-size: 15px; color: var(--gold); letter-spacing: 1px;
}

/* ---------- 按钮 ---------- */
.btn-primary {
  display: block; width: 100%;
  background: linear-gradient(145deg, var(--cinnabar), var(--cinnabar-deep));
  color: #fff; border: none; border-radius: 12px;
  font-size: 16px; letter-spacing: 4px; font-family: var(--serif);
  padding: 14px 0; cursor: pointer;
  box-shadow: 0 6px 18px rgba(168,58,40,.35);
  transition: transform .15s ease;
}
.btn-primary:active { transform: scale(.97); }
.btn-back {
  position: absolute; top: 16px; left: 14px; z-index: 5;
  background: rgba(10,13,18,.55); color: var(--paper);
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; padding: 7px 14px; cursor: pointer;
}
.btn-back.inline { position: static; margin-bottom: 10px; }
.mode-note { margin-top: 12px; text-align: center; font-size: 11px; color: var(--paper-dim); letter-spacing: 1px; }

/* ---------- 页头 ---------- */
.page-head { padding: 26px 18px 6px; position: relative; }
.page-head h2 {
  font-family: var(--serif); font-size: 26px; letter-spacing: 4px;
  display: inline-block;
}
.page-head h2::after {
  content: ""; display: block; width: 44px; height: 3px;
  background: var(--cinnabar); border-radius: 2px; margin-top: 8px;
}
.page-sub { margin-top: 10px; font-size: 12px; color: var(--paper-dim); letter-spacing: 1px; }
.progress-bar {
  margin-top: 14px; height: 6px; border-radius: 3px;
  background: var(--line); overflow: hidden;
}
.progress-bar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--cinnabar), var(--gold));
  border-radius: 3px; transition: width .5s ease;
}
.progress-text { margin-top: 8px; font-size: 11px; color: var(--paper-dim); }

/* ---------- 寻宝图（SVG 简化地图 + 点位 + 红线路线） ---------- */
.map-wrap {
  position: relative;
  margin: 14px 18px 8px;
  aspect-ratio: 110 / 130;
  border-radius: 16px;
  border: 1px solid var(--line);
  background:
    radial-gradient(90% 55% at 50% 18%, rgba(217,164,65,.10), transparent 72%),
    linear-gradient(165deg, #202a3a 0%, #171e29 60%, #131923 100%);
  box-shadow: inset 0 0 40px rgba(0,0,0,.35);
  overflow: hidden;
}
#map-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-boundary {
  fill: rgba(217,164,65,.07);
  stroke: rgba(217,164,65,.55);
  stroke-width: .8;
  stroke-dasharray: 3 2;
}
.map-river {
  fill: none;
  stroke: rgba(96,146,196,.55);
  stroke-width: 1.5;
  stroke-linecap: round;
}
/* 底图要素：建成区 / 公园绿地 / 干渠 / 道路 / 山形 / 注记 */
.map-urban { fill: rgba(150,160,185,.12); }
.map-park { fill: rgba(120,190,130,.15); }
.map-canal {
  fill: none;
  stroke: rgba(110,190,210,.5);
  stroke-width: .9;
  stroke-dasharray: 3 1.6;
}
.map-road {
  fill: none;
  stroke: rgba(230,220,200,.28);
  stroke-width: 1.1;
  stroke-linecap: round;
}
.map-road.major { stroke: rgba(230,220,200,.4); stroke-width: 1.4; }
.map-peak {
  fill: none;
  stroke: rgba(217,164,65,.75);
  stroke-width: .7;
  stroke-linejoin: round;
}
.map-label {
  fill: rgba(242,232,213,.5);
  font-size: 3.4px;
  letter-spacing: .4px;
  font-family: var(--sans);
}
.map-label.tiny { font-size: 2.7px; }
.map-label.dim { fill: rgba(242,232,213,.38); }
.map-label.road { fill: rgba(230,220,200,.45); }
.map-label.water { fill: rgba(120,180,210,.65); }
.map-label.gold { fill: rgba(217,164,65,.8); }
/* 路线段：灰虚线=未点亮，朱红=已走过 */
.seg { fill: none; stroke-width: 1.1; }
.seg.gray { stroke: rgba(154,163,178,.42); stroke-dasharray: 2.4 2; }
.seg.red {
  stroke: var(--cinnabar); stroke-width: 1.4;
  filter: drop-shadow(0 0 1.6px rgba(207,74,54,.85));
}
.seg.red.fresh {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: dashDraw 1.5s ease-out .15s forwards;
}
@keyframes dashDraw { to { stroke-dashoffset: 0; } }

/* 点位（HTML 覆盖层，按 viewBox 百分比定位） */
#map-points { position: absolute; inset: 0; }
.map-point {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer; z-index: 2;
}
.map-point:active { transform: translate(-50%, -50%) scale(.92); }
.pt-dot {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink2); border: 1.5px dashed var(--gold);
  color: var(--gold); font-family: var(--serif); font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.pt-name {
  margin-top: 4px;
  font-size: 11px; letter-spacing: 1px; white-space: nowrap;
  color: rgba(242,232,213,.85);
  text-shadow: 0 1px 4px rgba(0,0,0,.8);
}
.map-point.done .pt-name { color: rgba(217,164,65,.95); }
.pt-seal {
  width: 36px; height: 36px; border-radius: 9px;
  background: linear-gradient(145deg, var(--cinnabar), var(--cinnabar-deep));
  color: #fff; font-family: var(--serif); font-size: 19px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.3), 0 3px 10px rgba(168,58,40,.5);
}
/* 印章落下动画（刚完成的一关） */
.map-point.fresh .pt-seal { animation: stampIn .65s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes stampIn {
  0% { transform: scale(2.6) rotate(-20deg); opacity: 0; }
  60% { transform: scale(.9) rotate(4deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}
/* 下一站：脉冲光环 */
.map-point.next::before {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 46px; height: 46px; margin: -23px 0 0 -23px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  animation: pulse 1.8s ease-out infinite;
  pointer-events: none;
}
@keyframes pulse {
  0% { transform: scale(.55); opacity: .9; }
  100% { transform: scale(1.5); opacity: 0; }
}
/* 下一站指引气泡（默认朝上，靠上的点位加 .bubble-b 朝下） */
.pt-bubble {
  position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--gold); color: #1b130a;
  font-size: 11px; letter-spacing: 1px; font-weight: 600;
  border-radius: 999px; padding: 4px 10px;
  animation: fadeIn .5s ease;
  pointer-events: none;
}
.pt-bubble::after {
  content: ""; position: absolute; top: 100%; left: 50%; margin-left: -4px;
  border: 4px solid transparent; border-top-color: var(--gold);
}
.map-point.bubble-b .pt-bubble {
  bottom: auto; top: calc(100% + 6px);
}
.map-point.bubble-b .pt-bubble::after {
  top: auto; bottom: 100%;
  border-top-color: transparent; border-bottom-color: var(--gold);
}

.map-compass {
  position: absolute; top: 10px; right: 12px;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--gold-soft); background: rgba(20,25,34,.7);
  color: var(--gold); font-size: 12px; font-family: var(--serif);
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
.map-caption {
  text-align: center; font-size: 10.5px; color: var(--paper-dim); letter-spacing: 1px;
  margin: 2px 0 4px;
}
.map-replay {
  margin: 6px 0 0; text-align: center;
  font-size: 11.5px; color: var(--gold); text-decoration: underline;
  cursor: pointer; opacity: .85;
}

/* ---------- 谜题 ---------- */
.puzzle-hint {
  font-size: 12px; color: var(--paper-dim); margin-bottom: 14px; letter-spacing: 1px;
}
.puzzle-question { font-size: 15px; line-height: 1.9; margin-bottom: 16px; }
.puzzle-sentence {
  font-family: var(--serif); font-size: 20px; letter-spacing: 2px;
  line-height: 2; margin-bottom: 18px; padding: 14px;
  background: var(--gold-soft); border-radius: 10px;
}
.puzzle-sentence .blank {
  display: inline-block; min-width: 64px; text-align: center;
  border-bottom: 2px solid var(--gold); color: var(--gold);
  margin: 0 2px;
}
.option-list { display: grid; gap: 10px; }
.option-btn {
  text-align: left; font-size: 14px; line-height: 1.7;
  background: var(--ink2); color: var(--paper);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 15px; cursor: pointer; transition: border-color .2s;
}
.option-btn:active { border-color: var(--gold); }
.option-btn.wrong { border-color: var(--cinnabar); color: var(--cinnabar); animation: shake .4s; }
.option-btn.right { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
@keyframes shake { 0%,100%{transform:none} 25%{transform:translateX(-6px)} 75%{transform:translateX(6px)} }

.tile-zone { margin-bottom: 16px; }
.tile-slots, .tile-pool { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.tile-slots { min-height: 66px; margin-bottom: 18px; }
.tile {
  width: 58px; height: 58px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 26px; cursor: pointer;
  transition: transform .15s ease;
}
.tile-slots .tile {
  background: var(--gold-soft); color: var(--gold);
  border: 1.5px dashed var(--gold);
}
.tile-slots .tile.filled { border-style: solid; background: var(--gold); color: #1b130a; }
.tile-pool .tile {
  background: var(--ink2); color: var(--paper); border: 1px solid var(--line);
}
.tile:active { transform: scale(.92); }
.tile-pool .tile.used { opacity: .18; pointer-events: none; }

.puzzle-success { text-align: center; padding: 10px 18px 30px; animation: fadeIn .4s ease; }
.success-check {
  width: 54px; height: 54px; margin: 4px auto 12px; border-radius: 50%;
  background: var(--gold); color: #1b130a; font-size: 28px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.puzzle-success h3 { font-family: var(--serif); letter-spacing: 3px; font-size: 18px; }
.success-chengyu {
  margin: 16px auto 8px; font-family: var(--serif);
  font-size: 34px; letter-spacing: 10px; color: var(--gold);
}
.success-source { font-size: 12px; color: var(--paper-dim); margin-bottom: 20px; }

/* ---------- 短片 ---------- */
.screen-film { position: relative; background: #000; overflow: hidden; }
.film-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  background: linear-gradient(160deg, #1a2230, #0c0f15);
  animation: kenburns 18s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.14) translate(-2%, -2%); }
}
.film-grain {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,0) 35%, rgba(0,0,0,.72) 82%);
}
.film-caption-box {
  position: absolute; left: 24px; right: 24px; bottom: 110px;
  text-align: center;
}
.film-caption {
  font-family: var(--serif); font-size: 18px; line-height: 2; letter-spacing: 2px;
  text-shadow: 0 2px 10px rgba(0,0,0,.85);
  animation: capIn .8s ease;
}
@keyframes capIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.film-dots {
  position: absolute; bottom: 64px; left: 0; right: 0;
  display: flex; gap: 7px; justify-content: center;
}
.film-dots i {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,.3); transition: background .3s;
}
.film-dots i.on { background: var(--gold); }
.btn-skip {
  position: absolute; top: 18px; right: 16px; z-index: 5;
  background: rgba(0,0,0,.4); color: var(--paper);
  border: 1px solid rgba(255,255,255,.25); border-radius: 999px;
  font-size: 12px; padding: 7px 14px; cursor: pointer;
}
.film-end {
  position: absolute; inset: 0; z-index: 6;
  background: rgba(8,10,14,.82); backdrop-filter: blur(4px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 0 30px; text-align: center;
}
.film-end h3 { font-family: var(--serif); font-size: 22px; letter-spacing: 4px; margin-top: 16px; }
.film-end-sub { font-size: 13px; color: var(--paper-dim); margin-bottom: 22px; line-height: 1.8; }
.seal-stamp {
  width: 92px; height: 92px; font-size: 40px;
  display: flex; align-items: center; justify-content: center;
  animation: stamp .55s cubic-bezier(.2, 1.6, .4, 1);
}
@keyframes stamp {
  0% { transform: scale(2.4) rotate(-18deg); opacity: 0; }
  60% { transform: scale(.92) rotate(3deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}

/* ---------- 图鉴 ---------- */
.codex-grid { padding: 14px 18px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.codex-card {
  border-radius: 14px; border: 1px solid var(--line);
  background: var(--ink2); padding: 16px 12px; text-align: center;
}
.codex-card .cy {
  font-family: var(--serif); font-size: 21px; letter-spacing: 3px; color: var(--gold);
}
.codex-card .src { margin-top: 8px; font-size: 10.5px; color: var(--paper-dim); }
.codex-card .site { margin-top: 4px; font-size: 10.5px; color: var(--paper-dim); opacity: .8; }
.codex-card.locked .cy { color: #3d4654; text-shadow: none; letter-spacing: 6px; }
.codex-card.locked { background: transparent; border-style: dashed; }
.codex-card.locked .src, .codex-card.locked .site { visibility: hidden; }
.codex-card.locked::before {
  content: "待解锁"; display: block; margin-top: 2px;
  font-size: 11px; color: var(--paper-dim); letter-spacing: 2px;
}

/* ---------- 手册 ---------- */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--paper-dim); margin-bottom: 6px; letter-spacing: 1px; }
.field input {
  width: 100%; background: var(--ink); color: var(--paper);
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; padding: 11px 12px; outline: none;
}
.field input:focus { border-color: var(--gold); }
.stamp-wall { display: flex; flex-wrap: wrap; gap: 12px; }
.stamp-item {
  width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 24px;
}
.stamp-item.got {
  background: linear-gradient(145deg, var(--cinnabar), var(--cinnabar-deep));
  color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.28), 0 3px 10px rgba(168,58,40,.4);
}
.stamp-item.miss { border: 1.5px dashed var(--line); color: #3d4654; }
.stamp-count { margin-top: 12px; font-size: 12px; color: var(--paper-dim); text-align: center; }
.reset-link { margin-top: 18px; text-align: center; font-size: 11px; color: #6b7382; text-decoration: underline; cursor: pointer; }

/* ---------- 海报 ---------- */
.poster-wrap {
  margin: 12px 18px; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line);
}
#poster-canvas { display: block; width: 100%; height: auto; }
#screen-poster .btn-primary { width: calc(100% - 36px); margin: 0 18px; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: 20;
  display: flex; background: rgba(16,20,27,.94); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar { display: flex; }
#tabbar { display: flex; }
.tabbar[style*="none"] { display: none !important; }
.tab {
  flex: 1; background: none; border: none; cursor: pointer;
  color: var(--paper-dim); font-size: 10.5px; letter-spacing: 1px;
  padding: 9px 0 10px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-family: var(--sans);
}
.tab-ico {
  font-family: var(--serif); font-size: 16px;
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold-soft); color: var(--gold);
}
.tab.active { color: var(--paper); }
.tab.active .tab-ico { background: var(--cinnabar); color: #fff; box-shadow: 0 3px 10px rgba(168,58,40,.4); }

/* ---------- 素材占位（图片缺失时自动降级） ---------- */
.img-fallback {
  position: absolute; inset: 0; z-index: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px;
  background:
    radial-gradient(80% 50% at 50% 30%, rgba(217,164,65,.14), transparent 70%),
    linear-gradient(155deg, #24304a 0%, #1a2230 45%, #141a24 100%);
}
.img-fallback::before {
  content: "";
  position: absolute; inset: 14px;
  border: 1px solid rgba(217,164,65,.25); border-radius: 8px;
}
.img-fallback .fb-name {
  font-family: var(--serif); font-size: 30px; letter-spacing: 8px;
  color: rgba(242,232,213,.85); text-shadow: 0 2px 14px rgba(0,0,0,.5);
}
.img-fallback .fb-seal {
  width: 40px; height: 40px; border-radius: 8px;
  background: linear-gradient(145deg, var(--cinnabar), var(--cinnabar-deep));
  opacity: .9;
}
.film-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; background: #000;
}

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%) translateY(20px);
  background: rgba(20,24,32,.95); border: 1px solid var(--line);
  color: var(--paper); font-size: 13px; letter-spacing: 1px;
  border-radius: 999px; padding: 10px 18px;
  opacity: 0; pointer-events: none; transition: all .3s ease; z-index: 50;
  max-width: 80%; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 开场主线对话（守藏史） ---------- */
.intro-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(8,10,14,.78); backdrop-filter: blur(3px);
  display: flex; align-items: flex-end;
  animation: fadeIn .3s ease;
}
.intro-box {
  position: relative;
  width: 100%; max-width: 480px; margin: 0 auto;
  background: linear-gradient(160deg, #232b3a, #171d28);
  border: 1px solid var(--line); border-bottom: none;
  border-radius: 18px 18px 0 0;
  padding: 46px 20px calc(30px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 30px rgba(0,0,0,.5);
}
.intro-skip {
  position: absolute; top: 12px; right: 14px;
  background: transparent; border: 1px solid var(--line);
  color: var(--paper-dim); border-radius: 999px;
  font-size: 12px; padding: 6px 12px; cursor: pointer;
}
.intro-npc { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.intro-avatar {
  width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(145deg, var(--cinnabar), var(--cinnabar-deep));
  color: #fff; font-family: var(--serif); font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.28), 0 4px 12px rgba(168,58,40,.4);
}
.intro-npc-info b {
  display: block; font-family: var(--serif);
  font-size: 17px; letter-spacing: 2px; color: var(--paper);
}
.intro-npc-info span { font-size: 11px; color: var(--paper-dim); letter-spacing: 1px; }
.intro-text {
  font-size: 14.5px; line-height: 2; color: var(--paper);
  letter-spacing: .5px; min-height: 88px; text-align: justify;
}
.intro-next {
  margin-top: 14px; text-align: right;
  font-size: 11px; color: var(--gold); letter-spacing: 1px;
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* ---------- 通用确认浮层 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(8,10,14,.7); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  padding: 0 38px;
  animation: fadeIn .2s ease;
}
.modal-box {
  width: 100%; max-width: 320px;
  background: linear-gradient(160deg, #232b3a, #171d28);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 20px 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
.modal-msg {
  font-size: 15px; line-height: 1.7; color: var(--paper);
  text-align: center; margin-bottom: 20px;
}
.modal-btns { display: flex; gap: 12px; }
.modal-btn {
  flex: 1; border: none; border-radius: 10px;
  font-size: 15px; letter-spacing: 2px; padding: 11px 0; cursor: pointer;
  font-family: var(--sans);
}
.modal-btn.cancel { background: var(--ink); color: var(--paper-dim); border: 1px solid var(--line); }
.modal-btn.ok {
  background: linear-gradient(145deg, var(--cinnabar), var(--cinnabar-deep));
  color: #fff; box-shadow: 0 4px 12px rgba(168,58,40,.35);
}
.modal-btn:active { transform: scale(.97); }
