.workspace-dialog{box-sizing:border-box;width:min(800px,calc(100vw - 24px));max-height:92dvh;padding:0;border:1px solid #76518c;border-radius:24px;background:linear-gradient(145deg,#181d34,#0b1020);color:#f5f1ff;box-shadow:0 32px 100px #0009,inset 0 1px #ffffff26;overflow:auto;font:14px/1.6 system-ui,sans-serif}
.workspace-dialog::backdrop{background:#030512b8;backdrop-filter:blur(7px)}
.workspace-dialog header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 24px;border-bottom:1px solid #ffffff17;position:sticky;top:0;background:#14192e;z-index:1}
.workspace-dialog h2{font-size:21px;margin:0}.workspace-dialog-body{padding:22px}.workspace-dialog-body>p{color:#b9c2db;margin-top:0}
.workspace-dialog button,.workspace-dialog select,.workspace-dialog input[type=number]{font:inherit;color:#f7f4ff;background:#20263e;border:1px solid #555b7b;border-radius:11px;padding:10px 14px;box-shadow:0 4px 10px #0003,inset 0 1px #ffffff12;cursor:pointer}
.workspace-dialog button:disabled{opacity:.4;cursor:not-allowed}.workspace-dialog button:focus-visible,.workspace-dialog select:focus-visible,.workspace-dialog input:focus-visible{outline:2px solid #40f2b7;outline-offset:3px}
.workspace-dialog select option{background:#171e32}.workspace-dialog-body>label{display:grid;gap:8px}.workspace-dialog input[type=number]{width:100%;margin-top:12px;box-sizing:border-box}
.workspace-dialog input[type=checkbox],.workspace-dialog input[type=radio]{accent-color:#29e9ad;width:18px;height:18px;flex-shrink:0}
.workspace-dialog footer,.export-options{display:flex;align-items:center;gap:9px;flex-wrap:wrap;justify-content:flex-end}.export-options{justify-content:space-between;padding:10px 12px;border:1px solid #ffffff20;border-radius:14px;margin-bottom:16px}
.export-options label,.export-fields label{display:inline-flex;align-items:center;gap:8px}.separator-buttons{display:flex;gap:6px}.separator-buttons button.active{border-color:#35e9ba;background:#164e49}
.export-fields{display:flex;gap:15px;flex-wrap:wrap;border:1px solid #38d5b544;border-radius:14px;padding:14px;margin:0 0 16px}.export-fields legend{padding:0 7px;color:#6fffd7;font-size:12px;text-transform:uppercase;letter-spacing:1px}
.export-preview{box-sizing:border-box;width:100%;height:300px;resize:vertical;border:1px solid #34415b;border-radius:15px;padding:16px;background:#060c18;color:#e1efff;font:12px/1.8 ui-monospace,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere;overflow:auto}
.workspace-dialog .export-total{color:#61f6b6;font-size:13px;margin:12px 0}.workspace-dialog .tool-green{background:linear-gradient(135deg,#12b88b,#157d67);border-color:#55eeb9;color:white;font-weight:700}
.workspace-dialog .tool-magenta{background:linear-gradient(135deg,#b620e0,#e72a82);border-color:#f881cc;font-weight:700}.workspace-dialog .tool-red{background:linear-gradient(135deg,#d72d57,#ad1b45);border-color:#ff6c94;font-weight:700}.workspace-dialog .dialog-x{font-size:24px;line-height:1;padding:8px 12px;color:#ff9bb6;border-color:#a54c67}
.settings-hint{margin-top:15px!important;font-size:12px}button:disabled{cursor:not-allowed}
@media(max-width:500px){.workspace-dialog header,.workspace-dialog-body{padding:16px}.workspace-dialog h2{font-size:19px}.export-options{gap:12px}.export-fields{gap:12px}.workspace-dialog footer button{flex:1}.export-preview{height:260px}}
.dialog-toast{position:sticky;top:72px;z-index:3;margin:10px 20px;padding:10px 14px;border:1px solid #4ae3b177;border-radius:12px;color:#afffe1;background:#163a34;box-shadow:0 8px 20px #0004;font-size:13px}.dialog-toast[hidden]{display:none}
/* Keep full-page refresh gestures native; overlays retain their own scroll. */
@media(max-width:650px){
  html,body{overscroll-behavior-y:auto}
  button,a,input,select{touch-action:manipulation}
  .modal-overlay,.admin-modal-wrap,.workspace-dialog::backdrop{backdrop-filter:none!important}
  .modal,.workspace-dialog,.user-drawer{overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch}
}
