:root {
  --sky: #8ecbff;
  --sky2: #d7f3ff;
  --grass: #3dae55;
  --grass2: #7ed07a;
  --soil: #c4a574;
  --ink: #1e293b;
  --card: #fffdf8;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--ink);
  background: #7ec8ff;
}
button, input { font: inherit; }
#app { position: relative; z-index: 1; min-height: 100%; }

#scenery {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(#7ec8ff, #d7f4ff 78%, #c6ecb2 78%, #5cb85c 100%);
}
.sunrays {
  position: absolute;
  right: 2%;
  top: -2%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 8deg, rgba(255,255,255,.42) 0 8deg, transparent 8deg 26deg);
  -webkit-mask: radial-gradient(circle, transparent 0 18%, #000 36%, transparent 72%);
  mask: radial-gradient(circle, transparent 0 18%, #000 36%, transparent 72%);
  animation: spin 36s linear infinite;
  opacity: .7;
}
.sun {
  position: absolute;
  right: 7%;
  top: 6%;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 38%, #fff 0 16px, #fde68a 26px, #fbbf24 40px);
  box-shadow: 0 0 36px 14px rgba(251, 191, 36, .45);
  animation: sunbob 6s ease-in-out infinite;
}
.hills {
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: 17%;
  height: 86px;
  background:
    radial-gradient(ellipse at 18% 100%, rgba(134, 239, 172, .85) 0 62%, transparent 64%),
    radial-gradient(ellipse at 52% 110%, rgba(74, 222, 128, .7) 0 74%, transparent 76%),
    radial-gradient(ellipse at 84% 100%, rgba(134, 239, 172, .8) 0 58%, transparent 60%);
  animation: hillsway 9s ease-in-out infinite;
}
.cloudlane {
  position: absolute;
  left: 0;
  display: flex;
  width: max-content;
  animation: scrollx linear infinite;
}
.cloudlane.slow { top: 7%; animation-duration: 46s; }
.cloudlane.mid { top: 22%; animation-duration: 28s; opacity: .85; }
.cloudlane.low { top: 40%; animation-duration: 18s; opacity: .55; }
.cloudlane .half {
  width: 100vw;
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.puff {
  width: 74px;
  height: 26px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 22px -14px 0 4px #fff, 48px -4px 0 0 #fff, -18px -8px 0 -2px #fff;
  opacity: .92;
}
.puff.s { transform: scale(.62); opacity: .72; }
.puff.l { transform: scale(1.2); }
.petals i {
  position: absolute;
  top: -8%;
  width: 10px;
  height: 14px;
  border-radius: 80% 0 80% 0;
  background: #fb7185;
  opacity: .8;
  animation: fall linear infinite;
}
.petals i:nth-child(1) { left: 4%; animation-duration: 13s; background: #f9a8d4; }
.petals i:nth-child(2) { left: 12%; animation-duration: 17s; animation-delay: -6s; background: #fde68a; }
.petals i:nth-child(3) { left: 21%; animation-duration: 15s; animation-delay: -3s; background: #86efac; }
.petals i:nth-child(4) { left: 30%; animation-duration: 19s; animation-delay: -11s; }
.petals i:nth-child(5) { left: 39%; animation-duration: 14s; animation-delay: -8s; background: #fff; }
.petals i:nth-child(6) { left: 48%; animation-duration: 16s; animation-delay: -2s; background: #f9a8d4; }
.petals i:nth-child(7) { left: 57%; animation-duration: 18s; animation-delay: -9s; background: #fde68a; }
.petals i:nth-child(8) { left: 66%; animation-duration: 12s; animation-delay: -4s; background: #86efac; }
.petals i:nth-child(9) { left: 74%; animation-duration: 20s; animation-delay: -13s; }
.petals i:nth-child(10) { left: 82%; animation-duration: 15s; animation-delay: -7s; background: #fff; }
.petals i:nth-child(11) { left: 90%; animation-duration: 17s; animation-delay: -1s; background: #f9a8d4; }
.petals i:nth-child(12) { left: 96%; animation-duration: 14s; animation-delay: -10s; background: #fde68a; }
.sparkles i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px #fff;
  animation: twinkle 2.6s ease-in-out infinite;
}
.sparkles i:nth-child(1) { left: 8%; top: 14%; }
.sparkles i:nth-child(2) { left: 18%; top: 32%; animation-delay: -1s; }
.sparkles i:nth-child(3) { left: 28%; top: 12%; animation-delay: -.4s; }
.sparkles i:nth-child(4) { left: 46%; top: 18%; animation-delay: -1.6s; }
.sparkles i:nth-child(5) { left: 58%; top: 36%; animation-delay: -.8s; }
.sparkles i:nth-child(6) { left: 70%; top: 14%; animation-delay: -2s; }
.sparkles i:nth-child(7) { left: 84%; top: 28%; animation-delay: -.2s; }
.sparkles i:nth-child(8) { left: 92%; top: 16%; animation-delay: -1.3s; }
.flyer, .kite { position: absolute; line-height: 1; }
.flyer { font-size: 26px; animation: cross linear infinite; }
.flyer.a { top: 16%; animation-duration: 22s; }
.flyer.b { top: 34%; font-size: 22px; animation-duration: 16s; animation-delay: -7s; animation-direction: reverse; }
.flyer.c { top: 22%; font-size: 20px; animation-duration: 30s; animation-delay: -12s; }
.flyer.d { top: 46%; font-size: 20px; animation-duration: 13s; animation-delay: -4s; }
.pollen {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.9) 0 1.5px, transparent 2.2px),
    radial-gradient(circle, rgba(253, 224, 71, .8) 0 1.2px, transparent 2px);
  background-size: 120px 90px, 86px 110px;
  background-position: 0 0, 40px 20px;
  animation: pollen 11s linear infinite;
  opacity: .7;
}
.kite { font-size: 34px; animation: kite 4.8s ease-in-out infinite; }
.kite.left { left: 3%; top: 30%; }
.kite.right { right: 5%; top: 16%; font-size: 28px; animation-delay: -2.2s; }
.furrows {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22%;
  background-image: repeating-linear-gradient(90deg,
    transparent 0 36px,
    rgba(255,255,255,.28) 36px 42px,
    rgba(22, 163, 74, .18) 42px 78px);
  background-size: 156px 100%;
  animation: rowmove 7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes sunbob { 50% { transform: translateY(8px) scale(1.05); } }
@keyframes hillsway { 50% { transform: translateX(14px); } }
@keyframes scrollx { to { transform: translateX(-50%); } }
@keyframes fall {
  0% { transform: translate3d(0, -8vh, 0) rotate(0deg); }
  100% { transform: translate3d(36px, 112vh, 0) rotate(240deg); }
}
@keyframes twinkle {
  0%, 100% { opacity: .15; transform: scale(.5); }
  50% { opacity: 1; transform: scale(1.4); }
}
@keyframes cross {
  from { transform: translateX(-8vw); }
  to { transform: translateX(112vw); }
}
@keyframes kite {
  0%, 100% { transform: translate(0, 0) rotate(-8deg); }
  50% { transform: translate(14px, 16px) rotate(10deg); }
}
@keyframes rowmove { to { background-position: -156px 0; } }
@keyframes pollen { to { background-position: -120px 180px, -40px 200px; } }
@media (prefers-reduced-motion: reduce) {
  #scenery * { animation: none !important; }
}

.sky {
  height: 100vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: transparent;
  position: relative;
  overflow: hidden;
}
.clovers {
  position: absolute; inset: auto 0 0 0; height: 18%;
  pointer-events: none;
  animation: breeze 5.5s ease-in-out infinite;
}
@keyframes breeze { 50% { transform: translateX(10px); } }
.clover {
  position: absolute; width: 28px; height: 28px;
  background:
    radial-gradient(circle at 50% 40%, #86efac 0 5px, transparent 6px),
    radial-gradient(circle at 30% 60%, #4ade80 0 6px, transparent 7px),
    radial-gradient(circle at 70% 60%, #22c55e 0 6px, transparent 7px),
    radial-gradient(circle at 50% 78%, #16a34a 0 5px, transparent 6px);
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.08));
}
.clover.lucky { transform: scale(1.15); animation: glow 1.4s ease-in-out infinite; }
@keyframes glow { 50% { filter: drop-shadow(0 0 8px #facc15); } }

.topbar, .dock {
  position: relative; z-index: 2;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 12px 16px;
  flex-shrink: 0;
}
.topbar { justify-content: space-between; }
.brand { font-weight: 900; font-size: 22px; color: #14532d; }
.hud { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pill {
  background: rgba(255,255,255,.9);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 800;
  box-shadow: 0 4px 0 rgba(0,0,0,.06);
}
.hearts { color: #e11d48; letter-spacing: 2px; }
.energy {
  width: 140px; height: 14px; border-radius: 99px;
  background: #e2e8f0; overflow: hidden; border: 2px solid #fff;
}
.energy i { display: block; height: 100%; width: 0; background: #22c55e; transition: width .25s; }
.energy.hot i { background: linear-gradient(90deg, #22c55e, #38bdf8, #a78bfa, #f472b6); }
.time { font-variant-numeric: tabular-nums; }

.stage {
  position: relative; z-index: 1;
  flex: 1;
  margin: 0 16px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
}
.field {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 14px;
  min-height: 0;
  position: relative;
  overflow: hidden;
}
.lane { position: relative; width: 132px; height: 100%; }
.field .mob {
  position: absolute;
  left: 0;
  right: 0;
  bottom: auto;
  width: auto;
  top: calc(var(--y, 0) * (100% - 140px));
}
.mob .face { display: block; font-size: 42px; line-height: 1; margin-bottom: 4px; }
.mob.g1 .body { background: #65a30d; border-radius: 40px 40px 18px 18px; }
.mob.g2 .body { background: #facc15; color: #422006; border-radius: 50%; }
.mob.g3 .body { background: #f97316; border-radius: 46%; }
.mob.g4 .body { background: #eab308; color: #422006; border-radius: 18px; box-shadow: 0 0 0 8px #fde047, inset 0 -8px 0 rgba(0,0,0,.12); }
.mob.g5 .body { background: #059669; border-radius: 28px 46px; }
.mob.g6 .body { background: #6d28d9; border-radius: 46% 46% 16px 16px; }
.mob.dying { pointer-events: none; }
.mob.dying .body { animation: pop .45s ease forwards; }
.mob {
  width: 112px;
  text-align: center;
}
.mob .body {
  background: #8b5e34;
  border-radius: 46% 46% 42% 42%;
  min-height: 96px;
  padding: 10px 8px 12px;
  color: #fff;
  box-shadow: inset 0 -8px 0 rgba(0,0,0,.12), 0 8px 0 rgba(0,0,0,.08);
  position: relative;
}
.mob.fast .body { background: #ea580c; border-radius: 40%; }
.mob.shell .body { background: #57534e; border-radius: 18px; }
.mob.boss .body { background: #7c3aed; width: 150px; min-height: 120px; }
.mob.copy .body { background: #0f766e; }
.mob .q { font-size: 20px; font-weight: 900; line-height: 1.25; text-shadow: 0 1px 0 rgba(0,0,0,.2); }
.mob .tag { display: block; margin-top: 4px; font-size: 12px; opacity: .9; }
.mob .leaf {
  position: absolute; right: -6px; top: -10px; font-size: 20px;
  animation: glow 1.2s ease-in-out infinite;
}
.mob.pop { animation: pop .35s ease; }
@keyframes pop { 50% { transform: scale(1.12) rotate(-4deg); } 100% { transform: scale(0); opacity: 0; } }
.mob.is-back .body { transform: scale(.82); opacity: .8; }

.base {
  position: relative;
  display: flex; align-items: flex-end; justify-content: center; gap: 28px;
  padding: 8px 0 12px;
}
.turret { position: relative; width: 132px; height: 78px; }
.turret .barrel {
  position: absolute; left: 50%; bottom: 46px; width: 22px; height: 42px;
  margin-left: -11px; border-radius: 8px 8px 2px 2px;
  background: linear-gradient(#334155, #0f172a);
  box-shadow: inset 0 0 0 3px #94a3b8;
}
.turret .barrel::after {
  content: ''; position: absolute; left: 3px; right: 3px; top: -8px; height: 12px;
  border-radius: 4px; background: #fbbf24;
}
.turret .basebox {
  position: absolute; left: 0; right: 0; bottom: 0; height: 48px;
  border-radius: 12px; background: linear-gradient(#fb7185, #e11d48);
  border: 4px solid #fff; box-shadow: 0 8px 0 #9f1239;
  display: grid; place-items: center; color: #fff; font-weight: 900;
}
.runner { text-align: center; width: 92px; }
.runner b { display: block; font-size: 13px; }
.runner .fig { font-size: 42px; filter: drop-shadow(0 6px 0 rgba(0,0,0,.08)); }
.runner.me .fig { font-size: 54px; }
.track {
  position: relative; height: 36px; margin: 0 8% 4px;
  background: #e7e5e4; border-radius: 99px; border: 3px solid #fff;
}
.track i { position: absolute; top: -6px; font-size: 28px; line-height: 1; transition: left .3s; }
.bullet {
  position: fixed; z-index: 40; width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 35% 35%, #fff, #fde047 45%, #f97316);
  box-shadow: 0 0 14px #facc15, 0 0 28px #fb923c;
  transition: transform .32s linear;
}
.bullet.boom {
  width: 72px; height: 72px; margin: -36px 0 0 -36px;
  background: radial-gradient(circle, #fff 0 10px, #fde047 18px, #fb7185 32px, transparent 34px);
  box-shadow: 0 0 30px #facc15;
}
.bullet.miss.boom {
  background: radial-gradient(circle, #e2e8f0 0 8px, transparent 26px);
  box-shadow: none;
}

.dock {
  background: rgba(255,253,248,.94);
  border-top: 1px solid #e7e5e4;
  justify-content: center;
}
.dock input {
  width: min(280px, 46vw);
  border: 3px solid #86efac;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 22px;
  font-weight: 800;
}
.dock button, .map button, .talk button, .choices button {
  border: 0; border-radius: 14px; padding: 10px 16px;
  background: #16a34a; color: #fff; font-weight: 900; cursor: pointer;
}
.dock button.ghost, .map button.ghost { background: #e2e8f0; color: #334155; }
.dock a, .map a {
  display: inline-block; text-decoration: none; background: #e2e8f0; color: #334155;
  border-radius: 14px; padding: 10px 16px; font-weight: 900;
}
.say { min-height: 24px; font-weight: 700; color: #166534; }

.map { padding: 28px 18px 40px; position: relative; z-index: 2; overflow: auto; height: 100%; }
.map h1 { margin: 0 0 6px; font-size: 40px; color: #14532d; }
.map p.lead { margin: 0 0 18px; font-size: 18px; }
.gates { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.gate {
  background: var(--card);
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 10px 0 rgba(0,0,0,.06);
  text-align: left;
}
.gate h2 { margin: 0 0 4px; font-size: 22px; }
.gate p { margin: 0 0 10px; color: #57534e; }
.gate.lock { filter: grayscale(.4); }
.gate button { width: 100%; }

.mask {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(15, 23, 42, .45);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.talk, .choices {
  width: min(560px, 100%);
  background: #fff;
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,.2);
}
.who { font-size: 28px; }
.talk p { font-size: 18px; line-height: 1.55; }
.choices { display: flex; flex-direction: column; gap: 8px; }
.choices button { background: #0f766e; text-align: left; }
.shot {
  position: absolute; width: 16px; height: 16px; border-radius: 50%;
  background: #facc15; box-shadow: 0 0 12px #facc15;
  z-index: 5; pointer-events: none;
}
.rainbow .stage { animation: wash .8s linear; }
@keyframes wash { 50% { filter: saturate(1.4) brightness(1.08); } }
.site-foot {
  position: relative; z-index: 2; background: #070b12; color: #8fa3bd;
  padding: 28px 16px 22px; text-align: center; font-size: 13px; line-height: 1.7;
}
.site-foot a { color: #8fa3bd; text-decoration: none; }
.site-foot a:hover { color: #22d3ee; }
.site-foot strong { color: #22d3ee; }
.foot-mid, .foot-beian { margin-top: 8px; }

/* 20261114_091136 · 平板 / 手机适配：内置软键盘 + 竖屏收口
   目标：不弹系统输入法，键盘只占底部一窄条，.stage 继续 flex:1 吃满剩余高度。 */
.sky { height: 100vh; height: 100dvh; }
/* 20261114_R3：版本号独占一行、居中、弱化；与首页保持同一观感 */
.foot-stats { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.ver-line { display: block; margin-top: 0; font-size: 11px; line-height: 1.6;
  color: #8fa3bd; opacity: .62; letter-spacing: .3px;
  text-align: center; font-variant-numeric: tabular-nums; }
.dock-row { display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 8px; width: 100%; }
.pw-keys { display: flex; flex-wrap: wrap; justify-content: center;
  gap: 5px; width: 100%; padding-top: 2px; }
.pw-key { flex: 0 0 auto; min-width: 34px; height: 32px; padding: 0 6px;
  border: 1px solid #bbf7d0; border-radius: 8px; background: #f0fdf4;
  color: #14532d; font-size: 15px; font-weight: 800; cursor: pointer;
  touch-action: manipulation; user-select: none;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1; text-align: center; }
.pw-key:active { transform: translateY(1px); background: #dcfce7; }
/* 20261114_100023：物理键盘按下时同步点亮屏上键帽，软/硬键盘视觉一致 */
.pw-key.key-active { background: #16a34a; border-color: #16a34a; color: #fff; transform: translateY(1px); }
.pw-key-sym { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.pw-key-fn { min-width: 48px; background: #fef3c7; border-color: #fde68a;
  color: #92400e; font-size: 13px; }
.dock .say { flex: 1 1 100%; text-align: center; }

@media (max-width: 760px) {
  .dock { padding: 6px 8px; gap: 6px; }
  .dock input { width: min(200px, 52vw); font-size: 17px;
    padding: 6px 9px; border-width: 2px; }
  .dock button, .dock a { padding: 6px 10px; font-size: 12px; border-radius: 10px; }
  .dock .say { font-size: 11px; min-height: 0; }
  .pw-key { min-width: 30px; height: 28px; font-size: 13px; padding: 0 4px; }
  .pw-key-fn { min-width: 42px; font-size: 11px; }
  .field .lane { width: 96px; }
  .field { gap: 8px; }
  .mob .q { font-size: 16px; }
  .mob .body { min-height: 76px; padding: 7px 5px 9px; }
  .mob .face { font-size: 30px; }
  .runner { width: 64px; }
  .runner .fig { font-size: 30px; }
  .runner.me .fig { font-size: 38px; }
  .turret { width: 96px; height: 62px; }
  .base { gap: 12px; }
  .topbar { padding: 8px 10px; }
  .brand { font-size: 17px; }
  .pill { padding: 4px 8px; font-size: 12px; }
}
/* 平板竖屏：改单列紧凑布局（标题 → 游戏 → 说明/键盘），横屏大屏保持原样 */
@media (orientation: portrait) and (max-width: 1024px) {
  .field .lane { width: 88px; }
  .dock { padding: 6px 8px; }
  .pw-key { min-width: 30px; height: 28px; }
  .stage { margin: 0 8px; }
}

/* R11 · 沉浸模式：真全屏。隐藏页脚与背景装饰，只留游戏本身，给小屏最大空间。 */
.pw-immersive {
  cursor: pointer;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #14532d;
}
.pw-immersive:hover { background: #dcfce7; }
body.immersive .site-foot,
body.immersive #scenery { display: none !important; }
body.immersive #app .sky { height: 100vh; height: 100dvh; }

