/* Shared modal surface and input language. Native dialogs retain focus trapping/Escape. */
body dialog{border-color:#414141;border-radius:18px;background:linear-gradient(145deg,#121212,#000000);color:#e6e6e6;box-shadow:0 35px 120px #0009}body dialog::backdrop{background:#000000c4;backdrop-filter:blur(9px)}body dialog input:not([type=checkbox]):not([type=color]):not([type=range]),body dialog select,body dialog textarea{border:1px solid #404040;background:#181818;color:#e7e7e7;border-radius:9px;min-height:44px;font-size:14px;padding:11px 13px}body dialog input:focus-visible,body dialog select:focus-visible,body dialog textarea:focus-visible{outline:2px solid #64abff;outline-offset:2px;box-shadow:0 0 0 4px #2c89f214}body dialog button{border-radius:8px}body dialog .primary{background:#1789fc;border:1px solid #3b9bff;min-height:44px;box-shadow:0 5px 20px #0876e51a}body dialog .dialog-actions{gap:10px;align-items:center}body dialog .dialog-actions>button{min-height:44px;padding-inline:18px}body dialog .pro-dialog-head>button,body dialog .ap-picker-close{border:1px solid #474747;border-radius:9px;background:#1d1d1d;color:#b8b8b8}body dialog .pro-shortcuts button{background:#1b1b1b;border-color:#434343}body dialog .pro-form-grid{gap:20px}body dialog .dock-tool-item{border-radius:10px}body dialog .form-error{font-size:13px;line-height:1.65}body dialog .muted{line-height:1.7}body dialog .close{border:1px solid #3e3e3e;border-radius:9px;background:#181818;width:34px;height:34px;display:grid;place-items:center;padding:0;font-size:20px;color:#b4b4b4}
body #chartOptionsDialog{padding:0;width:min(850px,calc(100vw - 36px));max-width:850px;max-height:calc(100dvh - 56px);overflow:hidden;border:1px solid #464646;border-radius:20px;background:#111111;color:#e7e7e7}body #chartOptionsDialog[open]{display:flex;flex-direction:column}.ux-modal-head{display:flex;align-items:center;gap:16px;padding:27px 28px;border-bottom:1px solid #373737;background:linear-gradient(120deg,#262626,#131313);flex-shrink:0}.ux-modal-icon{width:45px;height:45px;display:grid;place-items:center;flex-shrink:0;border-radius:12px;border:1px solid #505050;background:#303030;color:#7dbbff}.ux-modal-icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.5}.ux-eyebrow{display:block;color:#969696;font-size:9px;letter-spacing:.15em;font-weight:600}.ux-modal-head h2{display:block;font-size:23px;font-weight:600;letter-spacing:-.035em;line-height:1.25;margin:7px 0 6px}.ux-modal-head p{font-size:12px;color:#909090;margin:0}.ux-close{margin-left:auto;border:1px solid #474747!important;display:grid;place-items:center;width:34px;height:34px;min-height:34px;flex-shrink:0;padding:0!important;color:#a6a6a6;background:#1d1d1d;font-size:21px!important}.ux-modal-body{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(250px,1fr);min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#505050 transparent}.ux-controls{padding:27px 28px;border-right:1px solid #393939}.ux-control-section+.ux-control-section{border-top:1px solid #3c3c3c;margin-top:25px;padding-top:25px}.ux-section-title{display:flex;align-items:center;gap:10px;margin-bottom:18px}.ux-section-title>span{font:10px ui-monospace,monospace;color:#959595;border:1px solid #434343;padding:3px 5px;border-radius:4px}.ux-section-title h3{font-size:14px;letter-spacing:-.01em;font-weight:500;color:#e2e2e2;margin:0}.ux-toggle-row{display:flex!important;align-items:center;justify-content:space-between;gap:16px;margin:0 0 12px!important;padding:14px!important;border:1px solid #3d3d3d;border-radius:10px;background:#181818;color:#bdbdbd}.ux-toggle-row>span{flex:1;min-width:0}.ux-toggle-row strong{display:block;font-size:12px;font-weight:500;color:#dcdcdc;line-height:1.5}.ux-toggle-row small{display:block;font-size:10px;line-height:1.7;color:#8b8b8b;margin-top:3px}.ux-toggle-row>input[type=checkbox]{appearance:none;-webkit-appearance:none;flex-shrink:0;width:34px;height:20px;min-height:20px;padding:0;border:1px solid #4f4f4f;border-radius:20px;background:#363636;position:relative;cursor:pointer;margin:0;transition:background .18s,border-color .18s}.ux-toggle-row>input[type=checkbox]::after{content:'';position:absolute;top:3px;left:3px;width:12px;height:12px;border-radius:50%;background:#b4b4b4;transition:transform .18s,background .18s}.ux-toggle-row>input:checked{background:#146cc0;border-color:#3698f3}.ux-toggle-row>input:checked::after{transform:translateX(14px);background:#efefef}.ux-field{display:flex!important;flex-direction:column;gap:10px;margin-top:20px!important;color:#bdbdbd;font-size:12px}.ux-field>span:first-child{display:flex;justify-content:space-between;align-items:center;gap:12px}.ux-field output{font:10px ui-monospace,monospace;color:#878787}.ux-native{display:none!important}.ux-segments{display:flex;gap:5px;padding:4px;border:1px solid #404040;border-radius:9px;background:#000000}.ux-segments button{display:flex;align-items:center;justify-content:center;gap:8px;flex:1;min-height:36px;padding:8px!important;border:1px solid transparent;border-radius:6px;font-size:11px;color:#989898;white-space:nowrap;background:transparent}.ux-segments button.selected{background:#343434;border-color:#565656;color:#d5d5d5;box-shadow:0 2px 5px #0002}.ux-line-sample{display:inline-block;width:22px;height:0;border-top:1px solid currentColor}.ux-line-sample.dashed{border-top-style:dashed}.ux-widths button{flex-direction:column;gap:7px}.ux-widths button>i{display:block;width:22px;background:currentColor;border-radius:4px}.ux-widths small{font-size:9px;color:inherit}.ux-colors{display:flex;gap:8px;align-items:center;justify-content:space-between}.ux-colors>button{width:26px;height:26px;min-height:26px;border-radius:50%!important;background:var(--swatch)!important;box-shadow:inset 0 0 0 3px #111111;outline:1px solid #454545;outline-offset:0;padding:0!important;flex-shrink:0;border:0}.ux-colors>button[aria-pressed=true]{outline:2px solid #cfcfcf;outline-offset:2px}.ux-colors input[type=color]{width:28px;height:28px;min-height:28px;border:1px solid #525252;border-radius:7px;padding:3px;background:#2b2b2b;cursor:pointer;flex-shrink:0}.ux-preview-side{padding:28px 24px;background:#000000}.ux-preview-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:9px;letter-spacing:.12em;color:#888888;margin-bottom:16px}.ux-preview-badge{letter-spacing:.1em;color:#a8a8a8;padding:3px 6px;background:#2a2a2a;border:1px solid #494949;border-radius:4px;font-size:8px}.ux-chart-preview{position:relative;border:1px solid #3c3c3c;border-radius:11px;overflow:hidden;background:#000000;isolation:isolate}.ux-chart-preview svg{display:block;width:100%;height:auto}.ux-entry-tag{position:absolute;top:55%;right:8px;width:88px;height:24px;background:#2d2d2d;color:var(--entry-color,#53d5b0);border-left:2px solid currentColor;border-radius:3px;display:flex;align-items:center;justify-content:space-between;gap:6px;padding:4px 7px;font:9px ui-monospace,monospace;overflow:hidden}.ux-entry-tag b{font-size:10px;font-weight:500}.ux-entry-tag i{position:absolute;bottom:0;left:0;width:72%;height:1px;background:currentColor}.ux-preview-caption{position:absolute;bottom:9px;left:10px;letter-spacing:.12em;color:#5b5b5b;font-size:7px}.ux-preview-mode{display:flex;gap:10px;margin-top:18px}.ux-preview-mode button{flex:1;border:1px solid #414141;border-radius:7px;padding:8px!important;min-height:36px;font-size:9px;color:#828282;background:#000000}.ux-preview-mode button[aria-pressed=true]{background:#2d2d2d;border-color:#5e5e5e;color:#d4d4d4}.ux-preview-explanation{font-size:11px;color:#a0a0a0;line-height:1.8;margin:14px 0 22px}.ux-info-card{display:flex;align-items:flex-start;gap:10px;padding:14px;border:1px solid #3f3f3f;border-radius:9px;background:#1a1a1a}.ux-info-card>span{display:grid;place-items:center;border:1px solid #46729f;width:14px;height:14px;flex-shrink:0;border-radius:50%;font:9px Georgia,serif;font-style:italic;color:#b3b3b3;margin-top:2px}.ux-info-card p{font-size:10px;color:#999999;line-height:1.8;margin:0}.ux-preview-footnote{display:block;margin-top:18px;font-size:9px;line-height:1.9;color:#727272}.ux-modal-footer{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:18px 28px;border-top:1px solid #3d3d3d;background:#151515;flex-shrink:0}.ux-modal-footer>div{display:flex;gap:9px}.ux-modal-footer button{min-height:42px;font-size:12px;padding:11px 15px}.ux-reset{color:#979797;font-size:11px!important;padding-left:0!important}.ux-cancel{border:1px solid #494949;color:#b5b5b5;background:#1c1c1c}
.theme-light #chartOptionsDialog{background:#f9f9f9;color:#333333;border-color:#c5c5c5}.theme-light .ux-modal-head,.theme-light .ux-modal-footer{background:#f0f0f0;border-color:#d3d3d3}.theme-light .ux-modal-head h2,.theme-light .ux-section-title h3,.theme-light .ux-toggle-row strong{color:#434343}.theme-light .ux-controls,.theme-light .ux-control-section+.ux-control-section{border-color:#d3d3d3}.theme-light .ux-toggle-row{background:#f3f3f3;border-color:#d2d2d2}.theme-light .ux-field{color:#5c5c5c}.theme-light .ux-segments{background:#ececec;border-color:#d1d1d1}.theme-light .ux-segments button{color:#727272}.theme-light .ux-segments button.selected{background:#fff;border-color:#c2c2c2;color:#4e4e4e}.theme-light .ux-preview-side{background:#ededed}.theme-light .ux-colors>button{box-shadow:inset 0 0 0 3px #f9f9f9}.theme-light .ux-preview-footnote{color:#727272}
@media(max-width:720px){body dialog:not(#chartOptionsDialog){max-height:88dvh}body dialog input:not([type=checkbox]):not([type=color]):not([type=range]),body dialog select,body dialog textarea{font-size:16px;min-height:46px}body #chartOptionsDialog{position:fixed;inset:auto 0 0;width:100%;max-width:100%;margin:0;max-height:92dvh;border-radius:20px 20px 0 0;border-bottom:0}.ux-modal-head{padding:22px 20px;gap:12px}.ux-modal-head h2{font-size:20px}.ux-modal-head p{font-size:10px}.ux-modal-icon{width:38px;height:38px;border-radius:10px}.ux-eyebrow{font-size:8px}.ux-close{width:32px;height:32px;min-height:32px}.ux-modal-body{display:flex;flex-direction:column}.ux-controls{padding:22px 20px;border-right:0}.ux-preview-side{padding:22px 20px;border-top:1px solid #3e3e3e}.ux-chart-preview{max-width:360px;margin:auto}.ux-chart-preview svg{height:160px;width:100%}.ux-preview-heading,.ux-preview-mode,.ux-preview-explanation,.ux-info-card,.ux-preview-footnote{max-width:360px;margin-left:auto;margin-right:auto}.ux-preview-mode button{min-height:42px;font-size:11px}.ux-toggle-row strong{font-size:13px}.ux-toggle-row small{font-size:11px}.ux-field{font-size:13px}.ux-segments button{font-size:12px;min-height:42px}.ux-widths small{font-size:10px}.ux-colors{justify-content:flex-start;gap:14px}.ux-colors>button{width:28px;height:28px;min-height:28px}.ux-info-card p{font-size:11px}.ux-preview-footnote{font-size:10px}.ux-modal-footer{padding:16px 20px calc(16px + env(safe-area-inset-bottom));gap:10px}.ux-modal-footer button{font-size:11px;min-height:44px;padding:10px 13px}.ux-modal-footer .ux-reset{font-size:10px!important}.ux-modal-footer>div{gap:8px}.ux-cancel{display:none}.ux-preview-explanation{font-size:12px}}
@media(prefers-reduced-motion:no-preference){.ux-chart-preview path,.ux-entry-tag{transition:stroke .2s,color .2s}.ux-colors>button,.ux-segments button{transition:outline-color .18s,background-color .18s,border-color .18s}.ux-modal-body{scroll-behavior:smooth}}
