* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #7ec8ff;
  color: #3a2414;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
#stage {
  position: relative;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
}
.bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.hud {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  left: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
  z-index: 4;
  pointer-events: none;
}
.pill {
  background: rgba(255, 252, 245, 0.94);
  border-radius: 16px;
  padding: 8px 12px;
  min-width: 72px;
  box-shadow: 0 4px 0 rgba(58, 36, 20, 0.08);
}
.pill .lab {
  display: block;
  font-size: 12px;
  color: #8a6a4a;
  line-height: 1.1;
}
.pill strong {
  font-size: 22px;
  line-height: 1.15;
  color: #ff8a3d;
}
.combo-pill strong { color: #e4572e; }
.life-pill { margin-left: auto; }
#field {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.drop {
  position: absolute;
  width: 64px;
  height: 64px;
  margin-left: -32px;
  margin-top: -32px;
}
.drop img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.basket {
  position: absolute;
  width: 132px;
  height: 92px;
  z-index: 3;
  left: 50%;
  bottom: 7%;
  margin-left: -66px;
  pointer-events: none;
}
.basket img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: rgba(42, 28, 16, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.sheet {
  width: min(320px, 100%);
  background: #fff8ef;
  border-radius: 20px;
  padding: 22px 18px 16px;
  text-align: center;
}
.sheet h2 {
  margin: 0 0 8px;
  font-size: 26px;
  color: #ff8a3d;
}
.sheet p {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.5;
  color: #6b5340;
}
.btn {
  display: block;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 700;
  margin-top: 10px;
  background: #fff;
  color: #6b5340;
}
.btn.primary, .btn.ad {
  background: #ff8a3d;
  color: #fff;
}
.btn.ghost {
  background: #ffe8d4;
  color: #c45b18;
}
.btn:disabled { opacity: 0.6; }
.hidden { display: none !important; }
.toast {
  position: absolute;
  left: 50%;
  top: 22%;
  transform: translateX(-50%);
  z-index: 7;
  background: rgba(42, 28, 16, 0.82);
  color: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  max-width: 80%;
  text-align: center;
}
