:root {
  --bg-top: #ecfeff;
  --bg-bottom: #dbeafe;
  --ink: #0f172a;
  --brand: #0ea5e9;
  --brand-deep: #0369a1;
  --warm: #f97316;
  --card-top: #fff8e7;
  --card-bottom: #ffffff;
  --shadow: 0 14px 28px rgba(15, 23, 42, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Patrick Hand', 'Ma Shan Zheng', 'KaiTi', 'STKaiti', cursive;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(14, 165, 233, 0.2), transparent 30%),
    radial-gradient(circle at 90% 20%, rgba(251, 191, 36, 0.26), transparent 28%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

.page {
  width: min(1080px, 92vw);
  margin: 0 auto;
  padding: 28px 0 36px;
}

.hero {
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
  border: 3px solid rgba(14, 165, 233, 0.35);
  border-radius: 26px;
  padding: 20px 18px;
  box-shadow: var(--shadow);
  animation: pop-in 500ms ease both;
}

.tag {
  margin: 0;
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--brand-deep), var(--brand));
  letter-spacing: 1px;
  font-size: 0.92rem;
}

h1 {
  margin: 12px 0 8px;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  line-height: 1.1;
  font-family: 'Ma Shan Zheng', 'Patrick Hand', 'KaiTi', 'STKaiti', cursive;
  letter-spacing: 1px;
}

.subtitle {
  margin: 0;
  font-size: 1.06rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.action-btn {
  border: 0;
  border-radius: 14px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(180deg, var(--brand), var(--brand-deep));
  box-shadow: 0 8px 16px rgba(3, 105, 161, 0.32);
}

.action-btn.muted {
  background: linear-gradient(180deg, #f97316, #ea580c);
  box-shadow: 0 8px 16px rgba(234, 88, 12, 0.34);
}

.status {
  margin: 12px 0 2px;
  font-size: 0.98rem;
  color: #0c4a6e;
}

.alphabet-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.letter-card {
  border: 2px solid #bae6fd;
  border-radius: 18px;
  padding: 12px 8px 11px;
  background: linear-gradient(180deg, var(--card-top), var(--card-bottom));
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.09);
  display: grid;
  place-items: center;
  row-gap: 4px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
  animation: rise 420ms ease both;
}

.letter-card:hover,
.letter-card:focus-visible {
  transform: translateY(-2px) scale(1.02);
  border-color: #38bdf8;
  box-shadow: 0 14px 20px rgba(14, 165, 233, 0.3);
  outline: 0;
}

.letter-card.is-active {
  border-color: #fb923c;
  box-shadow: 0 14px 22px rgba(251, 146, 60, 0.42);
}

.letter-upper {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1;
  font-family: 'Patrick Hand', 'Ma Shan Zheng', cursive;
}

.letter-lower {
  font-size: clamp(1.35rem, 2.2vw, 1.95rem);
  color: #0c4a6e;
  line-height: 1;
  font-family: 'Patrick Hand', 'Ma Shan Zheng', cursive;
}

.letter-word {
  font-family: 'Patrick Hand', 'Comic Sans MS', cursive;
  font-size: 1.02rem;
  color: #9a3412;
  letter-spacing: 0.3px;
}

@media (max-width: 900px) {
  .alphabet-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .page {
    width: min(94vw, 540px);
    padding-top: 20px;
  }

  .hero {
    padding: 18px 12px;
  }

  .alphabet-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
