.textbook-page{--book-ink:#25332e;--book-muted:#69766d}.textbook-main{padding-bottom:6px}.book-hero{background:linear-gradient(118deg,#fffefa 0%,#f5f4eb 55%,#edf1df 100%)}.book-hero .course-hero h1 em{color:#7b784b}.book-hero .course-button{background:#596441}.book-hero .course-button:hover{background:#475235}.book-hero .mastery-card-top b{color:#687140}.book-hero .mastery-track span{background:linear-gradient(90deg,#bdc278,#727b48)}.book-method{display:grid;grid-template-columns:minmax(0,1fr) minmax(340px,.92fr);gap:28px;align-items:center;margin:0 0 44px;padding:25px 28px;border:1px solid #e7e7d9;border-radius:20px;background:#fffefa}.book-method h2{margin:6px 0 9px;font-size:20px;letter-spacing:-.03em}.book-method-copy>p{max-width:600px;margin:0;color:#68736a;font-size:11px;line-height:1.9}.book-method-copy>p a{color:#607448;font-weight:800}.book-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:0;padding:0;list-style:none}.book-steps li{display:flex;flex-direction:column;gap:7px;min-height:86px;padding:12px;border:1px solid #ececde;border-radius:13px;background:#fafaf4}.book-steps b{display:grid;width:25px;height:25px;place-items:center;border-radius:9px;background:#eeefd9;color:#707947;font-size:12px}.book-steps span{color:#68736a;font-size:10px;line-height:1.6}.book-browser{scroll-margin-top:85px}.book-browser .browser-heading{align-items:end}.book-controls{display:grid;grid-template-columns:minmax(240px,1fr) 250px auto;align-items:center;gap:12px;margin-bottom:20px;padding:13px;border:1px solid #e7e9e0;border-radius:18px;background:#fffefa}.book-lesson-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.book-lesson{min-width:0;border:1px solid #e6e8dc;border-radius:16px;background:#fffefa;box-shadow:0 5px 16px rgba(44,61,50,.035);transition:border-color .2s,box-shadow .2s}.book-lesson:hover{border-color:#d8ddbd;box-shadow:0 8px 21px rgba(56,61,40,.065)}.book-lesson.is-done{border-color:#cbdcbc;background:#fdfff9}.book-lesson>summary{display:grid;grid-template-columns:37px minmax(0,1fr) auto 18px;align-items:center;gap:10px;min-height:78px;padding:12px 14px;cursor:pointer;list-style:none}.book-lesson>summary::-webkit-details-marker{display:none}.book-number{display:grid;width:36px;height:36px;place-items:center;border:1px solid #ecebdc;border-radius:12px;background:#f6f5e9;color:#74794b;font-size:11px;font-weight:900}.book-heading{display:flex;min-width:0;flex-direction:column;gap:5px}.book-heading>b{overflow:hidden;color:#2d3932;font-size:13px;text-overflow:ellipsis;white-space:nowrap}.book-badges{display:flex;flex-wrap:wrap;gap:5px}.book-group-badge,.book-status{padding:3px 6px;border-radius:99px;background:#f1f2e9;color:#78805a;font-size:8px;font-weight:900}.book-status{background:#f5f0e7;color:#907451}.book-lesson.is-done .book-status{background:#edf4e8;color:#52805b}.book-state{color:#7d877e;font-size:9px;font-weight:800;white-space:nowrap}.book-fold{color:#91a083;font-size:15px;text-align:center;transition:transform .2s}.book-lesson[open] .book-fold{transform:rotate(45deg)}.book-body{padding:2px 15px 16px;border-top:1px solid #eeefe6}.book-goal{margin:12px 0 4px;color:#536359;font-size:11px;line-height:1.8}.book-idea{margin:10px 0;padding:11px 12px;border-left:3px solid #b5bd7a;border-radius:0 10px 10px 0;background:#f8f8ef;color:#606950;font-size:10px;line-height:1.8}.book-example{margin:11px 0 0;padding:12px 13px;border:1px solid #e9ebdc;border-radius:12px;background:#fbfbf5}.book-example-label{display:block;margin-bottom:6px;color:#797e4e;font-size:9px;font-weight:900;letter-spacing:.08em}.book-example>strong{display:block;color:#3b493d;font-size:12px;line-height:1.8;white-space:pre-line}.book-example ol{display:grid;gap:5px;margin:9px 0 0;padding-left:18px;color:#657168;font-size:10px;line-height:1.75}.book-diagram{margin:10px 0 0;padding:10px 12px;overflow:auto;border-radius:10px;background:#f1f3e9;color:#4c5a4d;font:700 12px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre}.book-practice{margin-top:14px;padding-top:12px;border-top:1px solid #eceee5}.book-practice-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}.book-practice-top h3{margin:0;color:#33443a;font-size:12px}.book-count{padding:4px 8px;border-radius:99px;background:#f0f3e8;color:#6d7859;font-size:9px;font-weight:900;white-space:nowrap}.book-question{margin:0;color:#414e44;font-size:11px;line-height:1.8}.book-answer-row{display:flex;gap:7px;margin:8px 0 0}.book-answer-row input{width:min(230px,70%);height:36px;padding:0 10px;border:1px solid #dfe4d3;border-radius:9px;outline:none;background:#fff;color:#27342d;font:inherit;font-size:12px}.book-answer-row input:focus{border-color:#9da96d;box-shadow:0 0 0 3px #f1f3e3}.book-answer-row button{padding:0 13px;border:0;border-radius:9px;background:#ecefdc;color:#59643d;font:inherit;font-size:10px;font-weight:900;cursor:pointer}.book-answer-row button:hover{background:#e0e6ca}.book-feedback{min-height:17px;margin:6px 0 0;color:#a16b4b;font-size:10px;line-height:1.6}.book-feedback.good{color:#3d805d}.book-hint,.book-solution{margin:7px 0 0;color:#6c776f;font-size:10px;line-height:1.8}.book-hint summary,.book-solution summary{width:max-content;max-width:100%;color:#737e52;font-weight:900;cursor:pointer}.book-solution{margin-left:0}.book-solution p{margin:5px 0}.book-related{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:13px;padding:10px 12px;border-radius:10px;background:#f2f4e9;color:#526646;font-size:10px;font-weight:900;text-decoration:none}.book-related:hover{background:#eaefd9}.book-empty{display:flex;flex-direction:column;align-items:center;gap:7px;margin:20px 0;padding:35px 20px;border:1px dashed #dce0cf;border-radius:17px;background:#fffefa;color:#758178;font-size:11px}.book-empty b{color:#4b5e50;font-size:14px}.book-source-note{display:flex;align-items:center;justify-content:space-between;gap:22px;margin-top:42px;padding:24px 27px;border:1px solid #e6e7d8;border-radius:20px;background:linear-gradient(120deg,#f3f3e7,#fffefa)}.book-source-note h2{margin:6px 0 7px;font-size:16px}.book-source-note p{max-width:780px;margin:0;color:#6a756b;font-size:10px;line-height:1.8}.book-source-note p a{color:#61724b;font-weight:900}.book-source-note>a{flex:0 0 auto;display:flex;align-items:center;gap:10px;padding:11px 14px;border-radius:99px;background:#596441;color:#fff;font-size:10px;font-weight:900;text-decoration:none}.book-source-note>a:hover{background:#475235}
@media(max-width:850px){.book-method{grid-template-columns:1fr;gap:18px}.book-steps{grid-template-columns:repeat(4,minmax(0,1fr))}.book-controls{grid-template-columns:minmax(180px,1fr) 220px}.book-controls .incomplete-control{grid-column:1/-1;padding:4px 5px}}
@media(max-width:650px){.book-method{gap:14px;margin-bottom:32px;padding:17px}.book-method h2{font-size:17px}.book-method-copy>p{font-size:10px}.book-steps{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.book-steps li{min-height:75px;padding:9px}.book-browser .browser-heading{align-items:flex-start;flex-direction:column;gap:8px}.book-controls{grid-template-columns:1fr;gap:9px;padding:10px}.book-controls .incomplete-control{grid-column:auto}.book-lesson-list{grid-template-columns:1fr;gap:9px}.book-lesson>summary{min-height:68px;padding:10px 11px;grid-template-columns:33px minmax(0,1fr) auto 13px;gap:8px}.book-number{width:32px;height:32px}.book-heading>b{font-size:12px}.book-state{font-size:8px}.book-body{padding-right:12px;padding-left:12px}.book-source-note{align-items:flex-start;flex-direction:column;margin-top:32px;padding:18px}.book-source-note h2{font-size:14px;line-height:1.6}.book-source-note p{font-size:9px}.book-source-note>a{font-size:9px}.book-hero{padding:27px 21px}}
@media(prefers-reduced-motion:reduce){.textbook-page *{scroll-behavior:auto!important;transition:none!important}}

.book-deep-unit{margin:14px 0 0;padding:14px;border:1px solid #e3e7d4;border-radius:14px;background:linear-gradient(140deg,#fafbf4,#fffefa)}.book-deep-unit header{margin-bottom:12px}.book-deep-label{display:inline-block;padding:4px 8px;border-radius:99px;background:#e9efd9;color:#536b42;font-size:9px;font-weight:900}.book-deep-unit h3{margin:8px 0 5px;color:#34483a;font-size:14px;line-height:1.55}.book-deep-unit header>p{margin:0;color:#6b776d;font-size:10px;line-height:1.75}.book-deep-concepts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.book-deep-concepts article{padding:10px;border:1px solid #eceee3;border-radius:10px;background:#fff}.book-deep-concepts article>b{color:#596744;font-size:10px}.book-deep-concepts article p{margin:5px 0 0;color:#68736a;font-size:10px;line-height:1.75}.book-model-lab{margin-top:12px;padding:12px;border-radius:12px;background:#f0f3e7}.book-model-heading{display:flex;flex-direction:column;gap:4px}.book-model-heading b{color:#43543f;font-size:11px}.book-model-heading span,.book-model-caption{color:#748071;font-size:9px;line-height:1.7}.book-model-controls{display:flex;align-items:center;gap:18px;margin:10px 0}.book-model-controls label,.book-number-control{display:flex;align-items:center;gap:8px;color:#55634f;font-size:10px;font-weight:800}.book-model-controls select{padding:6px 9px;border:1px solid #d8dfca;border-radius:8px;background:#fff;color:#45523e;font:inherit}.book-model-controls input[type=range],.book-number-control input[type=range]{width:min(240px,55vw);accent-color:#70814f}.book-fraction-bar{display:grid;grid-template-columns:repeat(var(--fraction-pieces,6),minmax(0,1fr));gap:3px;margin:10px 0 7px}.book-fraction-bar span{height:26px;border:1px solid #cfd8bf;border-radius:4px;background:#fff}.book-fraction-bar span.is-shaded{border-color:#899a61;background:linear-gradient(135deg,#aebe80,#d5dfaa)}.book-model-result{margin:5px 0 0;color:#526347;font-size:10px;font-weight:800;line-height:1.7}.book-model-lab:has([data-fraction-denominator]) .book-fraction-bar{grid-template-columns:repeat(var(--fraction-denominator,6),minmax(0,1fr))}.book-number-control{justify-content:space-between;margin:10px 0}.book-remainder-strip{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:3px}.book-remainder-strip span{display:grid;min-height:20px;place-items:center;border:1px solid #e0e5d5;border-radius:4px;background:#fff;color:#869082;font-size:8px}.book-remainder-strip span.is-match{border-color:#82965a;background:#dce8c5;color:#415532;font-weight:900}.book-remainder-strip span.is-current{outline:2px solid #526b43;outline-offset:1px}.book-model-caption{margin:7px 0 0}.book-practice-item{padding:10px 0;border-top:1px solid #eceee5}.book-practice-item:first-of-type{padding-top:5px;border-top:0}.book-practice-item.is-correct .book-question{color:#3d7655}.book-question>b{color:#68794d}.book-review{margin-top:14px;padding:12px;border:1px solid #e8eadc;border-radius:12px;background:#fafaf4}.book-review h3{margin:0 0 8px;color:#556340;font-size:11px}.book-review ol{display:grid;gap:8px;margin:0;padding-left:18px}.book-review li{padding-left:2px;color:#515f54;font-size:10px;line-height:1.7}.book-review li>p{margin:0}.book-review details{margin-top:3px;color:#6b776d}.book-review summary{width:max-content;color:#73804f;font-weight:800;cursor:pointer}.book-review details p{margin:3px 0 0}
@media(max-width:650px){.book-deep-concepts{grid-template-columns:1fr;gap:6px}.book-deep-unit{padding:11px}.book-model-controls{gap:12px}.book-fraction-bar span{height:22px}.book-remainder-strip{grid-template-columns:repeat(6,minmax(0,1fr));gap:4px}.book-remainder-strip span{min-height:30px;font-size:.875rem}}


/* 儿童阅读排版层级：标题突出，讲解正文保持约 15–16px，辅助信息不低于 12px。 */
.textbook-page {
  --book-reading: 0.98rem;
  --book-support: 0.875rem;
  --book-meta: 0.75rem;
  --book-line: 1.85;
}
.textbook-page .course-hero-copy > p { font-size: 1rem; line-height: 1.9; }
.textbook-page .course-kicker,
.textbook-page .course-eyebrow { font-size: 0.8125rem; line-height: 1.55; }
.textbook-page .book-method h2 { font-size: clamp(1.3rem, 2.2vw, 1.55rem); line-height: 1.4; }
.textbook-page .book-method-copy > p { font-size: var(--book-reading); line-height: var(--book-line); }
.textbook-page .book-steps span { font-size: var(--book-support); line-height: 1.75; }
.textbook-page .book-steps b { font-size: 1rem; }
.textbook-page .grade-tile-copy > b { font-size: 1rem; line-height: 1.55; }
.textbook-page .grade-tile-copy > small,
.textbook-page .grade-tile-copy > .grade-tile-count { font-size: var(--book-support); line-height: 1.65; }
.textbook-page .book-grade-label { font-size: var(--book-meta); line-height: 1.5; }
.textbook-page .book-heading > b { font-size: 1rem; line-height: 1.5; }
.textbook-page .book-group-badge,
.textbook-page .book-status { font-size: var(--book-meta); line-height: 1.4; }
.textbook-page .book-state { font-size: 0.8125rem; }
.textbook-page .book-source-attribution,
.textbook-page .book-source-details { font-size: var(--book-support); line-height: 1.8; }
.textbook-page .book-goal { font-size: var(--book-reading); line-height: var(--book-line); }
.textbook-page .book-idea { font-size: 0.95rem; line-height: var(--book-line); }
.textbook-page .book-example-label { font-size: 0.8125rem; line-height: 1.5; }
.textbook-page .book-example > strong { font-size: 1.125rem; line-height: 1.75; }
.textbook-page .book-example ol { font-size: var(--book-reading); line-height: var(--book-line); }
.textbook-page .book-diagram { font-size: 0.9rem; line-height: 1.7; }
.textbook-page .book-deep-label { font-size: 0.8125rem; line-height: 1.5; }
.textbook-page .book-deep-unit h3 { font-size: 1.2rem; line-height: 1.5; }
.textbook-page .book-deep-unit header > p { font-size: var(--book-support); line-height: 1.8; }
.textbook-page .book-deep-concepts article > b { font-size: 0.95rem; line-height: 1.55; }
.textbook-page .book-deep-concepts article p { font-size: var(--book-support); line-height: 1.8; }
.textbook-page .book-model-heading b { font-size: 1rem; line-height: 1.55; }
.textbook-page .book-model-heading span,
.textbook-page .book-model-caption { font-size: var(--book-support); line-height: 1.75; }
.textbook-page .book-model-controls label,
.textbook-page .book-number-control { font-size: var(--book-support); line-height: 1.5; }
.textbook-page .book-model-controls select { min-height: 44px; font-size: 1rem; }
.textbook-page .book-model-result { font-size: var(--book-support); line-height: 1.8; }
.textbook-page .book-remainder-strip span { min-height: 28px; font-size: 0.8125rem; }
.textbook-page .book-practice-top h3,
.textbook-page .book-review h3 { font-size: 1rem; line-height: 1.5; }
.textbook-page .book-count { font-size: 0.8125rem; }
.textbook-page .book-question { font-size: 1rem; line-height: var(--book-line); }
.textbook-page .book-answer-row input { min-height: 44px; font-size: 1rem; }
.textbook-page .book-answer-row button { min-height: 44px; padding-inline: 14px; font-size: 0.9rem; }
.textbook-page .book-feedback,
.textbook-page .book-hint,
.textbook-page .book-solution,
.textbook-page .book-review li { font-size: var(--book-support); line-height: 1.8; }
.textbook-page .book-hint summary,
.textbook-page .book-solution summary,
.textbook-page .book-review summary { min-height: 36px; display: inline-flex; align-items: center; font-size: var(--book-support); }
.textbook-page .book-related { min-height: 44px; font-size: 0.9rem; line-height: 1.5; }
.textbook-page .book-source-note h2 { font-size: 1.35rem; line-height: 1.5; }
.textbook-page .book-source-note p { font-size: var(--book-support); line-height: 1.8; }
.textbook-page .book-source-note > a { min-height: 44px; font-size: 0.9rem; }
@media (max-width: 650px) {
  .textbook-page .course-hero-copy > p { font-size: 0.98rem; line-height: 1.85; }
  .textbook-page .book-method-copy > p,
  .textbook-page .book-goal,
  .textbook-page .book-example ol,
  .textbook-page .book-question { font-size: 0.96rem; }
  .textbook-page .book-heading > b { font-size: 0.98rem; }
  .textbook-page .book-state { font-size: 0.75rem; }
  .textbook-page .book-deep-concepts article p,
  .textbook-page .book-source-details,
  .textbook-page .book-source-note p { font-size: 0.85rem; }
  .textbook-page .book-answer-row input { width: min(230px, 68%); }
  .textbook-page .book-source-details summary { min-height: 40px; display: inline-flex; align-items: center; }
}

.textbook-page .book-lesson-list { align-items: start; }
@media (min-width: 651px) {
  .textbook-page .book-lesson[open]:has(.book-deep-unit) { grid-column: 1 / -1; }
}


/* 独立审校后的移动端细节：知识正文不缩小，长标题和作答区允许舒展。 */
.textbook-page .book-deep-diagram { margin: 12px 0; padding: 10px 12px; border: 1px solid #e7eadc; border-radius: 11px; background: #f7f8f1; }
.textbook-page .book-deep-diagram figcaption { color: #56684b; font-size: 0.9rem; font-weight: 800; line-height: 1.6; }
.textbook-page .book-deep-diagram .book-diagram { margin-top: 7px; }
@media (max-width: 650px) {
  .textbook-page .book-deep-concepts article p,
  .textbook-page .book-model-heading span,
  .textbook-page .book-model-caption,
  .textbook-page .book-model-result,
  .textbook-page .book-feedback,
  .textbook-page .book-hint,
  .textbook-page .book-solution,
  .textbook-page .book-review li { font-size: 0.95rem; line-height: 1.8; }
  .textbook-page .book-heading > b { white-space: normal; overflow: visible; text-overflow: clip; }
  .textbook-page .book-answer-row { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .textbook-page .book-answer-row input,
  .textbook-page .book-answer-row button { width: 100%; }
  .textbook-page .book-answer-row input { min-height: 48px; }
  .textbook-page .book-deep-diagram figcaption { font-size: 0.95rem; }
  .textbook-page .book-deep-diagram .book-diagram { font-size: 0.8125rem; }
  .textbook-page .book-grade-tile { min-height: 0; }
}


/* 奇偶规律图卡：先看标签，再看公式；色彩辅助理解但不替代“奇/偶”文字。 */
.textbook-page .book-parity-board {
  margin: 14px 0;
  padding: clamp(13px, 2.2vw, 19px);
  border: 2px solid #e4e7c9;
  border-radius: 18px;
  background: linear-gradient(135deg, #fffaf0 0%, #f7f9ee 48%, #f0f7ff 100%);
  box-shadow: 0 8px 20px rgba(57, 75, 56, 0.07);
}
.textbook-page .book-parity-board-head { margin-bottom: 13px; }
.textbook-page .book-parity-board-head > span,
.textbook-page .book-parity-worked-head > span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border-radius: 99px;
  background: #e9efd8;
  color: #51643e;
  font-size: 0.8125rem;
  font-weight: 900;
  line-height: 1.4;
}
.textbook-page .book-parity-board-head h4 {
  margin: 7px 0 3px;
  color: #344832;
  font-size: clamp(1.15rem, 2.1vw, 1.4rem);
  line-height: 1.45;
}
.textbook-page .book-parity-board-head p {
  margin: 0;
  color: #5e6a5e;
  font-size: 0.9rem;
  line-height: 1.7;
}
.textbook-page .book-parity-definition-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.textbook-page .book-parity-definition {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e3e7db;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
}
.textbook-page .book-parity-definition > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.textbook-page .book-parity-definition-label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 3px 9px;
  border-radius: 9px;
  font-size: 0.9rem;
  font-weight: 900;
}
.textbook-page .book-parity-definition strong {
  font-size: clamp(1.45rem, 3.2vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: 0.015em;
}
.textbook-page .book-parity-definition p {
  margin: 7px 0 0;
  color: #556358;
  font-size: 0.875rem;
  line-height: 1.65;
}
.textbook-page .book-parity-definition.is-even .book-parity-definition-label,
.textbook-page .book-parity-definition.is-even strong { color: #17688c; }
.textbook-page .book-parity-definition.is-even .book-parity-definition-label { background: #e4f4fb; }
.textbook-page .book-parity-definition.is-odd .book-parity-definition-label,
.textbook-page .book-parity-definition.is-odd strong { color: #aa4c39; }
.textbook-page .book-parity-definition.is-odd .book-parity-definition-label { background: #fff0e9; }
.textbook-page .book-parity-law-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.textbook-page .book-parity-law-grid > section {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e7eadf;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}
.textbook-page .book-parity-law-grid h5 {
  margin: 0 0 8px;
  color: #3e5141;
  font-size: 1rem;
  line-height: 1.5;
}
.textbook-page .book-parity-rule-list { display: grid; gap: 7px; }
.textbook-page .book-parity-equation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 49px;
  padding: 6px 9px;
  border: 1px solid #edf0e8;
  border-radius: 12px;
  background: #fff;
}
.textbook-page .book-parity-chip {
  display: inline-grid;
  min-width: 2.05em;
  min-height: 1.55em;
  place-items: center;
  padding: 0 6px;
  border-radius: 9px;
  font-size: clamp(1.25rem, 3.4vw, 1.55rem);
  font-weight: 900;
  line-height: 1.3;
}
.textbook-page .book-parity-chip.is-odd,
.textbook-page .book-parity-number.is-odd { background: #fff0e9; color: #a33e32; }
.textbook-page .book-parity-chip.is-even,
.textbook-page .book-parity-number.is-even { background: #e6f5fc; color: #14658a; }
.textbook-page .book-parity-operator,
.textbook-page .book-parity-equals {
  flex: 0 0 auto;
  color: #4b594d;
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
}
.textbook-page .book-parity-general-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 49px;
  padding: 6px 9px;
  border: 1px solid #edf0e8;
  border-radius: 12px;
  background: #fff;
}
.textbook-page .book-parity-general-rule b {
  color: #46584a;
  font-size: 0.95rem;
  line-height: 1.55;
  text-align: center;
}
.textbook-page .book-parity-general-rule > span[aria-hidden="true"] {
  color: #687654;
  font-size: 1.2rem;
  font-weight: 900;
}
.textbook-page .book-parity-worked {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #e3e8d7;
  border-radius: 14px;
  background: linear-gradient(110deg, #fff 0%, #f8fbf2 100%);
}
.textbook-page .book-parity-worked-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 9px;
}
.textbook-page .book-parity-worked-head strong {
  color: #334733;
  font-size: 1.15rem;
  line-height: 1.5;
}
.textbook-page .book-parity-worked-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.textbook-page .book-parity-worked-step {
  min-width: 0;
  padding: 8px;
  border: 1px solid #e8ece1;
  border-radius: 12px;
  background: #fff;
}
.textbook-page .book-parity-worked-step > b {
  display: block;
  margin: 0 0 5px;
  color: #52634c;
  font-size: 0.875rem;
  line-height: 1.5;
}
.textbook-page .book-parity-number {
  display: inline-flex;
  flex: 0 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 2.2em;
  min-height: 39px;
  padding: 2px 5px;
  border-radius: 9px;
  line-height: 1.15;
}
.textbook-page .book-parity-number b { font-size: 1rem; }
.textbook-page .book-parity-number small { font-size: 0.7rem; font-weight: 900; }
.textbook-page .book-parity-worked-step .book-parity-equation { gap: 5px; min-height: 48px; padding: 4px; }
.textbook-page .book-parity-worked-step .book-parity-chip { min-width: 1.9em; padding-inline: 4px; }
.textbook-page .book-parity-worked > p {
  margin: 9px 0 0;
  color: #52634c;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.7;
}
.textbook-page .book-parity-takeaway {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-left: 4px solid #7e9a58;
  border-radius: 0 11px 11px 0;
  background: #edf4e4;
  color: #40583e;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.7;
}
@media (max-width: 650px) {
  .textbook-page .book-parity-board { padding: 12px; }
  .textbook-page .book-parity-board-head h4 { font-size: 1.2rem; }
  .textbook-page .book-parity-definition-grid { grid-template-columns: 1fr; }
  .textbook-page .book-parity-law-grid { grid-template-columns: 1fr; gap: 9px; }
  .textbook-page .book-parity-worked-steps { grid-template-columns: 1fr; gap: 7px; }
  .textbook-page .book-parity-equation { gap: 6px; }
  .textbook-page .book-parity-worked-step .book-parity-equation { justify-content: flex-start; padding-inline: 8px; }
  .textbook-page .book-parity-definition p { font-size: 0.9rem; }
}
@media (max-width: 360px) {
  .textbook-page .book-parity-definition-grid { grid-template-columns: 1fr; }
  .textbook-page .book-parity-definition { display: block; }
  .textbook-page .book-parity-definition > div { align-items: center; flex-direction: row; flex-wrap: nowrap; justify-content: flex-start; gap: 10px; }
  .textbook-page .book-parity-definition strong { flex: 0 0 auto; white-space: nowrap; }
  .textbook-page .book-parity-definition p { margin: 7px 0 0; }
  .textbook-page .book-parity-worked-step .book-parity-equation { gap: 7px; }
}


/* Narrow textbook header: keep the brand/action together and give navigation its own non-wrapping row. */
@media (max-width: 650px) {
  .textbook-page .course-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand action" "nav nav";
    align-items: center;
    column-gap: 10px;
    row-gap: 5px;
    width: 100%;
    height: auto;
    min-height: 76px;
    padding: 7px 14px 6px;
  }
  .textbook-page .course-topbar > .brand {
    grid-area: brand;
    min-width: 0;
    white-space: nowrap;
  }
  .textbook-page .course-topbar > .nav-cta {
    grid-area: action;
    justify-self: end;
    flex: 0 0 auto;
    padding: 8px 10px;
    white-space: nowrap;
    font-size: 0.72rem;
  }
  .textbook-page .course-topbar > .topnav {
    grid-area: nav;
    display: flex;
    width: 100%;
    min-width: 0;
    margin: 0;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    white-space: nowrap;
    font-size: 0.75rem;
    line-height: 1.4;
  }
  .textbook-page .course-topbar > .topnav a {
    display: flex;
    min-height: 30px;
    flex: 0 0 auto;
    align-items: center;
    padding: 4px 6px;
    white-space: nowrap;
  }
  .textbook-page .course-topbar > .topnav::-webkit-scrollbar { height: 3px; }
}

@media (max-width: 650px) {
  .textbook-page .course-topbar > .topnav a:last-child { display: none; }
}

/* Equations are display items, not sentence fragments. Apply consistently across route lessons and models. */
.textbook-page .book-rich-math{display:block;width:fit-content;max-width:100%;margin:.45em 0;padding:.35em .7em;border-left:4px solid #7f9859;border-radius:0 10px 10px 0;background:#edf4e5;color:#344b38;font-size:clamp(1.05rem,2.3vw,1.28rem);font-weight:900;line-height:1.75;overflow-wrap:anywhere;white-space:normal;font-variant-numeric:lining-nums tabular-nums}
.textbook-page .book-rich-prose{color:inherit}
.textbook-page .book-model-result .book-rich-math{font-size:clamp(1rem,2vw,1.15rem)}
.textbook-page .book-example .book-rich-math{margin:.25em 0;font-size:clamp(1.1rem,2.5vw,1.35rem)}
@media(max-width:650px){.textbook-page .book-rich-math{font-size:1.05rem;line-height:1.8;padding:.32em .55em}.textbook-page .book-example .book-rich-math{font-size:1.08rem}.textbook-page .book-model-result .book-rich-math{font-size:1rem}}

@media (max-width: 380px) {
  .textbook-page .book-model-controls {
    flex-wrap: wrap;
    min-width: 0;
    row-gap: 7px;
  }
  .textbook-page .book-model-controls > label {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    flex: 1 1 100%;
    min-width: 0;
    max-width: 100%;
  }
  .textbook-page .book-model-controls select,
  .textbook-page .book-model-controls input[type="range"] {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
}

.book-prerequisite{margin:10px 0 8px;padding:8px 10px;border-left:3px solid #9ca879;border-radius:0 9px 9px 0;background:#f4f5eb;color:#526044;font-size:10px;line-height:1.75}.book-prerequisite b{color:#4d5f3f}
@media(max-width:650px){.book-prerequisite{padding:8px 9px}}

.book-level-badge{display:inline-flex;align-items:center;max-width:100%;padding:3px 6px;border-radius:99px;background:#edf1e7;color:#58664a;font-size:8px;font-weight:900;line-height:1.4;white-space:nowrap}.book-level-badge[data-level="进阶"]{background:#eef0df;color:#697348}.book-level-badge[data-level="拓展"]{background:#f4ebdf;color:#896b4a}


/* G2 深讲方法卡与练习层级 */
.textbook-page .book-method-card{margin:12px 0;padding:14px;border:1px solid #dfe6cb;border-radius:13px;background:linear-gradient(135deg,#f1f4e4,#fffefa)}
.textbook-page .book-method-card>span{display:inline-block;padding:4px 8px;border-radius:99px;background:#e2eacb;color:#50643f;font-size:.75rem;font-weight:900}
.textbook-page .book-method-card h4{margin:7px 0;color:#34483a;font-size:1rem;line-height:1.5}
.textbook-page .book-method-formula{display:block;padding:10px 12px;border-radius:9px;background:#fff;color:#34483a;font-size:1.05rem;line-height:1.75;overflow-wrap:anywhere}
.textbook-page .book-method-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-top:8px}
.textbook-page .book-method-card-grid p{margin:0;padding:9px;border:1px solid #e7eadb;border-radius:9px;background:#fff;color:#626e62;font-size:.82rem;line-height:1.75;overflow-wrap:anywhere}
.textbook-page .book-method-card-grid p b{color:#596744}
.textbook-page .book-deep-diagram figcaption{margin:8px 0 4px;color:#68734f;font-size:.8rem;font-weight:800;line-height:1.65}
.textbook-page .book-practice-item .book-question>b{display:inline-block;margin-right:2px;color:#68794d;font-size:.84rem}
@media(max-width:850px){.textbook-page .book-method-card-grid{grid-template-columns:1fr}}

/* Keep the route title from leaving a single trailing character on narrow phones. */
@media(max-width:380px){.textbook-page .book-hero h1{font-size:clamp(1.65rem,8.5vw,2rem);line-height:1.22}}


/* G1 深讲图示：整体—部分、凑十对比与故事数量变化。 */
.textbook-page .book-learning-visual{min-width:0;margin:12px 0;padding:12px;border:1px solid #e3e8d6;border-radius:12px;background:linear-gradient(145deg,#f7f8ef,#fffefa);color:#445341}
.textbook-page .book-learning-visual>figcaption{margin:0 0 10px;color:#46573c;font-size:1rem;font-weight:900;line-height:1.55}
.textbook-page .book-learning-visual h4{margin:0 0 6px;color:#58684a;font-size:.9rem;line-height:1.5}
.textbook-page .book-part-whole-grid,.textbook-page .book-strategy-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:0}
.textbook-page .book-part-whole-model,.textbook-page .book-strategy-panel{min-width:0;padding:10px;border:1px solid #e8ebdf;border-radius:10px;background:#fff}
.textbook-page .book-part-whole-model>p,.textbook-page .book-strategy-panel>p{margin:6px 0;color:#58665b;font-size:.875rem;line-height:1.7;overflow-wrap:anywhere}
.textbook-page .book-visual-equation{margin:5px 0;color:#3f503f;font-weight:900;overflow-wrap:anywhere}
.textbook-page .book-whole-box{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:8px 0;padding:8px 10px;border:1px solid #d8e1c8;border-radius:9px;background:#f2f6e9}
.textbook-page .book-whole-box span,.textbook-page .book-part-box span{color:#68745e;font-size:.78rem;font-weight:800;line-height:1.5;overflow-wrap:anywhere}
.textbook-page .book-whole-box strong,.textbook-page .book-part-box strong{color:#394d38;font-size:1.15rem;font-weight:900}
.textbook-page .book-part-boxes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.textbook-page .book-part-box{display:flex;min-width:0;flex-direction:column;gap:3px;padding:8px;border:1px solid #e8eadf;border-radius:8px;background:#fcfcf8}
.textbook-page .book-part-box:first-child{border-color:#eadfbe;background:#fcf7e9}
.textbook-page .book-visual-check{margin:8px 0 0;padding:8px 9px;border-radius:8px;background:#f1f5e9;color:#4c6046;font-size:.875rem;font-weight:700;line-height:1.7;overflow-wrap:anywhere}
.textbook-page .book-ten-frame{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;width:min(100%,230px);margin:8px auto;padding:5px;border:2px solid #a7b58b;border-radius:9px;background:#fbfcf7}
.textbook-page .book-ten-cell{display:grid;min-width:0;aspect-ratio:1;place-items:center;border:1px solid #d5ddc9;border-radius:4px;background:#fff;color:#86927a;font-size:1.1rem;font-weight:900}
.textbook-page .book-ten-cell.is-filled{border-color:#94a678;background:#e4edcf;color:#536a41}
.textbook-page .book-ten-cell.is-completing{border-color:#d5bd7a;background:#fbf0ce;color:#8b7136}
.textbook-page .book-number-line{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:0;width:100%;margin:12px 0 8px}
.textbook-page .book-number-point{position:relative;z-index:0;display:grid;min-width:0;min-height:2rem;place-items:center;color:#46583e;font-size:.8rem;font-weight:900}
.textbook-page .book-number-point::before{position:absolute;z-index:-1;top:50%;right:0;left:0;height:2px;background:#cbd6b6;content:""}
.textbook-page .book-number-point:first-child::before{left:50%}
.textbook-page .book-number-point:last-child::before{right:50%}
.textbook-page .book-number-point::after{position:absolute;z-index:-1;inset:2px auto 2px 50%;width:1.55rem;border:1px solid #d8e2c7;border-radius:50%;background:#fff;content:"";transform:translateX(-50%)}
.textbook-page .book-story-model{display:grid;grid-template-columns:minmax(0,1fr) 20px minmax(0,1fr) 20px minmax(0,1fr);align-items:center;gap:3px;min-width:0}
.textbook-page .book-story-step{display:flex;min-width:0;min-height:92px;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:7px 4px;border:1px solid #e1e7d6;border-radius:9px;background:#fff;text-align:center}
.textbook-page .book-story-step>span{color:#68745e;font-size:.75rem;font-weight:800;line-height:1.45;overflow-wrap:anywhere}
.textbook-page .book-story-step>strong{color:#3f583d;font-size:1rem;line-height:1.4;overflow-wrap:anywhere}
.textbook-page .book-story-step>strong small{display:block;color:#72806d;font-size:.7rem;font-weight:700}
.textbook-page .book-story-step.is-change{border-color:#e4d7ad;background:#fcf8ed}
.textbook-page .book-story-step.is-result{border-color:#cddbb8;background:#f4f8ec}
.textbook-page .book-story-dots{display:flex;min-height:12px;flex-wrap:wrap;justify-content:center;gap:2px;max-width:100%}
.textbook-page .book-story-dots span{width:8px;height:8px;flex:0 0 8px;border:1px solid #8da071;border-radius:50%;background:#dbe7c7}
.textbook-page .book-story-step.is-change .book-story-dots span{border-color:#b59a5c;background:#f0e0b2}
.textbook-page .book-story-operator{color:#74825c;font-size:.9rem;font-weight:900;text-align:center}
@media(max-width:650px){
  .textbook-page .book-learning-visual{padding:9px}
  .textbook-page .book-learning-visual>figcaption{font-size:.95rem}
  .textbook-page .book-part-whole-grid,.textbook-page .book-strategy-grid{grid-template-columns:1fr;gap:7px}
  .textbook-page .book-part-whole-model,.textbook-page .book-strategy-panel{padding:9px}
  .textbook-page .book-part-box{padding:7px}
  .textbook-page .book-story-model{grid-template-columns:minmax(0,1fr) 14px minmax(0,1fr) 14px minmax(0,1fr);gap:2px}
  .textbook-page .book-story-step{min-height:86px;padding:6px 2px}
  .textbook-page .book-story-step>span{font-size:.7rem}
  .textbook-page .book-story-step>strong{font-size:.9rem}
  .textbook-page .book-story-step>strong small{font-size:.65rem}
  .textbook-page .book-story-dots{gap:2px}
  .textbook-page .book-story-dots span{width:7px;height:7px;flex-basis:7px}
}
@media(max-width:340px){
  .textbook-page .book-story-model{grid-template-columns:minmax(0,1fr) 14px minmax(0,1fr) 14px minmax(0,1fr)}
  .textbook-page .book-story-operator{font-size:.8rem}
  .textbook-page .book-number-point{font-size:.72rem}
  .textbook-page .book-part-boxes{grid-template-columns:1fr}
}

/* 一年级原创基础先修图示：点数、配对比较与数轴加减。 */
.textbook-page .book-learning-visual{min-width:0;margin:12px 0 0;padding:12px;border:1px solid #e7eadc;border-radius:12px;background:#f8f9f2}
.textbook-page .book-learning-visual figcaption{margin-bottom:9px;color:#56684b;font-size:.95rem;font-weight:900;line-height:1.6}
.textbook-page .book-quantity-count .book-count-model{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;max-width:420px}
.textbook-page .book-count-item{display:grid;min-height:46px;place-items:center;border:1px solid #e1e6d6;border-radius:9px;background:#fff}
.textbook-page .book-count-item i{color:#72834c;font-size:1.1rem;font-style:normal;line-height:1}
.textbook-page .book-count-item b{color:#48563e;font-size:.78rem;line-height:1.3}
.textbook-page .book-zero-model{display:flex;align-items:center;gap:9px;margin-top:8px;color:#69756b;font-size:.84rem}
.textbook-page .book-zero-model b{display:grid;width:28px;height:28px;place-items:center;border:1px dashed #aab596;border-radius:50%;color:#5d6e49}
.textbook-page .book-visual-check{margin:8px 0 0;color:#59684e;font-size:.88rem;line-height:1.75}
.textbook-page .book-compare-row{display:grid;grid-template-columns:minmax(64px,auto) minmax(0,1fr) 28px;align-items:center;gap:8px;margin:7px 0;color:#536348;font-size:.84rem}
.textbook-page .book-compare-row>b{overflow-wrap:anywhere}
.textbook-page .book-compare-row>strong{text-align:right}
.textbook-page .book-compare-items{display:grid;grid-template-columns:repeat(var(--pair-count),minmax(0,1fr));gap:3px;min-width:0}
.textbook-page .book-compare-cell{display:grid;min-width:0;min-height:24px;place-items:center;border:1px solid transparent;border-radius:5px;color:transparent;font-size:.75rem}
.textbook-page .book-compare-cell.is-paired{border-color:#d7dfc8;background:#edf2e3;color:#75834d}
.textbook-page .book-compare-cell.is-extra{border-color:#d3ad7c;background:#fbf0df;color:#a76e32;font-weight:900}
.textbook-page .book-compare-scale{display:grid;grid-template-columns:repeat(21,minmax(0,1fr));margin:12px 0 4px;color:#798477;font-size:.64rem;text-align:center}
.textbook-page .book-compare-scale>span{position:relative;padding-top:7px;border-top:2px solid #cbd6b6}
.textbook-page .book-compare-scale>span::before{position:absolute;top:-4px;left:50%;width:5px;height:5px;border-radius:50%;background:#bbc7a4;content:"";transform:translateX(-50%)}
.textbook-page .book-compare-scale>span.is-left-value::before,.textbook-page .book-compare-scale>span.is-right-value::before{width:9px;height:9px;top:-6px;background:#71824d;box-shadow:0 0 0 2px #fff}
.textbook-page .book-compare-scale>span.is-right-value::before{background:#c1844d}
.textbook-page .book-operation-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.textbook-page .book-operation-model{min-width:0;padding:10px;border:1px solid #e4e9d8;border-radius:10px;background:#fff}
.textbook-page .book-operation-model h4{margin:0;color:#40533c;font-size:1rem}
.textbook-page .book-operation-model>p{margin:4px 0 8px;color:#6b7669;font-size:.8rem;line-height:1.6}
.textbook-page .book-operation-counters{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px;min-height:34px;margin-bottom:13px}
.textbook-page .book-operation-counters>span{display:flex;flex-wrap:wrap;gap:2px;max-width:100%;padding:3px 5px;border-radius:6px;background:#f1f4e8}
.textbook-page .book-operation-counters>span i{color:#71834b;font-size:.76rem;font-style:normal;line-height:1}
.textbook-page .book-operation-counters>span i.is-removed{color:#ae845e}
.textbook-page .book-operation-counters>b{color:#7b866b;font-size:.8rem}
.textbook-page .book-operation-line{position:relative;min-width:0;padding-top:17px}
.textbook-page .book-operation-arrow{position:absolute;top:8px;height:2px;border-top:2px solid #91a270;color:#607344;font-size:.75rem;font-weight:900;line-height:1}
.textbook-page .book-operation-arrow{text-align:right}
.textbook-page .book-operation-ticks{display:grid;grid-template-columns:repeat(11,minmax(0,1fr));color:#748072;font-size:.65rem;text-align:center}
.textbook-page .book-operation-tick{position:relative;padding-top:6px}
.textbook-page .book-operation-tick::before{position:absolute;top:0;left:50%;height:4px;border-left:1px solid #c4cfb3;content:""}
.textbook-page .book-operation-tick.is-start,.textbook-page .book-operation-tick.is-end{color:#405c34;font-weight:900}
.textbook-page .book-operation-tick.is-start::before,.textbook-page .book-operation-tick.is-end::before{height:7px;border-color:#71824d;border-left-width:2px}
@media(max-width:650px){
  .textbook-page .book-learning-visual{padding:10px}
  .textbook-page .book-compare-row{grid-template-columns:minmax(52px,auto) minmax(0,1fr) 24px;gap:5px;font-size:.78rem}
  .textbook-page .book-compare-items{gap:2px}
  .textbook-page .book-compare-cell{min-height:20px;font-size:.68rem}
  .textbook-page .book-compare-scale{font-size:.55rem}
  .textbook-page .book-operation-grid{grid-template-columns:1fr}
}


/* G1 count-once models: combination table, overlap regions, and object pairs. */
.textbook-page .book-counting-visual{min-width:0}
.textbook-page .book-combination-table-wrap{min-width:0;overflow-x:auto}
.textbook-page .book-combination-table{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:4px;color:#445341;font-size:.86rem}
.textbook-page .book-combination-table caption{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;clip-path:inset(50%)}
.textbook-page .book-combination-table th,.textbook-page .book-combination-table td{min-width:0;padding:7px 5px;border:1px solid #e2e7d6;border-radius:8px;overflow-wrap:anywhere;text-align:center;line-height:1.6}
.textbook-page .book-combination-table thead th{background:#f0f3e7;color:#566747;font-weight:900}
.textbook-page .book-combination-table thead th:first-child,.textbook-page .book-combination-table tbody th{width:23%}
.textbook-page .book-combination-table tbody th{background:#fafaf4;color:#5f6c53}
.textbook-page .book-combination-table td{background:#fff;color:#485544}
.textbook-page .book-overlap-regions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:10px 0 8px}
.textbook-page .book-overlap-region{display:flex;min-width:0;min-height:66px;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:7px 5px;border:1px solid #dfe6d3;border-radius:10px;background:#f5f7ee;color:#536349;text-align:center}
.textbook-page .book-overlap-region span{font-size:.8rem;line-height:1.45;overflow-wrap:anywhere}
.textbook-page .book-overlap-region strong{font-size:1.05rem;color:#3f5838}
.textbook-page .book-overlap-region.is-shared{border-color:#d9c79e;background:#fbf4e5;color:#82683e}
.textbook-page .book-overlap-region.is-shared strong{color:#8c6532}
.textbook-page .book-overlap-equation{margin:8px 0 0;color:#46553f;font-size:1rem;font-weight:900;text-align:center}
.textbook-page .book-pair-groups{display:grid;grid-template-columns:repeat(auto-fit,minmax(76px,1fr));gap:7px;margin:10px 0 8px}
.textbook-page .book-pair-group,.textbook-page .book-pair-remainder{display:flex;min-width:0;min-height:62px;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:7px 4px;border:1px solid #dfe6d3;border-radius:10px;background:#f5f7ee;color:#5c704a}
.textbook-page .book-pair-group>b{font-size:1.08rem;letter-spacing:.08em;white-space:nowrap}
.textbook-page .book-pair-group small,.textbook-page .book-pair-remainder small{font-size:.75rem;line-height:1.35;text-align:center}
.textbook-page .book-pair-remainder{border-color:#d8b783;background:#fbf2e2;color:#956d38}
.textbook-page .book-pair-remainder>b{font-size:1.15rem}
.textbook-page .book-pair-remainder.is-empty{border-color:#dfe6d3;background:#f8f9f3;color:#65735c}
@media(max-width:650px){
  .textbook-page .book-combination-table{border-spacing:3px;font-size:.78rem}
  .textbook-page .book-combination-table th,.textbook-page .book-combination-table td{padding:6px 3px}
  .textbook-page .book-overlap-regions{gap:4px}
  .textbook-page .book-overlap-region{min-height:60px;padding:6px 3px}
  .textbook-page .book-overlap-region span{font-size:.72rem}
  .textbook-page .book-pair-groups{grid-template-columns:repeat(auto-fit,minmax(64px,1fr));gap:5px}
  .textbook-page .book-pair-group,.textbook-page .book-pair-remainder{min-height:56px}
}

/* G3-11 logic lesson: compact, accessible candidate-elimination table. */
.textbook-page .book-logic-elimination{min-width:0}
.textbook-page .book-logic-table-wrap{width:100%;min-width:0}
.textbook-page .book-logic-table{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:3px;color:#445341;font-size:.86rem}
.textbook-page .book-logic-table caption{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;clip-path:inset(50%)}
.textbook-page .book-logic-table th,.textbook-page .book-logic-table td{min-width:0;padding:7px 4px;border:1px solid #e2e7d6;border-radius:9px;overflow-wrap:anywhere;text-align:center;line-height:1.45}
.textbook-page .book-logic-table thead th{background:#f0f3e7;color:#566747;font-weight:900}
.textbook-page .book-logic-table thead th:first-child,.textbook-page .book-logic-table tbody th{width:24%}
.textbook-page .book-logic-table tbody th{background:#fafaf4;color:#5f6c53}
.textbook-page .book-logic-table td{background:#fff;color:#8a7567}
.textbook-page .book-logic-table td.is-confirmed{border-color:#bfd0ac;background:#e7f0dc;color:#355b34}
.textbook-page .book-logic-mark{display:inline-flex;min-width:1.5rem;min-height:1.5rem;align-items:center;justify-content:center;font-size:1.1rem;font-weight:900}
.textbook-page .book-logic-legend{display:flex;flex-wrap:wrap;gap:6px 12px;margin:8px 0 4px;color:#5d6955;font-size:.78rem}
.textbook-page .book-logic-legend span{display:inline-flex;align-items:center;gap:4px}
.textbook-page .book-logic-legend b{display:inline-flex;width:1.25rem;height:1.25rem;align-items:center;justify-content:center;border:1px solid #e2e7d6;border-radius:6px;background:#fff;font-size:.88rem}
.textbook-page .book-logic-legend b.is-confirmed{border-color:#bfd0ac;background:#e7f0dc;color:#355b34}
@media(max-width:650px){
  .textbook-page .book-logic-table{border-spacing:2px;font-size:.76rem}
  .textbook-page .book-logic-table th,.textbook-page .book-logic-table td{padding:6px 2px}
  .textbook-page .book-logic-mark{min-width:1.3rem;min-height:1.3rem}
  .textbook-page .book-logic-legend{gap:5px 8px;font-size:.72rem}
}


/* G3-16 和差线段图：短条与长条左端对齐，突出“共同部分 + 多出的差”。 */
.textbook-page .book-sum-difference{min-width:0}
.textbook-page .book-sum-difference-intro{margin:0;color:#68745e;font-size:.875rem;line-height:1.7;overflow-wrap:anywhere}
.textbook-page .book-sum-difference-bars{display:grid;gap:9px;min-width:0;margin:10px 0}
.textbook-page .book-sum-difference-row{display:grid;grid-template-columns:minmax(3.5rem,4.2rem) minmax(0,1fr) 2rem;align-items:center;gap:8px;min-width:0;color:#536348;font-size:.875rem}
.textbook-page .book-sum-difference-row>b{overflow-wrap:anywhere}
.textbook-page .book-sum-difference-row>strong{text-align:right;color:#40553a}
.textbook-page .book-sum-difference-track{min-width:0}
.textbook-page .book-sum-difference-bar{display:flex;min-width:0;max-width:100%;height:34px;overflow:hidden;box-sizing:border-box;border:1px solid #cfd9bf;border-radius:8px;background:#fff}
.textbook-page .book-sum-difference-segment{display:grid;min-width:0;flex:0 0 auto;place-items:center;padding:0 4px;box-sizing:border-box;color:#40553a;font-size:.9rem;font-weight:900;line-height:1.2}
.textbook-page .book-sum-difference-segment.is-equal{border-right:2px solid #fff;background:#e4edcf}
.textbook-page .book-sum-difference-segment.is-extra{background:#f8e9c9;color:#89653b}
.textbook-page .book-sum-difference-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;min-width:0;margin-top:10px}
.textbook-page .book-sum-difference-step{display:flex;min-width:0;flex-direction:column;gap:5px;padding:9px;border:1px solid #e5e9da;border-radius:9px;background:#fff}
.textbook-page .book-sum-difference-step>b{color:#596a47;font-size:.8rem;line-height:1.5;overflow-wrap:anywhere}
.textbook-page .book-sum-difference-step>strong{color:#3f523d;font-size:.95rem;line-height:1.5;overflow-wrap:anywhere}
.textbook-page .book-sum-difference-step>span{color:#68745e;font-size:.78rem;line-height:1.55;overflow-wrap:anywhere}
@media(max-width:650px){
  .textbook-page .book-sum-difference-row{grid-template-columns:minmax(3.25rem,3.75rem) minmax(0,1fr) 1.75rem;gap:6px;font-size:.8rem}
  .textbook-page .book-sum-difference-bar{height:32px}
  .textbook-page .book-sum-difference-steps{grid-template-columns:1fr;gap:6px}
  .textbook-page .book-sum-difference-step{padding:8px}
}
@media(max-width:340px){
  .textbook-page .book-sum-difference-row{grid-template-columns:3rem minmax(0,1fr) 1.5rem;gap:5px;font-size:.75rem}
  .textbook-page .book-sum-difference-segment{padding:0 2px;font-size:.8rem}
}

/* G3-17 assumption and G3-18 reverse-operation visuals. */
.textbook-page .book-guess-check-steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;min-width:0;margin:10px 0;padding:0;list-style:none}
.textbook-page .book-guess-check-steps>li{display:grid;grid-template-columns:1.5rem minmax(0,1fr);gap:8px;min-width:0;padding:9px;border:1px solid #e5e9da;border-radius:10px;background:#fff}
.textbook-page .book-guess-check-index{display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;border-radius:50%;background:#e9efd9;color:#536747;font-size:.8rem;font-weight:900}
.textbook-page .book-guess-check-content{display:flex;min-width:0;flex-direction:column;gap:4px}
.textbook-page .book-guess-check-content strong{color:#596a47;font-size:.8rem;line-height:1.45;overflow-wrap:anywhere}
.textbook-page .book-guess-check-content>b{color:#344d3d;font-size:.95rem;line-height:1.45;overflow-wrap:anywhere}
.textbook-page .book-guess-check-content>span{color:#89653b;font-size:.84rem;font-weight:800;line-height:1.45;overflow-wrap:anywhere}
.textbook-page .book-reverse-flow{display:grid;gap:10px;min-width:0}
.textbook-page .book-reverse-flow-row{display:grid;gap:6px;min-width:0;padding:9px;border:1px solid #e5e9da;border-radius:10px;background:#fff}
.textbook-page .book-reverse-flow-row h4{margin:0;color:#596a47;font-size:.8rem;line-height:1.45}
.textbook-page .book-reverse-flow-track{display:flex;flex-wrap:wrap;align-items:center;gap:6px 4px;min-width:0;margin:0;padding:0;list-style:none}
.textbook-page .book-reverse-flow-track>li{display:inline-flex;flex:0 0 auto;align-items:center;gap:4px;min-width:0}
.textbook-page .book-reverse-token{display:inline-flex;min-width:2.1rem;min-height:2rem;align-items:center;justify-content:center;padding:3px 7px;border:1px solid #dfe6d3;border-radius:8px;background:#f6f8ef;color:#40553a;font-size:.9rem;font-weight:900;line-height:1.35}
.textbook-page .book-reverse-flow-track>li.is-operation .book-reverse-token{border-color:#ead9b5;background:#fbf2e2;color:#89653b}
.textbook-page .book-reverse-arrow{color:#839170;font-size:.85rem;font-weight:900}
@media(max-width:650px){
  .textbook-page .book-guess-check-steps{grid-template-columns:1fr;gap:6px}
  .textbook-page .book-guess-check-steps>li{padding:8px}
  .textbook-page .book-reverse-flow-row{padding:8px}
  .textbook-page .book-reverse-flow-track{gap:5px 3px}
}
