/* 下山 · 山的故事 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: #000; overflow: hidden;
  font-family: "Songti SC", "Noto Serif SC", serif; }
#stage { position: fixed; inset: 0; background: #000; }

.scene { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease;
  background-size: cover; background-position: center; }
.scene .bgblur { position: absolute; inset: -5%; background: inherit; filter: blur(26px) brightness(.75); }
.scene.on { opacity: 1; }
.scene img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transform-origin: center; }
.scene.on img.kb-in  { animation: kbIn  linear forwards; }
.scene.on img.kb-out { animation: kbOut linear forwards; }
.scene.on img.kb-l   { animation: kbL   linear forwards; }
.scene.on img.kb-r   { animation: kbR   linear forwards; }
@keyframes kbIn  { from { transform: scale(1.00); }   to { transform: scale(1.12); } }
@keyframes kbOut { from { transform: scale(1.12); }   to { transform: scale(1.02); } }
@keyframes kbL   { from { transform: scale(1.14) translateX(2.6%); } to { transform: scale(1.02) translateX(-1%); } }
@keyframes kbR   { from { transform: scale(1.02) translateX(-2.2%); } to { transform: scale(1.14) translateX(1.8%); } }
.scene::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.18) 34%, rgba(0,0,0,0) 55%); }

/* 台词区 */
#lines { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px 30px; z-index: 5; }
.nar { text-align: center; color: #F2EEE4; font-size: 19px; line-height: 1.75; letter-spacing: .06em;
  text-shadow: 0 1px 8px rgba(0,0,0,.9); margin: 0 auto 6px; max-width: 30em; }
.bubble { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; max-width: 34em;
  animation: rise .5s ease both; }
.bubble.right { flex-direction: row-reverse; margin-left: auto; }
.bubble img { width: 40px; height: 40px; border-radius: 50%; background: #222; flex: none; }
.bubble .bwrap { display: flex; flex-direction: column; gap: 3px; }
.bubble .bname { font-size: 11px; color: #B8B2A4; letter-spacing: .1em; }
.bubble .btext { background: rgba(28,26,22,.78); color: #F2EEE4; padding: 9px 13px;
  border-radius: 4px 14px 14px 14px; font-size: 16px; line-height: 1.6; max-width: 26em; }
.bubble.right .btext { border-radius: 14px 4px 14px 14px; }
.bubble.master .btext { background: rgba(16,16,15,.88); font-size: 17px; letter-spacing: .05em; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
#lines .cur { animation: rise .45s ease both; }

/* 门页(开始/落版) */
.gate { position: absolute; inset: 0; z-index: 9; background: #0B0B0A;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  transition: opacity .8s ease; }
.gate[hidden] { display: none; }
.gate-title { font-size: 58px; color: #E8E2D2; letter-spacing: .35em; text-indent: .35em; }
.gate-sub { color: #8E887A; font-size: 14px; letter-spacing: .25em; }
.gate-quote { color: #CFC8B8; font-size: 17px; line-height: 2; text-align: center; letter-spacing: .08em; }
.gate button, .gate a { border: 1px solid #6B6557; background: none; color: #E8E2D2;
  font-family: inherit; font-size: 16px; letter-spacing: .3em; text-indent: .3em;
  padding: 13px 42px; border-radius: 3px; cursor: pointer; text-decoration: none; }
.gate button:active, .gate a:active { background: #1E1C18; }
.gate-hint { color: #6B665A; font-size: 12px; letter-spacing: .2em; margin-top: 6px; }

#btn-skip { position: absolute; top: 14px; right: 14px; z-index: 8; border: none;
  background: rgba(20,19,17,.5); color: #A9A396; font-family: inherit; font-size: 12px;
  letter-spacing: .15em; padding: 7px 14px; border-radius: 3px; cursor: pointer; }
#btn-skip[hidden] { display: none; }

.gate-credit { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center;
  color: #4A463D; font-size: 10px; line-height: 1.8; letter-spacing: .05em; }
