
/* ===== 900x600 游戏舞台自适应 ===== */
#kzViewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #008080;
}
#kzStage {
  position: relative;
  width: 900px;
  height: 600px;
  transform-origin: 0 0;
  -webkit-transform-origin: 0 0;
}

/* ===== karry 广告接入：植物大战僵尸 ===== */
#kzHud,
#kzBonusWrap,
#kzRevive {
  position: absolute;
  top: calc(var(--kz-stage-h, 600px) - 8px);
  left: calc(var(--kz-stage-w, 900px) / 2);
  transform: translateX(-50%);
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#kzRevive { z-index: 320; top: calc(var(--kz-stage-h, 600px) - 14px); }
#kzHud.on, #kzBonusWrap.on, #kzRevive.on { display: flex; }

.kz-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid #3d2409;
  border-radius: 12px;
  height: 46px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  touch-action: manipulation;
  color: #ffe9b0;
  background: linear-gradient(#a76a25, #6d3f10);
  box-shadow: 0 4px 0 #2c1905, 0 6px 14px rgba(0, 0, 0, .35);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: .5px;
  white-space: nowrap;
  text-shadow: 0 1px 0 #3d2409;
}
.kz-btn .kz-ico { font-size: 17px; line-height: 1; }
.kz-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #2c1905; }
.kz-btn.bomb { background: linear-gradient(#c04a2a, #7d2410); }
.kz-btn.freeze { background: linear-gradient(#2f7fb5, #17476b); color: #dff4ff; }
.kz-btn.bonus { background: linear-gradient(#e0a12c, #a86a08); color: #3b2203; text-shadow: 0 1px 0 #ffe6a8; }
.kz-btn.revive {
  height: 52px;
  padding: 0 22px;
  font-size: 16px;
  background: linear-gradient(#54b84a, #24701f);
  border-color: #123d10;
  box-shadow: 0 5px 0 #123d10, 0 8px 20px rgba(0, 0, 0, .4);
}
.kz-btn.cool { filter: grayscale(.55) brightness(.85); }
.kz-btn:disabled { cursor: default; }

/* 暂停弹窗里的加阳光按钮 */
.kz-pause-btn {
  position: absolute;
  left: 110px;
  top: 332px;
  width: 214px;
  height: 38px;
  z-index: 260;
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid #3d2409;
  border-radius: 10px;
  cursor: pointer;
  color: #ffe9b0;
  background: linear-gradient(#a76a25, #6d3f10);
  box-shadow: 0 3px 0 #2c1905;
  font-family: "PingFang SC", "Microsoft YaHei", "SimSun", sans-serif;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .5px;
  touch-action: manipulation;
}
.kz-pause-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #2c1905; }
.kz-pause-btn.cool { filter: grayscale(.55) brightness(.85); }

#kzToast {
  position: absolute;
  left: calc(var(--kz-stage-w, 900px) / 2);
  top: calc(var(--kz-stage-h, 600px) + 64px);
  transform: translate(-50%, 8px);
  z-index: 900;
  max-width: min(86vw, 460px);
  padding: 10px 16px;
  border-radius: 12px;
  border: 2px solid #3d2409;
  background: rgba(28, 17, 6, .94);
  color: #ffe9b0;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
#kzToast.on { opacity: 1; transform: translate(-50%, 0); }

/* 手机 / 平板：按钮再大一点，手指好点 */
.kz-touch .kz-btn { height: 66px; padding: 0 16px; font-size: 16px; border-radius: 14px; }
.kz-touch .kz-btn .kz-ico { font-size: 21px; }
.kz-touch .kz-btn.revive { height: 72px; font-size: 18px; }
.kz-touch #kzHud {
  left: calc(var(--kz-stage-w, 900px) / 2);
  width: calc(100vw - 10px);
  max-width: 440px;
  gap: 4px;
  padding: 5px;
  box-sizing: border-box;
}
.kz-touch #kzHud .kz-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 0 4px;
  gap: 3px;
  font-size: 14px;
  letter-spacing: 0;
}
.kz-touch #kzHud .kz-btn .kz-ico { font-size: 18px; }
.kz-touch .kz-pause-btn { height: 44px; font-size: 15px; }

/* 矮窗口（比如 1024x640）把提示放到游戏底部上方，避免跑出屏幕 */
@media (max-height: 700px) {
  #kzToast { top: calc(var(--kz-stage-h, 600px) - 58px); }
}
