#materials-state{position:fixed;right:24px;bottom:26px;z-index:35;max-width:min(420px,calc(100vw - 32px));margin:0;padding:12px 16px;border:1px solid #e1e8de;border-radius:12px;background:#fffffff5;box-shadow:0 8px 28px #29483b14;color:#496255;font-size:13px;line-height:1.7;pointer-events:none}
#materials-state:empty{display:none}
#material-items{position:relative;min-height:320px}
#material-items[aria-busy="true"]{pointer-events:none}
#material-items[aria-busy="true"]>*{visibility:hidden}
#material-items[aria-busy="true"]::before{content:'';position:absolute;top:24px;left:8px;width:82%;height:180px;border-radius:5px;background:repeating-linear-gradient(to bottom,#edf1eb 0 11px,transparent 11px 25px,#f4f6f1 25px 33px,transparent 33px 60px);pointer-events:none}
.material-retry{display:block;margin:0 auto 24px}
@media(max-width:860px){#materials-state{right:16px;bottom:calc(var(--workspace-nav-height,68px) + 12px)}}
.materials-layout{display:grid;grid-template-columns:200px minmax(0,1fr);gap:22px;align-items:start}
.material-group-panel,.material-content,.material-empty{border:1px solid #e6ebe3;background:#fff;border-radius:20px}
.material-group-panel{padding:18px 12px;position:sticky;top:105px}
.material-group-panel h2{font-size:13px;font-weight:600;color:#849287;letter-spacing:.07em;margin:4px 12px 16px}
.dashboard #material-create{position:relative;width:100%;min-height:40px;padding:8px 10px;margin:0 0 13px;font-size:13px;overflow:hidden}
.material-group-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 4px 9px 10px}
.material-group-panel-heading h2{margin:0;letter-spacing:0}
.dashboard #material-delete{display:grid;place-items:center;width:32px;height:32px;min-height:32px;padding:7px;border:0;border-radius:8px;background:transparent;color:#879584;box-shadow:none}
.dashboard #material-delete[aria-pressed=true]{background:#fbf0ec;color:#a06555}
#material-delete .icon{width:17px;height:17px}
.material-group-delete-actions{display:flex;flex-wrap:wrap;gap:4px;align-items:center;padding:9px 4px 0;margin-top:7px;border-top:1px solid #edf0e9;font-size:11px;color:#889585}
.material-group-delete-actions[hidden]{display:none}
.material-group-delete-actions>span{flex-basis:100%}
.dashboard .material-group-delete-actions button,.dashboard #material-undo{min-height:36px;padding:5px 7px;font-size:11px}
.dashboard #material-delete-confirm{color:#a06555}
.material-group-selector{display:grid;place-items:center;flex:0 0 16px;width:16px;height:16px;border:1px solid #bac6b3;border-radius:4px}
.material-group-selector .icon{width:12px!important;height:12px!important;opacity:0}
.material-group[aria-checked=true] .material-group-selector{background:#407454;border-color:#407454;color:#fff}
.material-group[aria-checked=true] .material-group-selector .icon{opacity:1}
.material-group[aria-checked=true]{background:#f4f7ef}
#material-groups{display:flex;flex-direction:column;gap:6px}
.dashboard .material-group{display:flex;align-items:center;gap:9px;padding:12px;min-height:48px;text-align:left;border:0;border-radius:12px;background:transparent;color:#657267;box-shadow:none;font-size:14px;width:100%}
.dashboard .material-group[aria-current="page"]{background:#edf3ec;color:#2e5947;font-weight:650}
.dashboard .material-group:hover{background:#f4f6f1}
.material-group-name{flex:1;min-width:0;overflow-wrap:anywhere}
.material-group .icon{width:17px;height:17px;flex-basis:17px}
.material-group-badge{font-size:12px;background:#fff9;border-radius:8px;min-width:24px;text-align:center;padding:2px 5px}
.material-content{padding:20px;min-width:0;overflow:hidden;container-type:inline-size;container-name:material-content}
.material-card-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
@container material-content (min-width:560px){.material-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.material-card{padding:10px 6px 10px 10px;gap:8px}
.material-card>input{flex:0 0 16px}
.material-card .video-cover{width:38px;min-width:38px;height:52px;flex-basis:38px}
.material-card .history-card-open{gap:8px}
.material-card .history-card-title{font-size:13px}
.material-card .history-card-meta{font-size:11px}
.dashboard .material-card .history-card-actions>button{flex-basis:32px;width:32px;min-width:32px;height:36px;min-height:36px;padding:6px}
.material-content>.material-toolbar{margin-top:0}
@media(max-width:860px){.dashboard #material-create{min-height:44px}.dashboard .material-card .history-card-actions>button{flex-basis:40px;width:40px;min-width:40px;height:44px;min-height:44px}.material-card{gap:6px}.material-card .video-cover{width:34px;min-width:34px;flex-basis:34px;height:48px}.material-card .history-card-title{font-size:12px}}
@media(max-width:360px){.dashboard .material-card .history-card-actions{flex-direction:column}.dashboard .material-card .history-card-actions>button{flex-basis:36px;height:36px;min-height:36px}}
.material-group-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.material-group-heading h2{margin:0;font-size:23px;color:#294a3c;overflow-wrap:anywhere}
.material-group-heading p{margin:7px 0 0;font-size:13px}
.material-group-heading .quiet{font-size:12px;padding:6px 8px;min-height:36px}
.material-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:22px 0 18px}
.material-toolbar button{font-size:13px;padding:10px 14px;min-height:42px}
.material-toolbar input{flex:1;min-width:160px;width:auto;margin:0;font-size:13px;min-height:42px;padding:9px 12px;background:#fafbf8}
.material-toolbar .search-orbit{flex:1;min-width:160px}
.material-selection{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:12px 0;border-top:1px solid #edf0e9;border-bottom:1px solid #edf0e9;color:#899386;font-size:12px}
.material-selection label,.material-picker-actions label{display:flex;align-items:center;gap:6px;margin:0;font-weight:400;white-space:nowrap}
.material-selection .quiet{padding:3px 6px;font-size:12px;min-height:30px;margin-left:auto}
.material-selection .quiet+.quiet{margin-left:0}
.material-table{width:100%;border-collapse:collapse;table-layout:fixed;margin:0}
.material-table th{font-size:11px;color:#99a096;letter-spacing:.04em;font-weight:500;text-align:left;padding:15px 6px 10px;border:0;background:transparent}
.material-table th:first-child{width:30px;font-size:0}
.material-table th:nth-child(2){width:43%}
.material-table th:last-child{width:86px}
.material-table td{padding:18px 6px;border:0;border-bottom:1px solid #edf0e9;vertical-align:top;background:transparent;white-space:normal}
.material-table tr:last-child td{border-bottom:0}
.material-record{display:flex;gap:12px;color:inherit;text-decoration:none;min-width:0}
.material-record .video-cover{width:54px;height:72px;min-width:54px;border-radius:8px;margin:0;flex-shrink:0}
.material-record-words{display:flex;flex-direction:column;gap:7px;min-width:0}
.material-record strong{font-weight:550;font-size:14px;line-height:1.5;overflow-wrap:anywhere;white-space:normal}
.material-record .hint{font-size:11px;margin:0;color:#8a958a}
.material-preview p{font-size:12px;line-height:1.85;color:#7e897d;margin:0;white-space:pre-wrap;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.material-operations button,.material-open{display:block;font-size:12px;padding:0;min-height:30px;line-height:30px;color:#497c63;text-align:left;white-space:nowrap;text-decoration:none;background:transparent;border:0}
.material-open:hover{text-decoration:underline}
.material-list-empty{font-size:14px;text-align:center;color:#8b998c;padding:55px 10px;line-height:1.8;margin:0}
.material-empty{text-align:center;padding:70px 24px;color:#809181}
.material-empty>.icon{width:44px;height:44px;color:#8ba994}
.material-empty h2{font-size:22px;color:#365443;margin:20px 0 10px}
.material-empty p{font-size:14px;margin:0 0 26px;line-height:1.8}
.material-dialog{width:min(480px,calc(100vw - 32px));border:1px solid #e2e9df;border-radius:22px;padding:30px;max-height:calc(100dvh - 48px);overflow:auto}
.material-dialog h2{font-size:23px;color:#2b4c3d;margin:0 0 18px}
.material-dialog label{display:block;font-size:13px;font-weight:550;margin:16px 0 8px}
.material-dialog input:not([type="checkbox"]),.material-dialog select{width:100%;font:inherit;font-size:14px;padding:12px;border:1px solid #dde5db;border-radius:10px;margin:0;min-height:44px;background:#fcfdfa}
.material-dialog .hint{font-size:13px;line-height:1.7;margin:8px 0}
.material-dialog .dialog-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:24px}
.material-dialog .dialog-actions button{flex:1}
.material-source-dialog{width:min(600px,calc(100vw - 32px))}
.material-source-search{display:flex;gap:8px;margin:20px 0 8px}
.material-source-search input{min-width:0;flex:1}
.material-source-search button{white-space:nowrap;font-size:13px}
.material-picker-actions{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:#7f8e80;margin:10px 0}
.material-picker-actions label{font-size:12px;margin:8px 0}
.material-source-items{max-height:330px;overflow:auto;border:1px solid #e8ede4;border-radius:12px;margin:10px 0}
.material-dialog .material-picker-row{display:flex;align-items:center;gap:14px;margin:0;padding:16px;border-bottom:1px solid #edf0e9;cursor:pointer}
.material-picker-row:last-child{border-bottom:0}
.material-picker-words{display:flex;flex-direction:column;min-width:0;gap:6px}
.material-picker-words strong{font-size:14px;font-weight:500;overflow-wrap:anywhere;line-height:1.5}
.material-picker-words .hint{font-size:11px;margin:0}
.materials-view input[type="checkbox"],.material-dialog input[type="checkbox"]{width:16px;height:16px;margin:0;accent-color:#476e58;flex-shrink:0;min-height:0}
#material-more{margin-top:20px;width:100%}
.batch-material-actions{display:flex;justify-content:flex-end;margin:10px 0 16px}.batch-material-actions button{font-size:13px;min-height:40px}
@media(max-width:1100px){.materials-layout{grid-template-columns:155px minmax(0,1fr);gap:16px}.material-content{padding:18px}.material-record .video-cover{display:none}.material-group-heading{align-items:flex-start}.material-group-heading .result-actions{gap:0;flex-wrap:wrap;justify-content:flex-end}}
@media(max-width:760px){.materials-intro{align-items:flex-start;gap:12px}.materials-intro p{font-size:12px;max-width:200px}.materials-intro button{font-size:12px;padding:8px 11px;min-height:38px;white-space:nowrap}.materials-layout{display:block}.material-group-panel{position:static;padding:12px;margin-bottom:15px;border-radius:15px}.material-group-panel h2{margin:0 0 9px;font-size:11px}#material-groups{flex-direction:row;overflow:auto;padding-bottom:2px}.dashboard .material-group{width:auto;flex-shrink:0;font-size:12px;min-height:38px;padding:9px 11px}.material-group-name{max-width:180px}.material-content{padding:18px 14px;border-radius:17px}.material-group-heading h2{font-size:19px}.material-toolbar{margin:20px 0 12px;gap:8px}.material-toolbar input{flex-basis:100%;font-size:14px}.material-toolbar button{flex:1;white-space:nowrap;font-size:12px;padding:9px}.material-table thead{display:none}.material-table tbody{display:block}.material-table tr{display:grid;grid-template-columns:22px minmax(0,1fr) 75px;gap:7px;padding:18px 0;border-bottom:1px solid #edf0e9}.material-table td{padding:0;border:0;display:block}.material-table td.material-preview{grid-column:2/4;grid-row:2;padding-top:10px}.material-preview p{-webkit-line-clamp:2;font-size:12px}.material-record .video-cover{display:block;width:40px;min-width:40px;height:56px}.material-record{gap:9px}.material-record strong{font-size:13px}.material-selection{gap:8px}.material-selection .quiet{font-size:11px}.material-dialog{padding:23px}.material-empty{padding:45px 20px}.material-source-items{max-height:38dvh}.material-dialog .dialog-actions{position:sticky;bottom:-23px;background:#fff;padding:12px 0;margin-top:12px}}

@media(max-width:760px){
 .dashboard .material-selection .quiet,.dashboard .material-group-heading .quiet,.dashboard .material-operations button,.dashboard .material-open{min-height:44px;line-height:1.5;display:inline-flex;align-items:center}
 .dashboard .material-selection{gap:4px 8px}
 .dashboard .material-operations button,.dashboard .material-open{width:100%}
 .dashboard .materials-intro button{min-height:44px}
}
