/* Skill authoring uses the available desktop canvas; other editors keep their layout. */
.library-view[data-editor-kind="skill"]:has(#libraryEditor:not([hidden])){padding:20px 28px 0;overflow:auto}
.library-view[data-editor-kind="skill"] .library-stage{max-width:none!important;width:100%}
.library-view[data-editor-kind="skill"] #libraryEditor{min-height:calc(100dvh - 60px)}
.library-view[data-editor-kind="skill"] #libraryForm{flex:1}
.library-view[data-editor-kind="skill"] .library-form-fields{display:flex;flex-direction:column;flex:1!important;gap:18px}
.library-view[data-editor-kind="skill"] #librarySkillFields{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(320px,1fr);gap:24px;margin:0;flex:1;min-height:540px}
.skill-main{display:flex;flex-direction:column;min-width:0;gap:10px}
.skill-main>label{display:flex;flex-direction:column;flex:1;min-height:0}
.skill-main textarea.library-content{flex:1;min-height:clamp(360px,calc(100dvh - 330px),900px)!important;height:100%;font:14px/1.8 ui-monospace,SFMono-Regular,monospace;resize:vertical}
.skill-caption{color:var(--ui-muted);font-size:12px;margin:0}
.skill-sidebar{display:flex;flex-direction:column;gap:16px;min-width:0}
.skill-resource-panel{border:1px solid var(--ui-line);border-radius:10px;padding:16px;display:flex;flex-direction:column;gap:12px;flex:1;min-height:260px;background:var(--bc-surface)}
.skill-resource-panel h3{font-size:14px;margin:0}
.skill-resource-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.skill-resource-toolbar button{padding:7px 10px}
.skill-resource-list{max-height:180px;overflow:auto;display:grid;gap:6px}
.skill-resource-row{display:flex;align-items:center;gap:8px;border-bottom:1px solid var(--ui-line);padding:7px 0;font-size:12px}
.skill-resource-row>button:first-child{flex:1;text-align:left;min-width:0;overflow-wrap:anywhere}
.skill-resource-row a{color:var(--ui-focus)}
.skill-resource-empty{font-size:13px;color:var(--ui-muted);padding:16px 0;margin:0;line-height:1.7}
.skill-resource-edit{display:grid;gap:10px}
.skill-resource-edit textarea{min-height:180px;font:13px/1.7 ui-monospace,SFMono-Regular,monospace}
.skill-resource-edit[hidden]{display:none}
.skill-sidebar .library-sharing-section{margin:0;padding:14px 0 0;border-top:1px solid var(--ui-line);border-bottom:0}
.skill-sidebar .library-sharing-section .library-form-grid{grid-template-columns:1fr;gap:10px}
.skill-import-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.skill-import-row input{max-width:230px;font-size:12px}
.library-view[data-editor-kind="skill"] .library-form-actions{margin-top:8px}
@media(max-width:900px){.library-view[data-editor-kind="skill"] #librarySkillFields{grid-template-columns:1fr;min-height:0}.skill-main textarea.library-content{min-height:360px!important}.library-view[data-editor-kind="skill"]:has(#libraryEditor:not([hidden])){padding:16px}.library-view[data-editor-kind="skill"] #libraryEditor{min-height:100%}}
.skill-resource-toolbar select{width:auto;max-width:140px;padding:5px 8px;height:32px}
.skill-resource-help{padding:10px 12px;border-radius:8px;background:var(--bc-canvas);font-size:12px;line-height:1.7;color:var(--ui-muted);overflow-wrap:anywhere}
.skill-resource-help strong{display:block;font-size:13px;color:var(--ui-ink);font-weight:500}
.skill-resource-help p{margin:4px 0 0}
.skill-resource-help strong:not(:first-child){margin-top:8px}
.skill-resource-example{color:var(--ui-ink);border-left:2px solid var(--ui-line);padding-left:8px}
.skill-resource-edit textarea{min-height:180px}
.skill-resource-panel:has(#skillResourceEdit:not([hidden])) .skill-resource-empty{display:none}
