:root {
  --pink: #ff6b9d;
  --ink: #4a3545;
  --muted: #7a5a68;
}

* {
  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: linear-gradient(180deg, #7ec8ff 0%, #d7f0ff 40%, #ffe6f1 100%);
  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(120, 100, 140, 0.3);
  background: #9fd8ff;
  border: 3px solid rgba(255, 255, 255, 0.8);
}

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(61, 42, 54, 0.38);
  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;
}

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

.life {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff8ab5;
  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, #ff6b9d);
  border-radius: inherit;
  transition: width 0.15s ease;
}

.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% 18%, rgba(255, 255, 255, 0.55), transparent 50%),
    linear-gradient(180deg, rgba(159, 216, 255, 0.92), rgba(255, 232, 240, 0.95));
}

.overlay.hidden {
  display: none;
}

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

.badge.soft {
  background: #6fd6b0;
}

.title-thumb {
  border-radius: 24px;
  margin-bottom: 8px;
  box-shadow: 0 8px 0 rgba(200, 100, 140, 0.25);
}

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

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

.icons {
  font-size: 28px;
  letter-spacing: 6px;
  margin-bottom: 14px;
}

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

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

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