* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #05070d; color: #f3e6c4;
  font-family: "STKaiti", "KaiTi", "楷体", "Noto Serif SC", "Songti SC", serif; user-select: none; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

.hud { position: fixed; inset: 0; pointer-events: none; opacity: 0; transition: opacity 1.2s; }
.hud.on { opacity: 1; }

#top { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); }
@media (max-width: 900px) { #top { top: auto; bottom: 84px; } #help { font-size: 12px; } }
#jadeBox { display: flex; align-items: center; gap: 10px; padding: 8px 18px;
  background: linear-gradient(180deg, rgba(20,8,6,.72), rgba(20,8,6,.45));
  border: 1px solid rgba(201,162,77,.55); border-radius: 3px; font-size: 18px; letter-spacing: 2px;
  box-shadow: 0 0 24px rgba(0,0,0,.4); }
#jadeBox .lbl { color: #c9a24d; }
#jadeDots { display: flex; gap: 5px; }
#jadeDots i { width: 11px; height: 11px; border-radius: 50%; border: 2px solid #6fa58c; display: block; opacity: .5; }
#jadeDots i.got { background: #9fe3c0; border-color: #d9fff0; opacity: 1; box-shadow: 0 0 8px #7fffd0; }
#jadeNum { font-family: Georgia, serif; font-size: 15px; color: #e8d9b0; }

#minimap { position: absolute; right: 18px; top: 18px; width: 168px; height: 168px; border-radius: 50%;
  border: 2px solid rgba(201,162,77,.7); background: rgba(8,14,26,.55); box-shadow: 0 0 20px rgba(0,0,0,.5); }

#nearest { position: absolute; right: 18px; top: 194px; width: 168px; text-align: center; font-size: 14px;
  color: #bfe9d6; text-shadow: 0 1px 3px #000; }

#speedo { position: absolute; left: 22px; bottom: 22px; font-family: Georgia, serif; font-size: 40px; color: #f3e6c4;
  text-shadow: 0 2px 10px #000; }
#speedo small { font-family: "KaiTi", serif; font-size: 14px; margin-left: 6px; color: #c9a24d; }

#help { position: absolute; left: 22px; top: 18px; font-size: 13px; line-height: 1.75; color: rgba(243,230,196,.8);
  padding: 10px 14px; background: rgba(10,6,4,.4); border-left: 3px solid #8b1a1a; transition: opacity 1s; }
#help b { color: #e2b955; font-weight: normal; font-family: Consolas, monospace; }

#speech { position: absolute; left: 50%; top: 22%; transform: translateX(-50%) translateY(10px); font-size: 30px;
  letter-spacing: 6px; color: #fff4d6; text-shadow: 0 0 18px rgba(255,170,60,.7), 0 2px 4px #000;
  opacity: 0; transition: opacity .5s, transform .5s; white-space: nowrap; }
#speech.on { opacity: 1; transform: translateX(-50%) translateY(0); }

#subtitle { position: absolute; left: 50%; bottom: 13%; transform: translateX(-50%); font-size: 20px; letter-spacing: 3px;
  color: #f3e6c4; text-shadow: 0 2px 6px #000, 0 0 2px #000; opacity: 0; transition: opacity .8s; text-align: center; }
#subtitle.on { opacity: 1; }

#stamp { position: absolute; left: 50%; top: 42%; transform: translate(-50%,-50%) scale(2.4) rotate(-12deg); opacity: 0; }
#stamp.on { animation: stamp 1.8s ease-out forwards; }
.seal-big { width: 120px; height: 120px; border: 5px solid #c4231d; border-radius: 8px; display: flex; align-items: center;
  justify-content: center; color: #c4231d; font-size: 46px; font-weight: bold; writing-mode: vertical-rl; letter-spacing: 4px;
  background: rgba(255,240,220,.08); box-shadow: inset 0 0 0 3px rgba(196,35,29,.35); }
@keyframes stamp {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(2.4) rotate(-12deg); }
  12% { opacity: 1; transform: translate(-50%,-50%) scale(.95) rotate(-8deg); }
  18% { transform: translate(-50%,-50%) scale(1.04) rotate(-8deg); }
  70% { opacity: 1; transform: translate(-50%,-50%) scale(1) rotate(-8deg); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1) rotate(-8deg); }
}

#finale { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 2.5s; background: radial-gradient(ellipse at center, rgba(0,0,0,0) 30%, rgba(0,0,0,.55)); }
#finale.on { opacity: 1; }
#finale .f1 { font-size: 26px; letter-spacing: 14px; color: #e2b955; margin-bottom: 18px; }
#finale .f2 { font-size: 72px; letter-spacing: 10px; color: #fff4d6; text-shadow: 0 0 40px rgba(255,190,90,.8); }

#btns { position: fixed; right: 18px; bottom: 18px; display: flex; gap: 10px; z-index: 5; opacity: 0; transition: opacity 1s; }
#btns.on { opacity: 1; }
#btns button, #touch button { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(201,162,77,.8);
  background: rgba(30,10,8,.6); color: #f3e6c4; font-family: inherit; font-size: 20px; cursor: pointer; }
#btns button:hover { background: rgba(139,26,26,.7); }
#btns button:focus-visible, #go:focus-visible { outline: 2px solid #e2b955; outline-offset: 3px; }
#btnSnd.off { opacity: .45; text-decoration: line-through; }

#touch { display: none; }
@media (pointer: coarse) {
  #touch.on { display: block; }
  #help { display: none; }
  #joy { position: fixed; left: 28px; bottom: 90px; width: 130px; height: 130px; border-radius: 50%;
    border: 2px solid rgba(201,162,77,.6); background: rgba(20,8,6,.35); touch-action: none; }
  #knob { position: absolute; left: 40px; top: 40px; width: 50px; height: 50px; border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #e2b955, #8b1a1a); }
  #tRun, #tRoar { position: fixed; width: 66px !important; height: 66px !important; font-size: 26px !important; touch-action: none; }
  #tRun { right: 110px; bottom: 90px; }
  #tRoar { right: 28px; bottom: 140px; background: rgba(139,26,26,.75) !important; }
  #speedo { bottom: 240px; }
}

#start { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 10;
  background: radial-gradient(ellipse at 50% 40%, rgba(20,14,30,.35), rgba(3,4,10,.92)); transition: opacity 1.4s; }
#start.hide { opacity: 0; pointer-events: none; }
.scroll { position: relative; width: min(520px, 90vw); padding: 46px 40px 34px; text-align: center;
  background: linear-gradient(180deg, #2a1410, #1a0b08); border: 1px solid #6b4a1f;
  box-shadow: 0 0 0 6px #120705, 0 0 0 7px #8a6a2c, 0 30px 80px rgba(0,0,0,.7); }
.scroll .vt { font-size: 58px; letter-spacing: 16px; color: #f3e6c4; text-shadow: 0 0 30px rgba(226,185,85,.35); }
.scroll .sub { font-size: 20px; letter-spacing: 8px; color: #c9a24d; margin-top: 8px; }
.scroll .seal { position: absolute; right: 26px; top: 26px; width: 48px; height: 48px; border: 3px solid #c4231d; color: #c4231d;
  font-size: 30px; line-height: 42px; border-radius: 4px; transform: rotate(8deg); }
.scroll .intro { margin: 26px 0 28px; font-size: 17px; line-height: 2; color: rgba(243,230,196,.85); }
#go { font-family: inherit; font-size: 22px; letter-spacing: 8px; padding: 12px 42px; cursor: pointer; color: #fff4d6;
  background: linear-gradient(180deg, #a3241c, #6d120d); border: 1px solid #e2b955; border-radius: 2px;
  box-shadow: 0 6px 20px rgba(139,26,26,.5); transition: transform .2s, box-shadow .2s; }
#go:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(196,35,29,.6); }
#go:disabled { opacity: .5; cursor: wait; }
.scroll .tip { margin-top: 18px; font-size: 13px; color: rgba(201,162,77,.7); }
