@font-face {
  font-family: StudyText;
  src: local("Times New Roman");
  unicode-range: U+0000-007F, U+00A0-024F, U+2000-206F;
}
@font-face {
  font-family: StudyText;
  src: local("Times New Roman Bold"), local("Times New Roman Gras");
  font-weight: 600 900;
  unicode-range: U+0000-007F, U+00A0-024F, U+2000-206F;
}
:root {
  color-scheme: light;
  --ink: #1b2724;
  --muted: #52615b;
  --soft: #64726b;
  --line: #e4e9e6;
  --green: #165442;
  --green-dark: #0f4535;
  --wash: #eaf3ee;
  --surface: #f6f8f7;
  --red: #953f33;
  font-family: StudyText, "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
button:disabled { cursor: default; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.sync-message { border-bottom: 1px solid #ecdfc8; background: #fbf7ed; color: #6a4c25; padding: 6px 20px; font-size: 12px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: 226px 1fr minmax(225px, 294px);
  align-items: center;
  height: 60px;
  padding-right: 21px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; gap: 10px; align-items: center; padding-left: 19px; font-size: 16px; font-weight: 700; }
.brand-mark { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 7px; background: var(--green); color: #fff; font-size: 15px; }
.primary { display: flex; height: 100%; gap: 24px; padding-left: 24px; white-space: nowrap; }
.primary button { position: relative; border: 0; padding: 0 2px; background: none; color: var(--muted); }
.primary button[aria-current] { color: var(--green); font-weight: 700; }
.primary button[aria-current]::after { content: ""; position: absolute; inset: auto 1px 0; height: 2px; background: var(--green); }
.nav-count { margin-left: 5px; color: var(--red); }
.search { display: flex; align-items: center; gap: 8px; padding: 0 10px; height: 35px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; color: var(--soft); }
.search input { width: 100%; min-width: 45px; background: none; border: 0; color: var(--ink); outline: none; }
.search:focus-within { border-color: var(--green); }
.search input:focus-visible { outline: none; }
.search input::placeholder { color: var(--soft); }
kbd { font: inherit; border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; background: white; }
.workspace { display: grid; grid-template-columns: 226px minmax(0, 1fr) minmax(315px, 25.5%); min-height: calc(100vh - 60px); }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: 19px 13px; }
.sidebar-heading { padding: 0 7px 12px; display: flex; align-items: baseline; justify-content: space-between; }
.sidebar-heading h2 { font-size: 13px; }
.sidebar-heading span { color: var(--soft); font-size: 12px; }
.chapter { display: grid; grid-template-columns: 43px 1fr; width: 100%; text-align: left; padding: 9px 8px; min-height: 39px; line-height: 1.55; font-size: 12px; background: none; border: 0; border-radius: 5px; }
.chapter:hover, .section-link:hover { background: #edf1ef; }
.chapter-label { color: var(--soft); }
.chapter[aria-current] { background: var(--wash); color: var(--green); font-weight: 700; }
.chapter[aria-current] .chapter-label { color: var(--green); }
.section-links { display: grid; gap: 2px; margin: 4px 0 7px 17px; padding-left: 10px; border-left: 1px solid #d5e3da; }
.section-link { text-align: left; background: none; padding: 6px 7px; border: 0; border-radius: 4px; font-size: 12px; color: var(--muted); }
.section-link[aria-current] { color: var(--green); font-weight: 700; }
.main, .detail { min-width: 0; }
.main { padding: 20px 24px 28px; }
.crumb { display: flex; gap: 7px; color: var(--muted); font-size: 12px; line-height: 20px; }
.crumb span { color: var(--soft); }
.main h1 { font-size: 25px; line-height: 1.4; margin: 3px 0 5px; }
.metadata { display: flex; gap: 13px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.metadata span + span::before { content: "·"; margin-right: 11px; color: var(--soft); }
.filters { display: flex; align-items: center; gap: 6px; margin: 13px 0 10px; }
.filter, .button { padding: 6px 10px; border: 1px solid #d9e1dc; border-radius: 5px; background: #fff; font-size: 13px; }
.filter[aria-pressed="true"] { border-color: #c9dfd2; background: var(--wash); color: var(--green); font-weight: 700; }
.button:hover, .filter:hover { border-color: #7da295; }
.button.primary-action { color: #fff; background: var(--green); border-color: var(--green); }
.button.primary-action:hover { background: var(--green-dark); }
.button:disabled { opacity: .55; }
.topic-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 13px; }
.topic-table .priority-col { width: 68px; }
.topic-table .pages-col { width: 92px; }
.topic-table .count-col { width: 54px; }
.topic-table th, .topic-table td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.topic-table thead th { font-size: 12px; background: var(--surface); color: var(--muted); font-weight: 400; border-top: 1px solid var(--line); }
.topic-table thead th:first-child { border-top-left-radius: 5px; }
.topic-table thead th:last-child { border-top-right-radius: 5px; }
.topic-table th:last-child, .topic-table td:last-child { text-align: right; }
.topic-table tr.group th { text-align: left; height: 33px; font-size: 12px; font-weight: 700; color: #43544b; background: #fcfdfc; }
.topic-table tr.topic { height: 38px; }
.topic-table tr.topic:hover td { background: #f4f8f6; }
.topic-table tr.selected td { background: var(--wash); color: var(--green-dark); }
.topic-table tr.selected td:first-child { box-shadow: inset 2px 0 var(--green); }
.topic-name { text-align: left; padding: 2px 0; border: 0; background: none; line-height: 1.45; }
.topic-name:hover { color: var(--green); text-decoration: underline; }
.topic-name[aria-current] { color: var(--green-dark); font-weight: 700; }
.grade { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 4px; background: #f0f2f1; color: #53645b; font-size: 13px; }
.grade.S { color: #9a482f; background: #f9eee8; }
.grade.A { color: var(--green); background: #dcece3; }
.detail { background: #fcfdfc; border-left: 1px solid var(--line); padding: 17px 19px 24px; }
.detail-inner { position: sticky; top: 77px; }
.detail-label, .question-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.detail-label { border-bottom: 1px solid var(--line); padding-bottom: 9px; color: var(--muted); font-size: 12px; }
.detail h2 { font-size: 18px; margin: 12px 0 4px; }
.page-source { color: var(--muted); font-size: 12px; }
.summary { margin-top: 10px; color: #2f4138; font-size: 13px; line-height: 1.7; }
.pitfall { margin-top: 8px; padding-left: 9px; border-left: 2px solid #d1ddd5; color: var(--muted); font-size: 12px; line-height: 1.7; }
.recall { margin-top: 9px; }
.quiz { margin-top: 15px; padding-top: 12px; border-top: 1px solid var(--line); }
.question-heading h3 { font-size: 14px; }
.question-heading span { color: var(--soft); font-size: 12px; }
.question-title { font-size: 13px; line-height: 1.65; margin: 8px 0; }
.options { display: grid; gap: 5px; }
.option { display: flex; align-items: baseline; gap: 8px; text-align: left; min-height: 30px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px; background: #fff; font-size: 12px; line-height: 1.5; }
.option:first-letter { font-weight: 700; }
.option:hover:not(:disabled), .option[aria-pressed="true"] { border-color: #6b9686; }
.option[aria-pressed="true"] { background: #f4f9f6; }
.option.correct { border-color: #a9c9b5; background: #eaf4ed; color: var(--green-dark); }
.option.incorrect { border-color: #e0b5aa; color: var(--red); background: #fcf0ec; }
.option-status { margin-left: auto; white-space: nowrap; font-size: 12px; }
.quiz-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.answer-hint { font-size: 12px; margin-top: 6px; color: var(--green-dark); }
.feedback { font-size: 12px; line-height: 1.65; margin-top: 8px; background: var(--surface); border-left: 2px solid #b7cfc2; border-radius: 4px; padding: 7px 8px; }
.feedback.wrong { border-color: #d3a195; }
.feedback-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 2px; }
.feedback strong { color: var(--green); }
.feedback.wrong strong { color: var(--red); }
.related { margin-top: 15px; padding-top: 12px; border-top: 1px solid var(--line); }
.related h3 { font-size: 13px; margin-bottom: 5px; }
.related button { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; width: 100%; padding: 6px 0; border: 0; border-bottom: 1px solid var(--line); text-align: left; background: none; font-size: 12px; }
.related button:hover { color: var(--green); }
.related button span:last-child { color: var(--soft); white-space: nowrap; }
.content-list { display: grid; margin-top: 15px; border-top: 1px solid var(--line); }
.list-item { text-align: left; display: grid; gap: 3px; background: #fff; border: 0; border-bottom: 1px solid var(--line); padding: 10px 6px; }
.list-item:hover { background: var(--wash); }
.list-item small, .empty { color: var(--muted); font-size: 13px; }
.empty { margin-top: 10px; line-height: 1.65; }
.essay-notes { padding-left: 20px; font-size: 13px; line-height: 1.7; }
.wide-workspace { display: block; background: var(--surface); }
.wide-workspace .main { padding: 20px 28px 40px; }
.practice-container { max-width: 1392px; margin-inline: auto; }
.practice-page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.practice-page-header h1 { margin-bottom: 0; }
.practice-page-header h1:focus { outline: none; }
.practice-page-header .metadata { margin-top: 4px; }
.practice-totals { display: flex; gap: 13px; padding-bottom: 4px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.practice-totals b { color: var(--ink); font-size: 16px; }
.practice-grid { display: grid; grid-template-columns: minmax(220px, 25%) minmax(0, 1fr); gap: 17px; align-items: start; }
.practice-settings, .practice-chapters, .practice-card, .practice-sheet { border: 1px solid var(--line); border-radius: 8px; background: white; }
.practice-settings, .practice-sheet { position: sticky; top: 76px; padding: 15px; }
.practice-settings h2, .scope-heading h2, .sheet-header h2 { font-size: 15px; }
.config-group { display: block; margin-top: 13px; min-width: 0; }
.config-label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.mode-buttons { display: grid; gap: 5px; }
.mode-buttons button { min-height: 32px; text-align: left; padding: 5px 9px; background: #fff; border: 1px solid var(--line); border-radius: 5px; }
.mode-buttons button:hover { border-color: #7da295; }
.mode-buttons button[aria-pressed="true"] { background: var(--wash); border-color: #bdd3c6; color: var(--green); font-weight: 700; }
.mode-info { margin-top: 6px; color: var(--soft); font-size: 12px; line-height: 1.55; }
.config-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.config-inline select { width: 100%; min-height: 33px; padding: 5px; border: 1px solid #d9e1dc; border-radius: 5px; background: white; color: var(--ink); font: inherit; font-size: 13px; }
.config-scope { display: grid; gap: 3px; margin-top: 13px; padding: 10px 0 11px; border-top: 1px solid var(--line); }
.config-scope .config-label { margin: 0; }
.config-scope span:last-child { color: var(--muted); font-size: 12px; }
.start-practice, .resume-practice { width: 100%; min-height: 34px; }
.resume-practice { margin-top: 6px; }
.practice-chapters { min-width: 0; overflow: clip; }
.scope-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 13px 14px; }
.scope-heading span { color: var(--soft); font-size: 12px; }
.scope-columns, .scope-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 72px 150px; gap: 6px; align-items: center; padding: 0 14px 0 10px; }
.scope-columns { min-height: 32px; background: var(--surface); color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--line); }
.scope-columns span:first-child { grid-column: 1 / 3; padding-left: 6px; }
.scope-row { min-height: 36px; border-bottom: 1px solid var(--line); }
.scope-row:hover { background: #f4f8f6; }
.scope-row.chosen { background: var(--wash); box-shadow: inset 3px 0 var(--green); }
.scope-row:last-child { border-bottom-color: #e8eeea; }
.scope-row.level-1 { padding-left: 28px; background: #fafcfb; }
.scope-row.level-2 { padding-left: 47px; }
.scope-row.level-1.chosen { background: var(--wash); }
.scope-toggle, .scope-name { text-align: left; background: none; border: 0; }
.scope-toggle { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 4px; color: var(--muted); }
.scope-toggle:hover { background: #e0ebe5; color: var(--green); }
.scope-toggle i { width: 6px; height: 6px; border: solid currentColor; border-width: 0 1px 1px 0; transform: rotate(-45deg); }
.scope-toggle[aria-expanded="true"] i { transform: rotate(45deg) translateY(-1px); }
.scope-leaf { display: block; width: 4px; height: 4px; margin: auto; border-radius: 50%; background: #9db1a6; }
.scope-name { padding: 7px 0; font-size: 13px; line-height: 1.45; }
.scope-name:hover { color: var(--green); }
.scope-row.level-0 .scope-name, .scope-row.chosen .scope-name { font-weight: 700; }
.scope-row.chosen .scope-name { color: var(--green-dark); }
.scope-total, .scope-progress { color: var(--muted); font-size: 12px; }
.scope-progress { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr) 53px; align-items: center; }
.scope-progress > span { text-align: right; white-space: nowrap; }
.progress-track { height: 4px; overflow: hidden; border-radius: 3px; background: #dfe8e3; }
.progress-track span { display: block; height: 100%; background: #347d63; border-radius: inherit; }
.practice-back { background: none; border: 0; padding: 0; font-size: 12px; color: var(--green); }
.practice-back:hover { text-decoration: underline; }
.practice-session-grid { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 17px; align-items: start; }
.practice-cards { display: grid; gap: 10px; }
.practice-card { padding: 13px 15px; scroll-margin-top: 73px; min-width: 0; }
.practice-card:focus { outline: 2px solid #aac9b9; outline-offset: 1px; }
.practice-card-header { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 12px; color: var(--muted); }
.question-number { display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 4px; background: var(--wash); color: var(--green); font-size: 16px; font-weight: 700; }
.card-point { padding: 2px 6px; background: var(--surface); border-radius: 4px; color: var(--green-dark); }
.card-source { margin-left: auto; }
.practice-card h2 { font-size: 15px; font-weight: 600; line-height: 1.6; margin: 8px 0; overflow-wrap: anywhere; }
.practice-options { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 8px; }
.practice-options .option { font-size: 13px; min-height: 34px; overflow-wrap: anywhere; }
.practice-options .option strong { min-width: 12px; color: var(--muted); }
.practice-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 7px; }
.practice-card-actions .button { padding-block: 4px; }
.sheet-header { display: flex; align-items: baseline; justify-content: space-between; gap: 5px; margin-bottom: 8px; }
.sheet-header span, .sheet-result { color: var(--muted); font-size: 12px; }
.sheet-numbers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin-top: 10px; }
.sheet-numbers button { min-height: 27px; border: 1px solid var(--line); border-radius: 4px; background: white; }
.sheet-numbers button:hover { border-color: #7da295; }
.sheet-numbers button.correct { background: var(--wash); border-color: #bcd7c8; color: var(--green); }
.sheet-numbers button.incorrect { background: #fcf0ec; border-color: #e0b5aa; color: var(--red); }
.sheet-result { display: flex; align-items: baseline; gap: 4px; margin-top: 9px; }
.sheet-result span { flex: 1; }
.sheet-result b { color: var(--ink); }
.memory-grid { display: grid; grid-template-columns: minmax(255px, 27%) minmax(0, 1fr); gap: 17px; align-items: start; }
.memory-index, .memory-card { min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.memory-index-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 13px 14px 9px; }
.memory-index-head h2 { font-size: 15px; }
.memory-index-head span, .memory-chapter-select > span { font-size: 12px; color: var(--muted); }
.memory-chapter-select { display: grid; gap: 4px; padding: 0 14px; }
.memory-chapter-select select { width: 100%; min-width: 0; padding: 6px 7px; font: inherit; font-size: 13px; border: 1px solid #d9e1dc; border-radius: 5px; color: var(--ink); background: white; }
.memory-filters { display: flex; flex-wrap: wrap; gap: 5px; padding: 9px 14px; }
.memory-filters .filter { font-size: 12px; }
.memory-list { border-top: 1px solid var(--line); }
.memory-item { width: 100%; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; column-gap: 8px; row-gap: 2px; align-items: start; text-align: left; padding: 7px 14px; border: 0; border-bottom: 1px solid var(--line); background: white; }
.memory-item:last-child { border-bottom: 0; border-radius: 0 0 8px 8px; }
.memory-item .grade { grid-row: span 2; }
.memory-item:hover { background: #f3f7f5; }
.memory-item[aria-current] { background: var(--wash); box-shadow: inset 3px 0 var(--green); }
.memory-item[aria-current] .memory-item-title { color: var(--green-dark); font-weight: 700; }
.memory-item-title { font-size: 13px; line-height: 1.5; }
.memory-item-meta { grid-column: 2; color: var(--soft); font-size: 12px; }
.memory-item-state { grid-column: 3; grid-row: 1; margin-top: 1px; color: var(--soft); font-size: 11px; }
.memory-item-state.again { color: var(--red); }
.memory-item-state.remembered { color: var(--green); }
.memory-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 13px 16px 11px; }
.memory-card-header h2 { font-size: 20px; line-height: 1.45; margin-bottom: 3px; }
.memory-card-header h2:focus { outline: none; }
.memory-step { display: flex; align-items: center; gap: 4px; padding-top: 4px; white-space: nowrap; }
.memory-step > span { margin-right: 4px; color: var(--muted); }
.memory-step .button { padding: 2px 8px; font-size: 16px; }
.memory-modes { display: flex; flex-wrap: wrap; gap: 18px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.memory-modes button { position: relative; padding: 8px 0; font-size: 13px; color: var(--muted); background: none; border: 0; }
.memory-modes button[aria-pressed="true"] { font-weight: 700; color: var(--green); }
.memory-modes button[aria-pressed="true"]::after { position: absolute; inset: auto 0 -1px; height: 2px; content: ""; background: var(--green); }
.memory-content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 200px; align-items: start; }
.memory-content { min-width: 0; padding: 5px 16px 21px; }
.memory-lines { list-style: none; padding: 0; margin: 0; }
.memory-lines li { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); }
.memory-cue { font-weight: 700; font-size: 13px; color: #35493d; }
.memory-line-body { line-height: 1.8; overflow-wrap: anywhere; }
.memory-line-body mark { background: #eaf4ee; color: #124c39; border-radius: 3px; padding: 1px 2px; font-weight: 700; }
.memory-note { margin-top: 12px; padding: 8px 10px; border-left: 2px solid #b59776; background: #faf8f3; }
.memory-note strong { font-size: 12px; color: #785839; }
.memory-note p { line-height: 1.65; margin-top: 2px; }
.memory-blank { width: 8.6em; max-width: 100%; margin: 1px 3px; padding: 2px 5px; border: 1px solid #b8ccbf; border-radius: 4px; background: #f7faf8; }
.memory-blank::placeholder, .memory-textarea::placeholder { color: var(--soft); }
.memory-action-row { display: flex; gap: 8px; margin-top: 12px; }
.memory-recall-prompt { color: var(--muted); font-size: 13px; margin-top: 9px; line-height: 1.6; }
.memory-outline { display: flex; flex-wrap: wrap; gap: 5px; margin: 7px 0; }
.memory-outline span { padding: 3px 6px; color: var(--green-dark); background: var(--wash); border-radius: 4px; font-size: 12px; }
.memory-textarea { width: 100%; min-height: 90px; resize: vertical; padding: 7px 8px; line-height: 1.65; font: inherit; border: 1px solid #d9e1dc; border-radius: 5px; color: var(--ink); }
.memory-textarea:focus-visible, .memory-chapter-select select:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }
.memory-draft { margin-top: 8px; padding: 7px 8px; color: var(--muted); background: var(--surface); border-radius: 4px; font-size: 13px; }
.memory-draft p { margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; }
.memory-check { display: flex; align-items: baseline; gap: 5px; cursor: pointer; }
.memory-check input { margin: 0; accent-color: var(--green); }
.memory-comparison { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); font-size: 12px; }
.memory-schedule { min-width: 0; padding: 12px; border-left: 1px solid var(--line); font-size: 12px; }
.memory-schedule h3 { font-size: 13px; }
.memory-schedule > .button { width: 100%; margin-top: 8px; text-align: left; }
.memory-next-time { display: grid; gap: 3px; margin-top: 6px; color: var(--muted); line-height: 1.5; }
.memory-next-time strong { color: var(--ink); }
.memory-ratings { display: grid; gap: 5px; margin-top: 8px; }
.memory-ratings button { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 5px; text-align: left; font-size: 12px; }
.memory-ratings button:first-child strong { color: var(--red); }
.memory-ratings button:last-child strong { color: var(--green-dark); }
.memory-ratings button span, .memory-notice { color: var(--muted); }
.memory-notice { font-size: 12px; margin-top: 5px; line-height: 1.5; }
.memory-practice { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 3px 6px; }
.memory-practice span { color: var(--muted); font-size: 12px; }
.memory-empty { padding: 12px; color: var(--muted); }
.memory-empty h2 { font-size: 16px; margin-bottom: 5px; }
.memory-empty .button { margin-top: 7px; }
@media (min-width: 1500px) {
  .topbar { grid-template-columns: 245px 1fr 320px; }
  .workspace { grid-template-columns: 245px minmax(0, 1fr) 365px; }
}
@media (max-width: 1100px) {
  .topbar { grid-template-columns: 178px 1fr minmax(180px, 230px); }
  .workspace { grid-template-columns: 178px minmax(0, 1fr) 290px; }
  .primary { gap: 15px; padding-left: 12px; }
  .main { padding-inline: 14px; }
  .detail { padding-inline: 12px; }
  .topic-table .priority-col { width: 55px; }
  .topic-table .pages-col { width: 68px; }
  .topic-table .count-col { width: 40px; }
  .topic-table th, .topic-table td { padding-inline: 6px; }
  .memory-content-grid { grid-template-columns: minmax(0, 1fr) 165px; }
  .memory-lines li { grid-template-columns: 90px minmax(0, 1fr); gap: 6px; }
}
@media (max-width: 900px) {
  .workspace { grid-template-columns: 178px minmax(0, 1fr); }
  .sidebar { grid-row: 1 / span 2; }
  .detail { grid-column: 2; border-top: 1px solid var(--line); border-left: 0; padding-inline: 14px; }
  .wide-workspace .main { padding-inline: 13px; }
  .practice-grid { gap: 10px; grid-template-columns: 200px minmax(0, 1fr); }
  .practice-session-grid { gap: 10px; grid-template-columns: minmax(0, 1fr) 170px; }
  .scope-columns, .scope-row { grid-template-columns: 23px minmax(0, 1fr) 45px 90px; padding-right: 8px; gap: 3px; }
  .scope-row.level-1 { padding-left: 20px; }
  .scope-row.level-2 { padding-left: 31px; }
  .memory-grid { grid-template-columns: minmax(200px, 32%) minmax(0, 1fr); gap: 9px; }
  .memory-item, .memory-index-head, .memory-chapter-select, .memory-filters { padding-inline: 8px; }
  .memory-content-grid { display: block; }
  .memory-schedule { border-top: 1px solid var(--line); border-left: 0; }
  .memory-ratings { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .memory-grid { display: flex; flex-direction: column; }
  .memory-index, .memory-card { width: 100%; }
  .memory-card { scroll-margin-top: 65px; }
  .memory-list { max-height: 257px; overflow-y: auto; }
  .memory-card-header, .memory-content { padding-inline: 10px; }
  .memory-lines li { grid-template-columns: minmax(0, 1fr); gap: 1px; }
}
@media (max-width: 630px) {
  .topbar { position: relative; height: auto; padding: 9px 10px 0; grid-template-columns: auto minmax(100px, 1fr); gap: 7px; }
  .brand { padding-left: 0; font-size: 14px; white-space: nowrap; }
  .brand-mark { width: 24px; height: 24px; }
  .primary { grid-column: 1 / -1; grid-row: 2; height: 35px; padding-left: 2px; gap: 16px; font-size: 13px; overflow-x: auto; }
  .search { padding-inline: 6px; height: 29px; }
  .search input { font-size: 12px; }
  .search kbd { display: none; }
  .workspace { display: flex; flex-direction: column; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); padding: 9px 8px; }
  .sidebar-heading { padding-bottom: 4px; }
  #chapters { display: flex; gap: 3px; overflow-x: auto; }
  .chapter { display: block; width: auto; min-height: 29px; padding: 5px 7px; white-space: nowrap; }
  .chapter-name, .section-links { display: none; }
  .main { padding-top: 13px; }
  .main h1 { font-size: 20px; }
  .topic-table .priority-col { width: 44px; }
  .topic-table .pages-col { width: 65px; }
  .topic-table .count-col { width: 35px; }
  .practice-grid, .practice-session-grid { display: flex; flex-direction: column; gap: 10px; }
  .wide-workspace .main { padding: 12px 8px 24px; }
  .practice-page-header { margin-bottom: 10px; }
  .practice-totals { gap: 6px; }
  .practice-totals b { font-size: 14px; }
  .practice-settings, .practice-chapters, .practice-cards, .practice-sheet { width: 100%; }
  .practice-settings, .practice-sheet { position: static; }
  .practice-sheet { order: -1; padding: 9px; }
  .sheet-numbers { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .mode-buttons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mode-buttons button { padding: 5px 2px; text-align: center; font-size: 12px; }
  .scope-heading { padding: 10px 8px; }
  .scope-columns, .scope-row { grid-template-columns: 20px minmax(0, 1fr) 42px 64px; padding-left: 4px; }
  .scope-toggle { width: 20px; }
  .scope-row.level-1 { padding-left: 11px; }
  .scope-row.level-2 { padding-left: 20px; }
  .scope-progress { grid-template-columns: 1fr; gap: 2px; }
  .scope-progress > span { text-align: left; }
  .practice-card { padding: 10px; scroll-margin-top: 8px; }
  .practice-options { grid-template-columns: 1fr; }
  .memory-card { scroll-margin-top: 8px; }
  .memory-card-header h2 { font-size: 17px; }
  .memory-modes { padding-inline: 10px; gap: 12px; }
  .memory-step .button { padding-inline: 5px; }
}
