/* ============================================================
   ODYSSEY 奥德赛 · 样式
   ============================================================ */
:root {
  --bg: #070b18;
  --bg2: #0d1428;
  --panel: rgba(17, 26, 51, .78);
  --panel2: rgba(24, 34, 64, .6);
  --ink: #ece3cc;
  --ink-soft: #b9b2a0;
  --muted: #8b92a7;
  --gold: #d4af37;
  --gold2: #f0d98c;
  --wine: #8c2f39;
  --sea: #2e7d8c;
  --line: rgba(212, 175, 55, .28);
  --card-bg: rgba(20, 29, 56, .72);
  --shadow: 0 24px 60px rgba(0, 0, 0, .5);
  --glow: 0 0 24px rgba(212, 175, 55, .25);
  --serif: "Palatino", "Palatino Linotype", Georgia, "Songti SC", "STSong", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --meander: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='14'><path d='M0 10 h18 v-8 h-12' fill='none' stroke='%23d4af37' stroke-width='2' opacity='.8'/></svg>");
}
body.papyrus {
  --bg: #efe6cf;
  --bg2: #e6d9ba;
  --panel: rgba(255, 250, 234, .86);
  --panel2: rgba(255, 250, 234, .6);
  --ink: #33291a;
  --ink-soft: #6b5c42;
  --muted: #867a60;
  --gold: #a07d14;
  --gold2: #8a6d1f;
  --line: rgba(140, 105, 20, .35);
  --card-bg: rgba(255, 251, 238, .8);
  --shadow: 0 24px 60px rgba(90, 70, 30, .28);
  --glow: 0 0 20px rgba(160, 125, 20, .18);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.75;
  overflow-x: hidden;
  transition: background .6s ease, color .6s ease;
}
::selection { background: rgba(212, 175, 55, .35); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--gold), #6d5714); border-radius: 8px; }
img { max-width: 100%; display: block; }
a { color: var(--gold2); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 22px; }
section { position: relative; padding: 96px 0; }
.sec-head { text-align: center; margin-bottom: 52px; }
.sec-kicker {
  display: inline-block; font-family: var(--sans);
  font-size: 12px; letter-spacing: .38em; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--line);
  padding: 6px 18px; border-radius: 999px; margin-bottom: 18px;
}
.sec-head h2 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: .06em; margin-bottom: 10px;
}
.sec-head p.sub { color: var(--muted); max-width: 640px; margin: 0 auto; }
.meander {
  width: 220px; height: 16px; margin: 26px auto 0;
  background-image: var(--meander);
  background-size: 28px 14px;
  background-repeat: repeat-x;
  opacity: .85;
}
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

.btn {
  display: inline-block; padding: 13px 30px; border-radius: 4px;
  font-family: var(--sans); font-size: 14.5px; letter-spacing: .12em;
  border: 1px solid var(--line); color: var(--ink);
  background: transparent; transition: all .25s ease; position: relative; overflow: hidden;
}
.btn.gold {
  background: linear-gradient(135deg, #d4af37, #9a7a1c);
  color: #241a05; border-color: transparent; font-weight: 700;
  box-shadow: var(--glow);
}
body.papyrus .btn.gold { background: linear-gradient(135deg, #c9a227, #a07d14); }
.btn.gold:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(212, 175, 55, .35); }
.btn.ghost:hover { background: rgba(212, 175, 55, .12); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

/* ---------------- 加载屏 ---------------- */
#loader {
  position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 22px;
  background: radial-gradient(circle at 50% 40%, #16203f, #05080f 75%);
  transition: opacity .6s ease;
}
#loader.done { opacity: 0; pointer-events: none; }
.loader-lyre {
  width: 64px; height: 64px; border-radius: 50%;
  border: 3px solid rgba(212, 175, 55, .25); border-top-color: #d4af37;
  animation: spin 1.1s linear infinite;
  position: relative;
}
.loader-lyre::after {
  content: "Ϝ"; font-size: 30px; color: var(--gold);
  position: absolute; inset: 0; display: grid; place-items: center;
  animation: spin 2.4s linear infinite reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }
#loaderText { color: var(--gold2); letter-spacing: .3em; font-size: 13px; font-family: var(--sans); }
#loaderTrack { width: 240px; height: 3px; background: rgba(212, 175, 55, .15); border-radius: 2px; overflow: hidden; }
#loaderBar { height: 100%; width: 6%; background: linear-gradient(90deg, #a07d14, #f0d98c); border-radius: 2px; transition: width .3s ease; }

/* ---------------- 导航 ---------------- */
#siteNav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  transition: background .4s ease, box-shadow .4s ease, backdrop-filter .4s ease;
}
#siteNav.scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line), 0 12px 30px rgba(0, 0, 0, .25);
}
.nav-inner {
  max-width: 1180px; margin: 0 auto; padding: 16px 22px;
  display: flex; align-items: center; gap: 18px;
}
.brand { font-size: 22px; letter-spacing: .14em; color: var(--gold); white-space: nowrap; }
.brand small { display: block; font-size: 10px; letter-spacing: .5em; color: var(--muted); font-family: var(--sans); }
.nav-links { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.nav-links a {
  padding: 8px 12px; font-family: var(--sans); font-size: 13.5px; letter-spacing: .08em;
  color: var(--ink-soft); border-radius: 4px; transition: color .2s, background .2s; position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold2); background: rgba(212, 175, 55, .1); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; color: var(--gold2); font-size: 17px; transition: all .25s;
  display: grid; place-items: center;
}
.icon-btn:hover { background: rgba(212, 175, 55, .12); transform: translateY(-1px); }
.icon-btn.muted { opacity: .45; }
#navToggle { display: none; width: 42px; height: 42px; }
#navToggle span { display: block; width: 18px; height: 2px; background: var(--gold2); margin: 4px auto; transition: .3s; }

/* ---------------- 英雄区 ---------------- */
#hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center; position: relative; overflow: hidden;
  padding: 120px 20px 80px;
}
.hero-bg, .hero-bg::after {
  position: absolute; inset: 0; background-size: cover; background-position: center 30%;
}
.hero-bg { background-image: linear-gradient(rgba(7, 11, 24, .42), rgba(7, 11, 24, .78)), url("../images/jpg/hero_odysseus.jpg"); animation: kenburns 26s ease-in-out infinite alternate; }
body.papyrus .hero-bg { background-image: linear-gradient(rgba(239, 230, 207, .3), rgba(239, 230, 207, .82)), url("../images/jpg/hero_odysseus.jpg"); }
.hero-bg::after { content: ""; inset: auto 0 0 0; height: 40%; background: linear-gradient(transparent, var(--bg)); }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.09) translateY(-1.4%); } }
.hero-inner { position: relative; z-index: 2; max-width: 900px; }
.hero-greek { font-size: 15px; letter-spacing: .55em; color: var(--gold2); opacity: .9; margin-bottom: 14px; font-family: var(--serif); }
#heroTitle {
  font-size: clamp(3.2rem, 11vw, 7.6rem); line-height: 1.05; letter-spacing: .1em;
  background: linear-gradient(180deg, #f7e7b0 10%, #d4af37 55%, #8a6d1f);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 60px rgba(212, 175, 55, .25);
}
#heroSub { margin: 22px auto 10px; font-size: clamp(1rem, 2.4vw, 1.3rem); letter-spacing: .12em; color: var(--ink); max-width: 660px; }
#heroEpithet { color: var(--gold2); font-style: italic; font-size: clamp(1rem, 2vw, 1.2rem); min-height: 1.8em; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  color: var(--muted); font-size: 12px; letter-spacing: .3em; font-family: var(--sans);
  animation: bob 2.2s ease-in-out infinite; z-index: 2;
}
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 10px); } }

/* ---------------- 引言轮播 ---------------- */
#intro { background: var(--bg2); }
.quote-stage {
  max-width: 840px; margin: 0 auto; text-align: center;
  border: 1px solid var(--line); border-radius: 12px; padding: 44px 34px;
  background: var(--panel); box-shadow: var(--shadow); position: relative;
}
.quote-mark { position: absolute; top: 8px; left: 22px; font-size: 90px; color: var(--gold); opacity: .25; font-family: Georgia, serif; line-height: 1; }
#quoteText { font-size: clamp(1.25rem, 3vw, 1.7rem); font-style: italic; min-height: 4.2em; line-height: 1.8; transition: opacity .4s; }
#quoteSrc { margin-top: 18px; color: var(--gold2); letter-spacing: .14em; font-size: 14px; }
.quote-bar { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 26px; }
.quote-bar button {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; color: var(--gold2); font-size: 16px; transition: .25s;
}
.quote-bar button:hover { background: rgba(212, 175, 55, .14); transform: translateY(-2px); }
.quote-bar .speaking { background: rgba(212, 175, 55, .25); }
#quoteDots { display: flex; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); border: none; transition: all .3s; }
.dot.on { background: var(--gold); transform: scale(1.35); box-shadow: var(--glow); }
.dot.done { background: rgba(212, 175, 55, .5); }

/* ---------------- 地图 ---------------- */
#map { background: var(--bg); }
.map-shell {
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: #0a1226; box-shadow: var(--shadow); position: relative;
}
body.papyrus .map-shell { background: #efe4c4; }
#mapSvg { width: 100%; height: auto; display: block; cursor: pointer; }
#mapSvg .stop { cursor: pointer; transition: opacity .2s; }
#mapSvg .stop circle { transition: r .2s ease, fill .2s; }
#mapSvg .stop:hover circle:first-child { fill: rgba(212, 175, 55, .95); }
#mapSvg .stop:hover .stop-label { fill: #f7e7b0; opacity: 1; }
#mapSvg .stop-label { opacity: .85; }
.route-line { animation: dashflow 5s linear infinite; }
@keyframes dashflow { to { stroke-dashoffset: -52; } }
.map-legend {
  display: flex; gap: 14px 26px; flex-wrap: wrap; justify-content: center;
  padding: 18px; font-family: var(--sans); font-size: 13px; color: var(--muted);
  background: rgba(10, 18, 38, .6); border-top: 1px solid var(--line);
}
body.papyrus .map-legend { background: rgba(239, 228, 196, .75); }
.map-legend span i {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--gold); margin-right: 8px; vertical-align: -1px;
}
.map-legend .path i { width: 26px; height: 2px; border: none; background: repeating-linear-gradient(90deg, var(--gold) 0 6px, transparent 6px 10px); border-radius: 0; }

/* ---------------- 模态 ---------------- */
.modal {
  position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center;
  background: rgba(4, 6, 14, .78); backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none; transition: opacity .3s ease; padding: 20px;
}
.modal.open { opacity: 1; pointer-events: auto; }
.modal-card {
  max-width: 900px; width: 100%; max-height: 88vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); display: grid; grid-template-columns: 380px 1fr;
  transform: translateY(16px) scale(.98); transition: transform .3s ease;
}
.modal.open .modal-card { transform: none; }
.modal-img { position: relative; min-height: 260px; }
.modal-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.modal-img .m-num {
  position: absolute; top: 14px; left: 14px; background: rgba(5, 8, 16, .72);
  border: 1px solid var(--line); color: var(--gold2); font-family: var(--sans);
  font-size: 12px; letter-spacing: .2em; padding: 5px 12px; border-radius: 999px;
}
.modal-body { padding: 30px 32px 26px; }
.modal-body h3 { font-size: 1.9rem; letter-spacing: .05em; }
.m-greek { color: var(--gold2); font-size: 14px; letter-spacing: .12em; margin: 4px 0 14px; }
.m-dir { font-family: var(--sans); font-size: 12.5px; color: var(--muted); letter-spacing: .1em; margin-bottom: 16px; }
.m-text { font-size: 1.04rem; margin-bottom: 16px; }
.m-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tag {
  font-family: var(--sans); font-size: 12px; color: var(--gold2);
  border: 1px solid var(--line); padding: 3px 12px; border-radius: 999px;
}
.m-fact { font-size: 13.5px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 13px; }
.modal-actions { display: flex; align-items: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.modal-actions .spacer { flex: 1; }
.icon-btn.small { width: 38px; height: 38px; font-size: 15px; }
.m-close { position: absolute; top: 14px; right: 14px; z-index: 5; }

/* ---------------- 人物 ---------------- */
#characters { background: var(--bg2); }
.char-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px;
  perspective: 1400px;
}
.ch-card {
  height: 410px; border-radius: 14px; cursor: pointer;
  perspective: 1000px; outline: none;
}
.ch-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d; transition: transform .75s cubic-bezier(.2, .75, .3, 1);
}
.ch-card.flipped .ch-inner { transform: rotateY(180deg); }
.ch-front, .ch-back {
  position: absolute; inset: 0; border-radius: 14px; backface-visibility: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column;
}
.ch-front { background: var(--card-bg); }
.ch-img { height: 230px; background-size: cover; background-position: center 30%; position: relative; }
.ch-img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(transparent 45%, var(--bg2));
}
.ch-glyph {
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--acc) 24%, transparent), transparent 65%),
    linear-gradient(160deg, #171f3a, #0b1122);
  color: var(--acc);
}
.ch-front h3 { padding: 14px 18px 2px; font-size: 1.35rem; letter-spacing: .06em; }
.ch-epi { padding: 0 18px; color: var(--muted); font-size: 12px; font-style: italic; }
.ch-role { margin: auto 18px 8px; font-family: var(--sans); font-size: 13px; color: var(--gold2); }
.ch-side {
  margin: 0 18px 16px; align-self: flex-start; font-family: var(--sans); font-size: 11.5px;
  color: var(--muted); border: 1px solid var(--line); padding: 2px 12px; border-radius: 999px;
}
.flip-hint {
  position: absolute; top: 12px; right: 12px; font-family: var(--sans); font-size: 10.5px;
  color: var(--ink-soft); border: 1px solid var(--line); padding: 2px 9px; border-radius: 999px;
  background: rgba(8, 12, 24, .55);
}
.ch-back {
  transform: rotateY(180deg); padding: 26px 22px;
  background:
    radial-gradient(circle at 85% 12%, color-mix(in srgb, var(--acc) 18%, transparent), transparent 55%),
    var(--card-bg);
  position: relative;
}
.ch-back h3 { font-size: 1.4rem; margin-bottom: 4px; }
.ch-speak {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--gold2); font-size: 15px;
}
.ch-speak:hover { background: rgba(212, 175, 55, .16); }
.ch-desc { font-size: 13.8px; color: var(--ink-soft); margin: 10px 0; }
.ch-quote { font-style: italic; color: var(--gold2); font-size: 14px; margin-bottom: 12px; }
.ch-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.ch-tags span {
  font-family: var(--sans); font-size: 11px; color: var(--ink-soft);
  border: 1px solid var(--line); padding: 2px 10px; border-radius: 999px;
}

/* ---------------- 游戏 ---------------- */
#games { background: var(--bg); }
.game-grid { display: grid; grid-template-columns: 1fr; gap: 34px; max-width: 980px; margin: 0 auto; }
.game-host {
  position: relative;
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: #0a1226; box-shadow: var(--shadow);
}
body.papyrus .game-host { background: #efe4c4; }
.game-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
  background: rgba(10, 18, 38, .5);
}
body.papyrus .game-top { background: rgba(239, 228, 196, .6); }
.game-top h4 { font-size: 1.15rem; letter-spacing: .05em; }
.game-top .btn.ghost { padding: 7px 16px; font-size: 13px; }
.game-canvas { display: block; width: 100%; height: auto; touch-action: none; cursor: crosshair; }
.game-tip {
  padding: 10px 20px; font-family: var(--sans); font-size: 12.5px; color: var(--muted);
  border-top: 1px solid var(--line); text-align: center; letter-spacing: .04em;
}
.game-overlay {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 5;
  background: rgba(5, 8, 16, .72); backdrop-filter: blur(4px);
}
.go-card {
  text-align: center; max-width: 440px; padding: 34px 28px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel);
  box-shadow: var(--shadow);
}
.go-card h4 { font-size: 1.5rem; margin-bottom: 10px; color: var(--gold2); }
.go-card p { color: var(--ink-soft); font-size: 14px; margin-bottom: 20px; }
.go-card b { color: var(--gold2); font-size: 1.3em; }

/* ---------------- 测验 ---------------- */
#quiz { background: var(--bg2); }
.quiz-wrap { max-width: 760px; margin: 0 auto; }
#quizCard {
  border: 1px solid var(--line); border-radius: 16px; padding: 34px 30px;
  background: var(--panel); box-shadow: var(--shadow); transition: background .4s;
}
.quiz-top { display: flex; justify-content: space-between; align-items: center; font-family: var(--sans); font-size: 13px; color: var(--muted); margin-bottom: 8px; }
#quizProg { letter-spacing: .12em; }
#quizScore { color: var(--gold2); }
#quizDots { display: flex; gap: 7px; margin-bottom: 20px; }
#quizQ { font-size: 1.35rem; line-height: 1.6; margin-bottom: 24px; }
.qopt {
  width: 100%; text-align: left; display: flex; align-items: center; gap: 14px;
  padding: 15px 18px; margin: 10px 0; border-radius: 10px;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  font-size: 1rem; transition: all .22s;
}
.qopt i {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  border: 1px solid var(--line); display: grid; place-items: center;
  font-style: normal; font-family: var(--sans); font-size: 13px; color: var(--gold2);
}
.qopt:hover:not(:disabled) { border-color: var(--gold); transform: translateX(4px); background: rgba(212, 175, 55, .07); }
.qopt.right { border-color: #4caf7d; background: rgba(76, 175, 125, .16); }
.qopt.right i { background: #4caf7d; color: #06241a; border-color: #4caf7d; }
.qopt.wrong { border-color: #c0453f; background: rgba(192, 69, 63, .16); }
.qopt.wrong i { background: #c0453f; color: #fff; border-color: #c0453f; }
#quizWhy {
  margin-top: 16px; padding: 13px 16px; border-radius: 10px;
  border-left: 3px solid var(--gold); background: rgba(212, 175, 55, .08);
  font-size: 14px; color: var(--ink-soft);
}
#quizNext { margin-top: 18px; }
#quizCard.result { text-align: center; padding: 48px 30px; }
.qr-badge {
  display: inline-block; font-family: var(--sans); font-size: 13px; letter-spacing: .2em;
  color: var(--gold2); border: 1px solid var(--gold); padding: 7px 20px; border-radius: 999px; margin-bottom: 18px;
}
.qr-rank { font-size: 1.9rem; margin: 10px 0; color: var(--gold2); }
.qr-score { font-family: var(--sans); color: var(--muted); margin-bottom: 14px; }
.qr-score b { color: var(--gold); font-size: 1.2em; }
.qr-text { max-width: 520px; margin: 0 auto 24px; color: var(--ink-soft); }

/* ---------------- 互动故事 ---------------- */
#story { background: var(--bg); }
.story-wrap { max-width: 780px; margin: 0 auto; }
#storyIntro {
  text-align: center; font-size: 1.12rem; color: var(--ink-soft);
  max-width: 640px; margin: 0 auto 28px; font-style: italic;
}
.story-actions { display: flex; justify-content: center; gap: 14px; margin-bottom: 30px; flex-wrap: wrap; }
#storyCard {
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  background: var(--panel); box-shadow: var(--shadow); position: relative;
}
#storyCard > img { width: 100%; height: 300px; object-fit: cover; }
#storyCard h4 { padding: 24px 28px 6px; font-size: 1.6rem; letter-spacing: .05em; }
#storyCard > p { padding: 0 28px 18px; color: var(--ink-soft); font-size: 1.02rem; }
.choice-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 0 28px 28px; }
.story-choice {
  text-align: left; padding: 16px; border-radius: 12px;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  font-size: 1rem; transition: all .25s; display: flex; flex-direction: column; gap: 6px;
}
.story-choice:hover:not(:disabled) { border-color: var(--gold); background: rgba(212, 175, 55, .08); transform: translateY(-2px); }
.story-choice.picked { opacity: .55; border-color: var(--gold); background: rgba(212, 175, 55, .12); }
.c-note { font-size: 12.5px; color: var(--muted); font-family: var(--sans); }
.story-end { padding: 30px 30px 36px; text-align: center; }
.story-end img { width: 100%; height: 300px; object-fit: cover; border-radius: 12px; margin-bottom: 22px; }
.story-end h4 { font-size: 1.7rem; margin-bottom: 12px; }
.story-end p { color: var(--ink-soft); max-width: 600px; margin: 0 auto 20px; }
.story-end .s-badge {
  display: inline-block; font-family: var(--sans); font-size: 13px; letter-spacing: .25em;
  border: 1px solid var(--wine); color: #d98a8f; padding: 6px 20px; border-radius: 999px;
}
body.papyrus .story-end .s-badge { color: #8c2f39; }
.story-end .s-badge.gold { border-color: var(--gold); color: var(--gold2); }
#storyProg { text-align: center; font-family: var(--sans); font-size: 13px; color: var(--muted); letter-spacing: .2em; margin-top: 16px; }

/* ---------------- 时间轴 ---------------- */
#timeline { background: var(--bg2); }
.tl-wrap { position: relative; max-width: 860px; margin: 0 auto; padding-left: 30px; }
.tl-wrap::before {
  content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(var(--gold), transparent);
}
.tl-item { position: relative; margin-bottom: 26px; }
.tl-dot {
  position: absolute; left: -27px; top: 26px; width: 13px; height: 13px;
  border-radius: 50%; background: var(--bg2); border: 3px solid var(--gold);
  box-shadow: var(--glow);
}
.tl-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px;
  background: var(--panel); transition: transform .25s, box-shadow .25s;
}
.tl-card:hover { transform: translateX(6px); box-shadow: var(--glow); }
.tl-time { font-family: var(--sans); font-size: 12px; letter-spacing: .18em; color: var(--gold2); }
.tl-card h4 { font-size: 1.2rem; margin: 4px 0 6px; }
.tl-card p { font-size: 14px; color: var(--ink-soft); }

/* ---------------- 画廊 ---------------- */
#gallery { background: var(--bg); }
.gal-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.gal-item {
  position: relative; border-radius: 14px; overflow: hidden; cursor: zoom-in;
  border: 1px solid var(--line); aspect-ratio: 4 / 3; outline: none;
}
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.gal-item:hover img { transform: scale(1.08); }
.gal-item figcaption {
  position: absolute; inset: auto 0 0 0; padding: 40px 18px 14px;
  background: linear-gradient(transparent, rgba(5, 8, 16, .88));
  opacity: 0; transition: opacity .4s; color: #f3e9d2;
}
.gal-item:hover figcaption, .gal-item:focus figcaption { opacity: 1; }
.gal-item h4 { font-size: 1.15rem; }
.gal-item p { font-size: 12.5px; color: #cfc5a6; }

#lightbox {
  position: fixed; inset: 0; z-index: 1300; background: rgba(3, 5, 12, .92);
  backdrop-filter: blur(10px); display: grid; place-items: center;
  opacity: 0; pointer-events: none; transition: opacity .3s; padding: 30px;
}
#lightbox.open { opacity: 1; pointer-events: auto; }
.lb-inner { max-width: 1000px; width: 100%; text-align: center; position: relative; }
#lbImg {
  max-height: 72vh; margin: 0 auto; border-radius: 12px;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.lb-cap { margin-top: 16px; }
.lb-cap h4 { font-size: 1.5rem; color: var(--gold2); }
.lb-cap p { color: var(--muted); margin-top: 4px; }
#lbCount { font-family: var(--sans); font-size: 12px; color: var(--muted); letter-spacing: .2em; margin-top: 8px; }
.lb-nav {
  position: absolute; top: 38%; width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(10, 16, 34, .6); color: var(--gold2); font-size: 20px;
  transition: all .25s;
}
.lb-nav:hover { background: rgba(212, 175, 55, .18); }
#lbPrev { left: -70px; } #lbNext { right: -70px; }
#lbClose { position: absolute; top: -6px; right: -6px; }

/* ---------------- 音乐播放器 ---------------- */
#player { position: fixed; right: 22px; bottom: 22px; z-index: 950; }
#playerToggle {
  width: 58px; height: 58px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #e8c75e, #a07d14 70%);
  border: 2px solid #f0d98c; color: #241a05; font-size: 22px;
  box-shadow: 0 10px 30px rgba(212, 175, 55, .4);
  transition: transform .25s;
  display: grid; place-items: center;
}
#playerToggle:hover { transform: scale(1.08); }
#playerPanel {
  position: absolute; right: 0; bottom: 76px; width: 320px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); backdrop-filter: blur(16px);
  padding: 18px; opacity: 0; pointer-events: none; transform: translateY(12px);
  transition: all .3s ease;
}
#playerPanel.open { opacity: 1; pointer-events: auto; transform: none; }
#trackTitle { font-size: 1.15rem; margin-bottom: 12px; color: var(--gold2); letter-spacing: .04em; text-align: center; min-height: 1.4em; }
#trackChips { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.track-chip {
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: transparent; color: var(--ink); transition: all .22s;
}
.track-chip em {
  font-style: normal; width: 34px; height: 34px; flex: none; border-radius: 50%;
  border: 1px solid var(--line); display: grid; place-items: center; color: var(--gold2);
}
.track-chip b { display: block; font-size: 14px; }
.track-chip small { display: block; font-size: 11.5px; color: var(--muted); }
.track-chip.on { border-color: var(--gold); background: rgba(212, 175, 55, .13); }
.track-chip.on em { background: var(--gold); color: #241a05; }
.player-ctl { display: flex; align-items: center; gap: 10px; }
#playerPlay {
  flex: 1; padding: 9px 0; border-radius: 8px; font-family: var(--sans); font-size: 13.5px;
  border: 1px solid var(--gold); background: rgba(212, 175, 55, .14); color: var(--gold2);
}
#playerPlay.playing { background: rgba(212, 175, 55, .25); }
#playerMute { width: 44px; height: 40px; flex: none; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--gold2); font-size: 15px; white-space: nowrap; }
.vol-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.vol-row input[type="range"] { flex: 1; accent-color: var(--gold); }

/* ---------------- 页脚 ---------------- */
footer { border-top: 1px solid var(--line); padding: 60px 0 40px; background: var(--bg2); text-align: center; }
.foot-brand { font-size: 26px; letter-spacing: .2em; color: var(--gold); }
.foot-quote { font-style: italic; color: var(--muted); margin: 14px auto 26px; max-width: 560px; }
.foot-links { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; margin-bottom: 22px; font-family: var(--sans); font-size: 13px; }
.foot-links a { color: var(--ink-soft); }
.foot-links a:hover { color: var(--gold2); }
footer small { color: var(--muted); font-family: var(--sans); display: block; line-height: 2; }

#toTop {
  position: fixed; left: 22px; bottom: 22px; z-index: 940; width: 48px; height: 48px;
  border-radius: 50%; border: 1px solid var(--line); background: var(--panel);
  color: var(--gold2); font-size: 18px; opacity: 0; pointer-events: none;
  transition: all .3s; backdrop-filter: blur(8px);
}
#toTop.show { opacity: 1; pointer-events: auto; }
#toTop:hover { transform: translateY(-4px); box-shadow: var(--glow); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
  .modal-card { grid-template-columns: 1fr; max-height: 90vh; }
  .modal-img { height: 230px; }
  .modal-img img { position: static; height: 230px; }
  .choice-list { grid-template-columns: 1fr; }
  #lbPrev { left: 8px; } #lbNext { right: 8px; }
}
@media (max-width: 760px) {
  section { padding: 68px 0; }
  .nav-links {
    position: fixed; top: 64px; right: 16px; left: 16px;
    flex-direction: column; background: var(--panel); backdrop-filter: blur(18px);
    border: 1px solid var(--line); border-radius: 14px; padding: 14px;
    display: none; z-index: 950;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  #navToggle { display: block; }
  .nav-actions .hide-sm { display: none; }
  .hero-cta { flex-direction: column; align-items: center; }
  #playerPanel { width: 286px; right: 0; }
  .game-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ---------------- 测验结果独立面板 ---------------- */
#quizResult {
  border: 1px solid var(--line); border-radius: 16px; padding: 48px 30px;
  text-align: center; background: var(--panel); box-shadow: var(--shadow);
}
