/* The current teaching images are portrait cards: show the whole glyph and illustration. */
.kid-pic img { object-fit: contain; background: #fff; }
.hz-tile img, .hz-open img, #hz-step-img, .recognition-picture img { object-fit: contain; background: #fff; }
.page-study .class-entry-media img { object-fit: contain !important; object-position: center !important; background: #fff !important; }
.page-study .character-entry img { object-fit: contain; background: #fff; }
.hz-panel .picture-stage img, .hz-steps .picture-stage img,
.visual-lesson .picture-stage img, .visual-character-picker img,
.character-grid .char-button img { object-fit: contain !important; background: #fff; }

/* Simple, image-led library cards. The artwork already contains its character. */
html:not(:fullscreen) body.hanzi-page .hz-character-row,
html:not(:fullscreen) body.hanzi-page #hz-jj .hz-grid-jj {
  display:grid!important;
  grid-template-columns:repeat(auto-fill,minmax(105px,1fr))!important;
  gap:10px!important;
  overflow:visible!important;
}
body.hanzi-page .hz-tile { min-width:0; }
body.hanzi-page .hz-open { display:block; width:100%; padding:5px!important; background:#fff; }
body.hanzi-page .hz-open img { display:block; width:100%!important; height:auto!important; aspect-ratio:1064/1478!important; object-fit:contain!important; }
body.hanzi-page .hz-class-tabs button { gap:0!important; }
body.hanzi-page .hz-toolbar:has(.hz-filters) { display:block!important; padding:12px 0!important; background:transparent!important; border:0!important; }
body.hanzi-page .hz-filters:is(#hz-filters,#hz-jj-filters) { justify-content:center!important; gap:8px!important; padding:0!important; }
body.hanzi-page .hz-filters:is(#hz-filters,#hz-jj-filters) button {
  display:inline-flex!important; align-items:center; justify-content:center;
  width:40px!important; min-width:40px!important; height:40px!important;
  padding:0!important; border:1px solid #cad8ce!important; border-radius:50%!important;
  background:#fff!important; background-image:none!important; box-shadow:none!important;
  color:#315b3c!important; font-size:17px!important; filter:none!important; transform:none!important;
}
body.hanzi-page .hz-filters:is(#hz-filters,#hz-jj-filters) button:first-child { width:auto!important; min-width:50px!important; padding:0 10px!important; border-radius:20px!important; font-size:13px!important; }
body.hanzi-page .hz-filters:is(#hz-filters,#hz-jj-filters) button[aria-pressed="true"] { background:#315b3c!important; border-color:#315b3c!important; color:#fff!important; }
body.hanzi-page .hz-toolbar-right { display:none!important; }
body.hanzi-page .mc-hero-art img { object-fit:cover!important; object-position:center center!important; }

/* Course directory: readable lesson character beside the entire portrait card. */
html body #outline-list .kid-pic:has(.kid-cover-char) {
  display:flex!important; align-items:center!important; justify-content:center!important;
  gap:clamp(10px,2vw,24px)!important; padding:10px 16px!important;
  background:#f7f9f7!important;
}
html body #outline-list .kid-pic .kid-cover-char {
  position:relative; z-index:1; flex:0 0 auto;
  color:#244b34; font:400 clamp(38px,5vw,72px)/1 "Kaiti SC",STKaiti,KaiTi,"楷体",serif;
}
html body #outline-list .kid-pic:has(.kid-cover-char) img {
  position:static!important; inset:auto!important; flex:0 1 auto;
  display:block!important; width:auto!important; max-width:48%!important;
  height:100%!important; max-height:100%!important;
  object-fit:contain!important; object-position:center!important;
  background:transparent!important;
}
@media(max-width:700px){
  html:not(:fullscreen) body.hanzi-page .hz-character-row,
  html:not(:fullscreen) body.hanzi-page #hz-jj .hz-grid-jj { grid-template-columns:repeat(auto-fill,minmax(82px,1fr))!important; gap:7px!important; }
  html body #outline-list .kid-pic .kid-cover-char { font-size:clamp(36px,10vw,64px); }
}

/* 25 Oct review: keep teaching glyphs in KaiTi, use a clear UI face elsewhere. */
html body.learning-page :is(.lc-tabs,.lc-tabs button,#class-notice,#class-notice button,#outline-list .kid-date,#outline-list .kid-more,#outline-list .day-tag,.visual-lesson .panel-heading,.visual-lesson .panel-buttons,.visual-lesson .panel-buttons button,.visual-lesson .flow-steps,.visual-lesson .flow-steps button,.visual-lesson .flow-nav,.visual-lesson .flow-title,.visual-lesson .warm-top,.visual-lesson .solo-row,.visual-lesson .quiz-options.is-number),
html body.hanzi-page :is(.mc-hero-copy,.hz-browser-heading,.hz-class-tabs,.hz-filters,.hz-jj-head,.lesson-resource-links) {
  font-family:"Noto Sans SC","Noto Sans",Arial,sans-serif!important;
  font-weight:600!important;
}
html body.learning-page :is(.lc-tabs button,#class-notice button,#outline-list .kid-more summary,.visual-lesson .panel-buttons button,.visual-lesson .flow-steps button){font-weight:650!important}
html body.learning-page .lc-tabs [role="tab"]::before,
html body.learning-page .lc-tabs [role="tab"]::after,
html body.learning-page #class-notice .class-notice-detail::before,
html body.learning-page #class-notice .notice-homework::before,
html body.learning-page #class-notice .notice-homework>img,
html body.learning-page #class-notice .class-notice-detail>img {content:none!important;display:none!important;background-image:none!important}
html body.learning-page .flow-steps [data-flow] span {display:none!important}
html body.learning-page .visual-lesson .flow-steps button {min-width:52px!important;min-height:36px!important;padding:5px 12px!important;font-size:15px!important;letter-spacing:0!important}
html body.learning-page .visual-lesson .flow-steps.is-grouped button {min-width:42px!important}
html body.learning-page .visual-lesson .flow-steps.is-grouped .flow-module+.flow-module {border-left:1px solid #dce5dd!important}

/* Course directory: one complete portrait card, with no duplicate glyph beside it. */
html body #outline-list .kid-pic .kid-cover-char {display:none!important}
html body #outline-list .kid-pic:has(.kid-cover-char) {padding:8px!important;gap:0!important}
html body #outline-list .kid-pic:has(.kid-cover-char) img {max-width:82%!important;max-height:100%!important;object-fit:contain!important}
html body #outline-list .kid-pic img {object-fit:contain!important}

/* Library: one horizontal card rail per lesson; cards remain full and swipeable. */
html:not(:fullscreen) body.hanzi-page .hz-character-row,
html:not(:fullscreen) body.hanzi-page #hz-jj .hz-grid-jj {
  display:flex!important;flex-wrap:nowrap!important;gap:10px!important;
  overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x proximity!important;
  scrollbar-width:thin;scrollbar-color:#9cb7a2 transparent;padding:3px 2px 12px!important;
}
body.hanzi-page .hz-character-row>.hz-tile,
body.hanzi-page #hz-jj .hz-grid-jj>.hz-tile {flex:0 0 clamp(100px,10vw,132px)!important;scroll-snap-align:start}
body.hanzi-page #character-browser .scroll-rail-wrap {position:relative}
body.hanzi-page #character-browser .rail-arrow {display:flex!important}

/* Three short review rounds. */
html body .warm-paged .warm-top {min-height:58px;gap:12px!important;flex-wrap:wrap;justify-content:center}
html body .warm-paged .warm-label {font:650 18px/1.4 "Noto Sans SC",Arial,sans-serif!important;color:#315b3c!important}
html body .warm-paged .warm-lesson-label {font:500 14px/1.4 "Noto Sans SC",Arial,sans-serif;color:#6b7d70}
html body .warm-paged .warm-speak,
html body .warm-paged .warm-next-round {border:1px solid #b9d1be!important;border-radius:999px!important;background:#fff!important;color:#315b3c!important;padding:7px 15px!important;font:650 14px/1.2 "Noto Sans SC",Arial,sans-serif!important;cursor:pointer}
html body .warm-paged .warm-speak {background:#315b3c!important;color:#fff!important}
html body .warm-paged .warm-next-round {margin-left:0}
html body .warm-paged .warm-card {min-height:0!important;aspect-ratio:1064/1478!important;padding:4px!important;overflow:hidden}
html body .warm-paged .warm-card-full {display:block;width:100%;height:100%;object-fit:contain;background:#fff}
html body .warm-paged .warm-card .warm-card-char {font:400 clamp(48px,8vw,78px)/1.2 "Kaiti SC",STKaiti,KaiTi,serif!important}
html body .warm-paged .warm-card:not(.is-open) .warm-card-char::before {content:none!important}
html body .warm-paged .warm-card.is-correct {outline:3px solid #55936a}
html body .warm-paged .warm-card.is-wrong {outline:3px solid #ce786e}
html body .warm-paged .warm-feedback {min-height:22px;margin:0;color:#315b3c;font:600 14px "Noto Sans SC",Arial,sans-serif}
html body .warm-paged .warm-row {grid-template-columns:repeat(var(--n,6),clamp(80px,9vw,116px))!important}

/* Stroke controls sit above the exercise; the writing grid is smaller. */
html body .stage-stroke .solo-wrap {display:grid!important;grid-template-columns:auto minmax(0,190px) minmax(0,230px) auto;align-items:center!important;gap:14px!important}
html body .stage-stroke .solo-box {width:min(190px,23vh)!important;height:min(190px,23vh)!important}
html body .stage-stroke .solo-side {display:contents!important}
html body .stage-stroke .solo-name {grid-column:3;grid-row:2;justify-self:center}
html body .stage-stroke .solo-row {grid-column:2/4;grid-row:1;margin:0 0 8px!important}
html body .stage-stroke .solo-dots {grid-column:3;grid-row:2;align-self:end;justify-self:center}
html body .stage-stroke .solo-wrap>[data-solo-go="-1"] {grid-column:1;grid-row:2}
html body .stage-stroke .solo-box {grid-column:2;grid-row:2}
html body .stage-stroke .solo-wrap>[data-solo-go="1"] {grid-column:4;grid-row:2}
html body .stage-quiz .quiz-prompt .quiz-photo-btn .quiz-photo {max-height:clamp(150px,28vh,250px)!important;aspect-ratio:1064/1478;object-fit:contain!important}
html body .stage-quiz .quiz-options.is-number {max-width:420px;gap:8px}
html body .stage-quiz .quiz-options.is-number button {font-size:clamp(28px,5vh,42px)!important;aspect-ratio:1.5!important}
html body #activities #activity-stage[data-game="pairs"] .activity-card img {width:88%!important;height:88%!important;object-fit:contain!important;background:#fff;position:relative;z-index:2}
@media(max-width:700px){
 html body .stage-stroke .solo-wrap {grid-template-columns:32px minmax(0,1fr) minmax(0,1fr) 32px;gap:6px!important}
 html body .stage-stroke .solo-box {width:min(150px,38vw)!important;height:min(150px,38vw)!important}
 html body .warm-paged .warm-row {grid-template-columns:repeat(var(--n,6),minmax(72px,1fr))!important;overflow-x:auto}
 body.hanzi-page .hz-character-row>.hz-tile,body.hanzi-page #hz-jj .hz-grid-jj>.hz-tile {flex-basis:100px!important}
}

/* Study center class choices: consistent with the site's restrained green cards. */
html body.page-study .class-entry {border:1px solid #d7e4d9!important;border-radius:12px!important;background:#f8fbf8!important;box-shadow:none!important;padding:18px!important;gap:14px}
html body.page-study .class-entry:nth-child(2) {background:#f7f9fb!important}
html body.page-study .class-entry h3 {font:700 23px/1.35 "Noto Sans SC",Arial,sans-serif!important;color:#244b34}
html body.page-study .class-entry h3 .class-age {font:600 13px "Noto Sans SC",Arial,sans-serif!important;color:#60796b!important}
html body.page-study .class-entry .course-time {font:500 14px "Noto Sans SC",Arial,sans-serif!important;color:#526e5a!important}
html body.page-study .class-entry .button.primary {font:650 14px "Noto Sans SC",Arial,sans-serif!important;background:#315b3c!important;border:0!important;color:#fff!important}
html body.page-study .class-entry-media {min-height:160px!important;background:#fff;border-radius:8px}
html body.page-study .class-entry-media img {position:static!important;width:100%!important;height:160px!important;object-fit:contain!important;object-position:center!important}

/* Final typography and sizing refinements. */
html body.hanzi-page .mc-hero-copy :is(h1,p,a),
html body.hanzi-page .hz-browser-heading h2,
html body.hanzi-page .hz-class-tabs button strong,
html body.hanzi-page .hz-jj-head h3,
html body.hanzi-page .lesson-resource-links a,
html body.hanzi-page .hz-filters button {
  font-family:"Noto Sans SC","Noto Sans",Arial,sans-serif!important;
  font-weight:600!important;
}
html body #outline-list .kid-more summary {font:600 13px/1.5 "Noto Sans SC","Noto Sans",Arial,sans-serif!important}
html body #flow-stage.stage-stroke #solo.solo-box.writing-grid {width:min(190px,23vh)!important;height:min(190px,23vh)!important}
html body #flow-stage.stage-quiz .quiz-prompt .quiz-char {font-size:clamp(44px,7vh,68px)!important;min-width:0!important;width:auto!important;height:auto!important}
html body #flow-stage.stage-quiz .quiz-prompt {height:auto!important;min-height:100px!important}
html body #flow-stage.stage-quiz .quiz-options.is-number button {background:#fff!important;border:1px solid #d8e4d9!important;border-radius:10px!important;font:600 clamp(28px,5vh,42px)/1 "Noto Sans",Arial,sans-serif!important;min-width:0!important;aspect-ratio:1.5!important;padding:8px!important}
html body .warm-paged .warm-speak {display:inline-flex;align-items:center;gap:6px}
html body #activities #activity-stage[data-game="pairs"] .activity-card {--img:none;aspect-ratio:1064/1478!important;border:1px solid #cadacb!important;border-radius:10px!important;background:#fff!important;padding:4px!important;filter:none!important;box-shadow:0 2px 0 #e6eee5!important;font-size:clamp(28px,5vh,50px)!important}
html body #activities #activity-stage[data-game="pairs"] .activity-card:not(:has(img)):not(:has(b)) {background:#dcebdd!important;border-color:#b8d3bf!important;color:transparent!important}
html body #activities #activity-stage[data-game="pairs"] .activity-card:not(:has(img)):not(:has(b))::before {content:"·"!important;display:grid!important;place-items:center;position:absolute;inset:0;color:#659274;font-size:64px}
html body #activities #activity-stage[data-game="pairs"] .activity-card img {width:100%!important;height:100%!important;border:0!important;border-radius:5px!important;object-fit:contain!important}
html body #activities #activity-stage[data-game="pairs"] .activity-card .card-speaker {position:absolute;right:4px;bottom:4px;z-index:3;background:#fff9;border-radius:50%}
html body.page-study .class-entry {min-height:210px!important}
html body.page-study .class-entry>div:first-child {padding:12px!important}
html body #flow-stage.stage-stroke #solo.solo-box.writing-grid {width:min(150px,20vh)!important;height:min(150px,20vh)!important}
html body #flow-stage.stage-quiz .quiz-options:not(.is-pinyin) button {font-size:clamp(32px,5vh,48px)!important;min-height:68px!important;max-height:100px!important;min-width:0!important}
html body #flow-stage.stage-quiz .quiz-options.is-number button {font-size:clamp(26px,4vh,36px)!important;min-height:54px!important;max-height:78px!important}
html body.hanzi-page .mc-hero-copy h1 {font-size:clamp(28px,3vw,40px)!important}
html body.hanzi-page .hz-browser-heading h2 {font-size:clamp(22px,2.4vw,28px)!important}

/* Library rail controls: the visible scrollbar and touch swipe are enough. */
html body.hanzi-page #character-browser .rail-arrow {display:none!important}
html body.hanzi-page .lesson-resource-links {display:flex!important;align-items:center;gap:18px!important}
html body.hanzi-page .lesson-resource-links a {
  display:inline-block!important;padding:4px 0!important;
  border:0!important;border-radius:0!important;background:none!important;
  box-shadow:none!important;color:#315b3c!important;
  font:600 13px/1.4 "Noto Sans SC","Noto Sans",Arial,sans-serif!important;
  text-decoration:underline!important;text-decoration-color:#a9c9b1!important;
  text-decoration-thickness:1px!important;text-underline-offset:4px!important;
}
html body.hanzi-page .lesson-resource-links a:hover {color:#1f402b!important;text-decoration-color:#315b3c!important}

/* Keep the review title on its own centered line. */
html body .warm-paged .warm-top {align-content:center;row-gap:8px!important}
html body .warm-paged .warm-label {flex:0 0 100%;text-align:center;margin:0!important}

/* Classroom information and homework use the same clear UI type as navigation. */
html body.learning-page main :is(.class-notice-detail,.class-notice-detail *,.notice-homework,.notice-homework *,#home-review,#home-review *,#game-hub,#game-hub *) {
 font-family:"Noto Sans SC","Noto Sans",Arial,sans-serif!important;
}
html body.learning-page .notice-line strong,
html body.learning-page .notice-topic,
html body.learning-page .notice-homework b {font-weight:650!important}
html body.learning-page .notice-homework {font-size:15px!important}
html body.learning-page .notice-homework::after {font:600 13px/1.4 "Noto Sans SC",Arial,sans-serif!important}
html body.learning-page #class-notice .class-notice-detail>summary>img {display:none!important}
html body.learning-page .mc-hero-copy :is(.mc-breadcrumb,h1,.mc-hero-lead,.hero-description,.hero-facts,.hero-buttons) {font-family:"Noto Sans SC","Noto Sans",Arial,sans-serif!important}
html body.learning-page .mc-hero-copy h1 {font-weight:700!important}
html body.learning-page .mc-hero-copy :is(.mc-hero-lead,.hero-facts) {font-weight:600!important}
html body.jinjie-page main :is(.lc-panel-head,.lc-panel-note,.jj-books,.jj-books *,#books .reader-head,#books .reader-tools) {font-family:"Noto Sans SC","Noto Sans",Arial,sans-serif!important}

/* Game choices: quiet, readable labels with smaller artwork. */
html body.learning-page #game-hub {gap:12px!important}
html body.learning-page #game-hub:has(.hub-card[hidden]) {grid-template-columns:repeat(3,minmax(0,1fr))!important}
html body.learning-page #game-hub .hub-card {
 justify-content:center!important;gap:8px!important;padding:14px 10px!important;
 border:1px solid #d9e5dc!important;border-radius:16px!important;background:#fff!important;
 box-shadow:none!important;transform:none!important;
}
html body.learning-page #game-hub .hub-card:hover,
html body.learning-page #game-hub .hub-card:focus-visible {border-color:#82b693!important;background:#f7fbf8!important;transform:none!important}
html body.learning-page #game-hub .hub-art {width:min(100%,125px)!important;height:min(42%,125px)!important;flex:none!important}
html body.learning-page #game-hub .hub-card b {font:650 clamp(17px,2.2vh,21px)/1.35 "Noto Sans SC",Arial,sans-serif!important;color:#244b34!important}
html body.learning-page #game-hub .hub-card small {font:500 13px/1.4 "Noto Sans SC",Arial,sans-serif!important;color:#627569!important}

/* Homework cards share one size and one typographic scale. */
html body.learning-page #home-review>.home-card {
 border:1px solid #d9e5dc!important;border-radius:18px!important;
 box-shadow:none!important;padding:16px!important;background:#fff!important;
}
html body.learning-page #home-review>.home-card .home-art {
 width:clamp(90px,18vh,150px)!important;height:clamp(90px,18vh,150px)!important;
 flex:0 0 clamp(90px,18vh,150px)!important;margin:0 auto 12px!important;
}
html body.learning-page #home-review>.home-card .home-head b {font:650 20px/1.4 "Noto Sans SC",Arial,sans-serif!important;color:#244b34!important}
html body.learning-page #home-review>.home-card .home-head small,
html body.learning-page #home-review>.home-card h3,
html body.learning-page #home-review>.home-card .parent-print .small {font:500 13px/1.5 "Noto Sans SC",Arial,sans-serif!important;color:#65766b!important}
html body.learning-page #home-review>.home-card .lesson-homework {font-size:14px!important;line-height:1.65!important}
html body.learning-page #home-review>.home-card .parent-print .solid {font:650 14px/1.4 "Noto Sans SC",Arial,sans-serif!important}

/* Reading cards use the illustrated covers from the referenced reading library. */
html body.jinjie-page #books:not([hidden]) {height:auto!important;min-height:480px!important;max-height:none!important;overflow:visible!important}
html body.jinjie-page #books #lesson-texts {align-items:stretch!important;overflow:visible!important;flex:0 0 auto!important}
html body.jinjie-page #books #lesson-texts .lesson-text-content {align-content:center;grid-template-columns:repeat(auto-fit,minmax(175px,240px))!important;gap:16px!important}
html body.jinjie-page #books #lesson-texts .lesson-text-content {grid-auto-rows:250px!important;flex:0 0 auto!important}
html body.jinjie-page #books #lesson-texts .lesson-text-content:has(> .text-card:nth-child(4)) {align-content:start!important;grid-auto-rows:225px!important}
html body.jinjie-page #books .assigned-text.text-card {padding:0!important;border:1px solid #d9e5dc!important;border-radius:14px!important;box-shadow:none!important;text-align:left;cursor:pointer}
html body.jinjie-page #books .text-card-pic {aspect-ratio:4/3;background:#f6f8f5}
html body.jinjie-page #books .text-card-pic img {object-fit:cover;object-position:center}
html body.jinjie-page #books .text-card-num {background:#315b3c;box-shadow:none;font:600 12px "Noto Sans SC",Arial,sans-serif}
html body.jinjie-page #books .text-card b {padding:12px 14px 2px;text-align:left;font:650 19px/1.4 "Noto Sans SC",Arial,sans-serif!important;color:#244b34}
html body.jinjie-page #books .text-card small {padding:0 14px 14px;font:500 12px "Noto Sans SC",Arial,sans-serif!important;color:#607b65}
html body.jinjie-page #books .text-card:hover {transform:translateY(-2px)!important;border-color:#85ae8e!important}

/* Large type reading lives inside the lesson instead of sending pupils away. */
html body.jinjie-page #books #lesson-texts .lesson-reader {width:min(100%,900px);margin:auto;display:flex;flex-direction:column;gap:14px;font-family:"Noto Sans SC",Arial,sans-serif}
.lesson-reader .reader-head {display:flex;align-items:center;gap:18px}
.lesson-reader .reader-head h3 {flex:1;margin:0;text-align:center;font:700 23px "Noto Sans SC",Arial,sans-serif;color:#244b34}
.lesson-reader .reader-head span {font-size:13px;color:#6a7c70}
.lesson-reader .reader-back,.lesson-reader .reader-tools button {border:1px solid #d4e1d6;border-radius:999px;background:#fff;color:#315b3c;padding:8px 15px;font:600 14px "Noto Sans SC",Arial,sans-serif;cursor:pointer}
.lesson-reader .reader-tools {display:flex;justify-content:center;gap:8px;flex-wrap:wrap}
.lesson-reader .reader-tools button[aria-pressed="true"] {background:#315b3c;color:#fff}
.lesson-reader .reader-body {max-height:min(62vh,650px);min-height:310px;overflow:auto;border:1px solid #e0e8df;border-radius:18px;background:#fff;padding:22px}
.lesson-reader .reader-passage {max-width:620px;margin:auto;padding:12px 0;text-align:center}
.lesson-reader .reader-passage p {margin:0 0 12px;font:600 clamp(23px,3.4vw,32px)/2 "Kaiti SC",STKaiti,KaiTi,serif;color:#302820}
.lesson-reader .reader-char {display:inline-block;border:0;background:none;padding:0;color:inherit;font:inherit;cursor:pointer}
.lesson-reader .reader-char rt {visibility:hidden;font:500 12px "Noto Sans SC",Arial,sans-serif;color:#53715c}
.lesson-reader.show-pinyin .reader-char rt,.lesson-reader .reader-char.show-pinyin rt {visibility:visible}

/* Library navigation and lesson view. */
html body.hanzi-page .hz-class-tabs {gap:12px!important}
html body.hanzi-page .hz-class-tabs button,
html body.hanzi-page .hz-class-tabs button[data-class="qm"],
html body.hanzi-page .hz-class-tabs button[data-class="jj"] {
  min-height:56px!important;border:1px solid #d5e2d7!important;border-radius:12px!important;
  background:#f7faf7!important;box-shadow:none!important;color:#315b3c!important;opacity:1!important;
}
html body.hanzi-page .hz-class-tabs button[aria-selected="true"] {
  background:#315b3c!important;border-color:#315b3c!important;color:#fff!important;
}
html body.hanzi-page .hz-class-tabs button strong {font-size:18px!important;font-weight:700!important;letter-spacing:0!important}
html body.hanzi-page .hz-jj-head {display:grid!important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center!important;gap:12px!important}
html body.hanzi-page .hz-jj-head h3 {grid-column:1;margin:0!important}
html body.hanzi-page .lesson-resource-links {grid-column:2;justify-self:center;gap:8px!important}
html body.hanzi-page .lesson-resource-links a {
  padding:8px 14px!important;background:#f3f8f2!important;border:1px solid #bed4c2!important;
  border-radius:999px!important;text-decoration:none!important;white-space:nowrap;
  font:650 13px/1.3 "Noto Sans SC","Noto Sans",Arial,sans-serif!important;
}
html body.hanzi-page .lesson-resource-links a:hover {background:#e3f0e5!important}
html:not(:fullscreen) body.hanzi-page.is-single-library-lesson .hz-character-row {
  display:grid!important;grid-template-columns:repeat(auto-fill,minmax(118px,1fr))!important;
  overflow:visible!important;flex-wrap:wrap!important;scroll-snap-type:none!important;
}
html body.hanzi-page.is-single-library-lesson .hz-character-row>.hz-tile {width:auto!important;min-width:0!important;flex:none!important}
html body.hanzi-page.is-single-library-lesson #hz-grid .scroll-rail-wrap {overflow:visible!important}
html body.hanzi-page.is-single-library-lesson #hz-grid .rail-arrow {display:none!important}
html body.hanzi-page #hz-dialog :is(.dialog-top,.dialog-top *, .hz-head .hz-tabs,.hz-head .hz-tabs button,.sp-bar,.sp-bar button) {
  font-family:"Noto Sans SC","Noto Sans",Arial,sans-serif!important;letter-spacing:0!important;
}

/* The review title and its controls form two centered lines. */
html body .visual-lesson .warm-paged .warm-top {display:flex!important;justify-content:center!important;align-items:center!important;text-align:center!important}
html body .visual-lesson .warm-paged .warm-label {display:block!important;width:100%!important;flex-basis:100%!important;text-align:center!important;font:700 18px/1.4 "Noto Sans SC","Noto Sans",Arial,sans-serif!important;letter-spacing:0!important}
html body .visual-lesson .warm-paged .warm-top :is(button,span) {letter-spacing:0!important}

/* Recognition choices swipe in one row; keep each glyph readable. */
html body .visual-lesson .stage-learn .visual-character-picker.grouped {
  display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;
  width:100%!important;max-width:100%!important;gap:8px!important;padding:4px 2px 12px!important;
  zoom:1!important;
  scroll-snap-type:x proximity;overscroll-behavior-inline:contain;scrollbar-width:thin;
}
html body .visual-lesson .stage-learn .visual-character-picker.grouped .pick-group {display:flex!important;flex:0 0 auto!important;min-width:0!important;gap:6px!important;scroll-snap-align:start}
html body .visual-lesson .stage-learn .visual-character-picker.grouped .pick-group button {width:62px!important;min-width:62px!important;min-height:70px!important}
html body .visual-lesson .stage-learn .visual-character-picker.grouped .pick-big {font-size:32px!important}
html body .visual-lesson .stage-learn .visual-character-picker.grouped .py,
html body .visual-lesson .stage-stroke .py {letter-spacing:0!important;word-spacing:0!important;white-space:nowrap!important}
html body .visual-lesson:has(.stage-learn) #flow-stage.stage-learn {display:block!important}
html body .visual-lesson .stage-learn #visual-stage {padding:0!important;max-width:100%!important;zoom:1!important}
html body .visual-lesson .stage-learn .picture-stage {height:190px!important;max-height:none!important}
html body .visual-lesson #flow-stage.is-dense.stage-learn #visual-stage .picture-stage {height:190px!important}
html body .visual-lesson #flow-stage.is-dense.stage-learn #visual-stage .recognition-picture img {height:180px!important;max-height:180px!important;width:auto!important;object-fit:contain!important}
html body .visual-lesson .stage-learn>.lesson-actions {margin-top:12px!important}

/* Picture questions show the illustration without the printed answer at the top of a card. */
html body #flow-stage.stage-quiz .quiz-prompt .quiz-photo-btn {width:min(260px,55vw)!important;height:min(210px,26vh)!important;overflow:hidden!important;border-radius:14px!important}
html body #flow-stage.stage-quiz .quiz-prompt .quiz-photo-btn .quiz-photo {
  display:block!important;width:100%!important;height:100%!important;max-height:none!important;
  aspect-ratio:auto!important;object-fit:cover!important;object-position:center bottom!important;
}

/* Classroom games and the small resource links below reading. */
html body.learning-page .visual-lesson #flow-stage.flow-game-stage .play-grid.game-hub {
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
  grid-template-rows:repeat(2,132px)!important;gap:10px!important;
  width:min(100%,900px)!important;max-width:900px;margin:8px auto!important;padding:0!important;
  zoom:1!important;
}
html body.learning-page .visual-lesson #flow-stage.flow-game-stage .play-card {
  display:flex!important;flex-direction:row!important;justify-content:flex-start!important;align-items:center!important;
  height:132px!important;min-height:0!important;padding:12px!important;gap:10px!important;
  border:1px solid #d9e5dc!important;border-radius:14px!important;background:#fff!important;
  box-shadow:none!important;animation:none!important;transform:none!important;text-align:left;
}
html body.learning-page .visual-lesson #flow-stage.flow-game-stage .play-card:hover {background:#f5faf6!important;border-color:#9abca1!important}
html body.learning-page .visual-lesson #flow-stage.flow-game-stage .play-card .hub-art {
  flex:0 0 76px!important;width:76px!important;height:76px!important;max-width:76px!important;
}
html body.learning-page .visual-lesson #flow-stage.flow-game-stage .play-card b {
  font:700 17px/1.3 "Noto Sans SC","Noto Sans",Arial,sans-serif!important;
  color:#244b34!important;letter-spacing:0!important;white-space:normal!important;
}
html body.jinjie-page #books:not([hidden]) {min-height:0!important;padding-bottom:26px!important}
html body.jinjie-page #books .jj-books {
  width:min(100%,900px);margin:20px auto 0!important;display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important;
}
html body.jinjie-page #books .jj-book {
  display:flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;
  min-height:62px!important;padding:8px 12px!important;background:#fff!important;
  border:1px solid #d9e5dc!important;border-radius:12px!important;box-shadow:none!important;
  color:#244b34!important;transform:none!important;
}
html body.jinjie-page #books .jj-book:hover {background:#f5faf6!important;border-color:#9abca1!important}
html body.jinjie-page #books .jj-book img,
html body.jinjie-page #books .jj-book-icon {width:36px!important;height:44px!important;flex:0 0 36px!important;object-fit:contain!important}
html body.jinjie-page #books .jj-book b {font:700 15px/1.3 "Noto Sans SC","Noto Sans",Arial,sans-serif!important}
html body.jinjie-page #books .jj-book small {display:none!important}

/* Keep the assignment controls centered and home cards balanced. */
html body.learning-page #class-notice .notice-homework {justify-content:center!important;text-align:center!important}
html body.learning-page #class-notice .notice-homework::after {margin-left:10px!important}
html body.learning-page #home-review>.home-card {justify-content:center!important;align-items:center!important;text-align:center!important;gap:12px!important}
html body.learning-page #home-review>.home-card .home-art {flex:0 0 142px!important;width:142px!important;height:142px!important;max-height:142px!important}
html body.learning-page #home-review>.home-card .home-head b {font-size:20px!important}
html body.learning-page #home-review>.home-card .lesson-homework {width:min(100%,320px);margin-inline:auto!important}
@media(max-width:700px){
  html body.hanzi-page .hz-jj-head {grid-template-columns:1fr!important}
  html body.hanzi-page .lesson-resource-links {grid-column:1;justify-self:start;flex-wrap:wrap}
  html:not(:fullscreen) body.hanzi-page.is-single-library-lesson .hz-character-row {grid-template-columns:repeat(auto-fill,minmax(86px,1fr))!important}
  html body.learning-page .visual-lesson #flow-stage.flow-game-stage .play-grid.game-hub,
  html body.jinjie-page #books .jj-books {grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html body.learning-page .visual-lesson #flow-stage.flow-game-stage .play-card .hub-art {flex-basis:54px!important;width:54px!important;height:54px!important}
}
.lesson-reader .reader-char:hover {color:#315b3c}
.lesson-reader .reader-source {display:flex;gap:14px;align-items:flex-start;justify-content:center;flex-wrap:wrap}
.lesson-reader .reader-source img {display:block;width:min(100%,370px);height:auto;border:1px solid #e0e8df}
html body.jinjie-page #books:has(.lesson-reader) .jj-books {display:none!important}
html body.jinjie-page #books:has(.lesson-reader) #lesson-texts {min-height:0!important;align-items:stretch!important}
html body.jinjie-page #books .lesson-reader :is(.reader-back,.reader-tools button) {font:600 14px/1.4 "Noto Sans SC","Noto Sans",Arial,sans-serif!important}
html body.jinjie-page #books .lesson-reader .reader-head h3 {font:700 23px/1.35 "Noto Sans SC","Noto Sans",Arial,sans-serif!important}
html body.jinjie-page .visual-lesson .flow-nav button {
  font-family:"Noto Sans SC","Noto Sans",Arial,sans-serif!important;
  font-size:15px!important;font-weight:600!important;letter-spacing:0!important;
}
@media(max-width:700px){
 html body.learning-page #game-hub,html body.learning-page #game-hub:has(.hub-card[hidden]) {grid-template-columns:repeat(2,minmax(0,1fr))!important}
 html body.jinjie-page #books #lesson-texts .lesson-text-content {grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .lesson-reader .reader-head {flex-wrap:wrap;gap:8px}.lesson-reader .reader-head h3 {order:-1;flex:0 0 100%}
 .lesson-reader .reader-body {padding:12px;max-height:65vh}.lesson-reader .reader-passage p {font-size:23px}
}
