#game-stage:has(.boot-scene-layer:not(.boot-scene--leaving)) > #scenery {
  visibility: hidden;
}

#game-stage .boot-loading {
  position: absolute;
  inset: 78px 0 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: var(--kv-ink, #245234);
  font-family: var(--kv-label, "PingFang SC", "Microsoft YaHei", sans-serif);
  text-align: center;
  pointer-events: none;
  z-index: 2;
  animation: boot-reveal 360ms 250ms both;
}

#game-stage .boot-scene {
  position: absolute;
  top: calc(var(--stage-app-top, 0px) + 200px);
  left: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 250px;
  overflow: hidden;
  animation: boot-reveal 360ms 250ms both;
}

#game-stage .boot-landscape {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 205px, transparent 235px);
  mask-image: linear-gradient(180deg, #000 0, #000 205px, transparent 235px);
}

#game-stage .boot-sun {
  position: absolute;
  top: 4px;
  left: calc(50% + 99px);
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #f3e6ad;
}

#game-stage .boot-mailbox {
  position: absolute;
  top: 99px;
  left: calc(50% + 121px);
  width: 60px;
  height: 108px;
}

#game-stage .boot-mailbox svg {
  display: block;
  width: 100%;
  height: 100%;
}

#game-stage .boot-shadow {
  position: absolute;
  top: 199px;
  left: calc(50% - 67px);
  width: 134px;
  height: 10px;
  border-radius: 50%;
  background: #536b39;
  opacity: .14;
}

#game-stage .boot-road {
  position: absolute;
  top: 201px;
  left: 0;
  display: block;
  width: 100%;
  height: 5px;
  overflow: hidden;
}

#game-stage .boot-road-dashes {
  position: absolute;
  top: 1px;
  left: -54px;
  display: block;
  width: calc(100% + 108px);
  height: 3px;
  background: repeating-linear-gradient(90deg, transparent 0 20px, #647a5045 20px 34px, transparent 34px 54px);
  animation: boot-road 840ms linear infinite;
  will-change: transform;
}

#game-stage .boot-walk {
  position: absolute;
  top: 55px;
  left: calc(50% - 71px);
  display: block;
  width: 142px;
  height: 151px;
  background: center / contain no-repeat url("/_guimi/r90-ops-analytics-20261129/assets/character/fitting-r48/default--none--original--right.webp");
  transform: translateZ(0);
  transform-origin: 50% 88%;
  animation: boot-bob 840ms ease-in-out infinite;
  will-change: transform;
}

#game-stage .boot-dust {
  position: absolute;
  top: 184px;
  left: calc(50% - 75px);
  display: block;
  width: 9px;
  height: 9px;
  border: 1px solid #73835b;
  border-radius: 50%;
  background: #f3edd5;
  opacity: 0;
  animation: boot-dust 1680ms ease-out infinite;
  will-change: transform, opacity;
}

#game-stage .boot-dust--two {
  top: 192px;
  left: calc(50% - 85px);
  width: 7px;
  height: 7px;
  animation-delay: -560ms;
}

#game-stage .boot-dust--three {
  top: 176px;
  left: calc(50% - 67px);
  width: 6px;
  height: 6px;
  animation-delay: -1120ms;
}

#game-stage .boot-copy {
  position: absolute;
  top: 442px;
  right: 22px;
  left: 22px;
  display: block;
  margin: 0;
  padding: 0;
  font: 500 18px/1.6 var(--kv-label, "PingFang SC", "Microsoft YaHei", sans-serif);
  letter-spacing: .04em;
}

#game-stage .boot-copy--first {
  animation: boot-copy-first 140ms 5s both;
}

#game-stage .boot-copy--second {
  visibility: hidden;
  opacity: 0;
  animation: boot-copy-second 200ms 5.14s both;
}

/* 2026-11-28: the stage's ink green is 4.4:1 on the hill this line sits over; this one is 5.2:1. */
#game-stage :is(.boot-copy--first, .boot-copy--second) { color: #1f472c; }

#game-stage :is(.boot-loading--leaving, .boot-scene--leaving) {
  z-index: 29;
  animation: boot-leave 160ms linear forwards;
}

#game-stage .boot-loading--leaving .boot-copy,
#game-stage .boot-scene--leaving :is(.boot-walk, .boot-road-dashes, .boot-dust) {
  animation-play-state: paused !important;
}

#game-stage #app.boot-arriving > .entry-home {
  animation: boot-arrive 200ms ease-out both;
}

/* 卡住：看门狗只加 .boot-loading--stuck，两档原文案让位给卡住文案和「重新打开」。 */
#game-stage .boot-copy--stuck {
  display: none;
}

#game-stage .boot-loading--stuck .boot-copy--stuck {
  display: block;
  animation: boot-stuck 240ms ease-out both;
}

#game-stage .boot-loading--stuck .boot-copy--first,
#game-stage .boot-loading--stuck .boot-copy--second {
  display: none;
}

#game-stage .boot-reload {
  display: block;
  width: max-content;
  min-height: max(46px, calc(44.25px / var(--stage-scale, 1)));
  margin: 20px auto 0;
  /* 不描边：同色的 1px 边框在 WebKit 里（舞台缩到 320 宽时）会和底色之间留出一圈细缝，露出浅色背景。内边距补上那 1px。 */
  padding: 11px 23px;
  border: 0;
  border-radius: 10px;
  background: var(--kv-action, #3d6243);
  color: #fff9e9;
  font: 600 16px/1.25 var(--kv-label, "PingFang SC", "Microsoft YaHei", sans-serif);
  letter-spacing: .04em;
  box-shadow: none;
  cursor: pointer;
  touch-action: manipulation;
  pointer-events: auto;
  transition: transform 120ms ease;
}

#game-stage .boot-reload:active {
  background: var(--kv-action-active, #315236);
  transform: translate3d(0, 1px, 0);
}

#game-stage .boot-reload:focus-visible {
  outline: 2px solid var(--kv-focus, #2c5135);
  outline-offset: 2px;
}

#game-stage .boot-loading--leaving .boot-reload {
  pointer-events: none;
}

/* 被堵在路上的龟蜜不再迈步，路面虚线停下，尘土散掉。 */
#game-stage:has(.boot-loading--stuck) > .boot-scene-layer .boot-walk,
#game-stage:has(.boot-loading--stuck) > .boot-scene-layer .boot-road-dashes {
  animation-play-state: paused !important;
}

#game-stage:has(.boot-loading--stuck) > .boot-scene-layer .boot-dust {
  animation: boot-dust-out 320ms ease-out forwards !important;
}

/* 被堵在路上的龟蜜不笑了：叠上游戏自己的侧面「好奇」表情图层，和无 WebGL 回退用的是同一张图、
   同一套清单坐标（fitting-expressions-r62/manifest.json：512×544 的画布，x 375、y 229、w 42、h 38）。
   图直接嵌在样式里（762 字节）：卡住多半是没网，等卡住再取就取不到；也不让三维模式多请求一张二维表情图。 */
#game-stage:has(.boot-loading--stuck) > .boot-scene-layer .boot-walk::after {
  content: "";
  position: absolute;
  left: 73.2422%;
  top: 42.0956%;
  width: 8.2031%;
  height: 6.9853%;
  background: center / 100% 100% no-repeat url("data:image/webp;base64,UklGRvICAABXRUJQVlA4WAoAAAAwAAAAKQAAJQAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZWUDhMBAEAAC8pQAkQT2CQAZqIsmhx5BHIOe5xjTMpaCNJzR3fPTlhMAsATVc6GSSQQcAzGMEIZjD/AQA15pfn52unJys2VntNGYBa27arapGx2WewSBw4bCwAFBaJy7BbeOXGcy4/+Ij+M3DbthHb3t7nfAIAAAAAAAAAAAAAkCRJkiRJkvQ/lDmm3AFPwdUcq/TbLFL2PMip0Wg0Gg3PNOvtfN9u1tPRDJRfsXc0gq0vnfi09E+aZlE07/nOWfZqu7GOovlBmSQ4Ovd6hvklt/vGO5ZZtS+1VN1L0jj9jonszOj9p2IhoctL/rAjn09P0CyOclAPDLgde2OPUwy54deIuxcAAICfLDUA");
}

@media (max-width: 350px) {
  #game-stage .boot-reload {
    font-size: 19px;
  }
}

/* stage.js 还没把舞台缩放好的那段时间（竖屏手机），#app 是固定 844 高、顶边对齐：
   屏幕不到 844 高时 #app 的底部被裁掉，卡住提示会掉到屏幕外。这时让它贴着屏幕底边，
   留白收紧一点，别让第一行字贴到路面上。 */
@media (max-width: 600px) and (orientation: portrait) and (max-height: 843px) {
  html:not(.stage-bleed):not(.stage-scroll) #game-stage .boot-loading--stuck .boot-copy--stuck {
    top: 0;
    display: flex;
    height: calc(100vh - 92px);
    height: calc(100dvh - 92px);
    flex-direction: column;
    justify-content: flex-end;
  }

  html:not(.stage-bleed):not(.stage-scroll) #game-stage .boot-reload {
    margin-top: 12px;
  }
}

@keyframes boot-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes boot-bob {
  0%, 100% { transform: translate3d(0, 1px, 0) rotate(-.7deg); }
  25% { transform: translate3d(1px, -4px, 0) rotate(.4deg); }
  50% { transform: translate3d(0, 1px, 0) rotate(.5deg); }
  75% { transform: translate3d(-1px, -3px, 0) rotate(-.4deg); }
}

@keyframes boot-road {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-54px, 0, 0); }
}

@keyframes boot-dust {
  0% { opacity: 0; transform: translate3d(8px, 4px, 0) scale(.5); }
  18% { opacity: .72; }
  100% { opacity: 0; transform: translate3d(-25px, -10px, 0) scale(1.15); }
}

@keyframes boot-copy-first {
  from { visibility: visible; opacity: 1; }
  to { visibility: hidden; opacity: 0; }
}

@keyframes boot-copy-second {
  from { visibility: hidden; opacity: 0; }
  to { visibility: visible; opacity: 1; }
}

@keyframes boot-leave {
  from { opacity: 1; transform: translate3d(0, 0, 0); }
  to { opacity: 0; transform: translate3d(0, -4px, 0); }
}

@keyframes boot-arrive {
  from { opacity: .35; transform: translate3d(0, 7px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes boot-stuck {
  from { opacity: 0; transform: translate3d(0, 4px, 0); }
  to { opacity: 1; transform: none; }
}

@keyframes boot-dust-out {
  from { opacity: .5; transform: translate3d(-8px, -5px, 0) scale(.9); }
  to { opacity: 0; transform: translate3d(-14px, -9px, 0) scale(1.05); }
}

@media (max-width: 350px) {
  #game-stage .boot-copy {
    font-size: 22px;
    letter-spacing: .02em;
  }
}

@media (prefers-reduced-motion: reduce) {
  #game-stage :is(.boot-loading, .boot-scene-layer) {
    animation: none !important;
    opacity: 1;
  }

  #game-stage .boot-scene-layer :is(.boot-walk, .boot-road-dashes, .boot-dust) {
    animation: none !important;
  }

  #game-stage .boot-scene-layer .boot-walk {
    transform: none;
  }

  #game-stage .boot-scene-layer .boot-dust {
    opacity: 0;
  }

  #game-stage .boot-loading .boot-copy--first {
    animation: boot-copy-first 1ms 5s both !important;
  }

  #game-stage .boot-loading .boot-copy--second {
    animation: boot-copy-second 1ms 5.14s both !important;
  }

  #game-stage #app.boot-arriving > .entry-home {
    animation: none !important;
  }

  #game-stage .boot-loading--stuck .boot-copy--stuck {
    animation: none !important;
    opacity: 1;
    transform: none;
  }

  #game-stage:has(.boot-loading--stuck) > .boot-scene-layer .boot-dust {
    animation: none !important;
    opacity: 0;
  }

  #game-stage .boot-reload {
    transition: none;
  }
}
