/* usability.css */
/* Shared reading and action hierarchy. Loaded after each page's layout rules. */
body{font-family:var(--font);font-size:14px;line-height:1.5;color:var(--text)}
button,.button,input,select,textarea{font:inherit;letter-spacing:inherit}
button,.button,input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select{font-size:14px;min-height:var(--h-ctl)}
button,.button{color:#415764;line-height:1.4}
button.primary,.button.primary{background:var(--accent);border-color:var(--accent);color:#fff}
label{font-size:14px}summary{cursor:pointer;font-size:14px;line-height:1.6}summary:focus-visible{outline-offset:4px}
input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea{max-width:100%;box-sizing:border-box}
:focus-visible{outline:3px solid var(--primary);outline-offset:3px}
.muted,.source,.metadata-help,.eyebrow,body>footer{color:var(--muted);font-size:13px}
.badge,.filter-chip,.match-reasons span{font-size:13px;color:#415c69;line-height:1.6}
.badge.state-ready{color:#245f4b;background:#edf7f1}
.question-text,.preview{font-size:17px;line-height:1.8;color:#1f2f38}
.question-card .source{font-size:13px;overflow-wrap:anywhere}
body>header{gap:24px;flex-wrap:wrap}body>header nav{gap:22px;flex-wrap:wrap;align-items:center}
body>header nav a{font-size:15px;color:var(--muted);min-height:40px;box-sizing:border-box}
body>header nav .nav-create{padding:0 16px;color:white;border-bottom:0}
body>header .brand small,body>header form{font-size:13px;color:var(--muted)}
.worksheet-steps a,.worksheet-steps>span,.worksheet-steps li>span{font-size:14px;min-height:40px;align-items:center}
.worksheet-steps [aria-disabled=true]{color:var(--muted);background:#f1f3f5}
.readiness-detail{position:relative;font-size:13px}.readiness-detail>summary{font-size:13px;color:#245f4b}
.readiness-detail p{color:var(--ink);font-size:13px;white-space:normal;overflow-wrap:anywhere;margin:8px 0}
.card-source,.observed-tags{margin:8px 0;color:var(--muted);font-size:13px}
.card-source summary,.observed-tags summary{font-size:13px;overflow-wrap:anywhere}
.intake-workspace>summary{font-size:18px;font-weight:700;min-height:40px}.intake-workspace{margin-top:24px}
.question-edit-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;align-items:start}.question-edit-grid>section,.question-edit-grid>aside{min-width:0}.question-block{padding:16px;border:1px solid var(--line);border-radius:8px;margin:12px 0}
.question-block textarea{width:100%;min-height:80px;box-sizing:border-box}.question-preview-text{white-space:pre-wrap;overflow-wrap:anywhere}
.bank-question .section-line label{font-size:14px}.question-body .source,.bank-basket>.section-line .quiet,.selected-count,.metrics small,.intake-counts span,.source-preview .source{font-size:13px}
.saved-searches li,.saved-searches button,.saved-searches input,.upload-file [data-row-error],.upload-file .actions button,.upload-file .actions a,.metadata-summary,.file-metadata small.metadata-origin{font-size:13px!important}
.worksheet-steps .step-number{font-size:13px;min-height:23px;min-width:23px}
.textbook-workspace{--green:var(--primary);--muted:#596874}.textbook-workspace>header{height:auto;min-height:64px}
.book-topline{height:auto;min-height:64px}.book-topline ol,.book-tabs a{font-size:14px}.book-topline b{background:#63727c;min-width:23px;min-height:23px}
.book-toolbar label,.book-toolbar button,.book-toolbar .button,.book-title small,.book-nav-caption,.book-unit,.book-unit small,.book-page,.book-page small,.book-all,.book-viewbar,.book-viewbar label,.book-viewbar button,.book-range-notice,.book-card-heading label,.book-card-heading>.source,.book-card-actions button,.book-held,.book-composition p.muted,.book-option,.book-composition-scroll>button,.book-composition-scroll>ol,.book-composition-scroll>details>summary,.book-composition .selection h2,.book-next small,.book-source p,.book-source small,.book-source>div:last-child{font-size:13px!important}
.book-toolbar input,.book-toolbar select{font-size:14px!important;min-height:40px}.book-card-actions{opacity:1}.book-question .question-body{font-size:18px}
.book-viewbar,.book-card-heading{flex-wrap:wrap}.book-layout{min-height:450px}.book-tabs{overflow:auto}
.question-block details{margin-top:12px}.question-block pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:240px;overflow:auto;font-size:13px}
.question-block textarea{font-size:15px;line-height:1.6}.question-block h3{font-size:16px}
[data-correction-preview-status]{display:block;margin:12px 0;font-size:14px;white-space:normal}
[data-correction-preview]:empty{display:none}.correction-comparison,.correction-recovery{margin-top:20px}

/* Source selection: ready ranges first, proposal next to its action. */
.selection-workspace{font-size:15px}.selection-workspace>main{padding-bottom:0}
.selection-topline{min-height:72px;height:auto;gap:14px;flex-wrap:wrap;padding-top:12px;padding-bottom:12px}
.selection-topline h1{font-size:19px}.selection-topline h1 b,.selection-topline ol{font-size:14px;color:var(--muted)}
.selection-tabs a{font-size:15px}.selection-layout{grid-template-columns:minmax(0,1fr) 300px}
.selection-main,.selection-settings{padding:22px;scroll-padding-bottom:20px}
.selection-filter-row label,.selection-books .selection-filter-row label,.selection-check-row{font-size:14px;color:var(--muted)}
.selection-workspace .selection-filter-row input,.selection-workspace .selection-filter-row select{font-size:15px;height:auto;min-height:40px}
.selection-level button,.selection-segment button,.selection-count-presets button,.selection-books .selection-level button,.selection-books .selection-segment button{font-size:14px;min-height:40px}
.selection-workspace button[aria-pressed=true]{background:var(--accent);border-color:var(--accent);color:white}
.selection-workspace button.primary{background:var(--accent);border-color:var(--accent);color:white}
.selection-tabs a[aria-current],.selection-topline li[aria-current]{color:var(--accent);border-color:var(--accent)}
.selection-tree summary>span:last-child,.selection-unit-leaf>span:last-child,.selection-list-heading>span,.selection-empty{font-size:13px;color:var(--muted)}
.selection-tree summary>span:last-child,.selection-unit-leaf>span:last-child{flex-shrink:0;white-space:nowrap}
.selection-hint,.selection-number-range small,.selection-workspace .selection-source-meta,.selection-book-heading,.selection-source-count,.selection-book-grade,.selection-book-publisher{font-size:13px;color:var(--muted)}
.selection-setting,.selection-switches label,.selection-list-heading label,.selection-number-range{font-size:14px;color:var(--muted)}
.selection-source-title,.selection-tree label{font-size:15px}.selection-settings h2{font-size:18px}
.selection-advanced,.reference-browser{border-top:1px solid var(--line);margin-top:22px;padding-top:16px}
.selection-advanced>summary,.reference-browser>summary{font-size:14px;font-weight:700;min-height:40px}
.selection-footer{height:auto;min-height:94px;gap:16px;padding:12px 24px;align-items:center;flex-shrink:0}
.selection-footer .selection-progress{min-width:0;flex:1;text-align:left}
.selection-footer .selection-progress>p{margin:0;font-size:14px;line-height:1.5}
.selection-footer .selection-result{margin:4px 0 0;padding:0;border:0;background:none;max-height:100px;overflow:auto;color:var(--ink);font-size:14px}
.selection-footer .selection-result p{margin:3px 0 0;font-size:13px;color:var(--muted);white-space:normal;overflow-wrap:anywhere}
.selection-footer .selection-result strong{font-size:15px;color:var(--ink)}
.selection-footer [data-basket-count]{color:var(--accent)}
.selection-footer button{font-size:15px;max-width:340px;white-space:normal;flex-shrink:0}
.selection-footer-add{color:var(--muted);font-size:13px}
.selection-books .selection-source-count,.selection-cover{font-size:13px}
.navigation-sources span,.navigation-tree span{font-size:13px}

/* Worksheet: central paper, compact right-hand list, discoverable per-item controls. */
.worksheet-editor-page{--edit-accent:var(--primary);font-size:15px}
.mf-heading{height:auto;min-height:84px;flex-wrap:wrap;padding:10px 0;gap:12px}
.worksheet-editor-page .mf-heading h1{font-size:18px;white-space:normal}.mf-heading h1>span{font-size:13px;color:var(--accent)}
.mf-heading [data-save-status]{font-size:13px;color:var(--muted);max-width:none;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
.mf-heading .worksheet-steps a,.mf-heading .worksheet-steps span,.mf-heading .worksheet-steps button{font-size:14px;color:var(--muted);min-height:40px;display:inline-flex;align-items:center}
.mf-heading .worksheet-steps b{font-size:13px;min-width:23px;min-height:23px;background:#63727c}
.mf-heading .worksheet-steps .active{color:var(--accent);font-weight:700}.mf-heading .worksheet-steps .active b{background:var(--accent)}
.mf-heading .mf-close{font-size:14px;color:var(--muted)}
.mf-summary-tabs{height:auto;min-height:48px;flex-wrap:wrap}.mf-summary-tabs>span,.mf-summary-tabs>a{font-size:14px;padding:10px;min-width:0;flex:1;color:var(--muted)}
.mf-editor .mf-statistics{margin:12px;padding:12px;border-radius:6px}.mf-statistics>summary{font-weight:700}
.mf-statistics h2{margin-top:10px}.mf-stat-body{display:block}.mf-total{width:auto;border:0}.mf-total small,.mf-total>p,.mf-total [data-format-stats],.mf-bar-column,.mf-difficulty>p,.mf-stat-details,.mf-stat-details .source{font-size:13px;color:var(--muted)}
.mf-stat-details[open]{position:static;max-height:200px}.mf-difficulty .mf-no-difficulty{font-size:13px;color:var(--muted)}
.mf-order-table{margin:0 12px}.mf-order-heading{grid-template-columns:32px 62px 54px minmax(0,1fr) 30px;font-size:13px;color:var(--muted);min-height:44px}
.mf-layout [data-editor-summary]>li{grid-template-columns:minmax(0,1fr) 30px;font-size:13px;min-height:46px}
.mf-layout [data-editor-summary]>li>a{grid-template-columns:32px 62px 54px minmax(0,1fr);min-height:46px;height:auto;color:#415764}
.mf-layout [data-editor-summary]>li>a>span{white-space:normal;overflow-wrap:anywhere;line-height:1.4;font-size:13px;text-overflow:clip;padding:5px 3px}
.mf-layout [data-editor-summary]>li>a[aria-current]{color:var(--primary)}
.mf-summary-handle{color:#596874!important;min-height:40px!important}
.mf-selection-tools{min-height:52px;height:auto;padding:8px 12px;font-size:13px;color:var(--muted);flex-wrap:wrap}
.mf-selection-tools>button,.mf-tools>summary,.mf-tools-panel p,.mf-tools-panel label{font-size:13px;color:var(--muted)}
.mf-tools>summary{min-height:30px;padding:5px 8px}.mf-editor .mf-tools-panel input,.mf-editor .mf-tools-panel select{font-size:14px}
.mf-workspace-heading{min-height:64px;flex-wrap:wrap;padding:10px 16px}.mf-workspace-heading h2{font-size:17px}
.mf-workspace-heading [data-toggle-summary]{background:#444;color:#fff;border-color:#78818a;font-size:13px}
.mf-editor .mf-view-controls select{font-size:14px;max-width:170px;min-height:40px}.mf-view-controls{flex-wrap:wrap}
.mf-card-heading{font-size:14px;color:var(--muted)}
.mf-card-body{padding:18px 24px}.mf-card-source{font-size:13px;color:var(--muted);padding-right:52px}
.mf-card-meta{position:static;max-width:none;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;align-items:baseline;font-size:13px;margin-bottom:12px}
.mf-card-meta>span,.mf-card-meta>.mf-held{max-width:none;white-space:normal;font-size:13px;color:var(--muted)}
.mf-card-meta>.mf-held{color:#795310;background:#fff4db}.mf-card-meta .readiness-detail[open]{flex-basis:100%}
.mf-question-content,.mf-question-content>.question-text,.mf-editor .mf-problem-card [data-editor-preview]{font-size:18px}
.mf-editor .mf-remove{right:16px;top:14px;width:40px;height:40px;color:#556773}
.mf-editor .mf-card-quick{display:flex;flex-wrap:wrap;gap:10px;align-items:end;border-top:1px solid #e3e8eb;padding:14px 0 0;margin:16px 0 0}
.mf-card-quick>label{font-size:13px;min-width:80px;max-width:135px}.mf-card-quick>label input,.mf-card-quick>label select{font-size:14px;width:100%;margin:4px 0 0;min-height:40px}
.mf-card-quick>button,.mf-card-quick>a{font-size:13px;min-height:40px}.mf-card-quick>a{display:flex;align-items:center}
.mf-card-actions,.mf-card-actions:has(.mf-card-settings[open]){margin:12px 0 0;gap:14px;flex-wrap:wrap;font-size:14px}
.mf-card-actions>a{min-height:40px;display:inline-flex;align-items:center}.mf-card-settings>summary{font-size:14px;letter-spacing:0;color:var(--muted);min-height:40px;display:flex;align-items:center}
.mf-card-settings-body{font-size:14px}.mf-card-settings-body p,.mf-card-settings-body button,.mf-card-settings-body a{font-size:13px}
.mf-editor .mf-card-settings-body input,.mf-editor .mf-card-settings-body select{font-size:14px;min-height:40px}
.mf-editor .answer-preview summary{font-size:14px;color:var(--muted)}
.mf-editor .mf-footer .button,.mf-editor .mf-footer button,.mf-editor .mf-footer .primary{font-size:14px;min-height:var(--h-ctl);color:#415764}
.mf-editor .mf-footer .primary{color:white;background:var(--accent);border-color:var(--accent)}
.mf-footer>span{font-size:13px}
.mf-card-settings-body button{max-width:100%;white-space:normal}
.mf-output-heading>span{font-size:13px;color:var(--accent)}.mf-output-heading p,.mf-output-body>p,.mf-output-body legend,.mf-output-body [data-output-pagebreaks] label{font-size:14px;color:var(--muted)}
.mf-output-body summary{font-size:15px}.mf-output-body [data-pre-render-result]{display:block;white-space:normal;overflow-wrap:anywhere;font-size:14px}
.editor-feedback{flex:none;margin:0 0 12px;padding:12px 16px;max-height:24vh;overflow:auto;white-space:normal;overflow-wrap:anywhere;font-size:14px;color:#8a281e;background:#fff3ef;border:1px solid #d59b90}
.editor-feedback[data-kind=info]{color:#24516b;background:#eef7fc}.mf-recovery{font-size:14px}

/* A separate native dialog keeps the 440px question geometry at readable scale. */
#question-reader{width:min(900px,calc(100vw - 32px));max-width:calc(100vw - 16px);max-height:90dvh;box-sizing:border-box;border:1px solid #8a989f;border-radius:10px;padding:20px;color:var(--ink)}
#question-reader::backdrop{background:#14263299}.reader-heading{display:flex;gap:16px;align-items:center;justify-content:space-between}.reader-heading h2{margin:0;font-size:20px}
.reader-help{font-size:13px;color:var(--muted)}.reader-content{overflow:auto;max-height:68dvh;overscroll-behavior:contain;padding:8px}
.reader-sheet{width:440px;min-width:440px;margin:auto;font-size:18px;line-height:1.8;transform:none!important;position:static!important}
.reader-sheet .preview{border:0;padding:0;font-size:18px}.reader-sheet img{max-width:100%;height:auto}.reader-sheet .question-text{font-size:18px}
@media(max-width:1000px){.mf-heading .worksheet-steps{order:3;width:100%;margin:0;justify-content:center}.mf-card-body{padding:16px}.selection-layout{grid-template-columns:minmax(0,1fr) 270px}.selection-main,.selection-settings{padding:16px}}
@media(max-width:760px){
 .selection-topline h1{font-size:17px;white-space:normal;max-width:calc(100% - 40px)}.selection-topline>a{order:2;margin-left:auto}.selection-topline ol{order:3;width:100%;margin:0;gap:8px;justify-content:space-between}.selection-topline ol li{display:list-item!important;font-size:13px}
 body>header nav{gap:14px}.selection-topline ol{display:flex;flex-wrap:wrap}.selection-layout{display:flex;flex-direction:column;overflow:auto}.selection-main,.selection-settings{overflow:visible;flex:none;max-height:none}.selection-settings{border-top:1px solid var(--line)}
 .selection-footer{padding:10px 12px;gap:10px;flex-wrap:wrap}.selection-footer>.button{display:none}.selection-footer .selection-progress{flex-basis:100%}.selection-footer button{width:100%;max-width:none;min-height:var(--h-ctl)}.selection-footer .selection-result{max-height:76px}
 .selection-books .selection-source-title{font-size:15px}.selection-book-grade,.selection-book-publisher{font-size:13px}
 .worksheet-editor-page .mf-heading h1{font-size:16px}.mf-heading [data-save-status]{font-size:13px;max-width:none}.mf-heading .worksheet-steps{display:flex;gap:8px;flex-wrap:wrap}.mf-heading .worksheet-steps a,.mf-heading .worksheet-steps span,.mf-heading .worksheet-steps button{font-size:13px}
 [data-toggle-summary]{display:none}.mf-mobile-switch{font-size:14px!important;min-height:40px}.mf-workspace-heading{min-height:64px;gap:8px}.mf-workspace-heading h2{font-size:15px}.mf-editor .mf-view-controls select{font-size:13px;max-width:160px}.mf-card-source{font-size:13px}
 .mf-footer{flex-wrap:wrap}.mf-editor .mf-footer .button,.mf-editor .mf-footer button{padding:8px 12px;font-size:14px}.mf-output-settings .mf-footer button{padding:8px 10px}
 .question-edit-grid{grid-template-columns:minmax(0,1fr)}#question-reader{padding:12px}.reader-sheet{margin:0}
}

.question-classification{display:flex;flex-wrap:wrap;gap:6px 12px;margin:10px 0;line-height:1.55;align-items:center;color:var(--text,#1f2937)}
.question-classification>span{overflow-wrap:anywhere}.question-classification>small{color:var(--muted,#526175)}
.question-tags{gap:6px;margin:8px 0 14px}.question-tags .filter-chip{font-size:13px;padding:0 16px}
/* A short upload flow with distinct transfer and question preparation stages. */
.intake-wizard{max-width:1120px;margin:24px auto;padding:24px;border-radius:14px}.intake-wizard>summary{font-size:21px;font-weight:700}.intake-runtime{padding:14px 16px;border-radius:8px;background:#f0f5fc;color:#345376;margin:16px 0}.intake-runtime p{font-size:13px;margin:6px 0 0;line-height:1.6}.intake-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:20px 0}.intake-steps button{border:1px solid #cfdbeb;background:#fff;color:#4c607c;text-align:left;padding:13px 15px;font-size:14px}.intake-steps b{display:inline-grid;place-items:center;border-radius:50%;width:22px;height:22px;background:#ecf1f8;margin-right:7px}.intake-steps button[aria-current=step]{border:2px solid var(--primary);background:var(--primary-bg);color:var(--primary)}.intake-steps button[aria-current=step] b{background:var(--primary);color:#fff}.intake-wizard [data-intake-step] h2{font-size:18px;margin:22px 0 10px}.intake-wizard .upload-dropzone{padding:30px 20px;margin:18px 0;border:2px dashed #b2c7e4;background:#f7faff}.intake-wizard .common-fields{grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:15px}.intake-wizard .upload-file{border:1px solid #d2deed;border-radius:10px;padding:18px;background:#fff;margin:12px 0}.intake-wizard .file-metadata{background:#f7f9fc;padding:12px;border-radius:8px}.intake-wizard .intake-kind-fields{padding:16px 0;border-top:1px solid #dce5f1}.intake-wizard-actions{border-top:1px solid #dce5f1;padding-top:16px;margin-top:18px}.intake-wizard .upload-submit{justify-content:flex-end}.intake-wizard [data-batch-status]{display:block;line-height:1.6;font-size:14px;margin-top:12px}.intake-wizard [hidden]{display:none!important}.intake-stage-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(112px,1fr));gap:8px;padding:0;margin:14px 0;list-style:none}.intake-stage-list li{padding:10px;border:1px solid #d5dfec;border-radius:8px;display:flex;flex-direction:column;gap:7px;font-size:12px;background:#f5f7fb;color:#63768e}.intake-stage-list li strong{font-size:14px;color:#314f76}.intake-stage-list li[data-stage-state=done]{background:#eaf5f0;border-color:#bcd9ca}.intake-stage-list li[data-stage-state=done] strong{color:#286549}.intake-stage-list li[data-stage-state=partial]{background:#fff8e8;border-color:#ebd9ad}.intake-progress{padding:14px 0;border-top:1px solid #dce5ef;margin-top:16px}.material-card .intake-stage-list{grid-template-columns:repeat(3,1fr)}
@media(max-width:700px){.intake-wizard{padding:15px}.intake-steps{gap:5px}.intake-steps button{font-size:12px;padding:10px 7px;line-height:1.5}.intake-steps b{display:grid;margin-bottom:6px}.intake-wizard .common-fields{grid-template-columns:1fr}.intake-stage-list{grid-template-columns:repeat(2,1fr)}.intake-wizard .section-line{flex-wrap:wrap}.intake-wizard .upload-file{padding:12px}}

.structured-answer-editor{border-top:1px solid var(--line);margin-top:18px;padding-top:12px}.structured-answer-editor fieldset{margin:12px 0;border:1px solid var(--line);padding:12px}.structured-answer-row{display:flex;flex-wrap:wrap;gap:8px;align-items:end;margin:10px 0}.structured-answer-editor label{display:inline-flex;flex-direction:column;gap:4px;margin:4px 8px 4px 0}.structured-answer-editor input,.structured-answer-editor select{max-width:100%;min-width:100px}
.review-status[data-teacher-review=done]{color:#1f5e3f;background:#e3f3e8;border:1px solid #b9dcc5}.review-status[data-teacher-review=pending]{color:#5d6a70;background:#f4f6f7;border:1px dashed #c4ccd0}.review-status[data-teacher-review=reported]{color:#7a4f12;background:#fff3dc;border:1px solid #ecd19b}.review-status .review-detail{font-size:.9em;opacity:.85}

/* A39 UI-1 (10-23): Hangul wrapping by place, measured with hangul-wrap wrapcheck.
   :where() keeps specificity 0, so component rules still win. Headings and prose (question
   bodies included) wrap between words; narrow cells (buttons, badges, chips, page rail) keep
   the browser default and only number+unit pairs stay together. Output (HWPX) is unaffected. */
:where(h1,h2,h3,h4,h5,h6,p,li,dd,dt,blockquote,figcaption,.db-paragraph){word-break:keep-all;overflow-wrap:break-word}
/* Prose that sits outside p/li: the empty basket, intake status lines, sidebar material links. */
:where(.basket-empty,.section-line>strong,.section-line>.source,.navigation-sources){word-break:keep-all;overflow-wrap:break-word}
:where(h1,h2,h3,h4,h5,h6){text-wrap:balance}
:where(p,li,dd,blockquote,figcaption,.db-paragraph){text-wrap:pretty}
:where(pre,code,kbd,samp){overflow-wrap:anywhere}
/* Source tables keep the browser default: a keep-all cell sets the table's minimum width to its
   longest word, and a narrow card (300 px editor body) would clip a multi-column table. */
:where(table) :where(p,li,dd,dt,.db-paragraph),:where(td,th){word-break:normal;overflow-wrap:anywhere}
:where(button,.button,.badge,.chip,.filter-chip,.reference-course-chip,.reference-page-rail,select,option){word-break:normal}
/* Book page card head: "0001번" stays one piece, the note drops to its own line, badge at the end. */
.reference-db-question header{flex-wrap:wrap;row-gap:4px}
.reference-db-question header label strong{white-space:nowrap}
.reference-db-question header small[data-card-state]{order:3;flex-basis:100%}
/* Page rail: readable status line, one line with the full text as a tooltip. */
.reference-page-rail button small{display:block;font-size:12px;line-height:1.45;color:#46576a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* Selection tools: one even button group (2x2 when narrow). */
.selection-rework .rework-result-tools{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px;align-items:stretch}
.selection-rework .rework-result-tools>*{min-height:36px;margin:0}
.selection-rework .rework-result-tools>[hidden]{display:none}
/* "표시 설정" lines up with the other disclosure rows. */
.selection-rework .rework-secondary>summary{padding-left:20px}
/* Disabled next step: readable grey; the reason stays in the hint it is described by. */
body.selection-workspace button.primary[data-selection-next]:disabled{background:#d5dde5;border-color:#c3ccd6;color:#34495e;opacity:1;cursor:not-allowed}
/* Course chips: two rows from 1280 px (twice as many visible), one row when narrower; the strip
   still scrolls sideways and its edges fade so a cut chip reads as "more this way". */
@media (min-width:1280px){.reference-course-strip{display:grid;grid-auto-flow:column;grid-template-rows:repeat(2,auto);justify-content:start}}
.reference-course-strip{mask-image:linear-gradient(to right,transparent 0,#000 16px,#000 calc(100% - 24px),transparent 100%)}
/* Book page: one retry. The toolbar retry stays (it also reopens the page); the full-width page
   retry shows only when the page itself failed to load. */
[data-book-pages]:not([data-content-state="error"]):has([data-book-card-tools] [data-result-retry]:not([hidden])) [data-book-page-retry]{display:none}
/* Editor card: review badge inside the card, card actions as one row of equal ghost buttons. */
.mf-editor .mf-card-actions>button,.mf-editor .mf-card-actions>a,.mf-editor[data-fixed-format] .mf-card-actions>[data-question-enlarge],.mf-editor .mf-card-actions>.mf-card-settings>summary{min-height:36px;padding:6px 12px;border:1px solid #d3dbe3;border-radius:8px;background:#fff;color:#33475b;font-size:13px;line-height:1.4;display:inline-flex;align-items:center}
/* One step indicator style: numbered circle and label, the current step filled. */
.worksheet-steps{gap:14px}
.worksheet-steps .arrow{display:none}
.worksheet-steps a,.worksheet-steps span{border:0;padding:4px 0;background:transparent;font-size:13px}
.worksheet-steps .active{background:transparent;border:0}
.worksheet-steps .step-number,.reference-steps b{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#dfe5ea;color:#4b5d6e;font-size:11px;font-weight:700}
.worksheet-steps .active .step-number,.reference-steps .active b{background:var(--primary);color:#fff}
.worksheet-steps .active,.reference-steps .active{color:var(--primary);font-weight:700}

/* A39 UI-2 (10-23): placeholders while content loads (number tiles, book page cards and rail,
   equations in search cards). They sit where the content will appear; motion stops when the
   teacher asks for reduced motion. Equation slots move only while their card's preview request is
   queued or running ([data-preview-loaded]); before it, after a failure and on recovery-pending
   cards they stay still. */
@keyframes mathdb-skeleton{from{background-position:100% 0}to{background-position:-100% 0}}
.rework-skeleton,.reference-skeleton-card,.reference-skeleton-row,[data-preview-loaded] .eq-placeholder{background:linear-gradient(90deg,#eef2f5 25%,#e1e7ed 37%,#eef2f5 63%);background-size:400% 100%;animation:mathdb-skeleton 1.4s ease infinite}
.selection-rework .rework-number.rework-skeleton{min-height:62px;border:0;border-radius:8px;background:linear-gradient(90deg,#eef2f5 25%,#e1e7ed 37%,#eef2f5 63%);background-size:400% 100%}
.reference-skeleton-card{min-height:300px;border-radius:12px}
/* Slow result swap: placeholders replace the stale list until the response arrives. */
[data-result-skeleton]>:not(.result-skeleton){display:none}
.result-skeleton{display:grid;gap:12px}
.result-skeleton .result-skeleton-card{min-height:140px}
.reference-skeleton-row{height:46px;margin:6px 4px;border-radius:6px}
.eq-placeholder{display:inline-block;width:3.2em;height:1.05em;vertical-align:-.15em;margin:0 .15em;border-radius:4px;background:#eef2f5}
@media (prefers-reduced-motion:reduce){.rework-skeleton,.reference-skeleton-card,.reference-skeleton-row,[data-preview-loaded] .eq-placeholder{animation:none}}
/* A search card already shows its review and original-image badges; the body preview loaded into
   it repeats them, so the repeated ones hide (only where the card has its own). */
.bank-question:has(.card-badges .review-status)>.question-body .preview>.review-status,
.bank-question:has(.card-badges [data-original-image])>.question-body .preview>[data-original-image]{display:none}
/* A39 UI-3 (10-23): status badges sit at the right of each card's head line; evidence and
   processing notes fold into one quiet "자세히" under the body, above the actions. */
.card-badges{display:inline-flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:6px;margin-left:auto}
.card-badges>details{display:inline-block}
.mf-card-heading .card-badges{margin-right:8px}
.mf-card-heading .card-badges+.mf-card-handle{margin-left:0}
.reference-page-flag{display:inline-block;margin-left:2px;padding:0 6px;border-radius:9px;background:#fff3dc;color:#7a4f12;font-size:11px;line-height:1.6}
.card-evidence{margin:8px 0;font-size:12px;color:#5b6b7a}
.card-evidence>summary{font-size:12px;color:#5b6b7a;cursor:pointer}
.card-evidence>p,.card-evidence>small{display:block;margin:6px 0 0;font-size:12px}
.card-evidence .match-reasons span{margin-right:6px}

/* A39 UI-4 (10-23): the textbook list is a real table — subject | name | usable | reviewed | publisher.
   Counts are right-aligned numbers in their own columns, and the publisher column hides when every
   listed book lacks one. Up to 1000px the publisher moves under the name; up to 740px the reviewed
   column goes too, so the name keeps its width. The whole row opens the book, like its name button. */
.reference-book-table{width:100%;border-collapse:collapse;table-layout:fixed}
.reference-book-table th{position:sticky;top:0;z-index:1;background:#fff;padding:10px 7px 13px;border-bottom:1px solid #e0e4e7;font-size:11px;font-weight:400;color:#8a959f;text-align:left}
.reference-book-table td{padding:18px 7px;border-bottom:1px solid #e4e7e9;vertical-align:middle;color:#253b51}
.reference-book-table :is(th,td):first-child{padding-left:24px}
.reference-book-table :is(th,td):last-child,.books-without-publisher .reference-book-table .reference-book-reviewed{padding-right:24px}
.reference-book-table .reference-book-subject{width:150px;white-space:nowrap}
.reference-book-table .reference-book-usable{width:84px}
.reference-book-table .reference-book-reviewed{width:80px}
.reference-book-table .reference-book-publisher{width:160px}
.reference-book-table :is(.reference-book-usable,.reference-book-reviewed){text-align:right;white-space:nowrap}
.reference-book-table td:is(.reference-book-usable,.reference-book-reviewed){font-size:13px;color:#22313f;font-variant-numeric:tabular-nums}
.reference-book-table .is-preparing td{color:#788795}
.books-without-publisher .reference-book-publisher,.reference-book-publisher-inline{display:none}
.selection-reference [data-tab=books] tr.rework-source-card{display:table-row;border:0;cursor:pointer}
.selection-reference [data-tab=books] tr.rework-source-card.is-preparing{cursor:default}
.selection-reference [data-tab=books] tr.rework-source-card:not(.is-preparing):hover>td{background:#f3fbff}
.selection-reference [data-tab=books] tr.rework-source-card.is-active>td{background:#f1fbff}
.selection-reference [data-tab=books] .reference-book-table .rework-source-button{display:inline;min-height:0;width:auto;padding:0!important;background:transparent!important;color:inherit;font:inherit;text-align:left;overflow-wrap:anywhere;cursor:pointer}
.selection-reference [data-tab=books] .reference-book-table .rework-source-button:disabled{cursor:default}
.reference-book-table .reference-book-name>:is(p,select){display:block;margin:6px 0 0}
.reference-book-table .reference-book-name>a{display:inline-block;margin:6px 6px 0 0}
.selection-reference .reference-book-table .reference-book-recovery{display:block;margin:3px 0 0;color:#8a5a00}
@media (max-width:1000px){
  .reference-book-table .reference-book-subject{width:124px}
  .reference-book-table .reference-book-usable{width:76px}
  .reference-book-table .reference-book-reviewed{width:80px;padding-right:24px}
  .reference-book-table .reference-book-publisher{display:none}
  .selection-reference .reference-book-table .reference-book-publisher-inline{display:block;margin:3px 0 0;color:#788795}
}
@media (max-width:740px){
  .reference-book-table td{padding:14px 6px}
  .reference-book-table th{padding:9px 6px}
  .reference-book-table :is(th,td):first-child{padding-left:12px}
  .reference-book-table .reference-book-subject{width:72px;white-space:normal;word-break:keep-all}
  .reference-book-table .reference-book-usable{width:74px;padding-right:12px}
  .reference-book-table .reference-book-reviewed{display:none}
  .reference-book-table td:is(.reference-book-usable,.reference-book-reviewed){font-size:12px}
}
/* Drafts list: the favorite toggle is a star beside the title. */
.draft-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.draft-card-head h2{margin:0;min-width:0}
.draft-card-head .draft-favorite{flex:none;width:36px;height:36px;margin:0;padding:0;font-size:18px;line-height:1;border:1px solid #d5dbe1;border-radius:8px;background:#fff;color:#5f6b78;cursor:pointer}
.draft-card-head .draft-favorite[aria-pressed=true]{color:#8a5a00;border-color:#e8c766;background:#fff8e1}
.draft-card .actions{gap:8px}.draft-card .actions .button,.draft-card .actions button{padding-inline:10px;font-size:13px}
/* Narrow header: the main menu is one sideways-scrolling line; '새 학습지 만들기' stays at its right edge. */
@media(max-width:850px){
 body>header nav{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;gap:18px;align-items:center}
 body>header nav::-webkit-scrollbar{display:none}
 body>header nav[data-scrolled]{-webkit-mask-image:linear-gradient(to right,transparent,#000 20px);mask-image:linear-gradient(to right,transparent,#000 20px)}
 body>header nav>a{flex:none;white-space:nowrap}
 body>header nav>.nav-create{position:sticky;right:0;margin-left:auto;box-shadow:-14px 0 10px #fff}
}
/* 18차: one body note above the book table, only while usable counts are unknown. */
.selection-reference .reference-book-body-note{margin:10px 24px 0;font-size:12px;color:#6a7d90}
@media (max-width:740px){.selection-reference .reference-book-body-note{margin:8px 12px 0;font-size:11px}}

/* Field provenance stays separate from review status and printable content. */
.generated-provenance {display:inline-block; margin:.15rem .35rem .15rem 0; vertical-align:middle;}
.generated-provenance summary {cursor:pointer; list-style-position:inside;}
.generated-provenance p {max-width:36rem; margin:.4rem 0; color:#46525d; font-size:.875rem; font-weight:normal;}
.generated-origin {color:#354452; background:#edf1f4; border:1px solid #cad3da; margin-right:.25rem; white-space:normal;}
.generated-provenance summary:focus-visible {outline:2px solid #4b6780; outline-offset:3px;}
@media print { [data-generated-provenance], [data-generation-summary] {display:none!important;} }
/* Teacher UI phase 0 (11-19): danger actions, toasts, the report dialog, row menus and the trash. */
button.danger,.button.danger{color:#b42318;border-color:#e4a7a0;background:#fff}
button.danger:hover,.button.danger:hover{background:#fdf0ee}
.mf-toast-host{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:2000;display:flex;flex-direction:column;gap:8px;align-items:center;pointer-events:none;max-width:calc(100vw - 32px)}
.mf-toast{pointer-events:auto;display:flex;align-items:center;gap:16px;padding:10px 16px;border-radius:8px;background:#263741;color:#fff;font-size:14px;box-shadow:0 6px 18px #0003}
.mf-toast-action{min-height:32px;padding:4px 10px;border:1px solid #ffffff66;border-radius:6px;background:transparent;color:#fff;font-weight:500}
.mf-modal-backdrop{position:fixed;inset:0;z-index:1500;display:flex;align-items:center;justify-content:center;padding:16px;background:#0006}
.mf-modal{display:flex;flex-direction:column;width:min(560px,100%);max-height:80vh;border-radius:10px;background:#fff;color:#17212d;box-shadow:0 12px 36px #0004}
.mf-modal-head{padding:20px 24px 8px}.mf-modal-head h2{margin:0;font-size:19px}.mf-modal-head p{margin:4px 0 0}
.mf-modal-body{padding:4px 24px 12px;overflow:auto}
.mf-modal-actions{display:flex;justify-content:flex-end;gap:8px;padding:12px 24px;border-top:1px solid #e3e8ee;background:#fff;border-radius:0 0 10px 10px}
.mf-modal-actions button:disabled{opacity:.5;cursor:not-allowed}
.mf-report-group{border:0;margin:0 0 10px;padding:0;display:flex;flex-wrap:wrap;gap:6px 14px}
.mf-report-group legend{font-weight:700;font-size:14px;margin-bottom:4px;padding:0}
.mf-report-option{display:inline-flex;align-items:center;gap:4px;font-size:14px}
.mf-report-memo{display:flex;flex-direction:column;gap:4px;margin-top:6px}.mf-report-memo textarea{width:100%;resize:vertical}
.mf-report-status{color:#b42318;font-size:13px;margin:6px 0 0;min-height:1em}
.mf-row-menu{position:relative;display:inline-block}.mf-row-menu>summary{list-style:none;min-width:40px;min-height:40px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #d5dce4;border-radius:6px;font-size:18px}
.mf-row-menu>summary::-webkit-details-marker{display:none}
.mf-row-menu-panel{position:absolute;right:0;top:calc(100% + 4px);z-index:20;display:flex;flex-direction:column;min-width:170px;padding:6px;border:1px solid #d5dce4;border-radius:8px;background:#fff;box-shadow:0 8px 20px #0002}
.mf-row-menu-panel a,.mf-row-menu-panel button{display:block;width:100%;text-align:left;border:0;background:transparent;padding:8px 10px;border-radius:6px;min-height:var(--h-ctl)}
.mf-row-menu-panel a:hover,.mf-row-menu-panel button:hover{background:#f1f4f7}.mf-row-menu-panel form{margin:0}
.draft-card-actions{align-items:center}
.trash-table{width:100%;border-collapse:collapse}.trash-table th,.trash-table td{padding:10px 8px;border-bottom:1px solid #e3e8ee;text-align:left}
.trash-table .actions{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap}
.account-danger-zone{margin-top:12px;padding-top:12px;border-top:1px dashed #e4a7a0}
.notice-more summary{display:inline;color:var(--accent)}
@media(max-width:600px){.trash-table thead{display:none}.trash-table td{display:block;border:0;padding:4px 0}.trash-table tr{display:block;padding:10px 0;border-bottom:1px solid #e3e8ee}}

/* 학교 분석 source picker: one option per line, drawn on demand. */
.source-picker-options{display:grid;gap:2px;max-height:360px;overflow:auto}

/* Shared inline math glyph sprite and deferred offscreen search cards (m64). */
.equation-sprite{position:absolute;width:0;height:0;overflow:hidden;pointer-events:none}
.preview svg.equation,.book-question .preview svg.equation,[data-book-modal-body] svg.equation{display:inline-block;vertical-align:middle;max-width:100%;flex-shrink:0;overflow:visible}
.preview .db-equation-run[data-equation-layout="baseline-v1"]>svg.equation{display:block;vertical-align:baseline}
#search-results .bank-question:nth-of-type(n+5){content-visibility:auto;contain-intrinsic-size:auto 260px}


/* shell.css */
/* Screen frame and worksheet list (UI brief v1 stages 2-3, 2026-11-19).
   Colours and sizes come from tokens.css (loaded after this file); no palette is defined here. */

/* 2-1 GNB: 61px, three top menus, the account menu on the right. */
body>header.gnb{box-sizing:border-box;height:61px;min-height:61px;padding:0 24px;gap:24px;flex-wrap:nowrap;background:#fff;border-bottom:1px solid var(--line);position:relative;z-index:30}
body>header.gnb .brand{font-size:20px;color:var(--text);white-space:nowrap}
body>header.gnb .brand small{font-size:11px;color:var(--text-muted);font-weight:400}
body>header.gnb nav{order:0;flex:1 1 auto;flex-basis:auto;display:flex;align-self:stretch;align-items:stretch;gap:0;overflow:visible;-webkit-mask-image:none;mask-image:none}
body>header.gnb nav>a{display:flex;align-items:center;min-height:0;padding:12px 16px;border:0;font-size:18px;font-weight:500;color:var(--text-sub);text-decoration:none}
body>header.gnb nav>a[aria-current]{font-weight:700;color:var(--primary);border:0}
.gnb-user{position:relative;margin-left:auto}
.gnb-user>summary{list-style:none;display:flex;align-items:center;gap:6px;height:var(--h-ctl);padding:0 12px;border-radius:var(--r-btn);cursor:pointer;font-size:14px;color:var(--text);white-space:nowrap}
.gnb-user>summary::-webkit-details-marker{display:none}
.gnb-user>summary::after{content:"";width:6px;height:6px;border-right:1.5px solid var(--text-sub);border-bottom:1.5px solid var(--text-sub);transform:rotate(45deg) translateY(-2px)}
.gnb-user-menu{position:absolute;right:0;top:calc(100% + 6px);min-width:180px;padding:6px;display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:var(--r-nav);box-shadow:0 8px 20px #0000001f}
.gnb-user-menu a,.gnb-user-menu button{display:flex;align-items:center;width:100%;min-height:var(--h-ctl);padding:0 12px;border:0;border-radius:var(--r-btn);background:transparent;color:var(--text);text-align:left;font-size:14px;text-decoration:none}
.gnb-user-menu a:hover,.gnb-user-menu button:hover{background:var(--btn-bg)}
.gnb-user-menu form{margin:0}

/* 2-2 LNB beside the main area; 2-3 the main area holds white cards. The LNB is a sibling of
   <main> (body>main and page rules such as .worksheet-editor-page>main keep matching); pages
   without it (editor, selection) keep their own full-screen layout. */
body:has(>aside.lnb){display:grid;grid-template-columns:197px minmax(0,1fr);grid-template-rows:auto 1fr auto;min-height:100vh}
body:has(>aside.lnb)>:not(aside.lnb,main){grid-column:1/-1}
body:has(>aside.lnb)>main{grid-column:2;min-width:0;width:auto;max-width:none;margin:0;padding:18px;box-sizing:border-box}
.lnb{grid-column:1;box-sizing:border-box;width:197px;padding:8px 0;border-right:1px solid var(--line);background:var(--page)}
.lnb nav{display:flex;flex-direction:column}
.lnb a{display:flex;align-items:center;box-sizing:border-box;height:56px;margin:0 16px;padding:0 16px;border-radius:var(--r-nav);font-size:14px;color:var(--text-sub);text-decoration:none}
.lnb a[aria-current]{background:var(--primary-tint);color:var(--primary);font-weight:700;border:0}
.lnb-divider{width:calc(100% - 32px);margin:8px 16px;border:0;border-top:1px solid var(--line)}
/* Capture B09d: 56px items 4px apart, rules as wide as the items, a group's items 42px in a 46px pitch. */
.lnb nav>a+a{margin-top:4px}
.lnb-group{margin:8px 16px 0;padding-top:14px;border-top:1px solid var(--line)}
.lnb-group>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;height:32px;margin:0;padding:0 16px;font-size:12px;font-weight:700;color:var(--primary);cursor:pointer}
.lnb-group>summary::-webkit-details-marker{display:none}
.lnb-group>summary::after{content:"";width:6px;height:6px;border-right:1.5px solid var(--primary);border-bottom:1.5px solid var(--primary);transform:rotate(-135deg)}
.lnb-group:not([open])>summary::after{transform:rotate(45deg)}
.lnb-group a{height:42px;margin:0 0 4px}
body>footer{padding:12px}
.mf-card{background:#fff;border:1px solid var(--card-line);border-radius:var(--r-card);padding:0 24px 24px;margin-bottom:16px}
.mf-card-tabs{padding-bottom:0}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* 3-2 sub-tabs: 120 x 54, 16px; the current tab is the page title. */
.mf-subtabs{display:flex;margin:0 -24px 0;padding:0 24px;border-bottom:1px solid var(--line)}
.mf-subtabs a{display:flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:120px;height:54px;padding:0 12px;border-bottom:2px solid transparent;font-size:16px;font-weight:400;color:var(--text-muted);text-decoration:none;white-space:nowrap}
.mf-subtabs a[aria-current]{font-weight:700;color:var(--text);border-bottom-color:#000}
.mf-notice{margin:16px 0 0;font-size:14px;color:var(--text-sub)}
.mf-empty{padding:96px 0;text-align:center}
.mf-empty-star::before{content:"";display:block;width:64px;height:64px;margin:0 auto 16px;background:var(--line);-webkit-mask:var(--icon) center/contain no-repeat;mask:var(--icon) center/contain no-repeat;--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linejoin='round'%3E%3Cpath d='m12 3 2.8 5.7 6.2.9-4.5 4.4 1.1 6.2L12 17.3l-5.6 2.9 1.1-6.2L3 9.6l6.2-.9z'/%3E%3C/svg%3E")}
.mf-empty-title{font-size:16px;font-weight:700;color:var(--text);margin:0 0 4px}

/* 3-3 filter row: one line, always open. */
.drafts-filter{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:16px 0}
.drafts-filter p{margin:0;flex:1}
.drafts-search{display:flex;align-items:center}
.drafts-search>*{margin:0}
.drafts-search input[type=search]{margin:0;border-top-right-radius:0;border-bottom-right-radius:0}
/* Page inputs keep the 40px control height (tokens.css input rules are zero-specificity since c8a3f51d). */
.drafts-filter input:not([type=checkbox]){box-sizing:border-box;height:var(--h-ctl);min-height:var(--h-ctl)}
.drafts-table .row-rename input[name=title]:not([type=hidden]){box-sizing:border-box;height:var(--h-ctl-sm);min-height:var(--h-ctl-sm)}
.drafts-search input{width:180px;border-top-right-radius:0;border-bottom-right-radius:0}
.drafts-search .icon-button{border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}
.drafts-filter-more{position:relative}
.drafts-filter-more>summary{list-style:none;cursor:pointer;min-width:80px;background:var(--btn-bg);display:inline-flex;align-items:center;justify-content:center;gap:4px;box-sizing:border-box;height:var(--h-ctl);white-space:nowrap;padding:0 8px}
.drafts-filter-more>summary::-webkit-details-marker{display:none}
.drafts-filter-panel{position:absolute;left:0;top:calc(100% + 6px);z-index:20;display:flex;flex-direction:column;gap:12px;width:280px;padding:16px;background:#fff;border:1px solid var(--line);border-radius:var(--r-nav);box-shadow:0 8px 20px #0000001f}
.drafts-filter-panel label{display:flex;flex-direction:column;gap:4px}
.drafts-filter-panel label.inline{flex-direction:row;align-items:center;gap:8px}
.drafts-filter-panel .actions{display:flex;justify-content:flex-end;gap:8px}
.drafts-total{margin-left:auto}
/* L-5 (A06): the search, upload and make group sits on the right. */
.drafts-filter[data-draft-filters] .drafts-total{margin-left:0}
.drafts-filter[data-draft-filters] .drafts-search{margin-left:auto}
.drafts-filter .button.icon-text{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;height:var(--h-ctl);white-space:nowrap}
.drafts-filter .button-emphasis.icon-upload{min-width:150px;border-color:var(--primary-line);background:var(--primary-bg);color:var(--primary-strong)}
.drafts-create{width:144px}
.drafts-filter .drafts-search input:not([type=hidden]):not([type=checkbox]),.drafts-filter .drafts-tag-filter,.drafts-filter .drafts-tag-filter select{margin:0}
/* An icon in front of a button's words, in the words' colour. */
.icon-text{gap:4px}
.icon-text::before{content:"";flex:none;width:18px;height:18px;background:currentColor;-webkit-mask:var(--icon) center/contain no-repeat;mask:var(--icon) center/contain no-repeat}
.icon-filter{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M4 7h9M17 7h3M4 12h3M11 12h9M4 17h9M17 17h3'/%3E%3Ccircle cx='15' cy='7' r='2'/%3E%3Ccircle cx='9' cy='12' r='2'/%3E%3Ccircle cx='15' cy='17' r='2'/%3E%3C/svg%3E")}
.icon-upload{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M12 16V4M7 9l5-5 5 5M4 15v5h16v-5'/%3E%3C/svg%3E")}
.icon-plus{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v8M8 12h8'/%3E%3C/svg%3E")}
.icon-print{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M7 8V3h10v5M7 17H4V8h16v9h-3M7 14h10v7H7z'/%3E%3C/svg%3E")}
.icon-merge{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M8 4v6l4 4 4-4V4M12 14v6'/%3E%3C/svg%3E")}
.icon-book{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M4 5.5A2.5 2.5 0 0 1 6.5 3H20v18H6.5A2.5 2.5 0 0 1 4 18.5zM4 18.5A2.5 2.5 0 0 1 6.5 16H20'/%3E%3C/svg%3E")}
.icon-download{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M12 4v12M7 11l5 5 5-5M4 15v5h16v-5'/%3E%3C/svg%3E")}
.icon-trash{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M4 7h16M9 7V4h6v3M6 7l1 13h10l1-13M10 11v6M14 11v6'/%3E%3C/svg%3E")}
.icon-close{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='m6 6 12 12M18 6 6 18'/%3E%3C/svg%3E")}
.icon-button{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:40px;min-width:40px;height:40px;padding:0;border:1px solid var(--line);border-radius:var(--r-btn);background:#fff}
.icon-button::before{content:"";width:18px;height:18px;background:var(--text-sub);-webkit-mask:var(--icon) center/contain no-repeat;mask:var(--icon) center/contain no-repeat}
.icon-edit{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M4 20l1-4L16 5l3 3L8 19zM13.5 7.5l3 3'/%3E%3C/svg%3E")}
.icon-search{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E")}
.icon-preview{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M14 3H6a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V8z'/%3E%3Ccircle cx='11.5' cy='13' r='3'/%3E%3Cpath d='m14 15.5 2.5 2.5'/%3E%3C/svg%3E")}

/* 3-5 list table: 72px rows, sticky header. v3 L6: one scroll only. The list screens fill the window and stay put;
   only the table (or the bookmark list) scrolls and the page numbers stay below it. Narrow screens scroll the page. */
.drafts-table-wrap{min-height:240px;overflow:auto;border-top:1px solid var(--line)}
@media(min-width:901px){
body:has([data-drafts-screen]){height:100vh;overflow:hidden}
body:has([data-drafts-screen])>main{display:flex;flex-direction:column;min-height:0;overflow:hidden}
body:has([data-drafts-screen])>main>.drafts-screen{flex:1 1 auto;display:flex;flex-direction:column;min-height:0;margin-bottom:0}
.drafts-screen>.drafts-table-wrap,.drafts-screen>.bookmark-list{flex:1 1 auto;min-height:0;overflow:auto}
.drafts-screen>:not(.drafts-table-wrap,.bookmark-list,.drafts-skeleton){flex:none}
}
.drafts-table{width:100%;border-collapse:collapse;table-layout:fixed}
.drafts-table th{position:sticky;top:0;z-index:1;height:44px;padding:0 8px;background:#fff;border-bottom:1px solid var(--line);font-size:12px;font-weight:400;color:var(--text-muted);text-align:left}
.drafts-table td{height:72px;padding:0 8px;border-bottom:1px solid var(--line);vertical-align:middle;font-size:14px}
.drafts-table .col-check{width:40px}
.drafts-table .col-grade{width:96px;line-height:1.3}
.drafts-table .col-date,.drafts-table .col-owner{width:92px}
.drafts-table .col-icon{width:64px}
.drafts-table .col-publish{width:116px}
.drafts-table .col-more{width:52px}
/* A06: the row lines run to the card's edges and the head is 36px with no line above it. */
.drafts-table-wrap:has(>[data-drafts-table]){margin:0 -24px;border-top:0}
[data-drafts-table] th{height:36px}
[data-drafts-table] :is(th,td):first-child{padding-left:24px}
[data-drafts-table] :is(th,td):last-child{padding-right:24px}
.drafts-table[data-drafts-table] .col-check{width:64px}
.drafts-table[data-drafts-table] .col-more{width:76px}
/* A failed export's reason stays two lines in the narrow preview column (the whole sentence on hover). */
[data-drafts-table] [data-export-failure]{display:block;margin-bottom:4px;font-size:11px;line-height:1.3}
[data-drafts-table] [data-export-failure] span{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
/* L-6 (A06): only 학습지명 is left-aligned; 생성일 is 26.11.21 in grey. */
[data-drafts-table] :is(th,td):not(.col-title,:nth-child(4)){text-align:center}
[data-drafts-table] td:is(:nth-child(2),:nth-child(3),:nth-child(5),:nth-child(6)){line-height:1.5;color:var(--text-sub)}
[data-drafts-table] td .muted{color:inherit}
.drafts-table[data-drafts-table] [data-draft-more]>summary{border-color:transparent;background:transparent;color:var(--text-muted)}
[data-drafts-table] .icon-preview{width:36px;min-width:36px;height:36px;background:var(--btn-bg)}
[data-drafts-table] .icon-preview::before{background:var(--text-muted)}
.draft-title-line{display:flex;align-items:center;gap:6px;min-width:0;height:24px}
.draft-title-line>a{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px;color:var(--text);text-decoration:none}
.draft-title-line>a:hover{text-decoration:underline}
.draft-title-line form{margin:0;display:inline-flex}
.drafts-table .mf-row-menu-panel a,.drafts-table .mf-row-menu-panel button,.row-rename>summary{min-height:var(--h-ctl-sm);height:var(--h-ctl-sm);display:flex;align-items:center}
.drafts-table .draft-favorite{min-width:var(--h-ctl-sm);min-height:24px;height:24px;padding:0;border:0;background:transparent;color:var(--text-muted);font-size:16px}
.drafts-table .draft-favorite[aria-pressed=true]{color:var(--lv-4)}
.badge-new{flex:none;padding:0;background:transparent;color:var(--primary);border:0;font-size:10px;font-weight:700}
.draft-summary{margin-top:1px;line-height:24px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:700;color:var(--summary)}
.drafts-table td>[data-assign-draft]{width:100px;height:36px;min-height:36px;padding:0 6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-color:var(--line);background:var(--btn-bg);color:var(--text)}
.drafts-table td form{margin:0}
.drafts-table .mf-row-menu>summary{min-width:36px;min-height:36px;border-color:var(--line);border-radius:var(--r-btn)}
.drafts-table .mf-row-menu-panel{min-width:200px;text-align:left}
.drafts-table .mf-row-menu-panel .menu-divided{margin-top:6px;border-top:1px solid var(--line);border-radius:0}
.row-rename>summary{list-style:none;padding:0 10px;border-radius:var(--r-btn);cursor:pointer}
.row-rename>summary::-webkit-details-marker{display:none}
.row-rename form{display:flex;gap:6px;padding:4px 6px 8px}
.row-rename form input{flex:1;min-width:0}
.drafts-table .row-rename form button{width:auto;flex:none;padding:0 12px;border:1px solid var(--line);justify-content:center}
.drafts-empty{text-align:center;color:var(--text-sub)}
.trash-table .actions{display:flex;justify-content:flex-end;gap:8px;align-items:center;height:72px}

/* C-1 bulk actions: a dark bar at the bottom while rows are checked, as wide as the table (L-10). */
.drafts-screen{position:relative}
.drafts-bulkbar{position:absolute;left:24px;right:24px;bottom:24px;box-sizing:border-box;z-index:40;display:flex;align-items:center;gap:8px;min-height:56px;padding:8px 16px;border-radius:var(--r-nav);background:var(--panel-dark);color:#fff;box-shadow:0 8px 24px #0000003d}
.drafts-bulkbar[hidden]{display:none}
.drafts-bulkbar>span:first-child{margin-right:auto}
.drafts-bulkbar>span{white-space:nowrap}
.drafts-bulkbar button{display:inline-flex;align-items:center;background:transparent;border-color:transparent;color:#fff}
.drafts-bulkbar button.quiet{border-color:transparent;color:#ffffffb3}
.drafts-bulkbar>.drafts-bulk-status{margin:0;max-width:22em;white-space:normal;font-size:13px}
.drafts-bulk-status:empty{display:none}

/* A wide table scrolls sideways on a narrow screen; a wide screen keeps the sticky head (no scroll box). */
@media(max-width:900px){.table-scroll{overflow-x:auto}.table-scroll>.drafts-table{min-width:600px}}

/* Pages below the table only. */
.drafts-pager{display:flex;justify-content:center;gap:4px;padding:16px 0 0}
.drafts-pager a{display:inline-flex;align-items:center;justify-content:center;min-width:36px;height:36px;border-radius:var(--r-btn);color:var(--text-sub);text-decoration:none}
.drafts-pager a[aria-current]{border:0;background:var(--primary-bg);color:var(--primary);font-weight:700}

/* C-1 tag column and filter, stored-output preview tabs. */
.drafts-table .col-tag{width:88px}
.draft-tag{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:inherit;text-decoration:none}
.draft-tag:hover{color:var(--primary);text-decoration:underline}
.drafts-tag-filter select{box-sizing:border-box;height:var(--h-ctl);min-width:120px;max-width:180px}
[data-preview-parts]>summary.icon-button{list-style:none;cursor:pointer}
[data-preview-parts]>summary.icon-button::-webkit-details-marker{display:none}
.drafts-table .draft-preview-tabs{min-width:120px}

/* C-2 즐겨찾는 문제 tab. */
.bookmarks-head{display:flex;align-items:center;gap:12px;padding:16px 0}
.bookmarks-head p{margin:0}
.bookmarks-head .drafts-total{margin-left:0}
.bookmark-list{list-style:none;margin:0;padding:0;border-top:1px solid var(--line)}
.bookmark-row{display:flex;align-items:center;gap:16px;padding:12px 8px;border-bottom:1px solid var(--line)}
.bookmark-main{flex:1;min-width:0}
.bookmark-main p{margin:0}
.bookmark-label{font-size:14px;font-weight:500;color:var(--text)}
.bookmark-text{margin-top:4px!important;font-size:14px;color:var(--text-sub);overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.bookmark-row.is-unavailable .bookmark-label{color:var(--text-muted)}
.bookmark-date{white-space:nowrap;font-size:12px}
.bookmark-row form{margin:0}

/* C-5 card bookmark icon (STEP 2). */
.mf-card-heading .mf-bookmark{min-width:32px;min-height:32px;height:32px;padding:0 6px;border:0;background:transparent;color:var(--text-muted);font-size:18px;line-height:1}
.mf-card-heading .mf-bookmark[aria-pressed=true]{color:var(--lv-4)}

/* Toast and 맨 위로. */
.mf-toast{position:fixed;left:50%;bottom:88px;transform:translateX(-50%);z-index:60;max-width:calc(100vw - 32px);padding:10px 16px;border-radius:var(--r-nav);background:var(--panel-dark);color:#fff;font-size:14px;box-shadow:0 8px 24px #0000003d}
.mf-toast a{color:#fff;font-weight:700;margin-left:8px}
.mf-to-top{position:fixed;right:24px;bottom:24px;z-index:35;width:44px;height:44px;padding:0;border:1px solid var(--line);border-radius:50%;background:#fff;color:var(--text-sub);font-size:18px;box-shadow:0 4px 12px #0000001f}
.mf-to-top[hidden]{display:none}

/* v3 L5: no output yet - a grey icon that goes nowhere. */
.icon-button.is-disabled{cursor:default;border-color:var(--line);background:var(--btn-bg,#f4f5f7)}
.icon-button.is-disabled::before{background:var(--text-muted)}

/* L-8/N22: a draft without an output shows its real first page on hover and opens the full PDF in a new tab on click. */
.icon-preview[data-first-page]{cursor:pointer;overflow:hidden}
.icon-button.has-thumb{background:#fff;vertical-align:middle}
.icon-button.has-thumb::before{content:none}
.icon-button.has-thumb.is-unconfirmed::before{content:""}.has-thumb.is-unconfirmed .first-page-thumb{display:none}
.first-page-thumb{display:block;width:100%;height:100%;object-fit:cover;object-position:top}
.first-page-pop{position:fixed;z-index:60;width:380px;max-height:calc(100vh - 16px);overflow:hidden;padding:8px;box-sizing:border-box;background:#fff;border:1px solid var(--line);border-radius:var(--r-nav);box-shadow:0 8px 24px #0000003d;pointer-events:none}
.first-page-pop[hidden]{display:none}
.first-page-pop img{display:block;width:100%;height:auto}
.first-page-dialog{width:min(760px,calc(100vw - 32px));max-height:calc(100vh - 32px);padding:0;border:0;border-radius:var(--r-card);overflow:hidden auto}
.first-page-dialog::backdrop{background:#0006}
.first-page-dialog>header{position:sticky;top:0;display:flex;align-items:center;gap:8px;min-height:0;padding:12px 24px;background:#fff;border-bottom:1px solid var(--line)}
.first-page-dialog h2{flex:1;min-width:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:16px}
.first-page-dialog [data-first-page-close]{display:inline-flex;align-items:center;justify-content:center;width:40px;min-width:40px;height:40px;padding:0}
.first-page-dialog>p{margin:0;padding:24px;text-align:center;color:var(--text-sub)}
.first-page-dialog>.first-page-note{padding:8px 24px 16px;font-size:12px}
.first-page-dialog>p[hidden]{display:none}
.first-page-dialog img{display:block;width:100%;height:auto}
.first-page-dialog img[hidden]{display:none}

/* v3 L8: [전체|초|중|고] segment and the 학습지 유형 chips in the filter pop-over. */
.drafts-level{display:inline-flex;gap:8px;padding-right:12px;margin-right:4px;border-right:1px solid var(--line)}
.drafts-level a{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:38px;height:var(--h-ctl);padding:0 11px;border:1px solid var(--line);border-radius:var(--r-btn);font-size:14px;color:var(--text-sub);text-decoration:none}
.drafts-level .is-off{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:38px;height:var(--h-ctl);padding:0 11px;border:1px solid var(--line);border-radius:var(--r-btn);font-size:14px;color:#C2C2C2}
.drafts-level a[aria-current]{border-color:var(--primary-line);background:var(--primary-bg);color:var(--primary)}
/* wb5: 정렬 (생성순 | 이름순) above the list, on the right. */
.drafts-sort{display:flex;justify-content:flex-end;gap:12px;margin:8px 0 4px;font-size:14px}
.drafts-sort a{color:var(--text-sub);text-decoration:none}
.drafts-sort a+a{padding-left:12px;border-left:1px solid var(--line)}
.drafts-sort a[aria-current]{color:var(--text);font-weight:700}
.drafts-filter-panel{width:360px;max-width:calc(100vw - 48px);box-sizing:border-box}
.drafts-kinds{display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:0;border:0}
.drafts-kinds legend{margin-bottom:6px;padding:0;font-size:12px;color:var(--text-sub)}
/* L-9: the creation period and on/off switches. */
.drafts-period{display:flex;align-items:center;gap:6px;margin:0;padding:0;border:0}
.drafts-period legend{margin-bottom:6px;padding:0;font-size:12px;color:var(--text-sub)}
.drafts-filter .drafts-period input:not([type=checkbox]){flex:1;min-width:0;margin:0;padding:0 6px}
.drafts-filter-panel label.drafts-toggle{font-weight:400;flex-direction:row;align-items:center;justify-content:space-between;min-height:32px;cursor:pointer}
.drafts-filter-panel .drafts-toggle input[type=checkbox]{appearance:none;position:relative;flex:none;width:36px;height:20px;min-height:0;margin:0;border:0;border-radius:10px;background:#D6D6D6;cursor:pointer;transition:background .15s}
.drafts-filter-panel .drafts-toggle input::after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;transition:left .15s}
.drafts-filter-panel .drafts-toggle input[type=checkbox]:checked{background:var(--primary)}
.drafts-filter-panel .drafts-toggle input:checked::after{left:18px}
.drafts-toggle input:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.drafts-filter-panel .mf-chip{position:relative;display:inline-flex;flex-direction:row;gap:0}
.mf-chip input{position:absolute;opacity:0;width:1px;height:1px}
.mf-chip span{display:inline-flex;align-items:center;height:32px;padding:0 12px;border:1px solid var(--line);border-radius:999px;font-size:13px;color:var(--text-sub);cursor:pointer}
.mf-chip input:checked+span{border-color:var(--primary);background:var(--primary-tint);color:var(--primary);font-weight:700}
.mf-chip input:focus-visible+span{outline:2px solid var(--primary);outline-offset:2px}

/* v3 A4: ⋮ '출력 파일 받기' opens the stored files in place. */
.row-files>summary{list-style:none;padding:0 10px;border-radius:var(--r-btn);cursor:pointer;min-height:var(--h-ctl-sm);display:flex;align-items:center}
.row-files>summary::-webkit-details-marker{display:none}
.row-files>div{display:flex;flex-direction:column;padding:0 0 4px 12px}
.drafts-table .row-files a{min-height:var(--h-ctl-sm);height:var(--h-ctl-sm);display:flex;align-items:center;padding:0 10px}

/* v3 2-2: a tab switch slower than 0.3 seconds shows five skeleton rows in the body. */
.drafts-screen>[hidden]{display:none!important}
.drafts-skeleton{flex:1 1 auto;padding:16px 0;border-top:1px solid var(--line)}
.drafts-skeleton-row{height:40px;margin:16px 0;border-radius:var(--r-btn);background:linear-gradient(90deg,var(--line) 25%,#f6f7f9 50%,var(--line) 75%);background-size:200% 100%;animation:drafts-skeleton 1.2s linear infinite}
@keyframes drafts-skeleton{from{background-position:200% 0}to{background-position:-200% 0}}
@media(prefers-reduced-motion:reduce){.drafts-skeleton-row{animation:none}}

/* A-3 출력 이력: one page of 20 in a table; the download menu lists the stored files. */
.jobs-screen{padding-top:20px}
.jobs-screen h1{margin:0 0 4px;font-size:20px}
.jobs-screen .drafts-search{margin-left:auto}
.jobs-table-wrap{border-top:1px solid var(--line)}
.jobs-table{min-width:852px}
.jobs-table .col-when{width:156px}
.jobs-table .col-author{width:92px}
.jobs-table .col-count{width:72px}
.jobs-table .col-format{width:104px}
.jobs-table .col-state{width:124px}
.jobs-table .col-files{width:124px}
.jobs-table :is(th,td){color:var(--text-sub)}
.jobs-table td:not(.col-title){text-align:center}
.jobs-table th:not(:nth-child(2)){text-align:center}
.jobs-table td{height:56px}
.jobs-table .col-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.jobs-table .col-title a{font-size:15px;color:var(--text);text-decoration:none}
.jobs-table .col-title a:hover{text-decoration:underline}
.jobs-table .mf-row-menu>summary{padding:0 10px;font-size:13px;white-space:nowrap;cursor:pointer;background:var(--btn-bg)}
.jobs-table .mf-row-menu-panel{text-align:left}
/* A narrow screen scrolls the table sideways; an open menu gets room below it so it is not cut. */
@media(max-width:900px){.jobs-table-wrap{overflow-x:auto}.jobs-table-wrap:has(details[open]){padding-bottom:300px}}

@media(max-width:900px){body:has(>aside.lnb){display:block}.lnb{display:none}body:has(>aside.lnb)>main{padding:12px}body>header.gnb{padding:0 12px;gap:8px}body>header.gnb nav>a{padding:12px 8px;font-size:16px}body>header.gnb .brand small{display:none}.drafts-table .col-grade,.drafts-table .col-owner,.drafts-table .col-date,.drafts-table .col-tag,[data-drafts-table] td:is(:nth-child(2),:nth-child(3),:nth-child(5),:nth-child(6)){display:none}.drafts-bulkbar{position:fixed;left:12px;right:12px;bottom:12px;flex-wrap:wrap}.drafts-filter[data-draft-filters] .drafts-search{flex:1 1 100%;margin-left:0}.drafts-search input{flex:1;width:auto;min-width:0}}
/* Two groups of one list as links: the list itself and the part that cannot be used yet. */
.list-states{display:flex;gap:16px;margin:4px 0 8px;font-size:13px}.list-states a{color:var(--text-sub,#707070);text-decoration:none}.list-states a[aria-current]{color:var(--text,#333);font-weight:700}
.shared-sources-table .col-material{width:200px;white-space:nowrap}.shared-sources-table td.col-material .button{margin-right:8px}

/* tokens.css */
/* Teacher design tokens (UI brief stage 1, 2026-11-19). The only :root palette for teacher screens.
   Loaded after every other teacher stylesheet. The web UI @font-face lives in base.html (versioned asset URLs).
   Weights are 400, 500 and 700 only. Problem bodies keep their previous font (--font-problem). */
:root{
  --font: "MathDB UI Sans", system-ui, sans-serif;

  /* 글자색 */
  --text: #333333;
  --text-sub: #707070;
  --text-muted: #959595;
  --summary: #CA8A04; /* A06: the list's summary line under a worksheet title */

  /* 주요색: 모든 화면에서 이 값 하나만 사용 */
  --primary: #00ABFF;
  --primary-strong: #008DEB;
  --primary-bg: #ECF9FE;
  --primary-line: #A0E1FD;
  --primary-line-strong: #54C9FF;
  --primary-tint: #CFEFFC;

  /* 선·배경 */
  --line: #E0E0E0;
  --btn-bg: #FAFAFA;
  --page: #F5F5F5;
  --panel-dark: #333333;
  --card-line: #EBEBEB;

  /* 난이도 색 */
  --lv-1: #9E9E9E;
  --lv-2: #00ABFF;
  --lv-3: #4CC3B0;
  --lv-4: #FFB830;
  --lv-5: #F5515F;

  /* STEP 2 실측 (SPEC 2026-11-21 3-4, 3-13): card chip text and 단원 요약 bar colours differ on purpose. */
  --chip-lv-1: #959595;
  --chip-lv-2: #00ABFF;
  --chip-lv-3: #14B8A6;
  --chip-lv-4: #FDBA74;
  --chip-lv-5: #EF4444;
  --bar-lv-1: #9E9E9E;
  --bar-lv-2: #00ABFF;
  --bar-lv-3: #54C0B1;
  --bar-lv-4: #FFB930;
  --bar-lv-5: #FD5354;
  --step-mint: #54C0B1;

  /* 크기 */
  --r-btn: 4px;
  --r-nav: 8px;
  --r-card: 12px;
  --h-ctl: 40px;
  --h-ctl-sm: 36px;

  /* 문제 본문(수식 렌더링 영역)은 이번 단계에서 글꼴을 바꾸지 않는다. */
  --font-problem: "Noto Sans CJK KR", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;

  /* Older names still used by page stylesheets. */
  --ink: var(--text);
  --muted: var(--text-sub);
  --accent: var(--primary);
  --accent-workspace: var(--primary);
  --green: var(--primary);
  --edit-accent: var(--primary);
  --paper: var(--page);
  --line-control: var(--line);
  --radius-control: var(--r-btn);
  --radius-panel: var(--r-card);
}
body{font:400 14px/1.5 var(--font);color:var(--text);background:var(--page)}
[hidden]{display:none!important}

/* Problem bodies keep the family, size and leading they inherited from the old body rule (15px/1.65).
   Only the outermost problem container is set, with zero specificity, so every page rule still wins. */
:where(.question-body,.question-text,.preview):not(:where(.question-body,.question-text,.preview,.mf-question-sheet) *){font-family:var(--font-problem);font-size:15px;line-height:1.65}

/* 1-3 굵기: 제목·선택된 탭·선택된 메뉴만 700. teacher.css is a renderer-hash input, so its 600/650/750/800/850 are overridden here. */
h1,h2,h3{font-weight:700}
label{font-weight:500}
.brand{font-weight:700}
.eyebrow{font-weight:500}
nav [aria-current],.worksheet-steps .active{font-weight:700}
.export-bar [data-save-status]{font-weight:500}

/* 1-4 버튼: 보조 버튼이 기본, .primary가 주요 버튼. */
button,.button{box-sizing:border-box;min-height:var(--h-ctl);padding:0 16px;border:1px solid var(--line);border-radius:var(--r-btn);background:var(--btn-bg);color:var(--text);font:400 14px/1.4 var(--font)}
a.button{display:inline-flex;align-items:center;justify-content:center}
.primary,button.primary,.button.primary{background:var(--primary);border-color:var(--primary);color:#fff;font-weight:400}
.button-emphasis{background:var(--primary-bg);border-color:var(--primary-line-strong);color:var(--primary-strong)}
.quiet,button.quiet,.button.quiet{background:transparent;border-color:transparent;color:var(--text-sub)}
tr button,tr .button{min-height:var(--h-ctl-sm)}

/* 세그먼트·알약 칩: 비선택은 흰 배경, 선택은 --primary-bg. */
button[aria-pressed=false]:not(.draft-favorite,.primary){background:#fff;border-color:var(--line);color:var(--text-sub)}
button[aria-pressed=true]:not(.draft-favorite,.primary){background:var(--primary-bg);border-color:var(--primary-line);color:var(--primary)}
.filter-chip{display:inline-flex;align-items:center;box-sizing:border-box;min-height:var(--h-ctl);padding:0 16px;border:1px solid var(--line);border-radius:20px;background:#fff;color:var(--text-sub)}
.filter-chip[aria-pressed=true],.filter-chip[aria-current]{background:var(--primary-bg);border-color:var(--primary-line);color:var(--primary)}
.filter-chip[aria-disabled=true]{color:var(--text-muted)}

/* 입력칸·선택칸: zero specificity so page input rules keep their padding/font; the base border/radius/padding
   at teacher.css specificity is set in mathflat.css, which loads before page stylesheets. */
:where(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=range]):not([type=color]),select){box-sizing:border-box;height:var(--h-ctl);min-height:var(--h-ctl);padding:0 12px;border:1px solid var(--line);border-radius:var(--r-btn);background-color:#fff;color:var(--text);font:400 14px/1.4 var(--font)}
:where(tr input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=range]):not([type=color]),tr select){height:var(--h-ctl-sm);min-height:var(--h-ctl-sm)}
textarea{border-color:var(--line);border-radius:var(--r-btn);font-weight:400}
input[type=checkbox]{width:20px;height:20px;border-radius:4px;accent-color:var(--primary)}
input[type=radio]{accent-color:var(--primary)}

/* 하위 탭 */
.selection-tabs a,.mf-summary-tabs>*,.assignment-tabs>*,.pdf-review-tabs>*{font-size:16px;font-weight:400;color:var(--text-muted)}
.selection-tabs a[aria-current],.mf-summary-tabs>[aria-current],.assignment-tabs>[aria-current],.assignment-tabs>[aria-selected=true],.pdf-review-tabs>[aria-current]{font-weight:700;color:var(--text);border-bottom:2px solid #000}

/* 카드 */
.panel,.question-card{background:#fff;border:1px solid var(--card-line);border-radius:var(--r-card);box-shadow:none}

/* 작은 배지 */
.badge{min-height:18px;padding:0 6px;border-radius:3px;font-size:11px;font-weight:700;line-height:1.3}
.badge:not(summary){display:inline-flex;align-items:center}

