.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 38px 0 44px;
}

.category-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 256px;
  padding: 24px;
  border: 2px solid transparent;
  border-radius: 30px;
  color: #273942;
  text-align: left;
  box-shadow: 0 12px 25px rgba(44, 54, 51, .055);
  transition: transform .18s ease, box-shadow .18s ease;
}

.category-card:hover { transform: translateY(-5px); box-shadow: 0 18px 30px rgba(44, 54, 51, .1); }
.category-math { background: #ccefe1; }
.category-language { background: #f6dfb7; }
.category-life { background: #e7e0f5; }
.category-icon { display: grid; place-items: center; width: 86px; height: 86px; border-radius: 25px; background: rgba(255,255,255,.64); font-size: 54px; font-weight: 900; }
.category-copy { display: flex; flex-direction: column; gap: 7px; margin-top: auto; }
.category-copy strong { font-size: 28px; font-weight: 900; letter-spacing: -.04em; }
.category-copy small { color: #617078; font-size: 14px; font-weight: 600; }
.category-count { color: #41665d; font-size: 12px; font-weight: 850; }
.category-arrow { position: absolute; right: 25px; bottom: 25px; font-size: 25px; }
.category-screen { padding-top: 17px; }
.category-heading { margin: 28px 0 0; }
.category-heading h2 { margin: 8px 0 10px; font-size: clamp(38px, 6vw, 60px); letter-spacing: -.05em; }
.category-screen .mode-grid { margin: 29px 0 38px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.category-screen .mode-grid .advanced-mode-card { margin: 0; }
.category-screen .mode-grid .mode-card:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 145px; flex-direction: row; align-items: center; gap: 22px; }
.category-screen .mode-grid .mode-card:last-child:nth-child(odd) .mode-symbol { width: 75px; height: 75px; font-size: 47px; }
.category-screen .mode-grid .mode-card:last-child:nth-child(odd) .mode-text { margin: 0; }
.category-screen .mode-grid .mode-card:last-child:nth-child(odd) .mode-arrow { top: 48px; bottom: auto; }
.language-group { margin: 28px 0 36px; }
.language-group h3 { margin: 0 0 15px; color: #273942; font-size: 26px; font-weight: 900; }
.language-group h3 small { margin-left: 8px; color: #617078; font-size: 14px; font-weight: 600; }
.category-screen .language-mode-grid { margin: 0; }
.mode-englishvoice { background: #dcecf7; }
.mode-englishvoice .mode-symbol { font-size: 46px; }

.home-screen .mode-card {
  min-height: 195px;
}

.mode-letters {
  background: #f9e7ac;
}

.mode-letters .mode-symbol {
  font-size: 44px;
  letter-spacing: -.09em;
}

.mode-bopo {
  background: #f4dce8;
}

.mode-bopo .mode-symbol {
  font-size: 58px;
}

.mode-blend {
  background: #e8eed0;
}

.mode-blend .mode-symbol {
  font-size: 35px;
  letter-spacing: -.1em;
}

.mode-shop { background: #ffe0be; }
.mode-shop .mode-symbol { font-size: 48px; }

.home-screen .mode-clock {
  background: #dcecf4;
}

.mode-clock .mode-symbol {
  font-size: 56px;
}

.mode-music {
  background: #e7e0f5;
}

.mode-music .mode-symbol {
  font-size: 64px;
}

.home-screen .advanced-mode-card {
  width: 100%;
  min-height: 126px;
  flex-direction: row;
  align-items: center;
  gap: 22px;
  margin: 0 0 19px;
}

.advanced-mode-card .mode-symbol {
  width: 74px;
  height: 74px;
  font-size: 52px;
}

.advanced-mode-card .mode-text {
  margin: 0;
}

.advanced-mode-card .mode-arrow {
  top: 42px;
  bottom: auto;
}

.question-card {
  position: relative;
}

.clock-face {
  width: min(190px, 65vw);
  margin: 8px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.clock-face svg {
  display: block;
  width: 100%;
  filter: drop-shadow(0 9px 13px rgba(36, 53, 65, .10));
}

.clock-rim { fill: #fff; stroke: #93b8b1; stroke-width: 5; }
.clock-face text { fill: #314850; font: 700 20px -apple-system, BlinkMacSystemFont, sans-serif; }
.clock-hour-hand { stroke: #314850; stroke-width: 9; stroke-linecap: round; }
.clock-minute-hand { stroke: #e18b67; stroke-width: 5; stroke-linecap: round; }
.clock-center { fill: #314850; }
.clock-legend { font-size: 13px; font-weight: 800; color: #71847c; }
.clock-question h2 { font-size: clamp(28px, 5vw, 37px); margin: 10px 0 4px; }
.question-actions { display: flex; flex-direction: column; align-items: center; }
.clock-question .question-actions { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 10px; }

.music-stage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin: 21px 0 7px;
}

.music-sound-card {
  width: 126px;
  height: 119px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 23px;
  background: #e9e4f6;
  color: #5b547e;
}

.music-sound-card strong { font-size: 48px; line-height: 1; }
.music-sound-card small { margin-top: 12px; font-size: 13px; font-weight: 800; }
.music-stage-arrow { color: #918ba6; font-size: 30px; font-weight: 800; }
.music-status { width: 100%; color: #77718c; font-size: 13px; font-weight: 800; }
.music-stage.playing .music-sound-card { animation: music-pulse .65s ease-in-out infinite alternate; }
.music-stage.playing .music-sound-card:nth-child(3) { animation-delay: .3s; }
.music-question h2 { font-size: clamp(29px, 5vw, 41px); margin: 11px 0 6px; }
.music-question .question-actions { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 10px; }
.music-question #speak-question { background: #d9d0f4; color: #4e477a; font-size: 17px; padding: 13px 22px; }
.music-answer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.music-answer-grid .answer-button { font-size: 24px; }
.blend-answer-grid .answer-button { font-size: clamp(28px, 5vw, 38px); letter-spacing: .04em; }

.shop-question h2 { font-size: clamp(29px, 5vw, 42px); margin: 12px 0 8px; }
.shop-stage { margin: 6px auto 16px; width: min(100%, 390px); padding: 14px 18px; border-radius: 20px; background: #fff2db; }
.shop-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.shop-item { padding: 10px 6px; border-radius: 12px; background: #fffaf1; color: #6d5139; font-size: 16px; font-weight: 800; }
.shop-stage.shop-solved { background: #e3f5e9; box-shadow: inset 0 0 0 2px #8acaa4; }
.shop-success { margin-top: 10px; color: #347659; font-size: 23px; font-weight: 900; animation: shop-pop .45s ease-out both; }
@keyframes shop-pop { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: scale(1); } }
.shop-total-line { color: #6c624f; font-size: 17px; font-weight: 800; }
.shop-total-line > strong { color: #b97136; font-size: 34px; }
.shop-total-line span { color: #776b5d; }
.shop-selected-coins { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; min-height: 32px; color: #827667; font-size: 13px; font-weight: 700; }
.shop-chosen-coin { display: grid; place-items: center; min-width: 31px; height: 31px; padding: 0 5px; border-radius: 50%; background: #f7d898; border: 2px solid #d4a85a; color: #765029; font-size: 13px; font-weight: 900; }
.shop-answer-grid { display: flex; flex-direction: column; align-items: center; gap: 13px; margin-top: 15px; }
.shop-coin-row { display: flex; justify-content: center; gap: 13px; width: 100%; }
.shop-coin { width: 84px; height: 84px; border: 3px solid #d8b777; border-radius: 50%; background: #fbe5ac; box-shadow: 0 6px 0 #d5bd86; color: #725128; font-size: 19px; font-weight: 900; }
.shop-coin:nth-child(2) { background: #e7ecdf; border-color: #abb9a1; box-shadow: 0 6px 0 #c4cfbd; color: #536650; }
.shop-coin:nth-child(3) { background: #f8d8b2; border-color: #d3a375; box-shadow: 0 6px 0 #dfb998; color: #8b5835; }
.shop-coin:active { transform: translateY(4px); box-shadow: 0 2px 0 #c6ac7b; }
.shop-tools { display: flex; gap: 10px; }
.shop-tools button { border: 1.5px solid #e2d7c3; border-radius: 999px; background: #fffaf1; padding: 9px 18px; color: #6a645b; font-size: 14px; font-weight: 800; }
.shop-tools button:disabled, .shop-check:disabled { opacity: .46; cursor: default; }
.shop-check { width: min(100%, 320px); margin-top: 1px; }
.shop-check.shop-paid { background: #7ebfa4; }

.voice-privacy { max-width: 610px; margin: -24px 0 26px; color: #6f7772; font-size: 13px; line-height: 1.7; }
.voice-status { text-align: center; color: #4b706a; font-size: 15px; font-weight: 800; line-height: 1.6; margin: 13px auto; }
.voice-answer-grid { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.voice-record { min-width: min(100%, 320px); justify-content: center; }
.voice-confirm { border: 0; background: transparent; color: #46746a; font-size: 14px; font-weight: 800; padding: 12px; }
.voice-replay { margin: 24px auto; max-width: 560px; padding: 22px; border-radius: 24px; background: #fffaf3; text-align: center; }
.voice-replay h3 { margin: 0 0 6px; color: #2b6157; font-size: 23px; }
.voice-replay p { color: #657a72; font-size: 14px; }
.voice-replay-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin: 19px 0 13px; }
.voice-replay-button { border: 2px solid #b7dccb; border-radius: 15px; background: #eaf7ed; color: #286852; padding: 12px 14px; font-size: 15px; font-weight: 900; }
.voice-replay small { color: #758780; font-size: 12px; }

@keyframes music-pulse { to { transform: scale(1.045); box-shadow: 0 6px 18px rgba(91, 84, 126, .13); } }

.celebration {
  position: absolute;
  top: 24px;
  right: 28px;
  color: #efa93d;
  font-size: 29px;
  letter-spacing: .13em;
  pointer-events: none;
  animation: celebrate .55s ease-out both;
}

@keyframes celebrate {
  from { opacity: 0; transform: translateY(12px) scale(.7) rotate(-10deg); }
  55% { opacity: 1; transform: translateY(-8px) scale(1.15) rotate(5deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

.home-screen .journey-heading {
  margin-top: 0;
}

@media (max-width: 700px) {
  .category-grid { grid-template-columns: 1fr; gap: 13px; margin: 30px 0 35px; }
  .category-card { min-height: 124px; padding: 18px 20px; border-radius: 22px; flex-direction: row; align-items: center; gap: 17px; }
  .category-icon { width: 70px; height: 70px; flex: none; border-radius: 19px; font-size: 46px; }
  .category-copy { margin: 0; gap: 3px; }
  .category-copy strong { font-size: 22px; }
  .category-copy small { font-size: 12px; }
  .category-count { font-size: 11px; }
  .category-arrow { right: 17px; bottom: 44px; font-size: 20px; }
  .category-screen { padding-top: 4px; }
  .category-heading { margin-top: 18px; }
  .category-screen .mode-grid {
    margin: 24px 0 34px;
    grid-template-columns: 1fr;
  }
  .category-screen .mode-grid .mode-card:last-child:nth-child(odd) { min-height: 118px; gap: 17px; }
  .category-screen .mode-grid .mode-card:last-child:nth-child(odd) .mode-symbol { width: 72px; height: 72px; font-size: 42px; }
  .category-screen .mode-grid .mode-card:last-child:nth-child(odd) .mode-arrow { top: auto; bottom: 42px; }
  .language-group { margin: 24px 0 32px; }
  .language-group h3 { font-size: 23px; }
  .language-group h3 small { font-size: 12px; }
  .category-screen .language-mode-grid { margin: 0; }

  .home-screen .mode-card {
    min-height: 118px;
  }

  .mode-letters .mode-symbol {
    font-size: 32px;
  }

  .mode-bopo .mode-symbol {
    font-size: 43px;
  }

  .mode-blend .mode-symbol {
    font-size: 29px;
  }

  .mode-shop .mode-symbol { font-size: 40px; }

  .home-screen .mode-clock {
    min-height: 118px;
  }

  .mode-clock .mode-symbol {
    font-size: 43px;
  }

  .mode-music .mode-symbol {
    font-size: 48px;
  }

  .music-sound-card { width: 97px; height: 94px; border-radius: 18px; }
  .music-sound-card strong { font-size: 37px; }
  .music-sound-card small { margin-top: 8px; font-size: 11px; }
  .music-stage-arrow { font-size: 22px; }
  .music-answer-grid { gap: 8px; }
  .music-answer-grid .answer-button { min-height: 74px; font-size: 19px; }
  .blend-answer-grid .answer-button { min-height: 76px; font-size: clamp(21px, 6vw, 29px); }
  .shop-coin { width: 77px; height: 77px; font-size: 17px; }
  .shop-stage { padding: 12px 14px; }

  .home-screen .advanced-mode-card {
    min-height: 118px;
    gap: 17px;
    margin-bottom: 13px;
  }

  .advanced-mode-card .mode-symbol {
    width: 72px;
    height: 72px;
    font-size: 48px;
  }

  .advanced-mode-card .mode-arrow {
    top: auto;
    bottom: 42px;
  }

  .celebration {
    top: 13px;
    right: 15px;
    font-size: 21px;
  }
}

@media (max-width: 390px) {
  .category-card { gap: 12px; }
  .category-icon { width: 63px; height: 63px; font-size: 42px; }
  .category-copy strong { font-size: 19px; }
  .category-arrow { right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .celebration { animation: none; }
  .shop-success { animation: none; }
  .music-stage.playing .music-sound-card { animation: none; }
}

.review-suggestions { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: -8px 0 25px; padding: 19px 22px; background: #fffaf0; border: 1px solid #e6deca; border-radius: 22px; }
.review-suggestions strong { color: #345c50; font-size: 17px; }
.review-suggestions p { margin: 6px 0 0; color: #6c7d75; font-size: 13px; line-height: 1.5; }
.review-list { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.review-choice { border: 1px solid #bed8c8; border-radius: 999px; padding: 9px 13px; background: #edf6e9; color: #356c54; font-size: 13px; font-weight: 800; }
.learning-overview { display: grid; gap: 8px; }
.learning-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding: 12px 0; border-top: 1px solid #e7ede4; }
.learning-row strong { color: #345c50; font-size: 15px; }
.learning-row span { color: #64746d; font-size: 13px; font-weight: 700; }
.learning-row small { flex: 0 0 100%; color: #786c5e; font-size: 12px; line-height: 1.6; }
@media (max-width: 700px) {
  .review-suggestions { flex-direction: column; align-items: stretch; margin-top: -12px; }
  .review-list { justify-content: flex-start; }
  .learning-row { display: block; }
  .learning-row span, .learning-row small { display: block; margin-top: 5px; }
}
