#macro-menu-panel .macro-menu-edge { position:absolute; z-index:6; touch-action:none; border-radius:4px; }
#macro-menu-panel .macro-menu-edge-n { top:0; left:12px; right:12px; height:8px; cursor:ns-resize; }
#macro-menu-panel .macro-menu-edge-s { bottom:0; left:12px; right:22px; height:8px; cursor:ns-resize; }
#macro-menu-panel .macro-menu-edge-w { left:0; top:12px; bottom:12px; width:8px; cursor:ew-resize; }
#macro-menu-panel .macro-menu-edge-e { right:0; top:12px; bottom:22px; width:8px; cursor:ew-resize; }
#macro-menu-panel .macro-menu-edge::after { content:""; position:absolute; background:#818cf8; border-radius:3px; }
#macro-menu-panel .macro-menu-edge-n::after, #macro-menu-panel .macro-menu-edge-s::after { width:36px; height:3px; left:calc(50% - 18px); top:2px; }
#macro-menu-panel .macro-menu-edge-w::after, #macro-menu-panel .macro-menu-edge-e::after { width:3px; height:36px; top:calc(50% - 18px); left:2px; }
#macro-menu-panel .macro-menu-edge-se { right:0; bottom:0; width:20px; height:20px; cursor:nwse-resize; background:repeating-linear-gradient(135deg,transparent 0 4px,#818cf8 4px 6px); clip-path:polygon(100% 0,100% 100%,0 100%); }
#macro-menu-panel .macro-menu-edge:hover, #macro-menu-panel .macro-menu-edge:focus-visible { background-color:#818cf866; outline:2px solid #818cf8; }
/* Macro library: explicit layout independent of generated utility classes. */
#macro-menu-panel { color:#334155; background:#f8fafc; border-radius:14px; padding:14px; overflow:hidden; display:flex; flex-direction:column; gap:10px; box-sizing:border-box; }
#macro-menu-panel.hidden { display:none; }
.dark #macro-menu-panel { color:#e2e8f0; background:#0f172a; }
#macro-menu-header { display:flex; flex-wrap:wrap; align-items:center; gap:6px; flex-shrink:0; }
#macro-menu-header button, .macro-card button { font-size:11px; padding:6px 9px; border:1px solid #cbd5e1; border-radius:7px; white-space:nowrap; background:transparent; color:inherit; cursor:pointer; }
#macro-menu-panel > div:has(> #macro-list-body) { min-height:0; overflow:auto; border:0; }
#macro-list-body { display:flex; flex-direction:column; gap:10px; max-height:none; overflow:auto; padding:2px; font-size:12px; }
.macro-card { display:grid; grid-template-columns:18px 64px minmax(0,1fr); align-items:center; gap:12px; padding:12px; background:white; border:1px solid #dbe3ef; border-radius:12px; box-shadow:0 2px 5px #0f172a06; }
.dark .macro-card { background:#1e293b; border-color:#475569; }
.macro-card .macro-thumbnail { width:64px; height:64px; padding:0; border-style:dashed; overflow:hidden; white-space:normal; color:#64748b; }
.macro-thumbnail img { width:100%; height:100%; object-fit:cover; }
.macro-card-info { display:flex; flex-direction:column; gap:6px; min-width:0; overflow-wrap:anywhere; }
.macro-card-info strong { font-size:14px; font-weight:600; }
.macro-card-info small { color:#64748b; font-size:11px; }
.macro-card-actions { grid-column:1/-1; display:flex; flex-wrap:wrap; align-items:center; gap:5px; }
.macro-card-info .macro-run { align-self:flex-start; background:#0f766e; color:white; border-color:#0f766e; }
.macro-card-actions .macro-remove { color:#be123c; }
#macro-editor-split { display:flex; flex:1; width:100%; height:100%; min-height:0; min-width:0; overflow:hidden; }
#macro-editor-split > #content-viewport { flex:1; width:0; min-width:0; }
#macro-editor-split > #macro-menu-panel.macro-docked { position:relative !important; inset:auto !important; width:var(--macro-dock-width,430px) !important; height:100% !important; flex-shrink:0; border-radius:0; box-shadow:none; border-left:1px solid #cbd5e1; z-index:auto; }
#macro-menu-panel.macro-docked .macro-menu-edge:not(.macro-menu-edge-w) { display:none; }
#macro-menu-panel.macro-docked #macro-menu-header { cursor:default; }
@media(max-width:600px) {
 #macro-editor-split.has-macro-dock { flex-direction:column; }
 #macro-editor-split > #content-viewport { width:100%; min-height:180px; }
 #macro-editor-split > #macro-menu-panel.macro-docked { width:100% !important; height:45% !important; }
 #macro-menu-panel button { min-height:36px; }
 .macro-card-actions { flex-wrap:wrap; }
}
