/* Focused study workspace. Data, audio and modal behavior remain in the core app. */
:root{--paper:#f5f3ed;--surface:#fffefa;--ink:#203d38;--muted:#536b63;--line:#d8ded6;--accent:#9c452c;--accent-wash:#f6e9de;--green-wash:#e7ede2;--radius:18px;--shadow:none}
.page-shell{max-width:1200px;padding:0 32px}.masthead{min-height:100px;padding:22px 0;margin-bottom:28px}.brand strong{font-size:1.1rem}.brand-caption{font-size:.75rem;letter-spacing:0;text-transform:none}.brand-mark{border-radius:13px}.private-note{font-size:.75rem}.site-reading-control{font-size:.875rem}.site-reading-control select{min-height:48px;border-radius:12px;border-color:var(--line)}
.study-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:52px}.study-sidebar{min-width:0;padding-top:8px}.study-eyebrow{font-size:.6875rem;font-weight:750;letter-spacing:.12em;color:#65745b;margin:0 0 12px}.study-sidebar .course-picker{display:flex;flex-direction:column;align-items:stretch;padding:0;border:0;background:none;gap:12px}.study-sidebar .course-picker>label{font-size:1.25rem;color:var(--ink);font-weight:650}.course-control{width:100%;max-width:100%;min-width:0}.course-control select{font-size:1rem;min-height:52px;width:100%;background:var(--surface);border:1px solid var(--line);border-radius:12px}.study-sidebar #course-scope{font-size:.75rem;color:var(--muted);line-height:1.6}.study-sidebar .source-line{font-size:.75rem;line-height:1.65;margin-top:24px}.sidebar-note{font-size:.8125rem;line-height:1.7;color:var(--muted);margin:20px 0}.sidebar-motto{border-top:1px solid var(--line);margin-top:32px;padding-top:22px;font:italic 1.125rem/1.6 Georgia,serif;color:#65745b}.study-content{min-width:0}.study-intro{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:24px}.study-intro h1{font-size:2.5rem;letter-spacing:-.04em;line-height:1.2;margin:0 0 10px}.study-intro p:last-child{font-size:.9375rem;color:var(--muted);margin:0}.study-seal{width:78px;height:78px;display:grid;place-items:center;flex-shrink:0;border:1px solid #c4d0bc;border-radius:50%;background:#ecf0e3;color:#6c7a5a;font:2.875rem serif}
.study-practice{padding:24px;border-radius:20px;background:#e4ebdf;border:1px solid #d6dfd0;display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:32px}.study-practice h2{font-size:1.25rem;margin:0 0 6px}.study-practice p:last-child{font-size:.8125rem;color:var(--muted);line-height:1.6;margin:0}.study-practice .study-eyebrow{margin-bottom:8px}.study-practice button,.lesson-cards{background:#245b4c;color:#fff;border:1px solid #245b4c;border-radius:12px;min-height:48px;font-size:.875rem;font-weight:650;padding:12px 16px;white-space:normal}.study-practice button:hover,.lesson-cards:hover{background:#193f35}.study-practice button{max-width:100%;flex-shrink:0}.workspace-topline{margin-bottom:18px}.workspace h2{font-size:1.25rem}.text-button,.icon-button{min-height:48px;font-size:.75rem}.icon-button{width:48px}.utility-actions{gap:8px}.filters{grid-template-columns:minmax(0,1fr) 160px}.search-control{border-radius:13px;min-height:56px;background:var(--surface)}.search-control input{font-size:1rem;min-height:56px}.search-control input::placeholder{color:#64776e}.lesson-control select{font-size:.9375rem;min-height:56px;border-radius:13px}.filter-options{margin:16px 0 14px;gap:12px}.section-switch{border:0;padding:0;background:none;gap:4px;flex-wrap:wrap}.section-switch button{min-height:48px;font-size:.875rem;padding:10px 14px;border-radius:12px;color:var(--muted);white-space:normal}.section-switch button[aria-pressed=true]{background:var(--ink);color:white;box-shadow:none}.section-switch button>span,.section-switch button[aria-pressed=true]>span{font-size:.75rem;background:transparent;color:inherit;margin-left:4px;padding:0}.unique-control{font-size:.8125rem;color:var(--muted)}.results-meta p,.reset-button{font-size:.8125rem;line-height:1.6}.reset-button{min-height:48px}.dictionary-notes{font-size:.8125rem;color:var(--muted)}
.lesson-block{background:transparent;border:0;border-radius:18px;overflow:visible;box-shadow:none}.lesson-heading{background:#e9eee5;border:1px solid #d0dacb;border-radius:16px;padding:0 16px 0 0;gap:12px;align-items:center}.lesson-toggle{padding:20px;min-height:92px;gap:14px;border-radius:16px}.lesson-toggle:hover{background:#e2e9dc}.lesson-toggle .lesson-heading-copy{gap:14px}.lesson-number{border:0;background:#fffefa;border-radius:12px;width:42px;height:44px;font-size:.875rem;color:var(--muted)}.lesson-heading h3{font-size:.875rem;color:var(--muted)}.lesson-toggle .lesson-title{font-size:1.375rem;color:var(--ink);line-height:1.4;margin-top:5px}.lesson-count{font-size:.8125rem;color:var(--muted)}.lesson-cards{max-width:none;min-width:0;flex-shrink:0}.lesson-chevron{font-size:1.2rem}.lesson-words{padding-top:12px}.word-grid-head{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.word-entry{background:var(--surface);border:1px solid var(--line);border-radius:16px;margin:10px 0;overflow:hidden}.word-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 16px;padding:18px 20px;min-height:0;border:0;align-items:start}.word-row:hover{background:transparent}.word-row .hanzi{grid-column:1/-1;grid-row:1;font-size:2rem;letter-spacing:.015em;min-width:0;overflow-wrap:normal;word-break:keep-all;white-space:nowrap}.word-open{white-space:nowrap;overflow-wrap:normal;word-break:keep-all;max-width:none;min-height:48px;text-decoration:none;font:inherit;letter-spacing:inherit}.word-open:hover{text-decoration:underline}.word-row>.pinyin{grid-column:1;grid-row:2;font-size:1rem;line-height:1.6}.translation-cell{grid-column:1;grid-row:3;min-width:0}.translation{font-size:.9375rem;line-height:1.65}.page-reference{grid-column:2;grid-row:2/4;font-size:.75rem;line-height:1.6;color:var(--muted);max-width:7em;text-align:right}.pdf-page{font-size:.6875rem}.entry-meta{gap:6px}.source-note,.additional-badge,.uncertain-badge,.repeat-badge{font-size:.75rem}.source-note{line-height:1.6}.example-cell{padding:0 20px 16px}.word-example summary{font-size:.8125rem;color:var(--muted);min-height:36px}.example-body{background:#f1f3eb;border-radius:12px;padding:16px;margin-top:8px}.example-chinese{font-size:1.25rem;line-height:1.65}.example-pinyin,.example-translation{font-size:.9375rem;line-height:1.65}.example-source,.example-pinyin-origin,.example-translation-origin,.example-component{font-size:.75rem;line-height:1.6}.audio-note-row{background:transparent}.audio-note-row .audio-note{font-size:.75rem;line-height:1.6;color:var(--muted);padding:12px 4px}.word-list{gap:20px}
.flash-dialog,.word-detail-dialog,.component-dialog{background:var(--surface);border-color:var(--line);color:var(--ink);border-radius:24px;padding:28px}.flash-dialog::backdrop,.word-detail-dialog::backdrop,.component-dialog::backdrop{background:#142b255e;backdrop-filter:blur(3px)}.flash-close,.word-detail-close,.component-close{border-color:var(--line);background:#edf0e8;border-radius:12px;min-height:48px}.flash-header h2,.word-detail-header h2{font-size:1.25rem}.flash-section{border-color:var(--line);border-radius:12px;min-height:48px}.flash-card{background:#f1f3eb;border:1px solid #dce3d4;border-radius:20px;min-height:260px;padding:28px 20px;box-shadow:none}.flash-hanzi{font-size:4.5rem}.flash-side{font-size:.8125rem;color:var(--muted)}.flash-counter{font-size:.875rem;color:var(--muted)}.flash-controls{gap:12px}.flash-controls button{min-height:48px;font-size:.9375rem;border-radius:12px;border-color:var(--line)}.flash-controls button:last-child{background:#245b4c;border-color:#245b4c;color:white}.flash-shuffle{min-height:48px;font-size:.8125rem}.flash-hint{font-size:.8125rem}.word-detail-main{background:transparent;border:0;padding:20px 0}.word-detail-hanzi{font-size:4rem}.word-detail-pinyin{font-size:1.5rem}.word-detail-translation{font-size:1.125rem}.word-detail-dialog .example-body{padding:20px}.audio-button,.flash-audio .audio-button,.word-detail-actions .audio-button{border-radius:50%;background:#e7ede2;border-color:#d7e0d2;color:var(--ink)}.component-open,.flash-components .component-open{background:var(--surface);border-color:var(--line);color:var(--ink);border-radius:12px}.card-actions .component-open{font-size:.9375rem;padding:10px 16px}.component-card,.component-glyph{background:var(--surface);border-color:var(--line)}.component-dialog .component-context,.component-dialog .component-intro,.component-dialog .component-note,.component-dialog .component-original,.component-dialog .component-status,.component-dialog .component-sources{color:var(--muted)}.component-character{border-color:var(--line);background:#f1f3eb}.component-character[aria-pressed=true]{background:#e4ebdf;color:var(--ink);border-color:#65745b}.page-footer{font-size:.8125rem}.page-footer a{min-height:48px;display:flex;align-items:center}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline-color:#bf5935}
@media(max-width:850px){.page-shell{padding:0 24px}.study-layout{grid-template-columns:190px minmax(0,1fr);gap:28px}.study-practice{display:block}.study-practice button{margin-top:18px;width:100%;text-align:left}.filters{grid-template-columns:1fr}.lesson-toggle{flex-wrap:wrap;padding:16px}.lesson-toggle .lesson-count{padding:0}.lesson-heading{flex-wrap:wrap;padding:0 14px 14px}.lesson-toggle{flex-basis:100%}.lesson-cards{margin-left:14px}.study-seal{width:60px;height:60px;font-size:2.25rem}}
@media(max-width:640px){.page-shell{padding:0 20px}.masthead{margin-bottom:22px;padding:18px 0;gap:16px}.header-preferences{width:auto;flex-direction:row;align-items:center;margin-left:auto}.private-note{display:none}.site-reading-control{font-size:.75rem;gap:6px}.site-reading-control>span{display:none}.brand-caption{font-size:.6875rem}.study-layout{display:flex;flex-direction:column;gap:24px}.study-sidebar{padding:0}.study-sidebar .course-picker{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px 14px;align-items:center;margin:0}.study-sidebar .course-picker>label{font-size:.875rem}.study-sidebar #course-scope{grid-column:1/-1}.study-sidebar .source-line,.sidebar-note,.sidebar-motto,.study-sidebar>.study-eyebrow{display:none}.study-intro{margin-bottom:20px}.study-intro h1{font-size:2rem}.study-practice{padding:20px;margin-bottom:28px}.study-practice h2{font-size:1.375rem}.workspace-topline{gap:8px}.workspace-topline h2{font-size:1.1875rem}.text-button{font-size:.6875rem}.section-switch{display:flex;width:100%;grid-template-columns:none!important}.section-switch button{flex:1 1 auto;font-size:.8125rem;padding:10px}.filter-options{gap:12px}.lesson-heading{padding:0 12px 12px}.lesson-toggle{padding:16px 4px;gap:8px}.lesson-toggle .lesson-heading-copy{flex-basis:calc(100% - 32px);gap:12px}.lesson-toggle .lesson-count{padding-left:54px;font-size:.8125rem;order:3}.lesson-toggle .lesson-title{font-size:1.25rem}.lesson-cards{margin-left:4px;width:calc(100% - 8px);max-width:none;text-align:left}.word-row{padding:16px;gap:6px 12px;grid-template-columns:minmax(0,1fr) auto}.word-row .hanzi{font-size:1.75rem}.word-open{min-height:44px}.word-row>.pinyin{font-size:.9375rem}.translation{font-size:.9375rem}.page-reference{font-size:.6875rem;max-width:5em}.example-cell{padding:0 16px 14px}.flash-dialog,.word-detail-dialog,.component-dialog{padding:20px;border-radius:20px}.flash-hanzi{font-size:3.5rem}.flash-card{min-height:240px}.word-detail-hanzi{font-size:3.5rem}.study-seal{width:58px;height:58px}.card-actions{gap:8px 12px}}
/* Whole words get the full card width at large text. Never split hanzi into syllable-like lines. */
html[data-reading-size="150"] .study-layout,html[data-reading-size="200"] .study-layout{display:flex;flex-direction:column;gap:24px}
html[data-reading-size="150"] .sidebar-motto,html[data-reading-size="200"] .sidebar-motto{display:none}
html[data-reading-size="150"] .study-practice,html[data-reading-size="200"] .study-practice{display:block}
html[data-reading-size="150"] .study-practice button,html[data-reading-size="200"] .study-practice button{margin-top:16px;max-width:100%;width:100%}
html[data-reading-size="150"] .study-seal,html[data-reading-size="200"] .study-seal{display:none}
html[data-reading-size="150"] .word-row,html[data-reading-size="200"] .word-row{grid-template-columns:minmax(0,1fr)}
html[data-reading-size="150"] .page-reference,html[data-reading-size="200"] .page-reference{grid-column:1;grid-row:4;max-width:none;text-align:left}
html[data-reading-size="150"] .lesson-heading,html[data-reading-size="200"] .lesson-heading{flex-wrap:wrap;padding:0 12px 12px}
html[data-reading-size="150"] .lesson-toggle,html[data-reading-size="200"] .lesson-toggle{flex-basis:100%;flex-wrap:wrap}
html[data-reading-size="150"] .lesson-cards,html[data-reading-size="200"] .lesson-cards{width:100%;max-width:none;margin:0}
@media print{.study-layout{display:block}.study-sidebar,.study-practice,.study-seal,.study-intro,.lesson-cards{display:none!important}.word-entry{break-inside:avoid}.word-row{display:grid;grid-template-columns:minmax(0,1fr);padding:10px}.word-row .hanzi{white-space:normal}.word-open{white-space:normal}.page-reference{grid-column:1;grid-row:4;text-align:left}.example-cell{padding:0 10px}.lesson-heading{border:0;padding:0}.lesson-toggle{padding:0}.page-shell{padding:0}}
/* Very long titles stay intact at accessible text sizes; only this word region scrolls. */
.word-row .hanzi{max-width:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;padding-bottom:3px;overscroll-behavior-x:contain}
.word-row .hanzi:focus-visible{outline:3px solid #bf5935;outline-offset:2px;border-radius:4px}
/* Consistent close icons and separate whole-character / component explanations. */
.word-detail-dialog .word-detail-close,.flash-dialog .flash-close,.component-dialog .component-close{display:inline-flex;align-items:center;justify-content:center;flex:0 0 48px;width:48px;min-width:48px;height:48px;min-height:48px;padding:11px;line-height:1;border-radius:12px;background:var(--surface);border:1px solid var(--line);color:var(--ink)}
.word-detail-close svg,.flash-close svg,.component-close svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;pointer-events:none}.word-detail-close:hover,.flash-close:hover,.component-close:hover{background:var(--green-wash)}
.component-information{display:flex;flex-direction:column;gap:16px;min-width:0}.character-meaning-card{padding:20px;border:1px solid #d3decf;border-radius:16px;background:#edf2e8;min-width:0;overflow-wrap:anywhere}.character-meaning-label{font-size:.75rem;letter-spacing:.04em;text-transform:uppercase;font-weight:650;color:#52684d;margin:0 0 6px}.character-meaning-title{font:2.5rem/1.3 "PingFang SC","Microsoft YaHei",sans-serif;margin:0}.character-meaning-text{font-size:1.0625rem;line-height:1.65;margin:10px 0}.character-meaning-note,.character-meaning-source{font-size:.8125rem;line-height:1.6;color:var(--muted)}.character-meaning-source summary,.component-explanation summary{cursor:pointer;min-height:36px;padding:8px 0}.character-meaning-source p{margin:6px 0}.component-explanation{font-size:.8125rem;line-height:1.6;color:var(--muted);margin:0 0 12px}.component-explanation p{margin:6px 0 12px;max-width:65ch}.component-card{margin:0}
@media(max-width:600px){.character-meaning-card{padding:16px}.component-information{gap:12px}.character-meaning-title{font-size:2rem}}
.character-meaning-text{white-space:pre-line}.character-meaning-course-source{font-size:.75rem;line-height:1.6;color:var(--muted);margin:8px 0;overflow-wrap:anywhere}
