:root {
  --ink: #3d2a45;
  --pink: #ff4f8b;
  --sky: #7ec8ff;
}

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

html,
body {
  margin: 0;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  font-family: "Jua", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #7ec8ff 0%, #d9f0ff 45%, #ffe3ef 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage {
  position: relative;
  width: min(100vw, calc(100dvh * 0.557));
  height: min(100dvh, calc(100vw / 0.557));
  max-width: 420px;
  border-radius: 24px;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 24px 70px rgba(80, 140, 180, 0.35);
  background: #6ec8ff;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

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

.panel {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(61, 42, 54, 0.12);
}

.panel.right {
  text-align: right;
}

.panel b {
  font-variant-numeric: tabular-nums;
  color: var(--pink);
}

.hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  color: #3a8fd4;
  pointer-events: none;
  z-index: 3;
  white-space: nowrap;
}

.hint.hidden {
  display: none;
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 236, 245, 0.9));
  backdrop-filter: blur(6px);
}

.overlay.hidden {
  display: none;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #fff;
  background: linear-gradient(180deg, #ff8ab5, var(--pink));
  box-shadow: 0 3px 0 #d93f74;
}

.badge.soft {
  background: linear-gradient(180deg, #7ec8ff, #3a8fd4);
  box-shadow: 0 3px 0 #2a6fa8;
}

.title-art {
  font-size: 56px;
  line-height: 1;
  filter: drop-shadow(0 8px 0 rgba(255, 79, 139, 0.2));
}

.title-mascot {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: 28px;
  background: linear-gradient(180deg, #ffe8f2, #ffd0e4);
  box-shadow: 0 8px 0 rgba(255, 79, 139, 0.2);
  image-rendering: auto;
}

.overlay h1 {
  margin: 4px 0 0;
  font-family: "Bagel Fat One", "Jua", cursive;
  font-weight: 400;
  font-size: clamp(28px, 8vw, 36px);
  color: var(--pink);
  text-shadow: 0 3px 0 #fff;
}

.overlay p {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: #5a4558;
}

.title-controls {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 6px 0 4px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  color: #3a8fd4;
}

.btn {
  appearance: none;
  border: none;
  min-width: 160px;
  min-height: 48px;
  margin-top: 6px;
  padding: 0 22px;
  border-radius: 999px;
  font: inherit;
  font-size: 18px;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, #ff8ab5, var(--pink));
  box-shadow: 0 5px 0 #d93f74;
}

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

.overlay a {
  margin-top: 4px;
  color: #3a8fd4;
  text-decoration: none;
  font-size: 14px;
}
