#aiImportBtn{white-space:nowrap;height:38px;padding:0 14px;gap:7px}
#aiImportBtn svg{width:17px;height:17px}
#excalidrawImportBtn{flex:none;white-space:nowrap;height:38px}
#moreMenu button.mi{border:0;background:transparent;color:inherit;font:inherit;width:100%;text-align:left}
@media(max-width:1600px){#topbar{gap:9px}.docswitch{max-width:165px}#tools .tool{width:32px}#saveState{display:none}}
@media(max-width:1000px){#excalidrawImportBtn{display:none}}
#empty{width:min(580px,90vw)}
#empty .empty-actions{pointer-events:auto;display:flex;justify-content:center;margin:18px 0}
#aiImportOverlay{z-index:110;color:#243349;user-select:text;-webkit-user-select:text}
.ai-import-modal{width:1100px;max-width:94vw;max-height:92vh;max-height:92dvh;overflow:auto;border-radius:18px;background:#fff;box-shadow:0 24px 72px #0b152c70}
.ai-head{display:flex;align-items:center;justify-content:space-between;padding:18px 24px;border-bottom:1px solid #e5eaf1}
.ai-head h2{font-size:21px;letter-spacing:-.4px;color:#14273e}
.ai-close{width:32px;height:32px;border:0;background:#f1f5f9;color:#52647a;border-radius:8px;cursor:pointer;font-size:21px}
.ai-import-modal[data-mode="excalidraw"]{width:480px}
.ai-import-modal[data-mode="excalidraw"] .ai-steps{grid-template-columns:1fr}
.ai-import-modal[data-mode="excalidraw"] .ai-guide-only{display:none}
.ai-excalidraw-intro{margin:0 0 13px;color:#405978;font-size:14px;line-height:1.5}
.ai-paste{width:100%;margin-top:8px}
.ai-paste-shortcut{margin:10px 0 0;font-size:13px;line-height:1.6;color:#405978}
.ai-paste-shortcut kbd{padding:1px 5px;border:1px solid #cfdbeb;border-radius:4px;background:#f4f7fb;font:inherit;font-weight:600;color:#253a53}
.ai-steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;padding:20px 24px}
.ai-step{min-width:0}
.ai-step h3{display:flex;gap:8px;align-items:center;font-size:14px;margin-bottom:10px;color:#253a53}
.ai-step h3 span{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#e6eefc;color:#2258a8;font-size:12px;flex:none}
.ai-step img{display:block;width:100%;height:auto;border-radius:10px;margin-bottom:12px}
.ai-prompt{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:64px;padding:9px 10px;border:1px solid #dce6f2;border-radius:10px;background:#f8fafc}
#aiPromptText{min-width:0;margin:0;color:#283b52;font-size:13px;line-height:1.45;overflow-wrap:anywhere}
#aiCopyPrompt{flex:none;white-space:nowrap}
.ai-btn{min-height:35px;border:1px solid #c8d4e2;border-radius:8px;padding:6px 11px;font-family:inherit;font-weight:600;font-size:13px;background:#fff;color:#28415e;cursor:pointer}
.ai-btn:hover{background:#eef4fb}
.ai-btn:disabled{opacity:.5;cursor:default}
.ai-drop{display:flex;align-items:center;justify-content:center;gap:11px;width:100%;min-height:64px;padding:9px 12px;border:1px dashed #6085b8;border-radius:10px;background:#f0f6ff;color:#163e76;cursor:pointer;font-family:inherit;text-align:left}
.ai-drop svg{flex:none;width:23px;height:23px;pointer-events:none}
.ai-drop span{display:block;pointer-events:none}
.ai-drop strong{display:block;font-size:14px;line-height:1.3}
#aiImportFileHint{margin-top:3px;color:#405978;font-size:12px;line-height:1.35}
.ai-drop:hover,.ai-drop.drag-over{background:#dceaff;border-color:#1e5ba8}
.ai-drop.drag-over{outline:2px solid #2c67b8;outline-offset:2px}
.ai-drop:disabled{cursor:wait}
.ai-feedback{display:block;margin-top:6px;font-size:12px;color:#526983}
.ai-feedback:empty{display:none}
.ai-result{margin-top:8px;white-space:pre-line;color:#334e6d;font-size:12px;line-height:1.45;overflow-wrap:anywhere}
.ai-result:empty{display:none}
.ai-result[data-error="true"]{color:#9b342d}
.ai-footer{padding:12px 24px;border-top:1px solid #e5eaf1;color:#536983;font-size:12px;line-height:1.5}
.ai-import-modal :focus-visible{outline:2px solid #326bc4;outline-offset:2px}
@media(max-width:670px){.ai-steps{grid-template-columns:1fr;gap:20px;padding:14px}.ai-head,.ai-footer{padding:12px 14px}}
.compact-only{display:none!important}
@media(max-width:1400px){#topbar{gap:8px}.brand b{display:none}.docswitch{max-width:150px}.tool{width:32px}.toolgroup{gap:2px}#saveState{display:none}}
@media(max-width:1320px) and (min-width:801px){#tools{position:fixed;top:64px;left:50%;transform:translateX(-50%);box-shadow:var(--shadow)}#props{top:123px}#stage{top:116px}}
@media(max-width:800px){#topbar{gap:7px;padding:0 10px}.brand,#topbar>.sep,#undoBtn,#redoBtn,#helpBtn,#fitBtn,.zoomctl{display:none}#aiImportBtn{margin-left:auto;padding:0 10px}.docswitch{min-width:0;flex:0 1 140px}.docswitch #docName{min-width:0}#tools{position:fixed;top:auto;bottom:14px;left:50%;transform:translateX(-50%);box-shadow:var(--shadow)}#props{top:64px;max-width:96vw;flex-wrap:wrap;justify-content:center}#minimap,#hint{display:none}#docPanel{left:10px;width:min(320px,calc(100vw - 20px))}.compact-only{display:flex!important}}
