*{box-sizing:border-box}:root{--ink:#263b36;--muted:#6f7f79;--brand:#315f55;--brand-soft:#e8f1ee;--paper:#fff;--line:#dce5e1;--warm:#f7f4ed;--accent:#c98158}body{margin:0;background:var(--warm);color:var(--ink);font:16px/1.55 system-ui,-apple-system,"PingFang SC",sans-serif}.nav{position:fixed;inset:0 auto 0 0;width:220px;background:#284c45;color:#fff;padding:26px 18px;display:flex;flex-direction:column;gap:7px}.nav h1{margin:0 10px 24px}.nav button{color:#fff;background:transparent;border:0;text-align:left;padding:12px 14px;border-radius:11px;font:inherit;cursor:pointer}.nav button:hover,.nav button.active{background:#ffffff1d}.nav span{opacity:.8}main{margin-left:220px;padding:28px;max-width:1440px}.page,#connection-card{background:var(--paper);padding:28px;border-radius:20px;box-shadow:0 10px 34px #29453d10;min-height:calc(100vh - 56px)}#connection-card{max-width:520px;min-height:0;margin:8vh auto}.page-head{display:flex;align-items:start;justify-content:space-between;margin-bottom:24px}.page-head small{color:var(--accent);font-weight:700}.page h2{font-size:28px;margin:3px 0}.page p{color:var(--muted)}button,input,select,textarea{font:inherit;border:1px solid #bdcbc6;border-radius:10px;padding:10px 12px;background:#fff;color:var(--ink)}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}input,select,textarea{width:100%;margin-top:5px}textarea{min-height:76px;resize:vertical}label{display:block;margin:13px 0}.primary{display:block;margin:24px 0 0 auto;min-width:210px;border:0;background:var(--brand);color:white;font-weight:750;padding:13px 18px;box-shadow:0 5px 14px #315f5530}.home-grid{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr));gap:16px}.home-grid button{text-align:left;padding:22px;border:1px solid var(--line);background:#fbfcfb;min-height:120px}.home-grid strong,.home-grid span{display:block}.home-grid strong{font-size:19px;margin-bottom:8px}.home-grid span{color:var(--muted)}.drop-zone{display:grid;place-items:center;text-align:center;min-height:180px;border:2px dashed #9bb4ac;border-radius:18px;background:#f7fbf9;cursor:pointer}.drop-zone.dragging{border-color:var(--accent);background:#fff8f3}.drop-zone input{width:auto;max-width:100%;border:0}.drop-zone+div span{display:inline-block;padding:5px 10px;margin:6px;background:var(--brand-soft);border-radius:999px}.progress-card{background:#f7faf9;border:1px solid var(--line);padding:17px;border-radius:14px;margin-top:18px}.meter{height:8px;border-radius:99px;background:#dfe8e5;overflow:hidden}.meter i{display:block;height:100%;background:var(--brand)}.cost{color:var(--ink)!important;font-weight:650}.chips{display:flex;gap:8px;flex-wrap:wrap;margin:15px 0}.chips button{background:#f5f8f7}.split-layout{display:grid;grid-template-columns:280px 1fr;gap:20px;min-height:580px}.item-list{border-right:1px solid var(--line);padding-right:16px}.item-list button{display:block;width:100%;margin-bottom:9px;text-align:left}.item-list strong,.item-list span,.item-list em{display:block}.item-list span{color:var(--muted)}.item-list em{color:var(--accent);font-style:normal}.editor{display:grid;grid-template-columns:minmax(260px,.9fr) minmax(340px,1.1fr);gap:20px}.editor.empty,.redraw-grid.empty{display:grid;place-items:center;color:var(--muted)}.source-card img,.redraw-grid img{display:block;width:100%;max-height:650px;object-fit:contain;background:#f4f4f1;border-radius:14px}.source-card button,.link-button{border:0;background:transparent;color:var(--brand);padding-left:0}.inline{display:grid;grid-template-columns:1fr 1fr;gap:12px}.advice{background:#fff7ee;border:1px solid #f1d0b7;border-radius:13px;padding:14px;margin-top:14px}.secondary{display:inline-block;text-decoration:none;color:var(--brand);border:1px solid var(--brand);padding:8px 12px;border-radius:9px}.redraw-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;min-height:480px}.redraw-grid figure{margin:0;border:1px solid var(--line);border-radius:14px;padding:14px}.redraw-grid figcaption{font-weight:700;margin-bottom:10px}.draft-placeholder,.blocked{display:grid;place-items:center;text-align:center;height:420px;background:#f6f7f5;border-radius:12px;color:var(--muted)}.scheme-choices{display:flex;gap:12px;margin:18px 0}.scheme{width:170px;height:86px;background:#f7faf9}.scheme strong,.scheme small{display:block}.scheme small,.quiet{color:var(--muted)}.scheme.selected{outline:3px solid #79a697}.asset-choices{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0;padding:12px;background:#f7faf9;border-radius:12px}.asset-choices button{display:flex;align-items:center;gap:8px}.asset-choices img{width:48px;height:48px;object-fit:contain}.asset-choices .selected{outline:3px solid #79a697}.secondary-actions{display:flex;gap:10px}.filters{display:grid;grid-template-columns:2fr repeat(4,1fr);gap:8px}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin-top:18px}.cards article,.question{border:1px solid var(--line);border-radius:13px;padding:15px}.question small{display:block;margin-left:28px;color:var(--muted)}.ready-card{display:flex;align-items:center;justify-content:space-between;background:#edf6f2;border:1px solid #b9d5cc;border-radius:14px;padding:16px;margin:12px 0}.ready-card .primary{margin:0}.ready-card p{margin:3px 0}.blocked>div{max-width:420px}#message{min-height:34px;padding:5px 10px;color:#a44b2e;font-weight:650}dialog{border:0;border-radius:18px;box-shadow:0 24px 80px #233b3480;max-width:520px}.dialog-actions{display:flex;gap:10px;margin:20px 0}@media(max-width:900px){.nav{position:static;width:auto;height:auto;flex-direction:row;flex-wrap:wrap}.nav h1{width:100%;margin:0}main{margin:0;padding:14px}.home-grid{grid-template-columns:1fr 1fr}.split-layout,.editor,.redraw-grid{grid-template-columns:1fr}.item-list{border-right:0;border-bottom:1px solid var(--line)}.filters{grid-template-columns:1fr 1fr}}

.source-tag{display:inline-block;margin:4px 0!important;padding:3px 9px;border-radius:999px;background:#eee5fc;color:#5c3b91!important;font-size:13px;font-weight:700}.card-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.card-actions .secondary{padding:9px 12px}.danger{border-color:#b34242;color:#9f3030;background:#fff7f7}.library-dialog-head{display:flex;justify-content:space-between;align-items:center;gap:20px}.library-dialog-head h2{margin:0}#library-preview-dialog{width:min(860px,92vw);max-width:860px}#library-preview-image{display:block;width:100%;max-height:72vh;object-fit:contain;margin-top:16px;border-radius:12px;background:#f4f1f7}.delete-warning{color:#9f3030;font-weight:650}
.version-status{margin:5px 0!important;font-size:14px}.clean-upload{margin:0;cursor:pointer}.clean-upload input{display:none}
.variant-switch{display:flex;gap:7px;margin:14px 0;padding:5px;background:#eee5fc;border-radius:11px}.variant-switch button{flex:1;border:0;background:transparent}.variant-switch button.active{background:#704c9f;color:#fff}#library-preview-status{min-height:24px;margin:6px 0;color:#9f3030;font-weight:650}@media(max-width:560px){#library-preview-dialog{width:94vw}.library-dialog-head{gap:10px}#library-preview-image{max-height:62vh}}
.library-preview-copy{margin:14px 0;padding:13px 16px;border-radius:12px;background:#f7f3fb}.library-preview-copy p{margin:4px 0}.library-preview-copy #library-preview-meta{font-weight:700;color:#30463f}.library-preview-copy #library-preview-description{color:#61736d}.dialog-actions{flex-wrap:wrap}
.library-card-preview{display:block;width:100%;padding:8px;margin:12px 0;border:1px solid var(--line);background:#f8f8f5;border-radius:12px}.library-card-preview:hover,.library-card-preview:focus-visible{border-color:var(--brand);box-shadow:0 0 0 2px #315f5520}.library-card-preview img{display:block;width:100%;height:300px;object-fit:contain;background:#fff;border-radius:8px}
.bulk-batch-picker{min-width:260px;margin:0}.bulk-layout{display:grid;grid-template-columns:minmax(520px,1fr) 340px;gap:22px}.bulk-left{min-width:0}.bulk-toolbar{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;background:#f5f8f7;border-radius:12px;margin-bottom:12px}.bulk-toolbar label,.bulk-default-choice{display:flex;align-items:center;gap:8px;margin:0}.bulk-toolbar input,.bulk-default-choice input,.bulk-item input{width:auto;margin:0}.bulk-list{display:grid;gap:10px;max-height:calc(100vh - 250px);overflow:auto;padding-right:5px}.bulk-item{display:grid;grid-template-columns:auto 96px 1fr auto;align-items:center;gap:13px;border:1px solid var(--line);border-radius:13px;padding:11px;background:#fff}.bulk-item.selected{border-color:#7ea99c;background:#f5faf8}.bulk-preview-trigger{width:96px;height:82px;min-height:0;padding:0;border:0;border-radius:9px;background:#f4f4f1;overflow:hidden;cursor:zoom-in}.bulk-preview-trigger:hover,.bulk-preview-trigger:focus-visible{box-shadow:0 0 0 3px #315f5530}.bulk-item img{width:96px;height:82px;object-fit:contain;background:#f4f4f1;border-radius:9px}.bulk-item strong,.bulk-item small{display:block}.bulk-item small{color:var(--muted);margin-top:4px}.bulk-item button{white-space:nowrap}.bulk-panel{align-self:start;position:sticky;top:20px;border:1px solid var(--line);border-radius:15px;padding:17px;background:#fbfcfb}.bulk-panel h3{margin:0}.bulk-panel .primary{width:100%;margin-top:16px}.bulk-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:9px}.bulk-result{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}.bulk-result strong{display:block}.bulk-result ul{max-height:170px;overflow:auto;padding-left:20px;color:#9f3030}#bulk-preview-dialog{width:min(960px,94vw);max-width:960px}#bulk-preview-image{display:block;width:100%;max-height:80vh;object-fit:contain;margin-top:12px;border-radius:12px;background:#f4f4f1}#bulk-preview-status{min-height:24px;color:#a44b2e}@media(max-width:1050px){.bulk-layout{grid-template-columns:1fr}.bulk-panel{position:static}.bulk-list{max-height:none}}@media(max-width:620px){.bulk-item{grid-template-columns:auto 70px 1fr}.bulk-preview-trigger,.bulk-item img{width:70px;height:64px}.bulk-item>button[data-bulk-edit]{grid-column:2/4}.bulk-batch-picker{min-width:0;width:100%}}
#upload-batch-items{margin-top:18px}#upload-batch-items h3{margin:0 0 10px}.upload-batch-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px;max-height:360px;overflow:auto}.upload-batch-item{display:grid;grid-template-columns:78px 1fr;align-items:center;gap:11px;text-align:left;padding:9px;background:#fff;border:1px solid var(--line)}.upload-batch-item img{width:78px;height:68px;object-fit:contain;background:#f4f4f1;border-radius:8px}.upload-batch-item strong,.upload-batch-item small,.upload-batch-item em{display:block}.upload-batch-item small{margin-top:4px;color:var(--muted)}.upload-batch-item em{margin-top:5px;color:#a44b2e;font-size:13px;font-style:normal}.batch-group{margin:12px 0;padding:12px;border:1px solid var(--line);border-radius:12px;background:#fbfcfb}.batch-group h3{display:flex;justify-content:space-between;margin:0 0 8px}.batch-group h3 span{color:var(--muted);font-size:14px}.batch-group button{display:flex;justify-content:space-between;align-items:center;width:100%;margin:6px 0;text-align:left}.batch-group button small{margin-left:12px;color:var(--muted)}.batch-history summary{font-weight:750;cursor:pointer}
.bulk-panel-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.bulk-panel-head button{padding:8px 10px}.bulk-new-type{padding:12px;border:1px dashed var(--line);border-radius:10px;background:#f5f8f7}.bulk-new-type p{margin:0 0 8px}.bulk-new-type input,.bulk-new-type select{margin-bottom:8px}.bulk-new-type button{width:100%}[hidden]{display:none!important}
.bulk-abilities{margin:13px 0;border:1px solid var(--line);border-radius:10px;padding:10px 12px}.bulk-abilities legend{padding:0 5px}.bulk-abilities label{display:flex;align-items:center;gap:8px;margin:7px 0}.bulk-abilities input{width:auto;margin:0}.bulk-abilities input:disabled+span{color:var(--muted)}.bulk-new-ability{display:grid;grid-template-columns:1fr auto;gap:8px}.bulk-new-ability input{margin:0}.bulk-new-ability button{white-space:nowrap}.bulk-new-ability small,.bulk-new-type small{grid-column:1/-1;color:var(--muted)}
.intake-mode{border:1px solid #d5e0dc;border-radius:16px;padding:14px;margin:14px 0;display:grid;gap:10px}.intake-mode label{display:grid;grid-template-columns:auto 1fr;column-gap:8px;align-items:start;margin:4px 0}.intake-mode label span{grid-column:2;color:#667b74;font-size:14px}.intake-mode input{width:auto;margin-top:5px}
.upload-feedback{min-height:26px;margin:14px 0 0!important;color:var(--brand)!important;font-weight:700}.upload-feedback:not(:empty){padding:10px 12px;border-radius:10px;background:var(--brand-soft)}
.review-toolbar{display:flex;align-items:center;gap:14px;padding:11px 14px;margin-bottom:12px;background:#f5f8f7;border-radius:12px}.review-toolbar label{display:flex;align-items:center;gap:8px;margin:0}.review-toolbar input,.review-row>input{width:auto;margin:0}.review-toolbar strong{margin-left:auto}.review-row{display:grid;grid-template-columns:auto 1fr;align-items:start;gap:8px;margin-bottom:9px;padding:8px;border:1px solid var(--line);border-radius:12px}.review-row.selected{border-color:#7ea99c;background:#f5faf8}.review-row>input{margin-top:13px}.review-row button{display:grid;grid-template-columns:92px minmax(0,1fr);align-items:center;gap:12px;margin:0;border:0}.review-row button:hover{background:#edf5f2}.review-thumb{display:block;width:92px;height:82px;object-fit:contain;background:#f4f4f1;border-radius:9px}.review-copy{min-width:0;text-align:left}.review-copy small{display:block;color:var(--muted)}#review-bulk-result{margin-bottom:14px}@media(max-width:620px){.review-toolbar{flex-wrap:wrap}.review-toolbar strong{margin-left:0}.review-toolbar button{margin-left:auto}.review-row button{grid-template-columns:72px minmax(0,1fr)}.review-thumb{width:72px;height:66px}}
.review-adjust-panel{margin:0 0 16px;padding:16px;border:1px solid var(--line);border-radius:14px;background:#fbfcfb}.review-adjust-panel h3,.review-adjust-panel p{margin:0 0 8px}.review-adjust-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.review-adjust-grid label{margin:5px 0}.review-adjust-panel>button{display:block;margin-left:auto}.review-adjust-panel .bulk-abilities label{display:flex;align-items:center;gap:8px}.review-adjust-panel .bulk-abilities input{width:auto;margin:0}@media(max-width:900px){.review-adjust-grid{grid-template-columns:1fr 1fr}}@media(max-width:560px){.review-adjust-grid{grid-template-columns:1fr}}
.rule-reuse{margin:14px 0;padding:14px;border:1px solid var(--line);border-radius:12px;background:#f5f8f7;min-width:0}.rule-reuse label{margin:0}.rule-reuse small{display:block;margin-top:8px;color:var(--muted)}.rule-reuse-preview{white-space:pre-wrap;overflow-wrap:anywhere}.rule-reuse select{max-width:100%}
#library-classification-dialog{width:min(540px,94vw);max-height:90vh;overflow:auto}#library-classification-extras{max-height:180px;overflow:auto}#library-classification-error{color:#a44b2e;min-height:24px}#save-library-classification{background:var(--brand);color:#fff;border-color:var(--brand)}
.student-toolbar{display:flex;align-items:end;gap:14px;margin-bottom:20px}.student-toolbar label{flex:1;margin:0}.student-toolbar button{white-space:nowrap}#student-profile-fields{border:1px solid var(--line);border-radius:14px;padding:18px}#student-profile-fields h3{margin:8px 0}.student-basic,.student-ability-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 18px}.student-age{display:flex;flex-direction:column;justify-content:center;gap:9px;padding:13px 0}.student-age strong{color:var(--brand)}.student-actions{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin:15px 0}.student-actions .primary{margin:0}#student-profile-status{min-height:24px;color:#a44b2e}#student-history-panel,#student-training-panel{border:1px solid var(--line);border-radius:14px;padding:18px;margin-top:22px}.student-history-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.student-history-head h3,.student-history-head p{margin:0}.student-training-ability>h3{margin:20px 0 8px}.student-training-type{padding:14px;border:1px solid var(--line);border-radius:12px;margin:10px 0}.student-training-type-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.student-training-type-head h4{margin:0}.student-training-type-head small{display:block;color:var(--muted);margin-top:4px}#student-profile-history article+article{border-top:1px solid var(--line);padding-top:12px}#student-profile-history h4{margin-bottom:4px}#student-profile-history p{font-size:14px;margin:4px 0}#student-profile-history ul{padding-left:22px;overflow-wrap:anywhere}@media(max-width:700px){.student-basic,.student-ability-grid{grid-template-columns:1fr 1fr}.student-toolbar{align-items:stretch;flex-direction:column}.student-actions{flex-wrap:wrap}.student-training-type-head{align-items:flex-start;flex-direction:column}}@media(max-width:420px){.student-basic,.student-ability-grid{grid-template-columns:1fr}}

.type-rule-abilities{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:16px 0}.type-rule-abilities label{display:flex;align-items:center;gap:6px}.type-rule-abilities input{width:auto}#type-rule-dialog{max-width:640px}#type-rule-fields{border:0;padding:0}#type-rule-status{color:#785224}@media(max-width:650px){.type-rule-abilities{grid-template-columns:repeat(2,minmax(0,1fr))}}
.plan-focus-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:18px}.plan-focus-grid fieldset{border:1px solid var(--line);border-radius:14px;padding:16px}.plan-focus-grid legend{font-size:20px;font-weight:750;padding:0 8px}.plan-focus-grid p{margin:0 0 10px}.plan-ability-options{display:flex;flex-wrap:wrap;gap:8px}.plan-ability-options label{display:flex;align-items:center;gap:7px;margin:0;padding:8px 11px;border:1px solid #bdcbc6;border-radius:999px;background:#fff}.plan-ability-options input{width:auto;margin:0}.plan-ability-options label:has(input:checked){background:var(--brand);border-color:var(--brand);color:#fff}.plan-question-head{display:flex;justify-content:space-between;align-items:end;gap:16px;margin-top:18px}.plan-question-head h3,.plan-question-head p{margin:0}.plan-type-list{display:flex;flex-wrap:wrap;gap:9px;margin-top:12px}.plan-type-list span{padding:8px 12px;border-radius:999px;background:var(--brand-soft);color:var(--brand)}.plan-type-list span.secondary-focus{background:#fff1e5;color:#9a6037}.plan-focus-badge{float:right;padding:2px 8px;border-radius:999px;background:var(--brand-soft);color:var(--brand);font-size:13px}.plan-focus-badge.secondary-focus{background:#fff1e5;color:#9a6037}.plan-source-badge{display:inline-block;width:max-content;margin-top:8px;padding:3px 8px;border-radius:999px;background:#eef3ff;color:#315f9c;font-size:13px}#plan-focus-status,#plan-question-status,#plan-question-edit-status{min-height:24px;color:#a44b2e}#plan-question-editor{margin-top:18px}#plan-question-editor h3,#plan-question-editor p{margin-top:0}.plan-question-filter{max-width:480px}.plan-edit-card>label{margin:0}.plan-edit-card>button,.plan-preview-card>button{margin-top:10px}#plan-question-preview-dialog{width:min(900px,92vw);max-width:900px}#plan-question-preview-image{display:block;width:100%;max-height:78vh;object-fit:contain;margin-top:16px;border-radius:12px;background:#f4f1f7}#plan-question-preview-status{min-height:24px;color:#a44b2e}@media(max-width:760px){.plan-focus-grid{grid-template-columns:1fr}.plan-question-head{align-items:start;flex-direction:column}#plan-question-preview-dialog{width:94vw}#plan-question-preview-image{max-height:68vh}}
.plan-generation-offer{margin:12px 0 18px;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--brand-soft)}.plan-generation-offer p{margin:6px 0 12px}
.generator-page{padding:20px}.generator-page .page-head{margin-bottom:14px}#generation-workbench{display:block;width:100%;min-height:calc(100vh - 155px);border:0;border-radius:14px;background:#fff}
.pending-training-section{margin-top:28px}.pending-training-plan{margin:14px 0;padding:16px;border:1px solid var(--line);border-radius:14px;background:#fbfcfb}.pending-training-plan header strong,.pending-training-plan header small,.pending-training-item strong,.pending-training-item small{display:block}.pending-training-plan header small,.pending-training-item small{color:var(--muted);margin-top:4px}.pending-training-items{margin-top:12px}.pending-training-item{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:12px 0;border-top:1px solid var(--line)}.pending-training-item.recorded{opacity:.7}.pending-training-item>span{color:var(--brand)}#training-item-record-dialog{width:min(620px,94vw);max-height:90vh;overflow:auto}#training-item-record-form{margin:0}#training-item-record-status{min-height:24px;color:#a44b2e}@media(max-width:620px){.pending-training-item{align-items:flex-start;flex-direction:column}}
.standard-filter-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;align-items:end;gap:12px}.metric-schema-row{display:grid;grid-template-columns:1fr 1fr 110px 90px 90px 1fr auto auto;align-items:end;gap:8px;margin:8px 0}.metric-schema-row label{display:flex;align-items:center;gap:5px}.metric-schema-row input[type="checkbox"]{width:auto}.standard-version{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid var(--line)}.standard-version small{color:var(--muted);flex:1}@media(max-width:850px){.standard-filter-grid{grid-template-columns:1fr 1fr}.metric-schema-row{grid-template-columns:1fr 1fr}.standard-version{align-items:flex-start;flex-direction:column}}
.training-history-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 0;border-top:1px solid var(--line)}.training-history-row strong,.training-history-row small{display:block}.training-history-row small{margin-top:4px;color:var(--muted)}.training-history-row>div:last-child{display:flex;gap:8px}@media(max-width:620px){.training-history-row{align-items:flex-start;flex-direction:column}}

/* Light friendly classroom visual system */
:root{--brand:#315f55;--brand-strong:#284c45;--brand-soft:#e8f1ee;--accent:#c98158;--accent-soft:#fff1e8;--surface:#fff;--surface-soft:#f7f8f5;--page-bg:#f7f4ed;--header-bg:#fbfaf6;--text:#263b36;--muted:#6f7f79;--line:#dce5e1;--danger:#b54747;--ink:var(--text);--paper:var(--surface);--warm:var(--page-bg)}
body{background:linear-gradient(180deg,#eee7dc 0,var(--page-bg) 260px,#fbfaf6 100%) fixed;color:var(--text)}
button,input,select,textarea{min-height:44px;border-color:#bdcbc6;border-radius:11px;color:var(--text)}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:3px solid #9bb4ac;outline-offset:2px}
.primary{background:var(--brand);box-shadow:0 6px 18px #315f552e}
.primary:hover{background:var(--brand-strong)}
.secondary{color:var(--brand);border-color:var(--brand)}
.danger{border-color:#dfb0b0;color:var(--danger);background:#fff5f5}
.app-header{position:sticky;top:0;z-index:30;display:flex;align-items:center;gap:24px;padding:14px max(20px,calc((100vw - 1240px)/2));background:var(--header-bg);border-bottom:1px solid #e3ddd2;box-shadow:0 8px 28px #29453d17;backdrop-filter:blur(14px)}
.brand-lockup{display:flex;align-items:baseline;gap:8px;flex:0 0 auto;color:var(--brand-strong)}
.brand-lockup strong{font-size:24px;font-weight:850;letter-spacing:-.04em}.brand-lockup span{font-weight:700}
.nav.nav-scroll{position:static;inset:auto;width:auto;min-width:0;padding:0;display:flex;flex:1;flex-direction:row;align-items:center;gap:5px;overflow-x:auto;background:transparent;color:var(--text);scrollbar-width:thin}
.nav.nav-scroll button{flex:0 0 auto;min-height:40px;padding:8px 11px;color:var(--muted);background:transparent;border:0;border-radius:10px;text-align:center;white-space:nowrap}
.nav.nav-scroll button:hover{background:var(--surface-soft);color:var(--brand-strong)}
.nav.nav-scroll button.active{background:var(--brand);color:#fff;box-shadow:0 6px 16px #315f5528}
.nav.nav-scroll button span{display:inline-grid;min-width:18px;min-height:18px;place-items:center;padding:0 5px;border-radius:999px;background:var(--accent-soft);color:#9a5837;font-size:12px;opacity:1}
.app-shell{width:min(100%,1296px);max-width:none;margin:0 auto;padding:28px}
.page{min-height:0;padding:0;background:transparent;border-radius:0;box-shadow:none}
.page-head{margin-bottom:22px}.page h2{font-size:clamp(28px,3vw,34px);letter-spacing:-.025em}.page-head>div>p{max-width:760px;margin:5px 0 0}
.section-head{align-items:flex-end}
.content-section,.form-card,.data-card,#student-profile-fields,#student-history-panel,#student-training-panel{background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:0 10px 28px #29453d0b}
.content-section,.form-card{padding:20px;margin:0 0 18px}
.data-card{padding:18px;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}
.data-card:hover{border-color:#b9cdc6;box-shadow:0 14px 34px #29453d14;transform:translateY(-1px)}
.data-card>strong{display:block;color:var(--brand-strong);font-size:18px}.card-meta{margin:6px 0;color:var(--muted);font-size:14px}
.cards{gap:16px}.cards article,.question{background:var(--surface);border-color:var(--line);border-radius:16px}
.home-grid.content-section{grid-template-columns:repeat(3,minmax(180px,1fr))}.home-grid button{background:var(--surface-soft);border-color:var(--line);border-radius:16px}
.home-grid button:hover{border-color:#b9cdc6;background:#fff;box-shadow:0 10px 24px #29453d10}
.filters.content-section{align-items:end}.form-card h3{margin-top:0;color:var(--brand-strong)}
@media(max-width:900px){.app-header{align-items:flex-start;gap:12px;padding:12px 14px}.brand-lockup{padding-top:7px}.app-shell{padding:20px}.nav.nav-scroll{flex-wrap:nowrap}.content-section,.form-card{padding:16px}.home-grid.content-section{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.app-header{display:block}.brand-lockup{padding:0 2px 9px}.nav.nav-scroll{width:100%}.app-shell{padding:14px}.page h2{font-size:27px}.page-head{display:block}.content-section,.form-card{padding:14px;border-radius:15px}.home-grid.content-section,.filters.content-section{grid-template-columns:1fr}.cards{grid-template-columns:1fr}}
.plan-stage{position:relative;margin:0 0 18px;padding:22px 24px;background:var(--surface);border:1px solid var(--line);border-radius:20px;box-shadow:0 10px 28px #29453d0b}
.plan-stage-head{display:flex;align-items:flex-start;gap:13px;margin-bottom:16px}.plan-stage-head h3,.plan-stage-head p{margin:0}.plan-stage-head h3{color:var(--brand-strong);font-size:21px}.plan-stage-head p{margin-top:3px}
.plan-stage-number{display:grid;flex:0 0 34px;width:34px;height:34px;place-items:center;border-radius:50%;background:var(--brand-soft);color:var(--brand-strong);font-weight:850}
.plan-stage label{max-width:580px}.plan-stage .plan-focus-grid{margin-top:0}.plan-stage .plan-question-head{margin-top:0}.plan-question-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.plan-stage-actions{display:flex;justify-content:flex-end;margin-top:20px;padding-top:18px;border-top:1px solid var(--line)}.plan-stage-actions .primary{margin:0}
.plan-stage.pending-training-section{margin-top:0}.plan-stage .pending-training-plan{background:var(--surface-soft)}
.plan-focus-grid fieldset:nth-child(2) .plan-ability-options label:has(input:checked){background:var(--accent);border-color:var(--accent);color:#fff}
.history-plan-card{background:var(--surface-soft)}.history-question-row.recorded{opacity:1}
@media(max-width:760px){.plan-question-grid{grid-template-columns:1fr}.plan-stage{padding:18px}.plan-stage-actions .primary{width:100%;min-width:0}}
dialog{width:min(620px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:92dvh;padding:24px;overflow:auto;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:20px;box-shadow:0 26px 80px #233b3459}
dialog::backdrop{background:#233b3466;backdrop-filter:blur(3px)}
dialog .library-dialog-head{position:sticky;top:-24px;z-index:2;margin:-24px -24px 12px;padding:20px 24px 12px;background:linear-gradient(#fff 78%,#ffffffed)}
dialog .dialog-actions{justify-content:flex-end;margin-bottom:0}.library-preview-copy{background:var(--surface-soft)}
@media (min-width:1240px){#page-library>.cards{grid-template-columns:repeat(3,minmax(0,1fr))}.plan-question-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:768px) and (max-width:1239px){#page-library>.cards,#student-list.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.app-shell{padding:24px}.standard-filter-grid{grid-template-columns:1fr 1fr}}
@media (max-width:767px){body{overflow-x:hidden}.app-header{display:block;padding:12px 14px}.brand-lockup{padding:0 2px 9px}.nav.nav-scroll{width:100%;flex-wrap:nowrap;overflow-x:auto}.app-shell{width:100%;padding:14px}.page-head{display:block}.content-section,.form-card,.plan-stage{padding:14px;border-radius:15px}.home-grid.content-section,.filters.content-section,.cards,.plan-question-grid,.student-basic,.student-ability-grid,.standard-filter-grid,.inline{grid-template-columns:1fr}.secondary-actions,.dialog-actions{align-items:stretch;flex-direction:column}.secondary-actions button,.dialog-actions button,.dialog-actions a,.page>.primary{width:100%}.pending-training-item,.training-history-row{align-items:flex-start;flex-direction:column}dialog{width:calc(100vw - 20px);max-width:calc(100vw - 20px);max-height:92dvh;padding:18px;border-radius:16px}dialog .library-dialog-head{top:-18px;margin:-18px -18px 10px;padding:16px 18px 10px}}

/* Redesigned workspaces */
.dashboard-hero{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr);gap:30px;align-items:center;min-height:300px;padding:42px;border-radius:28px;background:linear-gradient(135deg,#284c45 0,#315f55 62%,#47766b 100%);box-shadow:0 24px 60px #29453d38;color:#fff}
.dashboard-hero-copy small{color:#dcebe6;font-weight:750}.dashboard-hero-copy h2{max-width:620px;margin:8px 0 10px;color:#fff;font-size:clamp(36px,5vw,54px);line-height:1.12}.dashboard-hero-copy p{max-width:620px;color:#edf6f2;font-size:18px}.dashboard-hero-actions{display:flex;gap:12px;margin-top:26px}.dashboard-hero-actions button{width:auto;margin:0;padding:12px 20px}.dashboard-hero-actions .primary{background:#fff;color:var(--brand-strong);box-shadow:none}.dashboard-hero-actions>button:not(.primary){border-color:#ffffff80;background:#ffffff12;color:#fff}
.dashboard-overview{padding:22px;border:1px solid #ffffff52;border-radius:20px;background:#ffffff18;backdrop-filter:blur(8px)}.dashboard-overview h3{margin:0 0 14px}.dashboard-overview>div{display:grid;gap:10px}.dashboard-overview span{display:flex;justify-content:space-between;gap:10px;padding:12px 14px;border-radius:13px;background:#ffffffed;color:var(--text)}.dashboard-overview strong{font-size:14px}.dashboard-overview small{color:var(--muted);white-space:nowrap}
.dashboard-actions{margin-top:28px}.section-title{display:flex;align-items:end;justify-content:space-between;gap:16px;margin:0 0 14px}.section-title small{color:var(--accent);font-weight:750}.section-title h3{margin:2px 0 0;color:var(--brand-strong);font-size:24px}.dashboard-actions .home-grid{grid-template-columns:repeat(4,minmax(0,1fr));padding:0;background:transparent;border:0;box-shadow:none}.dashboard-actions .home-grid button{min-height:150px;padding:22px;background:var(--surface);box-shadow:0 12px 30px #29453d10}.dashboard-actions .home-grid button:nth-child(1),.dashboard-actions .home-grid button:nth-child(5),.dashboard-actions .home-grid button:nth-child(7){grid-column:span 2;background:linear-gradient(145deg,#fff 20%,#edf4f1 100%)}
.library-workspace{display:grid;grid-template-columns:260px minmax(0,1fr);gap:22px;align-items:start}.library-filter-rail{position:sticky;top:88px}.filter-rail-head{margin:0 0 12px}.filter-rail-head small{color:var(--accent);font-weight:750}.filter-rail-head h3{margin:2px 0;color:var(--brand-strong);font-size:22px}.library-filter-rail .filters{display:block;padding:18px}.library-filter-rail .filters label{margin:0 0 15px;font-weight:650}.library-filter-rail .filters label:last-child{margin-bottom:0}.library-results{min-width:0}.library-results>.section-title{padding:0 4px}.library-results #questions{margin-top:0}.library-type-groups{display:grid;gap:22px}.library-type-group{min-width:0}.library-type-heading{display:flex;align-items:center;justify-content:space-between;margin:0 4px 10px}.library-type-heading h4{margin:0;color:var(--brand-strong);font-size:20px}.library-type-heading span{color:var(--muted);font-size:14px}.library-type-group>.cards{grid-template-columns:repeat(2,minmax(0,1fr))}
.dashboard-actions>.section-title,.library-results>.section-title{align-items:flex-start;flex-direction:column;justify-content:flex-start;gap:0}
.student-workspace{display:grid;grid-template-columns:300px minmax(0,1fr);gap:22px;align-items:start}.student-directory{position:sticky;top:88px;padding:18px;background:#284c45;border-radius:20px;box-shadow:0 18px 42px #29453d26;color:#fff}.student-directory .student-toolbar{align-items:stretch;flex-direction:column;margin-bottom:14px}.student-directory .student-toolbar label{color:#fff}.student-directory .student-toolbar button{background:#fff;color:var(--brand-strong)}.student-directory #student-list.cards{display:grid;grid-template-columns:1fr;gap:10px;max-height:calc(100vh - 270px);margin:0;overflow:auto;padding-right:3px}.student-directory .student-card{padding:14px;border:0;box-shadow:none}.student-directory .student-card h3{margin:0}.student-directory .card-actions button{min-height:38px;padding:7px 9px}
.student-detail{min-width:0}.student-detail-placeholder{min-height:260px;padding:42px;border:1px dashed #b9cdc6;border-radius:22px;background:#ffffffa8}.student-detail-placeholder small{color:var(--accent);font-weight:750}.student-detail-placeholder h3{margin:8px 0 5px;color:var(--brand-strong);font-size:26px}.student-detail:has(#student-profile-form:not([hidden])) .student-detail-placeholder,.student-detail:has(#student-training-panel:not([hidden])) .student-detail-placeholder,.student-detail:has(#student-history-panel:not([hidden])) .student-detail-placeholder{display:none}
.plan-workspace{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(300px,.75fr);gap:22px;align-items:start}.plan-builder{min-width:0}.plan-records-panel{position:sticky;top:88px;max-height:calc(100vh - 108px);overflow:auto}.plan-records-panel .plan-stage{margin:0;background:linear-gradient(180deg,#fff,#edf4f1)}.plan-builder .plan-stage{border-left:5px solid #bfd2cb}.plan-builder .plan-stage[data-stage="4"]{border-left-color:var(--brand)}
@media(max-width:1100px){.dashboard-hero{grid-template-columns:1fr}.dashboard-actions .home-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.library-workspace,.student-workspace,.plan-workspace{grid-template-columns:1fr}.library-filter-rail,.student-directory,.plan-records-panel{position:static}.library-filter-rail .filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.student-directory #student-list.cards{grid-template-columns:repeat(2,minmax(0,1fr));max-height:none}.plan-records-panel{max-height:none}}
@media(max-width:767px){.dashboard-hero{min-height:0;padding:24px;border-radius:20px}.dashboard-hero-copy h2{font-size:34px}.dashboard-hero-actions{align-items:stretch;flex-direction:column}.dashboard-hero-actions button{width:100%}.dashboard-actions .home-grid,.library-type-group>.cards,.student-directory #student-list.cards,.library-filter-rail .filters{grid-template-columns:1fr}.dashboard-actions .home-grid button:nth-child(n){grid-column:auto}.student-directory{padding:14px;border-radius:16px}}

/* Training plan dashboard */
@media(min-width:1101px){.app-header{position:fixed;inset:0 auto 0 0;width:210px;height:100vh;padding:28px 14px;align-items:stretch;flex-direction:column;gap:26px;background:var(--header-bg);border-right:1px solid #e3ddd2;border-bottom:0}.brand-lockup{padding:0 14px}.nav.nav-scroll{width:100%;align-items:stretch;flex:none;flex-direction:column;gap:5px;overflow:visible}.nav.nav-scroll button{width:100%;padding:11px 14px;text-align:left}.app-shell{width:calc(100% - 210px);max-width:none;margin-left:210px;padding:24px 28px}}
.plan-workspace{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:18px;align-items:start}.plan-builder{min-width:0}.plan-step-grid{display:grid;grid-template-columns:minmax(0,.75fr) minmax(0,1.25fr);gap:16px}.plan-step-grid .plan-stage{align-self:start;margin:0}.plan-step-grid .plan-stage[data-stage="1"],.plan-step-grid .plan-stage[data-stage="3"]{grid-column:1}.plan-step-grid .plan-stage[data-stage="2"],.plan-step-grid .plan-stage[data-stage="4"]{grid-column:2}.plan-step-grid .plan-stage[data-stage="3"],.plan-step-grid .plan-stage[data-stage="4"]{grid-row:2}.plan-step-grid .plan-stage[data-stage="5"]{grid-column:1/-1;grid-row:3}.plan-generate-stage{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px;border-left-color:var(--accent)!important}.plan-generate-stage .plan-stage-head{margin:0}.plan-generate-stage .plan-stage-actions{margin:0;padding:0;border:0}.plan-generate-summary{display:flex;gap:10px;grid-column:1/-1}.plan-generate-summary span{min-width:130px;padding:10px 12px;border-radius:12px;background:var(--surface-soft)}.plan-generate-summary strong,.plan-generate-summary small{display:block}.plan-generate-summary small{color:var(--muted)}
.plan-context-panel{position:sticky;top:24px;display:grid;gap:16px;max-height:calc(100vh - 48px);overflow:auto}.plan-live-preview,.plan-records-card{padding:18px;background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:0 10px 28px #29453d0b}.plan-live-preview{background:linear-gradient(180deg,#fff,#edf6f2)}.plan-context-head small{color:var(--accent);font-weight:750}.plan-context-head h3{margin:2px 0 14px;color:var(--brand-strong);font-size:20px}.plan-preview-student{padding:13px;border:1px solid #cfe0da;border-radius:13px;background:#fff}.plan-preview-student strong,.plan-preview-student small{display:block}.plan-preview-student small{margin-top:4px;color:var(--muted);overflow-wrap:anywhere}.plan-preview-list{display:grid;gap:8px;margin-top:12px}.plan-preview-list>button{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:8px;width:100%;padding:9px 10px;text-align:left;border-color:#d7e4df;background:#fff}.plan-preview-list>button span{display:grid;width:24px;height:24px;place-items:center;border-radius:7px;background:var(--brand-soft);color:var(--brand);font-weight:800}.plan-preview-list>button strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.plan-preview-list>button small{color:var(--muted);white-space:nowrap}.plan-records-card .pending-training-plan{padding:12px}.plan-records-card .pending-training-plan header{display:grid;gap:8px}.plan-records-card .pending-training-plan header>div:last-child{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.plan-records-card .pending-training-item{align-items:flex-start;flex-direction:column}.plan-records-card .pending-training-item button{width:100%}.plan-records-card .training-plan-record-group h4{margin:14px 0 7px}.plan-records-card .training-plan-record-group:first-child h4{margin-top:0}
.plan-step-grid .plan-question-grid{grid-template-columns:1fr;gap:8px}.plan-step-grid .plan-question-card{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 10px;padding:11px}.plan-step-grid .plan-question-card .plan-focus-badge{float:none;grid-column:2}.plan-step-grid .plan-question-card>strong{grid-column:1;grid-row:1}.plan-step-grid .plan-question-card>small{grid-column:1/-1;margin:0}.plan-step-grid .plan-question-card>button{grid-column:2;grid-row:2}.plan-step-grid .plan-question-head{align-items:center}.plan-step-grid .plan-question-head h3{font-size:18px}
@media(max-width:1250px){.plan-workspace{grid-template-columns:1fr}.plan-context-panel{position:static;max-height:none;grid-template-columns:1fr 1fr}.plan-records-card{min-width:0}}
@media(max-width:1100px){.app-header{position:sticky;width:auto;height:auto}.app-shell{width:min(100%,1296px);margin:0 auto}.plan-step-grid{grid-template-columns:1fr 1fr}.plan-context-panel{grid-template-columns:1fr 1fr}}
@media(max-width:767px){.plan-step-grid,.plan-context-panel{grid-template-columns:1fr}.plan-step-grid .plan-stage[data-stage]{grid-column:1;grid-row:auto}.plan-generate-stage{display:block}.plan-generate-stage .plan-stage-head{margin-bottom:16px}.plan-generate-stage .plan-stage-actions{margin-top:16px}.plan-generate-summary{flex-direction:column}.plan-generate-summary span{min-width:0}.plan-context-panel{display:flex;flex-direction:column}.plan-live-preview{order:1}.plan-records-card{order:2}.plan-preview-list>button{grid-template-columns:28px minmax(0,1fr)}.plan-preview-list>button small{grid-column:2}}
@media(min-width:1251px){
 #page-plans:not([hidden]){display:flex;height:calc(100vh - 83px);min-height:0;overflow:hidden;flex-direction:column;padding:18px 20px}
 #page-plans>.page-head{flex:0 0 auto;margin-bottom:10px}
 #page-plans>.page-head h2{font-size:25px}
 #page-plans>.page-head p{margin:2px 0 0;font-size:13px}
 .plan-workspace{flex:1;min-height:0;align-items:stretch;gap:12px}
 .plan-builder,.plan-step-grid{height:100%;min-height:0}
 .plan-step-grid{grid-template-rows:minmax(0,.92fr) minmax(0,1.08fr) auto;gap:10px}
 .plan-step-grid .plan-stage{align-self:stretch;min-height:0;margin:0;padding:11px 13px;overflow:hidden;border-radius:15px}
 .plan-stage-head{gap:8px;margin-bottom:7px}
 .plan-stage-head h3{font-size:17px;line-height:1.3}
 .plan-stage-head p{margin-top:1px;font-size:12px;line-height:1.35}
 .plan-stage-number{flex-basis:27px;width:27px;height:27px;font-size:13px}
 .plan-stage label{margin:6px 0;font-size:13px}
 .plan-stage input,.plan-stage select{margin-top:3px;padding:7px 9px}
 .plan-step-grid .plan-focus-grid{grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr);gap:7px}
 .plan-step-grid .plan-focus-grid fieldset{min-width:0;padding:3px 5px;border-radius:10px}
 .plan-step-grid .plan-focus-grid legend{padding:0 4px;font-size:14px}
 .plan-step-grid .plan-focus-grid p{margin:0 0 4px;font-size:11px}
 .plan-step-grid .plan-focus-grid fieldset>p{display:none}
 .plan-step-grid .plan-ability-options{display:grid;gap:2px}
 .plan-step-grid .plan-focus-grid fieldset:first-child .plan-ability-options{grid-template-columns:repeat(3,minmax(0,1fr))}
 .plan-step-grid .plan-focus-grid fieldset:nth-child(2) .plan-ability-options{grid-template-columns:repeat(3,minmax(0,1fr))}
 .plan-step-grid .plan-ability-options label{justify-content:center;min-width:0;min-height:20px;margin:0;padding:1px 3px;border-radius:7px;font-size:11px;line-height:1.15;text-align:center}
 .plan-step-grid .plan-ability-options label span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .plan-step-grid .plan-ability-options input{flex:0 0 auto;width:14px;height:14px;min-height:0;margin:0;padding:0}
 #plan-focus-status,#plan-question-status{min-height:0;margin:3px 0;font-size:11px}
 .plan-step-grid .plan-question-head{gap:8px}
 .plan-step-grid .plan-question-head h3{font-size:15px}
 .plan-step-grid .plan-question-head p{font-size:11px;line-height:1.3}
 .plan-stage[data-stage="4"]>.plan-stage-head p,.plan-step-grid .plan-question-head p{display:none}
 .plan-step-grid .plan-question-head button{min-height:0;padding:3px 7px;font-size:11px}
 .plan-step-grid .plan-type-list{gap:5px;margin-top:6px}
 .plan-step-grid .plan-type-list span{padding:4px 7px;font-size:12px}
 .plan-step-grid .plan-question-grid{gap:2px;margin-top:3px}
 .plan-step-grid .plan-question-grid:has(.plan-question-card:nth-of-type(5)){grid-template-columns:repeat(2,minmax(0,1fr))}
 .plan-step-grid .plan-stage[data-stage="4"]{padding:8px 10px}
 .plan-step-grid .plan-question-card{grid-template-columns:42px minmax(0,1fr) auto auto;gap:5px;padding:1px 4px;border-radius:8px}
 .plan-step-grid .plan-question-card .plan-question-index{color:var(--brand);font-size:11px;font-weight:800}
 .plan-step-grid .plan-question-card>strong{grid-column:2;grid-row:1;overflow:hidden;font-size:13px;text-overflow:ellipsis;white-space:nowrap}
 .plan-step-grid .plan-question-card>small{display:none}
 .plan-step-grid .plan-question-card .plan-focus-badge{grid-column:3;grid-row:1;font-size:11px}
 .plan-step-grid .plan-question-card .plan-source-badge{display:none}
 .plan-step-grid .plan-question-card>button{grid-column:4;grid-row:1;min-height:0;margin:0;padding:2px 6px;font-size:11px;line-height:1.2}
 .plan-generation-offer{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:5px;margin:4px 0;padding:3px 5px}
 .plan-generation-offer>strong{display:none}
 .plan-generation-offer label{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:5px;margin:0;font-size:0}.plan-generation-offer label select{min-height:0;margin:0;padding:2px 4px;font-size:11px}.plan-generation-offer p{display:none}.plan-generation-offer button{min-height:0;padding:4px 6px;font-size:11px}
 .plan-generate-stage{grid-template-columns:minmax(0,1fr) auto auto;padding:9px 13px!important}
 .plan-generate-stage .plan-generate-summary{grid-column:2;display:flex;gap:6px}
 .plan-generate-stage .plan-stage-head p{display:none}
 .plan-generate-summary span{min-width:94px;padding:5px 8px;font-size:12px}
 .plan-generate-stage .plan-stage-actions{grid-column:3}.plan-generate-stage .primary{min-width:0;min-height:0;padding:7px 11px}
 .plan-context-panel{position:static;height:100%;max-height:none;min-height:0;grid-template-rows:auto minmax(0,1fr);gap:10px;overflow:hidden}
 .plan-live-preview,.plan-records-card{min-height:0;padding:11px 12px;border-radius:15px;overflow:hidden}
 .plan-context-head h3{margin:1px 0 6px;font-size:17px}.plan-context-head small{font-size:11px}
 .plan-preview-student{padding:7px 9px}.plan-preview-student small{margin-top:1px;font-size:11px}
 .plan-preview-list{gap:4px;margin-top:6px}.plan-preview-list>button{grid-template-columns:22px minmax(0,1fr) auto;gap:5px;padding:5px 7px;font-size:12px}.plan-preview-list>button span{width:20px;height:20px;font-size:11px}
 .plan-records-card{display:flex;flex-direction:column}.plan-records-card>.quiet{margin:0 0 4px;font-size:11px}.plan-records-card #pending-training-plans{min-height:0}
 .plan-records-card .training-plan-record-group h4{margin:7px 0 3px;font-size:13px}.plan-records-card .training-plan-record-group:first-child h4{margin-top:0}
 .plan-records-card .pending-training-plan{margin:4px 0;padding:6px 7px;border-radius:9px;font-size:11px}.plan-records-card .pending-training-plan header{display:flex;align-items:center;justify-content:space-between;gap:5px}.plan-records-card .pending-training-plan header small{margin:0;font-size:10px}
 .plan-records-card .pending-training-items{margin-top:3px}.plan-records-card .pending-training-item{align-items:center;flex-direction:row;gap:5px;padding:3px 0}.plan-records-card .pending-training-item>div{min-width:0;flex:1}.plan-records-card .pending-training-item strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.plan-records-card .pending-training-item small{display:none}.plan-records-card .pending-training-item button{width:auto;padding:3px 6px;font-size:10px;white-space:nowrap}
 #plan-question-editor:not([hidden]){position:fixed;z-index:50;inset:32px 42px 32px 252px;margin:0;overflow:auto;box-shadow:0 26px 80px #233b3459}
}

.card-more{margin-top:8px}.card-more summary{cursor:pointer;color:var(--muted);font-size:14px;padding:4px 0}.card-more[open] summary{margin-bottom:6px}#confirm-dialog{width:min(420px,calc(100vw - 32px))}#confirm-dialog-message{font-size:17px;line-height:1.6;margin:0 0 18px}
.flow-steps{display:flex;gap:6px;list-style:none;margin:0 0 18px;padding:0;overflow-x:auto}.flow-steps li{flex:1;min-width:110px}.flow-steps button{width:100%;display:flex;align-items:center;gap:8px;padding:9px 12px;border:1px solid var(--line);border-radius:12px;background:var(--paper);color:var(--muted);text-align:left}.flow-steps b{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--brand-soft);color:var(--brand);font-size:13px}.flow-steps small{margin-left:auto;color:var(--accent);font-weight:700;white-space:nowrap}.flow-steps li.current button{border-color:var(--brand);background:var(--brand-soft);color:var(--ink);font-weight:700}.flow-steps li.current b{background:var(--brand);color:#fff}.flow-steps li.done b{background:var(--brand);color:#fff}
.attention-list{margin:18px 0;padding:14px 16px;border:1px solid #e3c5b4;border-radius:14px;background:#fdf6f1}.attention-list h3{margin:0 0 8px;color:#a44b2e}.attention-list ul{list-style:none;margin:0;padding:0}.attention-list li{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:8px 0;border-top:1px solid #f0ddd2}.attention-list li:first-child{border-top:0}.attention-list li div{display:grid;gap:2px;min-width:0}.attention-list li span{color:var(--muted);font-size:14px}.attention-list p{margin:8px 0 0;color:var(--muted);font-size:14px}
.similar-compare{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin:12px 0}.similar-card{margin:0;border:1px solid var(--line);border-radius:12px;padding:8px;background:var(--paper)}.similar-card img{display:block;width:100%;max-height:260px;object-fit:contain;background:#f4f2ee;border-radius:8px}.similar-card figcaption{display:grid;gap:2px;margin-top:6px}.similar-card small{color:var(--muted)}#similar-dialog{width:min(820px,calc(100vw - 32px))}
.bulk-batch-box{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap}.bulk-batch-box .danger{white-space:nowrap}

/* Teacher accounts: one login action, account settings kept out of everyday work. */
.teacher-login-required .app-header,.teacher-login-required .page,.teacher-login-required #connection-card,.teacher-login-required #flow-steps{display:none!important}
#teacher-login{max-width:440px;margin:8vh auto;padding:28px;background:#fff;border:1px solid var(--line);border-radius:18px}
#account-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}#account-bar[hidden]{display:none}#account-bar button{padding:5px 10px;min-height:0}
#teacher-account-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px;margin-top:20px}
.account-student-choice{display:flex;align-items:center;gap:10px}.account-student-choice input{width:auto;margin:0}
body[data-can-organize="false"] [data-library-delete],body[data-can-organize="false"] [data-library-classification],body[data-can-organize="false"] [data-delete-generated],body[data-can-organize="false"] #edit-type-rule,body[data-can-organize="false"] #plan-generation-offer{display:none!important}
body[data-can-organize="false"] .dashboard-overview span:has(#home-review),body[data-can-organize="false"] .dashboard-overview span:has(#home-redraw){display:none!important}

/* ---- 训练计划页 v2：正常滚动，不再锁定为一屏 ---- */
@media(min-width:1251px){#page-plans:not([hidden]){display:block;height:auto;min-height:0;overflow:visible}}
.plan2-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:18px;align-items:start}
.plan2-main{display:grid;gap:16px;min-width:0}
.plan2-card{padding:20px 22px;background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:0 10px 28px #29453d0b}
.plan2-card h3{margin:0 0 10px;color:var(--brand-strong)}
.plan2-setup{display:grid;gap:14px}
.plan2-student{display:block;max-width:420px;margin:0}
.plan2-focus{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:0}
.plan2-focus fieldset{min-width:0;margin:0}
#plan-focus-status{min-height:0;margin:8px 0 0;color:#a44b2e}
.plan2-questions-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.plan2-questions-head h3{margin:0}
.plan2-questions-actions{display:flex;gap:8px}
.plan2-hint{margin:4px 0 0;font-size:14px}
#plan-question-status{margin:8px 0 0;color:#a44b2e}
#plan-question-status:empty{display:none}
.plan2-question-list{display:grid;gap:10px;margin-top:12px}
.plan2-question-list .plan-question-card{display:grid;grid-template-columns:34px minmax(0,1fr) auto auto;align-items:center;gap:12px;margin:0;padding:12px 14px}
.plan2-question-list .plan-question-index{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--brand-soft);color:var(--brand-strong);font-weight:800}
.plan2-question-list .plan-question-main{display:grid;gap:3px;min-width:0}
.plan2-question-list .plan-question-main strong,.plan2-question-list .plan-question-main small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.plan2-question-list .plan-question-tags{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.plan2-question-list .plan-focus-badge{float:none}
.plan2-question-list .plan-source-badge{margin:0}
.plan2-question-list .plan-question-actions{display:flex;gap:6px}
.plan2-question-list .plan-question-actions button{margin:0;min-height:0;padding:7px 12px}
.plan2-question-list .plan-remove{color:#a44b2e;border-color:#e3c5b4;background:#fdf6f1}
.plan2-swap{margin-top:16px;padding:16px;border:1px solid var(--brand);border-radius:16px;background:var(--brand-soft)}
.plan2-swap-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.plan2-swap-head button{min-height:0;padding:6px 12px}
.plan2-swap-tools{display:grid;gap:10px;margin:12px 0 6px}
.plan2-swap-search{display:block;max-width:360px;margin:0}
.plan2-type-chips{display:flex;flex-wrap:wrap;gap:8px}
.plan2-type-chips button{min-height:0;padding:6px 12px;border-radius:999px;background:var(--surface)}
.plan2-type-chips button[aria-pressed="true"]{background:var(--brand);border-color:var(--brand);color:#fff}
#plan-swap-status{margin:6px 0 10px;color:var(--muted)}
.plan2-swap-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px}
.plan2-swap-card{display:grid;align-content:start;gap:6px;padding:10px;background:var(--surface);border:1px solid var(--line);border-radius:12px}
.plan2-swap-card.chosen{opacity:.7}
.plan2-swap-card .plan-focus-badge{float:none;justify-self:start}
.plan2-swap-thumb{display:block;width:100%;aspect-ratio:3/4;padding:0;overflow:hidden;background:#f4f2ee;border:1px solid var(--line);border-radius:10px;cursor:zoom-in}
.plan2-swap-thumb img{display:block;width:100%;height:100%;object-fit:contain}
.plan2-swap-card strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.plan2-swap-card small{color:var(--muted)}
.plan2-pick{min-height:0;padding:8px 10px;background:var(--brand);border-color:var(--brand);color:#fff}
.plan2-pick:disabled{background:var(--surface);border-color:var(--line);color:var(--muted)}
.plan2-swap-more{display:flex;justify-content:center;margin-top:12px}
.plan2-summary{position:sticky;top:24px;min-width:0}
.plan2-live{display:grid;gap:12px}
.plan2-live>small{color:var(--accent);font-weight:700}
.plan2-live h3{margin:0}
.plan2-live-student{display:grid;gap:3px;padding:10px 12px;background:var(--surface-soft,#f6f8f7);border-radius:12px}
.plan2-live-list{display:grid;gap:6px;max-height:300px;overflow:auto}
.plan2-live-list>button{display:grid;grid-template-columns:24px minmax(0,1fr);gap:2px 8px;align-items:center;text-align:left;padding:8px 10px;min-height:0}
.plan2-live-list>button span{grid-row:span 2;display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--brand-soft);color:var(--brand-strong);font-size:12px;font-weight:800}
.plan2-live-list>button strong,.plan2-live-list>button small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.plan2-live-total{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding-top:10px;border-top:1px solid var(--line)}
#make-plan{width:100%;margin:0}
#make-plan:disabled{opacity:.55;cursor:not-allowed}
.plan2-records{margin-top:18px}
.plan2-records-head small{color:var(--accent);font-weight:700}
.plan2-records .quiet{margin:0 0 10px}
.plan2-records #pending-training-plans{display:grid;grid-template-columns:repeat(auto-fill,minmax(420px,1fr));gap:14px;align-items:start}
.plan2-records #pending-training-plans>p{grid-column:1/-1}
.plan2-records .training-plan-record-group{display:contents}
.plan2-records .training-plan-record-group h4{grid-column:1/-1;margin:6px 0 0}
.plan2-records .pending-training-plan{margin:0}
@media(max-width:1250px){.plan2-layout{grid-template-columns:1fr}.plan2-summary{position:static}}
@media(max-width:767px){.plan2-focus{grid-template-columns:1fr}.plan2-question-list .plan-question-card{grid-template-columns:34px minmax(0,1fr)}.plan2-question-list .plan-question-tags,.plan2-question-list .plan-question-actions{grid-column:2;justify-content:flex-start}.plan2-records #pending-training-plans{grid-template-columns:1fr}}
.plan2-focus fieldset>p{margin:0 0 8px;color:var(--muted);font-size:14px}
.plan2-question-list .plan-question-main small{display:block;margin:0;padding:0}
.plan2-records .pending-training-plan>header{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:8px}
.plan2-records .pending-training-plan>header>div:last-child{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.plan2-records .pending-training-plan>header button{margin:0;min-height:0;padding:6px 12px}
@media(max-width:767px){.plan2-swap-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.plan2-swap-card{padding:8px}}
.plan2-filter-row{display:flex;gap:10px;align-items:flex-start}
.plan2-filter-label{flex:0 0 36px;padding-top:6px;color:var(--muted);font-size:14px;font-weight:700}
.plan2-filter-row .plan2-type-chips{flex:1;min-width:0}
@media(max-width:767px){.plan2-filter-row{flex-direction:column;gap:4px}.plan2-filter-label{padding-top:0}}
.plan2-swap-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.plan2-swap-pager{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:14px}
.plan2-swap-pager button{min-height:0;padding:8px 18px}
.plan2-swap-pager button:disabled{opacity:.5;cursor:not-allowed}
.plan2-swap-pager span{min-width:90px;text-align:center;color:var(--muted)}
@media(max-width:767px){.plan2-swap-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.plan-download{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px}
.plan-download-option{display:inline-flex;align-items:center;gap:5px;margin:0;font-size:13px;color:var(--muted);white-space:nowrap}
.plan-download-option input{width:auto;min-height:0;margin:0}

#type-name-dialog{width:min(640px,calc(100vw - 32px));max-height:90vh;overflow:auto}#type-name-list{height:210px}#manage-type-names{margin:0 0 16px;width:100%}
