:root {
  --green: #6b8f4e;
  --ink: #3d4a2e;
  --muted: #5a6848;
  --gold: #ffd76a;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  touch-action: none;
}

html,
body {
  margin: 0;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  font-family: "Jua", system-ui, sans-serif;
  background: #4a8a38;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.stage {
  position: relative;
  width: min(100vw, calc(100dvh * 0.557));
  height: min(100dvh, calc(100vw / 0.557));
  max-width: 420px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  background: #7ec8ff;
  cursor: none;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hud {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
  z-index: 3;
}

.panel {
  background: rgba(40, 52, 28, 0.42);
  backdrop-filter: blur(8px);
  border-radius: 14px;
  padding: 8px 12px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  min-width: 96px;
}

.panel.right {
  align-items: flex-end;
}

.panel b {
  font-size: 16px;
}

.lives {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.life {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff8a8a;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
}

.life.empty {
  background: rgba(255, 255, 255, 0.25);
}

.goal-meter {
  position: absolute;
  top: 72px;
  left: 12px;
  right: 12px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
  pointer-events: none;
  z-index: 3;
}

.goal-meter > i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffe27a, #6b8f4e);
  border-radius: inherit;
  transition: width 0.15s ease;
}

.combo-bar {
  position: absolute;
  top: 88px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 215, 106, 0.92);
  color: #4a3818;
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 14px;
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.combo-bar.hidden {
  display: none;
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 50% 15%, rgba(255, 255, 255, 0.55), transparent 48%),
    linear-gradient(180deg, rgba(126, 200, 255, 0.92), rgba(159, 216, 120, 0.95), rgba(220, 245, 200, 0.96));
  cursor: auto;
}

.overlay.hidden {
  display: none;
}

.hero-art {
  width: min(42vw, 168px);
  height: min(42vw, 168px);
  object-fit: cover;
  border-radius: 28px;
  margin-bottom: 10px;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.35),
    0 0 0 3px rgba(107, 159, 72, 0.35);
}

.badge {
  display: inline-block;
  background: var(--green);
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  margin-bottom: 8px;
}

.badge.soft {
  background: var(--gold);
  color: #4a3818;
}

h1 {
  margin: 0;
  font-family: "Bagel Fat One", "Jua", cursive;
  font-weight: 400;
  font-size: clamp(34px, 9vw, 46px);
  color: var(--green);
  text-shadow: 0 3px 0 #fff;
}

.overlay p {
  margin: 8px 0 14px;
  color: var(--muted);
  line-height: 1.45;
}

.icons {
  font-size: 14px;
  margin-bottom: 14px;
  color: var(--muted);
}

.btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 13px 32px;
  font: inherit;
  font-size: 18px;
  color: #fff;
  background: linear-gradient(180deg, #8ec06a, #5a8040);
  box-shadow: 0 7px 0 #3d5a28;
  cursor: pointer;
}

.btn:active {
  transform: translateY(3px);
  box-shadow: 0 4px 0 #3d5a28;
}

a {
  margin-top: 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}
