:root {
  --blue: #4aa3ef;
  --ink: #2f4a66;
  --muted: #5a7088;
}

* {
  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%, #b8e4ff 45%, #ffe8f5 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(80, 140, 200, 0.35);
  background: #9fd8ff;
  border: 3px solid rgba(255, 255, 255, 0.75);
}

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(30, 50, 80, 0.4);
  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;
}

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

.goal-meter > i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #a8e6ff, #7ec8ff 40%, #c9a0ff);
  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(168, 220, 255, 0.94), rgba(230, 244, 255, 0.96));
}

.overlay.hidden {
  display: none;
}

.badge {
  display: inline-block;
  background: var(--blue);
  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(80, 140, 200, 0.25);
}

h1 {
  margin: 0;
  font-family: "Bagel Fat One", "Jua", cursive;
  font-weight: 400;
  font-size: clamp(32px, 8vw, 44px);
  color: #3d8fd9;
  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, #7ec8ff, #4aa3ef);
  box-shadow: 0 7px 0 #2f79c2;
  cursor: pointer;
}

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

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