#gm-lotus[hidden], #gm-lotus [hidden] { display: none !important; }
#gm-lotus {
  max-width: 470px;
  margin: 0 auto;
  padding: 6px 24px max(12px, env(safe-area-inset-bottom));
  color: #fff4db;
}
#gm-lotus .intro-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}
#gm-lotus .intro-line p { margin: 0; color: var(--gm-gold-2); font-size: 13px; }
#gm-lotus #lotus-reset { min-height: 40px; width: auto; margin: 0; padding: 0 12px; }
#gm-lotus .scene {
  overflow: hidden;
  border: 1px solid #9a7946;
  border-radius: 14px;
  background: #10191d;
  box-shadow: 0 12px 30px #0006;
}
#gm-lotus .field {
  position: relative;
  aspect-ratio: 852 / 1390;
  /* 满宽：桥图贴满场景宽度，两侧不再留黑边。高度由宽高比决定，
     超出视口时舞台可滚动（回合制玩法，看灯时整座桥仍可一次看完）。 */
  width: 100%;
  margin: 0 auto;
  background: url("assets/lotus/bridge.webp") center / 100% 100% no-repeat;
  isolation: isolate;
}
#lotus-bridge, #lotus-party { position: absolute; inset: 0; }
#lotus-party { pointer-events: none; z-index: 2; }
#gm-lotus .tile {
  position: absolute;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  touch-action: manipulation;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#gm-lotus .tile:disabled { opacity: 1; cursor: default; }
#gm-lotus .tile:focus-visible { background: #ead7a953; outline: 0; }
#gm-lotus .tile img { width: 41%; opacity: 0; pointer-events: none; }
#gm-lotus .tile.lit { background: radial-gradient(ellipse, #ffd377ba, #f2952a6b 65%, #ca601238); }
#gm-lotus .tile.trail { background: radial-gradient(ellipse, #ffdb714e, #c18b1f26); }
#gm-lotus .tile.lit img, #gm-lotus .tile.trail img { opacity: 1; filter: drop-shadow(0 0 6px #ffc047); }
#gm-lotus .tile.wrong { background: #a8332c97; }
#gm-lotus .piece {
  position: absolute;
  width: 6%;
  transform: translate(-50%, -97%);
  transition: left .24s ease-out, top .24s ease-out, opacity .4s ease;
}
#gm-lotus .piece.hero { width: 8%; z-index: 1; }
#gm-lotus .piece.child-a { transition-delay: .08s; }
#gm-lotus .piece.child-b { transition-delay: .15s; }
#gm-lotus .piece::before {
  content: "";
  position: absolute;
  width: 90%;
  height: 14%;
  left: 10%;
  bottom: -3%;
  border-radius: 50%;
  background: #080b0bcc;
  filter: blur(2px);
}
#gm-lotus .piece img { position: relative; display: block; width: 100%; filter: drop-shadow(0 2px 3px #000a); }
#gm-lotus .at-exit .piece { opacity: 0; transition-duration: .5s; }
#gm-lotus .bitten .piece img { animation: lotus-flinch .36s ease; }
@keyframes lotus-flinch { 33% { transform: translateX(-4px); } 66% { transform: translateX(4px); } }
#lotus-zombie { position: absolute; z-index: 3; width: 15%; pointer-events: none; opacity: 0; transform: translate(-50%, -70%); }
#lotus-zombie img { width: 100%; display: block; filter: drop-shadow(0 4px 5px #000a); }
#lotus-zombie.bite img { animation: lotus-lunge 1.05s ease forwards; }
#lotus-zombie.bite { opacity: 1; }
@keyframes lotus-lunge {
  0%, 100% { opacity: 0; transform: scale(.6); }
  24%, 62% { opacity: 1; transform: scale(1.15); }
}
#gm-lotus .lotus-exit-glow {
  position: absolute;
  left: 50.000%;
  top: 18.489%;
  width: 30%;
  aspect-ratio: 1;
  background: radial-gradient(circle, #ffcf699c, transparent 70%);
  mix-blend-mode: screen;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .55s;
}
#gm-lotus .clear .lotus-exit-glow { opacity: 1; }
#gm-lotus .stage {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  align-items: center;
  padding: 7px 10px;
  background: #10191d;
  border-top: 1px solid #94774780;
}
#lotus-status { font-weight: 750; font-size: .9rem; }
#lotus-steps { color: var(--gm-gold-2); font-variant-numeric: tabular-nums; font-size: .76rem; }
#gm-lotus .info { padding-top: 6px; }
#lotus-hint { color: #ded1bb; font-size: .84rem; line-height: 1.35; margin: 0 0 6px; }
#gm-lotus #lotus-action { width: 100%; min-height: 44px; margin: 0; touch-action: manipulation; }
#gm-lotus #lotus-action:disabled { opacity: .66; }
@media (prefers-reduced-motion: reduce) {
  #gm-lotus *, #gm-lotus *::before { transition: none !important; animation: none !important; }
}
