.learning-apps-page [hidden] {
  display: none !important;
}

.learning-apps-page nav a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
}

.apps-hero {
  padding-block: 65px 45px;
}

.apps-hero h1 {
  max-width: 890px;
  font-size: clamp(40px, 4.3vw, 58px);
}

.apps-description {
  max-width: 625px;
  margin: 23px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.apps-jump-links {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  margin-top: 23px;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 25px;
  align-items: start;
}

.practice-panel {
  min-width: 0;
  padding: 31px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  scroll-margin-top: 24px;
}

.practice-heading h3 {
  font-size: 30px;
  letter-spacing: -.035em;
}

.practice-heading p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.practice-instruction {
  min-height: 48px;
  margin: 20px 0 16px;
  color: #52636a;
  font-size: 13px;
  line-height: 1.8;
}

.practice-progress {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}

.word-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 294px;
  padding: 25px;
  border: 1px solid #cddbd2;
  border-radius: 15px;
  background: #edf3ee;
  color: var(--ink);
  transition: background .18s ease, border-color .18s ease;
}

.word-card:hover {
  background: #e5eee7;
  border-color: #87aa98;
}

.word-card.is-revealed {
  background: #e1eee5;
  border-color: #80a28e;
}

.word-character,
.math-rhyme {
  font-family: "Microsoft YaHei", "Noto Sans CJK SC", "PingFang SC", sans-serif;
}

.word-character {
  font-size: clamp(55px, 5.8vw, 78px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: .08em;
}

.word-pinyin {
  margin-top: 10px;
  color: var(--accent);
  font-size: 22px;
  line-height: 1.4;
}

.word-meaning {
  margin-top: 19px;
  color: var(--ink);
  font-size: 23px;
  line-height: 1.4;
  font-weight: 600;
}

.word-card-action {
  margin-top: 22px;
  color: #476b5b;
  font-size: 12px;
  font-weight: 550;
}

.practice-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: 20px;
}

.practice-controls .button {
  min-height: 46px;
  padding-inline: 17px;
}

.math-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 13px;
  margin: 0 0 18px;
}

.math-toolbar label {
  font-size: 13px;
  font-weight: 600;
}

.math-toolbar select {
  max-width: 100%;
  min-height: 42px;
  padding: 8px 34px 8px 12px;
  border: 1px solid #c7d2c9;
  border-radius: 8px;
  background: #f7f8f3;
  color: var(--ink);
  font-size: 13px;
}

.math-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 218px;
  padding: 25px 18px;
  border-radius: 15px;
  background: var(--night);
  text-align: center;
}

.math-equation {
  margin: 0;
  color: #f5f7f0;
  font-size: clamp(30px, 3.7vw, 44px);
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}

.math-rhyme {
  margin: 15px 0 0;
  color: #b9ddce;
  font-size: 25px;
  line-height: 1.5;
  letter-spacing: .05em;
}

.math-feedback {
  max-width: 340px;
  margin: 17px 0 0;
  color: #bac8cc;
  font-size: 13px;
  line-height: 1.75;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.answer-choice {
  min-height: 59px;
  padding: 10px;
  border: 1px solid #cad5cc;
  border-radius: 10px;
  background: #f5f7f1;
  color: var(--ink);
  font-size: 23px;
  line-height: 1.3;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.answer-choice:hover:not(:disabled) {
  border-color: #6e9d88;
  background: #e9f1e9;
}

.answer-choice.is-correct {
  border-color: #5e9177;
  background: #e0eee4;
  color: #1d5944;
}

.answer-choice.is-wrong {
  border-color: #c49377;
  background: #f5e9de;
  color: #864b2c;
}

.learning-apps-page button:disabled {
  cursor: default;
}

.answer-choice:disabled {
  opacity: 1;
}

.original-apps {
  padding-bottom: 55px;
}

.original-project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 25px;
}

.original-project-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d2d9d1;
  border-radius: 16px;
  background: var(--white);
}

.original-project-art {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 116px;
  padding: 24px 29px;
  border-bottom: 1px solid #d4ddd2;
}

.original-project-art > span:first-child {
  font-size: 38px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -.025em;
}

.original-project-art > span:last-child {
  font-size: 12px;
  color: #53685c;
}

.chinese-project-art {
  background: #e8eee3;
  color: #406a50;
}

.chinese-project-art > span:first-child {
  font-family: "Microsoft YaHei", "Noto Sans CJK SC", "PingFang SC", sans-serif;
}

.multiplication-project-art {
  background: #eee6da;
  color: #6c634e;
  border-bottom-color: #ded6c9;
}

.multiplication-project-art > span:last-child {
  color: #796d5d;
}

.original-project-copy {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 27px 29px 29px;
}

.original-project-copy h3 {
  font-size: 27px;
  line-height: 1.25;
}

.original-project-copy > p:not(.availability) {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.original-project-copy > p.original-project-detail {
  margin-top: 12px;
  font-size: 12px;
}

.original-project-copy > p.original-project-name {
  margin-top: 10px;
  color: var(--accent);
  font-size: 12px;
  line-height: 1.7;
}

.original-project-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  margin-top: auto;
  padding-top: 22px;
}

.external-link-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.original-project-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.practice-previews {
  padding-block: 48px 58px;
  border-top: 1px solid var(--line);
}

.apps-note {
  margin-top: 25px;
  color: var(--muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1080px) {
  .apps-grid {
    gap: 20px;
  }

  .original-project-grid { gap: 20px; }
  .original-project-copy { padding: 24px; }
  .original-project-copy h3 { font-size: 25px; }
  .original-project-art { padding-inline: 24px; }

  .practice-panel {
    padding: 25px;
  }

  .practice-heading h3 {
    font-size: 27px;
  }
}

@media (max-width: 780px) {
  .apps-hero {
    padding-block: 43px 32px;
  }

  .apps-hero h1 {
    font-size: clamp(37px, 7.3vw, 54px);
  }

  .apps-description {
    font-size: 16px;
  }

  .apps-grid {
    grid-template-columns: 1fr;
  }

  .practice-instruction {
    min-height: auto;
  }

  .word-character {
    font-size: 72px;
  }

  .original-apps {
    padding-bottom: 35px;
  }

  .original-project-grid { grid-template-columns: 1fr; gap: 20px; }
  .original-project-copy h3 { font-size: 27px; }
  .practice-previews { padding-block: 36px 43px; }
}

@media (max-width: 450px) {
  .practice-panel {
    padding: 22px 18px;
  }

  .original-project-copy { padding: 22px; }
  .original-project-art { padding-inline: 22px; }
  .original-project-art > span:first-child { font-size: 33px; }
  .original-project-art > span:last-child { font-size: 11px; }
  .original-project-copy h3 { font-size: 25px; }

  .practice-heading h3 {
    font-size: 26px;
  }

  .word-card {
    min-height: 270px;
    padding-inline: 17px;
  }

  .word-character {
    font-size: 63px;
  }

  .word-pinyin {
    font-size: 21px;
  }

  .math-card {
    min-height: 220px;
  }

  .math-equation {
    font-size: 32px;
  }

  .math-rhyme {
    font-size: 23px;
  }

  .answer-grid {
    gap: 9px;
  }

  .practice-controls {
    gap: 9px;
  }
}
