#plan-editor-overlay .modal-box{width:min(1040px,calc(100vw - 28px));max-width:1040px!important;padding:24px;border-radius:20px}
#plan-editor-overlay .bundle-layout{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:start;margin:18px 0}
#plan-editor-overlay .bundle-section{min-width:0;border:1px solid #cbd5e133;border-radius:14px;padding:15px;background:#ffffff04}
#plan-editor-overlay .bundle-section summary{font-weight:750;font-size:14px;cursor:pointer;line-height:1.5}
#plan-editor-overlay .bundle-note,#plan-editor-overlay .bundle-template p{font-size:12px;color:#94a3b8;line-height:1.6;margin:8px 0 12px}
#plan-editor-overlay .bundle-template{padding:16px;border:1px solid #14b8a655;background:#14b8a609;border-radius:14px}
#plan-editor-overlay .bundle-template>label{font-weight:700;font-size:13px}#plan-editor-overlay .bundle-template-row{display:flex;gap:10px;align-items:center;margin-top:8px;flex-wrap:wrap}
#plan-editor-overlay select,#plan-editor-overlay input:not([type=checkbox]),#plan-editor-overlay textarea{width:100%;min-height:42px;box-sizing:border-box}#plan-editor-template{flex:1;min-width:180px;background:#0f172a;color:#e2e8f0;border:1px solid #475569;border-radius:9px;padding:10px}
#plan-editor-bundle-summary{display:block;font-size:12px;line-height:1.5;color:#5eead4}#plan-editor-overlay .bundle-check{display:flex;align-items:center;gap:9px;min-height:40px;font-size:13px}
#plan-editor-overlay .modal-actions{position:sticky;bottom:-24px;background:#111827;padding:14px 0;margin-top:12px;border-top:1px solid #334155;z-index:2}
@media(max-width:700px){#plan-editor-overlay{padding:8px}#plan-editor-overlay .modal-box{width:100%;padding:16px;border-radius:14px}#plan-editor-overlay .bundle-layout{grid-template-columns:1fr;gap:10px}#plan-editor-overlay .modal-actions{bottom:-16px}#plan-editor-overlay .bundle-template-row>*{flex:1 1 100%}#plan-editor-overlay button{min-height:44px}}

/* A dedicated workspace, with no page scrolling behind the editor. */
body.plan-editor-open{overflow:hidden}
#plan-editor-overlay{padding:0;align-items:stretch;justify-content:stretch;z-index:100}
#plan-editor-overlay .modal-box{width:100%;max-width:none!important;height:100dvh;max-height:100dvh;box-sizing:border-box;border:0;border-radius:0;padding:24px max(24px,calc((100vw - 1240px)/2));overscroll-behavior:contain;scroll-padding-top:20px}
#plan-editor-overlay .modal-actions{bottom:-24px;gap:12px;padding-bottom:max(16px,env(safe-area-inset-bottom))}
@media(max-width:700px){#plan-editor-overlay .modal-box{padding:16px;padding-top:max(16px,env(safe-area-inset-top))}#plan-editor-overlay .modal-actions{bottom:-16px}#plan-editor-overlay .modal-actions button{flex:1}}

#plan-editor-overlay .plan-workspace-header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}#plan-editor-overlay .plan-workspace-header h2{margin:0;overflow-wrap:anywhere}#plan-editor-overlay .plan-workspace-header button{flex-shrink:0;min-height:44px}
