/* 果粒橙小朋友 · 认一认。所有规则均以 know- 为前缀，避免影响旧页面。 */
.know-page {
  --know-green: #4eaa7d;
  --know-green-deep: #276b50;
  --know-yellow: #ffd767;
  --know-ink: #263a3e;
  --know-soft-ink: #637476;
  --know-shadow: 0 11px 25px rgba(62, 79, 66, .12);
  width: 100%;
  max-width: 920px;
  min-width: 0;
  margin: 0 auto;
  color: var(--know-ink);
  overflow-x: clip;
}

.know-page button {
  min-height: 48px;
  touch-action: manipulation;
}

img.know-category-picture { object-fit: cover; }

/* A square scene stays complete in the existing landscape reader stage. */
.story-picture.reillustrated-story { background: #fffaf0; }
.story-picture.reillustrated-story img { object-fit: contain; }

.know-welcome {
  position: relative;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 148px;
  padding: 18px 20px;
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(135deg, #c9f3dd, #fff2b9);
  box-shadow: var(--know-shadow);
}

.know-welcome::after {
  content: '';
  position: absolute;
  right: -48px;
  bottom: -76px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .28);
}

.know-teacher {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 86px;
  height: 104px;
  border: 4px solid rgba(255, 255, 255, .78);
  border-radius: 43px 43px 27px 27px;
  background: rgba(255, 255, 255, .48);
  font-size: 68px;
  line-height: 1;
}

.know-welcome > div { position: relative; z-index: 1; min-width: 0; }
.know-welcome small { color: #3f765d; font-size: 13px; font-weight: 900; }
.know-welcome h1 { margin: 3px 0 4px; font-size: clamp(28px, 6vw, 40px); line-height: 1.1; }
.know-welcome p { margin: 0; color: #47665a; font-size: 16px; font-weight: 700; line-height: 1.5; }
.know-total {
  position: relative;
  z-index: 1;
  align-self: start;
  min-width: max-content;
  padding: 8px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .74);
  color: #76601e;
  font-size: 13px;
  font-weight: 900;
}

.know-daily {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 108px !important;
  margin: 15px 0 20px;
  padding: 15px 17px;
  border: 3px solid #f3c44b;
  border-radius: 27px;
  background: #fff9dc;
  text-align: left;
  box-shadow: 0 8px 20px rgba(174, 127, 26, .13);
}

.know-daily-icon {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 21px;
  background: #fff;
  font-size: 42px;
}

.know-daily-copy { display: grid; min-width: 0; gap: 2px; }
.know-daily-copy small { color: #9b7217; font-size: 12px; font-weight: 900; }
.know-daily-copy b { overflow: hidden; font-size: 21px; line-height: 1.22; text-overflow: ellipsis; }
.know-daily-copy span { color: #756947; font-size: 14px; font-weight: 700; }
.know-daily-progress {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #f5c84f;
  color: #5b4610;
}
.know-daily-progress strong { font-size: 23px; line-height: 1; }
.know-daily-progress small { margin-top: -5px; font-size: 10px; font-weight: 900; }

.know-route-title,
.know-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 21px 4px 11px;
}
.know-route-title > span,
.know-section-title > span { font-size: 30px; }
.know-route-title h2,
.know-section-title h2 { margin: 0; font-size: 23px; }
.know-route-title p,
.know-section-title p { margin: 2px 0 0; color: var(--know-soft-ink); font-size: 13px; font-weight: 650; }

.know-favorites {
  padding: 4px 0 7px;
  border-radius: 25px;
  background: #fff0f2;
}
.know-favorites .know-section-title { margin: 10px 14px 7px; }
.know-favorite-row {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 5px 13px 12px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.know-favorite-row::-webkit-scrollbar { display: none; }
.know-favorite {
  flex: 0 0 96px;
  padding: 6px;
  border: 2px solid #f5cdd5;
  border-radius: 19px;
  background: #fff;
  scroll-snap-align: start;
}
.know-favorite .know-picture { width: 100%; border-radius: 14px; }
.know-favorite b { display: block; margin: 5px 0 2px; font-size: 14px; }

.know-level {
  margin: 0 0 17px;
  padding: 13px;
  border-radius: 27px;
  background: #eaf8ef;
}
.know-level-2 { background: #fff2dc; }
.know-level-3 { background: #e9f4ff; }
.know-level-4 { background: #f1edff; }
.know-level-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  margin-bottom: 10px;
}
.know-level-head > span {
  display: grid;
  place-items: center;
  width: 49px;
  height: 49px;
  border-radius: 17px;
  background: rgba(255, 255, 255, .75);
  font-size: 28px;
}
.know-level-head > div { display: grid; gap: 2px; }
.know-level-head b { font-size: 19px; }
.know-level-head small { color: #64736d; font-size: 13px; font-weight: 700; }
.know-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.know-category {
  position: relative;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 108px !important;
  padding: 9px;
  border: 2px solid rgba(50, 91, 67, .08);
  border-radius: 22px;
  background: rgba(255, 255, 255, .92);
  text-align: left;
  box-shadow: 0 5px 13px rgba(66, 73, 65, .08);
}
.know-category-picture { width: 86px; border-radius: 16px; }
.know-category-copy { display: grid; min-width: 0; gap: 5px; }
.know-category-copy b { font-size: 17px; line-height: 1.24; }
.know-category-copy small {
  justify-self: start;
  padding: 4px 8px;
  border-radius: 10px;
  background: #eff5f1;
  color: #587066;
  font-size: 11px;
  font-weight: 850;
}
.know-category-arrow { color: #5b9f7d; font-size: 27px; font-weight: 900; }

/* 精细图集：每张图固定占 4×3 图集的一格，位置与数据数组严格一一对应。 */
.know-picture {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background-color: #f3efe7;
  background-image: var(--know-atlas);
  background-repeat: no-repeat;
  background-size: 400% 300%;
  background-position: var(--know-x) var(--know-y);
  background-clip: padding-box;
  transform: translateZ(0);
  outline: 1px solid transparent;
}

.know-lesson-page,
.know-quiz-page,
.know-done-page { max-width: 680px; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
.know-lesson-nav {
  position: sticky;
  top: 75px;
  z-index: 16;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 52px;
  align-items: center;
  gap: 8px;
  min-height: 66px;
  margin: 0 0 12px;
  padding: 7px;
  border-radius: 22px;
  background: rgba(255, 250, 241, .96);
  box-shadow: 0 7px 22px rgba(69, 62, 48, .14);
  backdrop-filter: blur(12px);
}
.know-lesson-nav > button {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 52px;
  padding: 8px 12px;
  border-radius: 16px;
  background: #347d5d;
  color: #fff;
}
.know-lesson-nav > button span { font-size: 22px; }
.know-lesson-nav > button b { font-size: 14px; }
.know-lesson-nav > strong {
  min-width: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}
.know-lesson-nav .know-nav-home {
  display: grid;
  place-items: center;
  width: 52px;
  padding: 0;
  background: #fff;
  color: inherit;
  font-size: 23px;
  box-shadow: inset 0 0 0 2px #e8dfd1;
}

.know-card-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  margin: 0 4px 8px;
}
.know-card-count span {
  padding: 6px 10px;
  border-radius: 13px;
  background: #e6f7ed;
  color: #317052;
  font-size: 12px;
  font-weight: 900;
}
.know-card-count b { color: #73817a; font-size: 14px; }
.know-big-card {
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--know-shadow);
}
.know-image-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  background: #edf5ef;
}
.know-big-picture { width: 100%; }
.know-image-button > span:last-child {
  position: absolute;
  left: 50%;
  bottom: 12px;
  min-width: 156px;
  min-height: 42px;
  padding: 10px 15px;
  border-radius: 21px;
  background: rgba(255, 255, 255, .92);
  color: #315a4a;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 4px 15px rgba(34, 65, 51, .17);
  transform: translateX(-50%);
}
.know-word-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 15px 18px 0;
}
.know-word-row h1 { margin: 0; font-size: clamp(32px, 9vw, 47px); letter-spacing: .04em; }
.know-heart {
  display: grid;
  place-items: center;
  width: 52px;
  min-height: 52px !important;
  padding: 0;
  border-radius: 18px;
  background: #fff0f2;
  font-size: 25px;
}
.know-heart.is-favorite { background: #ffdce2; }
.know-big-card > p {
  max-width: 580px;
  margin: 10px auto 5px;
  padding: 0 20px;
  color: #516264;
  font-size: clamp(16px, 4vw, 19px);
  font-weight: 650;
  line-height: 1.72;
  text-align: left;
}
.know-listen {
  display: block;
  width: calc(100% - 32px);
  min-height: 58px !important;
  margin: 13px 16px 17px;
  border-radius: 19px;
  background: var(--know-yellow);
  color: #604a0e;
  font-size: 18px;
  font-weight: 900;
  box-shadow: inset 0 -4px 0 rgba(180, 126, 13, .14);
}
.know-turns,
.know-done-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.know-turns button,
.know-done-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 59px !important;
  border: 2px solid #e6ddd0;
  border-radius: 19px;
  background: #fff;
  font-weight: 900;
}
.know-turns span { font-size: 23px; }

.know-daily-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin: 8px 0 12px;
}
.know-daily-dots i {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e6dfd6;
  color: #776f65;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}
.know-daily-dots i.now { box-shadow: 0 0 0 4px rgba(241, 180, 45, .25); background: #ffd665; color: #5d480c; }
.know-daily-dots i.done { background: #6dc493; color: #fff; }
.know-teacher-tip {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 65px;
  margin-bottom: 10px;
  padding: 8px 13px;
  border-radius: 20px;
  background: #e9f7ee;
}
.know-teacher-tip span { font-size: 43px; }
.know-teacher-tip p { margin: 0; color: #406455; font-size: 14px; font-weight: 800; line-height: 1.45; }
.know-next {
  width: 100%;
  min-height: 62px !important;
  margin-top: 12px;
  border-radius: 20px;
  background: var(--know-green);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  box-shadow: inset 0 -5px 0 rgba(25, 103, 70, .18);
}
.know-next span { margin-left: 6px; font-size: 24px; }

.know-quiz-head {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 15px;
  border-radius: 27px;
  background: linear-gradient(135deg, #dff6e9, #fff2bf);
}
.know-quiz-teacher {
  display: grid;
  place-items: center;
  width: 78px;
  height: 88px;
  border-radius: 39px 39px 23px 23px;
  background: rgba(255, 255, 255, .63);
  font-size: 59px;
}
.know-quiz-head small { color: #597064; font-weight: 900; }
.know-quiz-head h1 { margin: 4px 0 8px; font-size: clamp(23px, 6vw, 33px); line-height: 1.22; }
.know-quiz-head button {
  min-height: 48px;
  padding: 8px 13px;
  border-radius: 16px;
  background: #fff;
  color: #3e6655;
  font-size: 14px;
  font-weight: 900;
}
.know-quiz-dots { display: flex; justify-content: center; gap: 8px; margin: 13px 0; }
.know-quiz-dots i { width: 12px; height: 12px; border-radius: 50%; background: #dad5ce; }
.know-quiz-dots i.now { width: 32px; border-radius: 9px; background: #efb739; }
.know-quiz-dots i.done { background: #5db783; }
.know-quiz-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.know-quiz-choice {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 6px 6px 10px;
  border: 3px solid #fff;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--know-shadow);
}
.know-quiz-choice .know-picture { width: 100%; border-radius: 16px; }
.know-quiz-choice b { display: block; margin-top: 8px; overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.know-quiz-choice.wrong { border-color: #ec8c78; background: #ffe4dd; animation: knowShake .3s; }
.know-quiz-choice.right { border-color: #55b77f; background: #dff6e8; }
.know-quiz-choice.right > span::after {
  content: '✓';
  position: absolute;
  right: 9px;
  top: 9px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #50b47a;
  color: #fff;
  font-size: 21px;
  font-weight: 900;
}
.know-quiz-message { min-height: 31px; margin: 14px 0 0; color: #527160; text-align: center; font-size: 18px; font-weight: 900; }

.know-done-page { position: relative; text-align: center; }
.know-done-card {
  position: relative;
  overflow: hidden;
  padding: 23px 20px;
  border: 4px solid #fff;
  border-radius: 31px;
  background: linear-gradient(155deg, #dff7ea, #fff0b7);
  box-shadow: var(--know-shadow);
}
.know-done-teacher { display: block; font-size: 92px; line-height: 1.05; }
.know-done-card h1 { margin: 7px 0; font-size: 36px; }
.know-done-card p { max-width: 480px; margin: 0 auto; color: #4c675c; font-size: 18px; font-weight: 750; line-height: 1.65; }
.know-done-stars { margin: 13px 0 3px; font-size: 31px; letter-spacing: .14em; }
.know-done-card .know-listen { max-width: 420px; margin-left: auto; margin-right: auto; }
.know-done-actions .primary { background: #4dad7c; border-color: #4dad7c; color: #fff; }
.know-confetti { position: absolute; z-index: 2; inset: 90px 8% auto; display: flex; justify-content: space-between; pointer-events: none; }
.know-confetti i { font-size: 32px; font-style: normal; animation: knowFloat 2s ease-in-out infinite; }
.know-confetti i:nth-child(2) { animation-delay: -.65s; }
.know-confetti i:nth-child(3) { animation-delay: -1.2s; }

.know-missing > div { padding: 35px 20px; border-radius: 28px; background: #fff; text-align: center; }
.know-missing > div > span { font-size: 70px; }
.know-missing h1 { font-size: 25px; }
.know-missing button { padding: 10px 18px; border-radius: 17px; background: #4ead7c; color: #fff; font-weight: 900; }

@keyframes knowShake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes knowFloat { 50% { transform: translateY(-8px) rotate(7deg); } }

@media (min-width: 760px) {
  .know-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .know-big-card { max-width: 560px; margin-left: auto; margin-right: auto; }
  .know-turns, .know-daily-page > .know-next { max-width: 560px; margin-left: auto; margin-right: auto; }
}

@media (max-width: 520px) {
  .know-welcome { grid-template-columns: 69px minmax(0, 1fr); min-height: 126px; padding: 14px; gap: 10px; }
  .know-teacher { width: 69px; height: 88px; font-size: 55px; }
  .know-welcome h1 { font-size: 27px; }
  .know-welcome p { font-size: 13px; }
  .know-total { position: absolute; right: 10px; top: 9px; font-size: 10px; }
  .know-daily { grid-template-columns: 56px minmax(0, 1fr) 48px; min-height: 94px !important; padding: 12px; gap: 9px; }
  .know-daily-icon { width: 56px; height: 56px; border-radius: 18px; font-size: 36px; }
  .know-daily-copy b { font-size: 18px; }
  .know-daily-copy span { font-size: 12px; }
  .know-daily-progress { width: 48px; height: 48px; }
  .know-daily-progress strong { font-size: 19px; }
  .know-category-grid { gap: 8px; }
  .know-level { padding: 10px; border-radius: 24px; }
  .know-category { grid-template-columns: 68px minmax(0, 1fr) 13px; min-height: 89px !important; padding: 7px; gap: 7px; border-radius: 18px; }
  .know-category-picture { width: 68px; border-radius: 13px; }
  .know-category-copy b { font-size: 14px; }
  .know-category-copy small { padding: 3px 6px; font-size: 10px; }
  .know-category-arrow { font-size: 22px; }
  .know-lesson-nav { top: 68px; grid-template-columns: auto minmax(0, 1fr) 48px; min-height: 62px; margin-left: -3px; margin-right: -3px; }
  .know-lesson-nav > button { min-height: 48px; padding: 7px 10px; }
  .know-lesson-nav .know-nav-home { width: 48px; }
  .know-big-card > p { padding: 0 16px; font-size: 16px; line-height: 1.62; }
  .know-word-row { padding-top: 12px; }
  .know-word-row h1 { font-size: 34px; }
  .know-heart { width: 48px; min-height: 48px !important; }
  .know-quiz-grid { gap: 7px; }
  .know-quiz-choice { padding: 4px 4px 8px; border-radius: 17px; }
  .know-quiz-choice .know-picture { border-radius: 12px; }
  .know-quiz-choice b { font-size: 13px; }
  .know-quiz-head { grid-template-columns: 63px minmax(0, 1fr); padding: 11px; }
  .know-quiz-teacher { width: 63px; height: 75px; font-size: 49px; }
  .know-quiz-head h1 { font-size: 22px; }
}

@media (max-width: 350px) {
  .know-welcome { grid-template-columns: 58px minmax(0, 1fr); }
  .know-teacher { width: 58px; height: 77px; font-size: 46px; }
  .know-welcome h1 { font-size: 24px; }
  .know-welcome p { font-size: 12px; }
  .know-daily { grid-template-columns: 48px minmax(0, 1fr) 42px; padding: 9px; }
  .know-daily-icon { width: 48px; height: 48px; font-size: 31px; }
  .know-daily-progress { width: 42px; height: 42px; }
  .know-category { grid-template-columns: 59px minmax(0, 1fr); }
  .know-category-picture { width: 59px; }
  .know-category-arrow { display: none; }
  .know-category-copy b { font-size: 13px; }
  .know-lesson-nav > strong { font-size: 13px; }
  .know-daily-dots { gap: 4px; }
  .know-daily-dots i { width: 32px; height: 32px; }
}

/* Small children can turn cards without finding a button below the fold. */
@media (max-width: 759px), (orientation: landscape) and (max-height: 560px) {
  .recognition-lesson-open .know-lesson-page { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  .recognition-lesson-open .know-turns,
  .recognition-lesson-open .know-daily-page > .know-next {
    position: fixed;
    z-index: 20;
    left: 50%;
    bottom: max(10px, env(safe-area-inset-bottom));
    width: calc(100% - 24px);
    max-width: 680px;
    margin: 0;
    transform: translateX(-50%);
    box-shadow: 0 0 0 6px #fff8ec, 0 -8px 28px rgba(62, 79, 66, .14);
    border-radius: 20px;
    background: #fff8ec;
  }
  .recognition-lesson-open .know-daily-page > .know-next { background: var(--know-green); }
}

@media (orientation: portrait) and (max-width: 759px) and (max-height: 740px) {
  .know-lesson-page .know-image-button { background: #fffaf0; }
  .know-lesson-page .know-big-picture { width: min(100%, 42vh); width: min(100%, 42svh); margin: auto; }
}

@media (orientation: portrait) and (max-width: 759px) and (max-height: 610px) {
  .know-lesson-page .know-big-picture { width: min(100%, 34vh); width: min(100%, 34svh); }
}

@media (orientation: landscape) and (max-height: 560px) {
  .know-lesson-page .know-big-card { display: grid; grid-template-columns: minmax(230px, 1fr) minmax(250px, 1fr); align-items: center; }
  .know-lesson-page .know-image-button { grid-row: 1 / 4; height: 100%; }
  .know-lesson-page .know-big-picture { min-height: 100%; background-size: 400% 300%; }
  .know-lesson-page .know-listen { align-self: end; }
  .know-teacher-tip { display: none; }
  .know-quiz-head { padding: 8px 13px; }
  .know-quiz-teacher { height: 63px; font-size: 48px; }
  .know-quiz-head h1 { margin: 2px 0 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .know-confetti i,
  .know-quiz-choice.wrong { animation: none !important; }
}
