.composer-shortcuts{display:flex;align-items:center;flex-wrap:wrap;gap:5px;min-width:0;margin-bottom:5px}
.composer-shortcuts .suggestions{display:contents}
.composer-shortcuts button{flex:none;min-height:28px;padding:4px 8px;font-size:10px;white-space:nowrap}
#reference-attached{display:block;width:100%;min-width:0;white-space:pre-line;overflow-wrap:anywhere;font-size:13px;line-height:1.65;font-weight:600;color:var(--ink);text-align:left;background:var(--soft,#edf5ef);border:1px solid var(--line);border-left:4px solid var(--accent);border-radius:10px;padding:10px 12px;margin-bottom:10px;cursor:pointer}
#reference-attached:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
#reference-dialog{width:min(720px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:18px;border-radius:16px;overflow:hidden;color:var(--ink)}
#reference-dialog[open]{display:flex;flex-direction:column;gap:14px}
.reference-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0}
.reference-dialog-heading h2{font-size:16px;line-height:1.5}
.reference-dialog-heading button{flex:none}
.reference-dialog-content{min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 2px 4px}
.reference-dialog-content label{display:block;margin:10px 0 6px;font-size:12px}
.reference-dialog-content input{max-width:100%;font-size:12px;min-height:35px}
.reference-dialog-content textarea{width:100%;min-height:140px;max-height:35dvh;resize:vertical;font-size:12px;line-height:1.7;border:1px solid var(--line);padding:8px;border-radius:6px;color:var(--ink);background:#fff}
.reference-dialog-content button{font-size:11px;margin:6px 6px 0 0;min-height:36px}
#reference-status{font-size:11px;line-height:1.6;overflow-wrap:anywhere}
.reference-dialog-footer{display:flex;justify-content:flex-end;flex-shrink:0;border-top:1px solid var(--line);padding-top:12px}
@media(max-width:700px){#reference-dialog{padding:12px}.reference-dialog-heading h2{font-size:14px}}

#template-dialog{width:min(940px,calc(100vw - 28px));max-height:calc(100dvh - 28px);padding:22px;overflow:auto;color:var(--ink)}
#template-dialog .library-header{gap:12px;margin-bottom:12px}
#template-dialog #template-intro{font-size:13px;line-height:1.7;margin:10px 0}
#template-dialog label{display:block;font-size:12px;margin:10px 0;line-height:1.6}
#template-dialog input:not([type=checkbox]),#template-dialog textarea{max-width:100%;width:100%;color:var(--ink);font:inherit;border:1px solid var(--line);border-radius:9px;padding:9px;background:white}
#template-dialog input[type=file]{border:0;padding:5px 0}
#template-dialog textarea{resize:vertical;min-height:80px;line-height:1.7}
#template-dialog input[type=checkbox]{width:17px;height:17px;margin:0 6px 0 0;vertical-align:middle}
#template-dialog details{border:1px solid var(--line);border-radius:12px;padding:10px 12px;margin:12px 0;background:#fff}
#template-dialog summary{cursor:pointer;font-size:12px;font-weight:600;line-height:1.6}
#template-dialog #template-more{background:var(--canvas)}
#template-dialog #template-status{font-size:12px;line-height:1.7;padding:10px 0;color:var(--accent);overflow-wrap:anywhere}
#template-dialog .template-field{border:1px solid var(--line);border-radius:10px;padding:8px 12px;margin-top:10px;background:var(--canvas)}
#template-dialog .template-field-tools{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
#template-dialog .template-field-tools>label:first-child{flex:1;min-width:180px}
#template-dialog #template-field-count{flex-basis:100%;margin:0}
#template-dialog #template-revision{border-top:1px solid var(--line);margin:12px 0;padding:6px 0}
#template-dialog .template-main-actions{position:sticky;bottom:-22px;display:flex;justify-content:flex-end;gap:8px;padding:14px 0;margin:10px 0 0;background:#fff;border-top:1px solid var(--line);z-index:1}
#template-dialog .template-main-actions button{min-height:42px}
#template-dialog #template-revision>.fineprint{font-size:10px}
#template-dialog .template-change{margin-top:12px}
@media(max-width:700px){#template-dialog{padding:14px;width:calc(100vw - 18px);max-height:calc(100dvh - 18px)}#template-dialog .template-main-actions{bottom:-14px}#template-dialog .library-header h2{font-size:16px}#template-dialog .template-field-tools{display:block}}

#workflow-docs-dialog{width:min(800px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:20px;overflow:auto;color:var(--ink)}
#workflow-docs-dialog .library-header{gap:12px;margin-bottom:14px}
#workflow-docs-dialog h2{font-size:18px}
#workflow-docs-dialog label{display:block;font-size:12px;line-height:1.6;margin:10px 0}
#workflow-docs-dialog input,#workflow-docs-dialog textarea,#workflow-docs-dialog select{width:100%;max-width:100%;padding:9px;border:1px solid var(--line);border-radius:8px;color:var(--ink);background:white;font:inherit}
#workflow-docs-dialog textarea{height:clamp(160px,25vh,220px);min-height:160px;resize:vertical;line-height:1.8}
#workflow-docs-dialog p{font-size:12px;line-height:1.7;margin:10px 0}
#workflow-docs-dialog a{display:inline-flex;align-items:center;min-height:38px;padding:8px 12px;border:1px solid var(--line);border-radius:9px;text-decoration:none;color:var(--accent);font-size:12px;background:var(--canvas)}
#workflow-docs-dialog details{border-top:1px solid var(--line);padding-top:12px;margin-top:16px}
#workflow-docs-dialog summary{cursor:pointer;font-size:12px}
#workflow-docs-status{color:var(--accent)}
#workflow-native-dialog{width:min(940px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:20px;overflow:auto;color:var(--ink)}
#workflow-native-dialog h2{font-size:18px}
#workflow-native-dialog label{display:block;font-size:12px;line-height:1.7;margin:10px 0}
#workflow-native-dialog input:not([type=checkbox]),#workflow-native-dialog textarea,#workflow-native-dialog select{width:100%;max-width:100%;padding:9px;border:1px solid var(--line);border-radius:8px;background:white;color:var(--ink);font:inherit}
#workflow-native-dialog input[type=checkbox]{margin-right:8px}
#workflow-native-dialog textarea{min-height:90px;line-height:1.8;resize:vertical}
#workflow-native-dialog details{border:1px solid var(--line);border-radius:10px;padding:10px;margin:12px 0}
#workflow-native-dialog summary{cursor:pointer;font-size:12px}
#workflow-native-dialog .template-field{padding:10px;border-bottom:1px solid var(--line)}
#workflow-native-dialog .template-main-actions{position:sticky;bottom:-20px;background:white;padding:12px 0;border-top:1px solid var(--line);margin-top:16px}
#workflow-native-status{font-size:12px;color:var(--accent);line-height:1.8}
#workflow-native-preview>section{margin-top:16px;padding:12px;background:var(--canvas);border-radius:10px}
#workflow-native-result{display:block;padding:12px 0;color:var(--accent)}
@media(max-width:700px){#workflow-native-dialog{padding:14px;width:calc(100vw - 18px);max-height:calc(100dvh - 18px)}#workflow-native-dialog .template-main-actions{bottom:-14px}}
