:root {
  --ink: #2a2118;
  --muted: #534033;
  --cream: #fffdf4;
  --lemon: #ffe27a;
  --mint: #b8f0d0;
  --peach: #ffd4c4;
  --pink: #ff9ec4;
  --edu-font: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

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

html,
body {
  margin: 0;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  font-family: var(--edu-font);
  font-weight: 700;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  background: #f3e2b0;
  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: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 10%, rgba(255, 255, 255, 0.7), transparent 28%),
    radial-gradient(circle at 90% 14%, rgba(184, 240, 208, 0.7), transparent 30%),
    linear-gradient(180deg, #fff3b0 0%, #d9f7e4 48%, #ffe8d2 100%);
  box-shadow: 0 18px 44px rgba(74, 55, 40, 0.18);
}

.hud {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.icon-btn,
.icon-play {
  appearance: none;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 52px;
  padding: 0;
  border-radius: 16px;
  font-size: 24px;
  text-decoration: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 5px 0 rgba(201, 138, 62, 0.28);
  cursor: pointer;
}

.icon-btn.lg {
  min-width: 64px;
  min-height: 64px;
  font-size: 28px;
}

.icon-play {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  font-size: 36px;
  color: #fff;
  background: linear-gradient(180deg, #ffb347, #ff8c42);
  box-shadow: 0 8px 0 #d96a28;
}

.icon-play:active,
.icon-btn:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 rgba(201, 138, 62, 0.28);
}

.progress-pill {
  margin: 0;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  font-size: 16px;
}

.play {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 72px 14px 16px;
}

.jamo {
  margin: 0 0 6px;
  font-family: var(--edu-font);
  font-weight: 900;
  font-size: clamp(72px, 22vw, 108px);
  line-height: 1;
  color: #c94a16;
  text-shadow: 0 4px 0 #fff;
}

.prompt {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.choices {
  flex: 1;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-content: start;
}

.choice {
  appearance: none;
  border: 4px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  min-height: 96px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 0 rgba(201, 138, 62, 0.22);
  cursor: pointer;
}

.choice img {
  width: 78px;
  height: 78px;
  flex: none;
}

.choice .word {
  font-size: 22px;
  color: var(--ink);
}

.choice:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 rgba(201, 138, 62, 0.22);
}

.choice.correct {
  animation: pop 0.45s ease;
  border-color: #6fd6b0;
  background: #e8fff4;
}

.choice.hint {
  animation: glow 0.9s ease-in-out infinite;
}

.choice.shake {
  animation: shake 0.35s ease;
}

@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 6px 0 rgba(201, 138, 62, 0.22), 0 0 0 0 rgba(255, 179, 71, 0.7); }
  50% { box-shadow: 0 6px 0 rgba(201, 138, 62, 0.22), 0 0 0 8px rgba(255, 179, 71, 0.25); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 18px;
  text-align: center;
  background: rgba(255, 248, 230, 0.94);
}

.overlay.hidden {
  display: none;
}

.badge {
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: #ffe27a;
  font-size: 14px;
}

.badge.soft {
  background: #b8f0d0;
}

.hero {
  width: 140px;
  height: 140px;
}

.hero.small {
  width: 110px;
  height: 110px;
}

h1, h2 {
  margin: 0;
  font-family: var(--edu-font);
  font-weight: 900;
  font-size: 34px;
}

.lead,
.learned {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
}

.learned {
  font-size: 28px;
  color: #c94a16;
}

.parent-note {
  margin: 0;
  max-width: 280px;
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.45;
}

.done-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 8px;
}

.home-link {
  margin-top: 6px;
  font-size: 28px;
  text-decoration: none;
}
