:root {
  --ink: #263b35;
  --muted: #66766e;
  --line: #dfe7e3;
  --paper: #fff;
  --page: #fff;
  --sky: #f5f7f5;
  --blue: #1b6a5b;
  --green: #1b6a5b;
  --yellow: #f3dba4;
  --coral: #c2473e;
  --focus: #1b6a5b;
  --shadow: none;
  --active: #edf6f0;
  --word-accent: #245fa8;
  --word-soft: #eef5ff;
  --white-accent: #176c58;
  --white-soft: #edf8f2;
  --sentence-accent: #a34b27;
  --sentence-soft: #fff3e9;
}

html { scroll-padding-top: 80px; }
body {
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0;
}
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, select, a { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: not-allowed; opacity: .4; }
button, a, input, select, summary { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.lucide { width: 18px; height: 18px; flex: 0 0 auto; stroke-width: 1.75; }

.site-header {
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  min-height: 76px;
  padding: 12px max(24px, calc((100% - 1480px) / 2));
  gap: 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  backdrop-filter: none;
}
.brand, [data-page="home"] .brand { gap: 12px; font-size: 21px; font-weight: 600; }
.brand-symbol { display: grid; place-items: center; width: 42px; height: 44px; border-radius: 6px; border: 1px solid #c6dfd3; background: #e8f4ed; }
.brand .lucide { color: var(--blue); width: 25px; height: 25px; }
.brand-copy { display: grid; gap: 1px; line-height: 1.3; }
.brand-copy strong { font-weight: 650; }
.brand-copy small { color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.4; }
.top-nav { width: auto; flex: 0 0 auto; justify-content: flex-end; flex-wrap: nowrap; overflow: visible; gap: 4px; }
.top-nav a {
  display: flex;
  gap: 7px;
  padding: 5px 9px;
  min-height: 38px;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  border-radius: 5px;
}
.top-nav a:hover, .top-nav a[aria-current="page"] { background: var(--active); color: var(--blue); }
.page-shell { width: min(1040px, calc(100% - 40px)); padding: 30px 0 48px; }
.page-title { margin-bottom: 24px; }
h1, .page-title h1, .hero h1 { font-size: 28px; font-weight: 600; line-height: 1.4; }
h2 { font-size: 22px; font-weight: 600; line-height: 1.4; }
h3 { font-size: 17px; font-weight: 600; line-height: 1.5; }
.page-title p, .hero p, .section-lead { font-size: 15px; font-weight: 400; color: var(--muted); }
.eyebrow { font-size: 13px; font-weight: 500; }
.badge { background: var(--active); color: var(--blue); font-size: 12px; font-weight: 500; padding: 3px 8px; }
.button-link, .ghost-link { min-height: 38px; border-radius: 5px; font-weight: 500; font-size: 14px; }
.button-link.is-primary, .primary-button { background: var(--blue); color: #fff; }
.note-band { border-radius: 0; box-shadow: none; font-size: 13px; background: #f7f8f6; }
.site-footer {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
  padding: 20px 0 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.site-footer-links { display: flex; align-items: center; gap: 20px; }
.site-footer a:hover { color: var(--blue); }
body .site-footer .site-contact-button {
  min-height: 36px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 12px;
  font-weight: 400;
  box-shadow: none;
  transform: none;
}
body .site-footer .site-contact-button:hover { color: var(--blue); }
body .contact-modal-panel { border-radius: 8px; box-shadow: 0 16px 50px #0002; }
body .contact-modal-panel h2 { font-size: 24px; }

/* The study view stays on one page; existing vocabulary objects are rendered intact. */
body.study-page { --version-accent: #245fa8; --version-soft: #eef5ff; --version-border: #bfd3ed; background: #f3f7f5; }
body.study-page[data-study-version="fltrp"] { --version-accent: #176c58; --version-soft: #edf8f2; --version-border: #b4d9ca; }
body.study-page[data-study-version="yilin"] { --version-accent: #a3443e; --version-soft: #fff1ed; --version-border: #edc5be; }
body.study-page[data-study-version="joinin"] { --version-accent: #876117; --version-soft: #fff8e7; --version-border: #e7d5a5; }
body.study-page[data-study-version="kidsbox"] { --version-accent: #725297; --version-soft: #f6f0fc; --version-border: #d6c6e8; }
body.study-page[data-study-version="nce"] { --version-accent: #9c4825; --version-soft: #fff3e9; --version-border: #e7c7ad; }
body.study-page .site-header { min-height: 52px; padding-block: 4px; }
body.study-page .brand { width: auto; flex: 0 0 auto; gap: 8px; font-size: 18px; }
body.study-page .brand-symbol { width: 32px; height: 32px; }
body.study-page .brand .lucide { width: 22px; height: 22px; }
body.study-page .brand-copy small { display: none; }
.study-header-book { display: none; }
body.study-page .page-shell { width: min(1480px, calc(100% - 48px)); padding: 12px 0 30px; min-height: calc(100vh - 120px); }
body.study-page .site-footer { width: min(1480px, calc(100% - 48px)); }
.study-workspace { display: grid; grid-template-columns: 208px minmax(0,1fr); gap: 20px; align-items: start; }
.study-main { min-width: 0; }
.course-sidebar { position: sticky; top: 64px; max-height: calc(100vh - 80px); overflow: auto; scrollbar-width: thin; }
.course-heading { display: flex; align-items: center; gap: 9px; padding: 10px; margin: 0; color: var(--blue); }
.course-heading h2 { margin: 0; font-size: 16px; font-weight: 600; }
.course-heading > span { margin-left: auto; color: var(--muted); font-size: 11px; white-space: nowrap; }
.course-list { display: grid; gap: 5px; }
.course-unit { display: grid; grid-template-columns: 27px minmax(0,1fr) 12px; gap: 8px; align-items: center; width: 100%; min-height: 56px; padding: 9px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.course-unit:hover { background: #eaf1ec; }
.course-unit[aria-current="page"] { color: #fff; background: #196453; box-shadow: none; }
.course-number { display: grid; place-items: center; width: 27px; height: 29px; border: 1px solid #dce5df; border-radius: 5px; color: var(--muted); background: #fff; font-size: 11px; font-variant-numeric: tabular-nums; }
.course-unit[aria-current="page"] .course-number { background: #fff; border-color: #fff; color: var(--blue); }
.course-unit[aria-current="page"] .course-copy small, .course-unit[aria-current="page"] > .lucide { color: #d6ebe0; }
.course-copy { min-width: 0; display: grid; gap: 2px; }
.course-copy strong { font-size: 13px; font-weight: 500; line-height: 1.45; overflow-wrap: anywhere; }
.course-copy small { color: var(--muted); font-size: 11px; font-weight: 400; }
.course-unit > .lucide { width: 12px; height: 12px; color: var(--muted); }
.course-sections { display: grid; gap: 2px; margin: 7px 10px 10px 25px; padding-left: 18px; border-left: 1px solid #ccdcd2; }
.course-sections button { display: flex; align-items: center; gap: 7px; min-height: 34px; padding: 5px 9px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; font-size: 12px; cursor: pointer; }
.course-sections button:hover { background: #eaf1ec; }
.course-sections .lucide { width: 15px; height: 15px; }
.course-sections small { margin-left: auto; font-size: 11px; }
.course-sections [data-course-mode="words"][aria-current="true"] { color: var(--word-accent); background: var(--word-soft); }
.course-sections [data-course-mode="sentences"][aria-current="true"] { color: var(--sentence-accent); background: var(--sentence-soft); }
.course-dialog { width: min(420px,calc(100% - 32px)); max-height: 85dvh; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #f3f7f5; color: var(--ink); }
.course-dialog::backdrop { background: #183c3359; backdrop-filter: blur(2px); }
.course-dialog .course-heading { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.course-dialog .course-heading button { margin-left: auto; }
.course-dialog .course-list { padding: 10px 12px; overflow: auto; max-height: 65dvh; }
.study-page .workspace-selector { flex: 0 1 206px; min-width: 140px; padding: 0; border: 0; background: transparent; }
.mobile-book-picker { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 34px; padding: 4px 8px; border: 1px solid var(--version-border); border-radius: 5px; background: var(--version-soft); color: var(--ink); text-align: left; cursor: pointer; }
.mobile-book-picker > span { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.mobile-book-picker small { flex: 0 0 auto; color: var(--version-accent); font-size: 12px; font-weight: 500; }
.mobile-book-picker strong { font-size: 13px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.mobile-book-picker > .lucide { margin-left: auto; width: 14px; height: 14px; color: var(--version-accent); }
.study-book-heading { display: none; }
.book-stamp { display: grid; place-items: center; flex: 0 0 auto; width: 41px; height: 48px; background: var(--version-soft); color: var(--version-accent); border-left: 3px solid var(--version-accent); border-radius: 0 5px 5px 0; }
.book-stamp .lucide { width: 23px; height: 23px; }
.study-book-heading > div { display: grid; gap: 3px; }
.study-book-heading strong { font-size: 17px; font-weight: 600; }
.study-book-heading span:not(.book-stamp) { font-size: 12px; color: var(--muted); }
.study-page .selector-grid { display: grid; width: min(460px,100%); grid-template-columns: minmax(0,.8fr) minmax(0,1.25fr); gap: 10px; }
.study-page .selector-field { min-width: 0; gap: 6px; }
.study-page .selector-field span { color: var(--muted); font-size: 12px; font-weight: 400; }
.study-page .selector-field select, [data-page="home"].study-page .selector-field select {
  width: 100%;
  min-width: 0;
  height: 42px;
  min-height: 42px;
  padding: 0 30px 0 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background-color: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  box-shadow: none;
}
.study-page .selector-field select[data-home-select="version"],
[data-page="home"].study-page .selector-field select[data-home-select="version"] {
  border-color: var(--version-border);
  border-left: 3px solid var(--version-accent);
  background-color: var(--version-soft);
  color: var(--version-accent);
  font-weight: 500;
}
.unit-stepper { display: flex; flex: 1 1 auto; min-width: 0; align-items: center; gap: 6px; margin: 0; }
.unit-stepper .selector-field { flex: 1 1 auto; }
.unit-stepper .selector-field > span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.study-page .unit-stepper .selector-field select { background-color: #f0f5f2; }
.study-toolbar { position: sticky; top: var(--study-header-height,52px); z-index: 10; padding: 7px 10px; border-top: 2px solid var(--version-accent); border-bottom: 1px solid var(--line); background: #fff; }
.study-navigation { display: flex; align-items: center; gap: 10px; min-width: 0; }
.study-unitbar { display: flex; flex: 1 1 auto; align-items: center; gap: 6px; min-width: 0; }
.study-page .unit-stepper .selector-field select { height: 34px; min-height: 34px; padding-left: 8px; font-size: 13px; }
.study-actionbar { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; margin-top: 6px; padding-top: 6px; border-top: 1px solid #edf1ee; }
.study-player { min-width: 0; }
.study-unitbar button.course-toggle { display: none; }
.study-tabs { display: flex; flex: 0 0 auto; gap: 2px; margin: 0; padding: 2px; border: 0; border-radius: 5px; background: #edf2ef; overflow: visible; }
.study-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; max-width: none; min-height: 30px; padding: 4px 11px; border: 0; border-radius: 4px; color: var(--muted); background: transparent; font-weight: 400; font-size: 13px; cursor: pointer; }
.study-tabs .lucide { width: 15px; height: 15px; }
.study-tabs [data-study-mode="words"] { --mode-accent: var(--word-accent); --mode-soft: var(--word-soft); }
.study-tabs [data-study-mode="sentences"] { --mode-accent: var(--sentence-accent); --mode-soft: var(--sentence-soft); }
.study-tabs button .lucide { color: var(--mode-accent); }
.study-tabs button:hover { color: var(--mode-accent); background: var(--mode-soft); }
.study-tabs button[aria-current="page"] { color: var(--mode-accent); background: var(--mode-soft); border: 0; font-weight: 600; }
.study-resource-label { color: var(--blue); padding: 6px 0; }
.study-controls { display: grid; grid-template-columns: 108px minmax(60px,1fr) auto 32px; align-items: center; gap: 10px; }
.study-transport { display: flex; align-items: center; gap: 4px; }
.study-progress-host { min-width: 0; }
.study-progress { display: flex; align-items: center; gap: 10px; min-width: 0; }
.study-progress input { flex: 1 1 auto; min-width: 0; width: 100%; height: 22px; margin: 0; accent-color: var(--coral); cursor: pointer; }
.study-progress span { min-width: 51px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.study-preferences { display: flex; align-items: center; gap: 6px; }
.study-player .setting-label { display: none; }
.study-controls select { height: 32px; min-width: 62px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink); font-size: 12px; }
.study-controls label { display: inline-flex; align-items: center; margin: 0; }
button.study-icon, .unit-stepper button.study-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}
.study-icon:hover:not(:disabled) { background: var(--active); color: var(--blue); }
.study-toolbar button.study-icon { width: 32px; height: 32px; min-height: 32px; }
.study-toolbar .unit-stepper button.study-icon { width: 32px; height: 32px; min-height: 32px; }
.study-controls button.study-icon[data-action="toggle"] { width: 36px; height: 36px; min-height: 36px; border-radius: 50%; border-color: var(--coral); background: var(--coral); color: #fff; }
.study-controls button.study-icon[data-action="toggle"]:hover:not(:disabled) { background: #a43b33; border-color: #a43b33; color: #fff; }
.study-continuous { gap: 5px; min-height: 32px; padding: 0 7px; color: var(--muted); font-size: 12px; cursor: pointer; }
.study-continuous input { width: 14px; height: 14px; margin: 0; accent-color: var(--blue); }
.study-continuous .lucide { width: 16px; height: 16px; }
.study-section-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 15px 0 0; font-size: 13px; color: var(--muted); }
.study-section-picker select { max-width: 100%; min-width: 0; min-height: 36px; border: 1px solid var(--line); background: #fff; border-radius: 5px; color: var(--ink); }
.workspace-content { margin: 0; padding: 0 0 22px; }
body[data-learning-mode="sentences"] .workspace-content { padding: 0 24px 24px; background: #fff; }
.study-content-tools { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 6px 0 0; }
.study-actionbar .study-content-tools { padding: 0; }
.word-tool-actions { display: flex; align-items: center; gap: 4px; grid-column: 2; grid-row: 1; }
.word-tool-actions button.study-icon { width: 32px; height: 32px; min-height: 32px; }
.word-category-filter { display: flex; flex: 0 0 auto; gap: 5px; padding: 0; margin: 0; border: 0; min-width: 0; }
.word-category-filter label { position: relative; cursor: pointer; }
.word-category-filter input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.word-category-filter label > span { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 30px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: #fff; font-size: 12px; }
.word-category-filter small { font-size: 11px; font-variant-numeric: tabular-nums; }
.word-category-filter input:checked + span { color: #fff; background: var(--blue); border-color: var(--blue); }
.word-category-filter [data-word-filter="black"] input:checked + span { background: var(--word-accent); border-color: var(--word-accent); }
.word-category-filter [data-word-filter="white"] input:checked + span { background: var(--white-accent); border-color: var(--white-accent); }
.word-category-filter input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.study-search { display: none; grid-column: 1 / -1; grid-row: 2; align-items: center; gap: 8px; width: 100%; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: #fff; }
.study-content-tools.is-search-open .study-search { display: flex; }
.study-content-tools.is-search-open .word-search-toggle { color: #fff; background: var(--blue); }
.study-search:focus-within { border-color: var(--blue); outline: 2px solid #d8ebe2; outline-offset: 1px; background: #fff; }
.study-search > .lucide { width: 16px; height: 16px; }
.study-search input { flex: 1 1 auto; width: 100%; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 14px; }
.study-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.study-search .study-icon { width: 28px; height: 34px; min-height: 34px; border: 0; background: transparent; }
button.word-search-toggle { display: inline-flex; }
.study-empty > .lucide { width: 27px; height: 27px; color: var(--muted); }
.study-settings, .book-dialog { width: min(400px,calc(100% - 32px)); max-height: 85dvh; padding: 0; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; }
.study-settings::backdrop, .book-dialog::backdrop { background: #183c3359; backdrop-filter: blur(2px); }
.study-settings .course-heading, .book-dialog .course-heading { padding: 14px 18px; border-bottom: 1px solid var(--line); background: #f1f7f3; }
.study-settings .course-heading h2 { font-size: 17px; }
.study-settings .course-heading button, .book-dialog .course-heading button { margin-left: auto; }
.settings-body { display: grid; gap: 22px; padding: 22px; overflow: auto; }
.settings-body > div:empty { display: none; }
.study-settings .study-progress { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.study-settings .study-progress .setting-label { grid-column: 1 / -1; color: var(--ink); font-size: 14px; }
.study-settings .study-progress input { min-height: 36px; }
.book-dialog .selector-grid { grid-template-columns: minmax(0,1fr); width: 100%; gap: 20px; }
.book-dialog .selector-field { display: grid; gap: 8px; }
.book-dialog .selector-field > span { font-size: 14px; color: var(--ink); }
.book-dialog .selector-field select { height: 48px; }
.study-settings .study-preferences { display: grid; gap: 18px; width: 100%; }
.study-settings .study-display, .study-settings .study-speed { display: grid; grid-template-columns: minmax(0,1fr) 120px; align-items: center; gap: 12px; font-size: 14px; }
.study-settings select { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: #fff; font-size: 16px; }
.study-settings .study-continuous { display: flex; gap: 9px; min-height: 44px; padding: 0; font-size: 14px; color: var(--ink); }
.study-settings .study-continuous input { width: 18px; height: 18px; }
.reading-size-setting { display: grid; gap: 12px; color: var(--ink); font-size: 14px; }
.reading-size-setting > span { display: flex; align-items: center; justify-content: space-between; }
.reading-size-setting output { color: var(--blue); font-variant-numeric: tabular-nums; }
.reading-size-setting input { width: 100%; margin: 0; min-height: 32px; accent-color: var(--blue); }
.study-page .word-surface, .study-page .reader-surface { border: 0; border-radius: 0; box-shadow: none; background: transparent; overflow: visible; }
.study-page .word-group { --group-accent: var(--word-accent); --group-soft: var(--word-soft); border: 0; }
.study-page .word-group[data-word-group="white"] { --group-accent: var(--white-accent); --group-soft: var(--white-soft); }
.study-page .word-group[data-word-group="numbers"] { --group-accent: #725297; --group-soft: #f6f0fc; }
.study-page .word-group-header { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding: 4px 10px; gap: 12px; border: 0; border-left: 3px solid var(--group-accent); background: var(--group-soft); color: var(--group-accent); }
.study-page .word-group-header h2 { margin: 0; font-size: 14px; line-height: 1.5; font-weight: 600; }
.word-group-count { color: var(--group-accent); font-size: 12px; font-variant-numeric: tabular-nums; }
.study-page .word-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 0; padding: 0; }
.study-page .word-button {
  display: grid;
  grid-template-columns: minmax(140px, .85fr) minmax(120px, .75fr) minmax(130px, 1fr) 18px;
  align-items: center;
  align-content: center;
  min-height: 56px;
  width: 100%;
  gap: 12px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  text-align: left;
  box-shadow: none;
}
.word-copy, .word-spelling { display: contents; }
.study-page .word-en, .study-page .word-button[data-word-type="black"] .word-en {
  min-width: 0;
  color: var(--ink);
  font-size: var(--reading-size,22px);
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.study-page .word-button[data-word-type="white"] .word-en { color: var(--ink); font-weight: 400; }
.study-page .word-phonetic { min-height: 0; color: var(--muted); font-size: max(14px,calc(var(--reading-size,22px) * .68)); font-weight: 400; overflow-wrap: anywhere; }
.study-page .word-zh { color: var(--muted); font-size: max(14px,calc(var(--reading-size,22px) * .7)); font-weight: 400; overflow-wrap: anywhere; }
.row-sound { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.study-page .word-button .row-sound { width: 30px; height: 32px; border-radius: 5px; color: var(--group-accent); background: var(--group-soft); }
.study-page .word-button:hover { background: var(--group-soft); }
.study-page .word-button:focus-visible { outline-color: var(--group-accent); }
.study-page .word-button, .study-page .line-row { scroll-margin-top: var(--study-scroll-top,240px); scroll-margin-bottom: var(--study-scroll-bottom,16px); }
.study-page .word-button.is-active { background: var(--group-soft); box-shadow: inset 3px 0 var(--group-accent); }
.study-page .word-button.is-active .word-en { color: var(--group-accent); }
.study-page .line-row:hover { background: var(--sentence-soft); }
.study-page .line-row.is-active { background: var(--sentence-soft); box-shadow: inset 3px 0 var(--sentence-accent); }
.study-page .line-row.is-active .line-en { color: var(--sentence-accent); }
.study-page .line-row:focus-visible { outline-color: var(--sentence-accent); }
.study-page .word-button[data-mode="english"] { grid-template-columns: minmax(140px,1fr) minmax(120px,1fr) 18px; }
.study-page .word-button[data-mode="chinese"] { grid-template-columns: minmax(0,1fr) 18px; }
.study-page .word-button[data-mode="chinese"] .word-zh { font-size: var(--reading-size,22px); }
body.study-page[data-word-layout="cards"] .word-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding-top: 8px; }
body.study-page[data-word-layout="cards"] .word-button { grid-template-columns: minmax(0,1fr) 36px; gap: 12px; padding: 12px 14px; min-height: 86px; border: 1px solid var(--line); border-left: 3px solid color-mix(in srgb,var(--group-accent) 55%,white); border-radius: 6px; transition: background-color .15s,border-color .15s; }
body.study-page[data-word-layout="cards"] .word-copy { display: grid; gap: 8px; min-width: 0; }
body.study-page[data-word-layout="cards"] .word-spelling { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 12px; min-width: 0; }
body.study-page[data-word-layout="cards"] .word-button .row-sound { grid-column: 2; grid-row: 1; width: 36px; height: 36px; }
body.study-page[data-word-layout="cards"] .word-button.is-active { border-color: var(--group-accent); }
body.study-page[data-word-layout="cards"] .word-button[data-mode="chinese"] .word-spelling { display: none; }
.study-page .line-list { display: block; max-width: 850px; margin: 0 auto; }
.study-page .line-group-title { margin-top: 8px; background: var(--sentence-soft); color: var(--sentence-accent); border-left: 3px solid var(--sentence-accent); font-size: 12px; font-weight: 500; padding: 5px 10px; }
.study-page .line-row {
  display: grid;
  grid-template-columns: 24px minmax(0,1fr) 18px;
  grid-template-rows: auto auto;
  align-content: center;
  gap: 5px 12px;
  padding: 14px 12px;
  min-height: 82px;
  border: 0;
  border-bottom: 1px solid #edf1ee;
  border-radius: 0;
  background: transparent;
}
.study-page .line-index { grid-column: 1; grid-row: 1 / 3; width: auto; height: auto; background: transparent; color: var(--sentence-accent); font-size: 12px; font-weight: 500; }
.study-page .line-en { grid-column: 2; grid-row: 1; font-size: var(--reading-size,22px); line-height: 1.5; font-weight: 500; }
.study-page .line-zh { grid-column: 2; grid-row: 2; font-size: max(14px,calc(var(--reading-size,22px) * .7)); font-weight: 400; }
.study-page .line-en, .study-page .line-zh { overflow-wrap: anywhere; }
.study-page .line-row .row-sound { grid-column: 3; grid-row: 1 / 3; color: var(--sentence-accent); }
.study-page .line-row[data-mode="chinese"] .line-zh { grid-row: 1 / 3; font-size: var(--reading-size,22px); font-weight: 400; }
.reader-edition-note { margin: 0 auto; max-width: 850px; padding: 3px 0; border-bottom: 1px solid var(--line); font-size: 12px; color: #78613b; }
.reader-edition-note summary { display: flex; align-items: center; gap: 7px; width: fit-content; min-height: 28px; cursor: pointer; list-style: none; }
.reader-edition-note summary::-webkit-details-marker { display: none; }
.reader-edition-note summary .lucide { width: 15px; height: 15px; }
.reader-edition-note[open] summary .lucide:last-child { transform: rotate(180deg); }
.reader-edition-note div { padding: 6px 0 2px 22px; }
.reader-edition-note strong { font-weight: 500; }
.reader-edition-note p { margin: 0 0 5px; }
.reader-edition-note a { display: inline-flex; align-items: center; gap: 3px; min-height: 32px; padding: 2px 0; color: var(--blue); }
.study-empty { padding: 40px 12px; text-align: center; color: var(--muted); font-size: 14px; }
.nce-manage { color: var(--version-accent); }
.nce-empty-actions { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 10px; }
.nce-lesson-title { max-width: 850px; margin: 12px auto 0; font-size: 17px; overflow-wrap: anywhere; }
.nce-feedback, .nce-storage-error { max-width: 850px; margin: 0 auto; padding: 8px 0; color: var(--blue); font-size: 12px; }
.nce-storage-error { color: #a43b33; }
.nce-import-dialog { width: min(560px,calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; }
.nce-import-dialog::backdrop { background: #183c3359; backdrop-filter: blur(2px); }
.nce-import-dialog .course-heading { padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--version-soft); }
.nce-import-dialog .course-heading h2 { font-size: 17px; }
.nce-import-dialog .course-heading button { margin-left: auto; }
.nce-import-body { display: grid; gap: 14px; padding: 16px; }
.nce-import-context { margin: 0; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.nce-local-notice { margin: 0; color: var(--muted); font-size: 12px; }
.nce-import-body fieldset { display: grid; gap: 14px; min-width: 0; padding: 0; margin: 0; border: 0; }
.nce-import-body label { display: grid; gap: 6px; min-width: 0; font-size: 13px; }
.nce-import-body input, .nce-import-body textarea { width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: #fff; font-size: 16px; }
.nce-import-body textarea { resize: vertical; max-height: 260px; line-height: 1.5; }
.nce-import-body input[type="file"] { padding: 8px 0; border: 0; font-size: 13px; }
.nce-form-actions, .nce-data-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.nce-import-body .button-link, .study-empty .button-link { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; border: 1px solid var(--line); cursor: pointer; }
.nce-import-body .button-link { background: #fff; color: var(--blue); }
.nce-import-body .button-link.is-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.nce-batch { border-top: 1px solid var(--line); padding-top: 6px; }
.nce-batch summary { min-height: 44px; align-content: center; cursor: pointer; color: var(--blue); font-size: 14px; }
.nce-batch > div { display: grid; gap: 12px; padding-top: 6px; }
.nce-message { margin: 0; color: #a43b33; font-size: 13px; overflow-wrap: anywhere; }
.nce-message:empty { display: none; }
body[data-study-version="nce"] .line-row[data-mode="chinese"].is-untranslated .line-en { display: block; grid-row: 1 / 3; }
body[data-study-version="nce"] .line-row.is-untranslated .line-zh { display: none; }
.study-playback-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); color: var(--muted); font-size: 11px; }
.study-playback-status > span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.study-playback-status .lucide { color: var(--coral); width: 14px; height: 14px; }
.study-playback-status [data-mini-count] { display: none; }
.unit-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 0; border-top: 1px solid var(--line); }
.unit-footer button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--blue); background: #fff; cursor: pointer; font-size: 13px; }
.unit-footer button:hover:not(:disabled) { background: var(--active); border-color: #b7d2c3; }
.unit-footer > span { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

/* Shared resource pages use quiet sections rather than decorative panel shells. */
.library-page { max-width: 1040px; }
.library-page > .page-title { margin-bottom: 22px; }
.library-dashboard, .library-jump { display: none; }
.library-layout { display: grid; grid-template-columns: 245px minmax(0,1fr); gap: 32px; }
.library-list { border: 0; border-right: 1px solid var(--line); border-radius: 0; padding: 0 20px 0 0; box-shadow: none; background: transparent; }
.library-list-head { padding: 0 0 14px; border: 0; font-size: 13px; }
.material-card-list { display: grid; gap: 0; }
.material-card { padding: 14px 10px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; background: transparent; }
.material-card.is-active { border-color: var(--line); background: var(--active); box-shadow: none; }
.material-card strong { font-size: 15px; font-weight: 500; }
.material-card span { color: var(--muted); font-size: 11px; }
.material-card p, .material-card em { display: none; }
.material-detail, .material-hero, .material-source-note, .library-section-card, .knowledge-group, .knowledge-surface, .reader-surface, .word-surface { border-radius: 0; box-shadow: none; }
.material-detail { padding: 0; background: transparent; border: 0; }
.material-hero { padding: 0 0 20px; border: 0; background: transparent; }
.material-hero h2 { font-size: 24px; font-weight: 600; }
.material-hero p { font-size: 14px; font-weight: 400; }
.material-tags { display: none; }
.material-source-note { background: #f7f8f6; border: 0; padding: 12px; font-size: 12px; }
.library-section-card { padding: 22px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; }
.library-section-heading h3 { font-size: 18px; }
.library-section-heading p { font-size: 14px; }
.library-tools { margin: 18px 0 26px; font-size: 13px; color: var(--muted); }
.library-tools summary { width: fit-content; cursor: pointer; }
.library-tools nav { display: flex; flex-wrap: wrap; gap: 16px; padding: 12px 0 0; color: var(--blue); }
.pdf-lesson-page, .phonics-page, .grammar-page, .grammar-review-page, .grade7-grammar-page, .r2t2-page { width: min(1040px, calc(100% - 40px)); }
.pdf-lesson-hero, .r2t2-hero { margin-bottom: 24px; }
.pdf-lesson-copy h1, .r2t2-hero h1 { font-size: 28px; }
.pdf-lesson-copy p, .r2t2-hero p:last-child { font-size: 14px; font-weight: 400; }
.pdf-lesson-tags { display: none; }
.pdf-lesson-actions { gap: 8px; }
.pdf-lesson-actions > p { display: none; }
.knowledge-group { border: 0; border-bottom: 1px solid var(--line); background: transparent; }
.knowledge-group-header { padding: 15px 0; }
.knowledge-group-header h2 { font-size: 20px; }
.stage-heading h2 { font-size: 22px; }
.stage-heading p { font-size: 14px; font-weight: 400; }
.r2t2-control-panel, .r2t2-transcript-panel { box-shadow: none; border-color: var(--line); border-radius: 6px; }
.r2t2-flow article { border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; background: transparent; padding-inline: 0; }
.r2t2-flow h2 { font-size: 18px; }
.r2t2-flow p { font-size: 14px; }
.r2t2-field { font-weight: 500; }
.r2t2-partial { font-size: 21px; font-weight: 500; }
.grammar-intro-grid, .grade7-hero-panel, .review-stat-grid { display: none; }
.page-shell.grade7-grammar-page, .page-shell.review-page { width: min(1040px, calc(100% - 40px)); }
.grade7-hero, .review-hero, .pdf-lesson-hero {
  display: block;
  padding: 0 0 22px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
}
.grade7-hero h1, .review-hero h1 { color: var(--ink); font-size: 28px; }
.grade7-hero p, .review-hero p { color: var(--muted); font-size: 14px; font-weight: 400; }
.review-eyebrow { color: var(--blue); font-size: 13px; font-weight: 500; }
.grade7-control-deck, .review-control-bar {
  position: static;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
}
.grade7-favorites, .grade7-map-card, .grade7-term-section, .review-section, .review-outline-panel {
  padding: 16px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.grade7-map-card strong { font-size: 21px; font-weight: 500; }
.grade7-map-card span, .grade7-favorites strong, .grade7-search label { font-weight: 500; }
.grade7-favorites span { font-size: 13px; }
.grade7-section-heading h2, .review-section-head h2 { font-size: 22px; color: var(--ink); }
.grade7-section-heading > span, .review-section-head > span { padding: 3px 8px; background: var(--active); border: 0; border-radius: 4px; color: var(--blue); font-size: 12px; font-weight: 400; }
.grade7-grammar-card, .review-card { border: 1px solid var(--line); border-radius: 5px; box-shadow: none; }
.grade7-grammar-card b, .review-card-title b { font-size: 18px; font-weight: 500; }
.grade7-card-index, .review-card-number { width: 34px; height: 34px; background: var(--active); color: var(--blue); border-radius: 5px; font-weight: 500; }
.grade7-term-button, .grade7-actions button, .grade7-card-tools button, .grade7-favorite-rail a,
.review-filter-button, .review-actions button, .review-card-tools button { border-color: var(--line); border-radius: 5px; background: #fff; color: var(--muted); font-size: 13px; font-weight: 500; }
.grade7-term-button.is-active, .review-filter-button.is-active { background: var(--active); color: var(--blue); border-color: var(--line); }
.grade7-search input, .review-search input { border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink); }
.review-body { background: #fff; color: var(--ink); }
.review-body .site-header { background: #fff; border-bottom-color: var(--line); }
.review-body .brand { color: var(--ink); }
.review-body .top-nav a { color: var(--muted); }
.review-body .top-nav a:hover { color: var(--blue); background: var(--active); }
.review-search span, .review-outline-panel strong, .review-outline-link strong { color: var(--ink); font-size: 15px; font-weight: 500; }
.review-outline-panel p, .review-outline-link em, .review-section-head p { color: var(--muted); font-size: 13px; font-weight: 400; }
.review-outline-link, .review-outline-link:hover { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: #fff; box-shadow: none; transform: none; }
.review-outline-link span, .review-section-kicker { color: var(--blue); font-size: 12px; font-weight: 500; }
.review-card-body { background: #fff; }
.review-card-block { padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: #fff; }
.review-card-block p, .review-card-block ul { font-weight: 400; }
.review-empty { background: #f7f8f6; color: var(--muted); }
.pdf-lesson-actions { display: flex; flex-wrap: wrap; margin-top: 14px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.pdf-lesson-viewer { border: 0; border-radius: 0; box-shadow: none; }

@media (max-width: 1100px) {
  .study-workspace { grid-template-columns: 194px minmax(0,1fr); gap: 16px; }
  .study-page .workspace-selector { flex-basis: 180px; }
  .study-navigation { gap: 6px; }
  .study-controls { grid-template-columns: 108px minmax(60px,1fr) 32px; gap: 8px; }
  .study-preferences-host { display: none; }
  .study-preferences { gap: 3px; }
  .study-continuous { padding-inline: 3px; }
  .study-continuous .lucide { display: none; }
}

@media (max-width: 900px) {
  .study-workspace { grid-template-columns: minmax(0,1fr); }
  .course-sidebar { display: none; }
  .study-unitbar button.course-toggle { display: inline-flex; }
  body.study-page .page-shell { padding-top: 8px; }
}

@media (max-width: 700px) {
  .site-header { min-height: 60px; padding: 8px 12px; }
  .brand, [data-page="home"] .brand { gap: 9px; font-size: 18px; }
  .brand-symbol { width: 35px; height: 37px; }
  .brand .lucide { width: 23px; height: 23px; }
  .brand-copy small { font-size: 9px; }
  .page-shell, .pdf-lesson-page, .phonics-page, .grammar-page, .grammar-review-page, .grade7-grammar-page, .r2t2-page { width: calc(100% - 32px); padding-top: 20px; padding-bottom: 30px; }
  body.study-page .page-shell { width: calc(100% - 24px); padding: 6px 0 24px; }
  body.study-page .site-header { padding-inline: 12px; gap: 8px; }
  body.study-page .brand { gap: 6px; font-size: 15px; }
  body.study-page .top-nav a { width: 44px; height: 44px; justify-content: center; padding: 0; }
  body.study-page .top-nav a > span { display: none; }
  body.study-page .top-nav a::after { content: none; }
  .study-header-book { display: block; flex: 1 1 auto; min-width: 0; }
  body.study-page .site-footer { width: calc(100% - 24px); }
  .site-footer { width: calc(100% - 32px); }
  h1, .page-title h1, .hero h1, .pdf-lesson-copy h1, .r2t2-hero h1 { font-size: 24px; }
  .page-shell.grade7-grammar-page, .page-shell.review-page { width: calc(100% - 32px); }
  .grade7-hero h1, .review-hero h1 { font-size: 24px; }
  .study-page .workspace-selector { display: none; }
  .mobile-book-picker { min-width: 0; min-height: 44px; padding: 2px 6px; border: 0; background: var(--version-soft); }
  .mobile-book-picker > span { display: grid; gap: 2px; min-width: 0; }
  .mobile-book-picker small { color: var(--version-accent); font-size: 11px; font-weight: 600; }
  .mobile-book-picker strong { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; line-height: 1.3; }
  .mobile-book-picker > .lucide { width: 15px; height: 15px; color: var(--muted); }
  .study-book-heading { display: none; }
  .study-page .selector-field:last-child { grid-column: auto; }
  .study-page .selector-field select, [data-page="home"].study-page .selector-field select { font-size: 16px; }
  .study-page .selector-grid .selector-field select { padding-left: 9px; padding-right: 20px; }
  body.study-page { padding-bottom: var(--study-player-height,60px); }
  .study-toolbar { top: var(--study-header-height,52px); padding: 4px 0; background: #f3f7f5; border-top: 0; }
  .study-actionbar { display: block; margin: 0; padding: 0; border: 0; }
  .study-navigation { gap: 6px; }
  .study-unitbar { gap: 5px; min-height: 44px; }
  .study-tabs { gap: 0; padding: 0; }
  .study-tabs button { min-width: 44px; min-height: 44px; padding: 4px 8px; font-size: 13px; }
  .study-tabs button .lucide { display: none; }
  .unit-stepper { display: flex; }
  .study-page .unit-stepper button.study-icon { display: none; }
  .study-page .unit-stepper .selector-field select { height: 44px; font-size: 16px; padding-left: 9px; padding-right: 20px; background-color: #fff; }
  .study-unitbar button.course-toggle { width: 44px; height: 44px; color: var(--blue); background: #e8f2ec; border-color: #d0e1d6; }
  .study-toolbar button.nce-manage { width: 44px; height: 44px; min-height: 44px; }
  .study-player { position: fixed; z-index: 30; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px; left: 0; right: 0; bottom: 0; margin: 0; min-height: 60px; padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #e5b8b1; box-shadow: 0 -4px 18px #153c2e0a; }
  .study-controls { width: auto; grid-template-columns: auto 44px; gap: 8px; }
  .study-transport { grid-column: 1; grid-row: 1; justify-content: center; gap: 4px; }
  .study-controls button.study-icon[data-action="toggle"] { width: 44px; height: 44px; min-height: 44px; }
  .study-controls > [data-settings-open] { grid-column: 2; grid-row: 1; width: 44px; height: 44px; color: var(--blue); background: var(--active); }
  .study-preferences-host, .study-progress-host { display: none; }
  .study-player .study-playback-status { position: static; width: auto; height: auto; clip-path: none; display: grid; grid-template-columns: 14px minmax(0,1fr); align-content: center; gap: 2px 5px; padding: 0; min-width: 0; }
  .study-playback-status [data-mini-count] { display: block; grid-column: 2; font-size: 10px; font-variant-numeric: tabular-nums; color: var(--muted); }
  .study-preferences { width: 100%; gap: 6px; }
  .study-controls select { min-width: 68px; font-size: 13px; }
  .study-controls .study-speed { margin-left: 0; }
  .study-continuous { padding-inline: 6px; }
  .study-transport button.study-icon:not([data-action="toggle"]) { width: 44px; height: 44px; }
  .workspace-content { padding: 0 0 18px; }
  body[data-learning-mode="sentences"] .workspace-content { padding: 0 10px 18px; }
  .study-section-picker { margin-inline: 0; }
  .study-content-tools { gap: 6px 4px; padding: 4px 0 0; }
  .word-tool-actions { grid-column: 2; }
  .word-tool-actions button.study-icon { width: 44px; height: 44px; }
  .word-category-filter { gap: 3px; }
  .word-category-filter label > span { gap: 3px; min-height: 44px; padding-inline: 7px; font-size: 12px; }
  .word-category-filter small { font-size: 10px; }
  button.word-search-toggle { display: inline-flex; width: 44px; height: 44px; color: var(--blue); background: #f1f7f3; }
  .study-search { display: none; grid-column: 1 / -1; grid-row: 2; width: 100%; height: 44px; }
  .study-search input { font-size: 16px; }
  .study-content-tools.is-search-open .study-search { display: flex; }
  .study-content-tools.is-search-open .word-search-toggle { color: #fff; background: var(--blue); }
  .study-page .word-button { grid-template-columns: minmax(0,1fr) 30px; grid-template-rows: auto; gap: 10px; min-height: 68px; padding: 9px 8px; }
  .word-copy { display: grid; gap: 2px; min-width: 0; }
  .word-spelling { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 12px; min-width: 0; }
  .study-page .word-en, .study-page .word-phonetic, .study-page .word-zh { grid-column: auto; grid-row: auto; max-width: 100%; }
  .study-page .word-button .row-sound { grid-column: 2; grid-row: 1; }
  .study-page .word-group-header { margin-top: 6px; }
  body.study-page[data-word-layout="cards"] .word-grid { grid-template-columns: minmax(0,1fr); gap: 6px; padding-top: 6px; }
  body.study-page[data-word-layout="cards"] .word-button { min-height: 82px; padding: 10px 12px; gap: 10px; }
  .study-page .word-button[data-mode="english"], .study-page .word-button[data-mode="chinese"] { grid-template-columns: minmax(0,1fr) 30px; }
  .study-page .word-button[data-mode="chinese"] .word-spelling { display: none; }
  .study-page .line-row { grid-template-columns: 18px minmax(0,1fr) 18px; gap: 4px 8px; padding: 12px 2px; }
  .study-page .word-group-header { padding-inline: 10px; }
  .library-layout { grid-template-columns: minmax(0,1fr); gap: 22px; }
  .library-list { position: static; border: 0; padding: 0; max-height: none; }
  .material-card-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  .material-card { padding: 10px; border: 1px solid var(--line); border-radius: 5px; }
  .material-card strong { font-size: 13px; }
  .material-hero h2 { font-size: 22px; }
  .pdf-lesson-hero { grid-template-columns: minmax(0,1fr); }
}

@media (pointer: coarse) {
  button.study-icon, .unit-stepper button.study-icon { width: 44px; height: 44px; }
  .study-tabs button, .study-continuous, .study-controls select, .top-nav a, .word-category-filter label > span { min-height: 44px; }
  .study-toolbar button.study-icon, .word-tool-actions button.study-icon { width: 44px; height: 44px; min-height: 44px; }
  .study-controls button.study-icon[data-action="toggle"] { width: 44px; height: 44px; min-height: 44px; }
  .study-page .unit-stepper button.study-icon { min-height: 44px; }
}

@media (pointer: coarse) and (min-width: 701px) {
  .study-controls { grid-template-columns: 140px minmax(60px,1fr) auto 44px; }
  .study-page .unit-stepper .selector-field select { min-height: 44px; }
}

@media (pointer: coarse) and (min-width: 701px) and (max-width: 1100px) {
  .study-controls { grid-template-columns: 140px minmax(60px,1fr) 44px; }
}

@media (max-width: 360px) {
  .study-controls select { width: 66px; min-width: 0; font-size: 13px; }
  .study-continuous { padding-inline: 3px; }
  .study-continuous .lucide { display: none; }
}

@media print {
  .site-header, .site-footer, .workspace-selector, .study-toolbar, .study-player, .study-content-tools, .unit-footer, .unit-stepper, .site-contact-button, .course-sidebar, .course-dialog, .study-settings, .book-dialog { display: none; }
  .study-workspace { grid-template-columns: minmax(0,1fr); }
  body.study-page .page-shell { width: 100%; }
}
